diff options
author | jlam <jlam> | 2001-12-13 06:42:47 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-12-13 06:42:47 +0000 |
commit | a80bbd20abebb52cf76e0b23db09042225ec2139 (patch) | |
tree | dfbdc55a3290bae1f89cdc9fed9681693d661750 /security | |
parent | 33ab0b564846f63ca6e4a096be4787a50b90d145 (diff) | |
download | pkgsrc-a80bbd20abebb52cf76e0b23db09042225ec2139.tar.gz |
Update security/uvscan-dat to 4176. Pkgsrc changes include using the
general INSTALL scripts and checking in the update_dat script that the
place to fetch the DAT files ends in a '/'. Changes include checking for
even more Internet worms (includes goner).
Diffstat (limited to 'security')
-rw-r--r-- | security/uvscan-dat/DEINSTALL | 74 | ||||
-rw-r--r-- | security/uvscan-dat/INSTALL | 49 | ||||
-rw-r--r-- | security/uvscan-dat/MESSAGE | 6 | ||||
-rw-r--r-- | security/uvscan-dat/Makefile | 49 | ||||
-rw-r--r-- | security/uvscan-dat/distinfo | 6 | ||||
-rwxr-xr-x | security/uvscan-dat/files/update_dat | 67 |
6 files changed, 83 insertions, 168 deletions
diff --git a/security/uvscan-dat/DEINSTALL b/security/uvscan-dat/DEINSTALL index 0fa6cf915e1..e2db191f0a9 100644 --- a/security/uvscan-dat/DEINSTALL +++ b/security/uvscan-dat/DEINSTALL @@ -1,76 +1,24 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2001/11/01 01:18:02 zuntum Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/12/13 06:42:47 jlam Exp $ -PKGNAME=$1 -STAGE=$2 - -CAT="@CAT@" -CMP="@CMP@" -RM="@RM@" -RMDIR="@RMDIR@" -TRUE="@TRUE@" - -SAMPLECONFDIR=${PKG_PREFIX}/share/uvscan -CONFDIR=${PKG_PREFIX}/libexec/uvscan -CONFFILES="@DATFILES@" +UVSCANDIR=@PREFIX@/libexec/uvscan +DATFILES="@DATFILES@" +for file in ${DATFILES} +do + ALL_FILES="${ALL_FILES} @PREFIX@/share/uvscan/${file}" + ALL_FILES="${ALL_FILES} ${UVSCANDIR}/${file}.bak" +done case ${STAGE} in DEINSTALL) - # Remove VirusScan data files if they don't differ from the - # default files. - # - for file in ${CONFFILES} - do - FILE=${CONFDIR}/${file} - BAKFILE=${CONFDIR}/${file}.bak - SAMPLEFILE=${SAMPLECONFDIR}/${file} - if ${CMP} -s ${FILE} ${SAMPLEFILE} - then - ${RM} -f ${FILE} - fi - if ${CMP} -s ${BAKFILE} ${SAMPLEFILE} - then - ${RM} -f ${BAKFILE} - fi - done ;; POST-DEINSTALL) - modified_files='' - OLDFILES=`cd ${CONFDIR}; /bin/ls -1 *.bak *.old *.tar 2>/dev/null` - for file in ${CONFFILES} ${OLDFILES} + OLDFILES=`cd ${UVSCANDIR}; /bin/ls -1 *.old *.tar 2>/dev/null` + for file in ${OLDFILES} do - FILE=${CONFDIR}/${file} - if [ -f ${FILE} ] - then - modified_files="${modified_files} ${FILE}" - fi + ALL_FILES="${ALL_FILES} /dev/null ${UVSCANDIR}/${file}" done - - ${RMDIR} ${CONFDIR} 2>/dev/null || ${TRUE} - - if [ -n "${modified_files}" ] - then - ${CAT} << EOF -=========================================================================== -If you won't be using ${PKGNAME} any longer, you may want to remove -the following files created by the update_dat script: - -EOF - for file in ${modified_files} - do - echo " ${file}" - done - ${CAT} << EOF -=========================================================================== -EOF - fi - ;; - -*) - echo "Unexpected argument: ${STAGE}" - exit 1 ;; esac -exit 0 diff --git a/security/uvscan-dat/INSTALL b/security/uvscan-dat/INSTALL deleted file mode 100644 index 048eae5a021..00000000000 --- a/security/uvscan-dat/INSTALL +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# $NetBSD: INSTALL,v 1.1 2001/11/01 01:18:02 zuntum Exp $ - -PKGNAME=$1 -STAGE=$2 - -CAT="@CAT@" -CP="@CP@" -MKDIR="@MKDIR@" - -SAMPLECONFDIR=${PKG_PREFIX}/share/uvscan -CONFDIR=${PKG_PREFIX}/libexec/uvscan -CONFFILES="@DATFILES@" - -case ${STAGE} in -PRE-INSTALL) - ;; - -POST-INSTALL) - ${MKDIR} ${CONFDIR} - echo "Installing VirusScan data files:" - for file in ${CONFFILES} - do - FILE=${CONFDIR}/${file} - SAMPLEFILE=${SAMPLECONFDIR}/${file} - if [ -f ${FILE} ] - then - echo " ${FILE} already exists" - else - echo " ${FILE}" - ${CP} ${SAMPLEFILE} ${FILE} - fi - done - ${CAT} << EOF - -=========================================================================== -The VirusScan data files may be updated to the latest versions from the -Network Associates Website (www.nai.com) by running the update_dat script. -=========================================================================== -EOF - ;; - -*) - echo "Unexpected argument: ${STAGE}" - exit 1 - ;; -esac -exit 0 diff --git a/security/uvscan-dat/MESSAGE b/security/uvscan-dat/MESSAGE new file mode 100644 index 00000000000..8ff4a281709 --- /dev/null +++ b/security/uvscan-dat/MESSAGE @@ -0,0 +1,6 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1 2001/12/13 06:42:48 jlam Exp $ + +The VirusScan data files may be updated to the latest versions from the +Network Associates Website (www.nai.com) by running the update_dat script. +=========================================================================== diff --git a/security/uvscan-dat/Makefile b/security/uvscan-dat/Makefile index 166e6721dc3..44a34d5280f 100644 --- a/security/uvscan-dat/Makefile +++ b/security/uvscan-dat/Makefile @@ -1,18 +1,21 @@ -# $NetBSD: Makefile,v 1.23 2001/11/22 12:27:16 martti Exp $ +# $NetBSD: Makefile,v 1.24 2001/12/13 06:42:48 jlam Exp $ # -DISTNAME= dat-4172 +DISTNAME= dat-4176 PKGNAME= uvscan-${DISTNAME} CATEGORIES= security -MASTER_SITES= http://download.nai.com/products/datfiles/4.x/nai/ \ +MASTER_SITES= ftp://ftp.nai.com/pub/datfiles/english/ \ + ftp://ftpeur.nai.com/pub/datfiles/english/ \ + ftp://ftpde.nai.com/pub/datfiles/english/ \ http://gd.tuwien.ac.at/pc/nai/antivirus/datfiles/4.x/ \ ftp://ftp.tuwien.ac.at/pc/nai/antivirus/datfiles/4.x/ EXTRACT_SUFX= .tar MAINTAINER= packages@netbsd.org -HOMEPAGE= http://www.nai.com/asp_set/download/dats/mcafee_4x.asp +HOMEPAGE= http://www.mcafeeb2b.com/naicommon/download/dats/mcafee_4x.asp COMMENT= AntiVirus DAT file for uvscan +USE_BUILDLINK_ONLY= YES NO_BUILD= YES RESTRICTED= "restricted to the license terms set for VirusScan" @@ -24,44 +27,32 @@ NO_SRC_ON_CDROM= ${RESTRICTED} WRKSRC= ${WRKDIR} DOCDIR= ${PREFIX}/share/doc/uvscan DATDIR= ${PREFIX}/share/uvscan +UVSCANDIR= ${PREFIX}/libexec/uvscan DATFILES= clean.dat internet.dat names.dat scan.dat readme.txt -DEINSTALL_FILE= ${WRKDIR}/DEINSTALL -INSTALL_FILE= ${WRKDIR}/INSTALL -FILES_SUBST= PREFIX=${PREFIX} +SUPPORT_FILES= ${DATDIR}/clean.dat ${UVSCANDIR}/clean.dat +SUPPORT_FILES+= ${DATDIR}/internet.dat ${UVSCANDIR}/internet.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} + +DEINSTALL_EXTRA_TMPL= ${.CURDIR}/DEINSTALL FILES_SUBST+= DATFILES=${DATFILES:Q} -FILES_SUBST+= CAT=${CAT:Q} -FILES_SUBST+= CMP=${CMP:Q} -FILES_SUBST+= CP=${CP:Q} -FILES_SUBST+= MKDIR=${MKDIR:Q} -FILES_SUBST+= RM=${RM:Q} -FILES_SUBST+= RMDIR=${RMDIR:Q} -FILES_SUBST+= TRUE=${TRUE:Q} -FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} do-configure: - ${SED} ${FILES_SUBST_SED} ${FILESDIR}/update_dat > ${WRKDIR}/update_dat - -pre-install: - ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} + @${SED} ${FILES_SUBST_SED} ${FILESDIR}/update_dat > ${WRKDIR}/update_dat do-install: ${INSTALL_SCRIPT} ${WRKDIR}/update_dat ${PREFIX}/sbin - ${INSTALL_DATA_DIR} ${DATDIR} - cd ${WRKSRC}; \ for file in ${DATFILES}; do \ - ${INSTALL_DATA} $${file} ${DATDIR}; \ + ${INSTALL_DATA} ${WRKSRC}/$${file} ${DATDIR}; \ done - ${INSTALL_DATA_DIR} ${DOCDIR} - cd ${WRKSRC}; \ for file in reseller.txt packing.lst; do \ - ${INSTALL_DATA} $${file} ${DOCDIR}; \ + ${INSTALL_DATA} ${WRKSRC}/$${file} ${DOCDIR}; \ done -post-install: - PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL - +.include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk" diff --git a/security/uvscan-dat/distinfo b/security/uvscan-dat/distinfo index 776ffedc3d8..b8ea0f0c805 100644 --- a/security/uvscan-dat/distinfo +++ b/security/uvscan-dat/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2001/11/22 12:27:16 martti Exp $ +$NetBSD: distinfo,v 1.11 2001/12/13 06:42:48 jlam Exp $ -SHA1 (dat-4172.tar) = 242b18583872a0453c6ac2a97421b4cdc373beb5 -Size (dat-4172.tar) = 2211840 bytes +SHA1 (dat-4176.tar) = 703b47b84d2c6fdb931ac0d866d24ee1e8935d56 +Size (dat-4176.tar) = 2211840 bytes diff --git a/security/uvscan-dat/files/update_dat b/security/uvscan-dat/files/update_dat index 6e34637e51e..4e13f2de020 100755 --- a/security/uvscan-dat/files/update_dat +++ b/security/uvscan-dat/files/update_dat @@ -1,14 +1,27 @@ #!/bin/sh # -# $NetBSD: update_dat,v 1.3 2001/09/27 07:55:18 rh Exp $ +# $NetBSD: update_dat,v 1.4 2001/12/13 06:42:48 jlam Exp $ # # Script to update the VirusScan data files. UVSCANDIR=@PREFIX@/libexec/uvscan -DAT_SITE=http://download.nai.com/products/datfiles/4.x/nai +DAT_SITE=ftp://ftp.nai.com/pub/datfiles/english/ DAT_FILES="@DATFILES@" TMPDIR=${TMPDIR:-/tmp}/$$ +BASENAME="@BASENAME@" +CP="@CP@" +ECHO="@ECHO@" +GREP="@GREP@" +GTAR="@GTAR@" +HEAD="@HEAD@" +MKDIR="@MKDIR@" +MV="@MV@" +RM="@RM@" +SED="@SED@" + +progname=`${BASENAME} $0` + if [ "$1" = "-v" ]; then verbose=1 shift @@ -16,37 +29,43 @@ fi [ -z "$1" ] || DAT_SITE="$1" -mkdir -p ${TMPDIR} -mkdir -p ${UVSCANDIR} +# Ensure that ${DAT_SITE} has a trailing slash (it may be a directory). +case ${DAT_SITE} in +*/) ;; +*) DAT_SITE="${DAT_SITE}/" ;; +esac + +${MKDIR} ${TMPDIR} +${MKDIR} ${UVSCANDIR} cd ${TMPDIR} # Fetch the ReadMe file to read the latest version of the DAT files. -if ! ( ftp ${DAT_SITE}/readme.txt >/dev/null ) +if ! ( ftp ${DAT_SITE}readme.txt >/dev/null ) then - echo "$0: unable to fetch ${DAT_SITE}/readme.txt" - rm -rf ${TMPDIR} + ${ECHO} "${progname}: unable to fetch ${DAT_SITE}readme.txt" + ${RM} -rf ${TMPDIR} exit 1 fi -CURVER=`head -n 2 readme.txt | grep DAT | sed -e 's/^.*\([0-9][0-9][0-9][0-9]\).*$/\1/'` -OLDVER=`head -n 2 ${UVSCANDIR}/readme.txt | grep DAT | sed -e 's/^.*\([0-9][0-9][0-9][0-9]\).*$/\1/'` +CURVER=`${HEAD} -n 2 readme.txt | ${GREP} DAT | ${SED} -e 's/^.*\([0-9][0-9][0-9][0-9]\).*$/\1/'` +OLDVER=`${HEAD} -n 2 ${UVSCANDIR}/readme.txt | ${GREP} DAT | ${SED} -e 's/^.*\([0-9][0-9][0-9][0-9]\).*$/\1/'` exitcode=0 if [ "${CURVER}" = "${OLDVER}" ] then - [ -z "$verbose" ] || echo "$0: VirusScan DAT files are current (${CURVER})" + [ -z "$verbose" ] || ${ECHO} "${progname}: VirusScan DAT files are current (${CURVER})" else DAT_TAR=dat-${CURVER}.tar - if ftp ${DAT_SITE}/${DAT_TAR} >/dev/null + if ftp ${DAT_SITE}${DAT_TAR} >/dev/null then - if tar xf ${DAT_TAR} ${DAT_FILES} + if ${GTAR} xf ${DAT_TAR} ${DAT_FILES} then # Backup old dat-* tar files. - if [ "`echo ${UVSCANDIR}/*.tar`" != "${UVSCANDIR}/*.tar" ] + if [ "`${ECHO} ${UVSCANDIR}/*.tar`" != "${UVSCANDIR}/*.tar" ] then for file in ${UVSCANDIR}/*.tar do - rm -f ${file}.old - mv ${file} ${file}.old + ${RM} -f ${file}.old + ${MV} ${file} ${file}.old done fi @@ -56,29 +75,29 @@ else file=${UVSCANDIR}/${file} if [ -f ${file} ] then - rm -f ${file}.bak - mv ${file} ${file}.bak + ${RM} -f ${file}.bak + ${MV} ${file} ${file}.bak fi done # Copy new DAT files into place. for file in ${DAT_FILES} do - cp -p ${file} ${UVSCANDIR}/${file} + ${CP} -p ${file} ${UVSCANDIR}/${file} done - cp -p ${DAT_TAR} ${UVSCANDIR}/${DAT_TAR} - rm -f ${UVSCANDIR}/*.old - echo `date` Successfully updated VirusScan DAT files to ${CURVER}. + ${CP} -p ${DAT_TAR} ${UVSCANDIR}/${DAT_TAR} + ${RM} -f ${UVSCANDIR}/*.old + ${ECHO} `date` Successfully updated VirusScan DAT files to ${CURVER}. else - echo "$0: unable to update VirusScan DAT files" + ${ECHO} "${progname}: unable to update VirusScan DAT files" exitcode=1 fi else - echo "$0: unable to fetch ${DAT_SITE}/${DAT_TAR}" + ${ECHO} "${progname}: unable to fetch ${DAT_SITE}${DAT_TAR}" exitcode=1 fi fi cd / -rm -rf ${TMPDIR} +${RM} -rf ${TMPDIR} exit ${exitcode} |