You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2022/08/27 08:15:28 UTC
[Bug 8034] New: [REVIEW] t/dnsbl_subtests.t test failure when Net::DNS::Nameserver is not installed
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8034
Bug ID: 8034
Summary: [REVIEW] t/dnsbl_subtests.t test failure when
Net::DNS::Nameserver is not installed
Product: Spamassassin
Version: 4.0.0
Hardware: All
OS: All
Status: NEW
Severity: blocker
Priority: P2
Component: Building & Packaging
Assignee: dev@spamassassin.apache.org
Reporter: sidney@sidney.com
Target Milestone: Undefined
Created attachment 5803
--> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5803&action=edit
patch to fix this issue
In bug 7052 we decided to make Net::DNS::Nameserver an optional dependency as
it is only required for the t/dnsbl_subtests.t tests. The change there was done
in DependencyInfo.pm where it is listed as an optional module.
However, we never made it actually optional in t/dnsbl_subtests.t and now it
breaks on CPAN test machines that run CentOS 7 and which because of the reasons
discussed in the comments thread in bug 7052 don't have Net::DNS::Nameserver
installed.
The attached patch modifies t/dnsbl_subtests.t so that it conditionally
requires Net::DNS::Nameserver and skips the tests if it is not there.
It also changes the designation in Makefile.PL of Net::DNS::Nameserver from
being optional for runtime to being optional for testing. DependencyInfo.pm
only makes that distinction in the comments it displays, but
ExtUtils::MakeMaker does distinguish between runtime and test-only
dependencies.
Note that on other than CentOS 7 machines, Net::DNS::Nameserver is brought in
with Net::DNS, which is a required module, and they can't be separated. This
patch can be tested on non-CentOS 7 systems to verify that it doesn't break
anything, but testing that t/dnsbl_subtests.t doesn't fail when there is no
Net::DNS::Nameserver can only be done in CentOS 7 using the native perl and
modules installed from yum (not the Cpanel installed perl and modules). I did
test that.
Please vote on the patch.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8034] [REVIEW] t/dnsbl_subtests.t test failure when Net::DNS::Nameserver is not installed
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8034
--- Comment #4 from Kevin A. McGrail <km...@apache.org> ---
+1 from me now, thanks for the detailed instructions
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8034] [REVIEW] t/dnsbl_subtests.t test failure when Net::DNS::Nameserver is not installed
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8034
Kevin A. McGrail <km...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kmcgrail@apache.org
--- Comment #2 from Kevin A. McGrail <km...@apache.org> ---
I am +0 as I cannot replicate the issue to confirm the patch but it's a simple
recommendation and documentation change so I'm +0.5. KAM
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8034] [REVIEW] t/dnsbl_subtests.t test failure when Net::DNS::Nameserver is not installed
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8034
--- Comment #3 from Sidney Markowitz <si...@sidney.com> ---
I need one more vote to commit this. Anybody?
Here are the detailed instructions to reproduce and test this on a CentOS 7
machine or VM (or someone might be willing to just peruse the tiny patch and
declare it fine):
Set up for build and testing using the system perl and perl libraries installed
from yum, not the CPanel perl and libraries, and verify that t/dnsbl_subtests.t
works. If you don't already have that set up on a CentOS 7, I did it by using
yum deplist spamassassin to find all the required packages and yum installing
them, then I was able to build from a checkout of trunk easily.
In one line, run as root, to install all required packages of SpamAssassin
3.4.6, which seems to be good enough to have a build environment for trunk:
yum deplist spamassassin | awk '/provider:/ {print $2}' | sort -u |
xargs yum -y install
After building from trunk and verifying t/dnsbl_subtests.t works, yum remove
the rpm for Net::DNS::Nameserver which should simply remove it without also
removing Net::DNS. That's the condition that is unique to CentOS 7, on every
other platform or perl the two modules are always together.
Verify that t/dnsbl_subtests.t fails because of the missing
Net::DNS::Nameserver
Then apply the patch and verify that perl Makefile.PL and make still work and
that t/dnsbl_subtests.t detects that Net::DNS::Nameserver is missing and skips
the tests.
Then yum install the rpm for Net::DNS::Nameserver and verify that
t/dnsbl_subtests.t now runs and passes ok.
Then vote :)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8034] [REVIEW] t/dnsbl_subtests.t test failure when Net::DNS::Nameserver is not installed
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8034
Bill Cole <bi...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |billcole@apache.org
--- Comment #1 from Bill Cole <bi...@apache.org> ---
+1 with caveat that my tests were in a MacPorts environment, not CentOS 7, and
I tested by unceremoniously whacking N:D:N, not nicely removing a package.
So, yes, it works in unanticipated circumstances.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8034] [REVIEW] t/dnsbl_subtests.t test failure when Net::DNS::Nameserver is not installed
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8034
Sidney Markowitz <si...@sidney.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|Undefined |4.0.0
CC| |sidney@sidney.com
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8034] [REVIEW] t/dnsbl_subtests.t test failure when Net::DNS::Nameserver is not installed
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8034
Sidney Markowitz <si...@sidney.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from Sidney Markowitz <si...@sidney.com> ---
trunk % svn ci -m "Bug 8034 Fix test failure when Net::DNS::Nameserver is not
installed" Makefile.PL t/dnsbl_subtests.t
Sending Makefile.PL
Sending t/dnsbl_subtests.t
Transmitting file data ..done
Committing transaction...
Committed revision 1903795.
--
You are receiving this mail because:
You are the assignee for the bug.