pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/uvscan Update to 4.24.1:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/48e8b83e5702
branches:  trunk
changeset: 478775:48e8b83e5702
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu Jul 29 22:19:57 2004 +0000

description:
Update to 4.24.1:
Improve update_dat script with patch from Jason White in followup
to PR 26408.
. get updates from faster and more reliable http server
. dat file format has changed -- version info is now in a different file
. abort update if no write permissions in target dir

diffstat:

 security/uvscan/Makefile            |   7 +++----
 security/uvscan/PLIST               |   3 +--
 security/uvscan/files/update_dat.sh |  29 +++++++++++++++++++++--------
 3 files changed, 25 insertions(+), 14 deletions(-)

diffs (105 lines):

diff -r ea2b01cd5df5 -r 48e8b83e5702 security/uvscan/Makefile
--- a/security/uvscan/Makefile  Thu Jul 29 21:47:09 2004 +0000
+++ b/security/uvscan/Makefile  Thu Jul 29 22:19:57 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.24 2004/01/20 12:25:34 agc Exp $
+# $NetBSD: Makefile,v 1.25 2004/07/29 22:19:57 wiz Exp $
 
 DISTNAME=              vlnx424e
-PKGNAME=               uvscan-4.24.0
+PKGNAME=               uvscan-4.24.1
 CATEGORIES=            security
 MASTER_SITES=          http://download.nai.com/products/evaluation/virusscan/english/cmdline/linux/version_4.24/intel/
 EXTRACT_SUFX=          .tar.Z
@@ -28,7 +28,7 @@
 DOCDIR=                        ${PREFIX}/share/doc/uvscan
 DATDIR=                        ${PREFIX}/share/uvscan
 UVSCANDIR=             ${PREFIX}/libexec/uvscan
-DATFILES=              clean.dat internet.dat names.dat scan.dat readme.txt
+DATFILES=              clean.dat internet.dat names.dat scan.dat pkgdesc.ini
 
 USE_PKGINSTALL=                yes
 DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
@@ -39,7 +39,6 @@
 SUPPORT_FILES=         ${DATDIR}/clean.dat ${UVSCANDIR}/clean.dat
 SUPPORT_FILES+=                ${DATDIR}/names.dat ${UVSCANDIR}/names.dat
 SUPPORT_FILES+=                ${DATDIR}/scan.dat ${UVSCANDIR}/scan.dat
-SUPPORT_FILES+=                ${DATDIR}/readme.txt ${UVSCANDIR}/readme.txt
 OWN_DIRS=              ${UVSCANDIR}
 
 do-build:
diff -r ea2b01cd5df5 -r 48e8b83e5702 security/uvscan/PLIST
--- a/security/uvscan/PLIST     Thu Jul 29 21:47:09 2004 +0000
+++ b/security/uvscan/PLIST     Thu Jul 29 22:19:57 2004 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2003/11/14 08:51:40 wiz Exp $
+@comment $NetBSD: PLIST,v 1.5 2004/07/29 22:19:57 wiz Exp $
 bin/uvscan
 emul/linux/usr/local/lib/liblnxfv.so
 emul/linux/usr/local/lib/liblnxfv.so.4
@@ -13,7 +13,6 @@
 share/doc/uvscan/license.txt
 share/uvscan/clean.dat
 share/uvscan/names.dat
-share/uvscan/readme.txt
 share/uvscan/scan.dat
 @dirrm share/uvscan
 @unexec ${RMDIR} %D/share/doc/uvscan 2> /dev/null || ${TRUE}
diff -r ea2b01cd5df5 -r 48e8b83e5702 security/uvscan/files/update_dat.sh
--- a/security/uvscan/files/update_dat.sh       Thu Jul 29 21:47:09 2004 +0000
+++ b/security/uvscan/files/update_dat.sh       Thu Jul 29 22:19:57 2004 +0000
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 UVSCANDIR="@UVSCANDIR@"
-DAT_SITE="ftp://ftp.nai.com/pub/datfiles/english/";
+DAT_SITE="http://download.nai.com/products/datfiles/4.x/nai/";
 DAT_FILES="@DATFILES@"
 TMPDIR="${TMPDIR:-/tmp}/$$"
 
@@ -25,25 +25,38 @@
        esac
 done
 
+(${ECHO} writetest > ${UVSCANDIR}/writetest) >/dev/null 2>&1
+if [ $? != 0 ]; then
+       echo ${progname}: no write access to ${UVSCANDIR} -- update aborted.
+       exit 1
+else
+       ${RM} -f ${UVSCANDIR}/writetest
+fi
+
 ${MKDIR} ${TMPDIR}
 
 if [ -n "$dat_tar" ]; then
-       if ! (${GTAR} -x -C ${TMPDIR} -f $dat_tar readme.txt >/dev/null); then
-               ${ECHO} "$progname: unable to extract readme.txt"
+       if ! (${GTAR} -x -C ${TMPDIR} -f $dat_tar pkgdesc.ini >/dev/null); then
+               ${ECHO} "$progname: unable to extract pkgdesc.ini"
                ${RM} -rf ${TMPDIR}
                exit 1  
        fi
+       curver=`${AWK} -F= '/Version/ { print $2; exit }' ${TMPDIR}/pkgdesc.ini | ${SED} -e 's/^.*\([0-9][0-9][0-9][0-9]\).*$/\1/'`
 else
-       # Fetch the ReadMe file to read the latest version of the DAT files.
-       if ! (cd ${TMPDIR}; ftp ${DAT_SITE}readme.txt >/dev/null); then
-               ${ECHO} "$progname: unable to fetch ${DAT_SITE}readme.txt"
+       # Fetch the update.ini file to read the latest version of the DAT files.
+       if ! (cd ${TMPDIR}; ftp ${DAT_SITE}update.ini >/dev/null); then
+               ${ECHO} "$progname: unable to fetch ${DAT_SITE}update.ini"
                ${RM} -rf ${TMPDIR}
                exit 1  
        fi
+       curver=`${AWK} -F= '/DATVersion/ { print $2; exit }' ${TMPDIR}/update.ini | ${SED} -e 's/^.*\([0-9][0-9][0-9][0-9]\).*$/\1/'`
 fi
 
-curver=`${AWK} '/DAT Version/ { print $4; exit }' ${TMPDIR}/readme.txt | ${SED} -e 's/^.*\([0-9][0-9][0-9][0-9]\).*$/\1/'`
-oldver=`${AWK} '/DAT Version/ { print $4; exit }' ${UVSCANDIR}/readme.txt | ${SED} -e 's/^.*\([0-9][0-9][0-9][0-9]\).*$/\1/'`
+if [ -e ${UVSCANDIR}/pkgdesc.ini ]; then
+       oldver=`${AWK} -F= '/Version/ { print $2; exit }' ${UVSCANDIR}/pkgdesc.ini | ${SED} -e 's/^.*\([0-9][0-9][0-9][0-9]\).*$/\1/'`
+else
+       oldver=0
+fi
 
 if [ $curver -le $oldver ]; then
        if [ -z "$verbose" ]; then



Home | Main Index | Thread Index | Old Index