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

2023-06-25 Thread Sam James
commit: 4710ac53447ef3f753f9948849d0848bab51f7e2
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Sun Jun 25 19:11:33 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jun 25 19:21:51 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4710ac53

mail-filter/spamassassin: Fix sa-update rdatastr deprecation warning

Closes: https://bugs.gentoo.org/909158
Closes: https://github.com/gentoo/gentoo/pull/31606
Signed-off-by: Philippe Chaintreuil  parallaxshift.com>
Signed-off-by: Sam James  gentoo.org>

 .../files/4.0.0-sa-update-rdatastr.patch   |  12 +
 .../spamassassin/spamassassin-4.0.0-r4.ebuild  | 340 +
 2 files changed, 352 insertions(+)

diff --git a/mail-filter/spamassassin/files/4.0.0-sa-update-rdatastr.patch 
b/mail-filter/spamassassin/files/4.0.0-sa-update-rdatastr.patch
new file mode 100644
index ..415bc187865d
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-sa-update-rdatastr.patch
@@ -0,0 +1,12 @@
+https://svn.apache.org/viewvc/spamassassin/trunk/sa-update.raw?r1=1910601=1910600=1910601
+--- a/sa-update.raw
 b/sa-update.raw
+@@ -1458,7 +1458,7 @@
+   next if !$rr;  # no answer records, only rcode
+   next if $rr->type ne $rr_type;
+   # scalar context!
+-  my $text = $rr->UNIVERSAL::can('txtdata') ? $rr->txtdata : 
$rr->rdatastr;
++  my $text = $rr->UNIVERSAL::can('txtdata') ? $rr->txtdata : 
$rr->rdstring;
+   push(@result,$text)  if defined $text && $text ne '';
+ }
+ printf("DNS %s query: %s -> %s\n", $rr_type, $query, join(", ",@result))

diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild 
b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
new file mode 100644
index ..ef2e2c316414
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild
@@ -0,0 +1,340 @@
+# 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"
+   

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

2023-01-04 Thread Sam James
commit: 325ed1f8aca592694a776b3fc2095456b263964b
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Thu Dec 29 12:45:33 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Jan  5 05:19:34 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=325ed1f8

mail-filter/spamassassin: Install 4.0.0 compat geoip.cf

Closes: https://bugs.gentoo.org/45
Closes: https://github.com/gentoo/gentoo/pull/2
Signed-off-by: Philippe Chaintreuil  parallaxshift.com>
Signed-off-by: Sam James  gentoo.org>

 mail-filter/spamassassin/files/geoip-4.0.0.cf  |  86 ++
 .../spamassassin/spamassassin-4.0.0-r1.ebuild  | 331 +
 2 files changed, 417 insertions(+)

diff --git a/mail-filter/spamassassin/files/geoip-4.0.0.cf 
b/mail-filter/spamassassin/files/geoip-4.0.0.cf
new file mode 100644
index ..f4fc9802877a
--- /dev/null
+++ b/mail-filter/spamassassin/files/geoip-4.0.0.cf
@@ -0,0 +1,86 @@
+# GeoIP / RelayCountry Config
+#
+# The RelayCountry SpamAssassin plugin needs to be enabled
+# in init.pre, but it's suggested that you make configuration
+# changes here.
+#
+# See Also:
+# - https://wiki.apache.org/spamassassin/RelayCountryPlugin
+# - man Mail::SpamAssassin::Plugin::RelayCountry
+# - man Mail::SpamAssassin::Conf
+#
+# NOTE: This is a Gentoo supplied config file.
+#
+
+###
+#
+# CONFIGURATION
+#
+
+# Which type of Geo database to use.  Valid database types are
+# GeoIP2, Geo::IP, DB_File and Fast.  Tries them in that order
+# if not explicitly specified.  GeoIP2 is the suggested backend
+# which uses dev-perl/GeoIP2.
+#
+# Default: Autodetect
+#
+#geodb_module GeoIP2
+
+# Specifies which DB type and where it is, in
+# dbtype:/path/to/db format.  Multiple entries allowed.
+#
+# For GeoIP2 & GeoIP, geodb_options is only needed if the
+# default location search paths are insufficient.  (Default
+# search paths includes /usr/share/GeoIP/.)
+#
+# See man Mail::SpamAssassin::Conf for details about what is
+# accepted and searched.
+#
+# Default: Autodetect
+#
+#geodb_options country:/usr/share/GeoIP/GeoLite2-Country.mmdb
+
+# Alternative to geodb_options. Overrides the default list of
+# directories to search for default filenames.
+#
+# Default: Autodetect
+#
+#geodb_search_path /path/to/GeoIP
+
+# The following will add a separate MIME header that shows all
+# the message's relay countries, independent of any site-
+# specific rules.
+#
+# It will show up in your MIME headers as:
+#X-Spam-Relay-Country: US CN RU
+#
+#add_header all Relay-Country _RELAYCOUNTRY_
+
+###
+#
+# SITE SPECIFIC RULES
+#
+
+# Country metadata will also be added to the Bayesian filtering
+# process, allowing it to learn information based on countries.
+# This will occur even if you don't define any site specific
+# rules.
+
+# NOTE: Many prefer placing custom rules in local.cf.
+
+# The following is an example of a rule that penalizes mail
+# that passed through China by increasing the spam score
+# of the message by 3 points.
+#
+#header   RELAYCOUNTRY_BAD X-Relay-Countries =~ /CN/
+#describe RELAYCOUNTRY_BAD Relayed through China at some point
+#scoreRELAYCOUNTRY_BAD 3.0
+
+# And this is an example of a rule that rewards mail that
+# has first went through Finland or Sweden by reducing the
+# spam score of the message by 0.2 points.
+#
+#header   RELAYCOUNTRY_GOOD X-Relay-Countries =~ /^(FI|SE)/
+#describe RELAYCOUNTRY_GOOD First untrusted relay is Finland or Sweden :-)
+#scoreRELAYCOUNTRY_GOOD -0.2
+

diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r1.ebuild 
b/mail-filter/spamassassin/spamassassin-4.0.0-r1.ebuild
new file mode 100644
index ..d60b67416630
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-4.0.0-r1.ebuild
@@ -0,0 +1,331 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit perl-functions systemd toolchain-funcs verify-sig
+
+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="~alpha ~amd64 ~arm64 ~ia64 ~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:=
+   

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

2022-12-27 Thread Sam James
commit: 2d9f3361c8663d1bb0c189cd745bb75e7440724d
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Mon Dec 26 21:26:29 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Dec 27 11:39:44 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d9f3361

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

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

Closes: https://github.com/gentoo/gentoo/pull/28844
Signed-off-by: Philippe Chaintreuil  parallaxshift.com>
Signed-off-by: Sam James  gentoo.org>

 .../spamassassin/files/4.0.0-tests-strip2.t.patch| 20 
 mail-filter/spamassassin/spamassassin-4.0.0.ebuild   |  1 +
 2 files changed, 21 insertions(+)

diff --git a/mail-filter/spamassassin/files/4.0.0-tests-strip2.t.patch 
b/mail-filter/spamassassin/files/4.0.0-tests-strip2.t.patch
new file mode 100644
index ..94e1059259b5
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.0-tests-strip2.t.patch
@@ -0,0 +1,20 @@
+https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8096
+--- a/t/strip2.t
 b/t/strip2.t
+@@ -4,14 +4,15 @@
+ use SATest; sa_t_init("strip2");
+ 
+ use Test::More;
++use constant HAS_TEXTDIFF => eval { require Text::Diff; };
+ plan skip_all => 'Long running tests disabled' unless 
conf_bool('run_long_tests');
++plan skip_all => 'Need Text::Diff' unless HAS_TEXTDIFF;
+ plan tests => 98;
+ 
+ # ---
+ 
+ use File::Copy;
+ use File::Compare qw(compare_text);
+-use Text::Diff;
+ 
+ my @files = qw(
+   data/nice/crlf-endings

diff --git a/mail-filter/spamassassin/spamassassin-4.0.0.ebuild 
b/mail-filter/spamassassin/spamassassin-4.0.0.ebuild
index 5670fd623a56..1799185e12fa 100644
--- a/mail-filter/spamassassin/spamassassin-4.0.0.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.0.ebuild
@@ -91,6 +91,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"
+   "${FILESDIR}/4.0.0-tests-strip2.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/, mail-filter/spamassassin/files/

2022-11-19 Thread Sam James
commit: 540b27fe154c9355fe138d21fa7fc82549a3a055
Author: Sam James  gentoo  org>
AuthorDate: Sat Nov 19 23:16:40 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Nov 19 23:37:07 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=540b27fe

mail-filter/spamassassin: fix configure w/ clang 16

Signed-off-by: Sam James  gentoo.org>

 .../files/3.4.6-configure-clang16.patch| 44 ++
 4.6-r1.ebuild => spamassassin-3.4.6-r2.ebuild} |  3 +-
 2 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/mail-filter/spamassassin/files/3.4.6-configure-clang16.patch 
b/mail-filter/spamassassin/files/3.4.6-configure-clang16.patch
new file mode 100644
index ..cd69a546c71d
--- /dev/null
+++ b/mail-filter/spamassassin/files/3.4.6-configure-clang16.patch
@@ -0,0 +1,44 @@
+https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8073
+--- a/spamc/configure.in
 b/spamc/configure.in
+@@ -48,7 +48,9 @@ dnl 
--
+ AC_CACHE_CHECK([for SHUT_RD],
+shutrd, [
+ AC_TRY_COMPILE([#include 
+-#include ],
++#include 
++#include 
++],
+ [printf ("%d", SHUT_RD); return 0;],
+ [shutrd=yes],
+ [shutrd=no]),
+@@ -89,7 +91,8 @@ dnl 
--
+ 
+ AC_CACHE_CHECK([for h_errno],
+ herrno, [
+-AC_TRY_COMPILE([#include ],
++AC_TRY_COMPILE([#include 
++#include ],
+ [printf ("%d", h_errno); return 0;],
+ [herrno=yes],
+ [herrno=no]),
+diff --git a/spamc/configure b/spamc/configure
+index d8e5dcf..2e30ba4 100755
+--- a/spamc/configure
 b/spamc/configure
+@@ -3555,6 +3555,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include 
+ #include 
++#include 
+ int
+ main ()
+ {
+@@ -4253,6 +4254,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include 
++#include 
+ int
+ main ()
+ {

diff --git a/mail-filter/spamassassin/spamassassin-3.4.6-r1.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.6-r2.ebuild
similarity index 99%
rename from mail-filter/spamassassin/spamassassin-3.4.6-r1.ebuild
rename to mail-filter/spamassassin/spamassassin-3.4.6-r2.ebuild
index dccfae5da460..eead64d35fa0 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.6-r1.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.6-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -82,6 +82,7 @@ RDEPEND="${REQDEPEND} ${OPTDEPEND}"
 
 PATCHES=(
"${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
+   "${FILESDIR}/3.4.6-configure-clang16.patch"
 )
 
 # There are a few renames and use-dependent ones in src_istall as well.



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

2020-06-20 Thread Thomas Deutschmann
commit: 1671a7c121fda24998728ae93c43ccb148e727c8
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Thu May 21 00:46:18 2020 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Sat Jun 20 20:30:52 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1671a7c1

mail-filter/spamassassin: Add example geoip.cf

Bug: https://bugs.gentoo.org/675494
Closes: https://github.com/gentoo/gentoo/pull/16164
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Philippe Chaintreuil  parallaxshift.com>
Signed-off-by: Thomas Deutschmann  gentoo.org>

 mail-filter/spamassassin/files/geoip.cf|  70 +
 .../files/mention-geoip.cf-in-init.pre.patch   |  11 +
 .../spamassassin/spamassassin-3.4.4-r4.ebuild  | 315 +
 3 files changed, 396 insertions(+)

diff --git a/mail-filter/spamassassin/files/geoip.cf 
b/mail-filter/spamassassin/files/geoip.cf
new file mode 100644
index 000..733cba09ebc
--- /dev/null
+++ b/mail-filter/spamassassin/files/geoip.cf
@@ -0,0 +1,70 @@
+# GeoIP / RelayCountry Config
+#
+# The RelayCountry SpamAssassin plugin needs to be enabled
+# in init.pre, but it's suggested that you make configuration
+# changes here.
+#
+# See Also:
+# - https://wiki.apache.org/spamassassin/RelayCountryPlugin
+# - man Mail::SpamAssassin::Plugin::RelayCountry
+#
+# NOTE: This is a Gentoo supplied config file.
+#
+
+###
+#
+# CONFIGURATION
+#
+
+# Which type of Geo database to use.  Valid database types are
+# GeoIP, GeoIP2, DB_File and Fast.  Defaults to Fast, GeoIP2 is
+# the suggested backend which uses dev-perl/GeoIP2.
+#
+#country_db_type GeoIP2
+
+# Where to find MaxMind GeoIP2 or IP::Country::DB_File database.
+# The default is to search several paths, see the RelayCountry
+# man page referenced at the top for details.
+#
+# It's suggested you use net-misc/geoipupdate to install and
+# update your GeoIP2 databases.
+#
+#country_db_path /usr/share/GeoIP/GeoLite2-Country.mmdb
+
+# The following will add a separate MIME header that shows all
+# the message's relay countries, independent of any site-
+# specific rules.
+#
+# It will show up in your MIME headers as:
+#X-Spam-Relay-Country: US CN RU
+#
+#add_header all Relay-Country _RELAYCOUNTRY_
+
+###
+#
+# SITE SPECIFIC RULES
+#
+
+# Country metadata will also be added to the Bayesian filtering
+# process, allowing it to learn information based on countries.
+# This will occur even if you don't define any site specific
+# rules.
+
+# NOTE: Many prefer placing custom rules in local.cf.
+
+# The following is an example of a rule that penalizes mail
+# that passed through China by increasing the spam score
+# of the message by 3 points.
+#
+#header   RELAYCOUNTRY_BAD X-Relay-Countries =~ /CN/
+#describe RELAYCOUNTRY_BAD Relayed through China at some point
+#scoreRELAYCOUNTRY_BAD 3.0
+
+# And this is an example of a rule that rewards mail that
+# has first went through Finland or Sweden by reducing the
+# spam score of the message by 0.2 points.
+#
+#header   RELAYCOUNTRY_GOOD X-Relay-Countries =~ /^(FI|SE)/
+#describe RELAYCOUNTRY_GOOD First untrusted relay is Finland or Sweden :-)
+#scoreRELAYCOUNTRY_GOOD -0.2
+

diff --git a/mail-filter/spamassassin/files/mention-geoip.cf-in-init.pre.patch 
b/mail-filter/spamassassin/files/mention-geoip.cf-in-init.pre.patch
new file mode 100644
index 000..13921dc6eb9
--- /dev/null
+++ b/mail-filter/spamassassin/files/mention-geoip.cf-in-init.pre.patch
@@ -0,0 +1,11 @@
+--- Mail-SpamAssassin-3.4.4/rules/init.pre 2019-10-23 20:22:15.0 
-0400
 Mail-SpamAssassin-3.4.4/rules/init.pre 2020-05-20 19:59:42.239544414 
-0400
+@@ -17,7 +17,7 @@
+ # RelayCountry - add metadata for Bayes learning, marking the countries
+ # a message was relayed through
+ #
+-# Note: This requires the Geo::IP Perl module
++# Note: This requires geoip.cf to be edited.
+ #
+ # loadplugin Mail::SpamAssassin::Plugin::RelayCountry
+ 

diff --git a/mail-filter/spamassassin/spamassassin-3.4.4-r4.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.4-r4.ebuild
new file mode 100644
index 000..46ed9deca0b
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.4-r4.ebuild
@@ -0,0 +1,315 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit perl-functions systemd toolchain-funcs
+
+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 ~sparc ~x86 
~amd64-linux ~x86-linux ~x86-macos"
+IUSE="berkdb cron ipv6 ldap 

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

2019-03-31 Thread Michael Orlitzky
commit: 984199ed1fa7867c07f8a467d298eade11fa
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Sat Mar 30 12:41:44 2019 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sun Mar 31 18:46:19 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=984199ec

mail-filter/spamassassin: Suppress warning in cron in some setups

Suppress warning in cron job when the script tries to restart amavisd
on systemd systems where amavisd is not installed.

Closes: https://bugs.gentoo.org/681872
Closes: https://github.com/gentoo/gentoo/pull/11542
Signed-off-by: Philippe Chaintreuil  parallaxshift.com>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
Signed-off-by: Michael Orlitzky  gentoo.org>

 .../files/update-spamassassin-rules-r1.cron|  41 +++
 .../spamassassin/spamassassin-3.4.2-r6.ebuild  | 286 +
 2 files changed, 327 insertions(+)

diff --git a/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron 
b/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron
new file mode 100644
index 000..7c6990b847c
--- /dev/null
+++ b/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron
@@ -0,0 +1,41 @@
+#!/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.  The is-active
+   # check is to keep systemctl from outputting warnings if
+   # amavisd is not installed (bug #681872).
+systemctl try-restart spamassassin
+systemctl is-active --quiet amavisd \
+&& systemctl try-reload-or-restart amavisd
+fi
+fi

diff --git a/mail-filter/spamassassin/spamassassin-3.4.2-r6.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.2-r6.ebuild
new file mode 100644
index 000..4410b19bb12
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.2-r6.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
+   || ( 

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

2018-12-11 Thread Mikle Kolyada
commit: dc7e9cb73adc438aa7fc4c7b8ea090f9d9cdcd14
Author: Mikle Kolyada  gentoo  org>
AuthorDate: Tue Dec 11 10:19:10 2018 +
Commit: Mikle Kolyada  gentoo  org>
CommitDate: Tue Dec 11 10:19:30 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc7e9cb7

mail-filter/spamassassin: Security cleanup

Bug: https://bugs.gentoo.org/666348
Signed-off-by: Mikle Kolyada  gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 mail-filter/spamassassin/Manifest  |   1 -
 .../files/spamassassin-3.4.1-bug_7199.patch| 280 
 .../files/spamassassin-3.4.1-bug_7208.patch|  31 --
 .../files/spamassassin-3.4.1-bug_7223.patch|  14 -
 .../files/spamassassin-3.4.1-bug_7231-extra.patch  | 140 --
 .../files/spamassassin-3.4.1-bug_7231.patch|  29 --
 .../files/spamassassin-3.4.1-bug_7265.patch|  88 
 .../files/spamassassin-3.4.1-bug_7361.patch| 491 -
 .../files/spamassassin-3.4.1-bug_7404.patch|  23 -
 .../files/spamassassin-3.4.1-bug_7462.patch| 198 -
 .../files/spamassassin-3.4.1-perl526.patch |  14 -
 .../spamassassin/spamassassin-3.4.1-r19.ebuild | 251 ---
 .../spamassassin/spamassassin-3.4.1-r20.ebuild | 251 ---
 .../spamassassin/spamassassin-3.4.1-r21.ebuild | 252 ---
 14 files changed, 2063 deletions(-)

diff --git a/mail-filter/spamassassin/Manifest 
b/mail-filter/spamassassin/Manifest
index 6b7489e6f21..cd12a63fe12 100644
--- a/mail-filter/spamassassin/Manifest
+++ b/mail-filter/spamassassin/Manifest
@@ -1,2 +1 @@
-DIST Mail-SpamAssassin-3.4.1.tar.bz2 2710985 BLAKE2B 
f85b0ed2bae783bc6dfa39df36589a6cb90e6c657efcff1fa094f952847e4bcb24aa232b6689804bb1170204ae1d33216ed9bde207d7a7a6863410d8f847c391
 SHA512 
91d50e2ce6520e3e1c7bc66da133a0815be34ced15e26b6e6c17af5a03d5c62f41d8086f25f65084d6634497148cf5439977d7d4a44d7c3e307535beac6629af
 DIST Mail-SpamAssassin-3.4.2.tar.bz2 2700016 BLAKE2B 
a29b4cfce5e578c07ec54b2224191917dc45bcefff071f674c572fc905f1d6324827bcc21c338546bdea11140fc20474a16314218e2fd4fa685965b0e0078df8
 SHA512 
fe3d9d1d7b9fed3063549afd071066729f1f4d998be91ded1e5afc29bb37c7a298dc5f8f99a282b75435d317b5b5072a81393134ccfe059a73d953e26a9c3885

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
deleted file mode 100644
index 323740cbb04..000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7199.patch
+++ /dev/null
@@ -1,280 +0,0 @@
-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) {
-+

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

2018-03-17 Thread Michał Górny
commit: 42816e185f90512ffc22d815f3ed851848146dc1
Author: Philippe Chaintreuil  parallaxshift  com>
AuthorDate: Fri Mar 16 14:19:38 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Mar 17 22:48:45 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42816e18

mail-filter/spamassassin: fix URILocalBL failing to load

Apply upstream patch[1] from SA Bug #7208[2].

[1]:https://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm?r1=1684653=1684652=1684653=patch
[2]:https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7208

Closes: https://bugs.gentoo.org/650638
Closes: https://github.com/gentoo/gentoo/pull/7476
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../files/spamassassin-3.4.1-bug_7208.patch|  31 +++
 .../spamassassin/spamassassin-3.4.1-r21.ebuild | 252 +
 2 files changed, 283 insertions(+)

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7208.patch 
b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7208.patch
new file mode 100644
index 000..da97e3ee56f
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7208.patch
@@ -0,0 +1,31 @@
+https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7208
+https://bugs.gentoo.org/650638
+--- a/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm   2015/06/10 12:15:22 
1684652
 a/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm   2015/06/10 12:18:50 
1684653
+@@ -350,7 +350,7 @@
+ # look for W3 links only
+ next unless (defined $info->{types}->{a});
+ 
+-while (my($host, $domain) = each $info->{hosts}) {
++while (my($host, $domain) = each %{$info->{hosts}}) {
+ 
+   # skip if the domain name was matched
+   if (exists $rule->{exclusions} && exists 
$rule->{exclusions}->{$domain}) {
+@@ -374,7 +374,7 @@
+ }
+ 
+ if (exists $rule->{countries}) {
+-  dbg("check: uri_local_bl countries %s\n", join(' ', sort keys 
$rule->{countries}));
++  dbg("check: uri_local_bl countries %s\n", join(' ', sort keys 
%{$rule->{countries}}));
+ 
+   my $cc = $self->{geoip}->country_code_by_addr($ip);
+ 
+@@ -403,7 +403,7 @@
+ }
+ 
+ if (exists $rule->{isps}) {
+-  dbg("check: uri_local_bl isps %s\n", join(' ', map { '"' . $_ . 
'"'; } sort keys $rule->{isps}));
++  dbg("check: uri_local_bl isps %s\n", join(' ', map { '"' . $_ . 
'"'; } sort keys %{$rule->{isps}}));
+ 
+   my $isp = $self->{geoisp}->isp_by_name($ip);
+ 

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r21.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.1-r21.ebuild
new file mode 100644
index 000..bb451f05de0
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r21.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2018 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
+   )
+  

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

2017-12-05 Thread Michael Orlitzky
commit: c01a2a0ed33b456d068b436b5d9e185f936455f9
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Tue Dec  5 18:25:11 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Tue Dec  5 18:46:02 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c01a2a0e

mail-filter/spamassassin: fix "postgres" -> "postgresql" in init script.

In commit 5248063, I accidentally changed the name of the PostgreSQL
dependency in the OpenRC service script from "postgresql" (correct) to
"postgres" (not so much). This commit changes it back to the correct
name in a new revision. Thanks to Aaron W. Swenson for noticing the
mistake.

Closes: https://bugs.gentoo.org/639916
Package-Manager: Portage-2.3.13, Repoman-2.3.3

 mail-filter/spamassassin/Manifest  |   2 +-
 mail-filter/spamassassin/files/3.4.1-spamd.init-r3 |  38 
 .../spamassassin/spamassassin-3.4.1-r20.ebuild | 251 +
 3 files changed, 290 insertions(+), 1 deletion(-)

diff --git a/mail-filter/spamassassin/Manifest 
b/mail-filter/spamassassin/Manifest
index 24589b7b03b..d2d417e002f 100644
--- a/mail-filter/spamassassin/Manifest
+++ b/mail-filter/spamassassin/Manifest
@@ -1 +1 @@
-DIST Mail-SpamAssassin-3.4.1.tar.bz2 2710985 SHA256 
a0c1c9808f0684b389594eb8b2ccbace6486546593493f9308c9554563d14651 SHA512 
91d50e2ce6520e3e1c7bc66da133a0815be34ced15e26b6e6c17af5a03d5c62f41d8086f25f65084d6634497148cf5439977d7d4a44d7c3e307535beac6629af
 WHIRLPOOL 
1465fcbc0456c9a671087d395c2a9998e3852a47153a0f6770158a2a311196490274c620aab89e2a6ff163defa72b8e785032f9450e7903df355544d957e8908
+DIST Mail-SpamAssassin-3.4.1.tar.bz2 2710985 BLAKE2B 
f85b0ed2bae783bc6dfa39df36589a6cb90e6c657efcff1fa094f952847e4bcb24aa232b6689804bb1170204ae1d33216ed9bde207d7a7a6863410d8f847c391
 SHA512 
91d50e2ce6520e3e1c7bc66da133a0815be34ced15e26b6e6c17af5a03d5c62f41d8086f25f65084d6634497148cf5439977d7d4a44d7c3e307535beac6629af

diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.init-r3 
b/mail-filter/spamassassin/files/3.4.1-spamd.init-r3
new file mode 100644
index 000..0133d793625
--- /dev/null
+++ b/mail-filter/spamassassin/files/3.4.1-spamd.init-r3
@@ -0,0 +1,38 @@
+#!/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="--pidfile=${pidfile} ${SPAMD_OPTS}"
+command_args_background="--daemonize"
+
+if ! [ "${SPAMD_RUN_AS_ROOT}" = "true" ]; then
+# Passing --username=root to spamd kills it, so if SPAMD_RUN_AS_ROOT
+# is true, then we want to pass no user/group command args at all.
+# Any value other than "true" gets the default user/group of "spamd".
+command_args="${command_args} --username=spamd --groupname=spamd"
+fi
+
+: ${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 postgresql
+}
+
+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/spamassassin-3.4.1-r20.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild
new file mode 100644
index 000..18b2b73452a
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild
@@ -0,0 +1,251 @@
+# 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 

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

2017-11-01 Thread Michael Orlitzky
commit: 2d55bc8f1afb8dc8f712ba139a860c828f52eb17
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Wed Nov  1 03:05:53 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Wed Nov  1 18:54:56 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d55bc8f

mail-filter/spamassassin: new revision that lets spamd run as root (openrc).

The r13 revision of spamassassin came with a new init script (and
systemd service file) that runs spamd as the "spamd" user by default,
and that choice is not configurable. There is however a legitimate use
case for running spamd as root; namely, when local users have their
configurations or bayes databases stored in their home directories on
the local filesystem.

This new revision adds back the ability to run spamd as root, through
the SPAMD_RUN_AS_ROOT variable in the OpenRC service configuration
file. This should suffice for the users who have reported problems so
far, and a similar fix for the systemd service is on its way.

The pkg_postinst phase of the ebuild alerts users to the new
configuration variable.

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

 mail-filter/spamassassin/files/3.4.1-spamd.conf-r1 | 30 +
 mail-filter/spamassassin/files/3.4.1-spamd.init-r2 | 38 ++
 1-r17.ebuild => spamassassin-3.4.1-r18.ebuild} |  9 +++--
 3 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.conf-r1 
b/mail-filter/spamassassin/files/3.4.1-spamd.conf-r1
new file mode 100644
index 000..b7b46f3226a
--- /dev/null
+++ b/mail-filter/spamassassin/files/3.4.1-spamd.conf-r1
@@ -0,0 +1,30 @@
+# ***WARNING***
+#
+# The spamd daemon must not run on 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
+
+# Do you want to run spamd as root? If you have local users storing their
+# personal configurations (or bayes databases) in ~/.spamassassin, then you
+# may want to run spamd as root so that it can setuid to each user while
+# processing his spam. (That way, you don't have to grant the "spamd" user
+# individual permissions to everyone's ~/.spamassassin directory.)
+#
+# On the other hand, if you don't store any per-user configuration on
+# the filesystem, then you should leave this alone.
+SPAMD_RUN_AS_ROOT=false

diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.init-r2 
b/mail-filter/spamassassin/files/3.4.1-spamd.init-r2
new file mode 100644
index 000..c704782f3a4
--- /dev/null
+++ b/mail-filter/spamassassin/files/3.4.1-spamd.init-r2
@@ -0,0 +1,38 @@
+#!/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="--pidfile=${pidfile} ${SPAMD_OPTS}"
+command_args_background="--daemonize"
+
+if ! [ "${SPAMD_RUN_AS_ROOT}" = "true" ]; then
+# Passing --username=root to spamd kills it, so if SPAMD_RUN_AS_ROOT
+# is true, then we want to pass no user/group command args at all.
+# Any value other than "true" gets the default user/group of "spamd".
+command_args="${command_args} --username=spamd --groupname=spamd"
+fi
+
+: ${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/spamassassin-3.4.1-r17.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.1-r18.ebuild
similarity index 95%
rename from mail-filter/spamassassin/spamassassin-3.4.1-r17.ebuild
rename to mail-filter/spamassassin/spamassassin-3.4.1-r18.ebuild
index ba402950811..49b14da5015 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r17.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r18.ebuild
@@ -156,8 +156,8 @@ src_install () {

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

2017-08-24 Thread Michael Orlitzky
commit: 8509fc8bb4d887a0a5ebf685d04508824165b6cd
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Thu Aug 24 18:25:03 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Thu Aug 24 18:26:32 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8509fc8b

mail-filter/spamassassin: new revision to fix the systemd service.

As part of bug 590346, I accidentally broke the systemd service file
by starting the service as spamd:spamd when it needs to bind to port
783. Even when the service is run in the foreground, it needs to be
started as root; it will then drop privileges if given the --username
and --groupname flags. The new service file gets this right, with
root owning the main process and spamd:spamd the children.

Thanks to Dan Goodliffe for the report and help debugging the issue.

Gentoo-Bug: 590346

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 .../files/{spamassassin.service-r2 => spamassassin.service-r3}| 4 +---
 .../{spamassassin-3.4.1-r15.ebuild => spamassassin-3.4.1-r16.ebuild}  | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/mail-filter/spamassassin/files/spamassassin.service-r2 
b/mail-filter/spamassassin/files/spamassassin.service-r3
similarity index 66%
rename from mail-filter/spamassassin/files/spamassassin.service-r2
rename to mail-filter/spamassassin/files/spamassassin.service-r3
index 80320571784..6bc74c46cc5 100644
--- a/mail-filter/spamassassin/files/spamassassin.service-r2
+++ b/mail-filter/spamassassin/files/spamassassin.service-r3
@@ -3,10 +3,8 @@ Description=Spamassassin daemon
 After=network.target
 
 [Service]
-ExecStart=/usr/sbin/spamd $SPAMD_OPTS
+ExecStart=/usr/sbin/spamd --username=spamd --groupname=spamd $SPAMD_OPTS
 ExecReload=/bin/kill -HUP $MAINPID
-User=spamd
-Group=spamd
 
 [Install]
 WantedBy=multi-user.target

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.1-r16.ebuild
similarity index 99%
rename from mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild
rename to mail-filter/spamassassin/spamassassin-3.4.1-r16.ebuild
index 47d77f361f7..3273f6b1706 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r16.ebuild
@@ -158,7 +158,7 @@ src_install () {
newinitd "${FILESDIR}/3.4.1-spamd.init-r1" spamd
newconfd "${FILESDIR}/3.4.1-spamd.conf" spamd
 
-   systemd_newunit "${FILESDIR}/${PN}.service-r2" "${PN}.service"
+   systemd_newunit "${FILESDIR}/${PN}.service-r3" "${PN}.service"
systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r1" \
 "${PN}.service"
 



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

2017-08-20 Thread Michael Orlitzky
commit: 2d2b99bbe0ceafbfd2601508d9dfe67a76ec83b3
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sun Aug 20 13:52:40 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sun Aug 20 14:32:44 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d2b99bb

mail-filter/spamassassin: synchronize the systemd service configuration.

This commit brings the systemd service and its configuration back in
sync with OpenRC:

  * The SPAMD_OPTS passed to the daemon now match OpenRC's.

  * We no longer pass --daemon to spamd, and thus we don't have to
specify that the daemon forks or track its PID file in the
service.

  * The "spamd" user and group are used for the service.

Gentoo-Bug: 590346

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 .../spamassassin/files/spamassassin.service-r2 |  14 ++
 .../files/spamassassin.service.conf-r1 |   2 +
 .../spamassassin/spamassassin-3.4.1-r14.ebuild | 242 +
 3 files changed, 258 insertions(+)

diff --git a/mail-filter/spamassassin/files/spamassassin.service-r2 
b/mail-filter/spamassassin/files/spamassassin.service-r2
new file mode 100644
index 000..ecb9ba39216
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin.service-r2
@@ -0,0 +1,14 @@
+[Unit]
+Description=Spamassassin daemon
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/spamd $SPAMD_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+User=spamd
+Group=spamd
+StandardOutput=syslog
+StandardError=syslog
+
+[Install]
+WantedBy=multi-user.target

diff --git a/mail-filter/spamassassin/files/spamassassin.service.conf-r1 
b/mail-filter/spamassassin/files/spamassassin.service.conf-r1
new file mode 100644
index 000..75918e824f2
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin.service.conf-r1
@@ -0,0 +1,2 @@
+[Service]
+Environment="SPAMD_OPTS=--max-children=5 --create-prefs --helper-home-dir"

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r14.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.1-r14.ebuild
new file mode 100644
index 000..7c50f5140fa
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r14.ebuild
@@ -0,0 +1,242 @@
+# 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="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="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"
+   

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

2017-08-04 Thread Michael Orlitzky
commit: be5834b9e792665e3c20fc013bae6ab426f73097
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Fri Aug  4 20:47:06 2017 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Fri Aug  4 20:57:07 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be5834b9

mail-filter/spamassassin: add a patch to -r11 for perl-5.26 compatibility.

Gentoo-Bug: 625316

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 .../spamassassin/files/spamassassin-3.4.1-perl526.patch| 14 ++
 mail-filter/spamassassin/spamassassin-3.4.1-r11.ebuild |  1 +
 2 files changed, 15 insertions(+)

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch 
b/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch
new file mode 100644
index 000..1c63136e3f6
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch
@@ -0,0 +1,14 @@
+https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7367
+https://bugs.gentoo.org/625316
+
+--- Mail-SpamAssassin-3.4.1/spamc/configure.pl
 Mail-SpamAssassin-3.4.1/spamc/configure.pl
+@@ -66,7 +66,7 @@
+   # Do the same thing as for the preprocessor below.
+   package version_h;
+   my $Z = $0;
+-  local $0= "version.h.pl";
++  local $0= "./version.h.pl";
+   local @ARGV = ();
+   # Got to check for defined because the script returns shell error level!
+   unless (defined do $0) {

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r11.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.1-r11.ebuild
index a6f8ed6769d..4c358345773 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r11.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r11.ebuild
@@ -86,6 +86,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-perl526.patch"
 )
 
 src_prepare() {



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

2016-06-03 Thread Michael Orlitzky
commit: 323640f36b897eb908b406dfd570613dd323af9c
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Fri Jun  3 15:59:42 2016 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Fri Jun  3 16:02:04 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=323640f3

mail-filter/spamassassin: new revision to fix Net-DNS compatibility issues.

With the stabilization of =dev-perl/Net-DNS-1.40.0 (and the removal of
the older stable version), a number of problems were introduced in
SpamAssassin. There are three upstream bugs with patches against the
latest release, v3.4.1, which fix all sorts of DNS errors in blacklist
checks, DKIM, and SPF.

The major contribution of this new revision is to apply patches from
those upstream bugs fixing compatibility with =dev-perl/Net-DNS-1.40.0.

At the same time, bug 396307 has been fixed by creating the
sa-update-keys directory and assigning it the proper permissions.

Thanks are due to Olliver Schinagl, Philippe Chaintreuil, Marcin
Mirosław, and Atman Sense who reported and investigated these issues.

Gentoo-Bug: 396307
Gentoo-Bug: 579222
Upstream-Bug: 7223
Upstream-Bug: 7231
Upstream-Bug: 7265

Package-Manager: portage-2.2.28

 .../files/spamassassin-3.4.1-bug_7223.patch|  14 ++
 .../files/spamassassin-3.4.1-bug_7231.patch|  29 +++
 .../files/spamassassin-3.4.1-bug_7265.patch|  88 
 .../spamassassin/spamassassin-3.4.1-r3.ebuild  | 231 +
 4 files changed, 362 insertions(+)

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7223.patch 
b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7223.patch
new file mode 100644
index 000..0fea1f9
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7223.patch
@@ -0,0 +1,14 @@
+# Fix for Gentoo bug 579222 (SpamAssassin bug 7223).
+
+--- a/lib/Mail/SpamAssassin/DnsResolver.pm 2015/07/20 18:23:18 1691991
 b/lib/Mail/SpamAssassin/DnsResolver.pm 2015/07/20 18:24:48 1691992
+@@ -592,6 +592,9 @@
+   };
+ 
+   if ($packet) {
++# RD flag needs to be set explicitly since Net::DNS 1.01, Bug 7223
++$packet->header->rd(1);
++
+   # my $udp_payload_size = $self->{res}->udppacketsize;
+ my $udp_payload_size = $self->{conf}->{dns_options}->{edns};
+ if ($udp_payload_size && $udp_payload_size > 512) {

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231.patch 
b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231.patch
new file mode 100644
index 000..0d6e43a
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231.patch
@@ -0,0 +1,29 @@
+# Fix for Gentoo bug 579222 (SpamAssassin bug 7231).
+
+--- a/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm (revision 1694052)
 b/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm (working copy)
+@@ -942,9 +942,8 @@
+ next unless (defined($str) && defined($dom));
+ dbg("uridnsbl: got($j) NS for $dom: $str");
+ 
+-if ($str =~ /IN\s+NS\s+(\S+)/) {
+-  my $nsmatch = lc $1;
+-  $nsmatch =~ s/\.$//;
++if ($rr->type eq 'NS') {
++  my $nsmatch = lc $rr->nsdname;  # available since at least Net::DNS 0.14
+   my $nsrhblstr = $nsmatch;
+   my $fullnsrhblstr = $nsmatch;
+ 
+@@ -1025,9 +1024,9 @@
+ }
+ dbg("uridnsbl: complete_a_lookup got(%d) A for %s: %s", $j,$hname,$str);
+ 
+-local $1;
+-if ($str =~ /IN\s+A\s+(\S+)/) {
+-  $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $1);
++if ($rr->type eq 'A') {
++  my $ip_address = $rr->rdatastr;
++  $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $ip_address);
+ }
+   }
+ }

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7265.patch 
b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7265.patch
new file mode 100644
index 000..f4fc4bc
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7265.patch
@@ -0,0 +1,88 @@
+# Fix for Gentoo bug 579222 (SpamAssassin bug 7265).
+# Two different revisions from that bug have been concatenated
+# together into this patch.
+
+--- a/lib/Mail/SpamAssassin/DnsResolver.pm 2015/11/19 15:23:56 1715196
 b/lib/Mail/SpamAssassin/DnsResolver.pm 2015/11/19 15:31:49 1715197
+@@ -725,6 +725,37 @@
+ 
+ ###
+ 
++=item $id = $res->bgread()
++
++Similar to C.  Reads a DNS packet from
++a supplied socket, decodes it, and returns a Net::DNS::Packet object
++if successful.  Dies on error.
++
++=cut
++
++sub bgread() {
++  my ($self) = @_;
++  my $sock = $self->{sock};
++  my $packetsize = $self->{res}->udppacketsize;
++  $packetsize = 512  if $packetsize < 512;  # just in case
++  my $data = '';
++  my $peeraddr = $sock->recv($data, $packetsize+256);  # with some size 
margin for troubleshooting
++  defined $peeraddr or die "bgread: recv() failed: $!";
++  my $peerhost = $sock->peerhost;
++  $data ne '' or die "bgread: received empty packet from 

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

2016-04-26 Thread Austin English
commit: 740d5522795275f432d6a97e6efaa81dd539916b
Author: Austin English  gentoo  org>
AuthorDate: Tue Apr 26 20:57:22 2016 +
Commit: Austin English  gentoo  org>
CommitDate: Tue Apr 26 22:26:32 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=740d5522

mail-filter/spamassassin: use #!/sbin/openrc-run instead of #!/sbin/runscript

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573846

Package-Manager: portage-2.2.26

 mail-filter/spamassassin/files/3.3.1-spamd.init|   4 +-
 .../spamassassin/spamassassin-3.4.0-r1.ebuild  | 212 
 .../spamassassin/spamassassin-3.4.1-r2.ebuild  | 222 +
 3 files changed, 436 insertions(+), 2 deletions(-)

diff --git a/mail-filter/spamassassin/files/3.3.1-spamd.init 
b/mail-filter/spamassassin/files/3.3.1-spamd.init
index ac78e22..3d40123 100644
--- a/mail-filter/spamassassin/files/3.3.1-spamd.init
+++ b/mail-filter/spamassassin/files/3.3.1-spamd.init
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/mail-filter/spamassassin/spamassassin-3.4.0-r1.ebuild 
b/mail-filter/spamassassin/spamassassin-3.4.0-r1.ebuild
new file mode 100644
index 000..5c1db07
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.0-r1.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit perl-module toolchain-funcs eutils systemd readme.gentoo
+
+MY_P=Mail-SpamAssassin-${PV//_/-}
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="SpamAssassin is an extensible email filter which is used to 
identify 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="+berkdb qmail ssl doc ldap mysql postgres sqlite ipv6"
+
+REQUIRED_USE="|| ( 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
+   dev-libs/openssl
+   )
+   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}"
+
+SRC_TEST="do"
+
+src_configure() {
+   # - 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).
+   myconf="SYSCONFDIR=${EPREFIX}/etc 
DATADIR=${EPREFIX}/usr/share/spamassassin"
+
+   # If ssl is enabled, spamc can be built with ssl support
+   if use ssl; then
+   myconf+=" ENABLE_SSL=yes"
+   else
+   myconf+=" ENABLE_SSL=no"
+   fi
+
+   # Set the path to the Perl executable explictly.  This will be used to
+   # create the initial sharpbang line in the scripts and might cause
+   # a versioned app name end in there, see
+   # 
+   myconf+=" PERL_BIN=${EPREFIX}/usr/bin/perl"
+
+   # Add Gentoo tag to make it easy for the upstream devs to spot
+   # possible modifications or patches.
+   #version_tag="g${PV:6}${PR}"
+   #version_str="${PV//_/-}-${version_tag}"
+
+   # Create the Gentoo config file before Makefile.PL is called so it
+   # is copied later on.
+   #echo "version_tag ${version_tag}" > rules/11_gentoo.cf
+
+   # Setting the following env var ensures that no questions are asked.
+   perl-module_src_configure
+   # Configure spamc
+   emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+   export PERL_MM_USE_DEFAULT=1
+
+   # Now compile all the stuff selected.
+   perl-module_src_compile
+
+   if use qmail; then
+