From d60e190a701f2f95838f6a092b5cb0c82367b2e2 Mon Sep 17 00:00:00 2001 From: Philippe Chaintreuil Date: Sat, 1 Jun 2024 13:33:41 -0400 Subject: [PATCH] mail-filter/spamassassin: Fix dnsbl_subtests.t test w/o net Fix pulled from upstream's 4.0.1 commit: https://github.com/apache/spamassassin/commit/20c6a5a78e31877b3d4fa379d6a011d6112aabb9 Since we now have two patches to dnsbl_subtests.t, I've renamed the pre-existing patch file and adjusted the 4.0.x ebuilds to use the new name. Closes: https://bugs.gentoo.org/931289 Closes: https://github.com/gentoo/gentoo/pull/36955 Signed-off-by: Philippe Chaintreuil Signed-off-by: Sam James --- ...0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch} | 0 .../4.0.0-tests-dnsbl_subtests.t_002_no-net.patch | 12 ++++++++++++ .../spamassassin/spamassassin-4.0.0-r3.ebuild | 5 +++-- .../spamassassin/spamassassin-4.0.0-r4.ebuild | 5 +++-- mail-filter/spamassassin/spamassassin-4.0.1.ebuild | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) rename mail-filter/spamassassin/files/{4.0.0-tests-dnsbl_subtests.t.patch => 4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch} (100%) create mode 100644 mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch diff --git a/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch similarity index 100% rename from mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t.patch rename to mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch diff --git a/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch new file mode 100644 index 0000000000000..47bfea21b617a --- /dev/null +++ b/mail-filter/spamassassin/files/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch @@ -0,0 +1,12 @@ +https://github.com/apache/spamassassin/commit/20c6a5a78e31877b3d4fa379d6a011d6112aabb9 +--- a/t/dnsbl_subtests.t ++++ b/t/dnsbl_subtests.t +@@ -14,6 +14,8 @@ use Test::More; + + use Errno qw(EADDRINUSE EACCES); + ++plan skip_all => "Net tests disabled" unless conf_bool('run_net_tests'); ++ + use constant HAS_NET_DNS_NAMESERVER => eval { require Net::DNS::Nameserver; }; + plan skip_all => "Net::DNS::Nameserver in unavailable on this system" unless (HAS_NET_DNS_NAMESERVER); + plan tests => 46; diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild b/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild index ecbdfeb2c7451..0893383220553 100644 --- a/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild +++ b/mail-filter/spamassassin/spamassassin-4.0.0-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -90,7 +90,8 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc PATCHES=( "${FILESDIR}/mention-geoip.cf-in-init.pre.patch" - "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch" + "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch" + "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch" "${FILESDIR}/4.0.0-tests-strip2.t.patch" "${FILESDIR}/4.0.0-DnsResolver-udpsize.patch" ) diff --git a/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild index c08c4884139a4..a72db00639cb4 100644 --- a/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild +++ b/mail-filter/spamassassin/spamassassin-4.0.0-r4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -90,7 +90,8 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc PATCHES=( "${FILESDIR}/mention-geoip.cf-in-init.pre.patch" - "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch" + "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch" + "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_002_no-net.patch" "${FILESDIR}/4.0.0-tests-strip2.t.patch" "${FILESDIR}/4.0.0-DnsResolver-udpsize.patch" "${FILESDIR}/4.0.0-sa-update-rdatastr.patch" diff --git a/mail-filter/spamassassin/spamassassin-4.0.1.ebuild b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild index 7ab67f06441da..d778722d02cce 100644 --- a/mail-filter/spamassassin/spamassassin-4.0.1.ebuild +++ b/mail-filter/spamassassin/spamassassin-4.0.1.ebuild @@ -90,7 +90,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/spamassassin.apache.org.asc PATCHES=( "${FILESDIR}/mention-geoip.cf-in-init.pre.patch" - "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t.patch" + "${FILESDIR}/4.0.0-tests-dnsbl_subtests.t_001_load-URIDNSBL.patch" ) # There are a few renames and use-dependent ones in src_install as well.