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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web openpkg$ Date:   28-Aug-2003 15:55:39
  Branch: HEAD                             Handle: 2003082814553702

  Added files:
    openpkg-src/uvscan      rc.uvscan
  Modified files:
    openpkg-re/vcheck       vc.uvscan
    openpkg-src/uvscan      uvscan.sh uvscan.spec
    openpkg-web             news.txt

  Log:
    completely overhaul this package to make it equal in functionality to
    'sav'

  Summary:
    Revision    Changes     Path
    1.95        +1  -1      openpkg-re/vcheck/vc.uvscan
    1.1         +59 -0      openpkg-src/uvscan/rc.uvscan
    1.2         +1  -1      openpkg-src/uvscan/uvscan.sh
    1.111       +43 -12     openpkg-src/uvscan/uvscan.spec
    1.6323      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-re/vcheck/vc.uvscan
  ============================================================================
  $ cvs diff -u -r1.94 -r1.95 vc.uvscan
  --- openpkg-re/vcheck/vc.uvscan       28 Aug 2003 09:42:52 -0000      1.94
  +++ openpkg-re/vcheck/vc.uvscan       28 Aug 2003 13:55:37 -0000      1.95
  @@ -2,7 +2,7 @@
   }
   
   prog uvscan:datfiles = {
  -  version   = 4289
  +  version   = 4290
     url       = ftp://ftp.nai.com/pub/antivirus/datfiles/4.x/
     regex     = dat-(\d+).tar
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/uvscan/rc.uvscan
  ============================================================================
  $ cvs diff -u -r0 -r1.1 rc.uvscan
  --- /dev/null 2003-08-28 15:55:39.000000000 +0200
  +++ rc.uvscan 2003-08-28 15:55:39.000000000 +0200
  @@ -0,0 +1,59 @@
  [EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc
  +##
  +##  rc.uvscan -- Run-Commands
  +##
  +
  +%config
  +    uvscan_enable="$openpkg_rc_def"
  +    uvscan_dat_url="ftp://ftp.nai.com/pub/antivirus/datfiles/4.x/";
  +    uvscan_dat_update="daily"
  +
  +%common
  +    rcService uvscan enable yes || exit 0
  +    uvscan_update () {
  +        #   determine information
  +        uvscan_datadir="@l_prefix@/var/uvscan/data"
  +        [EMAIL PROTECTED]@/bin/curl -s "$uvscan_dat_url" 2>/dev/null |\
  +                        grep 'dat-[0-9][0-9]*\.tar' | sort | tail -1 |\
  +                        sed -e 's;^.*\(dat-[0-9][0-9]*\.tar\).*$;\1;'`
  +        uvscan_tmpdir=`echo "${uvscan_datfile}" | sed -e 's;\.tar$;;'`
  +
  +        #   download and unpack latest DATs
  +        umask 077
  +        cd ${uvscan_datadir} || exit 1
  +        rm -f ${uvscan_datfile} >/dev/null 2>&1 || true
  +        @l_prefix@/bin/curl -s -o ${uvscan_datfile} \
  +            ${uvscan_dat_url}/${uvscan_datfile} || exit 1
  +        rm -rf ${uvscan_tmpdir} >/dev/null 2>&1 || true
  +        mkdir ${uvscan_tmpdir}
  +        ( cd ${uvscan_tmpdir} && @l_prefix@/bin/tar -xf ../${uvscan_datfile} ) || 
exit 1
  +
  +        #   update DAT repository by installing updated DAT files
  +        @l_prefix@/lib/openpkg/shtool install -m 644 -o @l_musr@ -g @l_mgrp@ \
  +            ${uvscan_tmpdir}/*.dat .
  +        uvscan_version=`echo "${uvscan_datfile}" | sed -e 's;^dat-;;' -e 
's;\.tar$;;'`
  +        echo "${uvscan_version}" >VERSION
  +
  +        #   cleanup
  +        rm -f  ${uvscan_datfile} >/dev/null 2>&1 || true
  +        rm -rf ${uvscan_tmpdir}  >/dev/null 2>&1 || true
  +    }
  +
  +%hourly -u @l_musr@
  +    rcService uvscan enable yes || exit 0
  +    if [ ".$uvscan_dat_update" = .hourly ]; then
  +        uvscan_update || exit $?
  +    fi
  +
  +%daily -u @l_musr@
  +    rcService uvscan enable yes || exit 0
  +    if [ ".$uvscan_dat_update" = .daily ]; then
  +        uvscan_update || exit $?
  +    fi
  +
  +%weekly -u @l_musr@
  +    rcService uvscan enable yes || exit 0
  +    if [ ".$uvscan_dat_update" = .weekly ]; then
  +        uvscan_update || exit $?
  +    fi
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/uvscan/uvscan.sh
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 uvscan.sh
  --- openpkg-src/uvscan/uvscan.sh      24 Mar 2002 17:04:58 -0000      1.1
  +++ openpkg-src/uvscan/uvscan.sh      28 Aug 2003 13:55:39 -0000      1.2
  @@ -2,4 +2,4 @@
   LD_LIBRARY_PATH="@l_prefix@/libexec/uvscan:/usr/lib:$LD_LIBRARY_PATH"
   export LD_LIBRARY_PATH
   exec @l_prefix@/libexec/uvscan/uvscan \
  -    --data-directory @l_prefix@/libexec/uvscan "$@"
  +    --data-directory @l_prefix@/var/uvscan/data "$@"
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/uvscan/uvscan.spec
  ============================================================================
  $ cvs diff -u -r1.110 -r1.111 uvscan.spec
  --- openpkg-src/uvscan/uvscan.spec    28 Aug 2003 09:42:54 -0000      1.110
  +++ openpkg-src/uvscan/uvscan.spec    28 Aug 2003 13:55:39 -0000      1.111
  @@ -24,29 +24,29 @@
   ##
   
   #   package versions
  -%define       V_engine       4.1.6
  -%define       V_engine_dist1 4.16
  -%define       V_engine_dist2 416
  -%define       V_datfiles     4289
  +%define       V_engine      4.24
  +%define       V_engine_comp 424
  +%define       V_datfiles    4290
   
   #   package information
   Name:         uvscan
   Summary:      McAfee VirusScan
   URL:          http://www.mcafee-at-home.com/
  -Vendor:       Network Associates, Inc (NAI)
  +Vendor:       Network Associates
   Packager:     The OpenPKG Project
   Distribution: OpenPKG [EVAL]
   Group:        Filesystem
   License:      Commercial/Free-Trial
  -Version:      %{V_engine}.%{V_datfiles}
  +Version:      %{V_engine}+%{V_datfiles}
   Release:      20030828
   
   #   list of sources
   Source0:      ftp://ftp.nai.com/pub/antivirus/datfiles/4.x/dat-%{V_datfiles}.tar
  -Source1:      
http://download.nai.com/products/evaluation/virusscan/english/cmdline/bsd/version_%{V_engine_dist1}/vbsd%{V_engine_dist2}e.tar.Z
  -Source2:      
http://download.nai.com/products/evaluation/virusscan/english/cmdline/linux/version_%{V_engine_dist1}/vlnx%{V_engine_dist2}e.tar.Z
  -Source3:      
http://download.nai.com/products/evaluation/virusscan/english/cmdline/sun/version_%{V_engine_dist1}/vsun%{V_engine_dist2}e.tar.Z
  +Source1:      
http://download.nai.com/products/evaluation/virusscan/english/cmdline/bsd/version_%{V_engine}/vbsd%{V_engine_comp}e.tar.Z
  +Source2:      
http://download.nai.com/products/evaluation/virusscan/english/cmdline/linux/version_%{V_engine}/intel/vlnx%{V_engine_comp}e.tar.Z
  +Source3:      
http://download.nai.com/products/evaluation/virusscan/english/cmdline/sun/version_%{V_engine}/vsun%{V_engine_comp}e.tar.Z
   Source4:      uvscan.sh
  +Source5:      rc.uvscan
   %NoSource     0
   %NoSource     1
   %NoSource     2
  @@ -56,7 +56,7 @@
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20030717
  -PreReq:       OpenPKG, openpkg >= 20030717
  +PreReq:       OpenPKG, openpkg >= 20030717, curl, tar
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -67,6 +67,8 @@
   %prep
       %integrity
       %setup -q -c -T
  +
  +    #   unpack platform-specific Engine
       case "%{l_target}" in
           *-freebsd* ) engine="%{SOURCE1}" ;;
           *-linux*   ) engine="%{SOURCE2}" ;;
  @@ -76,7 +78,9 @@
       ( mkdir engine; cd engine
         %{l_gzip} -d -c $engine | %{l_tar} xf -
       ) || exit $?
  -    ( mkdir datfiles; cd datfiles;
  +
  +    #   unpack latest DAT file set
  +    ( mkdir datfiles; cd datfiles
         %{l_tar} xf %{SOURCE0}
       ) || exit $?
   
  @@ -84,20 +88,47 @@
   
   %install
       rm -rf $RPM_BUILD_ROOT
  +
  +    #   create installation hierarchy
       %{l_shtool} mkdir -f -p -m 755 \
           $RPM_BUILD_ROOT%{l_prefix}/bin \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
           $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/uvscan/data \
           $RPM_BUILD_ROOT%{l_prefix}/man/man1
  -    cp datfiles/*.dat engine/
  +
  +    #   install Engine
       ( cd engine
         (echo "n"; echo "n"; echo "n"; echo "n"; echo "n") |\
         ./install-uvscan $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan/
       ) || exit $?
  +
  +    #   post-adjust Engine installation
  +    for dat in clean names scan; do
  +        rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan/$dat.dat
  +    done
  +    rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan/*.txt
  +    rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan/*.pdf
       rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan/uninstall-uvscan
       mv  $RPM_BUILD_ROOT%{l_prefix}/libexec/uvscan/uvscan.1 \
           $RPM_BUILD_ROOT%{l_prefix}/man/man1/uvscan.1
  +
  +    #   install Engine command line wrapper
       %{l_shtool} install -c -m 755 %{l_value -s -a} \
           %{SOURCE uvscan.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/uvscan
  +
  +    #   install initial DAT file set
  +    %{l_shtool} install -c -m 644 \
  +        datfiles/*.dat $RPM_BUILD_ROOT%{l_prefix}/var/uvscan/data/
  +    echo "%{V_datfiles}" >VERSION
  +    %{l_shtool} install -c -m 644 \
  +        VERSION $RPM_BUILD_ROOT%{l_prefix}/var/uvscan/data/
  +
  +    #   install run-command script
  +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
  +        %{SOURCE rc.uvscan} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  +
  +    #   determine installation files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   
   %files -f files
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.6322 -r1.6323 news.txt
  --- openpkg-web/news.txt      28 Aug 2003 13:23:45 -0000      1.6322
  +++ openpkg-web/news.txt      28 Aug 2003 13:55:37 -0000      1.6323
  @@ -1,3 +1,4 @@
  +28-Aug-2003: Upgraded package: P<uvscan-4.24+4290-20030828>
   28-Aug-2003: Upgraded package: P<cvs-1.12.1-20030828>
   28-Aug-2003: Upgraded package: P<icewm-1.2.12-20030828>
   28-Aug-2003: Upgraded package: P<perl-crypto-20030828-20030828>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to