From a9aa39714cec75d17f32a08771a0f2385596f8d6 Mon Sep 17 00:00:00 2001 From: salo Date: Mon, 8 Nov 2004 00:04:16 +0000 Subject: Pullup ticket 127 - requested by Grant Beattie clamav update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Module Name: pkgsrc Committed By: grant Date: Tue Oct 19 00:02:44 UTC 2004 Modified Files: pkgsrc/mail/clamav: MESSAGE Makefile PLIST distinfo pkgsrc/mail/clamav/patches: patch-aa patch-ad Log Message: update clamav to 0.80. many changes since 0.75.1, most notably, the latest virus databases need at least 0.80. see the ChangeLog for full details. --- Module Name: pkgsrc Committed By: grant Date: Tue Oct 19 00:37:41 UTC 2004 Modified Files: pkgsrc/mail/clamav: distinfo Added Files: pkgsrc/mail/clamav/patches: patch-ag Log Message: fix typo in #define used for backward compatibility. ride the 0.80 update. --- Module Name: pkgsrc Committed By: grant Date: Wed Oct 20 06:30:24 UTC 2004 Modified Files: pkgsrc/mail/clamav: buildlink3.mk Log Message: bump BUILDLINK_RECOMMENDED to >=0.80 since the latest virus signatures require 0.80. --- Module Name: pkgsrc Committed By: grant Date: Wed Oct 20 09:12:11 UTC 2004 Modified Files: pkgsrc/mail/clamav: Makefile Log Message: take over maintainership from David Ferlier, who is no longer maintaining this package. --- Module Name: pkgsrc Committed By: grant Date: Wed Oct 20 10:18:15 UTC 2004 Modified Files: pkgsrc/mail/clamav: Makefile Log Message: add dependency on www/curl via PKG_OPTIONS.clamav. reported by Timo Schöler. bump PKGREVISION. --- Module Name: pkgsrc Committed By: xtraeme Date: Sat Oct 30 09:50:33 UTC 2004 Modified Files: pkgsrc/mail/clamav: distinfo pkgsrc/mail/clamav/patches: patch-aa patch-ad Log Message: Add missing NetBSD RCSID and regen. --- Module Name: pkgsrc Committed By: grant Date: Sat Oct 30 10:23:02 UTC 2004 Modified Files: pkgsrc/mail/clamav: MESSAGE Makefile Added Files: pkgsrc/mail/clamav/files: freshclamd.sh Log Message: add freshclamd rc.d script from xtraeme@. bump PKGREVISION. --- Module Name: pkgsrc Committed By: grant Date: Sat Oct 30 10:23:47 UTC 2004 Modified Files: pkgsrc/mail/clamav: Makefile Log Message: whitespace police --- Module Name: pkgsrc Committed By: recht Date: Sat Oct 30 12:09:12 UTC 2004 Modified Files: pkgsrc/mail/clamav: Makefile pkgsrc/mail/clamav/files: clamd.sh Log Message: The name of the configuration file has changed to clamd.conf recently, so change the rc.d script to look for that one. Fix suggested by Mirko Thiesen in PR pkg/27618 --- Module Name: pkgsrc Committed By: grant Date: Sat Oct 30 12:34:51 UTC 2004 Modified Files: pkgsrc/mail/clamav: distinfo Added Files: pkgsrc/mail/clamav/patches: patch-ah Log Message: apply patch from Koji Mori in PR pkg/27337 to fix bad fprintf() format string. --- mail/clamav/MESSAGE | 6 +++--- mail/clamav/Makefile | 28 +++++++++++++++++++--------- mail/clamav/PLIST | 6 +++--- mail/clamav/buildlink3.mk | 3 ++- mail/clamav/distinfo | 12 +++++++----- mail/clamav/files/clamd.sh | 4 ++-- mail/clamav/files/freshclamd.sh | 24 ++++++++++++++++++++++++ mail/clamav/patches/patch-aa | 26 ++++---------------------- mail/clamav/patches/patch-ad | 14 +++++++------- mail/clamav/patches/patch-ag | 13 +++++++++++++ mail/clamav/patches/patch-ah | 31 +++++++++++++++++++++++++++++++ 11 files changed, 115 insertions(+), 52 deletions(-) create mode 100644 mail/clamav/files/freshclamd.sh create mode 100644 mail/clamav/patches/patch-ag create mode 100644 mail/clamav/patches/patch-ah diff --git a/mail/clamav/MESSAGE b/mail/clamav/MESSAGE index 5b77dde6887..99255acddf4 100644 --- a/mail/clamav/MESSAGE +++ b/mail/clamav/MESSAGE @@ -1,5 +1,5 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.1 2004/08/01 04:35:33 jlam Exp $ +$NetBSD: MESSAGE,v 1.1.2.1 2004/11/08 00:04:16 salo Exp $ You should update the virus databases to the latest ones available before using ClamAV. This can be done by running the following command @@ -7,7 +7,7 @@ as `${ROOT_USER}' or `${CLAMAV_USER}': ${PREFIX}/bin/freshclam -It is recommended that the virus database be updated hourly by adding the -appropriate cron job. +Note that as of version 0.80, clamav.conf has been replaced by +clamd.conf. Be sure to update your configuration to reflect this. =========================================================================== diff --git a/mail/clamav/Makefile b/mail/clamav/Makefile index 12247c2270a..a08fdcb1653 100644 --- a/mail/clamav/Makefile +++ b/mail/clamav/Makefile @@ -1,18 +1,18 @@ -# $NetBSD: Makefile,v 1.24 2004/08/22 19:32:51 jlam Exp $ +# $NetBSD: Makefile,v 1.24.2.1 2004/11/08 00:04:16 salo Exp $ DISTNAME= clamav-${CLAMAV_VERSION} PKGNAME= clamav-${CLAMAV_VERSION:S/-/./} -PKGREVISION= 1 +PKGREVISION= 3 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=clamav/} -MAINTAINER= david@netbsd-fr.org +MAINTAINER= grant@NetBSD.org HOMEPAGE= http://www.clamav.net/ COMMENT= Anti-virus toolkit PKG_INSTALLATION_TYPES= overwrite pkgviews -CLAMAV_VERSION= 0.75.1 +CLAMAV_VERSION= 0.80 USE_BUILDLINK3= yes USE_LIBTOOL= yes @@ -34,9 +34,9 @@ MESSAGE_SUBST+= CLAMAV_USER=${CLAMAV_USER} USE_PKGINSTALL= yes DEINSTALL_EXTRA_TMPL= ${.CURDIR}/DEINSTALL -RCD_SCRIPTS= clamd -PKG_GROUPS+= ${CLAMAV_GROUP} -PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP}::Clamav\\ User +RCD_SCRIPTS= clamd freshclamd +PKG_GROUPS+= ${CLAMAV_GROUP} +PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP}::Clamav\\ User VIRUSDBDIR= ${VARBASE}/clamav EGDIR= ${PREFIX}/share/examples/clamav @@ -45,7 +45,7 @@ FILES_SUBST+= VIRUSDBDIR=${VIRUSDBDIR} OWN_DIRS_PERMS= ${VIRUSDBDIR} ${CLAMAV_USER} ${CLAMAV_GROUP} 0775 CONF_FILES= # empty CONF_FILES_PERMS= # empty -.for _file_ in clamav.conf freshclam.conf +.for _file_ in clamd.conf freshclam.conf CONF_FILES+= ${EGDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} .endfor .for _file_ in daily.cvd main.cvd @@ -56,12 +56,14 @@ CONF_FILES_PERMS+= ${EGDIR}/${_file_} ${VIRUSDBDIR}/${_file_} \ INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} CFGINST=${EGDIR} DBINST=${EGDIR} +PKG_DEFAULT_OPTIONS+= curl + .if defined(USE_MILTER) && !empty(USE_MILTER:M[yY][eE][sS]) PKG_DEFAULT_OPTIONS+= milter .endif PKG_OPTIONS_VAR= PKG_OPTIONS.clamav -PKG_SUPPORTED_OPTIONS= milter +PKG_SUPPORTED_OPTIONS= curl milter .include "../../mk/bsd.options.mk" .if !empty(PKG_OPTIONS:Mmilter) @@ -75,6 +77,14 @@ CONFIGURE_ENV+= ac_cv_header_libmilter_mfapi_h=no PLIST_SUBST+= MILTER="@comment " .endif +.if !empty(PKG_OPTIONS:Mcurl) +. include "../../www/curl/buildlink3.mk" +CONFIGURE_ARGS+= --with-libcurl +BUILDLINK_DEPENDS.curl+=curl>=7.10.0 +.else +CONFIGURE_ARGS+= --without-libcurl +.endif + .include "../../archivers/bzip2/buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" .include "../../devel/gmp/buildlink3.mk" diff --git a/mail/clamav/PLIST b/mail/clamav/PLIST index c5d6b93ce94..70aab233b2c 100644 --- a/mail/clamav/PLIST +++ b/mail/clamav/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.12 2004/08/01 04:35:33 jlam Exp $ +@comment $NetBSD: PLIST,v 1.12.2.1 2004/11/08 00:04:16 salo Exp $ bin/clamav-config bin/clamdscan bin/clamscan @@ -15,13 +15,13 @@ man/man1/clamdscan.1 man/man1/clamscan.1 man/man1/freshclam.1 man/man1/sigtool.1 -man/man5/clamav.conf.5 +man/man5/clamd.conf.5 man/man5/freshclam.conf.5 ${MILTER}man/man8/clamav-milter.8 man/man8/clamd.8 ${MILTER}sbin/clamav-milter sbin/clamd -share/examples/clamav/clamav.conf +share/examples/clamav/clamd.conf share/examples/clamav/daily.cvd share/examples/clamav/freshclam.conf share/examples/clamav/main.cvd diff --git a/mail/clamav/buildlink3.mk b/mail/clamav/buildlink3.mk index df319c02561..5d49e086443 100644 --- a/mail/clamav/buildlink3.mk +++ b/mail/clamav/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.1 2004/03/30 00:29:59 xtraeme Exp $ +# $NetBSD: buildlink3.mk,v 1.1.4.1 2004/11/08 00:04:16 salo Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ CLAMAV_BUILDLINK3_MK:= ${CLAMAV_BUILDLINK3_MK}+ @@ -12,6 +12,7 @@ BUILDLINK_PACKAGES+= clamav .if !empty(CLAMAV_BUILDLINK3_MK:M+) BUILDLINK_DEPENDS.clamav+= clamav>=0.60nb1 +BUILDLINK_RECOMMENDED.clamav+= clamav>=0.80 BUILDLINK_PKGSRCDIR.clamav?= ../../mail/clamav .endif # CLAMAV_BUILDLINK3_MK diff --git a/mail/clamav/distinfo b/mail/clamav/distinfo index 97423d2a809..168eb2484d9 100644 --- a/mail/clamav/distinfo +++ b/mail/clamav/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.16 2004/08/01 04:35:33 jlam Exp $ +$NetBSD: distinfo,v 1.16.2.1 2004/11/08 00:04:17 salo Exp $ -SHA1 (clamav-0.75.1.tar.gz) = 7b9fa5fd6b8322e49c8e863c80ae0abf9e85cd3a -Size (clamav-0.75.1.tar.gz) = 2777319 bytes -SHA1 (patch-aa) = 803e0497c8cda448434b11673a195bbaee7e0285 -SHA1 (patch-ad) = 6699745bb75230de378c54bc82862dfe53732e9d +SHA1 (clamav-0.80.tar.gz) = 0f050a19c514d2bab6063c983f155fb891c7155f +Size (clamav-0.80.tar.gz) = 2679434 bytes +SHA1 (patch-aa) = 17c713c3b5833f895b7caa470ae31f3d45d60643 +SHA1 (patch-ad) = 39ce91421e9baf128817830b34e196a5275e208e SHA1 (patch-af) = 605728b133ddb95827285d06bfeec9400222f874 +SHA1 (patch-ag) = 3f3154077961527ad6afa9574091fb743f2c50ab +SHA1 (patch-ah) = f033a0fc7ce1a81fc7983954397e942724f174cc diff --git a/mail/clamav/files/clamd.sh b/mail/clamav/files/clamd.sh index 69d7eb3a48c..d3fd2176fef 100644 --- a/mail/clamav/files/clamd.sh +++ b/mail/clamav/files/clamd.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: clamd.sh,v 1.7 2004/08/03 11:57:32 tv Exp $ +# $NetBSD: clamd.sh,v 1.7.2.1 2004/11/08 00:04:17 salo Exp $ # # clamd does anti-virus checking. # @@ -17,7 +17,7 @@ name="clamd" rcvar=$name command="@PREFIX@/sbin/${name}" scan_command="@PREFIX@/bin/clamdscan" -required_files="@PKG_SYSCONFDIR@/clamav.conf" +required_files="@PKG_SYSCONFDIR@/clamd.conf" start_precmd="clamd_precmd" stop_cmd="clamd_stopcmd" diff --git a/mail/clamav/files/freshclamd.sh b/mail/clamav/files/freshclamd.sh new file mode 100644 index 00000000000..3974ea24267 --- /dev/null +++ b/mail/clamav/files/freshclamd.sh @@ -0,0 +1,24 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: freshclamd.sh,v 1.2.2.2 2004/11/08 00:04:17 salo Exp $ +# +# PROVIDE: freshclamd +# REQUIRE: DAEMON LOGIN clamd + + +name="freshclamd" +command="@PREFIX@/bin/freshclam" +required_files="@PKG_SYSCONFDIR@/freshclam.conf" +pidfile="@VARBASE@/run/${name}.pid" +sig_stop="KILL" +freshclamd_user="@CLAMAV_USER@" +command_args="-d -c 2" + +. /etc/rc.subr + +load_rc_config $name +run_rc_command "$1" + +if [ "$1" != "stop" ]; then + echo $(check_process $command) > $pidfile +fi diff --git a/mail/clamav/patches/patch-aa b/mail/clamav/patches/patch-aa index 382ac0aa85d..b38413c002c 100644 --- a/mail/clamav/patches/patch-aa +++ b/mail/clamav/patches/patch-aa @@ -1,26 +1,8 @@ -$NetBSD: patch-aa,v 1.11 2004/08/01 04:35:33 jlam Exp $ +$NetBSD: patch-aa,v 1.11.2.1 2004/11/08 00:04:17 salo Exp $ ---- configure.orig Thu Jul 29 17:50:13 2004 -+++ configure -@@ -10811,7 +10811,7 @@ _ACEOF - - - --if test ! -r "$cfg_dir/clamav.conf"; then -+if true; then - INSTALL_CLAMAV_CONF_TRUE= - INSTALL_CLAMAV_CONF_FALSE='#' - else -@@ -10821,7 +10821,7 @@ fi - - - --if test ! -r "$cfg_dir/freshclam.conf"; then -+if true; then - INSTALL_FRESHCLAM_CONF_TRUE= - INSTALL_FRESHCLAM_CONF_FALSE='#' - else -@@ -11047,6 +11047,7 @@ netbsd*) +--- configure.orig 2004-10-18 02:37:47.000000000 +1000 ++++ configure 2004-10-19 09:28:50.000000000 +1000 +@@ -11558,6 +11558,7 @@ LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lpthread" CLAMD_LIBS="-lpthread" CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lpthread" diff --git a/mail/clamav/patches/patch-ad b/mail/clamav/patches/patch-ad index 4e0578c4fdc..83542282534 100644 --- a/mail/clamav/patches/patch-ad +++ b/mail/clamav/patches/patch-ad @@ -1,13 +1,13 @@ -$NetBSD: patch-ad,v 1.5 2004/07/21 02:48:58 xtraeme Exp $ +$NetBSD: patch-ad,v 1.5.2.1 2004/11/08 00:04:17 salo Exp $ ---- docs/Makefile.in.orig 2004-07-21 04:42:08.000000000 +0200 -+++ docs/Makefile.in 2004-07-21 04:43:58.000000000 +0200 -@@ -180,9 +180,11 @@ +--- docs/Makefile.in.orig 2004-10-18 02:37:41.000000000 +1000 ++++ docs/Makefile.in 2004-10-19 09:34:06.000000000 +1000 +@@ -176,9 +176,11 @@ target_os = @target_os@ target_vendor = @target_vendor@ - EXTRA_DIST = clamdoc.pdf DMS German Spanish Japanese html man FreeBSD-HowTo Portugese Turkish clamd_supervised clamav-mirror-howto.pdf signatures.pdf French Polish --man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamav.conf.5 man/clamdscan.1 man/clamav-milter.8 man/freshclam.conf.5 -+man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamav.conf.5 man/clamdscan.1 man/freshclam.conf.5 + EXTRA_DIST = clamdoc.pdf html man clamav-mirror-howto.pdf signatures.pdf MacOSX +-man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamd.conf.5 man/clamdscan.1 man/clamav-milter.8 man/freshclam.conf.5 ++man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamd.conf.5 man/clamdscan.1 man/freshclam.conf.5 all: all-am +@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@MILTER_MANS = man/clamav-milter.8 diff --git a/mail/clamav/patches/patch-ag b/mail/clamav/patches/patch-ag new file mode 100644 index 00000000000..d8a8b08a25f --- /dev/null +++ b/mail/clamav/patches/patch-ag @@ -0,0 +1,13 @@ +$NetBSD: patch-ag,v 1.1.2.2 2004/11/08 00:04:17 salo Exp $ + +--- libclamav/clamav.h.orig 2004-09-20 04:51:54.000000000 +1000 ++++ libclamav/clamav.h +@@ -85,7 +85,7 @@ extern "C" + #define CL_MAIL CL_SCAN_MAIL + #define CL_DISABLERAR CL_SCAN_DISABLERAR + #define CL_OLE2 CL_SCAN_OLE2 +-#define CL_ENCRYPTED CL_SCAN_ENCRYPTED ++#define CL_ENCRYPTED CL_SCAN_BLOCKENCRYPTED + + + struct cli_bm_patt { diff --git a/mail/clamav/patches/patch-ah b/mail/clamav/patches/patch-ah new file mode 100644 index 00000000000..91048fe4e4d --- /dev/null +++ b/mail/clamav/patches/patch-ah @@ -0,0 +1,31 @@ +$NetBSD: patch-ah,v 1.1.2.2 2004/11/08 00:04:17 salo Exp $ + +--- clamav-milter/clamav-milter.c.orig 2004-10-11 10:59:12.000000000 +1000 ++++ clamav-milter/clamav-milter.c +@@ -2691,7 +2691,7 @@ clamfi_eom(SMFICTX *ctx) + * the postmaster, so include + * some useful information + */ +- fprintf(sendmail, _("The message %1$s sent from %2$s to\n"), ++ fprintf(sendmail, _("The message %s sent from %s to\n"), + sendmailId, sender); + else + fprintf(sendmail, _("A message sent from %s to\n"), +@@ -2706,7 +2706,7 @@ clamfi_eom(SMFICTX *ctx) + fprintf(sendmail, _("\nThe message in question has been quarantined as %s\n"), privdata->filename); + + if(hflag) { +- fprintf(sendmail, _("\nThe message was received by %1$s from %2$s via %3$s\n\n"), ++ fprintf(sendmail, _("\nThe message was received by %s from %s via %s\n\n"), + smfi_getsymval(ctx, "j"), sender, + smfi_getsymval(ctx, "_")); + fputs(_("For your information, the original message headers were:\n\n"), sendmail); +@@ -3697,7 +3697,7 @@ qfile(struct privdata *privdata, const c + if(link(privdata->filename, newname) < 0) { + perror(newname); + if(use_syslog) +- syslog(LOG_WARNING, _("Can't rename %1$s to %2$s"), ++ syslog(LOG_WARNING, _("Can't rename %s to %s"), + privdata->filename, newname); + free(newname); + return -1; -- cgit v1.2.3