public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2016-06-04 15:35 Michael Orlitzky
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2016-06-04 15:35 UTC (permalink / raw
  To: gentoo-commits

commit:     19ff5b04b9db6b1319b35e9a6da3d26972bf04b5
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  4 15:13:03 2016 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Jun  4 15:29:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19ff5b04

mail-filter/spamassassin: new revision with LibreSSL and spamd fixes.

This new revision adds another patch for upstream bugs 7093/7199. The
sslv3 option for spamd didn't do what it was supposed to do, and
moreover, it broke LibreSSL which no longer supports SSLv3. The patch
removes the option and makes it an error. There is a simple fix for
users, to remove the --ssl-version option if they are using it. Thanks
to Reuben Farrelly for reporting the issue.

The second round of changes addresses a few old Gentoo bugs regarding
the spamd init scripts and configuration. First, the init script was
missing a call to "checkpath" to ensure that the PID file had some
place to live. That's now fixed. Second, it used to be the case that
some configuration was necessary if you opted to run spamd as a
non-root user. That is no longer the case, so all of the documentation
surrounding that issue has been removed, and the config/init scripts
greatly simplified. Finally, a SPAMD_TIMEOUT option was added to allow
spamd a little bit of time when restarting or shutting down.

Peter Gantner, Juan David Ibáñez Palomar, Marcin Mirosław, Frieder
Bürzele, and a few other people helped out on those bugs. Thanks!

Gentoo-Bug: 322025
Gentoo-Bug: 455604
Gentoo-Bug: 523960
Upstream-Bug: 7093
Upstream-Bug: 7199

Package-Manager: portage-2.2.28

 mail-filter/spamassassin/files/3.4.1-spamd.conf    |  25 ++
 mail-filter/spamassassin/files/3.4.1-spamd.init    |  56 +++++
 .../files/spamassassin-3.4.1-bug_7199.patch        | 280 +++++++++++++++++++++
 .../spamassassin/spamassassin-3.4.1-r5.ebuild      | 196 +++++++++++++++
 4 files changed, 557 insertions(+)

diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.conf b/mail-filter/spamassassin/files/3.4.1-spamd.conf
new file mode 100644
index 0000000..0cb7cbb
--- /dev/null
+++ b/mail-filter/spamassassin/files/3.4.1-spamd.conf
@@ -0,0 +1,25 @@
+# Config file for /etc/init.d/spamd
+#
+# ***WARNING***
+#
+# spamd was not designed to listed to an untrusted network. spamd
+# is vulnerable to DoS attacks (and eternal doom) if used to listen
+# to an untrusted network.
+#
+# ***WARNING***
+#
+
+# Additional options to pass to the spamd daemon. The spamd(1) man
+# page explains the available options. If you choose to listen on a
+# non-default interface, you will need to use OpenRC's "rc_need"
+# mechanism to ensure that your interface comes up before spamd
+# starts. The openrc-run(8) man page describes rc_need.
+SPAMD_OPTS="--max-children=5 --create-prefs --helper-home-dir"
+
+# Sets the 'nice' level of the spamd process.
+SPAMD_NICELEVEL=0
+
+# How long (in seconds) should we wait for spamd to stop after we've
+# asked it to? After this amount of time, if spamd is still running,
+# we will assume that it has failed to stop.
+SPAMD_TIMEOUT=15

diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.init b/mail-filter/spamassassin/files/3.4.1-spamd.init
new file mode 100644
index 0000000..7d2af81
--- /dev/null
+++ b/mail-filter/spamassassin/files/3.4.1-spamd.init
@@ -0,0 +1,56 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PIDDIR=/run/spamd
+PIDFILE=${PIDDIR}/spamd.pid
+
+extra_started_commands="reload"
+
+depend() {
+	before mta
+	use logger
+@USEPOSTGRES@	use postgresql
+@USEMYSQL@	use mysql
+}
+
+start() {
+	ebegin "Starting spamd"
+
+	# Ensure that the PID file's directory exists.
+	checkpath --directory "${PIDDIR}"
+
+	# Reloading spamd causes its PID to change, so we track it by
+	# name instead.
+	start-stop-daemon --start --quiet \
+		--name spamd \
+		--nicelevel ${SPAMD_NICELEVEL} \
+		--pidfile ${PIDFILE} \
+		--exec /usr/sbin/spamd -- \
+			--daemonize \
+			--pidfile=${PIDFILE} \
+			${SPAMD_OPTS}
+
+	retval=$?
+
+	eend ${retval} "Failed to start spamd"
+}
+
+stop() {
+	ebegin "Stopping spamd"
+	# Retry after SPAMD_TIMEOUT seconds because spamd can take a
+	# while to kill off all of its children. This was bug 322025.
+	start-stop-daemon --stop \
+			  --quiet \
+			  --retry ${SPAMD_TIMEOUT} \
+			  --pidfile ${PIDFILE}
+	eend $? "Failed to stop spamd"
+}
+
+reload() {
+	ebegin "Reloading configuration"
+	# Warning: causes the PID of the spamd process to change.
+	start-stop-daemon --signal HUP --quiet --pidfile ${PIDFILE}
+	eend $?
+}

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7199.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7199.patch
new file mode 100644
index 0000000..323740c
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7199.patch
@@ -0,0 +1,280 @@
+The "sslv3" option doesn't do what it says (upstream bug 7093) and
+only makes things worse. The SSLv3 support also prevents SpamAssassin
+from working with LibreSSL, which no longer does SSLv3.
+
+Index: trunk/spamc/libspamc.c
+===================================================================
+--- trunk.orig/spamc/libspamc.c
++++ trunk/spamc/libspamc.c
+@@ -1187,7 +1187,7 @@ int message_filter(struct transport *tp,
+     unsigned int throwaway;
+     SSL_CTX *ctx = NULL;
+     SSL *ssl = NULL;
+-    SSL_METHOD *meth;
++    const SSL_METHOD *meth;
+     char zlib_on = 0;
+     unsigned char *zlib_buf = NULL;
+     int zlib_bufsiz = 0;
+@@ -1213,11 +1213,7 @@ int message_filter(struct transport *tp,
+     if (flags & SPAMC_USE_SSL) {
+ #ifdef SPAMC_SSL
+ 	SSLeay_add_ssl_algorithms();
+-	if (flags & SPAMC_TLSV1) {
+-	    meth = TLSv1_client_method();
+-	} else {
+-	    meth = SSLv3_client_method(); /* default */
+-	}
++	meth = SSLv23_client_method();
+ 	SSL_load_error_strings();
+ 	ctx = SSL_CTX_new(meth);
+ #else
+@@ -1596,7 +1592,7 @@ int message_tell(struct transport *tp, c
+     int failureval;
+     SSL_CTX *ctx = NULL;
+     SSL *ssl = NULL;
+-    SSL_METHOD *meth;
++    const SSL_METHOD *meth;
+ 
+     assert(tp != NULL);
+     assert(m != NULL);
+@@ -1604,7 +1600,7 @@ int message_tell(struct transport *tp, c
+     if (flags & SPAMC_USE_SSL) {
+ #ifdef SPAMC_SSL
+ 	SSLeay_add_ssl_algorithms();
+-	meth = SSLv3_client_method();
++	meth = SSLv23_client_method();
+ 	SSL_load_error_strings();
+ 	ctx = SSL_CTX_new(meth);
+ #else
+Index: trunk/spamc/spamc.c
+===================================================================
+--- trunk.orig/spamc/spamc.c
++++ trunk/spamc/spamc.c
+@@ -368,16 +368,11 @@ read_args(int argc, char **argv,
+             case 'S':
+             {
+                 flags |= SPAMC_USE_SSL;
+-		if (!spamc_optarg || (strcmp(spamc_optarg,"sslv3") == 0)) {
+-		    flags |= SPAMC_SSLV3;
+-		}
+-		else if (strcmp(spamc_optarg,"tlsv1") == 0) {
+-		    flags |= SPAMC_TLSV1;
+-		}
+-		else {
+-		    libspamc_log(flags, LOG_ERR, "Please specify a legal ssl version (%s)", spamc_optarg);
+-		    ret = EX_USAGE;
+-		}
++                if(spamc_optarg) {
++                    libspamc_log(flags, LOG_ERR,
++                        "Explicit specification of an SSL/TLS version no longer supported.");
++                    ret = EX_USAGE;
++                }
+                 break;
+             }
+ #endif
+Index: trunk/spamd/spamd.raw
+===================================================================
+--- trunk.orig/spamd/spamd.raw
++++ trunk/spamd/spamd.raw
+@@ -409,7 +409,6 @@ GetOptions(
+   'sql-config!'              => \$opt{'sql-config'},
+   'ssl'                      => \$opt{'ssl'},
+   'ssl-port=s'               => \$opt{'ssl-port'},
+-  'ssl-version=s'            => \$opt{'ssl-version'},
+   'syslog-socket=s'          => \$opt{'syslog-socket'},
+   'syslog|s=s'               => \$opt{'syslog'},
+   'log-timestamp-fmt:s'      => \$opt{'log-timestamp-fmt'},
+@@ -744,11 +743,6 @@ if ( defined $ENV{'HOME'} ) {
+ 
+ # Do whitelist later in tmp dir. Side effect: this will be done as -u user.
+ 
+-my $sslversion = $opt{'ssl-version'} || 'sslv3';
+-if ($sslversion !~ /^(?:sslv3|tlsv1)$/) {
+-  die "spamd: invalid ssl-version: $opt{'ssl-version'}\n";
+-}
+-
+ $opt{'server-key'}  ||= "$LOCAL_RULES_DIR/certs/server-key.pem";
+ $opt{'server-cert'} ||= "$LOCAL_RULES_DIR/certs/server-cert.pem";
+ 
+@@ -899,9 +893,8 @@ sub compose_listen_info_string {
+                       $socket_info->{ip_addr}, $socket_info->{port}));
+ 
+     } elsif ($socket->isa('IO::Socket::SSL')) {
+-      push(@listeninfo, sprintf("SSL [%s]:%s, ssl version %s",
+-                      $socket_info->{ip_addr}, $socket_info->{port},
+-                      $opt{'ssl-version'}||'sslv3'));
++      push(@listeninfo, sprintf("SSL [%r]:%s", $socket_info->{ip_addr},
++                      $socket_info->{port}));
+     }
+   }
+ 
+@@ -1072,7 +1065,6 @@ sub server_sock_setup_inet {
+     $sockopt{V6Only} = 1  if $io_socket_module_name eq 'IO::Socket::IP'
+                              && IO::Socket::IP->VERSION >= 0.09;
+     %sockopt = (%sockopt, (
+-      SSL_version     => $sslversion,
+       SSL_verify_mode => 0x00,
+       SSL_key_file    => $opt{'server-key'},
+       SSL_cert_file   => $opt{'server-cert'},
+@@ -1093,7 +1085,8 @@ sub server_sock_setup_inet {
+     if (!$server_inet) {
+       $diag = sprintf("could not create %s socket on [%s]:%s: %s",
+                       $ssl ? 'IO::Socket::SSL' : $io_socket_module_name,
+-                      $adr, $port, $!);
++                      $adr, $port, $ssl && $IO::Socket::SSL::SSL_ERROR ?
++                      "$!,$IO::Socket::SSL::SSL_ERROR" : $!);
+       push(@diag_fail, $diag);
+     } else {
+       $diag = sprintf("created %s socket on [%s]:%s",
+@@ -3238,7 +3231,6 @@ Options:
+  -H [dir], --helper-home-dir[=dir] Specify a different HOME directory
+  --ssl                             Enable SSL on TCP connections
+  --ssl-port port                   Override --port setting for SSL connections
+- --ssl-version sslversion          Specify SSL protocol version to use
+  --server-key keyfile              Specify an SSL keyfile
+  --server-cert certfile            Specify an SSL certificate
+  --socketpath=path                 Listen on a given UNIX domain socket
+@@ -3727,14 +3719,6 @@ Optionally specifies the port number for
+ SSL connections (default: whatever --port uses).  See B<--ssl> for
+ more details.
+ 
+-=item B<--ssl-version>=I<sslversion>
+-
+-Specify the SSL protocol version to use, one of B<sslv3> or B<tlsv1>.
+-The default, B<sslv3>, is the most flexible, accepting a SSLv3 or
+-higher hello handshake, then negotiating use of SSLv3 or TLSv1
+-protocol if the client can accept it.  Specifying B<--ssl-version>
+-implies B<--ssl>.
+-
+ =item B<--server-key> I<keyfile>
+ 
+ Specify the SSL key file to use for SSL connections.
+Index: trunk/spamc/spamc.pod
+===================================================================
+--- trunk.orig/spamc/spamc.pod
++++ trunk/spamc/spamc.pod
+@@ -177,12 +177,10 @@ The default is 1 time (ie. one attempt a
+ Sleep for I<sleep> seconds between failed spamd filtering attempts.
+ The default is 1 second.
+ 
+-=item B<-S>, B<--ssl>, B<--ssl>=I<sslversion>
++=item B<-S>, B<--ssl>, B<--ssl>
+ 
+ If spamc was built with support for SSL, encrypt data to and from the
+ spamd process with SSL; spamd must support SSL as well.
+-I<sslversion> specifies the SSL protocol version to use, either
+-C<sslv3>, or C<tlsv1>. The default, is C<sslv3>.
+ 
+ =item B<-t> I<timeout>, B<--timeout>=I<timeout>
+ 
+Index: trunk/t/spamd_ssl_tls.t
+===================================================================
+--- trunk.orig/t/spamd_ssl_tls.t
++++ /dev/null
+@@ -1,28 +0,0 @@
+-#!/usr/bin/perl
+-
+-use lib '.'; use lib 't';
+-use SATest; sa_t_init("spamd_ssl_tls");
+-use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
+-
+-exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
+-
+-# ---------------------------------------------------------------------------
+-
+-%patterns = (
+-
+-q{ Return-Path: sb55sb55@yahoo.com}, 'firstline',
+-q{ Subject: There yours for FREE!}, 'subj',
+-q{ X-Spam-Status: Yes, score=}, 'status',
+-q{ X-Spam-Flag: YES}, 'flag',
+-q{ X-Spam-Level: **********}, 'stars',
+-q{ TEST_ENDSNUMS}, 'endsinnums',
+-q{ TEST_NOREALNAME}, 'noreal',
+-q{ This must be the very last line}, 'lastline',
+-
+-
+-);
+-
+-ok (sdrun ("-L --ssl --ssl-version=tlsv1 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert",
+-           "--ssl=tlsv1 < data/spam/001",
+-           \&patterns_run_cb));
+-ok_all_patterns();
+Index: trunk/t/spamd_ssl_v3.t
+===================================================================
+--- trunk.orig/t/spamd_ssl_v3.t
++++ /dev/null
+@@ -1,28 +0,0 @@
+-#!/usr/bin/perl
+-
+-use lib '.'; use lib 't';
+-use SATest; sa_t_init("spamd_sslv3");
+-use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
+-
+-exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
+-
+-# ---------------------------------------------------------------------------
+-
+-%patterns = (
+-
+-q{ Return-Path: sb55sb55@yahoo.com}, 'firstline',
+-q{ Subject: There yours for FREE!}, 'subj',
+-q{ X-Spam-Status: Yes, score=}, 'status',
+-q{ X-Spam-Flag: YES}, 'flag',
+-q{ X-Spam-Level: **********}, 'stars',
+-q{ TEST_ENDSNUMS}, 'endsinnums',
+-q{ TEST_NOREALNAME}, 'noreal',
+-q{ This must be the very last line}, 'lastline',
+-
+-
+-);
+-
+-ok (sdrun ("-L --ssl --ssl-version=sslv3 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert",
+-           "--ssl=sslv3 < data/spam/001",
+-           \&patterns_run_cb));
+-ok_all_patterns();
+Index: trunk/t/spamd_ssl_accept_fail.t
+===================================================================
+--- trunk.orig/t/spamd_ssl_accept_fail.t
++++ trunk/t/spamd_ssl_accept_fail.t
+@@ -23,9 +23,9 @@ q{ This must be the very last line}, 'la
+ 
+ );
+ 
+-ok (start_spamd ("-L --ssl --ssl-version=sslv3 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert"));
++ok (start_spamd ("-L --ssl --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert"));
+ ok (spamcrun ("< data/spam/001", \&patterns_run_cb));
+-ok (spamcrun ("--ssl=sslv3  < data/spam/001", \&patterns_run_cb));
++ok (spamcrun ("--ssl < data/spam/001", \&patterns_run_cb));
+ ok (stop_spamd ());
+ 
+ ok_all_patterns();
+Index: trunk/t/spamd_ssl.t
+===================================================================
+--- trunk.orig/t/spamd_ssl.t
++++ trunk/t/spamd_ssl.t
+@@ -2,10 +2,7 @@
+ 
+ use lib '.'; use lib 't';
+ use SATest; sa_t_init("spamd_ssl");
+-use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9),
+-    onfail => sub {
+-	warn "\n\nNote: This may not be a SpamAssassin bug, as some platforms require that you" .
+-	    "\nspecify a protocol in spamc --ssl option, and possibly in spamd --ssl-version.\n\n" };
++use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
+ 
+ exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
+ 
+Index: trunk/MANIFEST
+===================================================================
+--- trunk.orig/MANIFEST
++++ trunk/MANIFEST
+@@ -513,8 +513,6 @@ t/spamd_report_ifspam.t
+ t/spamd_sql_prefs.t
+ t/spamd_ssl.t
+ t/spamd_ssl_accept_fail.t
+-t/spamd_ssl_tls.t
+-t/spamd_ssl_v3.t
+ t/spamd_stop.t
+ t/spamd_symbols.t
+ t/spamd_syslog.t

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r5.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r5.ebuild
new file mode 100644
index 0000000..f127be2
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r5.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs systemd
+
+MY_P=Mail-SpamAssassin-${PV//_/-}
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="An extensible mail filter which can identify and tag spam"
+HOMEPAGE="http://spamassassin.apache.org/"
+SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="+bayes berkdb ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
+
+# You can do without a database unless you need the Bayes features.
+REQUIRED_USE="bayes? ( || ( berkdb mysql postgres sqlite ) )"
+
+DEPEND=">=dev-lang/perl-5.8.8-r8
+	virtual/perl-MIME-Base64
+	>=virtual/perl-Pod-Parser-1.510.0-r2
+	virtual/perl-Storable
+	virtual/perl-Time-HiRes
+	>=dev-perl/HTML-Parser-3.43
+	>=dev-perl/Mail-DKIM-0.37
+	>=dev-perl/Net-DNS-0.53
+	dev-perl/Digest-SHA1
+	dev-perl/libwww-perl
+	>=virtual/perl-Archive-Tar-1.23
+	app-crypt/gnupg
+	>=virtual/perl-IO-Zlib-1.04
+	>=dev-util/re2c-0.12.0
+	dev-perl/Mail-SPF
+	>=dev-perl/NetAddr-IP-4.0.1
+	dev-perl/Geo-IP
+	dev-perl/Encode-Detect
+	dev-perl/Net-Patricia
+	ssl? (
+		dev-perl/IO-Socket-SSL
+		!libressl? ( dev-libs/openssl:0 )
+		libressl? ( dev-libs/libressl )
+	)
+	berkdb? (
+		virtual/perl-DB_File
+	)
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ipv6? (
+		|| ( dev-perl/IO-Socket-INET6
+			virtual/perl-IO-Socket-IP )
+	)"
+RDEPEND="${DEPEND}"
+
+# Some spamd tests fail, and it looks like the whole suite eventually
+# hangs.
+RESTRICT=test
+
+PATCHES=(
+	"${FILESDIR}/spamassassin-3.4.1-bug_7199.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
+)
+
+src_configure() {
+	# spamc can be built with ssl support.
+	local use_ssl="no"
+	if use ssl; then
+		use_ssl="yes"
+	fi
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="${use_ssl}" \
+		DESTDIR="${D}" \
+		|| die "Unable to build!"
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	PERL_MM_USE_DEFAULT=1 emake
+
+	if use qmail; then
+		emake spamc/qmail-spamc
+	fi
+}
+
+src_install () {
+	emake install
+	einstalldocs
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}"/etc/mail/spamassassin/init.pre \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}"/3.4.1-spamd.init spamd
+	newconfd "${FILESDIR}"/3.4.1-spamd.conf spamd
+
+	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+	systemd_install_serviced "${FILESDIR}"/${PN}.service.conf
+
+	if use postgres; then
+		sed -i -e 's:@USEPOSTGRES@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_pg.sql
+	else
+		sed -i -e '/@USEPOSTGRES@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	if use mysql; then
+		sed -i -e 's:@USEMYSQL@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_mysql.sql
+	else
+		sed -i -e '/@USEMYSQL@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
+		sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some docu files so they don't clash with others
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+}
+
+pkg_postinst() {
+	elog
+	elog "No rules are install by default. You will need to run sa-update"
+	elog "at least once, and most likely configure SpamAssassin before it"
+	elog "will work. You should also consider a cron job for sa-update."
+	elog
+	elog "Configuration and update help can be found on the wiki:"
+	elog
+	elog "  https://wiki.gentoo.org/wiki/SpamAssassin"
+	elog
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2016-06-05 22:37 Michael Orlitzky
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2016-06-05 22:37 UTC (permalink / raw
  To: gentoo-commits

commit:     bd452f87c73fb1dfb3050d980cdbf53f0382b216
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  5 22:20:19 2016 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Jun  5 22:33:00 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd452f87

mail-filter/spamassassin: new revision with an optional sa-update cron job.

To make life easier for our users, a cron job that runs sa-update
nightly has been provided. It is only installed with USE=cron, but an
elog will mention its existence when that USE flag is disabled. The
cron job will also attempt to restart or reload spamd/amavisd if the
signatures have been updated.

Alongside that new feature, some of the dependencies have been cleaned
up. Pointless version bounds were removed, and an obsolete perl module
or two was pruned. The libwww-perl dependency was replaced by
wget/curl.

Gentoo-Bug: 532094

Package-Manager: portage-2.2.28

 .../files/update-spamassassin-rules.cron           |  38 ++++
 mail-filter/spamassassin/metadata.xml              |  15 +-
 .../spamassassin/spamassassin-3.4.1-r6.ebuild      | 215 +++++++++++++++++++++
 3 files changed, 262 insertions(+), 6 deletions(-)

diff --git a/mail-filter/spamassassin/files/update-spamassassin-rules.cron b/mail-filter/spamassassin/files/update-spamassassin-rules.cron
new file mode 100644
index 0000000..1b36af0
--- /dev/null
+++ b/mail-filter/spamassassin/files/update-spamassassin-rules.cron
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Update SpamAssassin rules and reload daemons that use them.
+#
+
+# First, redirect stdout to /dev/null.
+exec 1>/dev/null
+
+# Try to update the rules.
+sa-update
+
+# Exit code 0: all new updates were installed.
+# Exit code 1: we were already up-to-date.
+# Exit code 3: some updates were installed, but some weren't.
+# Any other exit code indicates failure.
+if (( $? == 0 || $? == 3 )); then
+    # Compilation spits out its progress onto stderr.
+    sa-compile 2>/dev/null
+
+    # Do you run spamd or amavisd? Both daemons need to be reloaded
+    # in order to pick up the newly-updated rules.
+    if command -v rc-service 2>/dev/null; then
+        # OpenRC is installed. These "status" checks should succeed
+        # only when the daemon is running under OpenRC. We redirect
+        # stderr to hide the lecture that OpenRC gives you if you
+        # try this on a system running systemd.
+        rc-service spamd status 2>/dev/null && rc-service spamd reload
+        rc-service amavisd status 2>/dev/null && rc-service amavisd reload
+    fi
+
+    if command -v systemctl 2>/dev/null; then
+        # The systemctl (systemd) executable is installed, so try to
+        # use it to restart spamd and amavisd. These are safe to run
+        # if systemd is installed but not in use.
+        systemctl try-restart spamassassin
+        systemctl try-restart amavisd
+    fi
+fi

diff --git a/mail-filter/spamassassin/metadata.xml b/mail-filter/spamassassin/metadata.xml
index c24a432..e3f1239 100644
--- a/mail-filter/spamassassin/metadata.xml
+++ b/mail-filter/spamassassin/metadata.xml
@@ -3,10 +3,13 @@
 <pkgmetadata>
   <!-- maintainer-needed -->
   <use>
-  <flag name="qmail">Build qmail functionality and docs</flag>
-  <flag name="bayes">
-    Require a database (MySQL, SQLite, Postgres, or BerkDB) backend to
-    enable the Bayesian filtering database.
-  </flag>
-</use>
+    <flag name="bayes">
+      Require a database (MySQL, SQLite, Postgres, or BerkDB) backend
+      to enable the Bayesian filtering database.
+    </flag>
+    <flag name="cron">
+      Install a cron job to update SpamAssassin's rules daily.
+    </flag>
+    <flag name="qmail">Build qmail functionality and docs</flag>
+  </use>
 </pkgmetadata>

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r6.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r6.ebuild
new file mode 100644
index 0000000..461de34
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r6.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs systemd
+
+MY_P=Mail-SpamAssassin-${PV//_/-}
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="An extensible mail filter which can identify and tag spam"
+HOMEPAGE="http://spamassassin.apache.org/"
+SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="+bayes berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
+
+# You can do without a database unless you need the Bayes features.
+REQUIRED_USE="bayes? ( || ( berkdb mysql postgres sqlite ) )"
+
+# SpamAssassin doesn't use libwww-perl except as a fallback for when
+# curl/wget are missing, so we depend on one of those instead. Some
+# mirrors use https, so we need those utilities to support SSL.
+#
+# re2c is needed to compile the rules (sa-compile).
+#
+DEPEND="app-crypt/gnupg
+	dev-lang/perl
+	dev-perl/Digest-SHA1
+	dev-perl/Encode-Detect
+	dev-perl/Geo-IP
+	dev-perl/HTML-Parser
+	dev-perl/HTTP-Date
+	dev-perl/Mail-DKIM
+	dev-perl/Mail-SPF
+	dev-perl/Net-DNS
+	dev-perl/Net-Patricia
+	dev-perl/NetAddr-IP
+	dev-util/re2c
+	|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
+	virtual/perl-Archive-Tar
+	virtual/perl-IO-Zlib
+	virtual/perl-MIME-Base64
+	virtual/perl-Pod-Parser
+	virtual/perl-Time-HiRes
+	berkdb? ( virtual/perl-DB_File )
+	ipv6? ( dev-perl/IO-Socket-INET6 )
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ssl? (
+		dev-perl/IO-Socket-SSL
+		!libressl? ( dev-libs/openssl:0 )
+		libressl? ( dev-libs/libressl )
+	)"
+
+RDEPEND="${DEPEND}"
+
+# Some spamd tests fail, and it looks like the whole suite eventually
+# hangs.
+RESTRICT=test
+
+PATCHES=(
+	"${FILESDIR}/spamassassin-3.4.1-bug_7199.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
+)
+
+src_configure() {
+	# spamc can be built with ssl support.
+	local use_ssl="no"
+	if use ssl; then
+		use_ssl="yes"
+	fi
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="${use_ssl}" \
+		DESTDIR="${D}" \
+		|| die "Unable to build!"
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	PERL_MM_USE_DEFAULT=1 emake
+
+	if use qmail; then
+		emake spamc/qmail-spamc
+	fi
+}
+
+src_install () {
+	emake install
+	einstalldocs
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}"/etc/mail/spamassassin/init.pre \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}"/3.4.1-spamd.init spamd
+	newconfd "${FILESDIR}"/3.4.1-spamd.conf spamd
+
+	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+	systemd_install_serviced "${FILESDIR}"/${PN}.service.conf
+
+	# The sed statements in the following conditionals alter the init
+	# script to depend (or not) on the database being running before
+	# spamd is started. The sed commands either enable the dependency,
+	# or delete the line entirely.
+	if use postgres; then
+		sed -i -e 's:@USEPOSTGRES@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_pg.sql
+	else
+		sed -i -e '/@USEPOSTGRES@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	if use mysql; then
+		sed -i -e 's:@USEMYSQL@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_mysql.sql
+	else
+		sed -i -e '/@USEMYSQL@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
+		sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
+			   update-spamassassin-rules
+	fi
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2017-04-24  1:37 Michael Orlitzky
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2017-04-24  1:37 UTC (permalink / raw
  To: gentoo-commits

commit:     3dd9f4f0d1d30ed1e47ac185ecd5267b6088ad28
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 24 01:25:30 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon Apr 24 01:37:21 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dd9f4f0

mail-filter/spamassassin: new revision fixing bugs 590338 and 615856.

The first fix in this revision adds a slot-operator dependency on
dev-lang/perl. This should force SpamAssassin to rebuild in response
to future major upgrades of perl (bug 615856).

The second fix includes a backported patch to support newer versions
of dev-perl/Net-DNS. This should avoid the problems experienced with
the URIDNSBL plugin (bug 590338).

Gentoo-Bug: 590338
Gentoo-Bug: 615856

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../files/spamassassin-3.4.1-bug_7231-extra.patch  | 140 +++++++++++++++++++++
 ....1-r10.ebuild => spamassassin-3.4.1-r11.ebuild} |   3 +-
 2 files changed, 142 insertions(+), 1 deletion(-)

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231-extra.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231-extra.patch
new file mode 100644
index 00000000000..81c73866858
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231-extra.patch
@@ -0,0 +1,140 @@
+This should fix bug 7338, but the related commits were backported to
+the 3.4 branch as part of SpamAssassin bug 7231 (comment 13).
+
+--- a/lib/Mail/SpamAssassin/Dns.pm	2017/04/16 06:19:30	1791572
++++ b/lib/Mail/SpamAssassin/Dns.pm	2017/04/16 07:28:59	1791573
+@@ -171,7 +171,7 @@
+   if (substr($rule, 0, 2) eq "__") {
+     # don't bother with meta rules
+   } elsif ($answer->type eq 'TXT') {
+-    # txtdata returns a non- zone-file-format encoded result, unlike rdatastr;
++    # txtdata returns a non- zone-file-format encoded result, unlike rdstring;
+     # avoid space-separated RDATA <character-string> fields if possible,
+     # txtdata provides a list of strings in a list context since Net::DNS 0.69
+     $log = join('',$answer->txtdata);
+@@ -215,11 +215,13 @@
+ 
+   my $qname = $question->qname;
+ 
+-  # txtdata returns a non- zone-file-format encoded result, unlike rdatastr;
++  # txtdata returns a non- zone-file-format encoded result, unlike rdstring;
+   # avoid space-separated RDATA <character-string> fields if possible,
+   # txtdata provides a list of strings in a list context since Net::DNS 0.69
+   #
++  # rdatastr() is historical/undocumented, use rdstring() since Net::DNS 0.69
+   my $rdatastr = $answer->UNIVERSAL::can('txtdata') ? join('',$answer->txtdata)
++               : $answer->UNIVERSAL::can('rdstring') ? $answer->rdstring
+                                                     : $answer->rdatastr;
+   if (defined $qname && defined $rdatastr) {
+     my $qclass = $question->qclass;
+@@ -267,8 +269,13 @@
+     my $answ_type = $answer->type;
+     # TODO: there are some CNAME returns that might be useful
+     next if ($answ_type ne 'A' && $answ_type ne 'TXT');
+-    # skip any A record that isn't on 127/8
+-    next if ($answ_type eq 'A' && $answer->rdatastr !~ /^127\./);
++    if ($answ_type eq 'A') {
++      # Net::DNS::RR::A::address() is available since Net::DNS 0.69
++      my $ip_address = $answer->UNIVERSAL::can('address') ? $answer->address
++                                                          : $answer->rdatastr;
++      # skip any A record that isn't on 127.0.0.0/8
++      next if $ip_address !~ /^127\./;
++    }
+     for my $rule (@{$rules}) {
+       $self->dnsbl_hit($rule, $question, $answer);
+     }
+@@ -284,11 +291,13 @@
+ sub process_dnsbl_set {
+   my ($self, $set, $question, $answer) = @_;
+ 
+-  # txtdata returns a non- zone-file-format encoded result, unlike rdatastr;
++  # txtdata returns a non- zone-file-format encoded result, unlike rdstring;
+   # avoid space-separated RDATA <character-string> fields if possible,
+   # txtdata provides a list of strings in a list context since Net::DNS 0.69
+   #
+-  my $rdatastr = $answer->UNIVERSAL::can('txtdata') ? join('',$answer->txtdata)
++  # rdatastr() is historical/undocumented, use rdstring() since Net::DNS 0.69
++  my $rdatastr = $answer->UNIVERSAL::can('txtdata')  ? join('',$answer->txtdata)
++               : $answer->UNIVERSAL::can('rdstring') ? $answer->rdstring
+                                                     : $answer->rdatastr;
+ 
+   while (my ($subtest, $rule) = each %{ $self->{dnspost}->{$set} }) {
+--- a/lib/Mail/SpamAssassin/Plugin/AskDNS.pm	2017/04/16 06:19:30	1791572
++++ b/lib/Mail/SpamAssassin/Plugin/AskDNS.pm	2017/04/16 07:28:59	1791573
+@@ -140,7 +140,7 @@
+ multiple character-strings (as defined in Section 3.3 of [RFC1035]), these
+ strings are concatenated with no delimiters before comparing the result
+ to the filtering string. This follows requirements of several documents,
+-such as RFC 5518, RFC 4408, RFC 4871, RFC 5617.  Examples of a plain text
++such as RFC 5518, RFC 7208, RFC 4871, RFC 5617.  Examples of a plain text
+ filtering parameter: "127.0.0.1", "transaction", 'list' .
+ 
+ A regular expression follows a familiar perl syntax like /.../ or m{...}
+@@ -539,7 +539,7 @@
+     @answer = ( undef );
+   }
+ 
+-  # NOTE:  $rr->rdatastr returns the result encoded in a DNS zone file
++  # NOTE:  $rr->rdstring returns the result encoded in a DNS zone file
+   # format, i.e. enclosed in double quotes if a result contains whitespace
+   # (or other funny characters), and may use \DDD encoding or \X quoting as
+   # per RFC 1035.  Using $rr->txtdata instead avoids this unnecessary encoding
+@@ -566,19 +566,26 @@
+       # special case, no answer records, only rcode can be tested
+     } else {
+       $rr_type = uc $rr->type;
+-      if ($rr->UNIVERSAL::can('txtdata')) {  # TXT, SPF
+-        # join with no intervening spaces, as per RFC 5518
++      if ($rr_type eq 'A') {
++        # Net::DNS::RR::A::address() is available since Net::DNS 0.69
++        $rr_rdatastr = $rr->UNIVERSAL::can('address') ? $rr->address
++                                                      : $rr->rdatastr;
++        if ($rr_rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/) {
++          $rdatanum = Mail::SpamAssassin::Util::my_inet_aton($rr_rdatastr);
++        }
++
++      } elsif ($rr->UNIVERSAL::can('txtdata')) {
++        # TXT, SPF: join with no intervening spaces, as per RFC 5518
+         if ($txtdata_can_provide_a_list || $rr_type ne 'TXT') {
+           $rr_rdatastr = join('', $rr->txtdata);  # txtdata() in list context!
+         } else {  # char_str_list() is only available for TXT records
+           $rr_rdatastr = join('', $rr->char_str_list);  # historical
+         }
+       } else {
+-        $rr_rdatastr = $rr->rdatastr;
+-        if ($rr_type eq 'A' &&
+-            $rr_rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/) {
+-          $rdatanum = Mail::SpamAssassin::Util::my_inet_aton($rr_rdatastr);
+-        }
++        # rdatastr() is historical, use rdstring() since Net::DNS 0.69
++        $rr_rdatastr = $rr->UNIVERSAL::can('rdstring') ? $rr->rdstring
++                                                       : $rr->rdatastr;
++        utf8::encode($rr_rdatastr)  if utf8::is_utf8($rr_rdatastr);
+       }
+     # dbg("askdns: received rr type %s, data: %s", $rr_type, $rr_rdatastr);
+     }
+--- a/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm	2017/04/16 06:19:30	1791572
++++ b/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm	2017/04/16 07:28:59	1791573
+@@ -1009,10 +1009,9 @@
+     dbg("uridnsbl: complete_a_lookup aborted %s", $ent->{key});
+     return;
+   }
+-
+   dbg("uridnsbl: complete_a_lookup %s", $ent->{key});
+-  my @answer = $pkt->answer;
+   my $j = 0;
++  my @answer = $pkt->answer;
+   foreach my $rr (@answer) {
+     $j++;
+     my $str = $rr->string;
+@@ -1099,7 +1098,9 @@
+     my $rr_type = $rr->type;
+ 
+     if ($rr_type eq 'A') {
+-      $rdatastr = $rr->rdatastr;
++      # Net::DNS::RR::A::address() is available since Net::DNS 0.69
++      $rdatastr = $rr->UNIVERSAL::can('address') ? $rr->address
++                                                 : $rr->rdatastr;
+       if ($rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) {
+         $rdatanum = Mail::SpamAssassin::Util::my_inet_aton($rdatastr);
+       }

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r10.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r11.ebuild
similarity index 98%
rename from mail-filter/spamassassin/spamassassin-3.4.1-r10.ebuild
rename to mail-filter/spamassassin/spamassassin-3.4.1-r11.ebuild
index 32be65eb97f..a6f8ed6769d 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r10.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r11.ebuild
@@ -22,7 +22,7 @@ REQUIRED_USE="bayes? ( || ( berkdb mysql postgres sqlite ) )"
 # The Makefile.PL script checks for dependencies, but only fails if a
 # required (i.e. not optional) dependency is missing. We therefore
 # require most of the optional modules only at runtime.
-REQDEPEND="dev-lang/perl
+REQDEPEND="dev-lang/perl:=
 	dev-perl/HTML-Parser
 	dev-perl/Net-DNS
 	dev-perl/NetAddr-IP
@@ -85,6 +85,7 @@ PATCHES=(
 	"${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
 	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
 	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2017-08-20 14:35 Michael Orlitzky
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2017-08-20 14:35 UTC (permalink / raw
  To: gentoo-commits

commit:     52480637e8a4cd42cb671c02fdf1c122e387a3fe
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 13 22:08:00 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Aug 20 14:32:43 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52480637

mail-filter/spamassassin: new revision to fix tests and improve init script.

This commit adds an upstream patch to fix a test suite crash with
newer versions of perl. It also largely rewrites the init script:

  * Don't conditionally "use mysql" or "use postgres" in the
    OpenRC init script. Even if SpamAssassin is installed without
    e.g. MySQL support, if MySQL is present on the system, a user
    might store his SpamAssassin data in it.

  * Use a declarative style and drop the custom start() and stop()
    functions.

  * Run the spamd daemon as the "spamd" user.

  * Use /run/spamd.pid for the PID file to avoid a "checkpath".

Some updates were made to the ebuild to facilitate those changes:

  * Don't modify the init script for USE=mysql or USE=postgres.

  * Create a "spamd" user in pkg_preinst().

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 mail-filter/spamassassin/files/3.4.1-spamd.init-r1 | 34 ++++++++++++++++++++++
 .../files/spamassassin-3.4.1-bug_7404.patch        | 23 +++++++++++++++
 ....1-r12.ebuild => spamassassin-3.4.1-r13.ebuild} | 32 +++++++-------------
 3 files changed, 68 insertions(+), 21 deletions(-)

diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.init-r1 b/mail-filter/spamassassin/files/3.4.1-spamd.init-r1
new file mode 100755
index 00000000000..5f981d8e2c3
--- /dev/null
+++ b/mail-filter/spamassassin/files/3.4.1-spamd.init-r1
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/sbin/spamd"
+pidfile="/run/spamd.pid"
+command_args="--username=spamd
+              --groupname=spamd
+              --pidfile=${pidfile}
+              ${SPAMD_OPTS}"
+command_args_background="--daemonize"
+
+: ${SPAMD_NICELEVEL:=0}
+start_stop_daemon_args="--nicelevel ${SPAMD_NICELEVEL}"
+
+# Retry after SPAMD_TIMEOUT seconds because spamd can take a
+# while to kill off all of its children. This was bug 322025.
+: ${SPAMD_TIMEOUT:=15}
+retry="${SPAMD_TIMEOUT}"
+
+extra_started_commands="reload"
+
+depend() {
+    before mta
+    use logger mysql postgres
+}
+
+reload() {
+	ebegin "Reloading configuration"
+	# Warning: reload causes the PID of the spamd process to
+	# change, but spamd does update its PID file afterwards.
+	start-stop-daemon --signal HUP --pidfile "${pidfile}"
+	eend $?
+}

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch
new file mode 100644
index 00000000000..563110fcb1f
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch
@@ -0,0 +1,23 @@
+--- a/lib/Mail/SpamAssassin/PerMsgStatus.pm	(revision 1790817)
++++ b/lib/Mail/SpamAssassin/PerMsgStatus.pm	(working copy)
+@@ -896,16 +896,16 @@ 
+     $str .= shift @{$ary};
+   }
+   undef $ary;
+-  chomp ($str); $str .= " [...]\n";
+ 
+   # in case the last line was huge, trim it back to around 200 chars
+   local $1;
+-  $str =~ s/^(.{,200}).*$/$1/gs;
++  $str =~ s/^(.{200}).+$/$1 [...]/gm;
++  chomp ($str); $str .= "\n";
+ 
+   # now, some tidy-ups that make things look a bit prettier
+-  $str =~ s/-----Original Message-----.*$//gs;
++  $str =~ s/-----Original Message-----.*$//gm;
+   $str =~ s/This is a multi-part message in MIME format\.//gs;
+-  $str =~ s/[-_\*\.]{10,}//gs;
++  $str =~ s/[-_*.]{10,}//gs;
+   $str =~ s/\s+/ /gs;
+ 
+   # add "Content preview:" ourselves, so that the text aligns

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r12.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r13.ebuild
similarity index 91%
rename from mail-filter/spamassassin/spamassassin-3.4.1-r12.ebuild
rename to mail-filter/spamassassin/spamassassin-3.4.1-r13.ebuild
index 02a2cce2c7e..dc35e32ce58 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r12.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r13.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit perl-functions systemd toolchain-funcs
+inherit perl-functions systemd toolchain-funcs user
 
 MY_P="Mail-SpamAssassin-${PV//_/-}"
 S="${WORKDIR}/${MY_P}"
@@ -83,6 +83,7 @@ PATCHES=(
 	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
 	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
 	"${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
 	"${FILESDIR}/spamassassin-3.4.1-perl526.patch"
 )
 
@@ -153,31 +154,14 @@ src_install () {
 		|| die "failed to disable plugins by default"
 
 	# Add the init and config scripts.
-	newinitd "${FILESDIR}/3.4.1-spamd.init" spamd
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r1" spamd
 	newconfd "${FILESDIR}/3.4.1-spamd.conf" spamd
 
 	systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
 	systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
 
-	# The sed statements in the following conditionals alter the init
-	# script to depend (or not) on the database being running before
-	# spamd is started. The sed commands either enable the dependency,
-	# or delete the line entirely.
-	if use postgres; then
-		sed -i -e 's:@USEPOSTGRES@::' "${ED}/etc/init.d/spamd" || die
-
-		dodoc sql/*_pg.sql
-	else
-		sed -i -e '/@USEPOSTGRES@/d' "${ED}/etc/init.d/spamd" || die
-	fi
-
-	if use mysql; then
-		sed -i -e 's:@USEMYSQL@::' "${ED}/etc/init.d/spamd" || die
-
-		dodoc sql/*_mysql.sql
-	else
-		sed -i -e '/@USEMYSQL@/d' "${ED}/etc/init.d/spamd" || die
-	fi
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
 
 	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
 		sql/README.awl procmailrc.example sample-nonspam.txt \
@@ -232,6 +216,12 @@ src_test() {
 	default
 }
 
+pkg_preinst() {
+	# The spamd daemon runs as this user. Use a real home directory so
+	# that it can hold SA configuration.
+	enewuser spamd -1 -1 /home/spamd
+}
+
 pkg_postinst() {
 	elog
 	elog 'No rules are installed by default. You will need to run sa-update'


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2017-11-01 18:55 Michael Orlitzky
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2017-11-01 18:55 UTC (permalink / raw
  To: gentoo-commits

commit:     45323735d6f772c7060aa794594a2d88d9560fa6
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  1 03:14:31 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Nov  1 18:54:57 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45323735

mail-filter/spamassassin: new revision letting spamd run as root (systemd).

In the previous revision (r18), support was added for running spamd as
root through OpenRC. That was done using a new variable called
SPAMD_RUN_AS_ROOT, defaulting to false. The choice to use a boolean
variable -- as opposed to e.g. SPAMD_USER -- was made because passing
"root" as the username to spamd kills it. Thus, SPAMD_USER=root would
not have worked, and we instead test SPAMD_RUN_AS_ROOT to decide
whether or not to specify a username/groupname at all.

The same exact issue arises with systemd; however, systemd offers no
way for us to test the value of SPAMD_RUN_AS_ROOT and act on the
result! The SPAMD_USER proposal is dead in the water for the same
reason, so a different approach was needed. The simplest thing that
could work was to move the "--username" and "--groupname" flags out
of the systemd service file, and into the SPAMD_OPTS variable. That
way, users who know what they are doing can simply drop those flags.

Closes: https://bugs.gentoo.org/635790
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 mail-filter/spamassassin/files/spamassassin.service-r4         | 10 ++++++++++
 mail-filter/spamassassin/files/spamassassin.service.conf-r2    |  2 ++
 ...assassin-3.4.1-r18.ebuild => spamassassin-3.4.1-r19.ebuild} | 10 ++++++----
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/mail-filter/spamassassin/files/spamassassin.service-r4 b/mail-filter/spamassassin/files/spamassassin.service-r4
new file mode 100644
index 00000000000..b539cd2bb5a
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin.service-r4
@@ -0,0 +1,10 @@
+[Unit]
+Description=Spamassassin daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/spamd $SPAMD_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target

diff --git a/mail-filter/spamassassin/files/spamassassin.service.conf-r2 b/mail-filter/spamassassin/files/spamassassin.service.conf-r2
new file mode 100644
index 00000000000..442dde44e07
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin.service.conf-r2
@@ -0,0 +1,2 @@
+[Service]
+Environment="SPAMD_OPTS=--username=spamd --groupname=spamd --max-children=5 --create-prefs --helper-home-dir"

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r18.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild
similarity index 94%
rename from mail-filter/spamassassin/spamassassin-3.4.1-r18.ebuild
rename to mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild
index 49b14da5015..2f2e31f1087 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r18.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild
@@ -159,8 +159,8 @@ src_install () {
 	newinitd "${FILESDIR}/3.4.1-spamd.init-r2" spamd
 	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
 
-	systemd_newunit "${FILESDIR}/${PN}.service-r3" "${PN}.service"
-	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r1" \
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
 							 "${PN}.service"
 
 	use postgres && dodoc sql/*_pg.sql
@@ -243,7 +243,9 @@ pkg_postinst() {
 	elog
 
 	ewarn 'If this version of SpamAssassin causes permissions issues'
-	ewarn 'with your user configurations or bayes databases, you may'
-	ewarn 'need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
 	ewarn 'configuration file.'
 }


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2017-11-01 18:55 Michael Orlitzky
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2017-11-01 18:55 UTC (permalink / raw
  To: gentoo-commits

commit:     7c925b49c0ac1bb08fb4e3f7666a571b9e076343
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 31 14:12:47 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Nov  1 18:54:56 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c925b49

mail-filter/spamassassin: new revision to fix the build with openssl-1.1.

This new revision adds a patch (thanks to Mark Wright) that fixes the
build with the new openssl-1.1 branch. Our patch is based on the fix
contributed upstream by Noah Meyerhans (thanks Noah) in SA bug 7361.

In an unrelated change, the SRC_URI was updated to use the https
protocol.

Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7361
Closes: https://bugs.gentoo.org/624858
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 .../files/spamassassin-3.4.1-bug_7361.patch        | 491 +++++++++++++++++++++
 .../spamassassin/spamassassin-3.4.1-r17.ebuild     | 244 ++++++++++
 2 files changed, 735 insertions(+)

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7361.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7361.patch
new file mode 100644
index 00000000000..525bf75c7fe
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7361.patch
@@ -0,0 +1,491 @@
+This patch is a modified combination of the patches posted to
+
+  https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7361
+
+that allow SpamAssassin to build against (and work with) openssl-1.1.x.
+Mark Wright (gienah) made the necessary updates to get the patches to
+work on Gentoo and solve bug 624858.
+
+SpamAssassin-bug: 7361
+Gentoo-bug: 624858
+
+--- a/spamc/configure	(revision 1767127)
++++ b/spamc/configure	(working copy)
+@@ -943,7 +943,7 @@ 
+     else
+       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+     fi
+-    cd "$ac_popdir"
++    cd $ac_popdir
+   done
+ fi
+ 
+@@ -1874,7 +1874,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -1932,7 +1933,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -2048,7 +2050,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -2102,7 +2105,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -2147,7 +2151,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -2191,7 +2196,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -2523,7 +2529,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -2693,7 +2700,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -2764,7 +2772,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -2917,7 +2926,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3069,7 +3079,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3260,7 +3271,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3323,7 +3335,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3388,7 +3401,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3491,7 +3505,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3557,7 +3572,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3628,7 +3644,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3666,9 +3683,9 @@ 
+ SSLLIBS=""
+ SSLCFLAGS=""
+ if test yes = "$sa_ssl_enabled"; then
+-	echo "$as_me:$LINENO: checking for CRYPTO_lock in -lcrypto" >&5
+-echo $ECHO_N "checking for CRYPTO_lock in -lcrypto... $ECHO_C" >&6
+-if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then
++	echo "$as_me:$LINENO: checking for CRYPTO_malloc in -lcrypto" >&5
++echo $ECHO_N "checking for CRYPTO_malloc in -lcrypto... $ECHO_C" >&6
++if test "${ac_cv_lib_crypto_CRYPTO_malloc+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+@@ -3686,11 +3703,11 @@ 
+ #endif
+ /* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+-char CRYPTO_lock ();
++char CRYPTO_malloc ();
+ int
+ main ()
+ {
+-CRYPTO_lock ();
++CRYPTO_malloc ();
+   ;
+   return 0;
+ }
+@@ -3704,7 +3721,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3716,20 +3734,20 @@ 
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  ac_cv_lib_crypto_CRYPTO_lock=yes
++  ac_cv_lib_crypto_CRYPTO_malloc=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-ac_cv_lib_crypto_CRYPTO_lock=no
++ac_cv_lib_crypto_CRYPTO_malloc=no
+ fi
+ rm -f conftest.err conftest.$ac_objext \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_lock" >&5
+-echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_lock" >&6
+-if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then
++echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_malloc" >&5
++echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_malloc" >&6
++if test $ac_cv_lib_crypto_CRYPTO_malloc = yes; then
+   SSLLIBS="-lcrypto $SSLLIBS"
+ fi
+ 
+@@ -3771,7 +3789,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3804,7 +3823,7 @@ 
+ 	# before defining SPAMC_SSL check that all its requirements are
+ 	# actually available
+ 	if test yes = "$ac_cv_header_openssl_crypto_h" && \
+-	   test yes = "$ac_cv_lib_crypto_CRYPTO_lock" && \
++	   test yes = "$ac_cv_lib_crypto_CRYPTO_malloc" && \
+ 	   test yes = "$ac_cv_lib_ssl_SSL_CTX_free"; then
+ 		SSLCFLAGS="-DSPAMC_SSL"
+ 	else
+@@ -3854,7 +3873,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -3927,7 +3947,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4000,7 +4021,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4073,7 +4095,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4182,7 +4205,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4246,7 +4270,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4311,7 +4336,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4368,7 +4394,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4435,7 +4462,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4500,7 +4528,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4564,7 +4593,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4628,7 +4658,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -4692,7 +4723,8 @@ 
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+@@ -5527,6 +5559,11 @@ 
+ 
+ 
+ 
++  if test x"$ac_file" != x-; then
++    { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++    rm -f "$ac_file"
++  fi
+   # Let's still pretend it is `configure' which instantiates (i.e., don't
+   # use $as_me), people would be surprised to read:
+   #    /* config.h.  Generated by config.status.  */
+@@ -5565,12 +5602,6 @@ 
+ 	 fi;;
+       esac
+     done` || { (exit 1); exit 1; }
+-
+-  if test x"$ac_file" != x-; then
+-    { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+-    rm -f "$ac_file"
+-  fi
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+   sed "$ac_vpsub
+
+--- a/spamc/configure.in	(revision 1767127)
++++ b/spamc/configure.in	(working copy)
+@@ -64,13 +64,13 @@ 
+ SSLLIBS=""
+ SSLCFLAGS=""
+ if test yes = "$sa_ssl_enabled"; then
+-	AC_CHECK_LIB(crypto, CRYPTO_lock,[SSLLIBS="-lcrypto $SSLLIBS"])
++	AC_CHECK_LIB(crypto, CRYPTO_malloc,[SSLLIBS="-lcrypto $SSLLIBS"])
+ 	AC_CHECK_LIB(ssl, SSL_CTX_free,[SSLLIBS="-lssl $SSLLIBS"],,-lcrypto)
+ 
+ 	# before defining SPAMC_SSL check that all its requirements are
+ 	# actually available
+ 	if test yes = "$ac_cv_header_openssl_crypto_h" && \
+-	   test yes = "$ac_cv_lib_crypto_CRYPTO_lock" && \
++	   test yes = "$ac_cv_lib_crypto_CRYPTO_malloc" && \
+ 	   test yes = "$ac_cv_lib_ssl_SSL_CTX_free"; then
+ 		SSLCFLAGS="-DSPAMC_SSL"
+ 	else
+
+--- a/spamc/libspamc.c	2017-10-20 13:33:54.129653171 +1100
++++ b/spamc/libspamc.c	2017-10-20 13:36:09.429653849 +1100
+@@ -1212,10 +1212,21 @@
+ 
+     if (flags & SPAMC_USE_SSL) {
+ #ifdef SPAMC_SSL
++#if OPENSSL_API_COMPAT >= 0x10100000L
++	OPENSSL_init_ssl(0, NULL);
++	meth = TLS_method();
++	ctx = SSL_CTX_new(meth);
++	if (flags & SPAMC_TLSV1) {
++	    SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION);
++	} else {
++	    SSL_CTX_set_min_proto_version(ctx, SSL3_VERSION);
++	}
++#else
+ 	SSLeay_add_ssl_algorithms();
+ 	meth = SSLv23_client_method();
+ 	SSL_load_error_strings();
+ 	ctx = SSL_CTX_new(meth);
++#endif
+ #else
+ 	UNUSED_VARIABLE(ssl);
+ 	UNUSED_VARIABLE(meth);
+@@ -1599,10 +1610,17 @@
+ 
+     if (flags & SPAMC_USE_SSL) {
+ #ifdef SPAMC_SSL
++#if OPENSSL_API_COMPAT >= 0x10100000L
++	OPENSSL_init_ssl(0, NULL);
++	meth = TLS_method();
++	ctx = SSL_CTX_new(meth);
++	SSL_CTX_set_min_proto_version(ctx, SSL3_VERSION);
++#else
+ 	SSLeay_add_ssl_algorithms();
+ 	meth = SSLv23_client_method();
+ 	SSL_load_error_strings();
+ 	ctx = SSL_CTX_new(meth);
++#endif
+ #else
+ 	UNUSED_VARIABLE(ssl);
+ 	UNUSED_VARIABLE(meth);

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r17.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r17.ebuild
new file mode 100644
index 00000000000..ba402950811
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r17.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-functions systemd toolchain-funcs user
+
+MY_P="Mail-SpamAssassin-${PV//_/-}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="An extensible mail filter which can identify and tag spam"
+HOMEPAGE="https://spamassassin.apache.org/"
+SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
+
+# The Makefile.PL script checks for dependencies, but only fails if a
+# required (i.e. not optional) dependency is missing. We therefore
+# require most of the optional modules only at runtime.
+REQDEPEND="dev-lang/perl:=
+	dev-perl/HTML-Parser
+	dev-perl/Net-DNS
+	dev-perl/NetAddr-IP
+	virtual/perl-Archive-Tar
+	virtual/perl-Digest-SHA
+	virtual/perl-IO-Zlib
+	virtual/perl-Time-HiRes
+	ssl? (
+		!libressl? ( dev-libs/openssl:0 )
+		libressl? ( dev-libs/libressl )
+	)"
+
+# SpamAssassin doesn't use libwww-perl except as a fallback for when
+# curl/wget are missing, so we depend on one of those instead. Some
+# mirrors use https, so we need those utilities to support SSL.
+#
+# re2c is needed to compile the rules (sa-compile).
+#
+# We still need the old Digest-SHA1 because razor2 has not been ported
+# to Digest-SHA.
+OPTDEPEND="app-crypt/gnupg
+	dev-perl/Digest-SHA1
+	dev-perl/Encode-Detect
+	dev-perl/Geo-IP
+	dev-perl/HTTP-Date
+	dev-perl/Mail-DKIM
+	dev-perl/Mail-SPF
+	dev-perl/Net-Patricia
+	dev-perl/Net-CIDR-Lite
+	dev-util/re2c
+	|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
+	virtual/perl-MIME-Base64
+	virtual/perl-Pod-Parser
+	berkdb? ( virtual/perl-DB_File )
+	ipv6? ( dev-perl/IO-Socket-INET6 )
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ssl? ( dev-perl/IO-Socket-SSL )"
+
+DEPEND="${REQDEPEND}
+	test? (
+		${OPTDEPEND}
+		virtual/perl-Test-Harness
+	)"
+RDEPEND="${REQDEPEND} ${OPTDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/spamassassin-3.4.1-bug_7199.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7462.patch"
+	"${FILESDIR}/spamassassin-3.4.1-perl526.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7361.patch"
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	emake install
+	einstalldocs
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}/etc/mail/spamassassin/init.pre" \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r1" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r3" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r1" \
+							 "${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+
+	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
+		sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod || die "failed to remove perllocal.pod"
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist || die "failed to fix paths in packlist"
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	# The spamd daemon runs as this user. Use a real home directory so
+	# that it can hold SA configuration.
+	enewuser spamd -1 -1 /home/spamd
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2018-10-12 13:48 Michael Orlitzky
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2018-10-12 13:48 UTC (permalink / raw
  To: gentoo-commits

commit:     1222f435f35ff22d8ecbe284e4149695f1dbf620
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 12 13:34:57 2018 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Oct 12 13:45:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1222f435

mail-filter/spamassassin: new revision that silences some log spam.

Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../files/spamassassin-3.4.2-bug_7632.patch          | 20 ++++++++++++++++++++
 ...-3.4.2-r1.ebuild => spamassassin-3.4.2-r2.ebuild} |  2 ++
 2 files changed, 22 insertions(+)

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch
new file mode 100644
index 00000000000..a9a065abd81
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch
@@ -0,0 +1,20 @@
+This upstream fix changes the informational message,
+
+  dns: new_dns_packet: domain is utf8 flagged...
+
+to a debug one. This should prevent it from being spammed in your logs
+a million times a day.
+
+Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7632
+
+--- a/lib/Mail/SpamAssassin/DnsResolver.pm	2018/10/12 06:14:11	1843622
++++ b/lib/Mail/SpamAssassin/DnsResolver.pm	2018/10/12 06:38:56	1843623
+@@ -547,7 +547,7 @@
+   eval {
+ 
+     if (utf8::is_utf8($domain)) {  # since Perl 5.8.1
+-      info("dns: new_dns_packet: domain is utf8 flagged: %s", $domain);
++      dbg("dns: new_dns_packet: domain is utf8 flagged: %s", $domain);
+     }
+ 
+     $domain =~ s/\.*\z/./s;

diff --git a/mail-filter/spamassassin/spamassassin-3.4.2-r1.ebuild b/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild
similarity index 99%
rename from mail-filter/spamassassin/spamassassin-3.4.2-r1.ebuild
rename to mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild
index 2fd2d38d2b8..d5e7b3fba68 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.2-r1.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild
@@ -77,6 +77,8 @@ DEPEND="${REQDEPEND}
 	)"
 RDEPEND="${REQDEPEND} ${OPTDEPEND}"
 
+PATCHES=( "${FILESDIR}/spamassassin-3.4.2-bug_7632.patch" )
+
 src_prepare() {
 	default
 


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2018-10-28 21:58 Thomas Deutschmann
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Deutschmann @ 2018-10-28 21:58 UTC (permalink / raw
  To: gentoo-commits

commit:     062c17593eacdd7c9f9e9789afe81f6ec6fa1021
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Sun Oct 28 19:29:51 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Oct 28 21:58:21 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=062c1759

mail-filter/spamassassin: Update docs and warn about SQL schema changes

Pull patches from upstream to address AWL + TxRep SQL schema changes
that were introduced in 3.4.2, but we're documented in it's initial
release.

Upstream-bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7631
Closes: https://bugs.gentoo.org/666576
Package-Manager: Portage-2.3.49, Repoman-2.3.11
Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift.com>
Closes: https://github.com/gentoo/gentoo/pull/10285
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../files/spamassassin-3.4.2-bug_7631.patch        |  61 +++++
 .../spamassassin/spamassassin-3.4.2-r3.ebuild      | 283 +++++++++++++++++++++
 2 files changed, 344 insertions(+)

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch
new file mode 100644
index 00000000000..3c4bf403dc2
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch
@@ -0,0 +1,61 @@
+This upstream doc changes addresses 3.4.2 adding new rows to awl SQL
+tables.
+
+Upstream's UPGRADE diff is slightly different.  Their version is 
+applied to the 3.4.3 release notes (not yet released), ours applies
+to 3.4.2.
+
+Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7631
+Bug: https://bugs.gentoo.org/666576
+
+--- a/UPGRADE	2018-10-28 15:43:45.744850026 -0400
++++ b/UPGRADE	2018-10-28 15:47:52.805028626 -0400
+@@ -8,6 +8,13 @@
+ 
+ See https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7614
+ 
++- Added last_hit timestamp to Awl SQL schema.
++  You should upgrade your sql database running the following command:
++  MySQL:
++  "ALTER TABLE `awl` ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;"
++  PostgreSQL:
++  "ALTER TABLE awl ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP;"
++
+ New plugins
+ -----------
+ 
+--- a/sql/awl_mysql.sql	2018/10/21 12:10:09	1844484
++++ b/sql/awl_mysql.sql	2018/10/21 12:10:40	1844485
+@@ -5,5 +5,6 @@
+   msgcount int(11) NOT NULL default '0',
+   totscore float NOT NULL default '0',
+   signedby varchar(255) NOT NULL default '',
++  last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+   PRIMARY KEY (username,email,signedby,ip)
+ ) ENGINE=InnoDB;
+--- a/sql/awl_pg.sql	2018/10/21 12:10:09	1844484
++++ b/sql/awl_pg.sql	2018/10/21 12:10:40	1844485
+@@ -5,8 +5,22 @@
+   msgcount bigint NOT NULL default '0',
+   totscore float NOT NULL default '0',
+   signedby varchar(255) NOT NULL default '',
++  last_hit timestamp NOT NULL default CURRENT_TIMESTAMP,
+   PRIMARY KEY (username,email,signedby,ip)
+ );
+ 
+-ALTER TABLE awl SET (fillfactor=95);
++create index awl_last_hit on awl (last_hit);
++
++create OR REPLACE function update_awl_last_hit()
++RETURNS TRIGGER AS $$
++BEGIN
++  NEW.last_hit = CURRENT_TIMESTAMP;
++  RETURN NEW;
++END;
++$$ language 'plpgsql';
+ 
++create TRIGGER update_awl_update_last_hit BEFORE UPDATE
++ON awl FOR EACH ROW EXECUTE PROCEDURE
++update_awl_last_hit();
++
++ALTER TABLE awl SET (fillfactor=95);

diff --git a/mail-filter/spamassassin/spamassassin-3.4.2-r3.ebuild b/mail-filter/spamassassin/spamassassin-3.4.2-r3.ebuild
new file mode 100644
index 00000000000..e1fd1700495
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.2-r3.ebuild
@@ -0,0 +1,283 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-functions systemd toolchain-funcs user eapi7-ver
+
+MY_P="Mail-SpamAssassin-${PV//_/-}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="An extensible mail filter which can identify and tag spam"
+HOMEPAGE="https://spamassassin.apache.org/"
+SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
+
+# The Makefile.PL script checks for dependencies, but only fails if a
+# required (i.e. not optional) dependency is missing. We therefore
+# require most of the optional modules only at runtime.
+REQDEPEND="dev-lang/perl:=
+	dev-perl/HTML-Parser
+	dev-perl/Net-DNS
+	dev-perl/NetAddr-IP
+	virtual/perl-Archive-Tar
+	virtual/perl-Digest-SHA
+	virtual/perl-IO-Zlib
+	virtual/perl-Time-HiRes
+	ssl? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl )
+	)"
+
+# SpamAssassin doesn't use libwww-perl except as a fallback for when
+# curl/wget are missing, so we depend on one of those instead. Some
+# mirrors use https, so we need those utilities to support SSL.
+#
+# re2c is needed to compile the rules (sa-compile).
+#
+# We still need the old Digest-SHA1 because razor2 has not been ported
+# to Digest-SHA.
+OPTDEPEND="app-crypt/gnupg
+	dev-perl/Digest-SHA1
+	dev-perl/Encode-Detect
+	dev-perl/Geo-IP
+	dev-perl/HTTP-Date
+	dev-perl/Mail-DKIM
+	dev-perl/Mail-SPF
+	dev-perl/Net-Patricia
+	dev-perl/Net-CIDR-Lite
+	dev-util/re2c
+	|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
+	virtual/perl-MIME-Base64
+	virtual/perl-Pod-Parser
+	berkdb? ( virtual/perl-DB_File )
+	ipv6? ( dev-perl/IO-Socket-INET6 )
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ssl? ( dev-perl/IO-Socket-SSL )"
+
+DEPEND="${REQDEPEND}
+	test? (
+		${OPTDEPEND}
+		virtual/perl-Test-Harness
+	)"
+RDEPEND="${REQDEPEND} ${OPTDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/spamassassin-3.4.2-bug_7631.patch"
+	"${FILESDIR}/spamassassin-3.4.2-bug_7632.patch"
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
+
+	# Upstream bug 7622: this thing needs network access but doesn't
+	# respect the 'run_net_tests' setting.
+	perl_rm_files t/urilocalbl_geoip.t \
+		|| die 'failed to remove urilocalbl_geoip tests'
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	emake install
+	einstalldocs
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	dosym mail/spamassassin /etc/spamassassin
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}/etc/mail/spamassassin/init.pre" \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+							 "${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+
+	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
+		sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod || die "failed to remove perllocal.pod"
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist || die "failed to fix paths in packlist"
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	# The spamd daemon runs as this user. Use a real home directory so
+	# that it can hold SA configuration.
+	enewuser spamd -1 -1 /home/spamd
+
+	if use mysql || use postgres ; then
+		local _awlwarn=0
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ! ver_test "${_v}" -gt "3.4.2-r3"; then
+				_awlwarn=1
+			fi
+		done
+		if [[ ${_awlwarn} == 1 ]] ; then
+			ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.'
+			ewarn 'You will need to manually ALTER your tables for them to'
+			ewarn 'continue working.  See the UPGRADE documentation for'
+			ewarn 'details.'
+			ewarn
+		fi
+	fi
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+
+	if use mysql || use postgres ; then
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.2-r3"; then
+				ewarn
+				ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.'
+				ewarn 'You will need to manually ALTER your tables for them to'
+				ewarn 'continue working.  See the UPGRADE documentation for'
+				ewarn 'details.'
+				ewarn
+
+				# show this only once
+				break
+			fi
+		done
+	fi
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+	ewarn 'configuration file.'
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2019-03-02  5:01 Michael Orlitzky
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2019-03-02  5:01 UTC (permalink / raw
  To: gentoo-commits

commit:     5225641c114c95e5524d3794af84170ded43aada
Author:     Marcin Mirosław <bug <AT> mejor <DOT> pl>
AuthorDate: Mon Feb 18 12:09:48 2019 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Mar  2 05:00:36 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5225641c

mail-filter/spamassassin: restore support for paths in rules mirror URL's

sa-update couldn't fetch rules from mirror if files were in paths

Bug: https://bugs.gentoo.org/677250
Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7623
Signed-off-by: Marcin Mirosław <bug <AT> mejor.pl>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../files/spamassassin-3.4.2-bug_7623_p1.patch     |  13 +
 .../files/spamassassin-3.4.2-bug_7623_p2.patch     |  15 ++
 .../spamassassin/spamassassin-3.4.2-r5.ebuild      | 286 +++++++++++++++++++++
 3 files changed, 314 insertions(+)

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch
new file mode 100644
index 00000000000..d0fe21bf9ef
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch
@@ -0,0 +1,13 @@
+Bug: https://bugs.gentoo.org/677250
+Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7623
+
+--- a/sa-update.raw	2018/09/29 09:33:52	1842302
++++ b/sa-update.raw	2018/09/29 09:41:24	1842303
+@@ -1659,6 +1659,7 @@
+     my($a_rr, $aaaa_rr);
+       # RFC 3986:  scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+     $mirror =~ s{^[a-z][a-z0-9.+-]*://}{}si;  # strip scheme like http://
++    $mirror =~ s{[:/].*}{}s;  # strip all starting from :port or /path
+     return 1 if $have_inet4 && do_dns_query($mirror, "A");
+     return 1 if $have_inet6 && do_dns_query($mirror, "AAAA");
+     return 0;

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch
new file mode 100644
index 00000000000..26d921a6e67
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch
@@ -0,0 +1,15 @@
+Bug: https://bugs.gentoo.org/677250
+Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7623
+
+--- a/sa-update.raw	2018/09/29 10:16:29	1842320
++++ b/sa-update.raw	2018/09/29 10:20:26	1842321
+@@ -1659,6 +1659,9 @@
+     my($a_rr, $aaaa_rr);
+       # RFC 3986:  scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+     $mirror =~ s{^[a-z][a-z0-9.+-]*://}{}si;  # strip scheme like http://
++    # No DNS check needed for IPv4 or IPv6 address literal
++    return 1 if $mirror =~ m{^\d+\.\d+\.\d+\.\d+(?:[:/]|$)};
++    return 1 if $mirror =~ m{^\[};
+     $mirror =~ s{[:/].*}{}s;  # strip all starting from :port or /path
+     return 1 if $have_inet4 && do_dns_query($mirror, "A");
+     return 1 if $have_inet6 && do_dns_query($mirror, "AAAA");

diff --git a/mail-filter/spamassassin/spamassassin-3.4.2-r5.ebuild b/mail-filter/spamassassin/spamassassin-3.4.2-r5.ebuild
new file mode 100644
index 00000000000..2162b9ce2b6
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.2-r5.ebuild
@@ -0,0 +1,286 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-functions systemd toolchain-funcs user eapi7-ver
+
+MY_P="Mail-SpamAssassin-${PV//_/-}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="An extensible mail filter which can identify and tag spam"
+HOMEPAGE="https://spamassassin.apache.org/"
+SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
+
+# The Makefile.PL script checks for dependencies, but only fails if a
+# required (i.e. not optional) dependency is missing. We therefore
+# require most of the optional modules only at runtime.
+REQDEPEND="dev-lang/perl:=
+	dev-perl/HTML-Parser
+	dev-perl/Net-DNS
+	dev-perl/NetAddr-IP
+	virtual/perl-Archive-Tar
+	virtual/perl-Digest-SHA
+	virtual/perl-IO-Zlib
+	virtual/perl-Time-HiRes
+	ssl? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl )
+	)"
+
+# SpamAssassin doesn't use libwww-perl except as a fallback for when
+# curl/wget are missing, so we depend on one of those instead. Some
+# mirrors use https, so we need those utilities to support SSL.
+#
+# re2c is needed to compile the rules (sa-compile).
+#
+# We still need the old Digest-SHA1 because razor2 has not been ported
+# to Digest-SHA.
+OPTDEPEND="app-crypt/gnupg
+	dev-perl/BSD-Resource
+	dev-perl/Digest-SHA1
+	dev-perl/Encode-Detect
+	dev-perl/Geo-IP
+	dev-perl/HTTP-Date
+	dev-perl/Mail-DKIM
+	dev-perl/Mail-SPF
+	dev-perl/Net-Patricia
+	dev-perl/Net-CIDR-Lite
+	dev-util/re2c
+	|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
+	virtual/perl-MIME-Base64
+	virtual/perl-Pod-Parser
+	berkdb? ( virtual/perl-DB_File )
+	ipv6? ( dev-perl/IO-Socket-INET6 )
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ssl? ( dev-perl/IO-Socket-SSL )"
+
+DEPEND="${REQDEPEND}
+	test? (
+		${OPTDEPEND}
+		virtual/perl-Test-Harness
+	)"
+RDEPEND="${REQDEPEND} ${OPTDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/spamassassin-3.4.2-bug_7631.patch"
+	"${FILESDIR}/spamassassin-3.4.2-bug_7632.patch"
+	"${FILESDIR}/spamassassin-3.4.2-bug_7623_p1.patch"
+	"${FILESDIR}/spamassassin-3.4.2-bug_7623_p2.patch"
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
+
+	# Upstream bug 7622: this thing needs network access but doesn't
+	# respect the 'run_net_tests' setting.
+	perl_rm_files t/urilocalbl_geoip.t \
+		|| die 'failed to remove urilocalbl_geoip tests'
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	emake install
+	einstalldocs
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	dosym mail/spamassassin /etc/spamassassin
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}/etc/mail/spamassassin/init.pre" \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+							 "${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+
+	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
+		sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod || die "failed to remove perllocal.pod"
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist || die "failed to fix paths in packlist"
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	# The spamd daemon runs as this user. Use a real home directory so
+	# that it can hold SA configuration.
+	enewuser spamd -1 -1 /home/spamd
+
+	if use mysql || use postgres ; then
+		local _awlwarn=0
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ! ver_test "${_v}" -gt "3.4.2-r3"; then
+				_awlwarn=1
+			fi
+		done
+		if [[ ${_awlwarn} == 1 ]] ; then
+			ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.'
+			ewarn 'You will need to manually ALTER your tables for them to'
+			ewarn 'continue working.  See the UPGRADE documentation for'
+			ewarn 'details.'
+			ewarn
+		fi
+	fi
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+
+	if use mysql || use postgres ; then
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.2-r3"; then
+				ewarn
+				ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.'
+				ewarn 'You will need to manually ALTER your tables for them to'
+				ewarn 'continue working.  See the UPGRADE documentation for'
+				ewarn 'details.'
+				ewarn
+
+				# show this only once
+				break
+			fi
+		done
+	fi
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+	ewarn 'configuration file.'
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2020-03-15 17:52 Joonas Niilola
  0 siblings, 0 replies; 13+ messages in thread
From: Joonas Niilola @ 2020-03-15 17:52 UTC (permalink / raw
  To: gentoo-commits

commit:     d04c5d81f9165702939ffcaf1dda981b8c36d711
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Tue Feb 11 01:53:00 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Mar 15 17:51:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d04c5d81

mail-filter/spamassassin: Cleanup 3.4.2 ebuilds

Now that 3.4.4 has been stablized, remove old, vulnerable 3.4.2 ebuilds
and their associated extra files.

Closes: https://github.com/gentoo/gentoo/pull/14957
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 mail-filter/spamassassin/Manifest                  |   1 -
 .../files/spamassassin-3.4.2-bug_7623_p1.patch     |  13 -
 .../files/spamassassin-3.4.2-bug_7623_p2.patch     |  15 --
 .../files/spamassassin-3.4.2-bug_7631.patch        |  61 -----
 .../files/spamassassin-3.4.2-bug_7632.patch        |  20 --
 .../files/spamassassin.service.conf-r2             |   2 -
 .../files/update-spamassassin-rules.cron           |  38 ---
 .../spamassassin/spamassassin-3.4.2-r2.ebuild      | 247 ------------------
 .../spamassassin/spamassassin-3.4.2-r6.ebuild      | 287 ---------------------
 9 files changed, 684 deletions(-)

diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest
index 6b5b51cc48d..d8687a94a58 100644
--- a/mail-filter/spamassassin/Manifest
+++ b/mail-filter/spamassassin/Manifest
@@ -1,3 +1,2 @@
-DIST Mail-SpamAssassin-3.4.2.tar.bz2 2700016 BLAKE2B a29b4cfce5e578c07ec54b2224191917dc45bcefff071f674c572fc905f1d6324827bcc21c338546bdea11140fc20474a16314218e2fd4fa685965b0e0078df8 SHA512 fe3d9d1d7b9fed3063549afd071066729f1f4d998be91ded1e5afc29bb37c7a298dc5f8f99a282b75435d317b5b5072a81393134ccfe059a73d953e26a9c3885
 DIST Mail-SpamAssassin-3.4.3.tar.bz2 2739618 BLAKE2B cd77fc99cbec17f10c04f211e773fe2df9dd9c2efb54c9cc169f1fbfed884e74b77c96d8eee333af4bcefb05dee4519408b2e53e0c519734d582f95bad6030d6 SHA512 4d50b30a42d318c3a4c868b4940d1f56c329cc501270df12e1a369dd7de670c30f328a5fbc37dbd3b0d06538b9500085e920939c62de80ad6d8740bc47162cb0
 DIST Mail-SpamAssassin-3.4.4.tar.bz2 2741290 BLAKE2B 03dec6c71a43ad7d288a96de32fb61e81e2c793756c76b7c36ec34226483a35123cc291376e7c15ce73571e7de5967cee058a1b34932fd0f27632028d22b092b SHA512 7dfd0cf3426df683f608218da8881538a24e833024f2a1eb0f8513bdf3e4bc6ac48198c4f380efe024a01ae7b6a5ab9d76205cec185d0e4818f1cc79bda0ea3f

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch
deleted file mode 100644
index d0fe21bf9ef..00000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p1.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Bug: https://bugs.gentoo.org/677250
-Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7623
-
---- a/sa-update.raw	2018/09/29 09:33:52	1842302
-+++ b/sa-update.raw	2018/09/29 09:41:24	1842303
-@@ -1659,6 +1659,7 @@
-     my($a_rr, $aaaa_rr);
-       # RFC 3986:  scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
-     $mirror =~ s{^[a-z][a-z0-9.+-]*://}{}si;  # strip scheme like http://
-+    $mirror =~ s{[:/].*}{}s;  # strip all starting from :port or /path
-     return 1 if $have_inet4 && do_dns_query($mirror, "A");
-     return 1 if $have_inet6 && do_dns_query($mirror, "AAAA");
-     return 0;

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch
deleted file mode 100644
index 26d921a6e67..00000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7623_p2.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Bug: https://bugs.gentoo.org/677250
-Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7623
-
---- a/sa-update.raw	2018/09/29 10:16:29	1842320
-+++ b/sa-update.raw	2018/09/29 10:20:26	1842321
-@@ -1659,6 +1659,9 @@
-     my($a_rr, $aaaa_rr);
-       # RFC 3986:  scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
-     $mirror =~ s{^[a-z][a-z0-9.+-]*://}{}si;  # strip scheme like http://
-+    # No DNS check needed for IPv4 or IPv6 address literal
-+    return 1 if $mirror =~ m{^\d+\.\d+\.\d+\.\d+(?:[:/]|$)};
-+    return 1 if $mirror =~ m{^\[};
-     $mirror =~ s{[:/].*}{}s;  # strip all starting from :port or /path
-     return 1 if $have_inet4 && do_dns_query($mirror, "A");
-     return 1 if $have_inet6 && do_dns_query($mirror, "AAAA");

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch
deleted file mode 100644
index 3c4bf403dc2..00000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-This upstream doc changes addresses 3.4.2 adding new rows to awl SQL
-tables.
-
-Upstream's UPGRADE diff is slightly different.  Their version is 
-applied to the 3.4.3 release notes (not yet released), ours applies
-to 3.4.2.
-
-Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7631
-Bug: https://bugs.gentoo.org/666576
-
---- a/UPGRADE	2018-10-28 15:43:45.744850026 -0400
-+++ b/UPGRADE	2018-10-28 15:47:52.805028626 -0400
-@@ -8,6 +8,13 @@
- 
- See https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7614
- 
-+- Added last_hit timestamp to Awl SQL schema.
-+  You should upgrade your sql database running the following command:
-+  MySQL:
-+  "ALTER TABLE `awl` ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;"
-+  PostgreSQL:
-+  "ALTER TABLE awl ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP;"
-+
- New plugins
- -----------
- 
---- a/sql/awl_mysql.sql	2018/10/21 12:10:09	1844484
-+++ b/sql/awl_mysql.sql	2018/10/21 12:10:40	1844485
-@@ -5,5 +5,6 @@
-   msgcount int(11) NOT NULL default '0',
-   totscore float NOT NULL default '0',
-   signedby varchar(255) NOT NULL default '',
-+  last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-   PRIMARY KEY (username,email,signedby,ip)
- ) ENGINE=InnoDB;
---- a/sql/awl_pg.sql	2018/10/21 12:10:09	1844484
-+++ b/sql/awl_pg.sql	2018/10/21 12:10:40	1844485
-@@ -5,8 +5,22 @@
-   msgcount bigint NOT NULL default '0',
-   totscore float NOT NULL default '0',
-   signedby varchar(255) NOT NULL default '',
-+  last_hit timestamp NOT NULL default CURRENT_TIMESTAMP,
-   PRIMARY KEY (username,email,signedby,ip)
- );
- 
--ALTER TABLE awl SET (fillfactor=95);
-+create index awl_last_hit on awl (last_hit);
-+
-+create OR REPLACE function update_awl_last_hit()
-+RETURNS TRIGGER AS $$
-+BEGIN
-+  NEW.last_hit = CURRENT_TIMESTAMP;
-+  RETURN NEW;
-+END;
-+$$ language 'plpgsql';
- 
-+create TRIGGER update_awl_update_last_hit BEFORE UPDATE
-+ON awl FOR EACH ROW EXECUTE PROCEDURE
-+update_awl_last_hit();
-+
-+ALTER TABLE awl SET (fillfactor=95);

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch
deleted file mode 100644
index a9a065abd81..00000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7632.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-This upstream fix changes the informational message,
-
-  dns: new_dns_packet: domain is utf8 flagged...
-
-to a debug one. This should prevent it from being spammed in your logs
-a million times a day.
-
-Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7632
-
---- a/lib/Mail/SpamAssassin/DnsResolver.pm	2018/10/12 06:14:11	1843622
-+++ b/lib/Mail/SpamAssassin/DnsResolver.pm	2018/10/12 06:38:56	1843623
-@@ -547,7 +547,7 @@
-   eval {
- 
-     if (utf8::is_utf8($domain)) {  # since Perl 5.8.1
--      info("dns: new_dns_packet: domain is utf8 flagged: %s", $domain);
-+      dbg("dns: new_dns_packet: domain is utf8 flagged: %s", $domain);
-     }
- 
-     $domain =~ s/\.*\z/./s;

diff --git a/mail-filter/spamassassin/files/spamassassin.service.conf-r2 b/mail-filter/spamassassin/files/spamassassin.service.conf-r2
deleted file mode 100644
index 442dde44e07..00000000000
--- a/mail-filter/spamassassin/files/spamassassin.service.conf-r2
+++ /dev/null
@@ -1,2 +0,0 @@
-[Service]
-Environment="SPAMD_OPTS=--username=spamd --groupname=spamd --max-children=5 --create-prefs --helper-home-dir"

diff --git a/mail-filter/spamassassin/files/update-spamassassin-rules.cron b/mail-filter/spamassassin/files/update-spamassassin-rules.cron
deleted file mode 100644
index 1b36af0548d..00000000000
--- a/mail-filter/spamassassin/files/update-spamassassin-rules.cron
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-#
-# Update SpamAssassin rules and reload daemons that use them.
-#
-
-# First, redirect stdout to /dev/null.
-exec 1>/dev/null
-
-# Try to update the rules.
-sa-update
-
-# Exit code 0: all new updates were installed.
-# Exit code 1: we were already up-to-date.
-# Exit code 3: some updates were installed, but some weren't.
-# Any other exit code indicates failure.
-if (( $? == 0 || $? == 3 )); then
-    # Compilation spits out its progress onto stderr.
-    sa-compile 2>/dev/null
-
-    # Do you run spamd or amavisd? Both daemons need to be reloaded
-    # in order to pick up the newly-updated rules.
-    if command -v rc-service 2>/dev/null; then
-        # OpenRC is installed. These "status" checks should succeed
-        # only when the daemon is running under OpenRC. We redirect
-        # stderr to hide the lecture that OpenRC gives you if you
-        # try this on a system running systemd.
-        rc-service spamd status 2>/dev/null && rc-service spamd reload
-        rc-service amavisd status 2>/dev/null && rc-service amavisd reload
-    fi
-
-    if command -v systemctl 2>/dev/null; then
-        # The systemctl (systemd) executable is installed, so try to
-        # use it to restart spamd and amavisd. These are safe to run
-        # if systemd is installed but not in use.
-        systemctl try-restart spamassassin
-        systemctl try-restart amavisd
-    fi
-fi

diff --git a/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild b/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild
deleted file mode 100644
index a68f39a6a86..00000000000
--- a/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild
+++ /dev/null
@@ -1,247 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit perl-functions systemd toolchain-funcs user
-
-MY_P="Mail-SpamAssassin-${PV//_/-}"
-S="${WORKDIR}/${MY_P}"
-DESCRIPTION="An extensible mail filter which can identify and tag spam"
-HOMEPAGE="https://spamassassin.apache.org/"
-SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
-
-LICENSE="Apache-2.0 GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
-RESTRICT="!test? ( test )"
-
-# The Makefile.PL script checks for dependencies, but only fails if a
-# required (i.e. not optional) dependency is missing. We therefore
-# require most of the optional modules only at runtime.
-REQDEPEND="dev-lang/perl:=
-	dev-perl/HTML-Parser
-	dev-perl/Net-DNS
-	dev-perl/NetAddr-IP
-	virtual/perl-Archive-Tar
-	virtual/perl-Digest-SHA
-	virtual/perl-IO-Zlib
-	virtual/perl-Time-HiRes
-	ssl? (
-		!libressl? ( dev-libs/openssl:0= )
-		libressl? ( dev-libs/libressl )
-	)"
-
-# SpamAssassin doesn't use libwww-perl except as a fallback for when
-# curl/wget are missing, so we depend on one of those instead. Some
-# mirrors use https, so we need those utilities to support SSL.
-#
-# re2c is needed to compile the rules (sa-compile).
-#
-# We still need the old Digest-SHA1 because razor2 has not been ported
-# to Digest-SHA.
-OPTDEPEND="app-crypt/gnupg
-	dev-perl/Digest-SHA1
-	dev-perl/Encode-Detect
-	dev-perl/Geo-IP
-	dev-perl/HTTP-Date
-	dev-perl/Mail-DKIM
-	dev-perl/Mail-SPF
-	dev-perl/Net-Patricia
-	dev-perl/Net-CIDR-Lite
-	dev-util/re2c
-	|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
-	virtual/perl-MIME-Base64
-	virtual/perl-Pod-Parser
-	berkdb? ( virtual/perl-DB_File )
-	ipv6? ( dev-perl/IO-Socket-INET6 )
-	ldap? ( dev-perl/perl-ldap )
-	mysql? (
-		dev-perl/DBI
-		dev-perl/DBD-mysql
-	)
-	postgres? (
-		dev-perl/DBI
-		dev-perl/DBD-Pg
-	)
-	sqlite? (
-		dev-perl/DBI
-		dev-perl/DBD-SQLite
-	)
-	ssl? ( dev-perl/IO-Socket-SSL )"
-
-DEPEND="${REQDEPEND}
-	test? (
-		${OPTDEPEND}
-		virtual/perl-Test-Harness
-	)"
-RDEPEND="${REQDEPEND} ${OPTDEPEND}"
-
-PATCHES=( "${FILESDIR}/spamassassin-3.4.2-bug_7632.patch" )
-
-src_prepare() {
-	default
-
-	# The sa_compile test does some weird stuff like hopping around in
-	# the directory tree and calling "make" to create a dist tarball
-	# from ${S}. It fails, and is more trouble than it's worth...
-	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
-
-	# The spamc tests (which need the networked spamd daemon) fail for
-	# irrelevant reasons. It's too hard to disable them (unlike the
-	# spamd tests themselves -- see src_test), so use a crude
-	# workaround.
-	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
-
-	# Upstream bug 7622: this thing needs network access but doesn't
-	# respect the 'run_net_tests' setting.
-	perl_rm_files t/urilocalbl_geoip.t \
-		|| die 'failed to remove urilocalbl_geoip tests'
-}
-
-src_configure() {
-	# This is how and where the perl-module eclass disables the
-	# MakeMaker interactive prompt.
-	export PERL_MM_USE_DEFAULT=1
-
-	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
-	# (just to be sure, nobody knows how it could happen in the first place).
-	#
-	# We also set the path to the perl executable explictly. This will be
-	# used to create the initial shebang line in the scripts (bug 62276).
-	perl Makefile.PL \
-		PREFIX="${EPREFIX}/usr" \
-		INSTALLDIRS=vendor \
-		SYSCONFDIR="${EPREFIX}/etc" \
-		DATADIR="${EPREFIX}/usr/share/spamassassin" \
-		PERL_BIN="${EPREFIX}/usr/bin/perl" \
-		ENABLE_SSL="$(usex ssl)" \
-		DESTDIR="${D}" \
-		|| die 'failed to create a Makefile using Makefile.PL'
-
-	# Now configure spamc.
-	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
-}
-
-src_compile() {
-	emake
-	use qmail && emake spamc/qmail-spamc
-}
-
-src_install() {
-	emake install
-	einstalldocs
-
-	# Create the stub dir used by sa-update and friends
-	keepdir /var/lib/spamassassin
-
-	# Move spamd to sbin where it belongs.
-	dodir /usr/sbin
-	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
-
-	if use qmail; then
-		dobin spamc/qmail-spamc
-	fi
-
-	dosym mail/spamassassin /etc/spamassassin
-
-	# Disable plugin by default
-	sed -i -e 's/^loadplugin/\#loadplugin/g' \
-		"${ED}/etc/mail/spamassassin/init.pre" \
-		|| die "failed to disable plugins by default"
-
-	# Add the init and config scripts.
-	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
-	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
-
-	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
-	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
-							 "${PN}.service"
-
-	use postgres && dodoc sql/*_pg.sql
-	use mysql && dodoc sql/*_mysql.sql
-
-	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
-		sql/README.awl procmailrc.example sample-nonspam.txt \
-		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
-		spamd-apache2/README.apache
-
-	# Rename some files so that they don't clash with others.
-	newdoc spamd/README README.spamd
-	newdoc sql/README README.sql
-	newdoc ldap/README README.ldap
-
-	if use qmail; then
-		dodoc spamc/README.qmail
-	fi
-
-	insinto /etc/mail/spamassassin/
-	insopts -m0400
-	newins "${FILESDIR}"/secrets.cf secrets.cf.example
-
-	# Create the directory where sa-update stores its GPG key (if you
-	# choose to import one). If this directory does not exist, the
-	# import will fail. This is bug 396307. We expect that the import
-	# will be performed as root, and making the directory accessible
-	# only to root prevents a warning on the command-line.
-	diropts -m0700
-	dodir /etc/mail/spamassassin/sa-update-keys
-
-	if use cron; then
-		# Install the cron job if they want it.
-		exeinto /etc/cron.daily
-		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
-			   update-spamassassin-rules
-	fi
-
-	# Remove perllocal.pod to avoid file collisions (bug #603338).
-	perl_delete_localpod || die "failed to remove perllocal.pod"
-
-	# The perl-module eclass calls three other functions to clean
-	# up in src_install. The first fixes references to ${D} in the
-	# packlist, and is useful to us, too. The other two functions,
-	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
-	# to be needed: there are no empty directories, *.bs files, or
-	# ${D} paths remaining in our installed image.
-	perl_fix_packlist || die "failed to fix paths in packlist"
-}
-
-src_test() {
-	# Trick the test suite into skipping the spamd tests. Setting
-	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
-	# set in SATest.pm.
-	export SPAMD_HOST=disabled
-	default
-}
-
-pkg_preinst() {
-	# The spamd daemon runs as this user. Use a real home directory so
-	# that it can hold SA configuration.
-	enewuser spamd -1 -1 /home/spamd
-}
-
-pkg_postinst() {
-	elog
-	elog 'No rules are installed by default. You will need to run sa-update'
-	elog 'at least once, and most likely configure SpamAssassin before it'
-	elog 'will work.'
-
-	if ! use cron; then
-		elog
-		elog 'You should consider a cron job for sa-update. One is provided'
-		elog 'for daily updates if you enable the "cron" USE flag.'
-	fi
-	elog
-	elog 'Configuration and update help can be found on the wiki:'
-	elog
-	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
-	elog
-
-	ewarn 'If this version of SpamAssassin causes permissions issues'
-	ewarn 'with your user configurations or bayes databases, then you'
-	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
-	ewarn 'configuration file, or remove the --username and --groupname'
-	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
-	ewarn 'configuration file.'
-}

diff --git a/mail-filter/spamassassin/spamassassin-3.4.2-r6.ebuild b/mail-filter/spamassassin/spamassassin-3.4.2-r6.ebuild
deleted file mode 100644
index 07de81c0dbe..00000000000
--- a/mail-filter/spamassassin/spamassassin-3.4.2-r6.ebuild
+++ /dev/null
@@ -1,287 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit perl-functions systemd toolchain-funcs user eapi7-ver
-
-MY_P="Mail-SpamAssassin-${PV//_/-}"
-S="${WORKDIR}/${MY_P}"
-DESCRIPTION="An extensible mail filter which can identify and tag spam"
-HOMEPAGE="https://spamassassin.apache.org/"
-SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
-
-LICENSE="Apache-2.0 GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
-RESTRICT="!test? ( test )"
-
-# The Makefile.PL script checks for dependencies, but only fails if a
-# required (i.e. not optional) dependency is missing. We therefore
-# require most of the optional modules only at runtime.
-REQDEPEND="dev-lang/perl:=
-	dev-perl/HTML-Parser
-	dev-perl/Net-DNS
-	dev-perl/NetAddr-IP
-	virtual/perl-Archive-Tar
-	virtual/perl-Digest-SHA
-	virtual/perl-IO-Zlib
-	virtual/perl-Time-HiRes
-	ssl? (
-		!libressl? ( dev-libs/openssl:0= )
-		libressl? ( dev-libs/libressl )
-	)"
-
-# SpamAssassin doesn't use libwww-perl except as a fallback for when
-# curl/wget are missing, so we depend on one of those instead. Some
-# mirrors use https, so we need those utilities to support SSL.
-#
-# re2c is needed to compile the rules (sa-compile).
-#
-# We still need the old Digest-SHA1 because razor2 has not been ported
-# to Digest-SHA.
-OPTDEPEND="app-crypt/gnupg
-	dev-perl/BSD-Resource
-	dev-perl/Digest-SHA1
-	dev-perl/Encode-Detect
-	dev-perl/Geo-IP
-	dev-perl/HTTP-Date
-	dev-perl/Mail-DKIM
-	dev-perl/Mail-SPF
-	dev-perl/Net-Patricia
-	dev-perl/Net-CIDR-Lite
-	dev-util/re2c
-	|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
-	virtual/perl-MIME-Base64
-	virtual/perl-Pod-Parser
-	berkdb? ( virtual/perl-DB_File )
-	ipv6? ( dev-perl/IO-Socket-INET6 )
-	ldap? ( dev-perl/perl-ldap )
-	mysql? (
-		dev-perl/DBI
-		dev-perl/DBD-mysql
-	)
-	postgres? (
-		dev-perl/DBI
-		dev-perl/DBD-Pg
-	)
-	sqlite? (
-		dev-perl/DBI
-		dev-perl/DBD-SQLite
-	)
-	ssl? ( dev-perl/IO-Socket-SSL )"
-
-DEPEND="${REQDEPEND}
-	test? (
-		${OPTDEPEND}
-		virtual/perl-Test-Harness
-	)"
-RDEPEND="${REQDEPEND} ${OPTDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/spamassassin-3.4.2-bug_7631.patch"
-	"${FILESDIR}/spamassassin-3.4.2-bug_7632.patch"
-	"${FILESDIR}/spamassassin-3.4.2-bug_7623_p1.patch"
-	"${FILESDIR}/spamassassin-3.4.2-bug_7623_p2.patch"
-)
-
-src_prepare() {
-	default
-
-	# The sa_compile test does some weird stuff like hopping around in
-	# the directory tree and calling "make" to create a dist tarball
-	# from ${S}. It fails, and is more trouble than it's worth...
-	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
-
-	# The spamc tests (which need the networked spamd daemon) fail for
-	# irrelevant reasons. It's too hard to disable them (unlike the
-	# spamd tests themselves -- see src_test), so use a crude
-	# workaround.
-	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
-
-	# Upstream bug 7622: this thing needs network access but doesn't
-	# respect the 'run_net_tests' setting.
-	perl_rm_files t/urilocalbl_geoip.t \
-		|| die 'failed to remove urilocalbl_geoip tests'
-}
-
-src_configure() {
-	# This is how and where the perl-module eclass disables the
-	# MakeMaker interactive prompt.
-	export PERL_MM_USE_DEFAULT=1
-
-	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
-	# (just to be sure, nobody knows how it could happen in the first place).
-	#
-	# We also set the path to the perl executable explictly. This will be
-	# used to create the initial shebang line in the scripts (bug 62276).
-	perl Makefile.PL \
-		PREFIX="${EPREFIX}/usr" \
-		INSTALLDIRS=vendor \
-		SYSCONFDIR="${EPREFIX}/etc" \
-		DATADIR="${EPREFIX}/usr/share/spamassassin" \
-		PERL_BIN="${EPREFIX}/usr/bin/perl" \
-		ENABLE_SSL="$(usex ssl)" \
-		DESTDIR="${D}" \
-		|| die 'failed to create a Makefile using Makefile.PL'
-
-	# Now configure spamc.
-	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
-}
-
-src_compile() {
-	emake
-	use qmail && emake spamc/qmail-spamc
-}
-
-src_install() {
-	emake install
-	einstalldocs
-
-	# Create the stub dir used by sa-update and friends
-	keepdir /var/lib/spamassassin
-
-	# Move spamd to sbin where it belongs.
-	dodir /usr/sbin
-	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
-
-	if use qmail; then
-		dobin spamc/qmail-spamc
-	fi
-
-	dosym mail/spamassassin /etc/spamassassin
-
-	# Disable plugin by default
-	sed -i -e 's/^loadplugin/\#loadplugin/g' \
-		"${ED}/etc/mail/spamassassin/init.pre" \
-		|| die "failed to disable plugins by default"
-
-	# Add the init and config scripts.
-	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
-	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
-
-	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
-	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
-							 "${PN}.service"
-
-	use postgres && dodoc sql/*_pg.sql
-	use mysql && dodoc sql/*_mysql.sql
-
-	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
-		sql/README.awl procmailrc.example sample-nonspam.txt \
-		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
-		spamd-apache2/README.apache
-
-	# Rename some files so that they don't clash with others.
-	newdoc spamd/README README.spamd
-	newdoc sql/README README.sql
-	newdoc ldap/README README.ldap
-
-	if use qmail; then
-		dodoc spamc/README.qmail
-	fi
-
-	insinto /etc/mail/spamassassin/
-	insopts -m0400
-	newins "${FILESDIR}"/secrets.cf secrets.cf.example
-
-	# Create the directory where sa-update stores its GPG key (if you
-	# choose to import one). If this directory does not exist, the
-	# import will fail. This is bug 396307. We expect that the import
-	# will be performed as root, and making the directory accessible
-	# only to root prevents a warning on the command-line.
-	diropts -m0700
-	dodir /etc/mail/spamassassin/sa-update-keys
-
-	if use cron; then
-		# Install the cron job if they want it.
-		exeinto /etc/cron.daily
-		newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
-			   update-spamassassin-rules
-	fi
-
-	# Remove perllocal.pod to avoid file collisions (bug #603338).
-	perl_delete_localpod || die "failed to remove perllocal.pod"
-
-	# The perl-module eclass calls three other functions to clean
-	# up in src_install. The first fixes references to ${D} in the
-	# packlist, and is useful to us, too. The other two functions,
-	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
-	# to be needed: there are no empty directories, *.bs files, or
-	# ${D} paths remaining in our installed image.
-	perl_fix_packlist || die "failed to fix paths in packlist"
-}
-
-src_test() {
-	# Trick the test suite into skipping the spamd tests. Setting
-	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
-	# set in SATest.pm.
-	export SPAMD_HOST=disabled
-	default
-}
-
-pkg_preinst() {
-	# The spamd daemon runs as this user. Use a real home directory so
-	# that it can hold SA configuration.
-	enewuser spamd -1 -1 /home/spamd
-
-	if use mysql || use postgres ; then
-		local _awlwarn=0
-		local _v
-		for _v in ${REPLACING_VERSIONS}; do
-			if ! ver_test "${_v}" -gt "3.4.2-r3"; then
-				_awlwarn=1
-			fi
-		done
-		if [[ ${_awlwarn} == 1 ]] ; then
-			ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.'
-			ewarn 'You will need to manually ALTER your tables for them to'
-			ewarn 'continue working.  See the UPGRADE documentation for'
-			ewarn 'details.'
-			ewarn
-		fi
-	fi
-}
-
-pkg_postinst() {
-	elog
-	elog 'No rules are installed by default. You will need to run sa-update'
-	elog 'at least once, and most likely configure SpamAssassin before it'
-	elog 'will work.'
-
-	if ! use cron; then
-		elog
-		elog 'You should consider a cron job for sa-update. One is provided'
-		elog 'for daily updates if you enable the "cron" USE flag.'
-	fi
-	elog
-	elog 'Configuration and update help can be found on the wiki:'
-	elog
-	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
-	elog
-
-	if use mysql || use postgres ; then
-		local _v
-		for _v in ${REPLACING_VERSIONS}; do
-			if ver_test "${_v}" -lt "3.4.2-r3"; then
-				ewarn
-				ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.'
-				ewarn 'You will need to manually ALTER your tables for them to'
-				ewarn 'continue working.  See the UPGRADE documentation for'
-				ewarn 'details.'
-				ewarn
-
-				# show this only once
-				break
-			fi
-		done
-	fi
-
-	ewarn 'If this version of SpamAssassin causes permissions issues'
-	ewarn 'with your user configurations or bayes databases, then you'
-	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
-	ewarn 'configuration file, or remove the --username and --groupname'
-	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
-	ewarn 'configuration file.'
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2022-12-27 11:40 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2022-12-27 11:40 UTC (permalink / raw
  To: gentoo-commits

commit:     1efbfdb8f511050dd9f5c2332cc8a70df5087104
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Mon Dec 26 20:33:48 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 11:39:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1efbfdb8

mail-filter/spamassassin: Patch dnsbl_subtests.t test failure

Posted fix to upstream:
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8095

Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch  | 14 ++++++++++++++
 mail-filter/spamassassin/spamassassin-4.0.0.ebuild         |  1 +
 2 files changed, 15 insertions(+)

diff --git a/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch
new file mode 100644
index 000000000000..6f2a4db0ad5c
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch
@@ -0,0 +1,14 @@
+https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8095
+--- a/t/dnsbl_subtests.t
++++ b/t/dnsbl_subtests.t
+@@ -20,6 +20,10 @@
+ 
+ use Mail::SpamAssassin;
+ 
++tstpre ("
++  loadplugin Mail::SpamAssassin::Plugin::URIDNSBL
++");
++
+ # Bug 5761 (no 127.0.0.1 in jail, use SPAMD_LOCALHOST if specified)
+ my $dns_server_localaddr = $ENV{'SPAMD_LOCALHOST'};
+ if (!$dns_server_localaddr) {

diff --git a/mail-filter/spamassassin/spamassassin-4.0.0.ebuild b/mail-filter/spamassassin/spamassassin-4.0.0.ebuild
index 791fc6f3e7f4..5670fd623a56 100644
--- a/mail-filter/spamassassin/spamassassin-4.0.0.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.0.ebuild
@@ -90,6 +90,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/spamassassin.apache.
 
 PATCHES=(
 	"${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
+	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch"
 )
 
 # There are a few renames and use-dependent ones in src_install as well.


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2023-06-25  1:51 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2023-06-25  1:51 UTC (permalink / raw
  To: gentoo-commits

commit:     027efce6c1c2bef176302c1ecd873079175dbbd8
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Sun Jun 25 00:28:51 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 25 01:51:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=027efce6

mail-filter/spamassassin: Fix issues with Perl Net::DNS 1.38

Closes: https://bugs.gentoo.org/909086
Closes: https://github.com/gentoo/gentoo/pull/31599
Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/4.0.0-DnsResolver-udpsize.patch          |  16 +
 .../spamassassin/spamassassin-4.0.0-r3.ebuild      | 339 +++++++++++++++++++++
 2 files changed, 355 insertions(+)

diff --git a/mail-filter/spamassassin/files/4.0.0-DnsResolver-udpsize.patch b/mail-filter/spamassassin/files/4.0.0-DnsResolver-udpsize.patch
new file mode 100644
index 000000000000..a9462c21433e
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-DnsResolver-udpsize.patch
@@ -0,0 +1,16 @@
+https://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/DnsResolver.pm?r1=1909910&r2=1909909&pathrev=1909910
+--- a/lib/Mail/SpamAssassin/DnsResolver.pm
++++ b/lib/Mail/SpamAssassin/DnsResolver.pm
+@@ -599,7 +599,11 @@
+     my $udp_payload_size = $self->{conf}->{dns_options}->{edns};
+     if ($udp_payload_size && $udp_payload_size > 512) {
+       # dbg("dns: adding EDNS ext, UDP payload size %d", $udp_payload_size);
+-      $packet->edns->size($udp_payload_size);
++      if ($packet->edns->can('udpsize')) { # since Net::DNS 1.38
++        $packet->edns->udpsize($udp_payload_size);
++      } else {
++        $packet->edns->size($udp_payload_size);
++      }
+     }
+   }
+ 

diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild b/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild
new file mode 100644
index 000000000000..9b86ff3d9824
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild
@@ -0,0 +1,339 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit perl-functions systemd toolchain-funcs verify-sig autotools
+
+MY_P="Mail-SpamAssassin-${PV//_/-}"
+DESCRIPTION="An extensible mail filter which can identify and tag spam"
+HOMEPAGE="https://spamassassin.apache.org/"
+SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2
+	verify-sig? (
+		https://downloads.apache.org/spamassassin/source/${MY_P}.tar.bz2.asc
+	)
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="berkdb cron ipv6 ldap mysql postgres qmail sqlite ssl test"
+RESTRICT="!test? ( test )"
+
+# The Makefile.PL script checks for dependencies, but only fails if a
+# required (i.e. not optional) dependency is missing. We therefore
+# require most of the optional modules only at runtime.
+REQDEPEND="acct-user/spamd
+	acct-group/spamd
+	dev-lang/perl:=
+	dev-perl/HTML-Parser
+	dev-perl/Net-DNS
+	dev-perl/NetAddr-IP
+	virtual/perl-Digest-SHA
+	ssl? (
+		dev-libs/openssl:0=
+	)"
+
+# SpamAssassin doesn't use libwww-perl except as a fallback for when
+# curl/wget are missing, so we depend on one of those instead. Some
+# mirrors use https, so we need those utilities to support SSL.
+#
+# re2c is needed to compile the rules (sa-compile).
+#
+# We still need the old Digest-SHA1 because razor2 has not been ported
+# to Digest-SHA.
+OPTDEPEND="app-crypt/gnupg
+	dev-perl/Archive-Zip
+	dev-perl/BSD-Resource
+	dev-perl/Digest-SHA1
+	dev-perl/Email-Address-XS
+	dev-perl/Encode-Detect
+	|| ( dev-perl/GeoIP2 dev-perl/Geo-IP )
+	dev-perl/IO-String
+	dev-perl/Mail-DKIM
+	dev-perl/Mail-DMARC
+	dev-perl/Mail-SPF
+	dev-perl/Net-Patricia
+	dev-perl/Net-LibIDN2
+	dev-util/re2c
+	|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
+	virtual/perl-MIME-Base64
+	dev-perl/Pod-Parser
+	berkdb? ( virtual/perl-DB_File )
+	ipv6? ( dev-perl/IO-Socket-INET6 )
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ssl? ( dev-perl/IO-Socket-SSL )"
+
+DEPEND="${REQDEPEND}
+	test? (
+		${OPTDEPEND}
+		virtual/perl-Test-Harness
+	)"
+RDEPEND="${REQDEPEND} ${OPTDEPEND}"
+BDEPEND="${RDEPEND}
+	verify-sig? ( sec-keys/openpgp-keys-spamassassin )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/spamassassin.apache.org.asc
+
+PATCHES=(
+	"${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
+	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch"
+	"${FILESDIR}/4.0.0-tests-strip2.t.patch"
+	"${FILESDIR}/4.0.0-DnsResolver-udpsize.patch"
+)
+
+# There are a few renames and use-dependent ones in src_install as well.
+DOCS=(
+	NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes
+	sql/README.awl procmailrc.example sample-nonspam.txt
+	sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail
+	spamd-apache2/README.apache
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t
+
+	# Some tests need extra dependencies
+	# e.g. t/sql_based_whitelist.t needs DBD
+	# This is kinder than REQUIRED_USE for tests which hurts automation
+	if ! use mysql && ! use postgres && ! use sqlite ; then
+		perl_rm_files t/sql_based_whitelist.t
+	fi
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"rules/init.pre" \
+		|| die "failed to disable plugins by default"
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+
+	# Run autoreconf to avoid some issues caused by a standard test in the
+	# current autoconf.  Expected to be fixed in next autoconf release, so
+	# these next 3 lines might not be needed for long.  See bug #899782.
+	pushd spamc >/dev/null
+	eautoreconf
+	popd >/dev/null
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	default
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	dosym mail/spamassassin /etc/spamassassin
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+		"${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+	use qmail && dodoc spamc/README.qmail
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	insinto /etc/mail/spamassassin/
+	newins "${FILESDIR}"/geoip-4.0.0.cf geoip.cf
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	if use mysql || use postgres ; then
+		local _awlwarn=0
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.3"; then
+				_awlwarn=1
+				break
+			fi
+		done
+		if [[ ${_awlwarn} == 1 ]] ; then
+			ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+			ewarn 'You will need to manually ALTER your tables for them to'
+			ewarn 'continue working.  See the UPGRADE documentation for'
+			ewarn 'details.'
+			ewarn
+		fi
+	fi
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+
+	if use mysql || use postgres ; then
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.3"; then
+				ewarn
+				ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+				ewarn 'You will need to manually ALTER your tables for them to'
+				ewarn 'continue working.  See the UPGRADE documentation for'
+				ewarn 'details.'
+				ewarn
+
+				# show this only once
+				break
+			fi
+		done
+	fi
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+	ewarn 'configuration file.'
+
+	if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
+		ewarn "The spamd user's home folder has been moved to a new location."
+		elog
+		elog "The acct-user/spamd package should have relocated it for you,"
+		elog "but may have failed because your spamd daemon was running."
+		elog
+		elog "To fix this:"
+		elog " - Stop your spamd daemon"
+		elog " - emerge -1 acct-user/spamd"
+		elog " - Restart your spamd daemon"
+		elog " - Remove the old home folder if you want"
+		elog "     rm -rf \"${ROOT}/home/spamd\""
+	fi
+	if [[ -e "${ROOT}/home/spamd" ]] ; then
+		ewarn
+		ewarn "The spamd user's home folder has been moved to a new location."
+		elog
+		elog "  Old Home: ${ROOT}/home/spamd"
+		elog "  New Home: ${ROOT}/var/lib/spamd"
+		elog
+		elog "You may wish to migrate your data to the new location:"
+		elog " - Stop your spamd daemon"
+		elog " - Re-emerge acct-user/spamd to ensure the home folder has been"
+		elog "   updated to the new location, now that the daemon isn't running:"
+		elog "     # emerge -1 acct-user/spamd"
+		elog "     # echo ~spamd"
+		elog " - Migrate the contents from the old location to the new home"
+		elog "   For example:"
+		elog "     # cp -Rpi \"${ROOT}/home/spamd/\" \"${ROOT}/var/lib/\""
+		elog " - Remove the old home folder"
+		elog "     # rm -rf \"${ROOT}/home/spamd\""
+		elog " - Restart your spamd daemon"
+		elog
+		elog "If you do not wish to migrate data, you should remove the old"
+		elog "home folder from your system as it is not used."
+	fi
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/
@ 2024-06-02  0:45 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2024-06-02  0:45 UTC (permalink / raw
  To: gentoo-commits

commit:     d60e190a701f2f95838f6a092b5cb0c82367b2e2
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Sat Jun  1 17:33:41 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun  2 00:42:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d60e190a

mail-filter/spamassassin: Fix dnsbl_subtests.t test w/o net

Fix pulled from upstream's 4.0.1 commit:
https://github.com/apache/spamassassin/commit/20c6a5a78e31877b3d4fa379d6a011d6112aabb9

Since we now have two patches to dnsbl_subtests.t, I've renamed the
pre-existing patch file and adjusted the 4.0.x ebuilds to use the new
name.

Closes: https://bugs.gentoo.org/931289
Closes: https://github.com/gentoo/gentoo/pull/36955
Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ... => 4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch} |  0
 .../files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch      | 12 ++++++++++++
 mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild        |  5 +++--
 mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild        |  5 +++--
 mail-filter/spamassassin/spamassassin-4.0.1.ebuild           |  2 +-
 5 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch
similarity index 100%
rename from mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch
rename to mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch

diff --git a/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch
new file mode 100644
index 000000000000..47bfea21b617
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch
@@ -0,0 +1,12 @@
+https://github.com/apache/spamassassin/commit/20c6a5a78e31877b3d4fa379d6a011d6112aabb9
+--- a/t/dnsbl_subtests.t
++++ b/t/dnsbl_subtests.t
+@@ -14,6 +14,8 @@ use Test::More;
+ 
+ use Errno qw(EADDRINUSE EACCES);
+ 
++plan skip_all => "Net tests disabled" unless conf_bool('run_net_tests');
++
+ use constant HAS_NET_DNS_NAMESERVER => eval { require Net::DNS::Nameserver; };
+ plan skip_all => "Net::DNS::Nameserver in unavailable on this system" unless (HAS_NET_DNS_NAMESERVER);
+ plan  tests => 46;

diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild b/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild
index ecbdfeb2c745..089338322055 100644
--- a/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -90,7 +90,8 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc
 
 PATCHES=(
 	"${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
-	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch"
+	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch"
+	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch"
 	"${FILESDIR}/4.0.0-tests-strip2.t.patch"
 	"${FILESDIR}/4.0.0-DnsResolver-udpsize.patch"
 )

diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
index c08c4884139a..a72db00639cb 100644
--- a/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -90,7 +90,8 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc
 
 PATCHES=(
 	"${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
-	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch"
+	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch"
+	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch"
 	"${FILESDIR}/4.0.0-tests-strip2.t.patch"
 	"${FILESDIR}/4.0.0-DnsResolver-udpsize.patch"
 	"${FILESDIR}/4.0.0-sa-update-rdatastr.patch"

diff --git a/mail-filter/spamassassin/spamassassin-4.0.1.ebuild b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
index 7ab67f06441d..d778722d02cc 100644
--- a/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
@@ -90,7 +90,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc
 
 PATCHES=(
 	"${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
-	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch"
+	"${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch"
 )
 
 # There are a few renames and use-dependent ones in src_install as well.


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-06-02  0:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-15 17:52 [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2024-06-02  0:45 Sam James
2023-06-25  1:51 Sam James
2022-12-27 11:40 Sam James
2019-03-02  5:01 Michael Orlitzky
2018-10-28 21:58 Thomas Deutschmann
2018-10-12 13:48 Michael Orlitzky
2017-11-01 18:55 Michael Orlitzky
2017-11-01 18:55 Michael Orlitzky
2017-08-20 14:35 Michael Orlitzky
2017-04-24  1:37 Michael Orlitzky
2016-06-05 22:37 Michael Orlitzky
2016-06-04 15:35 Michael Orlitzky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox