Date: Sat, 20 Jul 2013 14:05:31 -0400 (EDT) From: Yarema <yds@CoolRat.org> To: FreeBSD-gnats-submit@freebsd.org Cc: Ion-Mihai IOnut Tetcu <itetcu@people.tecnik93.com> Subject: ports/180695: Refactor mail/dspam-devel/Makefile and update to 3.10.2 Message-ID: <20130720180531.3326F8B2C@ozark.dppl.com> Resent-Message-ID: <201307201810.r6KIA5cQ000347@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 180695 >Category: ports >Synopsis: Refactor mail/dspam-devel/Makefile and update to 3.10.2 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Jul 20 18:10:04 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Yarema >Release: FreeBSD 9.1-STABLE amd64 >Organization: NYCBUG.org >Environment: System: FreeBSD 9.1-STABLE amd64 >Description: Clean up the Makefile and OPTIONS. Remove multiple MySQL version selection and leave it to the global system settings. This implicitly enables support for MariaDB and Percona in addition to all the versions of MySQL while simplifying the Makefile at the same time. Add Cyrus24 and Dovecot LDA options. Regroup OPTIONS so all the DB related choices appear together. Otherwise the resulting build should remain the same as before. Similar mail/dspam patch also submitted. The two patches syncronise both ports, other than the minor Makefile differences specific to each version. This ought to make it easier to perhaps eliminate the mail/dspam-devel port altogether and bring mail/dspam up to the latest version, currently 3.10.2 >How-To-Repeat: make -C /usr/ports/mail/dspam-devel install >Fix: diff -u -r -N dspam-devel~/Makefile dspam-devel/Makefile --- dspam-devel~/Makefile 2013-07-20 12:06:04.000000000 -0400 +++ dspam-devel/Makefile 2013-07-20 11:41:24.638736007 -0400 @@ -1,51 +1,38 @@ # Created by: Ion-Mihai "IOnut" Tetcu <itetcu@people.tecnik93.com> # $FreeBSD$ -# Note to commiters: If not committing a maintainer patch and as a result PKGNAME -# or user variables (WITH*) changes please add an entry in ${FILESDIR}/UPDATING -# Else the port will be broken. Thanks. +# Note to commiters: If not committing a maintainer patch and PKGNAME or +# user variables (WITH*) change please add an entry in ${FILESDIR}/UPDATING +# Otherwise the port will be broken. Thanks. PORTNAME= dspam -PORTVERSION= ${PORTVER_MAJ}${SNAP_DATE} -PORTREVISION= 1 +PORTVERSION= 3.10.2 +PORTREVISION= 0 PORTEPOCH= 1 CATEGORIES= mail -MASTER_SITES= # set later +MASTER_SITES= SF \ + http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}/sources/ +MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} PKGNAMESUFFIX= -devel MAINTAINER= itetcu@FreeBSD.org -COMMENT= Bayesian spam filter - development version +COMMENT= Bayesian spam filter -PORTVER_MAJ= 3.10.1 -#SNAP_DATE= .r1 - -#MIN_OPTIONS_VER= ${PORTNAME}-${PKGNAMESUFFIX}-3.10.0. - -.ifdef(SNAP_DATE) -MASTER_SITES= ${MASTER_SITE_LOCAL} \ - http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}-${PKGNAMESUFFIX}/sources/ -MASTER_SITE_SUBDIR= itetcu -WRKSRC= ${WRKDIR}/dspam-${PORTVER_MAJ} -.else -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}/ \ - http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}/sources/ -DISTFILES= dspam-${PORTVER_MAJ}.tar.gz -WRKSRC= ${WRKDIR}/dspam-${PORTVER_MAJ} -.endif +MIN_OPTIONS_VER= ${PORTNAME}-3.9.0 OPTIONS_DEFINE= SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \ - CLAMAV CLAMAV_DEVEL CLAMAV_LOCAL MYSQL_COMPRESS \ - MYSQL_LOCAL PGSQL_LOCAL HASH EXTERNAL_LOOKUP \ + CLAMAV CLAMAV_DEVEL CLAMAV_LOCAL EXTERNAL_LOOKUP \ USER_HOMEDIR TRUSTED_USERS VIRT_USERS LONG_USERNAMES \ LARGE_SCALE DOMAIN_SCALE NICESENDMAIL POSTFIX_MBC \ QMAIL WEBUI LIGHTTPD OPTIONS_MULTI= DB -OPTIONS_MULTI_DB= MYSQL51 MYSQL55 PGSQL SQLITE2 SQLITE3 +OPTIONS_MULTI_DB= HASH MYSQL MYSQL_COMPRESS MYSQL_LOCAL \ + PGSQL PGSQL_LOCAL SQLITE2 SQLITE3 OPTIONS_RADIO= LDA -OPTIONS_RADIO_LDA= CYRUS21 CYRUS22 CYRUS23 CYRUS24 EXIM \ - MAILDROP PROCMAIL SAFECAT SENDMAIL +OPTIONS_RADIO_LDA= CYRUS21 CYRUS22 CYRUS23 CYRUS24 DOVECOT1 \ + DOVECOT2 EXIM MAILDROP PROCMAIL SAFECAT SENDMAIL VERBOSE_DEBUG_DESC= Debug in LOGDIR/dspam.debug BNR_DEBUG_DESC= Debug for BNR @@ -54,10 +41,9 @@ CLAMAV_DESC= ClamAV support CLAMAV_DEVEL_DESC= ClamAV support CLAMAV_LOCAL_DESC= RUN_DEPEND on selected ClamAV -MYSQL51_DESC= MySQL 5.1.x as back-end -MYSQL55_DESC= MySQL 5.5.x as back-end +MYSQL_DESC= MySQL 5.X.x as back-end MYSQL_COMPRESS_DESC= Compress dspam <--> MySQL -MYSQL_LOCAL_DESC= RUN_DEPEND on selected MySQL server ver. +MYSQL_LOCAL_DESC= RUN_DEPEND on MySQL server PGSQL_DESC= PostgreSQL as back-end PGSQL_LOCAL_DESC= RUN_DEPEND on PostgreSQL server SQLITE2_DESC= SQLite v2.x as back-end @@ -74,6 +60,8 @@ CYRUS22_DESC= Cyrus's 2.2 deliver as LDA CYRUS23_DESC= Cyrus's 2.3 deliver as LDA CYRUS24_DESC= Cyrus's 2.4 deliver as LDA +DOVECOT1_DESC= Dovecot 1.2 deliver as LDA +DOVECOT2_DESC= Dovecot 2.2 dovecot-lda as LDA EXIM_DESC= Exim as local delivery agent MAILDROP_DESC= Maildrop as local delivery agent PROCMAIL_DESC= Procmail as local delivery agent @@ -84,21 +72,18 @@ QMAIL_DESC= Play nice with Qmail mail server WEBUI_DESC= Install WebUI, pulls in Apache or see below -OPTIONS_DEFAULT= SYSLOG DEBUG DAEMON CLAMAV CLAMAV_LOCAL MYSQL55 \ - PGSQL SQLITE3 HASH +OPTIONS_DEFAULT= SYSLOG DEBUG DAEMON CLAMAV CLAMAV_LOCAL \ + HASH MYSQL MYSQL_COMPRESS PGSQL SQLITE3 +MAKE_JOBS_UNSAFE= yes USE_PERL5= yes USE_AUTOTOOLS= libtool -.ifdef(SNAP_DATE) -USE_AUTOTOOLS+= autoconf:env automake -.endif USE_LDCONFIG= yes GNU_CONFIGURE= yes -#CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" -#CONFIGURE_ENV= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \ -# CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ -# LDFLAGS="-L${LOCALBASE}/lib" \ -# LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" +CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +CFLAGS+= ${PTHREAD_CFLAGS} .ifdef(GDBS) CFLAGS+= -g -DDEBUG @@ -174,7 +159,7 @@ .if ${PORT_OPTIONS:MDAEMON} CONFIGURE_ARGS+= --enable-daemon -USE_RC_SUBR= ${PORTNAME}${PKGNAMESUFFIX} +USE_RC_SUBR= ${PORTNAME} _SED_SCRIPT+= -e 's,%%DAEMON%%,,g' SUB_LIST+= DSPAM_HOME=${DSPAM_HOME} .else @@ -207,7 +192,7 @@ .if ${PORT_OPTIONS:MPGSQL} USE_PGSQL= yes CONFIGURE_ARGS+= --with-pgsql-includes=${LOCALBASE}/include \ - --with-pgsql-libraries=${LOCALBASE}/lib + --with-pgsql-libraries=${LOCALBASE}/lib PLIST_SUB+= PGSQL="" #PKGNAMESUFFIX= -pgsql _DBDRV_COUNT:= ${_DBDRV_COUNT}o @@ -253,25 +238,17 @@ PLIST_SUB+= HASH="@comment " .endif -.ifdef(WITH_MYSQL51) -WANT_MYSQL_VER= 51 -#PKGNAMESUFFIX= -mysql51 -.elif ${PORT_OPTIONS:MMYSQL55} -WANT_MYSQL_VER= 55 -#PKGNAMESUFFIX= -mysql55 -.endif - -.if defined(WITH_MYSQL51) || defined(WITH_MYSQL55) +.if ${PORT_OPTIONS:MMYSQL} USE_MYSQL= yes CONFIGURE_ARGS+= --with-mysql-includes=${LOCALBASE}/include/mysql \ - --with-mysql-libraries=${LOCALBASE}/lib/mysql + --with-mysql-libraries=${LOCALBASE}/lib/mysql PLIST_SUB+= MYSQL="" _DBDRV_COUNT:= ${_DBDRV_COUNT}o . if ${PORT_OPTIONS:MMYSQL_COMPRESS} CONFIGURE_ARGS+= --enable-client-compression . endif . if ${PORT_OPTIONS:MMYSQL_LOCAL} -RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${WANT_MYSQL_VER}-server +USE_MYSQL= server SUB_LIST+= MYSQL=mysql . else SUB_LIST+= MYSQL= @@ -340,10 +317,20 @@ CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver' .endif -.ifdef(WITH_EXIM_LDA) -. ifdef(WITH_MYSQL51) || (WITH_MYSQL55) +.if ${PORT_OPTIONS:MDOVECOT1} +RUN_DEPENDS+= ${LOCALBASE}/libexec/dovecot/deliver:${PORTSDIR}/mail/dovecot +CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/libexec/dovecot/deliver' +.endif + +.if ${PORT_OPTIONS:MDOVECOT2} +RUN_DEPENDS+= ${LOCALBASE}/libexec/dovecot/dovecot-lda:${PORTSDIR}/mail/dovecot2 +CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/libexec/dovecot/dovecot-lda' +.endif + +.if ${PORT_OPTIONS:MEXIM} +. if ${PORT_OPTIONS:MMYSQL} _EXIM_EXT= -mysql -. elifdef(WITH_POSTGRESQL) +. elif ${PORT_OPTIONS:MPGSQL} _EXIM_EXT= -postgresql . endif RUN_DEPENDS+= exim:${PORTSDIR}/mail/exim${_EXIM_EXT} @@ -477,11 +464,11 @@ ${WRKSRC}/src/tools.sqlite_drv/purge-2.sql @${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \ ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql - @${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^" \ + @${REINPLACE_CMD} -e "s|%%PERL%%|${PERL}|" \ ${WRKSRC}/src/tools/dspam_train.in ${WRKSRC}/src/tools/dspam_notify.in pre-configure: -.if ${PORT_OPTIONS:MVIRT_USERS} && !(defined(USE_MYSQL) || \ +.if ${PORT_OPTIONS:MVIRT_USERS} && !( defined(USE_MYSQL) || \ ${PORT_OPTIONS:MPGSQL} || ${PORT_OPTIONS:MHASH} ) @${ECHO_CMD} "You need MySQL, POSTGRESQL or HASH for virtual users." @${FALSE} @@ -496,12 +483,8 @@ @${ECHO_CMD} "You need MySQL, PostgreSQL or Hash for Daemon mode, because multithreading support is needed" @${FALSE} .endif -.if (defined(WITH_MYSQL51) && defined(WITH_MYSQL55)) - @${ECHO_CMD} "You can compile with only one MySQL version driver." - @${FALSE} -.endif -.if defined(WITH_EXTERNAL_LOOKUP) && !( defined(USE_MYSQL) || \ - !defined(WITHOUT_POSTGRESQL) || defined(USE_SQLITE) ) +.if ${PORT_OPTIONS:MEXTERNAL_LOOKUP} && !( defined(USE_MYSQL) || \ + ${PORT_OPTIONS:MPGSQL} || defined(USE_SQLITE) ) @${ECHO_CMD} "You need MySQL, Postgres or SQLITE for EXTERNAL_LOOKUP." @${FALSE} .endif @@ -517,12 +500,6 @@ @${ECHO_CMD} "There's no reason to depend on LightHTTPD if you're not using WebUI" @${FALSE} .endif -.ifdef(SNAP_DATE) - @${ECHO_CMD} - @${ECHO_CMD} "You can safely ignore the following auto* errors" - @${ECHO_CMD} - @(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./autogen.sh) -.endif post-install: ${CP} ${WRKSRC}/src/dspam.conf ${WRKSRC}/src/dspam.conf.sample @@ -537,7 +514,7 @@ ${TEST} `ls -1 ${PREFIX}/lib/pkgconfig | wc -l` -eq 0 && \ ${RM} -R ${PREFIX}/lib/pkgconfig || true -#.ifndef NOPORTDATA +.if ${PORT_OPTIONS:MEXAMPLES} .ifdef(USE_MYSQL) @${MKDIR} ${EXAMPLESDIR}/mysql cd ${WRKSRC}/src/tools.mysql_drv && \ @@ -558,7 +535,7 @@ cd ${WRKSRC}/src/tools.sqlite_drv && \ ${INSTALL_DATA} *.sql ${EXAMPLESDIR}/sqlite .endif -#.endif # NOPORTDATA +.endif # NOPORTEXAMPLES .if ${PORT_OPTIONS:MWEBUI} . for I in admin.cgi admingraph.cgi configure.pl dspam.cgi graph.cgi templates/strings.pl diff -u -r -N dspam-devel~/distinfo dspam-devel/distinfo --- dspam-devel~/distinfo 2013-06-08 15:05:47.000000000 -0400 +++ dspam-devel/distinfo 2013-07-20 03:24:41.304736718 -0400 @@ -1,2 +1,2 @@ -SHA256 (dspam-3.10.1.tar.gz) = 359d9f58564a87da131b8390d0eeecae4aa40d22ff74b97256d46835a2474063 -SIZE (dspam-3.10.1.tar.gz) = 1044198 +SHA256 (dspam-3.10.2.tar.gz) = ae76569604021f35b741fb95198a1e611a8c64c3838661973a6cf360bba593a9 +SIZE (dspam-3.10.2.tar.gz) = 1035054 diff -u -r -N dspam-devel~/files/UPDATING dspam-devel/files/UPDATING --- dspam-devel~/files/UPDATING 2013-06-08 15:05:47.000000000 -0400 +++ dspam-devel/files/UPDATING 2013-07-20 11:59:40.420735969 -0400 @@ -11,6 +11,19 @@ make extract; more `find . -type f -maxdepth 2 -name UPGRADING` ########################################################################### +# dspam-devel-3.10.2,1 +# + +Bugfix release that resolves some issues that existed in earlier releases. +- Support for Postgresql 8.1 (EOL) was dropped +- Support for Postgresql 9.1 was added +- Bug in RSET handling during LHLO phase fixed +- Introduced 'TxtDirectory' directive in dspam.conf (defaults to previously hardcoded location) +- Introduced 'GroupConfig' directive in dspam.conf (defaults to previously hardcoded location) +- Various updates to the webui +- Some (potential) memory leaks were fixed + +########################################################################### # dspam-devel-3.10.1,1 # diff -u -r -N dspam-devel~/files/dspam-devel.in dspam-devel/files/dspam-devel.in --- dspam-devel~/files/dspam-devel.in 2013-06-08 15:05:47.000000000 -0400 +++ dspam-devel/files/dspam-devel.in 1969-12-31 19:00:00.000000000 -0500 @@ -1,46 +0,0 @@ -#!/bin/sh -# $FreeBSD$ -# - -# PROVIDE: dspam -# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%% -# BEFORE: mail -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf[.local] to enable dspam: -# dspam_enable="YES" -# -# dspam_debug="YES" will start dspam with debug logging (you need ar least WITH_DEBUG) -# you can also set the pid file via dspam_pidfile -# - -. /etc/rc.subr - -name="dspam" -rcvar=dspam_enable - -load_rc_config $name - -#defaults -: ${dspam_enable="NO"} -: ${dspam_debug="NO"} -: ${dspam_pidfile:-/var/run/dspam.pid} - -command=%%PREFIX%%/bin/${name} -if checkyesno dspam_debug -then - command_args="--daemon --debug > /dev/null 2>&1 &" -else - command_args="--daemon > /dev/null 2>&1 &" -fi -required_dirs=%%DSPAM_HOME%% -required_files=%%PREFIX%%/etc/${name}.conf - -extra_commands=reload -reload() -{ - kill -HUP `cat $pidfile` -} - -run_rc_command "$1" diff -u -r -N dspam-devel~/files/dspam.in dspam-devel/files/dspam.in --- dspam-devel~/files/dspam.in 1969-12-31 19:00:00.000000000 -0500 +++ dspam-devel/files/dspam.in 2013-07-20 11:54:55.020736372 -0400 @@ -0,0 +1,44 @@ +#!/bin/sh +# $FreeBSD$ +# formerly $ FreeBSD: ports/mail/dspam/files/dspam,v 1.1 2005/05/05 21:03:37 pav Exp $ +# + +# PROVIDE: dspam +# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%% +# BEFORE: mail +# KEYWORD: shutdown + +# Define dspam_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/dspam + +. /etc/rc.subr + +name="dspam" +rcvar=dspam_enable + +load_rc_config $name + +#defaults +: ${dspam_enable:="NO"} +: ${dspam_debug:="NO"} +: ${dspam_pidfile:=/var/run/dspam.pid} + +command=%%PREFIX%%/bin/${name} +if checkyesno dspam_debug +then + command_args="--daemon --debug > /dev/null 2>&1 &" +else + command_args="--daemon > /dev/null 2>&1 &" +fi +required_dirs=%%DSPAM_HOME%% +required_files=%%PREFIX%%/etc/${name}.conf + +extra_commands=reload +reload() +{ + kill -HUP `cat $pidfile` +} + +run_rc_command "$1" diff -u -r -N dspam-devel~/pkg-descr dspam-devel/pkg-descr --- dspam-devel~/pkg-descr 2013-06-08 15:05:55.000000000 -0400 +++ dspam-devel/pkg-descr 2013-07-20 03:24:41.304736718 -0400 @@ -4,4 +4,4 @@ for mail clients, other anti-spam tools, and similar projects requiring drop-in spam filtering. -WWW: http://dspam.sf.net +WWW: http://dspam.nuclearelephant.com >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130720180531.3326F8B2C>