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

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web          Date:   03-Jul-2003 16:31:32
  Branch: HEAD                             Handle: 2003070315313002

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

  Log:
    add fsl support

  Summary:
    Revision    Changes     Path
    1.1         +15 -0      openpkg-src/snmp/fsl.snmp
    1.3         +17 -2      openpkg-src/snmp/rc.snmp
    1.38        +33 -9      openpkg-src/snmp/snmp.spec
    1.5188      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/snmp/fsl.snmp
  ============================================================================
  $ cvs diff -u -r0 -r1.1 fsl.snmp
  --- /dev/null 2003-07-03 16:31:32.000000000 +0200
  +++ fsl.snmp  2003-07-03 16:31:32.000000000 +0200
  @@ -0,0 +1,15 @@
  +##
  +##  fsl.snmp -- OSSP fsl configuration
  +##
  +
  +ident (snmpd|snmptrapd|net-snmp)/.+ q{
  +    prefix(
  +        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
  +    ) 
  +    -> {
  +        debug: file(
  +            path="@l_prefix@/var/snmp/snmp.log",
  +            append=1, perm=0644
  +        )
  +    }
  +};
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/snmp/rc.snmp
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 rc.snmp
  --- openpkg-src/snmp/rc.snmp  24 Jun 2003 12:08:09 -0000      1.2
  +++ openpkg-src/snmp/rc.snmp  3 Jul 2003 14:31:32 -0000       1.3
  @@ -5,6 +5,11 @@
   
   %config
       snmp_enable="yes"
  +    snmp_log_prolog="true"
  +    snmp_log_epilog="true"
  +    snmp_log_numfiles="10"
  +    snmp_log_minsize="1M"
  +    snmp_log_complevel="9"
   
   %common
       snmp_signal () {
  @@ -16,7 +21,7 @@
   %start -p 200 -u @l_susr@
       opServiceEnabled snmp || exit 0
       if [ -f @l_prefix@/etc/snmp/snmpd.conf ]; then
  -        @l_prefix@/sbin/snmpd -P @l_prefix@/var/snmp/snmpd.pid
  +        @l_prefix@/sbin/snmpd -s -P @l_prefix@/var/snmp/snmpd.pid
       fi
   
   %stop -p 200 -u @l_susr@
  @@ -28,6 +33,16 @@
       snmp_signal TERM
       sleep 2
       if [ -f @l_prefix@/etc/snmp/snmpd.conf ]; then
  -        @l_prefix@/sbin/snmpd -P @l_prefix@/var/snmp/snmpd.pid
  +        @l_prefix@/sbin/snmpd -s -P @l_prefix@/var/snmp/snmpd.pid
       fi
   
  +%daily -u @l_susr@
  +    opServiceEnabled snmp || exit 0
  +
  +    #   rotate logfile
  +    shtool rotate -f \
  +        -n${snmp_log_numfiles} -s${snmp_log_minsize} -d \
  +        -z${snmp_log_complevel} [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ -m644 \
  +        -P "${snmp_log_prolog}" \
  +        -E "${snmp_log_epilog}" \
  +        @l_prefix@/var/snmp/snmp.log
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/snmp/snmp.spec
  ============================================================================
  $ cvs diff -u -r1.37 -r1.38 snmp.spec
  --- openpkg-src/snmp/snmp.spec        29 Apr 2003 13:48:48 -0000      1.37
  +++ openpkg-src/snmp/snmp.spec        3 Jul 2003 14:31:32 -0000       1.38
  @@ -33,21 +33,27 @@
   Group:        Network
   License:      BSD
   Version:      5.0.8
  -Release:      20030429
  +Release:      20030703
   
   #   package options
  +%option       with_fsl      yes
   %option       with_host_mib no
   
   #   list of sources
   Source0:      http://osdn.dl.sourceforge.net/net-snmp/net-snmp-%{version}.tar.gz
   Source1:      rc.snmp
   Source2:      snmpd.conf
  +Source3:      fsl.snmp
   
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20030428, openssl
   PreReq:       OpenPKG, openpkg >= 20030428
  +%if "%{with_fsl}" == "yes"
  +BuildPreReq:  fsl
  +PreReq:       fsl
  +%endif
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -73,7 +79,8 @@
       ./configure \
           --with-cc="%{l_cc}" \
           --with-cflags="%{l_cflags -O}" \
  -        --with-ldflags="%{l_ldflags}" \
  +        --with-ldflags="%{l_ldflags} %{l_fsl_ldflags}" \
  +        --with-libs="%{l_fsl_libs}" \
           --prefix=%{l_prefix} \
           --with-persistent-directory=%{l_prefix}/var/snmp \
           --with-openssl=%{l_prefix} \
  @@ -96,6 +103,7 @@
       %{l_make} %{l_mflags} install
   
       %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/%{name} \
           $RPM_BUILD_ROOT%{l_prefix}/var/snmp \
           $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
           $RPM_BUILD_ROOT%{l_prefix}/etc/snmp
  @@ -104,18 +112,34 @@
           %{SOURCE snmpd.conf} \
           $RPM_BUILD_ROOT%{l_prefix}/etc/snmp/
   
  -    %{l_shtool} install -c -m 755 \
  -        -e 's;@l_prefix@;%{l_prefix};g' \
  -        -e 's;@l_susr@;%{l_susr};g' \
  -        %{SOURCE rc.snmp} \
  -        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  -
       rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/snmpinform
       ln $RPM_BUILD_ROOT%{l_prefix}/bin/snmptrap \
          $RPM_BUILD_ROOT%{l_prefix}/bin/snmpinform
       strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
       strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  -    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  +
  +    #   Creating run-command script
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  +    %{l_shtool} install -c -m 755 \
  +        -e 's;@l_prefix@;%{l_prefix};g' \
  +        -e 's;@l_susr@;%{l_susr};g' \
  +        -e 's;@l_rusr@;%{l_rusr};g' \
  +        -e 's;@l_rgrp@;%{l_rgrp};g' \
  +        %{SOURCE rc.%{name}} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  +
  +    #   OSSP fake syslog library
  +    %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  +    %{l_shtool} install -c -m 644 \
  +        -e 's;@l_prefix@;%{l_prefix};g' \
  +        %{SOURCE fsl.%{name}} \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  +
  +    #   determine installation files
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +        %{l_files_std} \
  +        '%not %dir %{l_prefix}/etc/fsl' \
  +        '%config %{l_prefix}/etc/fsl/fsl.%{name}' \
           '%config %{l_prefix}/etc/snmp/*.conf'
   
   %files -f files
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.5187 -r1.5188 news.txt
  --- openpkg-web/news.txt      3 Jul 2003 13:54:28 -0000       1.5187
  +++ openpkg-web/news.txt      3 Jul 2003 14:31:30 -0000       1.5188
  @@ -1,3 +1,4 @@
  +03-Jul-2003: Upgraded package: P<snmp-5.0.8-20030703>
   03-Jul-2003: Upgraded package: P<scponly-3.8-20030703>
   03-Jul-2003: Upgraded package: P<j2se-1.3.1-20030703>
   03-Jul-2003: Upgraded package: P<samhain-1.7.9-20030703>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to