From 14fa885294b65975fecb154fa1079591c358537f Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Thu, 26 May 2005 20:33:52 +0000 Subject: - Update to 20050523.0845 snapshot - Fix WITH_DAEMON - Update RC infrastructure PR: ports/81527 Submitted by: Ion-Mihai "IOnut" Tetcu (maintainer) --- mail/dspam/Makefile | 38 +++++++++++++++----------------------- mail/dspam/distinfo | 4 ++-- mail/dspam/files/UPDATING | 11 +++++++++++ mail/dspam/files/dspam.rc | 41 ----------------------------------------- mail/dspam/files/dspam.sh.in | 41 +++++++++++++++++++++++++++++++++++++++++ mail/dspam/files/patch-dspam.c | 2 +- 6 files changed, 70 insertions(+), 67 deletions(-) delete mode 100644 mail/dspam/files/dspam.rc create mode 100644 mail/dspam/files/dspam.sh.in (limited to 'mail/dspam') diff --git a/mail/dspam/Makefile b/mail/dspam/Makefile index 9a1abc825e68..cca661c33933 100644 --- a/mail/dspam/Makefile +++ b/mail/dspam/Makefile @@ -20,7 +20,7 @@ MAINTAINER= itetcu@people.tecnik93.com COMMENT= Bayesian spam filter - stable maintenance version PORTVER_MAJ= 3.4.6 -SNAP_DATE= .20050512.1145 +SNAP_DATE= .20050523.0845 .ifdef(SNAP_DATE) WRKSRC= ${WRKDIR}/dspam-cvs-stable${SNAP_DATE} @@ -104,7 +104,7 @@ STRIP= PKGMESSAGE= ${WRKSRC}/src/README.FreeBSD -_UPD_LINE_NO= 6 +_UPD_LINE_NO= 10 CONFLICTS= dspam-devel-[0-9]* @@ -170,15 +170,12 @@ WITH_DAEMON= on .ifdef(WITH_DAEMON) CONFIGURE_ARGS+= --enable-daemon -RC_DIR= ${PREFIX}/etc/rc.d RC_SUFX= .sh -USE_RC_SUBR= yes -PLIST_FILES+= etc/rc.d/dspam${RC_SUFX} +USE_RC_SUBR= ${PORTNAME}${RC_SUFX} _SED_SCRIPT+= -e 's,%%DAEMON%%,,g' -_SED_RC_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \ - -e 's,%%DSPAM_HOME%%,${DSPAM_HOME},g' +SUB_LIST+= DSPAM_HOME=${DSPAM_HOME} .else -_SED_SCRIPT+= -e ',%%DAEMON%%,D' +_SED_SCRIPT+= -e '/%%DAEMON%%/D' .endif .if !defined(WITH_GRAHAM_BAYES) @@ -277,7 +274,7 @@ DBDRV_COUNT:= ${DBDRV_COUNT:S/o//} .if defined(WITH_SQLITE3) HAVE_SQLITE= yes LIB_DEPENDS+= sqlite3.8:${PORTSDIR}/databases/sqlite3 -CONFIGURE_ARGS+= --with-storage-driver=sqlite3_drv +CONFIGURE_ARGS+= --with-storage-driver=sqlite3_drv .endif .if defined(WITH_SQLITE2) @@ -295,7 +292,7 @@ PLIST_SUB+= PGSQL="@comment " PLIST_SUB+= SQLITE="" #_SED_SCRIPT+= -e '/%%MYSQL%%/D' #_SED_SCRIPT+= -e '/%%PGSQL%%/D' -#_SED_SCRIPT+= -e 's,%%SQLITE%%,,g' +#_SED_SCRIPT+= -e 's/%%SQLITE%%//g' #PKGNAMESUFFIX= -sqlite2 DBDRV_COUNT:= ${DBDRV_COUNT:S/o//} .endif @@ -320,16 +317,18 @@ PLIST_SUB+= DB4="@comment " PLIST_SUB+= MYSQL="" PLIST_SUB+= PGSQL="@comment " PLIST_SUB+= SQLITE="@comment " -#_SED_SCRIPT+= -e 's,%%MYSQL%%,,g' +#_SED_SCRIPT+= -e 's/%%MYSQL%%//g' #_SED_SCRIPT+= -e '/%%PGSQL%%/D' #_SED_SCRIPT+= -e '/%%SQLITE%%/D' DBDRV_COUNT:= ${DBDRV_COUNT:S/o//} . if defined(WITH_MYSQL_COMPRESS) CONFIGURE_ARGS+= --enable-client-compression . endif -_SED_RC_SCRIPT+= -e 's,%%MYSQL%%,mysql,g' +#_SED_RC_SCRIPT+= -e 's/%%MYSQL%%/mysql/g' +SUB_LIST+= MYSQL=mysql .else -_SED_RC_SCRIPT+= -e 's,%%MYSQL%%,,' +#_SED_RC_SCRIPT+= -e 's/%%MYSQL%%//' +SUB_LIST+= MYSQL= .endif .if defined(WITH_VIRT_USERS) @@ -401,7 +400,7 @@ DSPAM_MODE= 4511 .if defined(WITH_POSTFIX_MBC) DSPAM_MODE= 4511 -#_SED_SCRIPT+= -e 's,%%POSTFIX_MBC%%,,g' +#_SED_SCRIPT+= -e 's/%%POSTFIX_MBC%%//g' .else #_SED_SCRIPT+= -e '/%%POSTFIX_MBC%%/D' .endif @@ -426,8 +425,8 @@ CONFIGURE_ARGS+=--enable-user-logging USE_PERL5_RUN= yes PLIST_SUB+= CGI="" CGI_PATH?= ${PREFIX}/www/vhosts/dspam -_SED_SCRIPT+= -e 's,%%CGI%%,,g' -_SED_SCRIPT+= -e 's,%%CGI_PATH%%,${CGI_PATH},g' +_SED_SCRIPT+= -e 's/%%CGI%%//g' +_SED_SCRIPT+= -e 's/%%CGI_PATH%%/${CGI_PATH}/g' #SED_FILES= ${LS} ${WRKSRC}/cgi/*.pl #SED_FILES+= ${LS} $PWRKSRC}/cgi/*.cgi .else @@ -524,10 +523,6 @@ post-patch: @${REINPLACE_CMD} -e 's|WHERE CURRENT_DATE - created_on > 14;|WHERE CURRENT_DATE - created_on > ${SIGNATURE_LIFE};|' ${WRKSRC}/src/tools.pgsql_drv/purge.sql @${REINPLACE_CMD} -e 's|where SYSDATE-created_on > 14|where SYSDATE-created_on > ${SIGNATURE_LIFE};|' ${WRKSRC}/src/tools.ora_drv/purge.sql @${REINPLACE_CMD} -e "s|where date('now')-date(created_on) > 14;|where date('now')-date(created_on) > ${SIGNATURE_LIFE};|" ${WRKSRC}/src/tools.sqlite_drv/purge.sql -.if defined(WITH_DAEMON) - @${CP} ${FILESDIR}/dspam.rc ${WRKSRC} - @${REINPLACE_CMD} ${_SED_RC_SCRIPT} ${WRKSRC}/dspam.rc -.endif pre-configure: @${ECHO_CMD} @@ -574,9 +569,6 @@ post-install: cd ${WRKSRC}/src/ && \ ${INSTALL} -o ${DSPAM_OWNER} -g ${DSPAM_GROUP} -m 0640 \ dspam.conf.sample ${PREFIX}/etc -.if defined(WITH_DAEMON) - ${INSTALL_SCRIPT} ${WRKSRC}/dspam.rc ${RC_DIR}/dspam${RC_SUFX} -.endif ######## # stupid hack until I figure out where/how to patch diff --git a/mail/dspam/distinfo b/mail/dspam/distinfo index e4e0f927ec82..706fd00070b3 100644 --- a/mail/dspam/distinfo +++ b/mail/dspam/distinfo @@ -1,2 +1,2 @@ -MD5 (dspam-3.4.6.20050512.1145.tar.gz) = 2e8ac4294df68f5dd0415c06205b2c1f -SIZE (dspam-3.4.6.20050512.1145.tar.gz) = 699466 +MD5 (dspam-3.4.6.20050523.0845.tar.gz) = edda53118c5d088661afda5ce21d0afa +SIZE (dspam-3.4.6.20050523.0845.tar.gz) = 699538 diff --git a/mail/dspam/files/UPDATING b/mail/dspam/files/UPDATING index 57b7dc48b3d4..48afc8c003bc 100644 --- a/mail/dspam/files/UPDATING +++ b/mail/dspam/files/UPDATING @@ -15,6 +15,17 @@ also the UPGRADING enclosed in the dspam distribution. You can see it by doing in the port directory: make extract; more `find . -type f -maxdepth 2 -name UPGRADING` +########################################################################### +# dspam-3.4.6.20050523.0845 +# + +BUGFIX: fix for managed groups where delivery of false positives would fail +due to the managed group not being recognized + +BUGFIX: fixed bug where messages lacking a terminating boundary would fail +to receive a signature in the message body + + ########################################################################### # dspam-3.4.6.20050512.1145 # diff --git a/mail/dspam/files/dspam.rc b/mail/dspam/files/dspam.rc deleted file mode 100644 index 45fb07a1c2bd..000000000000 --- a/mail/dspam/files/dspam.rc +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: dspam -# REQUIRE: LOGIN NETWORKING SERVERS %%MYSQL%% -# BEFORE: mail -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf[.local] to enable dspam: -# -# dspam_enable="YES" -# - -. /etc/rc.subr - -name=dspam -rcvar=`set_rcvar` - -command=%%PREFIX%%/bin/${name} -command_args="--daemon > /dev/null 2>&1 &" -pidfile=/var/run/${name}.pid -required_dirs=%%DSPAM_HOME%% -required_files=%%PREFIX%%/etc/${name}.conf - -extra_commands=reload - -reload() -{ - kill -HUP `cat $pidfile` -} - -# set defaults - -dspam_enable=${dspam_enable:-"NO"} -#dspam_flags=${dspam_flags:-"--daemon &"} - -load_rc_config $name -run_rc_command "$1" diff --git a/mail/dspam/files/dspam.sh.in b/mail/dspam/files/dspam.sh.in new file mode 100644 index 000000000000..ac2489504bf7 --- /dev/null +++ b/mail/dspam/files/dspam.sh.in @@ -0,0 +1,41 @@ +#!/bin/sh +# $FreeBSD$ +# formerly $ FreeBSD: ports/mail/dspam/files/dspam,v 1.1 2005/05/05 21:03:37 pav Exp $ +# + +# PROVIDE: dspam +# REQUIRE: LOGIN NETWORKING SERVERS %%MYSQL%% +# BEFORE: mail +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf[.local] to enable dspam: +# +# dspam_enable="YES" +# + +. /etc/rc.subr + +name=dspam +rcvar=`set_rcvar` + +command=%%PREFIX%%/bin/${name} +command_args="--daemon > /dev/null 2>&1 &" +pidfile=/var/run/${name}.pid +required_dirs=%%DSPAM_HOME%% +required_files=%%PREFIX%%/etc/${name}.conf + +extra_commands=reload + +reload() +{ + kill -HUP `cat $pidfile` +} + +# set defaults + +dspam_enable=${dspam_enable:-"NO"} +#dspam_flags=${dspam_flags:-"--daemon &"} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/dspam/files/patch-dspam.c b/mail/dspam/files/patch-dspam.c index 08aa251fbd6f..ca4842d5b20c 100644 --- a/mail/dspam/files/patch-dspam.c +++ b/mail/dspam/files/patch-dspam.c @@ -4,7 +4,7 @@ LOG (LOG_CRIT, ERROR_MEM_ALLOC); } -- if (CTX->result == DSR_ISSPAM) +- if (CTX->result == DSR_ISSPAM && ATX->managed_group[0]) - { +// FreeBSD port patch: put the user in all emails, extremely usefull for scripts +// if (CTX->result == DSR_ISSPAM) -- cgit v1.2.3