diff options
author | Marius Strobl <marius@FreeBSD.org> | 2004-12-11 21:28:36 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2004-12-11 21:28:36 +0000 |
commit | 727bab0fbfc9ffc091c978e1d7d33bb8968d5d55 (patch) | |
tree | 93af64e57ee7f794a0a50acb264d6b75ab5796f8 /security/antivir-milter | |
parent | 4b54dd9119346e13a4d838d3f0f94e67b50a0c39 (diff) | |
download | ports-727bab0fbfc9ffc091c978e1d7d33bb8968d5d55.tar.gz ports-727bab0fbfc9ffc091c978e1d7d33bb8968d5d55.zip |
Notes
Diffstat (limited to 'security/antivir-milter')
-rw-r--r-- | security/antivir-milter/Makefile | 37 | ||||
-rw-r--r-- | security/antivir-milter/distinfo | 4 | ||||
-rw-r--r-- | security/antivir-milter/files/patch-doc::MANUAL | 4 | ||||
-rw-r--r-- | security/antivir-milter/files/patch-etc::avmilter.conf | 2 | ||||
-rw-r--r-- | security/antivir-milter/files/patch-init::rc.avmilter | 3 | ||||
-rw-r--r-- | security/antivir-milter/files/patch-script::avq | 18 | ||||
-rw-r--r-- | security/antivir-milter/files/patch-script::avupdater | 106 | ||||
-rw-r--r-- | security/antivir-milter/pkg-message | 6 | ||||
-rw-r--r-- | security/antivir-milter/pkg-plist | 3 |
9 files changed, 155 insertions, 28 deletions
diff --git a/security/antivir-milter/Makefile b/security/antivir-milter/Makefile index 08e8d6e8c82a..5193b32c6154 100644 --- a/security/antivir-milter/Makefile +++ b/security/antivir-milter/Makefile @@ -5,12 +5,12 @@ # $FreeBSD$ PORTNAME= antivir-milter -PORTVERSION= 1.1 +PORTVERSION= 1.1.0p3 CATEGORIES= security mail -MASTER_SITES= ftp://ftp.antivir.de/freebsd/ \ +MASTER_SITES= ftp://ftp.antivir.de/unix/milter/ \ http://dl.antivir.de/dateien/antivir/release/ -DISTNAME= avfbmlt -EXTRACT_SUFX= .tgz +DISTVERSION= ${PORTVERSION:C/p.+$//} +DISTVERSIONPREFIX= prof- MAINTAINER= marius@FreeBSD.org COMMENT= AntiVir Milter mail virusscanner for Sendmail @@ -26,22 +26,36 @@ USE_REINPLACE= yes FETCH_CMD= /usr/bin/fetch -A # When the avmilter binary is stripped its self-check fails. STRIP= -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} PKGMESSAGE= ${WRKDIR}/pkg-message .include <bsd.port.pre.mk> +.if ${OSVERSION} < 400000 +IGNORE= requires FreeBSD 4.0 or higher +.endif + .if (!exists(/usr/lib/libmilter.a)) && (!exists(${LOCALBASE}/lib/libmilter.a)) IGNORE= requires Sendmail 8.12 .endif +.if ${OSVERSION} >= 503001 && ${OSVERSION} <= 600004 +BINSRC= ${WRKSRC}/bin/freebsd5 +.else +BINSRC= ${WRKSRC}/bin/freebsd .if ${OSVERSION} >= 500000 LIB_DEPENDS= c.4:${PORTSDIR}/misc/compat4x .endif +.endif + +post-extract: + @${MV} ${WRKSRC}/templates/en/patho-admnistrator\ + ${WRKSRC}/templates/en/patho-administrator + @${MV} ${WRKSRC}/templates/en/virus-admnistrator\ + ${WRKSRC}/templates/en/virus-administrator post-patch: .for i in doc/MANUAL etc/antivir.conf etc/avmilter.conf init/rc.avmilter \ - pgp/README script/avq + pgp/README script/avq script/avupdater @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g; \ s|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${i} .endfor @@ -54,10 +68,10 @@ post-patch: do-install: @${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 ${PREFIX}/AntiVir - @${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 ${WRKSRC}/bin/antivir \ + @${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 ${BINSRC}/antivir \ ${PREFIX}/AntiVir/antivir-dist_avmilter .if !exists(${PREFIX}/AntiVir/antivir) - @${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 ${WRKSRC}/bin/antivir \ + @${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 ${BINSRC}/antivir \ ${PREFIX}/AntiVir .endif @${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${WRKSRC}/vdf/antivir.vdf \ @@ -79,12 +93,14 @@ do-install: .if !exists(${PREFIX}/etc/antivir.conf) @${INSTALL_DATA} ${WRKSRC}/etc/antivir.conf ${PREFIX}/etc .endif - @${INSTALL_PROGRAM} ${WRKSRC}/bin/avmilter ${PREFIX}/sbin + @${INSTALL_PROGRAM} ${BINSRC}/avmilter ${PREFIX}/sbin @${INSTALL_SCRIPT} ${WRKDIR}/antivirupdater.sh \ ${PREFIX}/sbin/antivirupdater @${INSTALL_SCRIPT} ${WRKDIR}/avqrm.sh ${PREFIX}/bin/avqrm @${INSTALL_SCRIPT} ${WRKSRC}/init/rc.avmilter \ ${PREFIX}/etc/rc.d/avmilter.sh + @${INSTALL_SCRIPT} ${WRKSRC}/script/avupdater \ + ${PREFIX}/etc/rc.d/avupdater.sh-dist_avmilter @${INSTALL} -d -o smmsp -g smmsp -m 700 /var/spool/avmilter .for i in incoming outgoing rejected @${INSTALL} -d -o smmsp -g smmsp -m 700 /var/spool/avmilter/${i} @@ -103,8 +119,7 @@ do-install: .for i in ChangeLog LICENSE LICENSE.DE @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} .endfor - @${INSTALL_DATA} ${WRKSRC}/doc/MANUAL ${DOCSDIR} -.for i in avmilter_de.pdf avmilter_en.pdf +.for i in MANUAL avmilter_de.pdf @${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR} .endfor @${INSTALL_DATA} ${WRKSRC}/pgp/README ${DOCSDIR}/README.gpg diff --git a/security/antivir-milter/distinfo b/security/antivir-milter/distinfo index 6148b7b656b1..55307532c721 100644 --- a/security/antivir-milter/distinfo +++ b/security/antivir-milter/distinfo @@ -1,2 +1,2 @@ -MD5 (avfbmlt.tgz) = 86af07e84e3522a11c66dcb49cbc3306 -SIZE (avfbmlt.tgz) = 2869629 +MD5 (antivir-milter-prof-1.1.0.tar.gz) = c3bca40c0d8ddfccfafba6de84cb09ff +SIZE (antivir-milter-prof-1.1.0.tar.gz) = 6366384 diff --git a/security/antivir-milter/files/patch-doc::MANUAL b/security/antivir-milter/files/patch-doc::MANUAL index 0ea99b938644..86cc5aa5b470 100644 --- a/security/antivir-milter/files/patch-doc::MANUAL +++ b/security/antivir-milter/files/patch-doc::MANUAL @@ -22,7 +22,7 @@ +set the access rights of user root and group to smmsp: - # cp hbedv.key /usr/lib/AntiVir/ -- # chown uucp:uucp /usr/lib/AntiVir/avmgate.key +- # chown uucp:antivir /usr/lib/AntiVir/avmgate.key + # cp hbedv.key %%PREFIX%%/AntiVir/ + # chown root:smmsp %%PREFIX%%/AntiVir/hbedv.key + # chmod 440 %%PREFIX%%/AntiVir/hbedv.key @@ -37,7 +37,7 @@ +%%PREFIX%%/etc/avmilter/avmilter.conf: -# User uucp --# Group uucp +-# Group antivir +# User smmsp +# Group smmsp # Postmaster postmaster diff --git a/security/antivir-milter/files/patch-etc::avmilter.conf b/security/antivir-milter/files/patch-etc::avmilter.conf index 7b22e1987b96..aab271ccd61d 100644 --- a/security/antivir-milter/files/patch-etc::avmilter.conf +++ b/security/antivir-milter/files/patch-etc::avmilter.conf @@ -5,7 +5,7 @@ # AntiVir Milter will run as the specified user and group. -# User uucp --# Group uucp +-# Group antivir +User smmsp +Group smmsp diff --git a/security/antivir-milter/files/patch-init::rc.avmilter b/security/antivir-milter/files/patch-init::rc.avmilter index 9498783d9e16..487c3d631bd9 100644 --- a/security/antivir-milter/files/patch-init::rc.avmilter +++ b/security/antivir-milter/files/patch-init::rc.avmilter @@ -18,8 +18,9 @@ ;; stop) - echo -n "Shutting down AntiVir Milter." - killall -TERM avmilter +- killall -TERM /usr/sbin/avmilter > /dev/null 2>&1 - echo ++ killall -TERM avmilter > /dev/null 2>&1 + echo -n " avmilter" ;; restart) diff --git a/security/antivir-milter/files/patch-script::avq b/security/antivir-milter/files/patch-script::avq index dcde2cf423e6..cc77b108e70c 100644 --- a/security/antivir-milter/files/patch-script::avq +++ b/security/antivir-milter/files/patch-script::avq @@ -1,15 +1,15 @@ --- script/avq.orig Sat Oct 11 13:26:02 2003 +++ script/avq Sat Oct 11 13:31:54 2003 -@@ -38,7 +38,7 @@ +@@ -39,7 +39,7 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #****************************************************************************** -configuration=/etc/avmilter.conf +configuration=%%PREFIX%%/etc/avmilter/avmilter.conf - queue="`egrep -i '^[Ss][Pp][Oo][Oo][Ll][Dd][Ii][Rr]' ${configuration} | awk '{print $2;}'`" - queue_set=0 - pname="`basename $0`" -@@ -49,6 +49,15 @@ + + for arg ; + do +@@ -68,6 +68,15 @@ systeme="`uname`" date_param="-d" @@ -24,8 +24,8 @@ + usage() { echo "${pname} usage:" - echo " ${pname} [--queue=DIR] " -@@ -124,7 +133,7 @@ + echo " ${pname} [--conf=.conf] " +@@ -149,7 +158,7 @@ data=`/bin/ls "${queue}"/*/[Dd]f-"${id}"` echo "ctor: ${ctrl} ${data}" if [ ! -f "${data}" ] ; then @@ -34,7 +34,7 @@ "in queue '$queue'." exit 3 fi -@@ -136,9 +145,13 @@ +@@ -161,9 +170,13 @@ bnam="`basename ${ctrl}`" case $newstate in R) @@ -51,7 +51,7 @@ ;; *) Qtrl="`echo $bnam|sed -e 's/^.\(.*\)$/'${newstate}'\1/'`" -@@ -179,7 +192,7 @@ +@@ -204,7 +217,7 @@ group=`egrep -i '^group' "$configuration"|awk '{print $2;}'` if [ -f "${data}" ] ; then if /bin/ls "${queue}"/*/??-"${id}" > /dev/null 2>&1 ; then diff --git a/security/antivir-milter/files/patch-script::avupdater b/security/antivir-milter/files/patch-script::avupdater new file mode 100644 index 000000000000..2aab655e5d0b --- /dev/null +++ b/security/antivir-milter/files/patch-script::avupdater @@ -0,0 +1,106 @@ +--- script/avupdater.orig Thu Nov 25 10:29:31 2004 ++++ script/avupdater Wed Dec 8 15:23:09 2004 +@@ -5,10 +5,8 @@ + # Copyright (c) 2002-2004 H+BEDV Datentechnik GmbH + # + +-PATH="/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin" +- + DAEMONNAME="antivir" +-AVDIR="/usr/lib/AntiVir" ++AVDIR="%%PREFIX%%/AntiVir" + + DAEMON="$AVDIR/$DAEMONNAME" + +@@ -41,6 +39,17 @@ + PROCESSLIST="" + + case "${OS}" in ++ freebsd) ++ # Work around bug in some versions of ps(1) where ++ # `ps -o 'pid= command='` doesn't work. ++ for PROC in `ps axw -o 'pid=' -o 'command=' | grep ${DAEMONNAME}.*[-]-updater-daemon` ++ do ++ if [ -z "`$ECHO ${PROC} | sed -e s/[0-9]//g`" ] ++ then ++ PROCESSLIST="${PROCESSLIST} ${PROC}" ++ fi ++ done ++ ;; + sunos) + for PROC in `ps -Ao pid,args | grep ${DAEMONNAME}.*[-]-updater-daemon` + do +@@ -64,63 +73,41 @@ + + case "$1" in + start) +- $ECHO -n "Starting AntiVir: avupdater" +- +- if [ ! -x "$DAEMON" ] +- then +- $ECHO " (FAILED)" +- $ECHO " " +- $ECHO "error: $DAEMON is missing" +- $ECHO " " +- exit 1 +- fi +- +- $DAEMON --updater-daemon -q +- +- if [ $? -ne 0 ] +- then +- $ECHO " (FAILED)" +- $ECHO " " +- $ECHO "error: $DAEMONNAME failed to start" +- $ECHO "See log files for details." +- $ECHO " " +- exit 1 ++ if [ -x "$DAEMON" ]; then ++ $DAEMON --updater-daemon -q \ ++ -C %%PREFIX%%/etc/antivir.conf ++ if [ $? -eq 0 ]; then ++ $ECHO -n " avupdater" ++ fi + fi +- +- $ECHO "." + ;; + stop) +- $ECHO -n "Stopping AntiVir: avupdater" +- + getPROCESSLIST + for PROC in $PROCESSLIST + do + kill -15 $PROC + done + +- $ECHO "." ++ $ECHO -n " avupdater" + ;; + restart) + $0 stop + $0 start + ;; + status) +- $ECHO -n "AntiVir Status: avupdater " +- + getPROCESSLIST + if [ ! -z "$PROCESSLIST" ] + then +- $ECHO -n "(running)" ++ $ECHO "OK avupdater is running!" + RC=0 + else +- $ECHO -n "(not running)" ++ $ECHO "FAILED avupdater is not running!" + RC=3 + fi +- $ECHO "." + exit $RC + ;; + *) +- $ECHO "usage: $0 {start|stop|restart|status}" ++ $ECHO "Usage: `basename $0` {start|stop|restart|status}" >&2 + exit 1 + ;; + esac diff --git a/security/antivir-milter/pkg-message b/security/antivir-milter/pkg-message index a26af98efd24..96638787340e 100644 --- a/security/antivir-milter/pkg-message +++ b/security/antivir-milter/pkg-message @@ -11,8 +11,12 @@ INPUT_MAIL_FILTER( Don't forget to rebuild sendmail.cf and to restart Sendmail afterwards. For automated updates of the anti-virus engine and the virus definition -file add the following line to your /etc/crontab: +file either add the following line to your /etc/crontab to run them via +cron(8): 25 0 * * * root %%PREFIX%%/sbin/antivirupdater -q +or execute the following command to enabled the AntiVir Updater daemon: +cp %%PREFIX%%/etc/rc.d/avupdater.sh-dist_avmilter \ +%%PREFIX%%/etc/rc.d/avupdater.sh For full functionality of AntiVir Milter you need to obtain a license key from H+BEDV Datentechnik GmbH. To install it, execute the following diff --git a/security/antivir-milter/pkg-plist b/security/antivir-milter/pkg-plist index 8055da190f48..b3756331a5f4 100644 --- a/security/antivir-milter/pkg-plist +++ b/security/antivir-milter/pkg-plist @@ -24,6 +24,8 @@ etc/avmilter/avmilter.warn.sample etc/antivir.conf.sample @exec [ -f %B/antivir.conf ] || cp %B/%f %B/antivir.conf etc/rc.d/avmilter.sh +etc/rc.d/avupdater.sh-dist_avmilter +@unexec if [ -f %B/avupdater.sh ]; then echo "If permanently deleting this package, %B/avupdater.sh must be removed manually."; fi sbin/antivirupdater sbin/avmilter @exec install -d -o smmsp -g smmsp -m 700 /var/spool/avmilter @@ -84,6 +86,5 @@ sbin/avmilter %%PORTDOCS%%%%DOCSDIR%%/MANUAL %%PORTDOCS%%%%DOCSDIR%%/README.gpg %%PORTDOCS%%%%DOCSDIR%%/avmilter_de.pdf -%%PORTDOCS%%%%DOCSDIR%%/avmilter_en.pdf %%PORTDOCS%%%%DOCSDIR%%/antivir.gpg %%PORTDOCS%%@dirrm %%DOCSDIR%% |