diff options
author | heinz <heinz@pkgsrc.org> | 2004-10-12 00:11:10 +0000 |
---|---|---|
committer | heinz <heinz@pkgsrc.org> | 2004-10-12 00:11:10 +0000 |
commit | a797a70e61c3c3e1d3dfd9bf4d20d051ca67197f (patch) | |
tree | 869ecce747c8e4c1778b1adf5f249ebe8221ffbb /mail/spamassassin | |
parent | b4a824b6e23f15b9821c9e31b643d935d137e9ab (diff) | |
download | pkgsrc-a797a70e61c3c3e1d3dfd9bf4d20d051ca67197f.tar.gz |
Update to version 3.0.0. Tested on NetBSD 1.6.2, Solaris 9 and Debian
3.0.
Important changes since 2.64 (for details see the file 'Changes')
- support for sender authentication using the Sender Policy Framework
(SPF)
- checking for web links of known spam advertisers (SURBL)
- modular plugin architecture
- improved SQL database support for storing user data in server
installations
- improved email classification
- SpamAssassin is now part of the Apache Foundation
Diffstat (limited to 'mail/spamassassin')
-rw-r--r-- | mail/spamassassin/DEINSTALL | 17 | ||||
-rw-r--r-- | mail/spamassassin/MESSAGE | 23 | ||||
-rw-r--r-- | mail/spamassassin/Makefile | 123 | ||||
-rw-r--r-- | mail/spamassassin/PLIST | 6 | ||||
-rw-r--r-- | mail/spamassassin/distinfo | 17 | ||||
-rw-r--r-- | mail/spamassassin/options.mk | 88 | ||||
-rw-r--r-- | mail/spamassassin/patches/patch-ab | 117 | ||||
-rw-r--r-- | mail/spamassassin/patches/patch-ae | 50 | ||||
-rw-r--r-- | mail/spamassassin/patches/patch-ak | 14 | ||||
-rw-r--r-- | mail/spamassassin/patches/patch-al | 14 | ||||
-rw-r--r-- | mail/spamassassin/patches/patch-aq | 16 | ||||
-rw-r--r-- | mail/spamassassin/patches/patch-au | 29 | ||||
-rw-r--r-- | mail/spamassassin/patches/patch-av | 29 | ||||
-rw-r--r-- | mail/spamassassin/patches/patch-aw | 14 |
14 files changed, 318 insertions, 239 deletions
diff --git a/mail/spamassassin/DEINSTALL b/mail/spamassassin/DEINSTALL deleted file mode 100644 index bb9cd24c212..00000000000 --- a/mail/spamassassin/DEINSTALL +++ /dev/null @@ -1,17 +0,0 @@ -# $NetBSD: DEINSTALL,v 1.1 2003/11/03 00:56:25 heinz Exp $ - -case ${STAGE} in -DEINSTALL) - ${CAT} << EOF -=========================================================================== -Note: - - If you intend to upgrade your SpamAssassin installation, it is a good - idea to run 'sa-learn --rebuild' for every Bayes database *prior* to - deinstalling this package. This will incorporate any pending changes in - your Bayes journal file into the database. - -=========================================================================== -EOF - ;; -esac diff --git a/mail/spamassassin/MESSAGE b/mail/spamassassin/MESSAGE index 5894eaa759e..ebe1f103c3a 100644 --- a/mail/spamassassin/MESSAGE +++ b/mail/spamassassin/MESSAGE @@ -1,20 +1,13 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.8 2003/12/27 19:16:04 heinz Exp $ +$NetBSD: MESSAGE,v 1.9 2004/10/12 00:11:10 heinz Exp $ -SA 2.6x uses a new format for the Bayes database. *Before* deinstalling -SA 2.5x, make sure you ran 'sa-learn --rebuild' for every Bayes database. +If you upgrade from an earlier version please take a look at the file +UPGRADE in -If you're running Razor please use at least p5-razor-agents-2.22nb2 -which contains some fixes from the SpamAssassin team to improve behaviour -in Perl taint mode. - -Some configuration options were changed (see Mail::SpamAssassin::Conf). -Please check that your existing mail configuration still works. - -More information can be found in the man pages for 'spamassassin', -'sa-learn', 'spamc' and 'spamd', with 'perldoc Mail::SpamAssassin::Conf' -and in - - ${PREFIX}/share/doc/spamassassin/ + ${PREFIX}/share/doc/spamassassin/ +Some configuration options were changed; for more information see +'perldoc Mail::SpamAssassin::Conf' and the man pages for 'spamassassin', +'spamd' and 'sa-learn'. Please check that your existing mail configuration +still works. =========================================================================== diff --git a/mail/spamassassin/Makefile b/mail/spamassassin/Makefile index 7bb089c7d30..89b2c9d4a1e 100644 --- a/mail/spamassassin/Makefile +++ b/mail/spamassassin/Makefile @@ -1,48 +1,37 @@ -# $NetBSD: Makefile,v 1.48 2004/10/03 00:12:54 tv Exp $ +# $NetBSD: Makefile,v 1.49 2004/10/12 00:11:10 heinz Exp $ DISTNAME= Mail-SpamAssassin-${SPAMASSASSIN_VERSION} PKGNAME= spamassassin-${SPAMASSASSIN_VERSION} -PKGREVISION= #1 +PKGREVISION= # empty SVR4_PKGNAME= sa -CATEGORIES= mail -MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Mail/} \ - http://old.spamassassin.org/released/ +CATEGORIES= mail perl5 +MASTER_SITES= ${MASTER_SITE_APACHE:=spamassassin/} \ + http://spamassassin.apache.org/released/ MAINTAINER= heinz@NetBSD.org -HOMEPAGE= http://www.spamassassin.org/ +HOMEPAGE= http://spamassassin.apache.org/ COMMENT= Mail filter to identify spam -CONFLICTS= p5-Mail-SpamAssassin-[1-9]* - -SPAMASSASSIN_VERSION= 2.64 - -PKG_INSTALLATION_TYPES= overwrite pkgviews - .include "../../mk/bsd.prefs.mk" -PERL5_REQD+= 5.6.0 # MakeMaker >= 5.45 needed - -DEPENDS+= p5-Net-DNS>=0.29:../../net/p5-Net-DNS -DEPENDS+= p5-HTML-Parser>=3.29:../../www/p5-HTML-Parser +DEPENDS+= p5-Net-DNS>=0.34:../../net/p5-Net-DNS +DEPENDS+= p5-HTML-Parser>=3.31:../../www/p5-HTML-Parser DEPENDS+= p5-Digest-SHA1-[0-9]*:../../security/p5-Digest-SHA1 -DEPENDS+= p5-MIME-Base64>=2.11:../../converters/p5-MIME-Base64 -.if ${OPSYS} == "SunOS" +DEPENDS+= {p5-MIME-Base64>=2.11,perl{,-thread}>=5.8.0}:../../converters/p5-MIME-Base64 +DEPENDS+= {p5-Storable-[0-9]*,perl{,-thread}>=5.8.0}:../../devel/p5-Storable +.if ${OPSYS} != "NetBSD" DEPENDS+= p5-DB_File-[0-9]*:../../databases/p5-DB_File .endif -SPAMASSASSIN_USE_SSL?= YES - -.if !empty(SPAMASSASSIN_USE_SSL:M[yY][eE][sS]) -. include "../../security/openssl/buildlink3.mk" -DEPENDS+= p5-IO-Socket-SSL>=0.92:../../security/p5-IO-Socket-SSL -CONFIGURE_ARGS+= --enable-ssl -MAKE_PARAMS= ENABLE_SSL=yes -SA_SSLCERTS= ${SSLCERTS} -.else -CONFIGURE_ARGS+= --disable-ssl -MAKE_PARAMS= ENABLE_SSL=no -SA_SSLCERTS= '$$LOCAL_RULES_DIR/certs' -.endif +CONFLICTS= p5-Mail-SpamAssassin-[1-9]* + +PKG_INSTALLATION_TYPES= overwrite pkgviews + +SPAMASSASSIN_VERSION= 3.0.0 + +WRKSRC= ${WRKDIR}/${DISTNAME} + +PERL5_REQD+= 5.6.1 # MakeMaker >= 5.45 needed USE_BUILDLINK3= YES USE_PKGINSTALL= YES @@ -50,35 +39,26 @@ PKG_SYSCONFSUBDIR= spamassassin # Set contact address (e-mail, URL, ...) for use in spam report messages # See "perldoc Mail::SpamAssassin::Conf" for option "report_contact" -SPAMASSASSIN_CONTACT_ADDRESS?= 'the administrator of that system' - -# Use "NO" to turn off warnings and taint checks in spamd/spamassassin -SPAMASSASSIN_PERL_WARNINGS?= YES -SPAMASSASSIN_PERL_TAINT_CHECKS?= YES +SPAMASSASSIN_CONTACT_ADDRESS?= postmaster -# Enable test for Razor during 'make test'? -SPAMASSASSIN_RAZOR_TESTS?= YES +.include "options.mk" -BUILD_DEFS+= SPAMASSASSIN_USE_SSL BUILD_DEFS+= SPAMASSASSIN_CONTACT_ADDRESS -BUILD_DEFS+= SPAMASSASSIN_PERL_WARNINGS -BUILD_DEFS+= SPAMASSASSIN_PERL_TAINT_CHECKS PLIST_ADD= ${WRKSRC}/.PLIST_ADD PLIST_SRC= ${PKGDIR}/PLIST ${PLIST_ADD} PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Mail/SpamAssassin/.packlist GNU_CONFIGURE= YES -CONFIGURE_DIRS= ${WRKSRC}/spamd +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} +CONFIGURE_DIRS= ${WRKSRC}/spamc PERL5_CONFIGURE= NO # we need the default "do-configure" target PERL5_CONFIGURE_DIRS= ${WRKSRC} MAKE_PARAMS+= SYSCONFDIR="${PKG_SYSCONFDIR}" MAKE_PARAMS+= LOCALRULESDIR="${PKG_SYSCONFDIR}" MAKE_PARAMS+= DEFRULESDIR="${RULESDIR}" -MAKE_PARAMS+= RUN_RAZOR_TESTS="${SPAMASSASSIN_RAZOR_TESTS}" -MAKE_PARAMS+= PERL_WARN="${SPAMASSASSIN_PERL_WARNINGS}" -MAKE_PARAMS+= PERL_TAINT="${SPAMASSASSIN_PERL_TAINT_CHECKS}" +MAKE_PARAMS+= CONTACT_ADDRESS=${SPAMASSASSIN_CONTACT_ADDRESS:Q} RCD_SCRIPTS= spamd RCD_SCRIPT_SRC.spamd= ${WRKSRC}/spamd/netbsd-rc-script.sh @@ -87,22 +67,19 @@ EGDIR= ${PREFIX}/share/examples/spamassassin EG_SUBDIR= ${EGDIR:S,^${PREFIX}/,,} DOCDIR= ${PREFIX}/share/doc/spamassassin DOC_SUBDIR= ${DOCDIR:S,^${PREFIX}/,,} -HTMLDIR= ${PREFIX}/share/doc/html/spamassassin -HTML_SUBDIR= ${HTMLDIR:S,^${PREFIX}/,,} RULESDIR= ${PREFIX}/share/spamassassin RULE_SUBDIR= ${RULESDIR:S,^${PREFIX}/,,} CONF_FILES+= ${EGDIR}/local.cf ${PKG_SYSCONFDIR}/local.cf \ + ${EGDIR}/init.pre ${PKG_SYSCONFDIR}/init.pre \ ${RULESDIR}/user_prefs.template \ ${PKG_SYSCONFDIR}/user_prefs.template SUPPORT_FILES_PERMS+= ${EGDIR}/netbsd_lists.cf \ ${PKG_SYSCONFDIR}/netbsd_lists.cf ${SHAREOWN} \ ${SHAREGRP} ${SHAREMODE} -INSTALLATION_DIRS+= ${EG_SUBDIR} ${DOC_SUBDIR} ${DOC_SUBDIR}/spamd \ - ${HTML_SUBDIR} - -DEINSTALL_EXTRA_TMPL= ${PKGDIR}/DEINSTALL +INSTALLATION_DIRS+= ${EG_SUBDIR} ${DOC_SUBDIR} ${DOC_SUBDIR}/spamc \ + ${DOC_SUBDIR}/spamd SUBST_CLASSES+= sa1 sa2 sa3 @@ -113,15 +90,16 @@ SUBST_SED.sa1= -e s!@SA_CONTACT_ADDRESS@!${SPAMASSASSIN_CONTACT_ADDRESS}! SUBST_STAGE.sa2= post-patch SUBST_FILES.sa2= README spamd/spamd.raw SUBST_SED.sa2= -e s!@@PREFIX@@!${PREFIX}!g \ - -e s!@PKG_SYSCONFDIR@!${PKG_SYSCONFDIR}!g \ - -e s!@SA_SSLCERTS@!${SA_SSLCERTS}!g + -e s!@PKG_SYSCONFDIR@!${PKG_SYSCONFDIR}!g SUBST_STAGE.sa3= post-patch -SUBST_FILES.sa3= INSTALL USAGE lib/Mail/SpamAssassin/Conf.pm \ - spamd/README.spamd spamd/README.spamd-vpopmail \ - sql/README +SUBST_FILES.sa3= INSTALL UPGRADE USAGE ldap/README \ + spamc/README.qmail \ + lib/Mail/SpamAssassin/Conf.pm spamd/README \ + spamd/README.vpopmail sql/README sql/README.awl SUBST_SED.sa3= -e s!/usr/share!${PREFIX}/share!g \ -e s!/usr/bin!${PREFIX}/bin!g \ + -e s!/usr/local/bin!${PREFIX}/bin!g \ -e s!/usr/lib!${PREFIX}/lib!g \ -e s!/etc/mail/spamassassin!${PKG_SYSCONFDIR}!g @@ -140,24 +118,19 @@ FILES_SUBST+= OPSYS="${OPSYS}" post-extract: @# correct bad SA permissions - @${CHMOD} a-x ${WRKSRC}/License - @${CHMOD} a-x ${WRKSRC}/lib/Mail/SpamAssassin/*.pm - @${CHMOD} a-x ${WRKSRC}/rules/20_uri_tests.cf - @${CHMOD} a+x ${WRKSRC}/masses/uniq-scores - @${CHMOD} a+x ${WRKSRC}/tools/translation_prep.pl + @${CHMOD} a+x ${WRKSRC}/tools/convert_awl_dbm_to_sql pre-configure: perl5-configure - -pre-install: - ${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM} -f + @# GNU configure needs version.h -> create it + @cd ${WRKSRC}/spamc && ${PERL5} ./version.h.pl post-install: @${TEST} -r ${PLIST_ADD} && ${RM} ${PLIST_ADD} ; : - @ # ninja image is in the static PLIST - @${INSTALL_DATA} ${WRKSRC}/ninjabutton.png ${HTMLDIR}/ -.for f in CONTRIB_CERT COPYRIGHT INSTALL License README TRADEMARK USAGE \ - sample-nonspam.txt sample-spam.txt spamd/README.spamd \ - spamd/README.spamd-vpopmail +.for f in INSTALL LICENSE README TRADEMARK UPGRADE USAGE \ + CREDITS PACKAGING STATUS BUGS Changes \ + spamc/README.qmail \ + sample-nonspam.txt sample-spam.txt spamd/README \ + spamd/README.vpopmail @${INSTALL_DATA} ${WRKSRC}/$f ${DOCDIR}/$f @${ECHO} "${DOC_SUBDIR}/$f" >> ${PLIST_ADD} .endfor @@ -166,17 +139,12 @@ post-install: @${INSTALL_DATA} ${WRKSRC}/rules/$f ${DOCDIR}/ @${ECHO} "${DOC_SUBDIR}/$f" >> ${PLIST_ADD} .endfor -.for DIR in masses qmail sql tools +.for DIR in masses sql ldap tools @cd ${WRKSRC}; \ for d in `${FIND} ${DIR} -type d -print`; do \ ${INSTALL_DATA_DIR} ${DOCDIR}/$$d; \ done; \ for f in `${FIND} ${DIR} -type f -print`; do \ - if ${TEST} -f $$f; then \ - : ; \ - else \ - continue; \ - fi; \ if ${TEST} -x $$f ; then \ ${SED} -e "1s,#!.*/bin/perl,#!${PERL5}," < $$f \ > $${f}.fixed && \ @@ -199,13 +167,14 @@ post-install: @${ECHO} "@dirrm ${RULE_SUBDIR}" >> ${PLIST_ADD} @# examples are in the static PLIST @${INSTALL_DATA} ${WRKSRC}/procmailrc.example ${EGDIR}/ + @${INSTALL_DATA} ${WRKSRC}/rules/init.pre ${EGDIR}/ @${INSTALL_DATA} ${WRKSRC}/rules/local.cf ${EGDIR}/ @${INSTALL_DATA} ${FILESDIR}/netbsd_lists.cf ${EGDIR}/ @${CHOWN} ${SHAREOWN} ${RULESDIR}/* @${CHGRP} ${SHAREGRP} ${RULESDIR}/* @${CHMOD} a=r ${RULESDIR}/* - @{ for d in ${INSTALLATION_DIRS}; do \ - ${ECHO} "@dirrm $$d"; \ + @{ for d in ${INSTALLATION_DIRS}; do \ + ${ECHO} "@dirrm $$d"; \ done; } | ${SORT} -r >> ${PLIST_ADD}; .include "../../lang/perl5/module.mk" diff --git a/mail/spamassassin/PLIST b/mail/spamassassin/PLIST index 5daf5762676..9450e57d899 100644 --- a/mail/spamassassin/PLIST +++ b/mail/spamassassin/PLIST @@ -1,11 +1,9 @@ -@comment $NetBSD: PLIST,v 1.14 2004/04/23 22:07:55 reed Exp $ +@comment $NetBSD: PLIST,v 1.15 2004/10/12 00:11:10 heinz Exp $ @comment Most of this PLIST is auto-generated; see Makefile. -share/doc/html/spamassassin/ninjabutton.png -@comment @dirrm share/doc/html/spamassassin +share/examples/spamassassin/init.pre share/examples/spamassassin/local.cf share/examples/spamassassin/netbsd_lists.cf share/examples/spamassassin/procmailrc.example share/spamassassin/languages share/spamassassin/triplets.txt share/spamassassin/user_prefs.template -@comment @dirrm share/examples/spamassassin diff --git a/mail/spamassassin/distinfo b/mail/spamassassin/distinfo index d307234a7be..157611094c4 100644 --- a/mail/spamassassin/distinfo +++ b/mail/spamassassin/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.23 2004/08/10 20:40:01 heinz Exp $ +$NetBSD: distinfo,v 1.24 2004/10/12 00:11:10 heinz Exp $ -SHA1 (Mail-SpamAssassin-2.64.tar.gz) = 7d5776a7c462c849bc48f12a48ed82dc929ac06f -Size (Mail-SpamAssassin-2.64.tar.gz) = 826989 bytes -SHA1 (patch-ab) = 655f860a71fd6a1b7adb2cb5194fc9563ead9529 -SHA1 (patch-ae) = 681f777fb9967d61b9886e10046258657f4f492a -SHA1 (patch-ak) = 815602ef71c8e01e4cfc2b51a7ac3f2676bc0ecc -SHA1 (patch-al) = 75c22289726d3c7e39834cd164ca9f2220969e9e -SHA1 (patch-aq) = 4ecd178997dc7060099ddde6b606cc9e2c0addeb +SHA1 (Mail-SpamAssassin-3.0.0.tar.gz) = d52c317483483874f2b7e5dd544094249bedbdad +Size (Mail-SpamAssassin-3.0.0.tar.gz) = 1072046 bytes +SHA1 (patch-ab) = 09c57aa31e4f82c90cbbaac637fcbed1c730f0aa +SHA1 (patch-ae) = 26c0589002413030bbfbb31069c82007b8fd0cf5 +SHA1 (patch-aq) = 04c46e41dc008bc3bde5bebef33174305fcf7b89 +SHA1 (patch-au) = bc3f794596ef9d9608f7bf9646c572ce5a2a4ff8 +SHA1 (patch-av) = 4b19e112ec572543d5ac6ceacdf8c2af0a4f4e44 +SHA1 (patch-aw) = b08f22607ce805e5e04718979f6cf57fce43e70f diff --git a/mail/spamassassin/options.mk b/mail/spamassassin/options.mk new file mode 100644 index 00000000000..9dff19bbe87 --- /dev/null +++ b/mail/spamassassin/options.mk @@ -0,0 +1,88 @@ +# $NetBSD: options.mk,v 1.1 2004/10/12 00:11:10 heinz Exp $ + +# Global and legacy options +.if defined(SPAMASSASSIN_USE_SSL) && !empty(SPAMASSASSIN_USE_SSL:M[yY][eE][sS]) +PKG_DEFAULT_OPTIONS+= ssl +.endif +.if defined(SPAMASSASSIN_RAZOR_TESTS) && !empty(SPAMASSASSIN_RAZOR_TESTS:M[yY][eE][sS]) +PKG_DEFAULT_OPTIONS+= net-tests +.endif +.if defined(SPAMASSASSIN_PERL_WARNINGS) && !empty(SPAMASSASSIN_PERL_WARNINGS:M[yY][eE][sS]) +PKG_DEFAULT_OPTIONS+= perl-warnings +.endif +.if defined(SPAMASSASSIN_PERL_TAINT_CHECKS) && !empty(SPAMASSASSIN_PERL_TAINT_CHECKS:M[yY][eE][sS]) +PKG_DEFAULT_OPTIONS+= perl-taint-checks +.endif + +PKG_OPTIONS_VAR= PKG_OPTIONS.spamassassin +PKG_SUPPORTED_OPTIONS= ssl net-tests perl-warnings perl-taint-checks \ + awl-sql-tests bayes-sql-tests +# +# Default options +# +PKG_OPTIONS.spamassassin?= perl-taint-checks perl-warnings ssl +.include "../../mk/bsd.options.mk" + +# +# Build spamc and spamd with support for connections over SSL +# +.if !empty(PKG_OPTIONS:Mssl) +. include "../../security/openssl/buildlink3.mk" +DEPENDS+= p5-IO-Socket-SSL>=0.92:../../security/p5-IO-Socket-SSL +CONFIGURE_ARGS+= --enable-ssl +MAKE_PARAMS+= ENABLE_SSL=yes +.else +CONFIGURE_ARGS+= --disable-ssl +MAKE_PARAMS+= ENABLE_SSL=no +.endif + +# +# Enable Internet based tests during 'make test' (Razor, Pyzor, etc.) +# +.if !empty(PKG_OPTIONS:Mnet-tests) +MAKE_PARAMS+= RUN_NET_TESTS=yes +.else +MAKE_PARAMS+= RUN_NET_TESTS=no +.endif + +# +# Enable Perl warnings in spamd and spamassassin +# +.if !empty(PKG_OPTIONS:Mperl-warnings) +MAKE_PARAMS+= PERL_WARN=yes +.else +MAKE_PARAMS+= PERL_WARN=no +.endif + +# +# Enable Perl taint checks in spamd and spamassassin to improve security +# +.if !empty(PKG_OPTIONS:Mperl-taint-checks) +MAKE_PARAMS+= PERL_TAINT=yes +.else +MAKE_PARAMS+= PERL_TAINT=no +.endif + +# +# Enable tests of the SQL storage module for the automatic whitelist +# (AWL). This option enables interactive questions about the database +# configuration during 'configure' phase. +# +.if !empty(PKG_OPTIONS:Mawl-sql-tests) +MAKE_PARAMS+= RUN_AWL_SQL_TESTS=yes +INTERACTIVE_STAGE+= configure +.else +MAKE_PARAMS+= RUN_AWL_SQL_TESTS=no +.endif + +# +# Enable tests of the SQL storage module for Bayes information. +# This option enables interactive questions about the database +# configuration during 'configure' phase. +# +.if !empty(PKG_OPTIONS:Mbayes-sql-tests) +MAKE_PARAMS+= RUN_BAYES_SQL_TESTS=yes +INTERACTIVE_STAGE+= configure +.else +MAKE_PARAMS+= RUN_BAYES_SQL_TESTS=no +.endif diff --git a/mail/spamassassin/patches/patch-ab b/mail/spamassassin/patches/patch-ab index 6627324731c..2396914d51d 100644 --- a/mail/spamassassin/patches/patch-ab +++ b/mail/spamassassin/patches/patch-ab @@ -1,78 +1,101 @@ -$NetBSD: patch-ab,v 1.7 2004/01/21 22:19:30 heinz Exp $ +$NetBSD: patch-ab,v 1.8 2004/10/12 00:11:10 heinz Exp $ ---- Makefile.PL.orig Sun Nov 2 01:42:04 2003 +--- Makefile.PL.orig Fri Aug 27 18:37:35 2004 +++ Makefile.PL -@@ -95,7 +95,7 @@ sub yesno { +@@ -64,6 +64,8 @@ my @ATT_KEYS = ( + 'ENABLE_SSL', # Set to 'yes' to build spamc with SSL support. + 'CONTACT_ADDRESS', # To not ask for the contact address, use this. + 'RUN_NET_TESTS', # To not ask whether net tests should be run, use this. ++ 'RUN_AWL_SQL_TESTS', # To not ask whether sql tests for the awl should be run, use this ++ 'RUN_BAYES_SQL_TESTS',# To not ask whether sql tests for bayes should be run, use this + ); + +@@ -98,8 +100,10 @@ sub yesno { my %opt = ( + 'build_spamc' => undef, 'enable_ssl' => undef, - 'contact_address' => undef, + 'contact_address' => '@SA_CONTACT_ADDRESS@', - 'run_razor_tests' => undef, + 'run_net_tests' => undef, ++ 'run_awl_sql_tests' => undef, ++ 'run_bayes_sql_tests' => undef, 'destdir' => undef, '__cruft' => undef, -@@ -333,18 +333,20 @@ if (!defined $opt{'contact_address'}) { - } - $makefile{'macro'}{'CONTACT_ADDRESS'} = $opt{'contact_address'}; + 'ignore_cruft' => undef, +@@ -161,6 +165,7 @@ my %makefile = ( --if (!defined $opt{'run_razor_tests'}) { - my $got_razor2 = eval { require Razor2::Client::Agent }; + 'EXE_FILES' => [ + 'spamassassin', 'sa-learn', ++ 'spamc/qmail-spamc$(EXE_EXT)', + 'spamc/spamc$(EXE_EXT)', # must next to last one + 'spamd/spamd', # must be the last one + ], +@@ -357,14 +362,16 @@ else { + $makefile{'macro'}{'RUN_NET_TESTS'} = yesno($opt{'run_net_tests'}); - if ($got_razor2) { -- $opt{'run_razor_tests'} = prompt( -- "Run Razor v2 tests (these may fail due to network problems)? (y/n)", -- 'n' -- ); -- print "\n"; -+ if (!defined $opt{'run_razor_tests'}) { -+ $opt{'run_razor_tests'} = prompt( -+ "Run Razor v2 tests (these may fail due to network problems)? (y/n)", -+ 'n' -+ ); -+ print "\n"; -+ } -+ $opt{'run_razor_tests'} = bool($opt{'run_razor_tests'}); -+ $makefile{'macro'}{'TEST_RUN_RAZOR'} = yesno($opt{'run_razor_tests'}); - } --} --$opt{'run_razor_tests'} = bool($opt{'run_razor_tests'}); -+ - if ($opt{'run_razor_tests'}) { - open(FLAG, "> t/do_razor2"); - close(FLAG); -@@ -352,7 +354,6 @@ if ($opt{'run_razor_tests'}) { - else { - unlink("t/do_razor2"); + if (HAS_DBI) { +- $opt{'run_awl_sql_tests'} = prompt( +- "Run SQL-based Auto-whitelist tests during 'make test' (additional\n". +- "information required) (y/n)", "n"); +- print "\n"; +- +- $opt{'run_awl_sql_tests'} = bool($opt{'run_awl_sql_tests'}); ++ if (!defined $opt{'run_awl_sql_tests'}) { ++ $opt{'run_awl_sql_tests'} = prompt( ++ "Run SQL-based Auto-whitelist tests during 'make test' (additional\n". ++ "information required) (y/n)", "n"); ++ print "\n"; ++ } } --$makefile{'macro'}{'TEST_RUN_RAZOR'} = yesno($opt{'run_razor_tests'}); ++$opt{'run_awl_sql_tests'} = bool($opt{'run_awl_sql_tests'}); ++ + if ($opt{'run_awl_sql_tests'}) { + my $user_awl_dsn = prompt("SQL AWL DSN (user_awl_dsn): ", "dbi:mysql:spamassassin:localhost"); + my $user_awl_sql_username = prompt("SQL AWL DB username (user_awl_sql_username): ", ""); +@@ -387,14 +394,16 @@ else { + } - # Now dump the Makefile -@@ -745,7 +746,7 @@ sub MY::libscan { + if (HAS_DBI) { +- $opt{'run_bayes_sql_tests'} = prompt( +- "Run Bayes SQL storage tests during 'make test' (additional\n". +- "information required)? (y/n)", 'n'); +- print "\n"; +- +- $opt{'run_bayes_sql_tests'} = bool($opt{'run_bayes_sql_tests'}); ++ if (!defined $opt{'run_bayes_sql_tests'}) { ++ $opt{'run_bayes_sql_tests'} = prompt( ++ "Run Bayes SQL storage tests during 'make test' (additional\n". ++ "information required)? (y/n)", 'n'); ++ print "\n"; ++ } + } - return q{} if $path =~ m{ - (^|/)(\.svn|CVS)(/|$)| -- [/.](orig|old|rej|diff|patch|bak|backup|my)$ -+ [/.](orig|old|rej|diff|patch|bak|backup|my|subst.sav)$ - }ix; ++$opt{'run_bayes_sql_tests'} = bool($opt{'run_bayes_sql_tests'}); ++ + if ($opt{'run_bayes_sql_tests'}) { + my $bayes_sql_dsn = prompt("Bayes SQL DSN (bayes_sql_dsn): ", "dbi:mysql:spamassassin:localhost"); + my $bayes_sql_username = prompt("Bayes SQL DB username (bayes_sql_username): ", ""); +@@ -1121,17 +1130,18 @@ qmail/qmail-spamc$(EXE_EXT): spamc/qmail - clean_MY_globals($self); -@@ -965,15 +966,16 @@ spamd/binaries.mk: spamd/configure - cd spamd; ./configure --prefix="$(I_PREFIX)" --sysconfdir="$(I_SYSCONFDIR)" --datadir="$(I_DATADIR)" --enable-ssl="$(ENABLE_SSL)" conf__install: - -$(MKPATH) $(B_CONFDIR) - $(PERL) -MFile::Spec -MFile::Copy \ + -$(BSD_INSTALL_DATA_DIR) $(B_CONFDIR) -+ @ # manage local.cf through pkgsrc .mk files ++ @ # manage local.cf and init.pre through pkgsrc .mk files + @ # $(PERL) -MFile::Spec -MFile::Copy \ -e "copy(q{rules/local.cf}, q{$(B_CONFDIR)/local.cf}) unless -f q{$(B_CONFDIR)/local.cf};" +- $(PERL) -MFile::Spec -MFile::Copy \ ++ @ # $(PERL) -MFile::Spec -MFile::Copy \ + -e "copy(q{rules/init.pre}, q{$(B_CONFDIR)/init.pre}) unless -f q{$(B_CONFDIR)/init.pre};" data__install: - -$(MKPATH) $(B_DATADIR) + -$(BSD_INSTALL_DATA_DIR) $(B_DATADIR) $(PERL) -e "map unlink, <$(B_DATADIR)/*>" - $(PREPROCESS) $(FIXVARS) -m$(PERM_RW) -Irules -O$(B_DATADIR) $(RULES) + $(PREPROCESS) $(FIXVARS) -m$(PERM_RW) -Irules -O$(B_DATADIR) $(DATAFILES) - $(CHMOD) $(PERM_RWX) $(B_DATADIR) + @ # $(CHMOD) $(PERM_RWX) $(B_DATADIR) diff --git a/mail/spamassassin/patches/patch-ae b/mail/spamassassin/patches/patch-ae index 65aa4196f85..8613bcdc61f 100644 --- a/mail/spamassassin/patches/patch-ae +++ b/mail/spamassassin/patches/patch-ae @@ -1,40 +1,20 @@ -$NetBSD: patch-ae,v 1.8 2003/12/27 19:16:04 heinz Exp $ +$NetBSD: patch-ae,v 1.9 2004/10/12 00:11:10 heinz Exp $ ---- spamd/spamd.raw.orig Sat Nov 15 03:55:31 2003 +--- spamd/spamd.raw.orig Tue Sep 14 01:34:05 2004 +++ spamd/spamd.raw -@@ -208,8 +208,8 @@ if ($opt{'auth-ident'}) { - } - - # Check for server certs --$opt{'server-key'} ||= "$LOCAL_RULES_DIR/certs/server-key.pem"; --$opt{'server-cert'} ||= "$LOCAL_RULES_DIR/certs/server-cert.pem"; -+$opt{'server-key'} ||= "@SA_SSLCERTS@/server-key.pem"; -+$opt{'server-cert'} ||= "@SA_SSLCERTS@/server-cert.pem"; - if ($opt{'ssl'}) { - eval { require IO::Socket::SSL }; - die "fatal: SSL encryption requested, but IO::Socket::SSL is unavailable\n" if ($@); -@@ -1240,8 +1240,9 @@ sub restart_handler { - use POSIX 'setsid'; - sub daemonize - { -- # Pretty command line in ps -- $0 = join(' ', $ORIG_ARG0, @ORIG_ARGV) unless($opt{'debug'}); -+ # no pretty 'ps' command line (easier for NetBSD rc script) -+ # # Pretty command line in ps -+ # $0 = join(' ', $ORIG_ARG0, @ORIG_ARGV) unless($opt{'debug'}); - - # Be a nice daemon and chdir() to the root so we don't block any unmount attempts - chdir '/' or die "Can't chdir to /: $!\n"; -@@ -1360,7 +1361,7 @@ Options: - -a, --auto-whitelist, --whitelist Use auto-whitelists - -c, --create-prefs Create user preferences files - -C path, --configpath=path Path for default config files -- --siteconfigpath=path Path for site configs (def: /etc/mail/spamassassin) -+ --siteconfigpath=path Path for site configs (def: @@LOCAL_RULES_DIR@@) - -d, --daemonize Daemonize - -h, --help Print usage message. - -i ipaddr, --listen-ip=ipaddr,... Listen on the IP ipaddr (default: 127.0.0.1) -@@ -1435,12 +1436,12 @@ Create user preferences files if they do +@@ -1810,8 +1810,9 @@ sub restart_handler { + + sub daemonize { + +- # Pretty command line in ps +- $0 = join ( ' ', $ORIG_ARG0, @ORIG_ARGV ) unless ( $opt{'debug'} ); ++ # no pretty 'ps' command line (easier for NetBSD rc script) ++ # # Pretty command line in ps ++ # $0 = join ( ' ', $ORIG_ARG0, @ORIG_ARGV ) unless ( $opt{'debug'} ); + + # Be a nice daemon and chdir() to the root so we don't block any unmount attempts + chdir '/' or die "Can't chdir to /: $!\n"; +@@ -1987,12 +1988,12 @@ Create user preferences files if they do =item B<-C> I<path>, B<--configpath>=I<path> Use the specified path for locating the distributed configuration files. diff --git a/mail/spamassassin/patches/patch-ak b/mail/spamassassin/patches/patch-ak deleted file mode 100644 index 9c01ea5bfad..00000000000 --- a/mail/spamassassin/patches/patch-ak +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-ak,v 1.5 2003/12/27 19:16:04 heinz Exp $ - ---- lib/Mail/SpamAssassin/DBBasedAddrList.pm.orig Wed Nov 12 08:31:18 2003 -+++ lib/Mail/SpamAssassin/DBBasedAddrList.pm -@@ -5,7 +5,8 @@ use bytes; - use Fcntl; - - # tell AnyDBM_File to prefer DB_File, if possible. --# BEGIN { @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File SDBM_File); } -+# Pkgsrc: enable following line because BayesStore.pm already broke the rule -+BEGIN { @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File SDBM_File); } - # off until 3.0; there's lots of existing AWLs out there this breaks. - - use AnyDBM_File; diff --git a/mail/spamassassin/patches/patch-al b/mail/spamassassin/patches/patch-al deleted file mode 100644 index e1508aae325..00000000000 --- a/mail/spamassassin/patches/patch-al +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-al,v 1.4 2003/11/03 00:56:26 heinz Exp $ - ---- tools/check_whitelist.orig Thu Dec 19 20:05:01 2002 -+++ tools/check_whitelist -@@ -5,7 +5,8 @@ use Fcntl; - - # must match line at top of lib/Mail/SpamAssassin/DBBasedAddrList.pm. - # now off until 3.0 --# BEGIN { @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File SDBM_File); } -+# Pkgsrc: enable following line because BayesStore.pm already broke the rule -+BEGIN { @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File SDBM_File); } - - use AnyDBM_File ; - use vars qw( %h $k $v ) ; diff --git a/mail/spamassassin/patches/patch-aq b/mail/spamassassin/patches/patch-aq index cd4d8122bba..3ab7a8dd9cd 100644 --- a/mail/spamassassin/patches/patch-aq +++ b/mail/spamassassin/patches/patch-aq @@ -1,8 +1,8 @@ -$NetBSD: patch-aq,v 1.3 2004/05/31 12:43:06 heinz Exp $ +$NetBSD: patch-aq,v 1.4 2004/10/12 00:11:10 heinz Exp $ ---- README.orig Sun Jan 18 00:56:14 2004 +--- README.orig Thu Aug 5 22:04:10 2004 +++ README -@@ -116,30 +116,30 @@ Mail::SpamAssassin::Conf class (run the +@@ -76,30 +76,30 @@ Mail::SpamAssassin::Conf class (run the the standard defaults that people use. There is an explanation of all the default locations that SpamAssassin will look at the end. @@ -32,9 +32,9 @@ $NetBSD: patch-aq,v 1.3 2004/05/31 12:43:06 heinz Exp $ set defaults for users' preferences files. Takes precedence over the above prefs file, if it exists. - Do not put system-wide settings in here; put them in the -- /etc/mail/spamassassin directory. This file is just a template, -+ @PKG_SYSCONFDIR@ directory. This file is just a template, - which will be copied to a user's home directory for them to - change. + Do not put system-wide settings in here; put them in a file in the +- "/etc/mail/spamassassin" directory ending in ".cf". This file is ++ "@PKG_SYSCONFDIR@" directory ending in ".cf". This file is + just a template, which will be copied to a user's home directory + for them to change. diff --git a/mail/spamassassin/patches/patch-au b/mail/spamassassin/patches/patch-au new file mode 100644 index 00000000000..a832c78ecf5 --- /dev/null +++ b/mail/spamassassin/patches/patch-au @@ -0,0 +1,29 @@ +$NetBSD: patch-au,v 1.1 2004/10/12 00:11:10 heinz Exp $ + +--- t/dnsbl.t.orig Fri Aug 27 18:37:42 2004 ++++ t/dnsbl.t +@@ -5,14 +5,22 @@ use SATest; sa_t_init("dns"); + + use constant TEST_ENABLED => (-e 't/do_net' || -e 'do_net'); + use constant HAS_NET_DNS => eval { require Net::DNS; }; ++# Do not run this test on non-Linux unices as root, due to a bug ++# in Sys::Hostname::Long (which Net::DNS uses.) ++# See <http://bugzilla.spamassassin.org/show_bug.cgi?id=3806> ++use constant IS_LINUX => $^O eq 'linux'; ++use constant AM_ROOT => $< == 0; ++ ++use constant DO_RUN => TEST_ENABLED && HAS_NET_DNS && ++ !(AM_ROOT && !IS_LINUX); + + use Test; + + BEGIN { +- plan tests => ((TEST_ENABLED && HAS_NET_DNS) ? 22 : 0), ++ plan tests => (DO_RUN ? 22 : 0), + }; + +-exit unless (TEST_ENABLED && HAS_NET_DNS); ++exit unless (DO_RUN); + + # --------------------------------------------------------------------------- + # bind configuration currently used to support this test diff --git a/mail/spamassassin/patches/patch-av b/mail/spamassassin/patches/patch-av new file mode 100644 index 00000000000..0830758769b --- /dev/null +++ b/mail/spamassassin/patches/patch-av @@ -0,0 +1,29 @@ +$NetBSD: patch-av,v 1.1 2004/10/12 00:11:10 heinz Exp $ + +--- t/spf.t.orig Thu Sep 9 20:29:21 2004 ++++ t/spf.t +@@ -6,14 +6,22 @@ use Test; + + use constant TEST_ENABLED => (-e 't/do_net'); + use constant HAS_SPFQUERY => eval { require Mail::SPF::Query; }; ++# Do not run this test on non-Linux unices as root, due to a bug ++# in Sys::Hostname::Long (which Mail::Query::SPF uses.) ++use constant IS_LINUX => $^O eq 'linux'; ++use constant AM_ROOT => $< == 0; ++ ++use constant DO_RUN => TEST_ENABLED && HAS_SPFQUERY && ++ !(AM_ROOT && !IS_LINUX); ++ + + BEGIN { + +- plan tests => ((TEST_ENABLED && HAS_SPFQUERY) ? 2 : 0); ++ plan tests => (DO_RUN ? 2 : 0); + + }; + +-exit unless (TEST_ENABLED && HAS_SPFQUERY); ++exit unless (DO_RUN); + + # --------------------------------------------------------------------------- + diff --git a/mail/spamassassin/patches/patch-aw b/mail/spamassassin/patches/patch-aw new file mode 100644 index 00000000000..20954e9955d --- /dev/null +++ b/mail/spamassassin/patches/patch-aw @@ -0,0 +1,14 @@ +$NetBSD: patch-aw,v 1.1 2004/10/12 00:11:10 heinz Exp $ + +--- t/spamc_l.t.orig Fri Aug 27 18:37:38 2004 ++++ t/spamc_l.t +@@ -18,6 +18,8 @@ q{ spamc: connect(AF_INET) to spamd at 1 + ); + + # connect on port 9 (discard): should always fail +-ok (scrunwithstderr ("-l -p 9 < data/etc/hello.txt", \&patterns_run_cb)); ++# pkgsrc: port 8 is 'unassigned' according to IANA ++# see also http://bugzilla.spamassassin.org/show_bug.cgi?id=3747 ++ok (scrunwithstderr ("-l -p 8 < data/etc/hello.txt", \&patterns_run_cb)); + ok_all_patterns(); + |