Subject: pkg/24295: update mimedefang to 2.39, add rc scripts
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <eric@cirr.com>
List: netbsd-bugs
Date: 02/01/2004 16:02:23
>Number:         24295
>Category:       pkg
>Synopsis:       Update mimedefang to version 2.39, add rc.d scripts
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 01 22:03:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Eric Schnoebelen
>Release:        NetBSD 1.6ZH
>Organization:
Eric Schnoebelen		eric@cirr.com 		http://www.cirr.com
	Real programmers have trouble suppressing homicidal
		 tendencies when asked, "Are you sure?"
>Environment:
System: NetBSD egsner.cirr.com 1.6ZH NetBSD 1.6ZH (GENERIC.MP) #50: Mon Jan 26 08:09:37 CST 2004 eric@egsner.cirr.com:/work/eric/NetBSD-current/obj/i386/sys/arch/i386/compile/GENERIC.MP i386
Architecture: i386
Machine: i386
>Description:
	mimedefang is several versions out of date, and lacks start up
	scripts.

>How-To-Repeat:
	Install, and check the revision against the listed version at
	http://www.mimedefang.org.

	Attempt to have /etc/rc start mimedefang and
	mimedefang-multiplexor.
>Fix:
#	new files:  added start up scripts:
#	    files/mimedefang.sh
#	    files/mimedefang-multiplexor.sh
#
#	new files:  Added patch to check for virus checkers at runtime
#	    patches/patch-ac
#
#	patches:
#	    Makefile	--  updated version
#			    updated HOMEPAGE
#			    added flags to find pkgsrc supported virus scanners
#			    add RCD_SCRIPTS
#			    added DEFANG_SPOOLDIR to subst into files
#	    distinfo	-- new patch (patch-ac)
#
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	files
#	files/mimedefang-multiplexor.sh
#	files/mimedefang.sh
#	patches/patch-ac
#
echo c - files
mkdir -p files > /dev/null 2>&1
echo x - files/mimedefang-multiplexor.sh
sed 's/^X//' >files/mimedefang-multiplexor.sh << 'END-of-files/mimedefang-multiplexor.sh'
X#!@RCD_SCRIPTS_SHELL@
X#
X# $NetBSD$
X#
X# mimedefang-multiplexor handles communications between sendmail and
X# the real processor
X#
X## only for NetBSD
X# PROVIDE: mimedefang-multiplexor
X# REQUIRE: LOGIN 
X# BEFORE: mail
X# KEYWORD: shutdown
X##
X
XPATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/pkg/bin
Xexport PATH
X
Xif [ -f /etc/rc.subr ]
Xthen
X	. /etc/rc.subr
Xfi
X
X
Xname="mimedefang_multiplexor"
Xrcvar="$name"
Xmimedefang_multiplexor_user=${mimedefang_multiplexor_user-"@DEFANG_USER@"}
X
Xdefangdir="@DEFANG_SPOOLDIR@"
Xcommand="@PREFIX@/bin/mimedefang-multiplexor"
Xpidfile="${defangdir}/${name}.pid"
Xcommand_args="-p ${pidfile}"
X
X# default values, may be overridden on NetBSD by setting them in /etc/rc.conf
Xmimedefang_multiplexor_flags=${mimedefang_multiplexor_flags-\
X	    "-s ${defangdir}/mimedefang-multiplexor.sock"}
Xmimedefang_multiplexor=${mimedefang_multiplexor:-NO}
Xmimedefang_multiplexor_fdlimit=${mimedefang_multiplexor_fdlimit-"128"}
X
Xsig_stop="TERM"
Xsig_reload="INT"
Xextra_commands="reload"
X
X# A default limit of 64 (at least on NetBSD) may be too low for many
X# people (eg with addional RBL rules)
XSOFT_FDLIMIT=`ulimit -S -n`
XHARD_FDLIMIT=`ulimit -H -n`
X
Xif [ ${mimedefang_multiplexor_fdlimit} -gt ${SOFT_FDLIMIT} ]; then
X  if [ ${mimedefang_multiplexor_fdlimit} -le ${HARD_FDLIMIT} ]; then 
X    ulimit -S -n ${mimedefang_multiplexor_fdlimit}
X  else
X    ulimit -S -n ${HARD_FDLIMIT}
X  fi
Xfi
X
Xload_rc_config $name
Xrun_rc_command "$1"
END-of-files/mimedefang-multiplexor.sh
echo x - files/mimedefang.sh
sed 's/^X//' >files/mimedefang.sh << 'END-of-files/mimedefang.sh'
X#!@RCD_SCRIPTS_SHELL@
X#
X# $NetBSD$
X#
X# mimedefang does "in-stream" spam and virus checking using 
X# sendmail's MailFilter interfaces.
X#
X## only for NetBSD
X# PROVIDE: mimedefang
X# REQUIRE: LOGIN mimedefang-multiplexor
X# BEFORE: mail
X# KEYWORD: shutdown
X##
X
XPATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/pkg/bin
Xexport PATH
X
Xif [ -f /etc/rc.subr ]
Xthen
X	. /etc/rc.subr
Xfi
X
Xdefangdir="@DEFANG_SPOOLDIR@"
X
Xname="mimedefang"
Xrcvar=$name
Xcommand="@PREFIX@/bin/mimedefang"
Xpidfile="${defangdir}/${name}.pid"
Xmimedefang_user=${mimedefang_user-"@DEFANG_USER@"}
Xcommand_args="-P ${pidfile}"
X
X# default values, may be overridden on NetBSD by setting them in /etc/rc.conf
Xmimedefang_flags=${mimedefang_flags-"-p ${defangdir}/mimedefang.sock \
X			-m ${defangdir}/mimedefang-multiplexor.sock"}
X
Xmimedefang=${mimedefang:-NO}
Xmimedefang_fdlimit=${mimedefang_fdlimit-"128"}
X
X# A default limit of 64 (at least on NetBSD) may be too low for many
X# people (eg with addional RBL rules)
XSOFT_FDLIMIT=`ulimit -S -n`
XHARD_FDLIMIT=`ulimit -H -n`
X
Xif [ ${mimedefang_fdlimit} -gt ${SOFT_FDLIMIT} ]; then
X  if [ ${mimedefang_fdlimit} -le ${HARD_FDLIMIT} ]; then 
X    ulimit -S -n ${mimedefang_fdlimit}
X  else
X    ulimit -S -n ${HARD_FDLIMIT}
X  fi
Xfi
X
Xload_rc_config $name
Xrun_rc_command "$1"
END-of-files/mimedefang.sh
echo x - patches/patch-ac
sed 's/^X//' >patches/patch-ac << 'END-of-patches/patch-ac'
X$NetBSD$
X
X+++ mimedefang.pl.in
X@@ -78,24 +78,24 @@ undef $SASpamTester;
X undef $PrivateMyHostName;
X $SALocalTestsOnly = 1;
X 
X+$Features{'Virus:AVP'}      = ((('@AVP@' ne '/bin/false') and (-x '@AVP@')) ? '@AVP@' : 0);
X+$Features{'Virus:CLAMAV'}   = ((('@CLAMSCAN@' ne '/bin/false') and (-x '@CLAMSCAN@')) ? '@CLAMSCAN@' : 0);
X+$Features{'Virus:CLAMD'}    = ((('@CLAMD@' ne '/bin/false') and (-x '@CLAMD@')) ? '@CLAMD@' : 0);
X+$Features{'Virus:FPROT'}    = ((('@FPROT@' ne '/bin/false') and (-x '@FPROT@')) ? '@FPROT@' : 0);
X+$Features{'Virus:FSAV'}     = ((('@FSAV@' ne '/bin/false') and (-x '@FSAV@')) ? '@FSAV@' : 0);
X $Features{'Virus:FileScan'} = $Features{'File::Scan'};
X+$Features{'Virus:HBEDV'}    = ((('@HBEDV@' ne '/bin/false') and (-x '@HBEDV@')) ? '@HBEDV@' : 0);
X+$Features{'Virus:VEXIRA'}   = ((('@VEXIRA@' ne '/bin/false') and (-x '@VEXIRA@')) ? '@VEXIRA@' : 0);
X+$Features{'Virus:NAI'}      = ((('@NAI@' ne '/bin/false') and (-x '@NAI@')) ? '@NAI@' : 0);
X+$Features{'Virus:BDC'}      = ((('@BDC@' ne '/bin/false') and (-x '@BDC@')) ? '@BDC@' : 0);
X+$Features{'Virus:NVCC'}     = ((('@NVCC@' ne '/bin/false') and (-x '@NVCC@')) ? '@NVCC@' : 0);
X $Features{'Virus:OpenAV'}   = 0;  # Not a good idea but we need a test!
X $Features{'Virus:SymantecCSS'} = 0; # Ditto
X $Features{'Virus:FPROTD'}   = 0;
X+$Features{'Virus:SOPHIE'}   = ((('@SOPHIE@' ne '/bin/false') and (-x '@SOPHIE@')) ? '@SOPHIE@' : 0);
X+$Features{'Virus:SOPHOS'}   = ((('@SOPHOS@' ne '/bin/false') and (-x '@SHOPHOS@')) ? '@SOPHOS@' : 0);
X+$Features{'Virus:TREND'}    = ((('@TREND@' ne '/bin/false') and (-x '@TREND@')) ? '@TREND@' : 0);
X+$Features{'Virus:TROPHIE'}  = ((('@TROPHIE@' ne '/bin/false') and (-x '@TROPHIE@')) ? '@TROPHIE@' : 0);
X 
X $Features{'Path:SENDMAIL'}  = '@SENDMAILPROG@';
X $Features{'Path:QUARANTINEDIR'} = '@QDIR@';
END-of-patches/patch-ac
exit
#
#	patches:
#	    Makefile	--  updated version
#			    updated HOMEPAGE
#			    added flags to find pkgsrc supported virus scanners
#			    add RCD_SCRIPTS
#			    added DEFANG_SPOOLDIR to subst into files
#	    distinfo	-- new patch (patch-ac)
#
cvs server: Diffing .
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/mimedefang/Makefile,v
retrieving revision 1.12
diff -b -u -w -r1.12 Makefile
--- Makefile	2 Sep 2003 12:39:12 -0000	1.12
+++ Makefile	1 Feb 2004 21:59:42 -0000
@@ -1,11 +1,11 @@
 # $NetBSD: Makefile,v 1.12 2003/09/02 12:39:12 markd Exp $
 
-DISTNAME=		mimedefang-2.35
+DISTNAME=		mimedefang-2.39
 CATEGORIES=		mail
-MASTER_SITES=		http://www.roaringpenguin.com/mimedefang/
+MASTER_SITES=		http://www.mimedefang.org/static/
 
 MAINTAINER=		markd@NetBSD.org
-HOMEPAGE=		http://www.roaringpenguin.com/mimedefang/
+HOMEPAGE=		http://www.mimedefang.org/
 COMMENT=		To inspect/modify e-mail as it passes through your mail relay
 
 DEPENDS+=		p5-Digest-SHA1>=2.00:../../security/p5-Digest-SHA1
@@ -37,6 +37,9 @@
 
 FILES_SUBST+=		SHAREDIR=${SHAREDIR}
 FILES_SUBST+=		DEFANG_USER=${DEFANG_USER}
+FILES_SUBST+=		DEFANG_SPOOLDIR=${DEFANG_SPOOLDIR}
+
+RCD_SCRIPTS=		mimedefang-multiplexor mimedefang
 
 OWN_DIRS_PERMS+=	${DEFANG_SPOOLDIR} ${DEFANG_USER} ${DEFANG_GROUP} 0700
 
@@ -49,7 +52,14 @@
 CONFIGURE_ARGS+=	--with-milterlib=${BUILDLINK_PREFIX.libmilter}/lib
 CONFIGURE_ARGS+=	--with-spooldir=${DEFANG_SPOOLDIR}
 CONFIGURE_ARGS+=	--with-quarantinedir=${DEFANG_SPOOLDIR}
-CONFIGURE_ARGS+=	--disable-anti-virus
+# CONFIGURE_ARGS+=	--disable-anti-virus
+#	list the paths where they _would_ be installed, so they
+#	can be found at runtime. -- they have to be listed
+#	in the environment, as the --enable-<> flags don't work
+CONFGIURE_ENV+=		CLAMD=${PREFIX}/sbin/clamd
+CONFGIURE_ENV+=		CLAMSCAN=${PREFIX}/sbin/clamscan
+CONFIGURE_ENV+=		FPROT=${PREFIX}/bin/f-prot
+CONFIGURE_ENV+=		NAI=${PREFIX}/bin/uvscan
 
 do-install:
 	${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/mail/mimedefang/distinfo,v
retrieving revision 1.6
diff -b -u -w -r1.6 distinfo
--- distinfo	10 Jul 2003 11:29:06 -0000	1.6
+++ distinfo	1 Feb 2004 21:59:42 -0000
@@ -1,5 +1,6 @@
 $NetBSD: distinfo,v 1.6 2003/07/10 11:29:06 markd Exp $
 
-SHA1 (mimedefang-2.35.tar.gz) = d4fabba9a4c208059bdfc98c806df6183f244159
-Size (mimedefang-2.35.tar.gz) = 233710 bytes
+SHA1 (mimedefang-2.39.tar.gz) = 391411d4c716330dc6f9a9cd4fcadc1e50ecbb8f
+Size (mimedefang-2.39.tar.gz) = 246852 bytes
 SHA1 (patch-ab) = d3aad74681427dc30a851ce9bd1708b61d0f7529
+SHA1 (patch-ac) = 200167c67614dba99a62a0cfacef5da70e11c03c
cvs server: Diffing patches
>Release-Note:
>Audit-Trail:
>Unformatted: