public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/, mail-filter/spamassassin/files/
@ 2016-04-26 22:27 Austin English
  0 siblings, 0 replies; 17+ messages in thread
From: Austin English @ 2016-04-26 22:27 UTC (permalink / raw
  To: gentoo-commits

commit:     740d5522795275f432d6a97e6efaa81dd539916b
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 26 20:57:22 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 22:26:32 2016 +0000
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 0000000..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
+	# <https://bugs.gentoo.org/show_bug.cgi?id=62276>
+	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
+		emake spamc/qmail-spamc
+	fi
+
+}
+
+src_install () {
+	perl-module_src_install
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' "${ED}"/etc/mail/spamassassin/init.pre || die
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}"/3.3.1-spamd.init spamd
+	newconfd "${FILESDIR}"/3.0.0-spamd.conf spamd
+
+	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+	systemd_install_serviced "${FILESDIR}"/${PN}.service.conf
+
+	if use postgres; then
+		sed -i -e 's:@USEPOSTGRES@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_pg.sql
+	else
+		sed -i -e '/@USEPOSTGRES@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	if use mysql; then
+		sed -i -e 's:@USEMYSQL@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_mysql.sql
+	else
+		sed -i -e '/@USEMYSQL@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	dodoc NOTICE TRADEMARK CREDITS INSTALL.VMS UPGRADE USAGE \
+		sql/README.bayes sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some docu files so they don't clash with others
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	cp "${FILESDIR}"/secrets.cf "${ED}"/etc/mail/spamassassin/secrets.cf.example || die
+	fperms 0400 /etc/mail/spamassassin/secrets.cf.example
+
+	cat <<-EOF > "${T}/local.cf.example"
+		# Sensitive data, such as database connection info, should be stored in
+		# /etc/mail/spamassassin/secrets.cf with appropriate permissions
+EOF
+
+	insinto /etc/mail/spamassassin/
+	doins "${T}/local.cf.example"
+}
+
+pkg_postinst() {
+	elog "If you plan on using the -u flag to spamd, please read the notes"
+	elog "in /etc/conf.d/spamd regarding the location of the pid file.\n"
+	elog "If you build ${PN} with optional dependancy support,"
+	elog "you can enable them in /etc/mail/spamassassin/init.pre\n"
+	elog "You need to configure your database to be able to use Bayes filter"
+	elog "with database backend, otherwise it will still use (and need) the"
+	elog "Berkeley DB support."
+	elog "Look at the sql/README.bayes file in the documentation directory"
+	elog "for how to configure it.\n"
+	elog "If you plan to use Vipul's Razor, note that versions up to and"
+	elog "including version 2.82 include a bug that will slow down the entire"
+	elog "perl interpreter.  Version 2.83 or later fixes this."
+	elog "If you do not plan to use this plugin, be sure to comment out"
+	elog "its loadplugin line in /etc/mail/spamassassin/v310.pre.\n"
+	elog "The DKIM plugin is now enabled by default for new installs,"
+	elog "if the perl module Mail::DKIM is installed."
+	elog "However, installation of SpamAssassin will not overwrite existing"
+	elog ".pre configuration files, so to use DKIM when upgrading from a"
+	elog "previous release that did not use DKIM, a directive:\n"
+	elog "loadplugin Mail::SpamAssassin::Plugin::DKIM"
+	elog "will need to be uncommented in file 'v312.pre', or added"
+	elog "to some other .pre file, such as local.pre.\n"
+	ewarn "Rules are no longer included with SpamAssassin out of the box".
+	ewarn "You will need to immediately run sa-update, or download"
+	ewarn "the additional rules .tgz package and run sa-update --install"
+	ewarn "with it, to get a ruleset.\n"
+	elog "If you run sa-update and receive a GPG validation error."
+	elog "Then you need to import an updated sa-update key."
+	elog "sa-update --import /usr/share/spamassassin/sa-update-pubkey.txt\n"
+}

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r2.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r2.ebuild
new file mode 100644
index 0000000..c12577e
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r2.ebuild
@@ -0,0 +1,222 @@
+# 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="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 libressl qmail ssl doc ldap mysql postgres sqlite ipv6"
+
+# You can do without a database unless you need the Bayes features.
+REQUIRED_USE="bayes? ( || ( berkdb mysql postgres sqlite ) )"
+
+DEPEND=">=dev-lang/perl-5.8.8-r8
+	virtual/perl-MIME-Base64
+	>=virtual/perl-Pod-Parser-1.510.0-r2
+	virtual/perl-Storable
+	virtual/perl-Time-HiRes
+	>=dev-perl/HTML-Parser-3.43
+	>=dev-perl/Mail-DKIM-0.37
+	>=dev-perl/Net-DNS-0.53
+	dev-perl/Digest-SHA1
+	dev-perl/libwww-perl
+	>=virtual/perl-Archive-Tar-1.23
+	app-crypt/gnupg
+	>=virtual/perl-IO-Zlib-1.04
+	>=dev-util/re2c-0.12.0
+	dev-perl/Mail-SPF
+	>=dev-perl/NetAddr-IP-4.0.1
+	dev-perl/Geo-IP
+	dev-perl/Encode-Detect
+	dev-perl/Net-Patricia
+	ssl? (
+		dev-perl/IO-Socket-SSL
+		!libressl? ( dev-libs/openssl:0 )
+		libressl? ( dev-libs/libressl )
+	)
+	berkdb? (
+		virtual/perl-DB_File
+	)
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ipv6? (
+		|| ( dev-perl/IO-Socket-INET6
+			virtual/perl-IO-Socket-IP )
+	)"
+RDEPEND="${DEPEND}"
+
+SRC_TEST="do"
+
+src_prepare() {
+	# Merged upstream
+	#epatch "${FILESDIR}/net-dns-0.76_compatibility.patch"
+	perl-module_src_prepare
+}
+
+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"
+	myconf+=" 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
+	# <https://bugs.gentoo.org/show_bug.cgi?id=62276>
+	myconf+=" PERL_BIN=${EPREFIX}/usr/bin/perl"
+
+	# 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
+		emake spamc/qmail-spamc
+	fi
+}
+
+src_install () {
+	perl-module_src_install
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}"/etc/mail/spamassassin/init.pre \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}"/3.3.1-spamd.init spamd
+	newconfd "${FILESDIR}"/3.0.0-spamd.conf spamd
+
+	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+	systemd_install_serviced "${FILESDIR}"/${PN}.service.conf
+
+	if use postgres; then
+		sed -i -e 's:@USEPOSTGRES@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_pg.sql
+	else
+		sed -i -e '/@USEPOSTGRES@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	if use mysql; then
+		sed -i -e 's:@USEMYSQL@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_mysql.sql
+	else
+		sed -i -e '/@USEMYSQL@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	dodoc NOTICE TRADEMARK CREDITS INSTALL.VMS UPGRADE USAGE \
+		sql/README.bayes sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some docu files so they don't clash with others
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	cat <<-EOF > "${T}/local.cf.example"
+		# Sensitive data, such as database connection info, should be stored in
+		# /etc/mail/spamassassin/secrets.cf with appropriate permissions
+EOF
+
+	insopts -m0644
+	doins "${T}/local.cf.example"
+}
+
+pkg_postinst() {
+	elog "If you plan on using the -u flag to spamd, please read the notes"
+	elog "in /etc/conf.d/spamd regarding the location of the pid file."
+	elog
+	elog "If you build ${PN} with optional dependancy support,"
+	elog "you can enable them in /etc/mail/spamassassin/init.pre"
+	elog
+	elog "You need to configure your database to be able to use Bayes filter"
+	elog "with database backend, otherwise it will still use (and need) the"
+	elog "Berkeley DB support."
+	elog "Look at the sql/README.bayes file in the documentation directory"
+	elog "for how to configure it."
+	elog
+	elog "If you plan to use Vipul's Razor, note that versions up to and"
+	elog "including version 2.82 include a bug that will slow down the entire"
+	elog "perl interpreter.  Version 2.83 or later fixes this."
+	elog "If you do not plan to use this plugin, be sure to comment out"
+	elog "its loadplugin line in /etc/mail/spamassassin/v310.pre."
+	elog
+	elog "The DKIM plugin is now enabled by default for new installs,"
+	elog "if the perl module Mail::DKIM is installed."
+	elog "However, installation of SpamAssassin will not overwrite existing"
+	elog ".pre configuration files, so to use DKIM when upgrading from a"
+	elog "previous release that did not use DKIM, a directive:"
+	elog
+	elog "loadplugin Mail::SpamAssassin::Plugin::DKIM"
+	elog "will need to be uncommented in file 'v312.pre', or added"
+	elog "to some other .pre file, such as local.pre."
+	elog
+	ewarn "Rules are no longer included with SpamAssassin out of the box".
+	ewarn "You will need to immediately run sa-update, or download"
+	ewarn "the additional rules .tgz package and run sa-update --install"
+	ewarn "with it, to get a ruleset."
+	elog
+	elog "If you run sa-update and receive a GPG validation error."
+	elog "Then you need to import an updated sa-update key."
+	elog "sa-update --import /usr/share/spamassassin/sa-update-pubkey.txt"
+	elog
+}


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

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

commit:     323640f36b897eb908b406dfd570613dd323af9c
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  3 15:59:42 2016 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Jun  3 16:02:04 2016 +0000
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 0000000..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 0000000..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 0000000..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<Net::DNS::Resolver::bgread>.  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 $peerhost";
++  dbg("dns: bgread: received %d bytes from %s", length($data), $peerhost);
++  my($answerpkt, $decoded_length) = Net::DNS::Packet->new(\$data);
++  $answerpkt or die "bgread: decoding DNS packet failed: $@";
++  $answerpkt->answerfrom($peerhost);
++  if ($decoded_length ne length($data)) {
++    warn sprintf("bgread: received a %d bytes packet from %s, decoded %d bytes\n",
++                 length($data), $peerhost, $decoded_length);
++  }
++  return $answerpkt;
++}
++
++###########################################################################
++
+ =item $nfound = $res->poll_responses()
+ 
+ See if there are any C<bgsend> reply packets ready, and return
+@@ -772,13 +803,25 @@
+     $timeout = 0;  # next time around collect whatever is available, then exit
+     last  if $nfound == 0;
+ 
+-    my $packet = $self->{res}->bgread($self->{sock});
++    my $packet;
++    eval {
++      $packet = $self->bgread();
++    } or do {
++      undef $packet;
++      my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
++      # resignal if alarm went off
++      die $eval_stat  if $eval_stat =~ /__alarm__ignore__\(.*\)/s;
++      info("dns: bad dns reply: %s", $eval_stat);
++    };
++
++#   Bug 7265, use our own bgread()
++#   my $packet = $self->{res}->bgread($self->{sock});
+ 
+     if (!$packet) {
+-      my $dns_err = $self->{res}->errorstring;
+-      # resignal if alarm went off
+-      die "dns (3) $dns_err\n"  if $dns_err =~ /__alarm__ignore__\(.*\)/s;
+-      info("dns: bad dns reply: $dns_err");
++      # error already reported above
++#     my $dns_err = $self->{res}->errorstring;
++#     die "dns (3) $dns_err\n"  if $dns_err =~ /__alarm__ignore__\(.*\)/s;
++#     info("dns: bad dns reply: $dns_err");
+     } else {
+       my $header = $packet->header;
+       if (!$header) {
+
+--- a/lib/Mail/SpamAssassin/Plugin/DKIM.pm	2015/11/19 19:20:06	1715247
++++ b/lib/Mail/SpamAssassin/Plugin/DKIM.pm	2015/11/19 19:22:25	1715248
+@@ -793,7 +793,8 @@
+         # Only do so if EDNS0 provides a reasonably-sized UDP payload size,
+         # as our interface does not provide a DNS fallback to TCP, unlike
+         # the Net::DNS::Resolver::send which does provide it.
+-        my $res = $self->{main}->{resolver}->get_resolver;
++        my $res = $self->{main}->{resolver};
++        dbg("dkim: providing our own resolver: %s", ref $res);
+         Mail::DKIM::DNS::resolver($res);
+       }
+     }

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r3.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r3.ebuild
new file mode 100644
index 0000000..fda05ae
--- /dev/null
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r3.ebuild
@@ -0,0 +1,231 @@
+# 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="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 libressl qmail ssl doc ldap mysql postgres sqlite ipv6"
+
+# You can do without a database unless you need the Bayes features.
+REQUIRED_USE="bayes? ( || ( berkdb mysql postgres sqlite ) )"
+
+DEPEND=">=dev-lang/perl-5.8.8-r8
+	virtual/perl-MIME-Base64
+	>=virtual/perl-Pod-Parser-1.510.0-r2
+	virtual/perl-Storable
+	virtual/perl-Time-HiRes
+	>=dev-perl/HTML-Parser-3.43
+	>=dev-perl/Mail-DKIM-0.37
+	>=dev-perl/Net-DNS-0.53
+	dev-perl/Digest-SHA1
+	dev-perl/libwww-perl
+	>=virtual/perl-Archive-Tar-1.23
+	app-crypt/gnupg
+	>=virtual/perl-IO-Zlib-1.04
+	>=dev-util/re2c-0.12.0
+	dev-perl/Mail-SPF
+	>=dev-perl/NetAddr-IP-4.0.1
+	dev-perl/Geo-IP
+	dev-perl/Encode-Detect
+	dev-perl/Net-Patricia
+	ssl? (
+		dev-perl/IO-Socket-SSL
+		!libressl? ( dev-libs/openssl:0 )
+		libressl? ( dev-libs/libressl )
+	)
+	berkdb? (
+		virtual/perl-DB_File
+	)
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ipv6? (
+		|| ( dev-perl/IO-Socket-INET6
+			virtual/perl-IO-Socket-IP )
+	)"
+RDEPEND="${DEPEND}"
+
+SRC_TEST="do"
+
+src_prepare() {
+	epatch "${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
+	epatch "${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
+	epatch "${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
+	perl-module_src_prepare
+}
+
+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"
+	myconf+=" 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
+	# <https://bugs.gentoo.org/show_bug.cgi?id=62276>
+	myconf+=" PERL_BIN=${EPREFIX}/usr/bin/perl"
+
+	# 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
+		emake spamc/qmail-spamc
+	fi
+}
+
+src_install () {
+	perl-module_src_install
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}"/etc/mail/spamassassin/init.pre \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}"/3.3.1-spamd.init spamd
+	newconfd "${FILESDIR}"/3.0.0-spamd.conf spamd
+
+	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+	systemd_install_serviced "${FILESDIR}"/${PN}.service.conf
+
+	if use postgres; then
+		sed -i -e 's:@USEPOSTGRES@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_pg.sql
+	else
+		sed -i -e '/@USEPOSTGRES@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	if use mysql; then
+		sed -i -e 's:@USEMYSQL@::' "${ED}/etc/init.d/spamd" || die
+
+		dodoc sql/*_mysql.sql
+	else
+		sed -i -e '/@USEMYSQL@/d' "${ED}/etc/init.d/spamd" || die
+	fi
+
+	dodoc NOTICE TRADEMARK CREDITS INSTALL.VMS UPGRADE USAGE \
+		sql/README.bayes sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some docu files so they don't clash with others
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	cat <<-EOF > "${T}/local.cf.example"
+		# Sensitive data, such as database connection info, should be stored in
+		# /etc/mail/spamassassin/secrets.cf with appropriate permissions
+EOF
+
+	insopts -m0644
+	doins "${T}/local.cf.example"
+}
+
+pkg_postinst() {
+	elog "If you plan on using the -u flag to spamd, please read the notes"
+	elog "in /etc/conf.d/spamd regarding the location of the pid file."
+	elog
+	elog "If you build ${PN} with optional dependancy support,"
+	elog "you can enable them in /etc/mail/spamassassin/init.pre"
+	elog
+	elog "You need to configure your database to be able to use Bayes filter"
+	elog "with database backend, otherwise it will still use (and need) the"
+	elog "Berkeley DB support."
+	elog "Look at the sql/README.bayes file in the documentation directory"
+	elog "for how to configure it."
+	elog
+	elog "If you plan to use Vipul's Razor, note that versions up to and"
+	elog "including version 2.82 include a bug that will slow down the entire"
+	elog "perl interpreter.  Version 2.83 or later fixes this."
+	elog "If you do not plan to use this plugin, be sure to comment out"
+	elog "its loadplugin line in /etc/mail/spamassassin/v310.pre."
+	elog
+	elog "The DKIM plugin is now enabled by default for new installs,"
+	elog "if the perl module Mail::DKIM is installed."
+	elog "However, installation of SpamAssassin will not overwrite existing"
+	elog ".pre configuration files, so to use DKIM when upgrading from a"
+	elog "previous release that did not use DKIM, a directive:"
+	elog
+	elog "loadplugin Mail::SpamAssassin::Plugin::DKIM"
+	elog "will need to be uncommented in file 'v312.pre', or added"
+	elog "to some other .pre file, such as local.pre."
+	elog
+	ewarn "Rules are no longer included with SpamAssassin out of the box".
+	ewarn "You will need to immediately run sa-update, or download"
+	ewarn "the additional rules .tgz package and run sa-update --install"
+	ewarn "with it, to get a ruleset."
+	elog
+	elog "If you run sa-update and receive a GPG validation error."
+	elog "Then you need to import an updated sa-update key."
+	elog "sa-update --import /usr/share/spamassassin/sa-update-pubkey.txt"
+	elog
+}


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

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

commit:     be5834b9e792665e3c20fc013bae6ab426f73097
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  4 20:47:06 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Aug  4 20:57:07 2017 +0000
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 00000000000..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() {


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

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

commit:     2d2b99bbe0ceafbfd2601508d9dfe67a76ec83b3
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 20 13:52:40 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Aug 20 14:32:44 2017 +0000
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 00000000000..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 00000000000..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 00000000000..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"
+	"${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"
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	emake install
+	einstalldocs
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}/etc/mail/spamassassin/init.pre" \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r1" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r2" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r1" \
+							 "${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+
+	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
+		sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod || die "failed to remove perllocal.pod"
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist || die "failed to fix paths in packlist"
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	# The spamd daemon runs as this user. Use a real home directory so
+	# that it can hold SA configuration.
+	enewuser spamd -1 -1 /home/spamd
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+}


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

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

commit:     8509fc8bb4d887a0a5ebf685d04508824165b6cd
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 24 18:25:03 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Aug 24 18:26:32 2017 +0000
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"
 


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

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

commit:     2d55bc8f1afb8dc8f712ba139a860c828f52eb17
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  1 03:05:53 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Nov  1 18:54:56 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=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 00000000000..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 00000000000..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 () {
 		|| die "failed to disable plugins by default"
 
 	# Add the init and config scripts.
-	newinitd "${FILESDIR}/3.4.1-spamd.init-r1" spamd
-	newconfd "${FILESDIR}/3.4.1-spamd.conf" spamd
+	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" \
@@ -241,4 +241,9 @@ pkg_postinst() {
 	elog
 	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
 	elog
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, you may'
+	ewarn 'need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file.'
 }


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

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

commit:     c01a2a0ed33b456d068b436b5d9e185f936455f9
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  5 18:25:11 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Dec  5 18:46:02 2017 +0000
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 00000000000..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 00000000000..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 when
+# curl/wget are missing, so we depend on one of those instead. Some
+# mirrors use https, so we need those utilities to support SSL.
+#
+# re2c is needed to compile the rules (sa-compile).
+#
+# We still need the old Digest-SHA1 because razor2 has not been ported
+# to Digest-SHA.
+OPTDEPEND="app-crypt/gnupg
+	dev-perl/Digest-SHA1
+	dev-perl/Encode-Detect
+	dev-perl/Geo-IP
+	dev-perl/HTTP-Date
+	dev-perl/Mail-DKIM
+	dev-perl/Mail-SPF
+	dev-perl/Net-Patricia
+	dev-perl/Net-CIDR-Lite
+	dev-util/re2c
+	|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
+	virtual/perl-MIME-Base64
+	virtual/perl-Pod-Parser
+	berkdb? ( virtual/perl-DB_File )
+	ipv6? ( dev-perl/IO-Socket-INET6 )
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ssl? ( dev-perl/IO-Socket-SSL )"
+
+DEPEND="${REQDEPEND}
+	test? (
+		${OPTDEPEND}
+		virtual/perl-Test-Harness
+	)"
+RDEPEND="${REQDEPEND} ${OPTDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/spamassassin-3.4.1-bug_7199.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7462.patch"
+	"${FILESDIR}/spamassassin-3.4.1-perl526.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7361.patch"
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	emake install
+	einstalldocs
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}/etc/mail/spamassassin/init.pre" \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+							 "${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+
+	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
+		sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod || die "failed to remove perllocal.pod"
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist || die "failed to fix paths in packlist"
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	# The spamd daemon runs as this user. Use a real home directory so
+	# that it can hold SA configuration.
+	enewuser spamd -1 -1 /home/spamd
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+	ewarn 'configuration file.'
+}


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

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/, mail-filter/spamassassin/files/
@ 2018-03-17 22:48 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2018-03-17 22:48 UTC (permalink / raw
  To: gentoo-commits

commit:     42816e185f90512ffc22d815f3ed851848146dc1
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Fri Mar 16 14:19:38 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Mar 17 22:48:45 2018 +0000
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&r2=1684652&pathrev=1684653&view=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 00000000000..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 00000000000..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
+	)
+	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_7208.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7462.patch"
+	"${FILESDIR}/spamassassin-3.4.1-perl526.patch"
+	"${FILESDIR}/spamassassin-3.4.1-bug_7361.patch"
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	emake install
+	einstalldocs
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	dosym mail/spamassassin /etc/spamassassin
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}/etc/mail/spamassassin/init.pre" \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+							 "${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+
+	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
+		sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod || die "failed to remove perllocal.pod"
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist || die "failed to fix paths in packlist"
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	# The spamd daemon runs as this user. Use a real home directory so
+	# that it can hold SA configuration.
+	enewuser spamd -1 -1 /home/spamd
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+	ewarn 'configuration file.'
+}


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

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/, mail-filter/spamassassin/files/
@ 2018-12-11 10:19 Mikle Kolyada
  0 siblings, 0 replies; 17+ messages in thread
From: Mikle Kolyada @ 2018-12-11 10:19 UTC (permalink / raw
  To: gentoo-commits

commit:     dc7e9cb73adc438aa7fc4c7b8ea090f9d9cdcd14
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 11 10:19:10 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Tue Dec 11 10:19:30 2018 +0000
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 <zlogene <AT> 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..00000000000
--- 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) {
-+                    libspamc_log(flags, LOG_ERR,
-+                        "Explicit specification of an SSL/TLS version no longer supported.");
-+                    ret = EX_USAGE;
-+                }
-                 break;
-             }
- #endif
-Index: trunk/spamd/spamd.raw
-===================================================================
---- trunk.orig/spamd/spamd.raw
-+++ trunk/spamd/spamd.raw
-@@ -409,7 +409,6 @@ GetOptions(
-   'sql-config!'              => \$opt{'sql-config'},
-   'ssl'                      => \$opt{'ssl'},
-   'ssl-port=s'               => \$opt{'ssl-port'},
--  'ssl-version=s'            => \$opt{'ssl-version'},
-   'syslog-socket=s'          => \$opt{'syslog-socket'},
-   'syslog|s=s'               => \$opt{'syslog'},
-   'log-timestamp-fmt:s'      => \$opt{'log-timestamp-fmt'},
-@@ -744,11 +743,6 @@ if ( defined $ENV{'HOME'} ) {
- 
- # Do whitelist later in tmp dir. Side effect: this will be done as -u user.
- 
--my $sslversion = $opt{'ssl-version'} || 'sslv3';
--if ($sslversion !~ /^(?:sslv3|tlsv1)$/) {
--  die "spamd: invalid ssl-version: $opt{'ssl-version'}\n";
--}
--
- $opt{'server-key'}  ||= "$LOCAL_RULES_DIR/certs/server-key.pem";
- $opt{'server-cert'} ||= "$LOCAL_RULES_DIR/certs/server-cert.pem";
- 
-@@ -899,9 +893,8 @@ sub compose_listen_info_string {
-                       $socket_info->{ip_addr}, $socket_info->{port}));
- 
-     } elsif ($socket->isa('IO::Socket::SSL')) {
--      push(@listeninfo, sprintf("SSL [%s]:%s, ssl version %s",
--                      $socket_info->{ip_addr}, $socket_info->{port},
--                      $opt{'ssl-version'}||'sslv3'));
-+      push(@listeninfo, sprintf("SSL [%r]:%s", $socket_info->{ip_addr},
-+                      $socket_info->{port}));
-     }
-   }
- 
-@@ -1072,7 +1065,6 @@ sub server_sock_setup_inet {
-     $sockopt{V6Only} = 1  if $io_socket_module_name eq 'IO::Socket::IP'
-                              && IO::Socket::IP->VERSION >= 0.09;
-     %sockopt = (%sockopt, (
--      SSL_version     => $sslversion,
-       SSL_verify_mode => 0x00,
-       SSL_key_file    => $opt{'server-key'},
-       SSL_cert_file   => $opt{'server-cert'},
-@@ -1093,7 +1085,8 @@ sub server_sock_setup_inet {
-     if (!$server_inet) {
-       $diag = sprintf("could not create %s socket on [%s]:%s: %s",
-                       $ssl ? 'IO::Socket::SSL' : $io_socket_module_name,
--                      $adr, $port, $!);
-+                      $adr, $port, $ssl && $IO::Socket::SSL::SSL_ERROR ?
-+                      "$!,$IO::Socket::SSL::SSL_ERROR" : $!);
-       push(@diag_fail, $diag);
-     } else {
-       $diag = sprintf("created %s socket on [%s]:%s",
-@@ -3238,7 +3231,6 @@ Options:
-  -H [dir], --helper-home-dir[=dir] Specify a different HOME directory
-  --ssl                             Enable SSL on TCP connections
-  --ssl-port port                   Override --port setting for SSL connections
-- --ssl-version sslversion          Specify SSL protocol version to use
-  --server-key keyfile              Specify an SSL keyfile
-  --server-cert certfile            Specify an SSL certificate
-  --socketpath=path                 Listen on a given UNIX domain socket
-@@ -3727,14 +3719,6 @@ Optionally specifies the port number for
- SSL connections (default: whatever --port uses).  See B<--ssl> for
- more details.
- 
--=item B<--ssl-version>=I<sslversion>
--
--Specify the SSL protocol version to use, one of B<sslv3> or B<tlsv1>.
--The default, B<sslv3>, is the most flexible, accepting a SSLv3 or
--higher hello handshake, then negotiating use of SSLv3 or TLSv1
--protocol if the client can accept it.  Specifying B<--ssl-version>
--implies B<--ssl>.
--
- =item B<--server-key> I<keyfile>
- 
- Specify the SSL key file to use for SSL connections.
-Index: trunk/spamc/spamc.pod
-===================================================================
---- trunk.orig/spamc/spamc.pod
-+++ trunk/spamc/spamc.pod
-@@ -177,12 +177,10 @@ The default is 1 time (ie. one attempt a
- Sleep for I<sleep> seconds between failed spamd filtering attempts.
- The default is 1 second.
- 
--=item B<-S>, B<--ssl>, B<--ssl>=I<sslversion>
-+=item B<-S>, B<--ssl>, B<--ssl>
- 
- If spamc was built with support for SSL, encrypt data to and from the
- spamd process with SSL; spamd must support SSL as well.
--I<sslversion> specifies the SSL protocol version to use, either
--C<sslv3>, or C<tlsv1>. The default, is C<sslv3>.
- 
- =item B<-t> I<timeout>, B<--timeout>=I<timeout>
- 
-Index: trunk/t/spamd_ssl_tls.t
-===================================================================
---- trunk.orig/t/spamd_ssl_tls.t
-+++ /dev/null
-@@ -1,28 +0,0 @@
--#!/usr/bin/perl
--
--use lib '.'; use lib 't';
--use SATest; sa_t_init("spamd_ssl_tls");
--use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
--
--exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
--
--# ---------------------------------------------------------------------------
--
--%patterns = (
--
--q{ Return-Path: sb55sb55@yahoo.com}, 'firstline',
--q{ Subject: There yours for FREE!}, 'subj',
--q{ X-Spam-Status: Yes, score=}, 'status',
--q{ X-Spam-Flag: YES}, 'flag',
--q{ X-Spam-Level: **********}, 'stars',
--q{ TEST_ENDSNUMS}, 'endsinnums',
--q{ TEST_NOREALNAME}, 'noreal',
--q{ This must be the very last line}, 'lastline',
--
--
--);
--
--ok (sdrun ("-L --ssl --ssl-version=tlsv1 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert",
--           "--ssl=tlsv1 < data/spam/001",
--           \&patterns_run_cb));
--ok_all_patterns();
-Index: trunk/t/spamd_ssl_v3.t
-===================================================================
---- trunk.orig/t/spamd_ssl_v3.t
-+++ /dev/null
-@@ -1,28 +0,0 @@
--#!/usr/bin/perl
--
--use lib '.'; use lib 't';
--use SATest; sa_t_init("spamd_sslv3");
--use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
--
--exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
--
--# ---------------------------------------------------------------------------
--
--%patterns = (
--
--q{ Return-Path: sb55sb55@yahoo.com}, 'firstline',
--q{ Subject: There yours for FREE!}, 'subj',
--q{ X-Spam-Status: Yes, score=}, 'status',
--q{ X-Spam-Flag: YES}, 'flag',
--q{ X-Spam-Level: **********}, 'stars',
--q{ TEST_ENDSNUMS}, 'endsinnums',
--q{ TEST_NOREALNAME}, 'noreal',
--q{ This must be the very last line}, 'lastline',
--
--
--);
--
--ok (sdrun ("-L --ssl --ssl-version=sslv3 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert",
--           "--ssl=sslv3 < data/spam/001",
--           \&patterns_run_cb));
--ok_all_patterns();
-Index: trunk/t/spamd_ssl_accept_fail.t
-===================================================================
---- trunk.orig/t/spamd_ssl_accept_fail.t
-+++ trunk/t/spamd_ssl_accept_fail.t
-@@ -23,9 +23,9 @@ q{ This must be the very last line}, 'la
- 
- );
- 
--ok (start_spamd ("-L --ssl --ssl-version=sslv3 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert"));
-+ok (start_spamd ("-L --ssl --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert"));
- ok (spamcrun ("< data/spam/001", \&patterns_run_cb));
--ok (spamcrun ("--ssl=sslv3  < data/spam/001", \&patterns_run_cb));
-+ok (spamcrun ("--ssl < data/spam/001", \&patterns_run_cb));
- ok (stop_spamd ());
- 
- ok_all_patterns();
-Index: trunk/t/spamd_ssl.t
-===================================================================
---- trunk.orig/t/spamd_ssl.t
-+++ trunk/t/spamd_ssl.t
-@@ -2,10 +2,7 @@
- 
- use lib '.'; use lib 't';
- use SATest; sa_t_init("spamd_ssl");
--use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9),
--    onfail => sub {
--	warn "\n\nNote: This may not be a SpamAssassin bug, as some platforms require that you" .
--	    "\nspecify a protocol in spamc --ssl option, and possibly in spamd --ssl-version.\n\n" };
-+use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
- 
- exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
- 
-Index: trunk/MANIFEST
-===================================================================
---- trunk.orig/MANIFEST
-+++ trunk/MANIFEST
-@@ -513,8 +513,6 @@ t/spamd_report_ifspam.t
- t/spamd_sql_prefs.t
- t/spamd_ssl.t
- t/spamd_ssl_accept_fail.t
--t/spamd_ssl_tls.t
--t/spamd_ssl_v3.t
- t/spamd_stop.t
- t/spamd_symbols.t
- t/spamd_syslog.t

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

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231.patch
deleted file mode 100644
index 0d6e43abb6d..00000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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
deleted file mode 100644
index f4fc4bcc718..00000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7265.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-# 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<Net::DNS::Resolver::bgread>.  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 $peerhost";
-+  dbg("dns: bgread: received %d bytes from %s", length($data), $peerhost);
-+  my($answerpkt, $decoded_length) = Net::DNS::Packet->new(\$data);
-+  $answerpkt or die "bgread: decoding DNS packet failed: $@";
-+  $answerpkt->answerfrom($peerhost);
-+  if ($decoded_length ne length($data)) {
-+    warn sprintf("bgread: received a %d bytes packet from %s, decoded %d bytes\n",
-+                 length($data), $peerhost, $decoded_length);
-+  }
-+  return $answerpkt;
-+}
-+
-+###########################################################################
-+
- =item $nfound = $res->poll_responses()
- 
- See if there are any C<bgsend> reply packets ready, and return
-@@ -772,13 +803,25 @@
-     $timeout = 0;  # next time around collect whatever is available, then exit
-     last  if $nfound == 0;
- 
--    my $packet = $self->{res}->bgread($self->{sock});
-+    my $packet;
-+    eval {
-+      $packet = $self->bgread();
-+    } or do {
-+      undef $packet;
-+      my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
-+      # resignal if alarm went off
-+      die $eval_stat  if $eval_stat =~ /__alarm__ignore__\(.*\)/s;
-+      info("dns: bad dns reply: %s", $eval_stat);
-+    };
-+
-+#   Bug 7265, use our own bgread()
-+#   my $packet = $self->{res}->bgread($self->{sock});
- 
-     if (!$packet) {
--      my $dns_err = $self->{res}->errorstring;
--      # resignal if alarm went off
--      die "dns (3) $dns_err\n"  if $dns_err =~ /__alarm__ignore__\(.*\)/s;
--      info("dns: bad dns reply: $dns_err");
-+      # error already reported above
-+#     my $dns_err = $self->{res}->errorstring;
-+#     die "dns (3) $dns_err\n"  if $dns_err =~ /__alarm__ignore__\(.*\)/s;
-+#     info("dns: bad dns reply: $dns_err");
-     } else {
-       my $header = $packet->header;
-       if (!$header) {
-
---- a/lib/Mail/SpamAssassin/Plugin/DKIM.pm	2015/11/19 19:20:06	1715247
-+++ b/lib/Mail/SpamAssassin/Plugin/DKIM.pm	2015/11/19 19:22:25	1715248
-@@ -793,7 +793,8 @@
-         # Only do so if EDNS0 provides a reasonably-sized UDP payload size,
-         # as our interface does not provide a DNS fallback to TCP, unlike
-         # the Net::DNS::Resolver::send which does provide it.
--        my $res = $self->{main}->{resolver}->get_resolver;
-+        my $res = $self->{main}->{resolver};
-+        dbg("dkim: providing our own resolver: %s", ref $res);
-         Mail::DKIM::DNS::resolver($res);
-       }
-     }

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

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch
deleted file mode 100644
index 563110fcb1f..00000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- 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/files/spamassassin-3.4.1-bug_7462.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch
deleted file mode 100644
index bf4dc111acb..00000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-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.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/basic_meta.t	2017-08-20 21:29:44.000000000 -0400
-@@ -14,10 +14,11 @@
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
- use strict;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("meta");
- use Test;
- use Mail::SpamAssassin;
- 
- use vars qw( %rules %scores $perl_path);
---- Mail-SpamAssassin-3.4.1/t/body_mod.t	2015-04-28 15:56:58.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/body_mod.t	2017-08-20 21:30:09.000000000 -0400
-@@ -14,10 +14,11 @@
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
- use strict;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("body_mod");
- use Test; BEGIN { plan tests => 3 };
- 
- use Mail::SpamAssassin;
- 
---- Mail-SpamAssassin-3.4.1/t/config_errs.t	2015-04-28 15:56:59.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/config_errs.t	2017-08-20 21:30:28.000000000 -0400
-@@ -39,10 +39,11 @@
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
- use strict;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("config_errs");
- use Test;
- use Mail::SpamAssassin;
- 
- # initialize SpamAssassin
---- Mail-SpamAssassin-3.4.1/t/debug.t	2015-04-28 15:56:58.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/debug.t	2017-08-20 21:31:02.000000000 -0400
-@@ -14,10 +14,11 @@
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
- use strict;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("debug");
- use Test;
- use Mail::SpamAssassin;
- 
- use constant TEST_ENABLED => conf_bool('run_long_tests');
---- Mail-SpamAssassin-3.4.1/t/get_headers.t	2015-04-28 15:56:58.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/get_headers.t	2017-08-20 21:31:48.000000000 -0400
-@@ -15,10 +15,11 @@
-   $prefix = '..';
- }
- 
- use strict;
- use Test;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("get_headers");
- use Mail::SpamAssassin;
- 
- plan tests => 16;
- 
---- Mail-SpamAssassin-3.4.1/t/idn_dots.t	2015-04-28 15:56:58.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/idn_dots.t	2017-08-20 21:32:03.000000000 -0400
-@@ -16,10 +16,11 @@
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
- use strict;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("normalize_utf8_dots.t");
- use Test;
- use Mail::SpamAssassin;
- use vars qw(%patterns %anti_patterns);
- 
---- Mail-SpamAssassin-3.4.1/t/missing_hb_separator.t	2015-04-28 15:56:58.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/missing_hb_separator.t	2017-08-20 21:32:17.000000000 -0400
-@@ -15,10 +15,11 @@
-   $prefix = '..';
- }
- 
- use strict;
- use Test;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("missing_hb_separator");
- use Mail::SpamAssassin;
- 
- plan tests => 13;
- 
---- Mail-SpamAssassin-3.4.1/t/priorities.t	2015-04-28 15:56:59.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/priorities.t	2017-08-20 21:34:21.000000000 -0400
-@@ -15,10 +15,11 @@
- my $prefix = '.';
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("priorities");
- use strict;
- use Test; BEGIN { plan tests => NUM_TESTS };
- 
- use Mail::SpamAssassin;
---- Mail-SpamAssassin-3.4.1/t/regexp_valid.t	2015-04-28 15:56:59.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/regexp_valid.t	2017-08-20 21:34:31.000000000 -0400
-@@ -14,10 +14,11 @@
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
- use strict;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("regexp_valid");
- use Test;
- 
- # settings
- plan tests => 24;
---- Mail-SpamAssassin-3.4.1/t/relative_scores.t	2015-04-28 15:56:59.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/relative_scores.t	2017-08-20 21:34:43.000000000 -0400
-@@ -9,10 +9,11 @@
-   if (-e 'test_dir') {            # running from test directory, not ..
-     unshift(@INC, '../blib/lib', '.');
-   }
- }
- 
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("relative_scores");
- use Test;
- use strict;
- use vars qw/ $error /;
- 
---- Mail-SpamAssassin-3.4.1/t/reuse.t	2015-04-28 15:56:58.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/reuse.t	2017-08-20 21:34:52.000000000 -0400
-@@ -14,10 +14,11 @@
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
- use strict;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("reuse");
- use Test;
- 
- use vars qw(%patterns %anti_patterns $perl_path &patterns_run_cb);
- 
---- Mail-SpamAssassin-3.4.1/t/uri_html.t	2015-04-28 15:56:58.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/uri_html.t	2017-08-20 21:35:20.000000000 -0400
-@@ -16,10 +16,11 @@
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
- use strict;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("uri_html");
- use Test;
- use Mail::SpamAssassin;
- use vars qw(%patterns %anti_patterns);
- 
---- Mail-SpamAssassin-3.4.1/t/uri.t	2015-04-28 15:56:59.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/uri.t	2017-08-20 21:35:30.000000000 -0400
-@@ -15,10 +15,11 @@
-   $prefix = '..';
- }
- 
- use strict;
- use Test;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("uri");
- 
- use Mail::SpamAssassin;
- use Mail::SpamAssassin::HTML;
- use Mail::SpamAssassin::Util;
---- Mail-SpamAssassin-3.4.1/t/uri_text.t	2015-04-28 15:56:58.000000000 -0400
-+++ Mail-SpamAssassin-3.4.1/t/uri_text.t	2017-08-20 21:35:07.000000000 -0400
-@@ -16,10 +16,11 @@
- if (-e 'test_dir') {            # running from test directory, not ..
-   $prefix = '..';
- }
- 
- use strict;
-+use lib '.'; use lib 't';
- use SATest; sa_t_init("uri_text");
- use Test;
- use Mail::SpamAssassin;
- use vars qw(%patterns %anti_patterns);
- 

diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch
deleted file mode 100644
index 1c63136e3f6..00000000000
--- a/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-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-r19.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild
deleted file mode 100644
index d40f8141384..00000000000
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild
+++ /dev/null
@@ -1,251 +0,0 @@
-# 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
-	)
-	postgres? (
-		dev-perl/DBI
-		dev-perl/DBD-Pg
-	)
-	sqlite? (
-		dev-perl/DBI
-		dev-perl/DBD-SQLite
-	)
-	ssl? ( dev-perl/IO-Socket-SSL )"
-
-DEPEND="${REQDEPEND}
-	test? (
-		${OPTDEPEND}
-		virtual/perl-Test-Harness
-	)"
-RDEPEND="${REQDEPEND} ${OPTDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/spamassassin-3.4.1-bug_7199.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7462.patch"
-	"${FILESDIR}/spamassassin-3.4.1-perl526.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7361.patch"
-)
-
-src_prepare() {
-	default
-
-	# The sa_compile test does some weird stuff like hopping around in
-	# the directory tree and calling "make" to create a dist tarball
-	# from ${S}. It fails, and is more trouble than it's worth...
-	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
-
-	# The spamc tests (which need the networked spamd daemon) fail for
-	# irrelevant reasons. It's too hard to disable them (unlike the
-	# spamd tests themselves -- see src_test), so use a crude
-	# workaround.
-	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
-}
-
-src_configure() {
-	# This is how and where the perl-module eclass disables the
-	# MakeMaker interactive prompt.
-	export PERL_MM_USE_DEFAULT=1
-
-	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
-	# (just to be sure, nobody knows how it could happen in the first place).
-	#
-	# We also set the path to the perl executable explictly. This will be
-	# used to create the initial shebang line in the scripts (bug 62276).
-	perl Makefile.PL \
-		PREFIX="${EPREFIX}/usr" \
-		INSTALLDIRS=vendor \
-		SYSCONFDIR="${EPREFIX}/etc" \
-		DATADIR="${EPREFIX}/usr/share/spamassassin" \
-		PERL_BIN="${EPREFIX}/usr/bin/perl" \
-		ENABLE_SSL="$(usex ssl)" \
-		DESTDIR="${D}" \
-		|| die 'failed to create a Makefile using Makefile.PL'
-
-	# Now configure spamc.
-	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
-}
-
-src_compile() {
-	emake
-	use qmail && emake spamc/qmail-spamc
-}
-
-src_install () {
-	emake install
-	einstalldocs
-
-	# Create the stub dir used by sa-update and friends
-	keepdir /var/lib/spamassassin
-
-	# Move spamd to sbin where it belongs.
-	dodir /usr/sbin
-	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
-
-	if use qmail; then
-		dobin spamc/qmail-spamc
-	fi
-
-	ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
-
-	# Disable plugin by default
-	sed -i -e 's/^loadplugin/\#loadplugin/g' \
-		"${ED}/etc/mail/spamassassin/init.pre" \
-		|| die "failed to disable plugins by default"
-
-	# Add the init and config scripts.
-	newinitd "${FILESDIR}/3.4.1-spamd.init-r2" spamd
-	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
-
-	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
-	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
-							 "${PN}.service"
-
-	use postgres && dodoc sql/*_pg.sql
-	use mysql && dodoc sql/*_mysql.sql
-
-	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
-		sql/README.awl procmailrc.example sample-nonspam.txt \
-		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
-		spamd-apache2/README.apache
-
-	# Rename some files so that they don't clash with others.
-	newdoc spamd/README README.spamd
-	newdoc sql/README README.sql
-	newdoc ldap/README README.ldap
-
-	if use qmail; then
-		dodoc spamc/README.qmail
-	fi
-
-	insinto /etc/mail/spamassassin/
-	insopts -m0400
-	newins "${FILESDIR}"/secrets.cf secrets.cf.example
-
-	# Create the directory where sa-update stores its GPG key (if you
-	# choose to import one). If this directory does not exist, the
-	# import will fail. This is bug 396307. We expect that the import
-	# will be performed as root, and making the directory accessible
-	# only to root prevents a warning on the command-line.
-	diropts -m0700
-	dodir /etc/mail/spamassassin/sa-update-keys
-
-	if use cron; then
-		# Install the cron job if they want it.
-		exeinto /etc/cron.daily
-		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
-			   update-spamassassin-rules
-	fi
-
-	# Remove perllocal.pod to avoid file collisions (bug #603338).
-	perl_delete_localpod || die "failed to remove perllocal.pod"
-
-	# The perl-module eclass calls three other functions to clean
-	# up in src_install. The first fixes references to ${D} in the
-	# packlist, and is useful to us, too. The other two functions,
-	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
-	# to be needed: there are no empty directories, *.bs files, or
-	# ${D} paths remaining in our installed image.
-	perl_fix_packlist || die "failed to fix paths in packlist"
-}
-
-src_test() {
-	# Trick the test suite into skipping the spamd tests. Setting
-	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
-	# set in SATest.pm.
-	export SPAMD_HOST=disabled
-	default
-}
-
-pkg_preinst() {
-	# The spamd daemon runs as this user. Use a real home directory so
-	# that it can hold SA configuration.
-	enewuser spamd -1 -1 /home/spamd
-}
-
-pkg_postinst() {
-	elog
-	elog 'No rules are installed by default. You will need to run sa-update'
-	elog 'at least once, and most likely configure SpamAssassin before it'
-	elog 'will work.'
-
-	if ! use cron; then
-		elog
-		elog 'You should consider a cron job for sa-update. One is provided'
-		elog 'for daily updates if you enable the "cron" USE flag.'
-	fi
-	elog
-	elog 'Configuration and update help can be found on the wiki:'
-	elog
-	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
-	elog
-
-	ewarn 'If this version of SpamAssassin causes permissions issues'
-	ewarn 'with your user configurations or bayes databases, then you'
-	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
-	ewarn 'configuration file, or remove the --username and --groupname'
-	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
-	ewarn 'configuration file.'
-}

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild
deleted file mode 100644
index fbea7792df5..00000000000
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild
+++ /dev/null
@@ -1,251 +0,0 @@
-# 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
-	)
-	postgres? (
-		dev-perl/DBI
-		dev-perl/DBD-Pg
-	)
-	sqlite? (
-		dev-perl/DBI
-		dev-perl/DBD-SQLite
-	)
-	ssl? ( dev-perl/IO-Socket-SSL )"
-
-DEPEND="${REQDEPEND}
-	test? (
-		${OPTDEPEND}
-		virtual/perl-Test-Harness
-	)"
-RDEPEND="${REQDEPEND} ${OPTDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/spamassassin-3.4.1-bug_7199.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7462.patch"
-	"${FILESDIR}/spamassassin-3.4.1-perl526.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7361.patch"
-)
-
-src_prepare() {
-	default
-
-	# The sa_compile test does some weird stuff like hopping around in
-	# the directory tree and calling "make" to create a dist tarball
-	# from ${S}. It fails, and is more trouble than it's worth...
-	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
-
-	# The spamc tests (which need the networked spamd daemon) fail for
-	# irrelevant reasons. It's too hard to disable them (unlike the
-	# spamd tests themselves -- see src_test), so use a crude
-	# workaround.
-	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
-}
-
-src_configure() {
-	# This is how and where the perl-module eclass disables the
-	# MakeMaker interactive prompt.
-	export PERL_MM_USE_DEFAULT=1
-
-	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
-	# (just to be sure, nobody knows how it could happen in the first place).
-	#
-	# We also set the path to the perl executable explictly. This will be
-	# used to create the initial shebang line in the scripts (bug 62276).
-	perl Makefile.PL \
-		PREFIX="${EPREFIX}/usr" \
-		INSTALLDIRS=vendor \
-		SYSCONFDIR="${EPREFIX}/etc" \
-		DATADIR="${EPREFIX}/usr/share/spamassassin" \
-		PERL_BIN="${EPREFIX}/usr/bin/perl" \
-		ENABLE_SSL="$(usex ssl)" \
-		DESTDIR="${D}" \
-		|| die 'failed to create a Makefile using Makefile.PL'
-
-	# Now configure spamc.
-	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
-}
-
-src_compile() {
-	emake
-	use qmail && emake spamc/qmail-spamc
-}
-
-src_install () {
-	emake install
-	einstalldocs
-
-	# Create the stub dir used by sa-update and friends
-	keepdir /var/lib/spamassassin
-
-	# Move spamd to sbin where it belongs.
-	dodir /usr/sbin
-	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
-
-	if use qmail; then
-		dobin spamc/qmail-spamc
-	fi
-
-	dosym mail/spamassassin /etc/spamassassin
-
-	# Disable plugin by default
-	sed -i -e 's/^loadplugin/\#loadplugin/g' \
-		"${ED}/etc/mail/spamassassin/init.pre" \
-		|| die "failed to disable plugins by default"
-
-	# Add the init and config scripts.
-	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
-	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
-
-	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
-	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
-							 "${PN}.service"
-
-	use postgres && dodoc sql/*_pg.sql
-	use mysql && dodoc sql/*_mysql.sql
-
-	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
-		sql/README.awl procmailrc.example sample-nonspam.txt \
-		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
-		spamd-apache2/README.apache
-
-	# Rename some files so that they don't clash with others.
-	newdoc spamd/README README.spamd
-	newdoc sql/README README.sql
-	newdoc ldap/README README.ldap
-
-	if use qmail; then
-		dodoc spamc/README.qmail
-	fi
-
-	insinto /etc/mail/spamassassin/
-	insopts -m0400
-	newins "${FILESDIR}"/secrets.cf secrets.cf.example
-
-	# Create the directory where sa-update stores its GPG key (if you
-	# choose to import one). If this directory does not exist, the
-	# import will fail. This is bug 396307. We expect that the import
-	# will be performed as root, and making the directory accessible
-	# only to root prevents a warning on the command-line.
-	diropts -m0700
-	dodir /etc/mail/spamassassin/sa-update-keys
-
-	if use cron; then
-		# Install the cron job if they want it.
-		exeinto /etc/cron.daily
-		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
-			   update-spamassassin-rules
-	fi
-
-	# Remove perllocal.pod to avoid file collisions (bug #603338).
-	perl_delete_localpod || die "failed to remove perllocal.pod"
-
-	# The perl-module eclass calls three other functions to clean
-	# up in src_install. The first fixes references to ${D} in the
-	# packlist, and is useful to us, too. The other two functions,
-	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
-	# to be needed: there are no empty directories, *.bs files, or
-	# ${D} paths remaining in our installed image.
-	perl_fix_packlist || die "failed to fix paths in packlist"
-}
-
-src_test() {
-	# Trick the test suite into skipping the spamd tests. Setting
-	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
-	# set in SATest.pm.
-	export SPAMD_HOST=disabled
-	default
-}
-
-pkg_preinst() {
-	# The spamd daemon runs as this user. Use a real home directory so
-	# that it can hold SA configuration.
-	enewuser spamd -1 -1 /home/spamd
-}
-
-pkg_postinst() {
-	elog
-	elog 'No rules are installed by default. You will need to run sa-update'
-	elog 'at least once, and most likely configure SpamAssassin before it'
-	elog 'will work.'
-
-	if ! use cron; then
-		elog
-		elog 'You should consider a cron job for sa-update. One is provided'
-		elog 'for daily updates if you enable the "cron" USE flag.'
-	fi
-	elog
-	elog 'Configuration and update help can be found on the wiki:'
-	elog
-	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
-	elog
-
-	ewarn 'If this version of SpamAssassin causes permissions issues'
-	ewarn 'with your user configurations or bayes databases, then you'
-	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
-	ewarn 'configuration file, or remove the --username and --groupname'
-	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
-	ewarn 'configuration file.'
-}

diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r21.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r21.ebuild
deleted file mode 100644
index e8abe80c39e..00000000000
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r21.ebuild
+++ /dev/null
@@ -1,252 +0,0 @@
-# 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
-	)
-	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_7208.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7462.patch"
-	"${FILESDIR}/spamassassin-3.4.1-perl526.patch"
-	"${FILESDIR}/spamassassin-3.4.1-bug_7361.patch"
-)
-
-src_prepare() {
-	default
-
-	# The sa_compile test does some weird stuff like hopping around in
-	# the directory tree and calling "make" to create a dist tarball
-	# from ${S}. It fails, and is more trouble than it's worth...
-	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
-
-	# The spamc tests (which need the networked spamd daemon) fail for
-	# irrelevant reasons. It's too hard to disable them (unlike the
-	# spamd tests themselves -- see src_test), so use a crude
-	# workaround.
-	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
-}
-
-src_configure() {
-	# This is how and where the perl-module eclass disables the
-	# MakeMaker interactive prompt.
-	export PERL_MM_USE_DEFAULT=1
-
-	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
-	# (just to be sure, nobody knows how it could happen in the first place).
-	#
-	# We also set the path to the perl executable explictly. This will be
-	# used to create the initial shebang line in the scripts (bug 62276).
-	perl Makefile.PL \
-		PREFIX="${EPREFIX}/usr" \
-		INSTALLDIRS=vendor \
-		SYSCONFDIR="${EPREFIX}/etc" \
-		DATADIR="${EPREFIX}/usr/share/spamassassin" \
-		PERL_BIN="${EPREFIX}/usr/bin/perl" \
-		ENABLE_SSL="$(usex ssl)" \
-		DESTDIR="${D}" \
-		|| die 'failed to create a Makefile using Makefile.PL'
-
-	# Now configure spamc.
-	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
-}
-
-src_compile() {
-	emake
-	use qmail && emake spamc/qmail-spamc
-}
-
-src_install () {
-	emake install
-	einstalldocs
-
-	# Create the stub dir used by sa-update and friends
-	keepdir /var/lib/spamassassin
-
-	# Move spamd to sbin where it belongs.
-	dodir /usr/sbin
-	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
-
-	if use qmail; then
-		dobin spamc/qmail-spamc
-	fi
-
-	dosym mail/spamassassin /etc/spamassassin
-
-	# Disable plugin by default
-	sed -i -e 's/^loadplugin/\#loadplugin/g' \
-		"${ED}/etc/mail/spamassassin/init.pre" \
-		|| die "failed to disable plugins by default"
-
-	# Add the init and config scripts.
-	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
-	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
-
-	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
-	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
-							 "${PN}.service"
-
-	use postgres && dodoc sql/*_pg.sql
-	use mysql && dodoc sql/*_mysql.sql
-
-	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
-		sql/README.awl procmailrc.example sample-nonspam.txt \
-		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
-		spamd-apache2/README.apache
-
-	# Rename some files so that they don't clash with others.
-	newdoc spamd/README README.spamd
-	newdoc sql/README README.sql
-	newdoc ldap/README README.ldap
-
-	if use qmail; then
-		dodoc spamc/README.qmail
-	fi
-
-	insinto /etc/mail/spamassassin/
-	insopts -m0400
-	newins "${FILESDIR}"/secrets.cf secrets.cf.example
-
-	# Create the directory where sa-update stores its GPG key (if you
-	# choose to import one). If this directory does not exist, the
-	# import will fail. This is bug 396307. We expect that the import
-	# will be performed as root, and making the directory accessible
-	# only to root prevents a warning on the command-line.
-	diropts -m0700
-	dodir /etc/mail/spamassassin/sa-update-keys
-
-	if use cron; then
-		# Install the cron job if they want it.
-		exeinto /etc/cron.daily
-		newexe "${FILESDIR}/update-spamassassin-rules.cron" \
-			   update-spamassassin-rules
-	fi
-
-	# Remove perllocal.pod to avoid file collisions (bug #603338).
-	perl_delete_localpod || die "failed to remove perllocal.pod"
-
-	# The perl-module eclass calls three other functions to clean
-	# up in src_install. The first fixes references to ${D} in the
-	# packlist, and is useful to us, too. The other two functions,
-	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
-	# to be needed: there are no empty directories, *.bs files, or
-	# ${D} paths remaining in our installed image.
-	perl_fix_packlist || die "failed to fix paths in packlist"
-}
-
-src_test() {
-	# Trick the test suite into skipping the spamd tests. Setting
-	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
-	# set in SATest.pm.
-	export SPAMD_HOST=disabled
-	default
-}
-
-pkg_preinst() {
-	# The spamd daemon runs as this user. Use a real home directory so
-	# that it can hold SA configuration.
-	enewuser spamd -1 -1 /home/spamd
-}
-
-pkg_postinst() {
-	elog
-	elog 'No rules are installed by default. You will need to run sa-update'
-	elog 'at least once, and most likely configure SpamAssassin before it'
-	elog 'will work.'
-
-	if ! use cron; then
-		elog
-		elog 'You should consider a cron job for sa-update. One is provided'
-		elog 'for daily updates if you enable the "cron" USE flag.'
-	fi
-	elog
-	elog 'Configuration and update help can be found on the wiki:'
-	elog
-	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
-	elog
-
-	ewarn 'If this version of SpamAssassin causes permissions issues'
-	ewarn 'with your user configurations or bayes databases, then you'
-	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
-	ewarn 'configuration file, or remove the --username and --groupname'
-	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
-	ewarn 'configuration file.'
-}


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

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

commit:     984199eccccd1fa7867c07f8a467d298eade11fa
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Sat Mar 30 12:41:44 2019 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Mar 31 18:46:19 2019 +0000
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 <gentoo_bugs_peep <AT> parallaxshift.com>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
Signed-off-by: Michael Orlitzky <mjo <AT> 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 00000000000..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 00000000000..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
+	|| ( net-misc/wget[ssl] net-misc/curl[ssl] )
+	virtual/perl-MIME-Base64
+	virtual/perl-Pod-Parser
+	berkdb? ( virtual/perl-DB_File )
+	ipv6? ( dev-perl/IO-Socket-INET6 )
+	ldap? ( dev-perl/perl-ldap )
+	mysql? (
+		dev-perl/DBI
+		dev-perl/DBD-mysql
+	)
+	postgres? (
+		dev-perl/DBI
+		dev-perl/DBD-Pg
+	)
+	sqlite? (
+		dev-perl/DBI
+		dev-perl/DBD-SQLite
+	)
+	ssl? ( dev-perl/IO-Socket-SSL )"
+
+DEPEND="${REQDEPEND}
+	test? (
+		${OPTDEPEND}
+		virtual/perl-Test-Harness
+	)"
+RDEPEND="${REQDEPEND} ${OPTDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/spamassassin-3.4.2-bug_7631.patch"
+	"${FILESDIR}/spamassassin-3.4.2-bug_7632.patch"
+	"${FILESDIR}/spamassassin-3.4.2-bug_7623_p1.patch"
+	"${FILESDIR}/spamassassin-3.4.2-bug_7623_p2.patch"
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
+
+	# Upstream bug 7622: this thing needs network access but doesn't
+	# respect the 'run_net_tests' setting.
+	perl_rm_files t/urilocalbl_geoip.t \
+		|| die 'failed to remove urilocalbl_geoip tests'
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	emake install
+	einstalldocs
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	dosym mail/spamassassin /etc/spamassassin
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"${ED}/etc/mail/spamassassin/init.pre" \
+		|| die "failed to disable plugins by default"
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+							 "${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+
+	dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
+		sql/README.awl procmailrc.example sample-nonspam.txt \
+		sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
+		spamd-apache2/README.apache
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	if use qmail; then
+		dodoc spamc/README.qmail
+	fi
+
+	insinto /etc/mail/spamassassin/
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod || die "failed to remove perllocal.pod"
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist || die "failed to fix paths in packlist"
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	# The spamd daemon runs as this user. Use a real home directory so
+	# that it can hold SA configuration.
+	enewuser spamd -1 -1 /home/spamd
+
+	if use mysql || use postgres ; then
+		local _awlwarn=0
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ! ver_test "${_v}" -gt "3.4.2-r3"; then
+				_awlwarn=1
+			fi
+		done
+		if [[ ${_awlwarn} == 1 ]] ; then
+			ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.'
+			ewarn 'You will need to manually ALTER your tables for them to'
+			ewarn 'continue working.  See the UPGRADE documentation for'
+			ewarn 'details.'
+			ewarn
+		fi
+	fi
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+
+	if use mysql || use postgres ; then
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.2-r3"; then
+				ewarn
+				ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.'
+				ewarn 'You will need to manually ALTER your tables for them to'
+				ewarn 'continue working.  See the UPGRADE documentation for'
+				ewarn 'details.'
+				ewarn
+
+				# show this only once
+				break
+			fi
+		done
+	fi
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+	ewarn 'configuration file.'
+}


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

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/, mail-filter/spamassassin/files/
@ 2020-06-20 20:31 Thomas Deutschmann
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Deutschmann @ 2020-06-20 20:31 UTC (permalink / raw
  To: gentoo-commits

commit:     1671a7c121fda24998728ae93c43ccb148e727c8
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Thu May 21 00:46:18 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jun 20 20:30:52 2020 +0000
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 <gentoo_bugs_peep <AT> parallaxshift.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> 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 00000000000..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
+#score        RELAYCOUNTRY_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 :-)
+#score        RELAYCOUNTRY_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 00000000000..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.000000000 -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 00000000000..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 libressl mysql postgres qmail sqlite ssl test"
+RESTRICT="!test? ( test )"
+
+# The Makefile.PL script checks for dependencies, but only fails if a
+# required (i.e. not optional) dependency is missing. We therefore
+# require most of the optional modules only at runtime.
+REQDEPEND="acct-user/spamd
+	acct-group/spamd
+	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/GeoIP2 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}/mention-geoip.cf-in-init.pre.patch"
+)
+
+# There are a few renames and use-dependent ones in src_istall as well.
+DOCS=(
+	NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes
+	sql/README.awl procmailrc.example sample-nonspam.txt
+	sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail
+	spamd-apache2/README.apache
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"rules/init.pre" \
+		|| die "failed to disable plugins by default"
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	default
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	dosym mail/spamassassin /etc/spamassassin
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+		"${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+	use qmail && dodoc spamc/README.qmail
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	insinto /etc/mail/spamassassin/
+	doins "${FILESDIR}"/geoip.cf
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	if use mysql || use postgres ; then
+		local _awlwarn=0
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.3"; then
+				_awlwarn=1
+				break
+			fi
+		done
+		if [[ ${_awlwarn} == 1 ]] ; then
+			ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+			ewarn 'You will need to manually ALTER your tables for them to'
+			ewarn 'continue working.  See the UPGRADE documentation for'
+			ewarn 'details.'
+			ewarn
+		fi
+	fi
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+
+	if use mysql || use postgres ; then
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.3"; then
+				ewarn
+				ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+				ewarn 'You will need to manually ALTER your tables for them to'
+				ewarn 'continue working.  See the UPGRADE documentation for'
+				ewarn 'details.'
+				ewarn
+
+				# show this only once
+				break
+			fi
+		done
+	fi
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+	ewarn 'configuration file.'
+
+	if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
+		ewarn "The spamd user's home folder has been moved to a new location."
+		elog
+		elog "The acct-user/spamd package should have relocated it for you,"
+		elog "but may have failed because your spamd daemon was running."
+		elog
+		elog "To fix this:"
+		elog " - Stop your spamd daemon"
+		elog " - emerge -1 acct-user/spamd"
+		elog " - Restart your spamd daemon"
+		elog " - Remove the old home folder if you want"
+		elog "     rm -rf \"${ROOT}/home/spamd\""
+	fi
+	if [[ -e "${ROOT}/home/spamd" ]] ; then
+		ewarn
+		ewarn "The spamd user's home folder has been moved to a new location."
+		elog
+		elog "  Old Home: ${ROOT}/home/spamd"
+		elog "  New Home: ${ROOT}/var/lib/spamd"
+		elog
+		elog "You may wish to migrate your data to the new location:"
+		elog " - Stop your spamd daemon"
+		elog " - Re-emerge acct-user/spamd to ensure the home folder has been"
+		elog "   updated to the new location, now that the daemon isn't running:"
+		elog "     # emerge -1 acct-user/spamd"
+		elog "     # echo ~spamd"
+		elog " - Migrate the contents from the old location to the new home"
+		elog "   For example:"
+		elog "     # cp -Rpi \"${ROOT}/home/spamd/\" \"${ROOT}/var/lib/\""
+		elog " - Remove the old home folder"
+		elog "     # rm -rf \"${ROOT}/home/spamd\""
+		elog " - Restart your spamd daemon"
+		elog
+		elog "If you do not wish to migrate data, you should remove the old"
+		elog "home folder from your system as it is not used."
+	fi
+}


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

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

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

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

Signed-off-by: Sam James <sam <AT> 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 000000000000..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 <sys/types.h>
+-#include <sys/socket.h>],
++#include <sys/socket.h>
++#include <stdio.h>
++],
+                         [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 <netdb.h>],
++                AC_TRY_COMPILE([#include <netdb.h>
++#include <stdio.h>],
+                         [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 <sys/types.h>
+ #include <sys/socket.h>
++#include <stdio.h>
+ int
+ main ()
+ {
+@@ -4253,6 +4254,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <netdb.h>
++#include <stdio.h>
+ 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.


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

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

commit:     2d9f3361c8663d1bb0c189cd745bb75e7440724d
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Mon Dec 26 21:26:29 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 11:39:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=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 <gentoo_bugs_peep <AT> parallaxshift.com>
Signed-off-by: Sam James <sam <AT> 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 000000000000..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.


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

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/, mail-filter/spamassassin/files/
@ 2023-01-05  5:21 Sam James
  0 siblings, 0 replies; 17+ messages in thread
From: Sam James @ 2023-01-05  5:21 UTC (permalink / raw
  To: gentoo-commits

commit:     325ed1f8aca592694a776b3fc2095456b263964b
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Thu Dec 29 12:45:33 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan  5 05:19:34 2023 +0000
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/888845
Closes: https://github.com/gentoo/gentoo/pull/28888
Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift.com>
Signed-off-by: Sam James <sam <AT> 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 000000000000..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
+#score        RELAYCOUNTRY_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 :-)
+#score        RELAYCOUNTRY_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 000000000000..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:=
+	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"
+)
+
+# There are a few renames and use-dependent ones in src_install as well.
+DOCS=(
+	NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes
+	sql/README.awl procmailrc.example sample-nonspam.txt
+	sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail
+	spamd-apache2/README.apache
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t
+
+	# Some tests need extra dependencies
+	# e.g. t/sql_based_whitelist.t needs DBD
+	# This is kinder than REQUIRED_USE for tests which hurts automation
+	if ! use mysql && ! use postgres && ! use sqlite ; then
+		perl_rm_files t/sql_based_whitelist.t
+	fi
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"rules/init.pre" \
+		|| die "failed to disable plugins by default"
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	default
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	dosym mail/spamassassin /etc/spamassassin
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+		"${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+	use qmail && dodoc spamc/README.qmail
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	insinto /etc/mail/spamassassin/
+	newins "${FILESDIR}"/geoip-4.0.0.cf geoip.cf
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	if use mysql || use postgres ; then
+		local _awlwarn=0
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.3"; then
+				_awlwarn=1
+				break
+			fi
+		done
+		if [[ ${_awlwarn} == 1 ]] ; then
+			ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+			ewarn 'You will need to manually ALTER your tables for them to'
+			ewarn 'continue working.  See the UPGRADE documentation for'
+			ewarn 'details.'
+			ewarn
+		fi
+	fi
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+
+	if use mysql || use postgres ; then
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.3"; then
+				ewarn
+				ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+				ewarn 'You will need to manually ALTER your tables for them to'
+				ewarn 'continue working.  See the UPGRADE documentation for'
+				ewarn 'details.'
+				ewarn
+
+				# show this only once
+				break
+			fi
+		done
+	fi
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+	ewarn 'configuration file.'
+
+	if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
+		ewarn "The spamd user's home folder has been moved to a new location."
+		elog
+		elog "The acct-user/spamd package should have relocated it for you,"
+		elog "but may have failed because your spamd daemon was running."
+		elog
+		elog "To fix this:"
+		elog " - Stop your spamd daemon"
+		elog " - emerge -1 acct-user/spamd"
+		elog " - Restart your spamd daemon"
+		elog " - Remove the old home folder if you want"
+		elog "     rm -rf \"${ROOT}/home/spamd\""
+	fi
+	if [[ -e "${ROOT}/home/spamd" ]] ; then
+		ewarn
+		ewarn "The spamd user's home folder has been moved to a new location."
+		elog
+		elog "  Old Home: ${ROOT}/home/spamd"
+		elog "  New Home: ${ROOT}/var/lib/spamd"
+		elog
+		elog "You may wish to migrate your data to the new location:"
+		elog " - Stop your spamd daemon"
+		elog " - Re-emerge acct-user/spamd to ensure the home folder has been"
+		elog "   updated to the new location, now that the daemon isn't running:"
+		elog "     # emerge -1 acct-user/spamd"
+		elog "     # echo ~spamd"
+		elog " - Migrate the contents from the old location to the new home"
+		elog "   For example:"
+		elog "     # cp -Rpi \"${ROOT}/home/spamd/\" \"${ROOT}/var/lib/\""
+		elog " - Remove the old home folder"
+		elog "     # rm -rf \"${ROOT}/home/spamd\""
+		elog " - Restart your spamd daemon"
+		elog
+		elog "If you do not wish to migrate data, you should remove the old"
+		elog "home folder from your system as it is not used."
+	fi
+}


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

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

commit:     4710ac53447ef3f753f9948849d0848bab51f7e2
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Sun Jun 25 19:11:33 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 25 19:21:51 2023 +0000
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 <gentoo_bugs_peep <AT> parallaxshift.com>
Signed-off-by: Sam James <sam <AT> 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 000000000000..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&r2=1910600&pathrev=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 000000000000..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"
+	"${FILESDIR}/4.0.0-DnsResolver-udpsize.patch"
+	"${FILESDIR}/4.0.0-sa-update-rdatastr.patch"
+)
+
+# There are a few renames and use-dependent ones in src_install as well.
+DOCS=(
+	NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes
+	sql/README.awl procmailrc.example sample-nonspam.txt
+	sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail
+	spamd-apache2/README.apache
+)
+
+src_prepare() {
+	default
+
+	# The sa_compile test does some weird stuff like hopping around in
+	# the directory tree and calling "make" to create a dist tarball
+	# from ${S}. It fails, and is more trouble than it's worth...
+	perl_rm_files t/sa_compile.t
+
+	# The spamc tests (which need the networked spamd daemon) fail for
+	# irrelevant reasons. It's too hard to disable them (unlike the
+	# spamd tests themselves -- see src_test), so use a crude
+	# workaround.
+	perl_rm_files t/spamc_*.t
+
+	# Some tests need extra dependencies
+	# e.g. t/sql_based_whitelist.t needs DBD
+	# This is kinder than REQUIRED_USE for tests which hurts automation
+	if ! use mysql && ! use postgres && ! use sqlite ; then
+		perl_rm_files t/sql_based_whitelist.t
+	fi
+
+	# Disable plugin by default
+	sed -i -e 's/^loadplugin/\#loadplugin/g' \
+		"rules/init.pre" \
+		|| die "failed to disable plugins by default"
+}
+
+src_configure() {
+	# This is how and where the perl-module eclass disables the
+	# MakeMaker interactive prompt.
+	export PERL_MM_USE_DEFAULT=1
+
+	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
+	# (just to be sure, nobody knows how it could happen in the first place).
+	#
+	# We also set the path to the perl executable explictly. This will be
+	# used to create the initial shebang line in the scripts (bug 62276).
+	perl Makefile.PL \
+		PREFIX="${EPREFIX}/usr" \
+		INSTALLDIRS=vendor \
+		SYSCONFDIR="${EPREFIX}/etc" \
+		DATADIR="${EPREFIX}/usr/share/spamassassin" \
+		PERL_BIN="${EPREFIX}/usr/bin/perl" \
+		ENABLE_SSL="$(usex ssl)" \
+		DESTDIR="${D}" \
+		|| die 'failed to create a Makefile using Makefile.PL'
+
+	# Now configure spamc.
+
+	# Run autoreconf to avoid some issues caused by a standard test in the
+	# current autoconf.  Expected to be fixed in next autoconf release, so
+	# these next 3 lines might not be needed for long.  See bug #899782.
+	pushd spamc >/dev/null
+	eautoreconf
+	popd >/dev/null
+	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
+}
+
+src_compile() {
+	emake
+	use qmail && emake spamc/qmail-spamc
+}
+
+src_install () {
+	default
+
+	# Create the stub dir used by sa-update and friends
+	keepdir /var/lib/spamassassin
+
+	# Move spamd to sbin where it belongs.
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
+
+	if use qmail; then
+		dobin spamc/qmail-spamc
+	fi
+
+	dosym mail/spamassassin /etc/spamassassin
+
+	# Add the init and config scripts.
+	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
+	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
+
+	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
+		"${PN}.service"
+
+	use postgres && dodoc sql/*_pg.sql
+	use mysql && dodoc sql/*_mysql.sql
+	use qmail && dodoc spamc/README.qmail
+
+	# Rename some files so that they don't clash with others.
+	newdoc spamd/README README.spamd
+	newdoc sql/README README.sql
+	newdoc ldap/README README.ldap
+
+	insinto /etc/mail/spamassassin/
+	newins "${FILESDIR}"/geoip-4.0.0.cf geoip.cf
+	insopts -m0400
+	newins "${FILESDIR}"/secrets.cf secrets.cf.example
+
+	# Create the directory where sa-update stores its GPG key (if you
+	# choose to import one). If this directory does not exist, the
+	# import will fail. This is bug 396307. We expect that the import
+	# will be performed as root, and making the directory accessible
+	# only to root prevents a warning on the command-line.
+	diropts -m0700
+	dodir /etc/mail/spamassassin/sa-update-keys
+
+	if use cron; then
+		# Install the cron job if they want it.
+		exeinto /etc/cron.daily
+		newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
+			   update-spamassassin-rules
+	fi
+
+	# Remove perllocal.pod to avoid file collisions (bug #603338).
+	perl_delete_localpod
+
+	# The perl-module eclass calls three other functions to clean
+	# up in src_install. The first fixes references to ${D} in the
+	# packlist, and is useful to us, too. The other two functions,
+	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
+	# to be needed: there are no empty directories, *.bs files, or
+	# ${D} paths remaining in our installed image.
+	perl_fix_packlist
+}
+
+src_test() {
+	# Trick the test suite into skipping the spamd tests. Setting
+	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
+	# set in SATest.pm.
+	export SPAMD_HOST=disabled
+	default
+}
+
+pkg_preinst() {
+	if use mysql || use postgres ; then
+		local _awlwarn=0
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.3"; then
+				_awlwarn=1
+				break
+			fi
+		done
+		if [[ ${_awlwarn} == 1 ]] ; then
+			ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+			ewarn 'You will need to manually ALTER your tables for them to'
+			ewarn 'continue working.  See the UPGRADE documentation for'
+			ewarn 'details.'
+			ewarn
+		fi
+	fi
+}
+
+pkg_postinst() {
+	elog
+	elog 'No rules are installed by default. You will need to run sa-update'
+	elog 'at least once, and most likely configure SpamAssassin before it'
+	elog 'will work.'
+
+	if ! use cron; then
+		elog
+		elog 'You should consider a cron job for sa-update. One is provided'
+		elog 'for daily updates if you enable the "cron" USE flag.'
+	fi
+	elog
+	elog 'Configuration and update help can be found on the wiki:'
+	elog
+	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
+	elog
+
+	if use mysql || use postgres ; then
+		local _v
+		for _v in ${REPLACING_VERSIONS}; do
+			if ver_test "${_v}" -lt "3.4.3"; then
+				ewarn
+				ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
+				ewarn 'You will need to manually ALTER your tables for them to'
+				ewarn 'continue working.  See the UPGRADE documentation for'
+				ewarn 'details.'
+				ewarn
+
+				# show this only once
+				break
+			fi
+		done
+	fi
+
+	ewarn 'If this version of SpamAssassin causes permissions issues'
+	ewarn 'with your user configurations or bayes databases, then you'
+	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+	ewarn 'configuration file, or remove the --username and --groupname'
+	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
+	ewarn 'configuration file.'
+
+	if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
+		ewarn "The spamd user's home folder has been moved to a new location."
+		elog
+		elog "The acct-user/spamd package should have relocated it for you,"
+		elog "but may have failed because your spamd daemon was running."
+		elog
+		elog "To fix this:"
+		elog " - Stop your spamd daemon"
+		elog " - emerge -1 acct-user/spamd"
+		elog " - Restart your spamd daemon"
+		elog " - Remove the old home folder if you want"
+		elog "     rm -rf \"${ROOT}/home/spamd\""
+	fi
+	if [[ -e "${ROOT}/home/spamd" ]] ; then
+		ewarn
+		ewarn "The spamd user's home folder has been moved to a new location."
+		elog
+		elog "  Old Home: ${ROOT}/home/spamd"
+		elog "  New Home: ${ROOT}/var/lib/spamd"
+		elog
+		elog "You may wish to migrate your data to the new location:"
+		elog " - Stop your spamd daemon"
+		elog " - Re-emerge acct-user/spamd to ensure the home folder has been"
+		elog "   updated to the new location, now that the daemon isn't running:"
+		elog "     # emerge -1 acct-user/spamd"
+		elog "     # echo ~spamd"
+		elog " - Migrate the contents from the old location to the new home"
+		elog "   For example:"
+		elog "     # cp -Rpi \"${ROOT}/home/spamd/\" \"${ROOT}/var/lib/\""
+		elog " - Remove the old home folder"
+		elog "     # rm -rf \"${ROOT}/home/spamd\""
+		elog " - Restart your spamd daemon"
+		elog
+		elog "If you do not wish to migrate data, you should remove the old"
+		elog "home folder from your system as it is not used."
+	fi
+}


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

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

commit:     ef3433e77824185dca2aff5a495d8611d28a3179
Author:     Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
AuthorDate: Sun Jun  2 23:18:49 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun  3 01:31:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef3433e7

mail-filter/spamassassin: Fix sa_txrep test when no dbm

Upstream's fix is way more involved.  I'll leave that for 4.0.2, I
guess.
https://github.com/apache/spamassassin/commit/1c6fe5993ce48099aa73eb1d87419f50f922a0a6

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

 .../files/4.0.1-tests-sa_txrep.t-no-dbm.patch            | 16 ++++++++++++++++
 mail-filter/spamassassin/spamassassin-4.0.1.ebuild       |  1 +
 2 files changed, 17 insertions(+)

diff --git a/mail-filter/spamassassin/files/4.0.1-tests-sa_txrep.t-no-dbm.patch b/mail-filter/spamassassin/files/4.0.1-tests-sa_txrep.t-no-dbm.patch
new file mode 100644
index 000000000000..6d6b4dd9a024
--- /dev/null
+++ b/mail-filter/spamassassin/files/4.0.1-tests-sa_txrep.t-no-dbm.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/933406
+--- a/t/sa_txrep.t
++++ b/t/sa_txrep.t
+@@ -4,7 +4,11 @@ use lib '.'; use lib 't';
+ use SATest; sa_t_init("sa_txrep");
+ 
+ 
+-use Test::More tests => 8;
++use Test::More;
++
++my @dbmods = grep eval "require $_", ('DB_File', 'GDBM_File', 'SDBM_File');
++plan skip_all => "No db module is available" unless @dbmods;
++plan tests => 8;
+ 
+ # ---------------------------------------------------------------------------
+ 

diff --git a/mail-filter/spamassassin/spamassassin-4.0.1.ebuild b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
index d778722d02cc..4e04f9b1ff8d 100644
--- a/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
+++ b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild
@@ -91,6 +91,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_001_load-URIDNSBL.patch"
+	"${FILESDIR}/4.0.1-tests-sa_txrep.t-no-dbm.patch"
 )
 
 # There are a few renames and use-dependent ones in src_install as well.


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

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/, mail-filter/spamassassin/files/
@ 2024-10-30 22:47 Andreas K. Hüttel
  0 siblings, 0 replies; 17+ messages in thread
From: Andreas K. Hüttel @ 2024-10-30 22:47 UTC (permalink / raw
  To: gentoo-commits

commit:     54998ecf335d9a3ad25c12bb72ebada77e87db4d
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 30 22:45:35 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Oct 30 22:47:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54998ecf

mail-filter/spamassassin: drop 3.4.6-r2, 3.4.6-r3

Bug: https://bugs.gentoo.org/899782
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 mail-filter/spamassassin/Manifest                  |   1 -
 .../files/3.4.6-configure-clang16.patch            |  44 ---
 .../spamassassin/spamassassin-3.4.6-r2.ebuild      | 322 ---------------------
 .../spamassassin/spamassassin-3.4.6-r3.ebuild      | 321 --------------------
 4 files changed, 688 deletions(-)

diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest
index a6aa3ca897d1..33458529c672 100644
--- a/mail-filter/spamassassin/Manifest
+++ b/mail-filter/spamassassin/Manifest
@@ -1,4 +1,3 @@
-DIST Mail-SpamAssassin-3.4.6.tar.bz2 6166807 BLAKE2B aa25c9e81f570d35e8594ba6d6da70c7b846737513bd4d6d2d410872c58ab7cbe7ade6a109a71bdbb6dbaf7aee8eb48520e7de929b27e83546401f3692aeb0c3 SHA512 bb53ba928917b02071b2e6690a11240e1af503334f292c870a8c49c24b0a58b44c78f827e2f43e71a3ce920481fa0e1e62b78a39452658c57d18f4e11daeb593
 DIST Mail-SpamAssassin-4.0.0.tar.bz2 6371055 BLAKE2B 86f2167f6250a10a6bf871cc291f63ee9ee2d853b4183a637b4267e6979209196155be1b26e5e5b1093cf63841f9819a249de65e7002414a7e790ee1b67e5206 SHA512 a0fe5f6953c9df355bfa011e8a617101687eb156831a057504656921fe76c2a4eb37b5383861aac579e66a20c4454068e81a39826a35eb0266148771567bad5f
 DIST Mail-SpamAssassin-4.0.0.tar.bz2.asc 833 BLAKE2B 44170d411d9eb656d67bf4080807ad3c3fd9eff9f2eadadadbfde828e542bc57b5cdcfb062c7f210be4d721bdf9cf85aec9b1fb491076165453b000b47990f0d SHA512 b87a80d2b0b802f52df75e485878c53cc4fad52935ca2b14b1b06e46d334b52c673e66d61cc2155b5e812fa6a486f8e61f6a87794be2524acea1fd8ac42e7d6a
 DIST Mail-SpamAssassin-4.0.1.tar.bz2 6379932 BLAKE2B 303c54d8731cf0ccb622e3e78efbc6be983fc87c7a71107ea700daa54e7ffb85dbb59696188d8ac666067499b1bc7477e31edb36f6e99c9749288a8f921a36b1 SHA512 66183e356b07d1049cf5598fc1e563e4aab580dfca04bf8ec37781dfb57ef568d33c6f6455076f54f940947f5a5dfefa7a08d233833deea5fe5ea18b669cd790

diff --git a/mail-filter/spamassassin/files/3.4.6-configure-clang16.patch b/mail-filter/spamassassin/files/3.4.6-configure-clang16.patch
deleted file mode 100644
index cd69a546c71d..000000000000
--- a/mail-filter/spamassassin/files/3.4.6-configure-clang16.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-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 <sys/types.h>
--#include <sys/socket.h>],
-+#include <sys/socket.h>
-+#include <stdio.h>
-+],
-                         [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 <netdb.h>],
-+                AC_TRY_COMPILE([#include <netdb.h>
-+#include <stdio.h>],
-                         [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 <sys/types.h>
- #include <sys/socket.h>
-+#include <stdio.h>
- int
- main ()
- {
-@@ -4253,6 +4254,7 @@ cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <netdb.h>
-+#include <stdio.h>
- int
- main ()
- {

diff --git a/mail-filter/spamassassin/spamassassin-3.4.6-r2.ebuild b/mail-filter/spamassassin/spamassassin-3.4.6-r2.ebuild
deleted file mode 100644
index 3f6f235aa24b..000000000000
--- a/mail-filter/spamassassin/spamassassin-3.4.6-r2.ebuild
+++ /dev/null
@@ -1,322 +0,0 @@
-# Copyright 1999-2022 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="amd64 arm arm64 ~hppa 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-Archive-Tar
-	virtual/perl-Digest-SHA
-	virtual/perl-IO-Zlib
-	virtual/perl-Time-HiRes
-	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/BSD-Resource
-	dev-perl/Digest-SHA1
-	dev-perl/Encode-Detect
-	|| ( dev-perl/GeoIP2 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
-	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}"
-
-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.
-DOCS=(
-	NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes
-	sql/README.awl procmailrc.example sample-nonspam.txt
-	sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail
-	spamd-apache2/README.apache
-)
-
-src_prepare() {
-	default
-
-	# The sa_compile test does some weird stuff like hopping around in
-	# the directory tree and calling "make" to create a dist tarball
-	# from ${S}. It fails, and is more trouble than it's worth...
-	perl_rm_files t/sa_compile.t
-
-	# The spamc tests (which need the networked spamd daemon) fail for
-	# irrelevant reasons. It's too hard to disable them (unlike the
-	# spamd tests themselves -- see src_test), so use a crude
-	# workaround.
-	perl_rm_files t/spamc_*.t
-
-	# Some tests need extra dependencies
-	# e.g. t/sql_based_whitelist.t needs DBD
-	# This is kinder than REQUIRED_USE for tests which hurts automation
-	if ! use mysql && ! use postgres && ! use sqlite ; then
-		perl_rm_files t/sql_based_whitelist.t
-	fi
-
-	# Disable plugin by default
-	sed -i -e 's/^loadplugin/\#loadplugin/g' \
-		"rules/init.pre" \
-		|| die "failed to disable plugins by default"
-}
-
-src_configure() {
-	# This is how and where the perl-module eclass disables the
-	# MakeMaker interactive prompt.
-	export PERL_MM_USE_DEFAULT=1
-
-	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
-	# (just to be sure, nobody knows how it could happen in the first place).
-	#
-	# We also set the path to the perl executable explictly. This will be
-	# used to create the initial shebang line in the scripts (bug 62276).
-	perl Makefile.PL \
-		PREFIX="${EPREFIX}/usr" \
-		INSTALLDIRS=vendor \
-		SYSCONFDIR="${EPREFIX}/etc" \
-		DATADIR="${EPREFIX}/usr/share/spamassassin" \
-		PERL_BIN="${EPREFIX}/usr/bin/perl" \
-		ENABLE_SSL="$(usex ssl)" \
-		DESTDIR="${D}" \
-		|| die 'failed to create a Makefile using Makefile.PL'
-
-	# Now configure spamc.
-	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
-}
-
-src_compile() {
-	emake
-	use qmail && emake spamc/qmail-spamc
-}
-
-src_install () {
-	default
-
-	# Create the stub dir used by sa-update and friends
-	keepdir /var/lib/spamassassin
-
-	# Move spamd to sbin where it belongs.
-	dodir /usr/sbin
-	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
-
-	if use qmail; then
-		dobin spamc/qmail-spamc
-	fi
-
-	dosym mail/spamassassin /etc/spamassassin
-
-	# Add the init and config scripts.
-	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
-	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
-
-	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
-	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
-		"${PN}.service"
-
-	use postgres && dodoc sql/*_pg.sql
-	use mysql && dodoc sql/*_mysql.sql
-	use qmail && dodoc spamc/README.qmail
-
-	# Rename some files so that they don't clash with others.
-	newdoc spamd/README README.spamd
-	newdoc sql/README README.sql
-	newdoc ldap/README README.ldap
-
-	insinto /etc/mail/spamassassin/
-	doins "${FILESDIR}"/geoip.cf
-	insopts -m0400
-	newins "${FILESDIR}"/secrets.cf secrets.cf.example
-
-	# Create the directory where sa-update stores its GPG key (if you
-	# choose to import one). If this directory does not exist, the
-	# import will fail. This is bug 396307. We expect that the import
-	# will be performed as root, and making the directory accessible
-	# only to root prevents a warning on the command-line.
-	diropts -m0700
-	dodir /etc/mail/spamassassin/sa-update-keys
-
-	if use cron; then
-		# Install the cron job if they want it.
-		exeinto /etc/cron.daily
-		newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
-			   update-spamassassin-rules
-	fi
-
-	# Remove perllocal.pod to avoid file collisions (bug #603338).
-	perl_delete_localpod
-
-	# The perl-module eclass calls three other functions to clean
-	# up in src_install. The first fixes references to ${D} in the
-	# packlist, and is useful to us, too. The other two functions,
-	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
-	# to be needed: there are no empty directories, *.bs files, or
-	# ${D} paths remaining in our installed image.
-	perl_fix_packlist
-}
-
-src_test() {
-	# Trick the test suite into skipping the spamd tests. Setting
-	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
-	# set in SATest.pm.
-	export SPAMD_HOST=disabled
-	default
-}
-
-pkg_preinst() {
-	if use mysql || use postgres ; then
-		local _awlwarn=0
-		local _v
-		for _v in ${REPLACING_VERSIONS}; do
-			if ver_test "${_v}" -lt "3.4.3"; then
-				_awlwarn=1
-				break
-			fi
-		done
-		if [[ ${_awlwarn} == 1 ]] ; then
-			ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
-			ewarn 'You will need to manually ALTER your tables for them to'
-			ewarn 'continue working.  See the UPGRADE documentation for'
-			ewarn 'details.'
-			ewarn
-		fi
-	fi
-}
-
-pkg_postinst() {
-	elog
-	elog 'No rules are installed by default. You will need to run sa-update'
-	elog 'at least once, and most likely configure SpamAssassin before it'
-	elog 'will work.'
-
-	if ! use cron; then
-		elog
-		elog 'You should consider a cron job for sa-update. One is provided'
-		elog 'for daily updates if you enable the "cron" USE flag.'
-	fi
-	elog
-	elog 'Configuration and update help can be found on the wiki:'
-	elog
-	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
-	elog
-
-	if use mysql || use postgres ; then
-		local _v
-		for _v in ${REPLACING_VERSIONS}; do
-			if ver_test "${_v}" -lt "3.4.3"; then
-				ewarn
-				ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
-				ewarn 'You will need to manually ALTER your tables for them to'
-				ewarn 'continue working.  See the UPGRADE documentation for'
-				ewarn 'details.'
-				ewarn
-
-				# show this only once
-				break
-			fi
-		done
-	fi
-
-	ewarn 'If this version of SpamAssassin causes permissions issues'
-	ewarn 'with your user configurations or bayes databases, then you'
-	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
-	ewarn 'configuration file, or remove the --username and --groupname'
-	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
-	ewarn 'configuration file.'
-
-	if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
-		ewarn "The spamd user's home folder has been moved to a new location."
-		elog
-		elog "The acct-user/spamd package should have relocated it for you,"
-		elog "but may have failed because your spamd daemon was running."
-		elog
-		elog "To fix this:"
-		elog " - Stop your spamd daemon"
-		elog " - emerge -1 acct-user/spamd"
-		elog " - Restart your spamd daemon"
-		elog " - Remove the old home folder if you want"
-		elog "     rm -rf \"${ROOT}/home/spamd\""
-	fi
-	if [[ -e "${ROOT}/home/spamd" ]] ; then
-		ewarn
-		ewarn "The spamd user's home folder has been moved to a new location."
-		elog
-		elog "  Old Home: ${ROOT}/home/spamd"
-		elog "  New Home: ${ROOT}/var/lib/spamd"
-		elog
-		elog "You may wish to migrate your data to the new location:"
-		elog " - Stop your spamd daemon"
-		elog " - Re-emerge acct-user/spamd to ensure the home folder has been"
-		elog "   updated to the new location, now that the daemon isn't running:"
-		elog "     # emerge -1 acct-user/spamd"
-		elog "     # echo ~spamd"
-		elog " - Migrate the contents from the old location to the new home"
-		elog "   For example:"
-		elog "     # cp -Rpi \"${ROOT}/home/spamd/\" \"${ROOT}/var/lib/\""
-		elog " - Remove the old home folder"
-		elog "     # rm -rf \"${ROOT}/home/spamd\""
-		elog " - Restart your spamd daemon"
-		elog
-		elog "If you do not wish to migrate data, you should remove the old"
-		elog "home folder from your system as it is not used."
-	fi
-}

diff --git a/mail-filter/spamassassin/spamassassin-3.4.6-r3.ebuild b/mail-filter/spamassassin/spamassassin-3.4.6-r3.ebuild
deleted file mode 100644
index 63b6d5156107..000000000000
--- a/mail-filter/spamassassin/spamassassin-3.4.6-r3.ebuild
+++ /dev/null
@@ -1,321 +0,0 @@
-# Copyright 1999-2024 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//_/-}"
-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"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="Apache-2.0 GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~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-Archive-Tar
-	virtual/perl-Digest-SHA
-	virtual/perl-IO-Zlib
-	virtual/perl-Time-HiRes
-	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/BSD-Resource
-	dev-perl/Digest-SHA1
-	dev-perl/Encode-Detect
-	|| ( dev-perl/GeoIP2 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
-	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}"
-
-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.
-DOCS=(
-	NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes
-	sql/README.awl procmailrc.example sample-nonspam.txt
-	sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail
-	spamd-apache2/README.apache
-)
-
-src_prepare() {
-	default
-
-	# The sa_compile test does some weird stuff like hopping around in
-	# the directory tree and calling "make" to create a dist tarball
-	# from ${S}. It fails, and is more trouble than it's worth...
-	perl_rm_files t/sa_compile.t
-
-	# The spamc tests (which need the networked spamd daemon) fail for
-	# irrelevant reasons. It's too hard to disable them (unlike the
-	# spamd tests themselves -- see src_test), so use a crude
-	# workaround.
-	perl_rm_files t/spamc_*.t
-
-	# Some tests need extra dependencies
-	# e.g. t/sql_based_whitelist.t needs DBD
-	# This is kinder than REQUIRED_USE for tests which hurts automation
-	if ! use mysql && ! use postgres && ! use sqlite ; then
-		perl_rm_files t/sql_based_whitelist.t
-	fi
-
-	# Disable plugin by default
-	sed -i -e 's/^loadplugin/\#loadplugin/g' \
-		"rules/init.pre" \
-		|| die "failed to disable plugins by default"
-}
-
-src_configure() {
-	# This is how and where the perl-module eclass disables the
-	# MakeMaker interactive prompt.
-	export PERL_MM_USE_DEFAULT=1
-
-	# Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
-	# (just to be sure, nobody knows how it could happen in the first place).
-	#
-	# We also set the path to the perl executable explictly. This will be
-	# used to create the initial shebang line in the scripts (bug 62276).
-	perl Makefile.PL \
-		PREFIX="${EPREFIX}/usr" \
-		INSTALLDIRS=vendor \
-		SYSCONFDIR="${EPREFIX}/etc" \
-		DATADIR="${EPREFIX}/usr/share/spamassassin" \
-		PERL_BIN="${EPREFIX}/usr/bin/perl" \
-		ENABLE_SSL="$(usex ssl)" \
-		|| die 'failed to create a Makefile using Makefile.PL'
-
-	# Now configure spamc.
-	emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
-}
-
-src_compile() {
-	emake
-	use qmail && emake spamc/qmail-spamc
-}
-
-src_install () {
-	default
-
-	# Create the stub dir used by sa-update and friends
-	keepdir /var/lib/spamassassin
-
-	# Move spamd to sbin where it belongs.
-	dodir /usr/sbin
-	mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd  || die "move spamd failed"
-
-	if use qmail; then
-		dobin spamc/qmail-spamc
-	fi
-
-	dosym mail/spamassassin /etc/spamassassin
-
-	# Add the init and config scripts.
-	newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
-	newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
-
-	systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
-	systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
-		"${PN}.service"
-
-	use postgres && dodoc sql/*_pg.sql
-	use mysql && dodoc sql/*_mysql.sql
-	use qmail && dodoc spamc/README.qmail
-
-	# Rename some files so that they don't clash with others.
-	newdoc spamd/README README.spamd
-	newdoc sql/README README.sql
-	newdoc ldap/README README.ldap
-
-	insinto /etc/mail/spamassassin/
-	doins "${FILESDIR}"/geoip.cf
-	insopts -m0400
-	newins "${FILESDIR}"/secrets.cf secrets.cf.example
-
-	# Create the directory where sa-update stores its GPG key (if you
-	# choose to import one). If this directory does not exist, the
-	# import will fail. This is bug 396307. We expect that the import
-	# will be performed as root, and making the directory accessible
-	# only to root prevents a warning on the command-line.
-	diropts -m0700
-	dodir /etc/mail/spamassassin/sa-update-keys
-
-	if use cron; then
-		# Install the cron job if they want it.
-		exeinto /etc/cron.daily
-		newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
-			   update-spamassassin-rules
-	fi
-
-	# Remove perllocal.pod to avoid file collisions (bug #603338).
-	perl_delete_localpod
-
-	# The perl-module eclass calls three other functions to clean
-	# up in src_install. The first fixes references to ${D} in the
-	# packlist, and is useful to us, too. The other two functions,
-	# perl_delete_emptybsdir and perl_remove_temppath, don't seem
-	# to be needed: there are no empty directories, *.bs files, or
-	# ${D} paths remaining in our installed image.
-	perl_fix_packlist
-}
-
-src_test() {
-	# Trick the test suite into skipping the spamd tests. Setting
-	# SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
-	# set in SATest.pm.
-	export SPAMD_HOST=disabled
-	default
-}
-
-pkg_preinst() {
-	if use mysql || use postgres ; then
-		local _awlwarn=0
-		local _v
-		for _v in ${REPLACING_VERSIONS}; do
-			if ver_test "${_v}" -lt "3.4.3"; then
-				_awlwarn=1
-				break
-			fi
-		done
-		if [[ ${_awlwarn} == 1 ]] ; then
-			ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
-			ewarn 'You will need to manually ALTER your tables for them to'
-			ewarn 'continue working.  See the UPGRADE documentation for'
-			ewarn 'details.'
-			ewarn
-		fi
-	fi
-}
-
-pkg_postinst() {
-	elog
-	elog 'No rules are installed by default. You will need to run sa-update'
-	elog 'at least once, and most likely configure SpamAssassin before it'
-	elog 'will work.'
-
-	if ! use cron; then
-		elog
-		elog 'You should consider a cron job for sa-update. One is provided'
-		elog 'for daily updates if you enable the "cron" USE flag.'
-	fi
-	elog
-	elog 'Configuration and update help can be found on the wiki:'
-	elog
-	elog '  https://wiki.gentoo.org/wiki/SpamAssassin'
-	elog
-
-	if use mysql || use postgres ; then
-		local _v
-		for _v in ${REPLACING_VERSIONS}; do
-			if ver_test "${_v}" -lt "3.4.3"; then
-				ewarn
-				ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
-				ewarn 'You will need to manually ALTER your tables for them to'
-				ewarn 'continue working.  See the UPGRADE documentation for'
-				ewarn 'details.'
-				ewarn
-
-				# show this only once
-				break
-			fi
-		done
-	fi
-
-	ewarn 'If this version of SpamAssassin causes permissions issues'
-	ewarn 'with your user configurations or bayes databases, then you'
-	ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
-	ewarn 'configuration file, or remove the --username and --groupname'
-	ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
-	ewarn 'configuration file.'
-
-	if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
-		ewarn "The spamd user's home folder has been moved to a new location."
-		elog
-		elog "The acct-user/spamd package should have relocated it for you,"
-		elog "but may have failed because your spamd daemon was running."
-		elog
-		elog "To fix this:"
-		elog " - Stop your spamd daemon"
-		elog " - emerge -1 acct-user/spamd"
-		elog " - Restart your spamd daemon"
-		elog " - Remove the old home folder if you want"
-		elog "     rm -rf \"${ROOT}/home/spamd\""
-	fi
-	if [[ -e "${ROOT}/home/spamd" ]] ; then
-		ewarn
-		ewarn "The spamd user's home folder has been moved to a new location."
-		elog
-		elog "  Old Home: ${ROOT}/home/spamd"
-		elog "  New Home: ${ROOT}/var/lib/spamd"
-		elog
-		elog "You may wish to migrate your data to the new location:"
-		elog " - Stop your spamd daemon"
-		elog " - Re-emerge acct-user/spamd to ensure the home folder has been"
-		elog "   updated to the new location, now that the daemon isn't running:"
-		elog "     # emerge -1 acct-user/spamd"
-		elog "     # echo ~spamd"
-		elog " - Migrate the contents from the old location to the new home"
-		elog "   For example:"
-		elog "     # cp -Rpi \"${ROOT}/home/spamd/\" \"${ROOT}/var/lib/\""
-		elog " - Remove the old home folder"
-		elog "     # rm -rf \"${ROOT}/home/spamd\""
-		elog " - Restart your spamd daemon"
-		elog
-		elog "If you do not wish to migrate data, you should remove the old"
-		elog "home folder from your system as it is not used."
-	fi
-}


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

end of thread, other threads:[~2024-10-30 22:47 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05 18:48 [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/, mail-filter/spamassassin/files/ Michael Orlitzky
  -- strict thread matches above, loose matches on Subject: below --
2024-10-30 22:47 Andreas K. Hüttel
2024-06-03  1:31 Sam James
2023-06-25 19:22 Sam James
2023-01-05  5:21 Sam James
2022-12-27 11:40 Sam James
2022-11-19 23:37 Sam James
2020-06-20 20:31 Thomas Deutschmann
2019-03-31 18:50 Michael Orlitzky
2018-12-11 10:19 Mikle Kolyada
2018-03-17 22:48 Michał Górny
2017-11-01 18:55 Michael Orlitzky
2017-08-24 18:45 Michael Orlitzky
2017-08-20 14:35 Michael Orlitzky
2017-08-04 20:57 Michael Orlitzky
2016-06-03 16:04 Michael Orlitzky
2016-04-26 22:27 Austin English

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