OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Michael Schloh
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web          Date:   13-Nov-2003 17:06:29
  Branch: HEAD                             Handle: 2003111316062702

  Added files:
    openpkg-src/openvpn     openvpn.conf
  Modified files:
    openpkg-src/openvpn     fsl.openvpn openvpn.spec rc.openvpn
    openpkg-web             news.txt

  Log:
    Downgrade to JUNK due to missing dependency, and implement PR #202

  Summary:
    Revision    Changes     Path
    1.3         +1  -1      openpkg-src/openvpn/fsl.openvpn
    1.1         +18 -0      openpkg-src/openvpn/openvpn.conf
    1.25        +28 -4      openpkg-src/openvpn/openvpn.spec
    1.6         +35 -0      openpkg-src/openvpn/rc.openvpn
    1.7387      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openvpn/fsl.openvpn
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 fsl.openvpn
  --- openpkg-src/openvpn/fsl.openvpn   14 Jul 2003 18:32:36 -0000      1.2
  +++ openpkg-src/openvpn/fsl.openvpn   13 Nov 2003 16:06:29 -0000      1.3
  @@ -9,7 +9,7 @@
       -> {
           debug: file(
               path="@l_prefix@/var/openvpn/openvpn.log",
  -            perm=0644
  +            perm=0644, jitter=1, monitor=3600
           )
       }
   };
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openvpn/openvpn.conf
  ============================================================================
  $ cvs diff -u -r0 -r1.1 openvpn.conf
  --- /dev/null 2003-11-13 17:06:29.000000000 +0100
  +++ openvpn.conf      2003-11-13 17:06:29.000000000 +0100
  @@ -0,0 +1,18 @@
  +# Sample OpenVPN configuration file for
  +# using a pre-shared static key.
  +#
  +# '#' or ';' may be used to delimit comments.
  +
  +# Use a dynamic tun device.
  +dev tun
  +
  +# Our remote peer
  +remote mypeer.mydomain
  +
  +# 10.1.0.1 is our local VPN endpoint
  +# 10.1.0.2 is our remote VPN endpoint
  +ifconfig 10.1.0.1 10.1.0.2
  +
  +# Our pre-shared static key
  +secret static.key
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openvpn/openvpn.spec
  ============================================================================
  $ cvs diff -u -r1.24 -r1.25 openvpn.spec
  --- openpkg-src/openvpn/openvpn.spec  5 Aug 2003 18:32:54 -0000       1.24
  +++ openpkg-src/openvpn/openvpn.spec  13 Nov 2003 16:06:29 -0000      1.25
  @@ -23,17 +23,20 @@
   ##  SUCH DAMAGE.
   ##
   
  +#   FIXME: ms: JUNK status, because openvpn depends on a tun driver
  +#   FIXME:     (probably kernelbound) which OpenPKG can't provide.
  +
   #   package information
   Name:         openvpn
   Summary:      Virtual Private Network Facility
   URL:          http://openvpn.sourceforge.net/
   Vendor:       James Yonan
   Packager:     The OpenPKG Project
  -Distribution: OpenPKG [EVAL]
  +Distribution: OpenPKG [JUNK]
   Group:        Network
   License:      GPL
   Version:      1.4.3
  -Release:      20030805
  +Release:      20031113
   
   #   package options
   %option       with_fsl  yes
  @@ -42,6 +45,7 @@
   Source0:      
http://osdn.dl.sourceforge.net/sourceforge/openvpn/openvpn-%{version}.tar.gz
   Source1:      rc.openvpn
   Source2:      fsl.openvpn
  +Source3:      openvpn.conf
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -51,8 +55,8 @@
   BuildPreReq:  openssl, lzo >= 1.08-20021122
   PreReq:       openssl, lzo >= 1.08-20021122
   %if "%{with_fsl}" == "yes"
  -BuildPreReq:  fsl >= 1.2.0
  -PreReq:       fsl >= 1.2.0
  +BuildPreReq:  fsl >= 1.3.0
  +PreReq:       fsl >= 1.3.0
   %endif
   AutoReq:      no
   AutoReqProv:  no
  @@ -82,6 +86,7 @@
   %install
       rm -rf $RPM_BUILD_ROOT
       %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/openvpn \
           $RPM_BUILD_ROOT%{l_prefix}/var/openvpn
       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
       strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  @@ -92,6 +97,11 @@
       %{l_shtool} install -c -m 755 %{l_value -s -a} \
           %{SOURCE rc.openvpn} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   
  +    #   install default config file
  +    %{l_shtool} install -c -m 644 %{l_value -s -a} \
  +        %{SOURCE openvpn.conf} \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/openvpn/
  +
       #   install OSSP fsl configuration
       %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
       %{l_shtool} install -c -m 644 %{l_value -s -a} \
  @@ -108,4 +118,18 @@
   
   %clean
       rm -rf $RPM_BUILD_ROOT
  +
  +%post
  +    #   after upgrade, restart service
  +    [ $1 -eq 2 ] || exit 0
  +    eval `%{l_rc} openvpn status 2>/dev/null`
  +    [ ".$openvpn_active" = .yes ] && %{l_rc} openvpn restart
  +    exit 0
  +
  +%preun
  +    #   before erase, stop service and remove log files
  +    [ $1 -eq 0 ] || exit 0
  +    %{l_rc} openvpn stop 2>/dev/null
  +    rm -f $RPM_INSTALL_PREFIX/var/openvpn/*.log* >/dev/null 2>&1 || true
  +    exit 0
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openvpn/rc.openvpn
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 rc.openvpn
  --- openpkg-src/openvpn/rc.openvpn    21 Jul 2003 08:40:38 -0000      1.5
  +++ openpkg-src/openvpn/rc.openvpn    13 Nov 2003 16:06:29 -0000      1.6
  @@ -11,6 +11,41 @@
       openvpn_log_minsize="1M"
       openvpn_log_complevel="9"
   
  +%common
  +    openvpn_pidfile="@l_prefix@/var/openvpn/openvpn.pid"
  +    openvpn_cfgfile="@l_prefix@/etc/openvpn/openvpn.conf"
  +    openvpn_signal () {
  +        [ -f $openvpn_pidfile ] && kill -$1 `cat $openvpn_pidfile`
  +    }
  +
  +%status -u @l_susr@ -o
  +    openvpn_usable="unknown"
  +    openvpn_active="no"
  +    rcService openvpn enable yes && \
  +        openvpn_signal 0 && openvpn_active="yes"
  +    echo "openvpn_enable=\"$openvpn_enable\""
  +    echo "openvpn_usable=\"$openvpn_usable\""
  +    echo "openvpn_active=\"$openvpn_active\""
  +
  +%start -u @l_susr@
  +    rcService openvpn enable yes || exit 0
  +    rcService openvpn active yes && exit 0
  +    %{l_prefix}/sbin/openvpn --config $openvpn_cfgfile &
  +    echo $! >$openvpn_pidfile
  +
  +%stop -u @l_susr@
  +    rcService openvpn enable yes || exit 0
  +    rcService openvpn active no && exit 0
  +    openvpn_signal TERM
  +    rm $openvpn_pidfile
  +
  +%restart -u @l_susr@
  +    rcService openvpn enable yes || exit 0
  +    rcService openvpn active no && exit 0
  +    rc stop
  +    sleep 2
  +    rc start
  +
   %daily -u @l_susr@
       rcService openvpn enable yes || exit 0
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.7386 -r1.7387 news.txt
  --- openpkg-web/news.txt      13 Nov 2003 14:31:13 -0000      1.7386
  +++ openpkg-web/news.txt      13 Nov 2003 16:06:27 -0000      1.7387
  @@ -1,3 +1,4 @@
  +13-Nov-2003: Upgraded package: P<openvpn-1.4.3-20031113>
   13-Nov-2003: Upgraded package: P<vim-6.2.154-20031113>
   13-Nov-2003: Upgraded package: P<uvscan-4.24+4303-20031113>
   13-Nov-2003: Upgraded package: P<openpkg-20031113-20031113>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to