diff options
author | jlam <jlam> | 2002-08-07 05:42:12 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-08-07 05:42:12 +0000 |
commit | 0ee731f839c318bb9b323851bd98eb3015ab9782 (patch) | |
tree | 9ee40362de39f23fe0c1595bb669367f854f64a0 | |
parent | bf5631248bc6fe06c3ba056ed8c5558c68b9cd7a (diff) | |
download | pkgsrc-0ee731f839c318bb9b323851bd98eb3015ab9782.tar.gz |
Merge security/uvscan-dat into security/uvscan. The uvscan-dat package is
out-of-date very frequently, and it's sole purpose seems to be to provide
the uvscan package with the update_dat script so that uvscan can keep
up-to-date with the latest virus definitions.
A MESSAGE file has been added to security/uvscan that recommends running
"update_dat" to update the virus definitions database to the most recent
version after installation. The update_dat script has also been rewritten
to allow the new syntax "update -f <DATFILE>" to update from an already-
downloaded DATFILE, so users will still be able to do bulk downloads to
removable media on a machine with a fat connection and be able to compile
and install a usable uvscan package on another machine.
Bump the PKGREVISION on uvscan to 1 and mark the CONFLICT with the obsolete
uvscan-dat packages.
-rw-r--r-- | security/Makefile | 3 | ||||
-rw-r--r-- | security/uvscan-dat/DEINSTALL | 24 | ||||
-rw-r--r-- | security/uvscan-dat/DESCR | 2 | ||||
-rw-r--r-- | security/uvscan-dat/MESSAGE | 6 | ||||
-rw-r--r-- | security/uvscan-dat/Makefile | 58 | ||||
-rw-r--r-- | security/uvscan-dat/PLIST | 11 | ||||
-rw-r--r-- | security/uvscan-dat/distinfo | 4 | ||||
-rwxr-xr-x | security/uvscan-dat/files/update_dat | 103 | ||||
-rw-r--r-- | security/uvscan/DEINSTALL | 11 | ||||
-rw-r--r-- | security/uvscan/MESSAGE | 8 | ||||
-rw-r--r-- | security/uvscan/Makefile | 37 | ||||
-rw-r--r-- | security/uvscan/PLIST | 8 | ||||
-rw-r--r-- | security/uvscan/files/update_dat.sh | 91 |
13 files changed, 147 insertions, 219 deletions
diff --git a/security/Makefile b/security/Makefile index 107362dd7eb..7d1cf2c1a6a 100644 --- a/security/Makefile +++ b/security/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.114 2002/08/06 01:49:07 cjs Exp $ +# $NetBSD: Makefile,v 1.115 2002/08/07 05:42:12 jlam Exp $ # COMMENT= Security tools @@ -119,7 +119,6 @@ SUBDIR+= tcp_wrappers SUBDIR+= tct SUBDIR+= tripwire SUBDIR+= uvscan -SUBDIR+= uvscan-dat SUBDIR+= winbind SUBDIR+= xdm-krb4 SUBDIR+= zebedee diff --git a/security/uvscan-dat/DEINSTALL b/security/uvscan-dat/DEINSTALL deleted file mode 100644 index e2db191f0a9..00000000000 --- a/security/uvscan-dat/DEINSTALL +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# $NetBSD: DEINSTALL,v 1.2 2001/12/13 06:42:47 jlam Exp $ - -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) - ;; - -POST-DEINSTALL) - OLDFILES=`cd ${UVSCANDIR}; /bin/ls -1 *.old *.tar 2>/dev/null` - for file in ${OLDFILES} - do - ALL_FILES="${ALL_FILES} /dev/null ${UVSCANDIR}/${file}" - done - ;; -esac diff --git a/security/uvscan-dat/DESCR b/security/uvscan-dat/DESCR deleted file mode 100644 index 5bf69d0094a..00000000000 --- a/security/uvscan-dat/DESCR +++ /dev/null @@ -1,2 +0,0 @@ -This package contains the AntiVirus DAT files required for -commercial and evaluation versions of uvscan. diff --git a/security/uvscan-dat/MESSAGE b/security/uvscan-dat/MESSAGE deleted file mode 100644 index 8ff4a281709..00000000000 --- a/security/uvscan-dat/MESSAGE +++ /dev/null @@ -1,6 +0,0 @@ -=========================================================================== -$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 deleted file mode 100644 index 37d661aa059..00000000000 --- a/security/uvscan-dat/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# $NetBSD: Makefile,v 1.37 2002/08/02 21:49:58 cjep Exp $ -# - -DISTNAME= dat-4216 -PKGNAME= uvscan-${DISTNAME} -CATEGORIES= security -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.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" -NO_BIN_ON_FTP= ${RESTRICTED} -NO_BIN_ON_CDROM= ${RESTRICTED} -NO_SRC_ON_FTP= ${RESTRICTED} -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 - -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} - -do-configure: - @${SED} ${FILES_SUBST_SED} ${FILESDIR}/update_dat > ${WRKDIR}/update_dat - -do-install: - ${INSTALL_SCRIPT} ${WRKDIR}/update_dat ${PREFIX}/sbin - ${INSTALL_DATA_DIR} ${DATDIR} - for file in ${DATFILES}; do \ - ${INSTALL_DATA} ${WRKSRC}/$${file} ${DATDIR}; \ - done - ${INSTALL_DATA_DIR} ${DOCDIR} - for file in reseller.txt packing.lst; do \ - ${INSTALL_DATA} ${WRKSRC}/$${file} ${DOCDIR}; \ - done - -.include "../../mk/bsd.pkg.install.mk" -.include "../../mk/bsd.pkg.mk" diff --git a/security/uvscan-dat/PLIST b/security/uvscan-dat/PLIST deleted file mode 100644 index e099ecc394e..00000000000 --- a/security/uvscan-dat/PLIST +++ /dev/null @@ -1,11 +0,0 @@ -@comment $NetBSD: PLIST,v 1.1 2001/11/01 01:18:02 zuntum Exp $ -sbin/update_dat -share/doc/uvscan/reseller.txt -share/doc/uvscan/packing.lst -share/uvscan/clean.dat -share/uvscan/internet.dat -share/uvscan/names.dat -share/uvscan/readme.txt -share/uvscan/scan.dat -@dirrm share/uvscan -@dirrm share/doc/uvscan diff --git a/security/uvscan-dat/distinfo b/security/uvscan-dat/distinfo deleted file mode 100644 index ad0b7abcbca..00000000000 --- a/security/uvscan-dat/distinfo +++ /dev/null @@ -1,4 +0,0 @@ -$NetBSD: distinfo,v 1.24 2002/08/02 21:49:58 cjep Exp $ - -SHA1 (dat-4216.tar) = b37660e2e24bbe4fccfb97db2f308786cc717197 -Size (dat-4216.tar) = 2570240 bytes diff --git a/security/uvscan-dat/files/update_dat b/security/uvscan-dat/files/update_dat deleted file mode 100755 index 4e13f2de020..00000000000 --- a/security/uvscan-dat/files/update_dat +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh -# -# $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=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 -fi - -[ -z "$1" ] || DAT_SITE="$1" - -# 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 ) -then - ${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/'` -exitcode=0 -if [ "${CURVER}" = "${OLDVER}" ] -then - [ -z "$verbose" ] || ${ECHO} "${progname}: VirusScan DAT files are current (${CURVER})" -else - DAT_TAR=dat-${CURVER}.tar - if ftp ${DAT_SITE}${DAT_TAR} >/dev/null - then - if ${GTAR} xf ${DAT_TAR} ${DAT_FILES} - then - # Backup old dat-* tar files. - if [ "`${ECHO} ${UVSCANDIR}/*.tar`" != "${UVSCANDIR}/*.tar" ] - then - for file in ${UVSCANDIR}/*.tar - do - ${RM} -f ${file}.old - ${MV} ${file} ${file}.old - done - fi - - # Backup old DAT files. - for file in ${DAT_FILES} - do - file=${UVSCANDIR}/${file} - if [ -f ${file} ] - then - ${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} - done - ${CP} -p ${DAT_TAR} ${UVSCANDIR}/${DAT_TAR} - ${RM} -f ${UVSCANDIR}/*.old - ${ECHO} `date` Successfully updated VirusScan DAT files to ${CURVER}. - else - ${ECHO} "${progname}: unable to update VirusScan DAT files" - exitcode=1 - fi - else - ${ECHO} "${progname}: unable to fetch ${DAT_SITE}${DAT_TAR}" - exitcode=1 - fi -fi - -cd / -${RM} -rf ${TMPDIR} -exit ${exitcode} diff --git a/security/uvscan/DEINSTALL b/security/uvscan/DEINSTALL new file mode 100644 index 00000000000..3f86f51d77d --- /dev/null +++ b/security/uvscan/DEINSTALL @@ -0,0 +1,11 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1 2002/08/07 05:42:13 jlam Exp $ + +UVSCANDIR=@UVSCANDIR@ + +case ${STAGE} in +POST-DEINSTALL) + ${RM} -rf ${UVSCANDIR} + ;; +esac diff --git a/security/uvscan/MESSAGE b/security/uvscan/MESSAGE new file mode 100644 index 00000000000..cfcf073935d --- /dev/null +++ b/security/uvscan/MESSAGE @@ -0,0 +1,8 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1 2002/08/07 05:42:13 jlam Exp $ + +The VirusScan data files may be initially fetched or updated to the latest +versions from the Network Associates Website (www.nai.com) by running +"update_dat". It is recommended that "update_dat" be run on a regular +basis. +=========================================================================== diff --git a/security/uvscan/Makefile b/security/uvscan/Makefile index 3c44260326c..7e51cc60bb9 100644 --- a/security/uvscan/Makefile +++ b/security/uvscan/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.13 2002/04/04 12:29:50 tron Exp $ +# $NetBSD: Makefile,v 1.14 2002/08/07 05:42:13 jlam Exp $ DISTNAME= vlnx416e PKGNAME= uvscan-4.16.0 +PKGREVISION= 1 CATEGORIES= security MASTER_SITES= http://download.nai.com/products/evaluation/virusscan/english/cmdline/linux/version_4.16/ EXTRACT_SUFX= .tar.Z @@ -10,11 +11,11 @@ MAINTAINER= packages@netbsd.org HOMEPAGE= http://www.mcafeeb2b.com/products/virusscan/default.asp COMMENT= evaluation version of a DOS/Windows file virus scanner +CONFLICTS= uvscan-dat-[0-9]* + DEPENDS+= suse_compat>=6.1:../../emulators/${SUSE_DIR_PREFIX}_compat -DEPENDS+= uvscan-dat>=4171:../../security/uvscan-dat ONLY_FOR_PLATFORM= NetBSD-*-i386 -NO_BUILD= YES CHECK_SHLIBS= NO LICENSE= shareware @@ -26,18 +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 + +FILES_SUBST+= UVSCANDIR=${UVSCANDIR:Q} +FILES_SUBST+= DATFILES=${DATFILES:Q} + +DEINSTALL_EXTRA_TMPL= ${.CURDIR}/DEINSTALL +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-configure: - ${SED} -e "s|@PREFIX@|${PREFIX}|g" \ - ${FILESDIR}/uvscan.sh > ${WRKDIR}/uvscan.sh +do-build: + @${SED} ${FILES_SUBST_SED} \ + ${FILESDIR}/update_dat.sh > ${WRKDIR}/update_dat do-install: - ${INSTALL_SCRIPT} ${WRKDIR}/uvscan.sh ${PREFIX}/bin/uvscan + ${INSTALL_SCRIPT} ${WRKDIR}/update_dat ${PREFIX}/sbin ${INSTALL_MAN} ${WRKSRC}/uvscan.1 ${PREFIX}/man/man1 ${INSTALL_PROGRAM_DIR} ${UVSCANDIR} ${INSTALL_SCRIPT} ${WRKSRC}/uvscan ${UVSCANDIR} + ${RM} -f ${PREFIX}/bin/uvscan + ${LN} -sf ../${UVSCANDIR:S/${PREFIX}\///}/uvscan ${PREFIX}/bin/uvscan ${INSTALL_DATA} ${WRKSRC}/liblnxfv.so.4 ${UVSCANDIR} ${RM} -f ${UVSCANDIR}/liblnxfv.so ${LN} -s liblnxfv.so.4 ${UVSCANDIR}/liblnxfv.so @@ -49,10 +64,16 @@ do-install: for file in license.dat messages.dat; do \ ${INSTALL_DATA} ${WRKSRC}/$${file} ${UVSCANDIR}; \ done + ${INSTALL_DATA_DIR} ${DATDIR} + for file in ${DATFILES}; do \ + if [ -f ${WRKSRC}/$${file} ]; then \ + ${INSTALL_DATA} ${WRKSRC}/$${file} ${DATDIR}; \ + fi; \ + done ${INSTALL_DATA_DIR} ${DOCDIR} for file in contact.txt license.txt unxadmin.pdf; do \ ${INSTALL_DATA} ${WRKSRC}/$${file} ${DOCDIR}; \ done +.include "../../mk/bsd.pkg.install.mk" .include "../../emulators/suse_linux/Makefile.application" - diff --git a/security/uvscan/PLIST b/security/uvscan/PLIST index 0b93f57be32..233f53ce278 100644 --- a/security/uvscan/PLIST +++ b/security/uvscan/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2001/12/13 06:53:16 jlam Exp $ +@comment $NetBSD: PLIST,v 1.3 2002/08/07 05:42:14 jlam Exp $ bin/uvscan emul/linux/usr/local/lib/liblnxfv.so emul/linux/usr/local/lib/liblnxfv.so.4 @@ -8,6 +8,12 @@ libexec/uvscan/liblnxfv.so.4 libexec/uvscan/license.dat libexec/uvscan/messages.dat man/man1/uvscan.1 +sbin/update_dat share/doc/uvscan/contact.txt share/doc/uvscan/license.txt share/doc/uvscan/unxadmin.pdf +share/uvscan/clean.dat +share/uvscan/names.dat +share/uvscan/readme.txt +share/uvscan/scan.dat +@dirrm share/uvscan diff --git a/security/uvscan/files/update_dat.sh b/security/uvscan/files/update_dat.sh new file mode 100644 index 00000000000..540404d59de --- /dev/null +++ b/security/uvscan/files/update_dat.sh @@ -0,0 +1,91 @@ +#!/bin/sh + +UVSCANDIR="@UVSCANDIR@" +DAT_SITE="ftp://ftp.nai.com/pub/datfiles/english/" +DAT_FILES="@DATFILES@" +TMPDIR="${TMPDIR:-/tmp}/$$" + +AWK="@AWK@" +BASENAME="@BASENAME@" +CP="@CP@" +ECHO="@ECHO@" +GREP="@GREP@" +GTAR="@GTAR@" +MKDIR="@MKDIR@" +MV="@MV@" +RM="@RM@" +SED="@SED@" + +progname=`${BASENAME} $0` + +while getopts vf: arg; do + case $arg in + v) verbose=1 ;; + f) dat_tar="${OPTARG}" ;; + esac +done + +${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" + ${RM} -rf ${TMPDIR} + exit 1 + fi +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" + ${RM} -rf ${TMPDIR} + exit 1 + fi +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 [ $curver -le $oldver ]; then + if [ -z "$verbose" ]; then + ${ECHO} "$progname: VirusScan DAT files are current ($oldver)" + fi +else + if [ -z "$dat_tar" ]; then + dat_tar=${DAT_SITE}dat-$curver.tar + if (cd ${TMPDIR}; ftp $dat_tar >/dev/null); then + dat_tar=${TMPDIR}/dat-$curver.tar + else + ${ECHO} "$progname: unable to fetch $dat_tar" + ${RM} -rf ${TMPDIR} + exit 1 + fi + fi + + ${GTAR} -x -C ${TMPDIR} -f $dat_tar + + # Backup old dat-* tar files. + if [ "`${ECHO} ${UVSCANDIR}/*.tar`" != "${UVSCANDIR}/*.tar" ]; then + for file in ${UVSCANDIR}/*.tar; do + ${MV} -f $file $file.old + done + fi + + # Backup old DAT files. + for file in ${DAT_FILES}; do + file=${UVSCANDIR}/$file + if [ -f $file ]; then + ${MV} -f $file $file.bak + fi + done + + # Copy new DAT files into place. + for file in ${DAT_FILES}; do + ${CP} -f ${TMPDIR}/$file ${UVSCANDIR}/$file + done + ${CP} -f $dat_tar ${UVSCANDIR} + ${RM} -f ${UVSCANDIR}/*.old + ${ECHO} `date` Successfully updated VirusScan DAT files to $curver. +fi + +${RM} -rf ${TMPDIR} +exit 0 |