summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorheinz <heinz@pkgsrc.org>2005-11-13 22:48:32 +0000
committerheinz <heinz@pkgsrc.org>2005-11-13 22:48:32 +0000
commitf33d7443655782645df6a64085edf439e76c170b (patch)
treebba2b60021fc1accf00de22bd143450a79c59774 /mail
parente1cfbd1de35d2eec96ac26609d963a8aae386954 (diff)
downloadpkgsrc-f33d7443655782645df6a64085edf439e76c170b.tar.gz
Updated to version 3.1.0.
Pkgsrc changes: - p5-Storable is no longer a necessary. - Let DragonFlyBSD also use the rc.d script (patch-ad). - Sa-update needs p5-libwww (for LWP::UserAgent, HTTP::Date), p5-Archive-Tar and p5-IO-Zlib. - Many of the plugins are available as pkgsrc packages (p5-Mail-SPF-Query, p5-IP-Country, p5-Net-Ident, ...) but are not required. - Renamed some options to follow the naming conventions described in the pkgsrc guide. - Removed patch-ax again; it is already incorporated in 3.1.0. - Reworked DESCR to use less than 25 lines. - Removed SPAMASSASSIN_VERSION for clarity of DISTNAME and PKGNAME. - Prepended variables internal to the package with an underscore. - Rearranged MAKE_PARAMS alphabetically. - Simplified some internal variables (concatenation instead of substitution: _EGDIR, _DOCDIR,...) - Loop variables use all lower-case now. - Added a rule to lower score for mail from pkgsrc-bugs in netbsd_lists.cf. - The test t/spf.t (fails for SPF_HELO_*) has a know problem (SA Bug 4685). Relevant changes since version 3.0.4: ===================================== - Apache preforking algorithm adopted; number of spamd child processes is now scaled, according to demand. This provides better VM behaviour when not under peak load. - Inclusion of sa-update script which will allow for updates of rules and scores in between code releases. - added PostgreSQL, MySQL 4.1+, and local SDBM file Bayes storage modules. SQL storage is now recommended for Bayes, instead of DB_File. NDBM_File support has been dropped due to a major bug in that module. - detect legitimate SMTP AUTH submission, to avoid false positives on Dynablock-style rules. - new Advance Fee Fraud (419 scam) rules. - removed use of the Storable module, due to several reported hangs on SMP Linux machines. - Converted several rule/engine components into Plugins such as: AccessDB, AWL, Pyzor, Razor2, DCC, Bayes AutoLearn Determination, etc. - new plugins: DomainKeys (off by default), MIMEHeader: a new plugin to perform tests against header in internal MIME structure, ReplaceTags: plugin by Felix Bauer to support fuzzy text matching, WhiteListSubject: plugin added to support user whitelists by Subject header. - TextCat language guesser moved to a plugin. (This means "ok_languages" is no longer part of the core engine by default.) - Razor: disable Razor2 support by default per our policy, since the service is not free for non-personal use. It's trivial to reenable. - DCC: disable DCC for similar reasons, due to new license terms. - Net::DNS bug: high load caused answer packets to be mixed up and delivered as answers to the wrong request, causing false positives. worked around. - DNSBL lookups and other DNS operations are now more efficient, by using a custom single-socket event-based model instead of Net::DNS. - add support for accreditation services, including Habeas v2. - better URI parsing -- many evasion tricks now caught. - URIBL lookups are prioritized based on the location in the message the URI was found. - mass-check now supports reusing realtime DNSBL hit results, and sample-based Bayes autolearning emulation, to reduce complexity. - sa-learn, spamassassin and mass-check now have optional progress bars. - modify header ordering for DomainKeys compatibility, by placing markup headers at the top of the message instead at the bottom of the list. - spamd/spamc now support remote Bayes training, and reporting spam. - spamc now supports reading its flags from a configuration file using the -F switch, contributed by John Madden. - added SPF-based whitelisting. - Polish rules contributed by Radoslaw Stachowiak. - many rule changes and additions.
Diffstat (limited to 'mail')
-rw-r--r--mail/spamassassin/DESCR35
-rw-r--r--mail/spamassassin/MESSAGE14
-rw-r--r--mail/spamassassin/Makefile129
-rw-r--r--mail/spamassassin/PLIST3
-rw-r--r--mail/spamassassin/distinfo15
-rw-r--r--mail/spamassassin/files/netbsd_lists.cf22
-rw-r--r--mail/spamassassin/options.mk100
-rw-r--r--mail/spamassassin/patches/patch-ab102
-rw-r--r--mail/spamassassin/patches/patch-ad55
-rw-r--r--mail/spamassassin/patches/patch-ae20
-rw-r--r--mail/spamassassin/patches/patch-aq32
-rw-r--r--mail/spamassassin/patches/patch-ax13
12 files changed, 304 insertions, 236 deletions
diff --git a/mail/spamassassin/DESCR b/mail/spamassassin/DESCR
index 7f9a612cf53..a4e468c546f 100644
--- a/mail/spamassassin/DESCR
+++ b/mail/spamassassin/DESCR
@@ -1,23 +1,24 @@
-SpamAssassin is a mail filter to identify spam.
+SpamAssassin is a mail filter to identify spam. It will examine
+each message presented to it, and assign a score indicating the
+likelihood that the mail is spam.
-Using its rule base, it uses a wide range of heuristic tests on mail
-headers and body text to identify "spam", also known as unsolicited
-commercial email.
-Once identified, the mail can then be optionally tagged as spam for
-later filtering using the user's own mail user-agent application.
+It applies a wide range of heuristic tests on mail headers and body text
+to identify "spam", also known as unsolicited commercial email. The mail
+can then be optionally tagged as spam for later filtering.
-The spam-identification tactics used include header analysis, text
-analysis, a Bayesian-style form of probability-analysis classification,
-blacklists and Razor.
+The spam-identification tactics used include header analysis, text analysis,
+a Bayesian-style form of probability-analysis classification and DNS
+blacklists. It also includes plugins to support reporting spam messages to
+collaborative filtering databases such as Pyzor, DCC, and Vipul's Razor.
-The distribution provides a command line tool to perform filtering,
-along with Mail::SpamAssassin, a set of perl modules which implement a
-Mail::Audit plugin, allowing SpamAssassin to be used in a Mail::Audit
-filter.
-In addition, there is "spamd", a persistently running, daemonized
-version of the command line tool "spamassassin". Together with the small
-client "spamc" this allows processing of large volumes of mail without
-the cost of starting the perl interpreter for each one.
+The distribution provides a command line tool to perform filtering, along
+with a set of perl modules which allows SpamAssassin to be used in a
+variety of different spam-blocking scenarios.
+
+In addition, "spamd", a daemonized version of SpamAssassin which runs
+persistently, is available. Using its counterpart, "spamc", a lightweight
+client written in C, an MTA can process large volumes of mail through
+SpamAssassin without having to fork/exec a perl interpreter for each message.
SpamAssassin does not deliver mail to the users mailbox. You need a
different program (procmail is recommended) for local mail delivery.
diff --git a/mail/spamassassin/MESSAGE b/mail/spamassassin/MESSAGE
index ebe1f103c3a..487a16d72ae 100644
--- a/mail/spamassassin/MESSAGE
+++ b/mail/spamassassin/MESSAGE
@@ -1,13 +1,15 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.9 2004/10/12 00:11:10 heinz Exp $
+$NetBSD: MESSAGE,v 1.10 2005/11/13 22:48:32 heinz Exp $
-If you upgrade from an earlier version please take a look at the file
+If you upgrade from an earlier version *PLEASE* take a look at the file
UPGRADE in
${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.
+Some configuration options were changed and some features are now provided
+by plugins (they may not be enabled after installation).
+
+For more information see 'perldoc Mail::SpamAssassin::Conf' and the man
+pages for 'spamassassin', 'spamd'/'spamc', 'sa-learn' and 'sa-update'.
+Please check that your existing mail configuration still works.
===========================================================================
diff --git a/mail/spamassassin/Makefile b/mail/spamassassin/Makefile
index 1a2fc76c961..475ce754875 100644
--- a/mail/spamassassin/Makefile
+++ b/mail/spamassassin/Makefile
@@ -1,12 +1,10 @@
-# $NetBSD: Makefile,v 1.61 2005/11/13 05:08:00 heinz Exp $
+# $NetBSD: Makefile,v 1.62 2005/11/13 22:48:32 heinz Exp $
-DISTNAME= Mail-SpamAssassin-${SPAMASSASSIN_VERSION}
-PKGNAME= spamassassin-${SPAMASSASSIN_VERSION}
-PKGREVISION= 2
+DISTNAME= Mail-SpamAssassin-3.1.0
+PKGNAME= spamassassin-3.1.0
SVR4_PKGNAME= sa
CATEGORIES= mail perl5
-MASTER_SITES= ${MASTER_SITE_APACHE:=spamassassin/source/} \
- http://spamassassin.apache.org/released/
+MASTER_SITES= ${MASTER_SITE_APACHE:=spamassassin/source/}
MAINTAINER= heinz@NetBSD.org
HOMEPAGE= http://spamassassin.apache.org/
@@ -18,17 +16,18 @@ 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,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-libwww-[0-9]*:../../www/p5-libwww
+DEPENDS+= p5-Archive-Tar-[0-9]*:../../archivers/p5-Archive-Tar
+DEPENDS+= p5-IO-Zlib-[0-9]*:../../devel/p5-IO-Zlib
+
+.if (${OPSYS} != "NetBSD") && (${OPSYS} != "DragonFly")
DEPENDS+= p5-DB_File-[0-9]*:../../databases/p5-DB_File
.endif
-CONFLICTS= p5-Mail-SpamAssassin-[1-9]*
+CONFLICTS= p5-Mail-SpamAssassin-[1-9]*
PKG_INSTALLATION_TYPES= overwrite pkgviews
-SPAMASSASSIN_VERSION= 3.0.4
-
WRKSRC= ${WRKDIR}/${DISTNAME}
USE_PKGINSTALL= YES
@@ -53,28 +52,33 @@ BUILD_DIRS= ${WRKSRC}
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}"
+# test t/meta needs this
+REPLACE_PERL= masses/parse-rules-for-masses
+
MAKE_PARAMS+= CONTACT_ADDRESS=${SPAMASSASSIN_CONTACT_ADDRESS:Q}
+MAKE_PARAMS+= DEFRULESDIR="${_RULESDIR}"
+MAKE_PARAMS+= LOCALRULESDIR="${PKG_SYSCONFDIR}"
+MAKE_PARAMS+= PERL_BIN="${PERL5}"
+MAKE_PARAMS+= SYSCONFDIR="${PKG_SYSCONFDIR}"
RCD_SCRIPTS= spamd
RCD_SCRIPT_SRC.spamd= ${WRKSRC}/spamd/netbsd-rc-script.sh
-EGDIR= ${PREFIX}/share/examples/spamassassin
-EG_SUBDIR= ${EGDIR:S,^${PREFIX}/,,}
-DOCDIR= ${PREFIX}/share/doc/spamassassin
-DOC_SUBDIR= ${DOCDIR:S,^${PREFIX}/,,}
-RULESDIR= ${PREFIX}/share/spamassassin
-RULE_SUBDIR= ${RULESDIR:S,^${PREFIX}/,,}
+_EG_SUBDIR= share/examples/spamassassin
+_EGDIR= ${PREFIX}/${_EG_SUBDIR}
+_DOC_SUBDIR= share/doc/spamassassin
+_DOCDIR= ${PREFIX}/${_DOC_SUBDIR}
+_RULE_SUBDIR= share/spamassassin
+_RULESDIR= ${PREFIX}/${_RULE_SUBDIR}
-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
+CONF_FILES+= ${_EGDIR}/local.cf ${PKG_SYSCONFDIR}/local.cf \
+ ${_EGDIR}/init.pre ${PKG_SYSCONFDIR}/init.pre \
+ ${_EGDIR}/v310.pre ${PKG_SYSCONFDIR}/v310.pre \
+ ${_RULESDIR}/user_prefs.template \
+ ${PKG_SYSCONFDIR}/user_prefs.template
-INSTALLATION_DIRS+= ${EG_SUBDIR} ${DOC_SUBDIR} ${DOC_SUBDIR}/spamc \
- ${DOC_SUBDIR}/spamd
+INSTALLATION_DIRS+= ${_EG_SUBDIR} ${_DOC_SUBDIR} ${_DOC_SUBDIR}/spamc\
+ ${_DOC_SUBDIR}/spamd
SUBST_CLASSES+= sa2 sa3
@@ -86,25 +90,27 @@ SUBST_SED.sa2= -e s!@@PREFIX@@!${PREFIX}!g \
SUBST_STAGE.sa3= pre-configure
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
+ lib/Mail/SpamAssassin/Conf.pm \
+ lib/Mail/SpamAssassin/Plugin/Test.pm \
+ spamd/README spamd/README.vpopmail sql/README \
+ sql/README.awl sa-update.raw
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
-.if ${OPSYS} == "NetBSD"
+.if (${OPSYS} == "NetBSD") || (${OPSYS} == "DragonFly")
# the 'spamd' RCD_SCRIPT behaves differently if we run NetBSD 1.6 or later
-. if ${OS_VERSION:M1.[0-5]*}
-INTERPRETER_SUPPORT= NO
+. if (${OPSYS} == "NetBSD") && !empty(OS_VERSION:M1.[0-5]*)
+_INTERPRETER_SUPPORT= NO
. else
-INTERPRETER_SUPPORT= YES
+_INTERPRETER_SUPPORT= YES
. endif
.endif
-# These values are substituted into netbsd-rc-script.sh.
-FILES_SUBST+= INTERPRETER_SUPPORT="${INTERPRETER_SUPPORT}"
+# These variables are substituted in netbsd-rc-script.sh.
+FILES_SUBST+= _INTERPRETER_SUPPORT="${_INTERPRETER_SUPPORT}"
FILES_SUBST+= OPSYS="${OPSYS}"
post-extract:
@@ -114,56 +120,59 @@ post-extract:
pre-configure: perl5-configure
@# GNU configure needs version.h -> create it
@cd ${WRKSRC}/spamc && ${PERL5} ./version.h.pl
+ @# values will be set via the SUBST framework in options.mk
+ @${CP} ${WRKSRC}/t/config.dist ${WRKSRC}/t/config
post-install:
@${TEST} -r ${PLIST_ADD} && ${RM} ${PLIST_ADD} ; :
-.for f in INSTALL LICENSE README TRADEMARK UPGRADE USAGE \
- CREDITS PACKAGING STATUS BUGS Changes \
+.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}
+ @${INSTALL_DATA} ${WRKSRC}/${f} ${_DOCDIR}/${f}
+ @${ECHO} "${_DOC_SUBDIR}/${f}" >> ${PLIST_ADD}
.endfor
-.for f in STATISTICS.txt STATISTICS-set1.txt STATISTICS-set2.txt \
- STATISTICS-set3.txt
- @${INSTALL_DATA} ${WRKSRC}/rules/${f} ${DOCDIR}/
- @${ECHO} "${DOC_SUBDIR}/${f}" >> ${PLIST_ADD}
+.for f in STATISTICS-set0.txt STATISTICS-set1.txt STATISTICS-set2.txt \
+ STATISTICS-set3.txt
+ @${INSTALL_DATA} ${WRKSRC}/rules/${f} ${_DOCDIR}/
+ @${ECHO} "${_DOC_SUBDIR}/${f}" >> ${PLIST_ADD}
.endfor
-.for DIR in masses sql ldap tools
+.for dir in masses sql ldap tools
@cd ${WRKSRC}; \
- for d in `${FIND} ${DIR} -type d -print`; do \
- ${INSTALL_DATA_DIR} ${DOCDIR}/$$d; \
+ for d in `${FIND} ${dir} -type d -print`; do \
+ ${INSTALL_DATA_DIR} ${_DOCDIR}/$$d; \
done; \
- for f in `${FIND} ${DIR} -type f -print`; do \
+ for f in `${FIND} ${dir} -type f -print`; do \
if ${TEST} -x $$f ; then \
${SED} -e "1s,#!.*/bin/perl,#!${PERL5}," < $$f \
> $${f}.fixed && \
${MV} $${f}.fixed $$f && \
${CHMOD} +x $$f && \
- ${INSTALL_SCRIPT} $$f ${DOCDIR}/$$f; \
+ ${INSTALL_SCRIPT} $$f ${_DOCDIR}/$$f; \
else \
- ${INSTALL_DATA} $$f ${DOCDIR}/$$f; \
+ ${INSTALL_DATA} $$f ${_DOCDIR}/$$f; \
fi; \
- ${ECHO} "${DOC_SUBDIR}/$$f" >> ${PLIST_ADD}; \
+ ${ECHO} "${_DOC_SUBDIR}/$$f" >> ${PLIST_ADD}; \
done; \
- { for d in `${FIND} ${DIR} -type d -print`; do \
- ${ECHO} "@dirrm ${DOC_SUBDIR}/$$d"; \
+ { for d in `${FIND} ${dir} -type d -print`; do \
+ ${ECHO} "@dirrm ${_DOC_SUBDIR}/$$d"; \
done; } | ${SORT} -r >> ${PLIST_ADD};
.endfor
@cd ${WRKSRC}/rules; \
for f in [0-9]*.cf; do \
- ${ECHO} "${RULE_SUBDIR}/$$f" >> ${PLIST_ADD}; \
+ ${ECHO} "${_RULE_SUBDIR}/$$f" >> ${PLIST_ADD}; \
done
- @${ECHO} "@dirrm ${RULE_SUBDIR}" >> ${PLIST_ADD}
+ @${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}/*
+ @${INSTALL_DATA} ${WRKSRC}/procmailrc.example ${_EGDIR}/
+ @${INSTALL_DATA} ${WRKSRC}/rules/init.pre ${_EGDIR}/
+ @${INSTALL_DATA} ${WRKSRC}/rules/v310.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"; \
done; } | ${SORT} -r >> ${PLIST_ADD};
diff --git a/mail/spamassassin/PLIST b/mail/spamassassin/PLIST
index c559602e71f..e53b361c9bd 100644
--- a/mail/spamassassin/PLIST
+++ b/mail/spamassassin/PLIST
@@ -1,10 +1,11 @@
-@comment $NetBSD: PLIST,v 1.16 2005/05/02 20:34:01 reed Exp $
+@comment $NetBSD: PLIST,v 1.17 2005/11/13 22:48:32 heinz Exp $
@comment Most of this PLIST is auto-generated; see Makefile.
share/examples/rc.d/spamd
share/examples/spamassassin/init.pre
share/examples/spamassassin/local.cf
share/examples/spamassassin/netbsd_lists.cf
share/examples/spamassassin/procmailrc.example
+share/examples/spamassassin/v310.pre
share/spamassassin/languages
share/spamassassin/triplets.txt
share/spamassassin/user_prefs.template
diff --git a/mail/spamassassin/distinfo b/mail/spamassassin/distinfo
index 43f6081db0e..47b396a9ca4 100644
--- a/mail/spamassassin/distinfo
+++ b/mail/spamassassin/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.31 2005/11/13 05:08:00 heinz Exp $
+$NetBSD: distinfo,v 1.32 2005/11/13 22:48:32 heinz Exp $
-SHA1 (Mail-SpamAssassin-3.0.4.tar.gz) = df37b629ab7b8a3fbb370c16537c59749eac1927
-RMD160 (Mail-SpamAssassin-3.0.4.tar.gz) = a2c975585f20cd9dba09b645ef69993faed17fb4
-Size (Mail-SpamAssassin-3.0.4.tar.gz) = 1001430 bytes
-SHA1 (patch-ab) = 36280764366900829205be94466a77662c422524
-SHA1 (patch-ae) = 7d57eb154af72ea82cb8fdafd7277823e33b7dd5
-SHA1 (patch-aq) = c918a738e0c7048183f5efbb0b7265d355ded7b3
+SHA1 (Mail-SpamAssassin-3.1.0.tar.gz) = d887cbae5962cb03e45aaf71cd93881a27cccc99
+RMD160 (Mail-SpamAssassin-3.1.0.tar.gz) = 20dc1b8befcc72545b6136e58a9fcce143480ccd
+Size (Mail-SpamAssassin-3.1.0.tar.gz) = 1185499 bytes
+SHA1 (patch-ab) = e1cebc78255d3a72b75b2494f6539957742b0cea
+SHA1 (patch-ad) = 1949ac07780ed2c10cdff77ce2ac9982d18a9559
+SHA1 (patch-ae) = 1461b24978c75c394c607ae1d49cb49dd086b563
+SHA1 (patch-aq) = 495a3ac94a05129520e5d7018fdd56b6dad3c951
SHA1 (patch-ax) = d874d0b0b03a90e2db1242ec6c2f99f60452abc4
diff --git a/mail/spamassassin/files/netbsd_lists.cf b/mail/spamassassin/files/netbsd_lists.cf
index 5d618fea705..150e2256cfd 100644
--- a/mail/spamassassin/files/netbsd_lists.cf
+++ b/mail/spamassassin/files/netbsd_lists.cf
@@ -1,4 +1,4 @@
-# $NetBSD: netbsd_lists.cf,v 1.2 2005/04/29 08:48:40 heinz Exp $
+# $NetBSD: netbsd_lists.cf,v 1.3 2005/11/13 22:48:32 heinz Exp $
#
# Rules to minimize false positives of NetBSD related emails
@@ -11,14 +11,26 @@
#
#
-# netbsd-bugs@netbsd.org
# compensate for problem reports with confusing content for SpamAssassin
+#
+
+header __PR_SUBJECT Subject =~ /\b(?:bin|install|kern|lib|misc|pkg|port-[a-z][a-z0-9]{1,15}|pr|security|standards|toolchain|xsrc|y2k)\/\d{4,6}\b/i
+header __NETBSD_RCVD Received =~ /\bby\s+(?:mail|narn)\.netbsd\.org\b/i
-header __NETBSD_PR_SUBJECT Subject =~ /\b(?:bin|install|kern|lib|misc|pkg|port-[a-z][a-z0-9]{1,15}|pr|security|standards|toolchain|xsrc|y2k)\/\d{4,6}\b/i
+# PR to netbsd-bugs@NetBSD.org
+#
header __NETBSD_BUGS_SENDER Sender =~ /\bnetbsd-bugs-owner\@netbsd\.org\b/i
-header __NETBSD_RCVD Received =~ /\bby\s+(?:mail|narn)\.netbsd\.org\b/i
header __NETBSD_BUGS_DELIVERED Delivered-To =~ /\bnetbsd-bugs\@netbsd\.org\b/i
-meta NETBSD_PR (__NETBSD_PR_SUBJECT && __NETBSD_BUGS_SENDER && __NETBSD_RCVD && __NETBSD_BUGS_DELIVERED)
+meta NETBSD_PR (__PR_SUBJECT && __NETBSD_RCVD && __NETBSD_BUGS_SENDER && __NETBSD_BUGS_DELIVERED)
describe NETBSD_PR Problem report or comment on the netbsd-bugs list
score NETBSD_PR -2.5
+
+# PR to pkgsrc-bugs@NetBSD.org
+#
+header __PKGSRC_BUGS_SENDER Sender =~ /\bpkgsrc-bugs-owner\@netbsd\.org\b/i
+header __PKGSRC_BUGS_DELIVERED Delivered-To =~ /\bpkgsrc-bugs\@netbsd\.org\b/i
+
+meta PKGSRC_PR (__PR_SUBJECT && __NETBSD_RCVD && __PKGSRC_BUGS_SENDER && __PKGSRC_BUGS_DELIVERED)
+describe PKGSRC_PR Problem report or comment on the pkgsrc-bugs list
+score PKGSRC_PR -2.5
diff --git a/mail/spamassassin/options.mk b/mail/spamassassin/options.mk
index ccd157361ed..df04988a21f 100644
--- a/mail/spamassassin/options.mk
+++ b/mail/spamassassin/options.mk
@@ -1,37 +1,76 @@
-# $NetBSD: options.mk,v 1.3 2005/11/04 17:20:09 rillig Exp $
+# $NetBSD: options.mk,v 1.4 2005/11/13 22:48:32 heinz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.spamassassin
-PKG_SUPPORTED_OPTIONS= ssl net-tests perl-warnings perl-taint-checks \
- awl-sql-tests bayes-sql-tests
-PKG_SUGGESTED_OPTIONS= perl-taint-checks perl-warnings ssl
+PKG_SUPPORTED_OPTIONS= \
+ spamassassin-perl-warnings \
+ spamassassin-taint-checks \
+ spamassassin-test-awl-sql \
+ spamassassin-test-bayes-sql \
+ spamassassin-test-net \
+ spamassassin-test-prefork \
+ ssl
+PKG_OPTIONS_LEGACY_OPTS+= \
+ awl-sql-tests:spamassassin-test-awl-sql \
+ bayes-sql-tests:spamassassin-test-bayes-sql \
+ net-tests:spamassassin-test-net \
+ perl-taint-checks:spamassassin-taint-checks \
+ perl-warnings:spamassassin-perl-warnings
+
+#
+# Default options
+#
+PKG_SUGGESTED_OPTIONS= spamassassin-taint-checks \
+ spamassassin-perl-warnings \
+ ssl
.include "../../mk/bsd.options.mk"
#
-# Build spamc and spamd with support for connections over SSL
+# change t/config according to all the options
#
-.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
+SUBST_CLASSES+= satests
+SUBST_STAGE.satests= post-configure
+SUBST_FILES.satests= t/config
+SUBST_SED.satests= \
+ -e s!awl_sql_tests=n!awl_sql_tests=${_AWL_SQL_TEST}! \
+ -e s!bayes_sql_tests=n!bayes_sql_tests=${_BAYES_SQL_TEST}! \
+ -e s!run_net_tests=n!run_net_tests=${_NET_TEST}! \
+ -e s!prefork_stress_test=n!prefork_stress_test=${_PREFORK_TEST}!
+
+#
+# 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:Mspamassassin-test-awl-sql)
+_AWL_SQL_TEST=y
.else
-CONFIGURE_ARGS+= --disable-ssl
-MAKE_PARAMS+= ENABLE_SSL=no
+_AWL_SQL_TEST=n
+.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:Mspamassassin-test-bayes-sql)
+_BAYES_SQL_TEST=y
+.else
+_BAYES_SQL_TEST=n
.endif
#
# Enable Internet based tests during 'make test' (Razor, Pyzor, etc.)
#
-.if !empty(PKG_OPTIONS:Mnet-tests)
-MAKE_PARAMS+= RUN_NET_TESTS=yes
+.if !empty(PKG_OPTIONS:Mspamassassin-test-net)
+_NET_TEST=y
.else
-MAKE_PARAMS+= RUN_NET_TESTS=no
+_NET_TEST=n
.endif
#
# Enable Perl warnings in spamd and spamassassin
#
-.if !empty(PKG_OPTIONS:Mperl-warnings)
+.if !empty(PKG_OPTIONS:Mspamassassin-perl-warnings)
MAKE_PARAMS+= PERL_WARN=yes
.else
MAKE_PARAMS+= PERL_WARN=no
@@ -40,32 +79,31 @@ MAKE_PARAMS+= PERL_WARN=no
#
# Enable Perl taint checks in spamd and spamassassin to improve security
#
-.if !empty(PKG_OPTIONS:Mperl-taint-checks)
+.if !empty(PKG_OPTIONS:Mspamassassin-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.
+# Enable spamd prefork stress test (will kill any processes containing the
+# string 'spam child' in their process title).
#
-.if !empty(PKG_OPTIONS:Mawl-sql-tests)
-MAKE_PARAMS+= RUN_AWL_SQL_TESTS=yes
-INTERACTIVE_STAGE+= configure
+.if !empty(PKG_OPTIONS:Mspamassassin-test-prefork)
+_PREFORK_TEST=y
.else
-MAKE_PARAMS+= RUN_AWL_SQL_TESTS=no
+_PREFORK_TEST=n
.endif
#
-# Enable tests of the SQL storage module for Bayes information.
-# This option enables interactive questions about the database
-# configuration during 'configure' phase.
+# Build spamc and spamd with support for connections over SSL
#
-.if !empty(PKG_OPTIONS:Mbayes-sql-tests)
-MAKE_PARAMS+= RUN_BAYES_SQL_TESTS=yes
-INTERACTIVE_STAGE+= configure
+.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
-MAKE_PARAMS+= RUN_BAYES_SQL_TESTS=no
+CONFIGURE_ARGS+= --disable-ssl
+MAKE_PARAMS+= ENABLE_SSL=no
.endif
diff --git a/mail/spamassassin/patches/patch-ab b/mail/spamassassin/patches/patch-ab
index 3890b5f857c..516e161acb9 100644
--- a/mail/spamassassin/patches/patch-ab
+++ b/mail/spamassassin/patches/patch-ab
@@ -1,92 +1,28 @@
-$NetBSD: patch-ab,v 1.10 2005/02/13 21:20:25 heinz Exp $
+$NetBSD: patch-ab,v 1.11 2005/11/13 22:48:32 heinz Exp $
---- Makefile.PL.orig Fri Oct 22 17:21:08 2004
+--- Makefile.PL.orig Fri Aug 12 02:38:58 2005
+++ Makefile.PL
-@@ -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
- );
-
-
-@@ -100,6 +102,8 @@ my %opt = (
- 'enable_ssl' => undef,
- 'contact_address' => undef,
- 'run_net_tests' => undef,
-+ 'run_awl_sql_tests' => undef,
-+ 'run_bayes_sql_tests' => undef,
- 'destdir' => undef,
- '__cruft' => undef,
- 'ignore_cruft' => undef,
-@@ -161,6 +165,7 @@ my %makefile = (
-
- '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
- ],
-@@ -365,14 +370,16 @@ else {
- $makefile{'macro'}{'RUN_NET_TESTS'} = yesno($opt{'run_net_tests'});
-
- 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";
-+ }
- }
-
-+$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): ", "");
-@@ -395,14 +402,16 @@ else {
- }
-
- 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";
-+ }
- }
-
-+$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): ", "");
-@@ -1144,17 +1153,18 @@ qmail/qmail-spamc$(EXE_EXT): spamc/qmail
-
+@@ -158,6 +158,7 @@ my %makefile = (
+ 'spamassassin.raw' => 'spamassassin',
+ 'sa-learn.raw' => 'sa-learn',
+ 'sa-update.raw' => 'sa-update',
++ 'spamc/qmail-spamc.c' => 'spamc/qmail-spamc$(EXE_EXT)',
+ 'spamc/spamc.c' => 'spamc/spamc$(EXE_EXT)',
+ 'spamd/spamd.raw' => 'spamd/spamd',
+ },
+@@ -1087,16 +1088,17 @@ qmail/qmail-spamc$(EXE_EXT): spamc/qmail
+ # # $(SYMLINK) $(INST_SCRIPT)/sa-filter $(B_SCRIPTDIR)/spamassassin
conf__install:
- -$(MKPATH) $(B_CONFDIR)
-- $(PERL) -MFile::Spec -MFile::Copy \
+- $(PERL) -MFile::Copy -e "copy(q{rules/local.cf}, q{$(B_CONFDIR)/local.cf}) unless -f q{$(B_CONFDIR)/local.cf}"
+- $(PERL) -MFile::Copy -e "copy(q{rules/init.pre}, q{$(B_CONFDIR)/init.pre}) unless -f q{$(B_CONFDIR)/init.pre}"
+- $(PERL) -MFile::Copy -e "copy(q{rules/v310.pre}, q{$(B_CONFDIR)/v310.pre}) unless -f q{$(B_CONFDIR)/v310.pre}"
+ -$(BSD_INSTALL_DATA_DIR) $(B_CONFDIR)
-+ @ # 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};"
++ @ # manage local.cf and *.pre through pkgsrc .mk files
++ @ # $(PERL) -MFile::Copy -e "copy(q{rules/local.cf}, q{$(B_CONFDIR)/local.cf}) unless -f q{$(B_CONFDIR)/local.cf}"
++ @ # $(PERL) -MFile::Copy -e "copy(q{rules/init.pre}, q{$(B_CONFDIR)/init.pre}) unless -f q{$(B_CONFDIR)/init.pre}"
++ @ # $(PERL) -MFile::Copy -e "copy(q{rules/v310.pre}, q{$(B_CONFDIR)/v310.pre}) unless -f q{$(B_CONFDIR)/v310.pre}"
data__install:
- -$(MKPATH) $(B_DATADIR)
diff --git a/mail/spamassassin/patches/patch-ad b/mail/spamassassin/patches/patch-ad
new file mode 100644
index 00000000000..7389285b060
--- /dev/null
+++ b/mail/spamassassin/patches/patch-ad
@@ -0,0 +1,55 @@
+$NetBSD: patch-ad,v 1.7 2005/11/13 22:48:32 heinz Exp $
+
+--- spamd/netbsd-rc-script.sh.orig Sat Oct 23 01:39:18 2004
++++ spamd/netbsd-rc-script.sh
+@@ -9,7 +9,7 @@
+ # @PREFIX@/share/doc/spamassassin/spamd/README.spamd
+ # especially the section about security.
+
+-## only for NetBSD
++## only for DragonFlyBSD/NetBSD
+ # PROVIDE: spamd
+ # REQUIRE: LOGIN
+ # BEFORE: mail
+@@ -34,15 +34,17 @@ command_args="-d -r ${pidfile}"
+ extra_commands="reload"
+ sig_reload="HUP"
+
+-# default values, may be overridden on NetBSD by setting them in /etc/rc.conf
++# default values, may be overridden on NetBSD/DragonFlyBSD by setting them
++# in /etc/rc.conf
+ spamd_flags=${spamd_flags-"-H -c"}
+ spamd=${spamd:-NO}
+ spamd_fdlimit=${spamd_fdlimit-"128"}
+
+-OPSYS=@OPSYS@ # set during package build
+-INTERPRETER_SUPPORT=@INTERPRETER_SUPPORT@ # set during package build
++# both set during package build
++OPSYS=@OPSYS@
++_INTERPRETER_SUPPORT=@_INTERPRETER_SUPPORT@
+
+-# A default limit of 64 (at least on NetBSD) may be too low for many
++# A default limit of 64 on NetBSD may be too low for many
+ # people (eg with addional RBL rules)
+ SOFT_FDLIMIT=`ulimit -S -n`
+ HARD_FDLIMIT=`ulimit -H -n`
+@@ -96,8 +98,8 @@ spamd_reload()
+ kill -${sig_reload} ${the_spamd_pid}
+ }
+
+-if [ "${OPSYS}" = "NetBSD" ]; then
+- if checkyesno INTERPRETER_SUPPORT; then
++if [ "${OPSYS}" = "NetBSD" -o "${OPSYS}" = "DragonFly" ]; then
++ if checkyesno _INTERPRETER_SUPPORT; then
+ : # support for 'command_interpreter' was added in NetBSD 1.6
+ else
+ start_cmd="spamd_start"
+@@ -110,7 +112,7 @@ if [ "${OPSYS}" = "NetBSD" ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+
+-else # not NetBSD
++else # not NetBSD or DragonFlyBSD
+
+ if [ -f ${pidfile} ]; then
+ the_spamd_pid=`head -1 ${pidfile}`
diff --git a/mail/spamassassin/patches/patch-ae b/mail/spamassassin/patches/patch-ae
index 9e5980b20d9..0be53ad864a 100644
--- a/mail/spamassassin/patches/patch-ae
+++ b/mail/spamassassin/patches/patch-ae
@@ -1,20 +1,20 @@
-$NetBSD: patch-ae,v 1.10 2005/01/15 21:44:55 schmonz Exp $
+$NetBSD: patch-ae,v 1.11 2005/11/13 22:48:32 heinz Exp $
---- spamd/spamd.raw.orig 2004-10-22 11:21:26.000000000 -0400
+--- spamd/spamd.raw.orig Wed Sep 14 04:07:32 2005
+++ spamd/spamd.raw
-@@ -1811,8 +1811,9 @@ sub restart_handler {
+@@ -2073,8 +2073,9 @@ sub backtrace_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)
+- $0 = join (' ', $ORIG_ARG0, @ORIG_ARGV) unless would_log("dbg");
++ # no pretty 'ps' command line (easier for pkgsrc rc script)
+ # # Pretty command line in ps
-+ # $0 = join ( ' ', $ORIG_ARG0, @ORIG_ARGV ) unless ( $opt{'debug'} );
++ # $0 = join (' ', $ORIG_ARG0, @ORIG_ARGV) unless would_log("dbg");
- # 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";
-@@ -1988,12 +1989,12 @@ Create user preferences files if they do
+ # be a nice daemon and chdir to the root so we don't block any
+ # unmount attempts
+@@ -2273,12 +2274,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-aq b/mail/spamassassin/patches/patch-aq
index ba9debe2872..c1a5d7761f5 100644
--- a/mail/spamassassin/patches/patch-aq
+++ b/mail/spamassassin/patches/patch-aq
@@ -1,8 +1,8 @@
-$NetBSD: patch-aq,v 1.5 2005/01/15 21:44:55 schmonz Exp $
+$NetBSD: patch-aq,v 1.6 2005/11/13 22:48:32 heinz Exp $
---- README.orig 2004-10-22 11:21:14.000000000 -0400
+--- README.orig Wed Sep 14 04:07:32 2005
+++ README
-@@ -76,30 +76,30 @@ Mail::SpamAssassin::Conf class (run the
+@@ -99,18 +99,18 @@ 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.
@@ -19,6 +19,19 @@ $NetBSD: patch-aq,v 1.5 2005/01/15 21:44:55 schmonz Exp $
add local rules and scores to. Modifications here will be
appended to the config loaded from the above directory.
+- - /etc/mail/spamassassin/*.pre:
++ - @PKG_SYSCONFDIR@/*.pre:
+
+ Plugin control files, installed from the distribution. These are
+ used to control what plugins are loaded. Modifications here will
+@@ -119,22 +119,22 @@ default locations that SpamAssassin will
+
+ You want to modify these files if you want to load additional
+ plugins, or inhibit loading a plugin that is enabled by default.
+- If the files exist in /etc/mail/spamassassin, they will not
++ If the files exist in @PKG_SYSCONFDIR@, they will not
+ be overwritten during future installs.
+
- - /usr/share/spamassassin/user_prefs.template:
+ - @@PREFIX@@/share/spamassassin/user_prefs.template:
@@ -38,3 +51,16 @@ $NetBSD: patch-aq,v 1.5 2005/01/15 21:44:55 schmonz Exp $
just a template, which will be copied to a user's home directory
for them to change.
+@@ -187,6 +187,12 @@ These are:
+ /usr/local /usr/local/share/spamassassin /etc/mail/spamassassin
+ /opt/$DIR /opt/$DIR/share/spamassassin /etc/opt/mail/spamassassin
+ $DIR $DIR/share/spamassassin $DIR/etc/mail/spamassassin
++
++(Pkgsrc note: the pkgsrc build process used the following path names
++ __prefix__: @@PREFIX@@
++ __def_rules_dir__: @@PREFIX@@/share/spamassassin
++ __local_rules_dir__: @PKG_SYSCONFDIR@
++)
+
+ The files themselves are then looked for in these paths:
+
diff --git a/mail/spamassassin/patches/patch-ax b/mail/spamassassin/patches/patch-ax
deleted file mode 100644
index b1c0c26c2f9..00000000000
--- a/mail/spamassassin/patches/patch-ax
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ax,v 1.1 2005/11/13 05:08:00 heinz Exp $
-
---- lib/Mail/SpamAssassin/Message.pm.orig Mon Jun 6 03:31:23 2005
-+++ lib/Mail/SpamAssassin/Message.pm
-@@ -324,7 +324,7 @@ sub get_pristine_header {
- my ($self, $hdr) = @_;
-
- return $self->{pristine_headers} unless $hdr;
-- my(@ret) = $self->{pristine_headers} =~ /^(?:$hdr:[ \t]+(.*\n(?:\s+\S.*\n)*))/mig;
-+ my(@ret) = $self->{pristine_headers} =~ /^\Q$hdr\E:[ \t]+(.*?\n(?![ \t]))/smgi;
- if (@ret) {
- return wantarray ? @ret : $ret[-1];
- }