[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2024-06-01 Thread Sam James
commit: d60e190a701f2f95838f6a092b5cb0c82367b2e2
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Sat Jun  1 17:33:41 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jun  2 00:42:52 2024 +
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  parallaxshift.com>
Signed-off-by: Sam James  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 ..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 a

[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2023-06-24 Thread Sam James
commit: 027efce6c1c2bef176302c1ecd873079175dbbd8
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Sun Jun 25 00:28:51 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jun 25 01:51:27 2023 +
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  parallaxshift.com>
Signed-off-by: Sam James  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 ..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 ..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-dn

[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2022-12-27 Thread Sam James
commit: 1efbfdb8f511050dd9f5c2332cc8a70df5087104
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Mon Dec 26 20:33:48 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Dec 27 11:39:44 2022 +
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  parallaxshift.com>
Signed-off-by: Sam James  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 ..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.



[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2020-03-15 Thread Joonas Niilola
commit: d04c5d81f9165702939ffcaf1dda981b8c36d711
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Tue Feb 11 01:53:00 2020 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Sun Mar 15 17:51:50 2020 +
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  parallaxshift.com>
Signed-off-by: Joonas Niilola  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..000
--- 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.raw2018/09/29 09:33:52 1842302
-+++ b/sa-update.raw2018/09/29 09:41:24 1842303
-@@ -1659,6 +1659,7 @@
- my($a_rr, $_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, "");
- 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..000
--- 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.raw2018/09/29 10:16:29 1842320
-+++ b/sa-update.raw2018/09/29 10:20:26 1842321
-@@ -1659,6 +1659,9 @@
- my($a_rr, $_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, "");

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..000
--- 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 rele

[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2019-03-01 Thread Michael Orlitzky
commit: 5225641c114c95e5524d3794af84170ded43aada
Author: Marcin Mirosław  mejor  pl>
AuthorDate: Mon Feb 18 12:09:48 2019 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat Mar  2 05:00:36 2019 +
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  mejor.pl>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Michael Orlitzky  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 000..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.raw2018/09/29 09:33:52 1842302
 b/sa-update.raw2018/09/29 09:41:24 1842303
+@@ -1659,6 +1659,7 @@
+ my($a_rr, $_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, "");
+ 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 000..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.raw2018/09/29 10:16:29 1842320
 b/sa-update.raw2018/09/29 10:20:26 1842321
+@@ -1659,6 +1659,9 @@
+ my($a_rr, $_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, "");

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 000..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
+

[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2018-10-28 Thread Thomas Deutschmann
commit: 062c17593eacdd7c9f9e9789afe81f6ec6fa1021
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Sun Oct 28 19:29:51 2018 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Sun Oct 28 21:58:21 2018 +
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  parallaxshift.com>
Closes: https://github.com/gentoo/gentoo/pull/10285
Signed-off-by: Thomas Deutschmann  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 000..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.sql2018/10/21 12:10:09 1844484
 b/sql/awl_mysql.sql2018/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 000..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 fall

[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2018-10-12 Thread Michael Orlitzky
commit: 1222f435f35ff22d8ecbe284e4149695f1dbf620
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Fri Oct 12 13:34:57 2018 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Fri Oct 12 13:45:18 2018 +
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  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 000..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
 



[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2017-11-01 Thread Michael Orlitzky
commit: 7c925b49c0ac1bb08fb4e3f7666a571b9e076343
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Tue Oct 31 14:12:47 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Wed Nov  1 18:54:56 2017 +
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 000..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'

[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2017-11-01 Thread Michael Orlitzky
commit: 45323735d6f772c7060aa794594a2d88d9560fa6
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Wed Nov  1 03:14:31 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Wed Nov  1 18:54:57 2017 +
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 000..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 000..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.'
 }



[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/, profiles/

2017-08-23 Thread Michael Orlitzky
commit: 8fcc0c740d42cfd9ad0d2b0c0865ebda8ce768b2
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Wed Aug 23 11:55:16 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Wed Aug 23 12:19:19 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fcc0c74

mail-filter/spamassassin: Tweaks requested by @orlitzky

 - Add upstream bug URL to patch
   ( https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7462 )
 - Removed -r15 from package.mask
 - Unrequested: Renamed patch file now that there is an
   upstream bug to match the naming convention of the
   other patches

Gentoo-Bug: 627678

Package-Manager: Portage-2.3.6, Repoman-2.3.1

Signed-off-by: Michael Orlitzky  gentoo.org>

 ...ssassin-3.4.1-bug_627678.patch => spamassassin-3.4.1-bug_7462.patch} | 1 +
 mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild  | 2 +-
 profiles/package.mask   | 1 -
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_627678.patch 
b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch
similarity index 99%
rename from mail-filter/spamassassin/files/spamassassin-3.4.1-bug_627678.patch
rename to mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch
index 73765a939b0..bf4dc111acb 100644
--- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_627678.patch
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch
@@ -1,3 +1,4 @@
+https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7462
 https://bugs.gentoo.org/show_bug.cgi?id=627678
 --- Mail-SpamAssassin-3.4.1/t/basic_meta.t 2015-04-28 15:56:59.0 
-0400
 +++ Mail-SpamAssassin-3.4.1/t/basic_meta.t 2017-08-20 21:29:44.0 
-0400

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild
index a926f296f96..47d77f361f7 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild
@@ -84,8 +84,8 @@ PATCHES=(
"${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_627678.patch"
 )
 
 src_prepare() {

diff --git a/profiles/package.mask b/profiles/package.mask
index e875e4fd55d..373da90a718 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -46,7 +46,6 @@ app-arch/unrar-gpl
 # Masked until somebody who uses systemd tells me
 # I didn't break the service file or configuration.
 =mail-filter/spamassassin-3.4.1-r14
-=mail-filter/spamassassin-3.4.1-r15
 
 # Andreas Sturmlechner  (20 Aug 2017)
 # Masked for removal in 30 days. Use kde-apps/kio-extras[mtp,slp] instead.



[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2017-08-20 Thread Michael Orlitzky
commit: 52480637e8a4cd42cb671c02fdf1c122e387a3fe
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sun Aug 13 22:08:00 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sun Aug 20 14:32:43 2017 +
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 000..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 000..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-

[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2017-04-23 Thread Michael Orlitzky
commit: 3dd9f4f0d1d30ed1e47ac185ecd5267b6088ad28
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Mon Apr 24 01:25:30 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Mon Apr 24 01:37:21 2017 +
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 000..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  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  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  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.  Exa

[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2016-06-05 Thread Michael Orlitzky
commit: bd452f87c73fb1dfb3050d980cdbf53f0382b216
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sun Jun  5 22:20:19 2016 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sun Jun  5 22:33:00 2016 +
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 000..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 @@
 
   
   
-  Build qmail functionality and docs
-  
-Require a database (MySQL, SQLite, Postgres, or BerkDB) backend to
-enable the Bayesian filtering database.
-  
-
+
+  Require a database (MySQL, SQLite, Postgres, or BerkDB) backend
+  to enable the Bayesian filtering database.
+
+
+  Install a cron job to update SpamAssassin's rules daily.
+
+Build qmail functionality and docs
+  
 

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 000..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/G

[gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/, mail-filter/spamassassin/

2016-06-04 Thread Michael Orlitzky
commit: 19ff5b04b9db6b1319b35e9a6da3d26972bf04b5
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat Jun  4 15:13:03 2016 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat Jun  4 15:29:57 2016 +
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 000..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 000..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.