pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Update mail/clamav to 0.75.1. Changes from verison 0....
details: https://anonhg.NetBSD.org/pkgsrc/rev/e15a0aedb1ad
branches: trunk
changeset: 478885:e15a0aedb1ad
user: jlam <jlam%pkgsrc.org@localhost>
date: Sun Aug 01 04:35:33 2004 +0000
description:
Update mail/clamav to 0.75.1. Changes from verison 0.75 include:
- Convert to use bsd.options.mk.
- The virus database has been moved to ${VARBASE}/clamav.
* freshclam/clamd: fix crash on PPC when LogFile was enabled together
with LogSyslog
* configure: improve gethostbyname_r check; cleanups
* clamav-milter: Use GETHOSTBYNAME_R_6
Better load balancing if max_children = 0
Fixed warning message when building on FreeBSD4.9
Closed (small) memory leak
Fix crash when the 1st remote service goes down
Only use gethostbyname_r on LINUX for now
Improved load balancing a bit
* clamdscan: fix stdin scanning in local mode
* clamav-milter: %v in the template file handling is now replaced
only with the virus name, no "stream:" appears
* libclamav/mbox.c: Fix crash when debugging on SPARC
* libclamav/message.c: Fix occasional crash when scanning
multipart within multipart e-mails
diffstat:
doc/CHANGES | 3 +-
mail/clamav/DEINSTALL | 11 ++++++
mail/clamav/MESSAGE | 13 +++++++
mail/clamav/Makefile | 65 +++++++++++++++++++++++++---------
mail/clamav/PLIST | 9 ++--
mail/clamav/PLIST.milter | 3 -
mail/clamav/distinfo | 10 ++--
mail/clamav/files/clamd.sh | 80 +++++++++++++++++++++++++++++--------------
mail/clamav/patches/patch-aa | 26 ++++++++++++--
mail/clamav/patches/patch-ab | 25 -------------
mail/clamav/patches/patch-af | 22 ++++++++++++
11 files changed, 181 insertions(+), 86 deletions(-)
diffs (truncated from 395 to 300 lines):
diff -r f6a332f1995b -r e15a0aedb1ad doc/CHANGES
--- a/doc/CHANGES Sun Aug 01 02:47:26 2004 +0000
+++ b/doc/CHANGES Sun Aug 01 04:35:33 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.6746 2004/07/31 22:32:16 markd Exp $
+$NetBSD: CHANGES,v 1.6747 2004/08/01 04:35:46 jlam Exp $
Changes to the packages collection and infrastructure in 2004:
@@ -3668,3 +3668,4 @@
Updated nsd to 2.1.2 [itojun 2004-07-31]
Updated scmxx to 0.7.2 [wiz 2004-07-31]
Updated kphotools to 0.2.1nb1 [markd 2004-07-31]
+ Updated clamav to 0.75.1 [jlam 2004-08-01]
diff -r f6a332f1995b -r e15a0aedb1ad mail/clamav/DEINSTALL
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/clamav/DEINSTALL Sun Aug 01 04:35:33 2004 +0000
@@ -0,0 +1,11 @@
+# $NetBSD: DEINSTALL,v 1.1 2004/08/01 04:35:33 jlam Exp $
+
+VIRUSDBDIR="@VIRUSDBDIR@"
+
+case ${STAGE} in
+DEINSTALL)
+ # Unconditionally remove the virus databases when deinstalling.
+ ${RM} -f ${VIRUSDBDIR}/daily.cvd
+ ${RM} -f ${VIRUSDBDIR}/main.cvd
+ ;;
+esac
diff -r f6a332f1995b -r e15a0aedb1ad mail/clamav/MESSAGE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/clamav/MESSAGE Sun Aug 01 04:35:33 2004 +0000
@@ -0,0 +1,13 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2004/08/01 04:35:33 jlam Exp $
+
+You should update the virus databases to the latest ones available
+before using ClamAV. This can be done by running the following command
+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.
+
+===========================================================================
diff -r f6a332f1995b -r e15a0aedb1ad mail/clamav/Makefile
--- a/mail/clamav/Makefile Sun Aug 01 02:47:26 2004 +0000
+++ b/mail/clamav/Makefile Sun Aug 01 04:35:33 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2004/07/27 11:49:11 simonb Exp $
+# $NetBSD: Makefile,v 1.21 2004/08/01 04:35:33 jlam Exp $
DISTNAME= clamav-${CLAMAV_VERSION}
PKGNAME= clamav-${CLAMAV_VERSION:S/-/./}
@@ -11,49 +11,78 @@
PKG_INSTALLATION_TYPES= overwrite pkgviews
-CLAMAV_VERSION= 0.75
+CLAMAV_VERSION= 0.75.1
USE_BUILDLINK3= yes
+USE_LIBTOOL= yes
+
GNU_CONFIGURE= yes
-USE_PKGINSTALL= yes
-USE_LIBTOOL= yes
-# disable the configure check for user and group:
CONFIGURE_ARGS+= --disable-clamav
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --with-dbdir=${VIRUSDBDIR}
CONFIGURE_ARGS+= --with-uid=${CLAMAV_USER}
CONFIGURE_ARGS+= --with-group=${CLAMAV_GROUP}
CONFIGURE_ARGS+= --with-tcpwrappers
-BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP USE_MILTER
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP
+FILES_SUBST+= CLAMAV_USER=${CLAMAV_USER}
+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
+VIRUSDBDIR= ${VARBASE}/clamav
EGDIR= ${PREFIX}/share/examples/clamav
-CONF_FILES= ${EGDIR}/clamav.conf ${PKG_SYSCONFDIR}/clamav.conf
-CONF_FILES+= ${EGDIR}/freshclam.conf ${PKG_SYSCONFDIR}/freshclam.conf
-PLIST_SRC= ${PKGDIR}/PLIST
+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
+CONF_FILES+= ${EGDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_}
+.endfor
+.for _file_ in daily.cvd main.cvd
+CONF_FILES_PERMS+= ${EGDIR}/${_file_} ${VIRUSDBDIR}/${_file_} \
+ ${CLAMAV_USER} ${CLAMAV_GROUP} 0664
+.endfor
+.undef _file_
+
+INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} CFGINST=${EGDIR} DBINST=${EGDIR}
-.include "../../mk/bsd.prefs.mk"
-.if defined(USE_MILTER) && !empty(USE_MILTER:M[yY][eE][sS])
-.include "../../mail/libmilter/buildlink3.mk"
+# Global and legacy options
+.if defined(USE_MILTER)
+. if !defined(PKG_OPTIONS.milter)
+. if defined(USE_MILTER) && !empty(USE_MILTER:M[yY][eE][sS])
+PKG_OPTIONS.milter+= milter
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.clamav
+PKG_SUPPORTED_OPTIONS= milter
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mmilter)
+. include "../../mail/libmilter/buildlink3.mk"
CONFIGURE_ARGS+= --enable-milter
-PLIST_SRC+= ${PKGDIR}/PLIST.milter
+PLIST_SUBST+= MILTER=
.else
CONFIGURE_ARGS+= --disable-milter
# XXX --disable-milter doesn't work as expected, so we need this
CONFIGURE_ENV+= ac_cv_header_libmilter_mfapi_h=no
+PLIST_SUBST+= MILTER="@comment "
.endif
-# for freshclam to work it must own the share/clamav dir
-post-install:
- ${CHOWN} -R ${CLAMAV_USER}:${CLAMAV_GROUP} ${PREFIX}/share/clamav
-
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../devel/gmp/buildlink3.mk"
.include "../../security/tcp_wrappers/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
-.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r f6a332f1995b -r e15a0aedb1ad mail/clamav/PLIST
--- a/mail/clamav/PLIST Sun Aug 01 02:47:26 2004 +0000
+++ b/mail/clamav/PLIST Sun Aug 01 04:35:33 2004 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.11 2004/06/21 16:16:24 martti Exp $
+@comment $NetBSD: PLIST,v 1.12 2004/08/01 04:35:33 jlam Exp $
bin/clamav-config
bin/clamdscan
bin/clamscan
@@ -17,11 +17,12 @@
man/man1/sigtool.1
man/man5/clamav.conf.5
man/man5/freshclam.conf.5
+${MILTER}man/man8/clamav-milter.8
man/man8/clamd.8
+${MILTER}sbin/clamav-milter
sbin/clamd
-share/clamav/daily.cvd
-share/clamav/main.cvd
share/examples/clamav/clamav.conf
+share/examples/clamav/daily.cvd
share/examples/clamav/freshclam.conf
+share/examples/clamav/main.cvd
@dirrm share/examples/clamav
-@dirrm share/clamav
diff -r f6a332f1995b -r e15a0aedb1ad mail/clamav/PLIST.milter
--- a/mail/clamav/PLIST.milter Sun Aug 01 02:47:26 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST.milter,v 1.3 2004/04/25 21:37:59 recht Exp $
-man/man8/clamav-milter.8
-sbin/clamav-milter
diff -r f6a332f1995b -r e15a0aedb1ad mail/clamav/distinfo
--- a/mail/clamav/distinfo Sun Aug 01 02:47:26 2004 +0000
+++ b/mail/clamav/distinfo Sun Aug 01 04:35:33 2004 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.15 2004/07/27 11:49:11 simonb Exp $
+$NetBSD: distinfo,v 1.16 2004/08/01 04:35:33 jlam Exp $
-SHA1 (clamav-0.75.tar.gz) = 63e2236d487d5811938d35f677f8c5ff986b94ab
-Size (clamav-0.75.tar.gz) = 2764536 bytes
-SHA1 (patch-aa) = f82827375cca03499889b92563ccc338a4fa66fc
-SHA1 (patch-ab) = f2a2a03f2be04a56b43e6ddd56e9ef7d231f8955
+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 (patch-af) = 605728b133ddb95827285d06bfeec9400222f874
diff -r f6a332f1995b -r e15a0aedb1ad mail/clamav/files/clamd.sh
--- a/mail/clamav/files/clamd.sh Sun Aug 01 02:47:26 2004 +0000
+++ b/mail/clamav/files/clamd.sh Sun Aug 01 04:35:33 2004 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: clamd.sh,v 1.2 2004/03/30 00:32:29 xtraeme Exp $
+# $NetBSD: clamd.sh,v 1.3 2004/08/01 04:35:33 jlam Exp $
#
# clamd does anti-virus checking.
#
@@ -12,42 +12,70 @@
# KEYWORD: shutdown
##
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:@PREFIX@/sbin:@PREFIX@/bin
-export PATH
-
-if [ -f /etc/rc.subr ]
-then
+if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
name="clamd"
rcvar=$name
+command="@PREFIX@/sbin/${name}"
+scan_command="@PREFIX@/bin/clamdscan"
required_files="@PKG_SYSCONFDIR@/clamav.conf"
-command="@PREFIX@/sbin/${name}"
-pidfile=$(@AWK@ '/^#/ {next}; /PidFile/ {print $2}' ${required_files})
-socket=$(@AWK@ '/^#/ {next}; /LocalSocket/ {print $2}' ${required_files})
-clamd_user=$(@AWK@ '/^#/ {next}; /User/ {print $2}' ${required_files})
+start_precmd="clamd_precmd"
+stop_cmd="clamd_stopcmd"
-start_precmd="clamd_precmd"
-stop_postcmd="clamd_postcmd"
+if [ -f "${required_files}" ]; then
+ pidfile_=`@AWK@ '/^#/ {next}; /^PidFile[ ]/ {r = $2};
+ END {print r}' ${required_files}`
+ if [ -n "${pidfile_}" ]; then
+ pidfile=${pidfile_}
+ fi
+ logfile=`@AWK@ 'BEGIN {r = "/tmp/clamd.log"};
+ /^#/ {next}; /^LogFile[ ]/ {r = $2};
+ END {print r}' ${required_files}`
+ socket=`@AWK@ 'BEGIN {r = "/tmp/clamd"};
+ /^#/ {next}; /^LocalSocket[ ]/ {r = $2};
+ END {print r}' ${required_files}`
+ clamd_user=`@AWK@ 'BEGIN {r = "@CLAMAV_USER@"};
+ /^#/ {next}; /^User[ ]/ {r = $2};
+ END {print r}' ${required_files}`
+fi
clamd_precmd()
{
- @RM@ -f ${socket}
- @TOUCH@ ${pidfile}
- @CHOWN@ ${clamd_user} ${pidfile}
+ @RM@ -f ${socket}
+ if [ -n "${logfile}" ]; then
+ @TOUCH@ ${logfile}
+ @CHOWN@ ${clamd_user} ${logfile}
+ fi
+ if [ -n "${pidfile}" ]; then
+ @TOUCH@ ${pidfile}
+ @CHOWN@ ${clamd_user} ${pidfile}
+ fi
}
-clamd_postcmd()
+clamd_stopcmd()
{
- if [ -f "${pidfile}" ]; then
- @RM@ -f ${pidfile}
- fi
-
- if [ -e "${socket}" ]; then
- @RM@ -f ${socket}
- fi
+ # Workaround bug when clamd is built against pth by send TERM to
+ # clamd, then forcing it to start a worker thread that exits.
+ # This forces the main thread to awaken and realize that it's
+ # supposed to shutdown.
+ #
+ @ECHO@ "Stopping ${name}."
+ doit="@SU@ -m ${clamd_user} -c \"kill -TERM $rc_pid\""
+ if ! eval $doit && [ -z "$rc_force" ]; then
+ return 1
+ fi
+ ${scan_command} --quiet ${scan_command} 2>/dev/null
+ wait_for_pids $rc_pid
}
-
-load_rc_config $name
-run_rc_command "$1"
+
+if [ -f /etc/rc.subr -a -f /etc/rc.conf \
+ -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
+ load_rc_config $name
Home |
Main Index |
Thread Index |
Old Index