Date: Mon, 25 Oct 2004 12:01:39 +0400 From: Demin Alexander <support@spectrum.ru> To: ports-bugs@freebsd.org Subject: ports/72510 - current diff for update security/drweb Message-ID: <20041025120139.33a0cb79.support@spectrum.ru>
next in thread | raw e-mail | index | archive | help
diff -ruN security/drweb.orig/Makefile security/drweb/Makefile --- security/drweb.orig/Makefile Tue May 25 22:33:45 2004 +++ security/drweb/Makefile Mon Oct 25 11:39:12 2004 @@ -6,11 +6,10 @@ # PORTNAME= drweb -PORTVERSION= 4.31.4 +PORTVERSION= 4.32.1 CATEGORIES= security -MASTER_SITES= ftp://ftp.drweb.ru/pub/unix/generic/ \ - ftp://ftp.drweb.ru/pub/unix/archive/ \ - ftp://ftp.drweb.ru/pub/unix/archive/${PORTNAME}-${PORTVERSION}/ +MASTER_SITES= ftp://ftp.drweb.ru/pub/unix/FreeBSD/49/ \ + ftp://ftp.drweb.ru/pub/unix/FreeBSD/52/ MAINTAINER= petr@petrovich.kiev.ua COMMENT= DrWeb antivirus suite @@ -18,34 +17,38 @@ ONLY_FOR_ARCHS= i386 NO_BUILD= yes +RUN_DEPENDS= ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget + .include <bsd.port.pre.mk> .if ${OSVERSION} < 500000 -DISTNAME= ${PORTNAME}-${PORTVERSION}-freebsd4 +DISTNAME= ${PORTNAME}-${PORTVERSION}-freebsd49 .else -DISTNAME= ${PORTNAME}-${PORTVERSION}-freebsd5 +DISTNAME= ${PORTNAME}-${PORTVERSION}-freebsd52 .endif WRKSRC= ${WRKDIR}/${DISTNAME} DRWEB_PREFIX= ${PREFIX}/${PORTNAME} +pre-everything:: + @${ECHO_MSG} "" + @${ECHO_MSG} "Warning!" + @${ECHO_MSG} "4.32* version not supported in the .key files of 4.31* version and older." + @${ECHO_MSG} "Press Ctrl-C if you want to stop installation." + @${ECHO_MSG} "" + do-install: -@${INSTALL} -dv -o ${BINOWN} -g ${BINGRP} ${DRWEB_PREFIX} @cd ${DRWEB_PREFIX}; ${RM} -f drweb drwebd bases/* updates/*; ${MKDIR} updates ${TAR} -cf - -C ${WRKSRC}/usr/local/drweb . | \ ${TAR} -xf - -C ${DRWEB_PREFIX} \ - --exclude "*.key" \ --exclude "*.static" \ --exclude "update/update.pl*" ${TAR} -cf - -C ${WRKSRC}/var/drweb bases | \ ${TAR} -xf - -C ${DRWEB_PREFIX} ${CHMOD} 755 ${DRWEB_PREFIX}/bases ${DRWEB_PREFIX}/doc \ ${DRWEB_PREFIX}/lib ${DRWEB_PREFIX}/updates - ${INSTALL_DATA} ${WRKSRC}/usr/local/drweb/drweb.key-distr \ - ${DRWEB_PREFIX}/drweb.key-distr - ${INSTALL_DATA} ${WRKSRC}/usr/local/drweb/drwebd.key-distr \ - ${DRWEB_PREFIX}/drwebd.key-distr ${SED} 's#%INSTALL%#${DRWEB_PREFIX}#g' \ < ${WRKSRC}/usr/local/drweb/update/update.pl \ > ${DRWEB_PREFIX}/update/update.pl @@ -54,26 +57,20 @@ < ${WRKSRC}/usr/local/etc/drweb/drweb32.ini \ > ${PREFIX}/drweb/drweb32.ini-distr ${RM} -f ${PREFIX}/bin/drweb - ${SED} 's#%INSTALL%#${DRWEB_PREFIX}#g' \ - < ${WRKSRC}/usr/local/etc/rc.d/00drwebd.sh \ - > ${PREFIX}/etc/rc.d/00drwebd.sh - ${CHMOD} 755 ${PREFIX}/etc/rc.d/00drwebd.sh if [ ! -f ${PREFIX}/drweb/drweb32.ini ] ; then \ ${CP} ${PREFIX}/drweb/drweb32.ini-distr \ ${PREFIX}/drweb/drweb32.ini; \ fi - if [ ! -f ${DRWEB_PREFIX}/drweb.key ] ; then \ - ${CP} ${DRWEB_PREFIX}/drweb.key-distr \ - ${DRWEB_PREFIX}/drweb.key; \ - fi - if [ ! -f ${DRWEB_PREFIX}/drwebd.key ] ; then \ - ${CP} ${DRWEB_PREFIX}/drwebd.key-distr \ - ${DRWEB_PREFIX}/drwebd.key; \ - fi ${SED} 's#%INSTALL%#${DRWEB_PREFIX}#g' \ < ${FILESDIR}/drweb.sh \ > ${WRKDIR}/drweb ${INSTALL_SCRIPT} ${WRKDIR}/drweb ${PREFIX}/bin + ${SED} 's#%INSTALL%#${DRWEB_PREFIX}#g' \ + < ${WRKSRC}/usr/local/etc/rc.d/00.drwebd.sh \ + > ${PREFIX}/etc/rc.d/00.drwebd.sh + ${CHMOD} 750 ${PREFIX}/etc/rc.d/00.drwebd.sh + ${INSTALL_DATA} ${WRKSRC}/usr/local/etc/drweb/email.ini \ + ${PREFIX}/drweb/email.ini-distr post-install: PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL diff -ruN security/drweb.orig/distinfo security/drweb/distinfo --- security/drweb.orig/distinfo Tue May 18 02:58:53 2004 +++ security/drweb/distinfo Thu Oct 7 18:20:13 2004 @@ -1,4 +1,4 @@ -MD5 (drweb-4.31.4-freebsd4.tar.gz) = 5732d40413ac4af4f38148d1260210d5 -SIZE (drweb-4.31.4-freebsd4.tar.gz) = 2137387 -MD5 (drweb-4.31.4-freebsd5.tar.gz) = 0c77bc4aec35cdb4de3376f138e214ed -SIZE (drweb-4.31.4-freebsd5.tar.gz) = 2440504 +MD5 (drweb-4.32.1-freebsd49.tar.gz) = c8141853585fc01e0b9e74faa33ae0af +SIZE (drweb-4.32.1-freebsd49.tar.gz) = 2304012 +MD5 (drweb-4.32.1-freebsd52.tar.gz) = e506f9eaf3660c762e5d9a07f2325acb +SIZE (drweb-4.32.1-freebsd52.tar.gz) = 2631007 diff -ruN security/drweb.orig/files/patch-aa security/drweb/files/patch-aa --- security/drweb.orig/files/patch-aa Thu Mar 25 01:04:13 2004 +++ security/drweb/files/patch-aa Thu Oct 7 17:23:51 2004 @@ -1,6 +1,6 @@ ---- usr/local/etc/drweb/drweb32.ini.orig Sat Mar 6 04:06:07 2004 -+++ usr/local/etc/drweb/drweb32.ini Sat Mar 6 21:58:17 2004 -@@ -7,23 +7,23 @@ +--- usr/local/etc/drweb/drweb32.ini.orig Thu Oct 7 17:04:33 2004 ++++ usr/local/etc/drweb/drweb32.ini Thu Oct 7 17:22:05 2004 +@@ -15,34 +15,34 @@ ; also used by the updating module to update the search module. You ; may specify relational path, but it is strongly recommended to make ; it absolute. @@ -11,8 +11,21 @@ ; Masks for the loaded virus bases. This parameter is also used by ; the updating module to update antivirus' bases. A few masks can be ; enumerated. --VirusBase = "/var/drweb/bases/*.vdb" -+VirusBase = "%INSTALL%/bases/*.vdb" +-VirusBase = "/var/drweb/bases/*.vdb", "/var/drweb/bases/*.VDB" ++VirusBase = "%INSTALL%/bases/*.vdb", "%INSTALL%/bases/*.VDB" + + ;UpdatePath = { path } + ; This parameter is used by update script. This is a place for files + ; (except drweb32.dll and bases) has been downloaded by update script. +-UpdatePath = "/var/drweb/updates" ++UpdatePath = "%INSTALL%/updates" + + ;TempPath = { path } + ; This path is used by antivirus engine for creating temporary files. + ; /tmp would been used if TempPath is not defined. + ; Normally, the daemon attempts to avoid using of TempPath. +-TempPath = "/var/drweb/spool" ++TempPath = "/tmp" ;LngFileName = { path to the language resource file, usual extension - dwl } ; Localization file location. @@ -23,44 +36,21 @@ ; Location of the file with the registration key. You may specify ; relational path, but it is strongly recommended to make it ; absolute. --Key = "/usr/local/drweb/drwebd.key" -+Key = "%INSTALL%/drwebd.key" - - ; --- Scanning settings: --- +-Key = "/usr/local/drweb/drweb32.key" ++Key = "%INSTALL%/drweb32.key" -@@ -96,7 +96,7 @@ - ; of their importance, you can find out where the daemon's report will - ; be written to, basing on these two parameters and the contents of - ; the configuration file syslog (usually /etc/syslogd.conf). --LogFileName = "/var/drweb/log/drwebd.log" -+LogFileName = "%INSTALL%/log/drwebd.log" - ;LogFileName = "syslog" - ;SyslogFacility = "Daemon" - ;SyslogPriority = "Info" -@@ -141,7 +141,7 @@ - ;OutputMode = { Terminal | Quiet } - ; Mode of output information on the console, Quiet cancels - ; output. --OutputMode = Terminal -+OutputMode = Quiet - - ;--- User settings: --- - -@@ -170,10 +170,11 @@ - ; Example: Socket 3000 127.0.0.1, 192.168.0.100 - ; The second form describes unix-socket, {file} - socket name, - ; {access} - octal value of access rights. --; Example: Socket /var/run/drwebd.socket 666 -+; Example: Socket /var/run/drwebd.socket 666 - ; Number of socket keys is not limited, daemon will work with all - ; correctly described sockets. --Socket = 3000 127.0.0.1 -+;Socket 3000 127.0.0.1 -+Socket = %INSTALL%/run/drwebd.sock 660 - - ;ListeningQueue = "value" - ; Defines sockets queue maximum size. Value may vary from 0 to -@@ -187,7 +188,7 @@ + ;MailAddressesList = {path to the file} + ; This file is used only if you have bought e-mail license for +@@ -50,7 +50,7 @@ + ; Location of file with list of licensed email addresses. + ; Format of file: one address per line. Address can be in local + ; or local@fqdn form. See default email.ini for examples. +-MailAddressesList = "/usr/local/etc/drweb/email.ini" ++MailAddressesList = "%INSTALL%/email.ini" + + ;TrafficEqualPerHour = { Yes | No } + ; This parameter is used only if you have bought traffic license. +@@ -108,7 +108,7 @@ ; Default value: ; "/var/run/drwebd.pid" (Attention!!! Only the programs executed ; with the root rights have write access to /var/run). @@ -69,31 +59,41 @@ ;BusyFile = { path to file } ; Daemon's busy file name: it is created by the scanning "copy" of -@@ -196,7 +197,7 @@ +@@ -117,7 +117,7 @@ ; every "copy" of the daemon gets expanded with a point and ASCIIZ ; representation of PID (e.g., /var/run/drwebd.bsy.123456). ; Default value: absent (file does not get created) --;BusyFile = "/var/drweb/run/drwebd.bsy" -+;BusyFile = "%INSTALL%/run/drwebd.bsy" +-BusyFile = "/var/drweb/run/drwebd.bsy" ++BusyFile = "%INSTALL%/run/drwebd.bsy" ;MaxChildren = "value" ; Sets maximum amount of simultaneously working child (scanning) -@@ -252,12 +253,12 @@ - ; MaxCompressionRatio switch). - ;CompressionCheckThreshold = 1024 - +@@ -220,13 +220,13 @@ + ;MoveFilesTo = { path } + ; Path to quarantine directory. + ; This feature is used only by Dr.Web VFS for Samba. -MoveFilesTo = "/var/drweb/infected" +MoveFilesTo = "%INSTALL%/infected" - RenameFilesTo = #?? - ;UpdatePath = path - ; This parameter is used by update script. --UpdatePath = "/var/drweb/updates" -+UpdatePath = "%INSTALL%/updates" + ;BackupFilesTo = { path } + ; Path to directory is used for backup infected files + ; if curing has been requested. No backup copies will + ; be created if parameter was not been defined. +-;BackupFilesTo = "/var/drweb/infected" ++;BackupFilesTo = "%INSTALL%/infected" + - ;--- Filter settings: --- - ; -@@ -318,23 +319,23 @@ + ; ==================== +@@ -244,7 +244,7 @@ + ;LogFileName = "syslog" + ;SyslogFacility = "Daemon" + ;SyslogPriority = "Info" +-LogFileName = "/var/drweb/log/drwebd.log" ++LogFileName = "/var/log/drwebd.log" + + ;LimitLog = { Yes | No } + ; Enable/Disable limit for log file size. Parameter +@@ -435,34 +435,34 @@ ; also used by the updating module to update the search module. You ; may specify relational path, but it is strongly recommended to make ; it absolute. @@ -102,11 +102,24 @@ ;VirusBase = { list of the paths (masks) to the files, usual extension is vdb } ; Masks for the loaded virus bases. This parameter is also used by - ; the updating module to update antivirus' bases. A few masks can be + ; the updating module to update antivirus bases. A few masks can be ; enumerated. -VirusBase = "/var/drweb/bases/*.vdb", "/var/drweb/bases/*.VDB" +VirusBase = "%INSTALL%/bases/*.vdb", "%INSTALL%/bases/*.VDB" + ;UpdatePath = { path } + ; This parameter is used by update script. This is a place for files + ; (except drweb32.dll and bases) has been downloaded by update script. +-UpdatePath = "/var/drweb/updates" ++UpdatePath = "%INSTALL%/updates" + + ;TempPath = { path } + ; This path is used by antivirus engine for creating temporary files. + ; /tmp would been used if TempPath is not defined. + ; Normally, the daemon attempts to avoid using of TempPath. +-TempPath = "/var/drweb/spool" ++TempPath = "/tmp" + ;LngFileName = { path to the language resource file, usual extension - dwl } ; Localization file location. -;LngFileName = "/usr/local/drweb/lib/russian.dwl" @@ -116,33 +129,17 @@ ; Location of the file with the registration key. You may specify ; relational path, but it is strongly recommended to make it ; absolute. --Key = "/usr/local/drweb/drweb.key" -+Key = "%INSTALL%/drweb.key" +-Key = "/usr/local/drweb/drweb32.key" ++Key = "%INSTALL%/drweb32.key" - ;FilesTypes = { extension list } - ; Types of files that will get checked if by type scanning is -@@ -410,7 +411,7 @@ - ActionInfectedMail = Report - ActionInfectedContainer = Report - --MoveFilesTo = "/var/drweb/infected" -+MoveFilesTo = "%INSTALL%/infected" - RenameFilesTo = #?? - - ;LogFileName = { file name } -@@ -421,7 +422,7 @@ - ; of their importance, you can find out where the daemon's report will - ; be written to, basing on these two parameters and the contents of - ; the configuration file syslog (usually /etc/syslogd.conf). + ; ======================== + ; = Running settings = +@@ -614,7 +614,7 @@ + ;LogFileName = "syslog" + ;SyslogFacility = "Daemon" + ;SyslogPriority = "Info" -LogFileName = "/var/drweb/log/drweb.log" -+LogFileName = "%INSTALL%/log/drweb.log" - - ;LogScanned = { Yes | No } - ; Should the information on all the checked objects independently -@@ -467,5 +468,5 @@ - - ;UpdatePath = path - ; This parameter is used by update script. --UpdatePath = /usr/local/drweb/updates -+UpdatePath = %INSTALL%/updates ++LogFileName = "/var/log/drweb.log" + ;LimitLog = { Yes | No } + ; Enable/Disable limit for log file size. Parameter diff -ruN security/drweb.orig/files/patch-ab security/drweb/files/patch-ab --- security/drweb.orig/files/patch-ab Sat Feb 28 18:17:44 2004 +++ security/drweb/files/patch-ab Thu Oct 7 17:02:46 2004 @@ -1,20 +1,20 @@ ---- usr/local/drweb/update/update.pl.orig Sat Nov 1 07:59:33 2003 -+++ usr/local/drweb/update/update.pl Sat Nov 1 08:00:54 2003 -@@ -41,7 +41,7 @@ +--- usr/local/drweb/update/update.pl.orig Thu Oct 7 16:51:20 2004 ++++ usr/local/drweb/update/update.pl Thu Oct 7 16:56:31 2004 +@@ -17,7 +17,7 @@ my $ini = $ARGV[0]; if( $ini eq '' ) { -- $ini = '/usr/local/etc/drweb/drweb32.ini' if $^O =~ /BSD/i; -+ $ini = '%INSTALL%/drweb32.ini' if $^O =~ /BSD/i; - $ini = '/etc/drweb/drweb32.ini' if $ini eq ''; +- $ini = '/usr/local/etc/drweb/drweb32.ini'; ++ $ini = '%INSTALL%/drweb32.ini'; } -@@ -79,7 +79,7 @@ - die "Bases path is not defined!" unless $bases; - die "Update path is not defined!" unless $update; - -- $pidFile = "/var/drweb/run/drwebd.pid" if( $pidFile eq '' ); -+ $pidFile = "%INSTALL%/drwebd.pid" if( $pidFile eq '' ); + my $wget = `which wget 2>&1`; +@@ -44,7 +44,7 @@ + die 'Bases path is not defined!' unless $bases; + die 'Update path is not defined!' unless $update; - my $version = readVersion( $engine ); - die "Engine version error (invalid engine?)" unless $version; +- $pidFile = '/var/drweb/run/drwebd.pid' if $pidFile eq ''; ++ $pidFile = '%INSTALL%/run/drwebd.pid' if $pidFile eq ''; + + my ( $kmd5, $knum ) = parseKey($keyFile); + $wget = $wget.' -q --header="X-DrWeb-Validate: '.$kmd5.'" --header="X-DrWeb-KeyNumber: '.$knum.'" -O'; diff -ruN security/drweb.orig/files/patch-ac security/drweb/files/patch-ac --- security/drweb.orig/files/patch-ac Thu May 20 22:46:43 2004 +++ security/drweb/files/patch-ac Thu Oct 7 16:47:22 2004 @@ -1,5 +1,5 @@ ---- usr/local/etc/rc.d/00drwebd.sh.orig Sat Nov 1 08:03:03 2003 -+++ usr/local/etc/rc.d/00drwebd.sh Sat Nov 1 08:06:38 2003 +--- usr/local/etc/rc.d/00.drwebd.sh.orig Sat Nov 1 08:03:03 2003 ++++ usr/local/etc/rc.d/00.drwebd.sh Sat Nov 1 08:06:38 2003 @@ -3,20 +3,20 @@ case "$1" in stop) diff -ruN security/drweb.orig/pkg-install security/drweb/pkg-install --- security/drweb.orig/pkg-install Tue May 18 02:58:53 2004 +++ security/drweb/pkg-install Thu Oct 7 17:56:14 2004 @@ -16,8 +16,10 @@ if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then if pw groupadd ${GROUP} -g ${GID}; then + echo "" echo "Added group \"${GROUP}\"." else + echo "" echo "Adding group \"${GROUP}\" failed..." ex=1 fi @@ -27,26 +29,25 @@ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -s "/sbin/nologin" -d "/nonexistent" -c "Dr. Web Scanner" then + echo "" echo "Added user \"${USER}\"." else + echo "" echo "Adding user \"${USER}\" failed..." ex=1 fi fi -if ! grep -q "^!${USER}" /etc/syslog.conf; then - echo "You may also add this lines to your /etc/syslog.conf:" - echo "!drwebd" - echo "*.* /var/log/drwebd.log" - echo "" -fi -if ! grep -q ${USER} /etc/crontab; then - if ! crontab -l -u ${BINOWN} | grep -q ${USER}; then - echo "You may also add this crontab entry to /etc/crontab" - echo "0 12 * * * ${BINOWN} ${PKG_PREFIX}/drweb/update/update.pl" - echo "" - fi -fi +echo "" +echo "You may also add this lines to your /etc/syslog.conf:" +echo "!drwebd" +echo "*.* /var/log/drwebd.log" + +echo "" +echo "You may also add this crontab entry to /etc/crontab" +echo "0 12 * * * ${BINOWN} ${PKG_PREFIX}/drweb/update/update.pl" +echo "" + [ "$ex" = "1" ] && exit 1 install -dv -m 0755 -o ${USER} -g ${BINGRP} ${PKG_PREFIX}/drweb/run install -dv -m 0700 -o ${USER} -g ${BINGRP} ${PKG_PREFIX}/drweb/infected diff -ruN security/drweb.orig/pkg-plist security/drweb/pkg-plist --- security/drweb.orig/pkg-plist Tue May 18 02:58:53 2004 +++ security/drweb/pkg-plist Fri Oct 8 09:35:14 2004 @@ -1,44 +1,31 @@ -@comment $FreeBSD: ports/security/drweb/pkg-plist,v 1.21 2004/05/17 22:58:53 linimon Exp $ bin/drweb -drweb/ChangeLog -drweb/README -drweb/README.RUS -drweb/bases/drw43112.vdb -drweb/bases/drw43111.vdb -drweb/bases/drw43110.vdb -drweb/bases/drw43109.vdb -drweb/bases/drw43108.vdb -drweb/bases/drw43107.vdb -drweb/bases/drw43106.vdb -drweb/bases/drw43105.vdb -drweb/bases/drw43104.vdb -drweb/bases/drw43103.vdb -drweb/bases/drw43102.vdb -drweb/bases/drw43101.vdb +drweb/bases/drw43201.vdb drweb/bases/drwebase.vdb +drweb/bases/drwtoday.vdb +drweb/doc/ChangeLog +drweb/doc/FAQ +drweb/doc/FAQ.rus drweb/doc/readme.daemon drweb/doc/readme.daemon.rus -drweb/doc/readme.eicar drweb/doc/readme.scanner drweb/doc/readme.scanner.rus drweb/drweb -@unexec if [ -f %D/drweb/drweb.key ] && cmp -s %D/drweb/drweb.key %D/drweb/drweb.key-distr; then rm -f %D/drweb/drweb.key; fi -drweb/drweb.key-distr -@exec if [ ! -f %D/drweb/drweb.key ] ; then cp -p %D/%F %B/drweb.key; fi @unexec if [ -f %D/drweb/drweb32.ini ] && cmp -s %D/drweb/drweb32.ini %D/drweb/drweb32.ini-distr; then rm -f %D/drweb/drweb32.ini; fi drweb/drweb32.ini-distr @exec if [ ! -f %D/drweb/drweb32.ini ] ; then cp -p %D/%F %B/drweb32.ini; fi drweb/drwebd -@unexec if [ -f %D/drweb/drwebd.key ] && cmp -s %D/drweb/drwebd.key %D/drweb/drwebd.key-distr; then rm -f %D/drweb/drwebd.key; fi -drweb/drwebd.key-distr -@exec if [ ! -f %D/drweb/drwebd.key ] ; then cp -p %D/%F %B/drwebd.key; fi drweb/drwebdc +drweb/email.ini-distr +drweb/getkey.HOWTO +drweb/getkey.rus.HOWTO drweb/lib/drweb32.dll drweb/lib/russian.dwl drweb/update/readme.update drweb/update/readme.update.rus drweb/update/update.pl -etc/rc.d/00drwebd.sh +etc/rc.d/00.drwebd.sh +share/nls/POSIX +share/nls/en_US.US-ASCII @dirrm drweb/updates @dirrm drweb/update @dirrm drweb/run Please update this port. -- =========================================== Spectrum, Moscow, 103009, Strastnoy blvr. 8 Demin Alexander - Network administrator http://www.spectrum.ru/ ===========================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041025120139.33a0cb79.support>