Bug 7462 - spamassassin fails tests without '.' in @INC (Can't locate SATest.pm in @INC)
Summary: spamassassin fails tests without '.' in @INC (Can't locate SATest.pm in @INC)
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 3.4.1
Hardware: PC Linux
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-22 13:19 UTC by Philippe Chaintreuil
Modified: 2017-08-24 23:52 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Patch to add . to @INC so SATest.pm can be found text/plain None Philippe Chaintreuil [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Chaintreuil 2017-08-22 13:19:51 UTC
Created attachment 5461 [details]
Patch to add . to @INC so SATest.pm can be found

When setting PERL_USE_UNSAFE_INC=0 in their environment to smoke out runtime issues ( for terrible reasons explained in https://wiki.gentoo.org/wiki/Project:Perl/Dot-In-INC-Removal#Counter_Balance )

The following tests will fail

===========================
basic_meta.t
body_mod.t
config_errs.t
debug.t
get_headers.t
idn_dots.t
missing_hb_separator.t
priorities.t
regexp_valid.t
relative_scores.t
reuse.t
uri_html.t
uri.t
uri_text.t
===========================

with errors like:

===========================
Can't locate SATest.pm in @INC (you may need to install the SATest module) (@INC contains: ../blib/lib /var/tmp/portage/mail-filter/spamassassin-3.4.1-r12/work/Mail-SpamAssassin-3.4.1/blib/lib /var/tmp/portage/mail-filter/spamassassin-3.4.1-r12/work/Mail-SpamAssassin-3.4.1/blib/arch /etc/perl /usr/local/lib64/perl5/5.26.0/x86_64-linux /usr/local/lib64/perl5/5.26.0 /usr/lib64/perl5/vendor_perl/5.26.0/x86_64-linux /usr/lib64/perl5/vendor_perl/5.26.0 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.26.0-RC1 /usr/lib64/perl5/vendor_perl/5.25.12 /usr/lib64/perl5/vendor_perl/5.25.11 /usr/lib64/perl5/vendor_perl/5.22.3 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.26.0/x86_64-linux /usr/lib64/perl5/5.26.0) at t/uri_text.t line 21.
BEGIN failed--compilation aborted at t/uri_text.t line 21.
===========================

Fix is to ape what the other tests do any "use lib '.'" before "use SATest" is called.

Originally noticed in Gentoo Linux: https://bugs.gentoo.org/show_bug.cgi?id=627678
Comment 1 Karsten Bräckelmann 2017-08-24 23:52:49 UTC
Thanks, Philippe. Committed to trunk and stable 3.4 branch.

Sending        t/basic_meta.t
Sending        t/body_mod.t
Sending        t/config_errs.t
Sending        t/debug.t
Sending        t/get_headers.t
Sending        t/idn_dots.t
Sending        t/missing_hb_separator.t
Sending        t/priorities.t
Sending        t/regexp_valid.t
Sending        t/relative_scores.t
Sending        t/reuse.t
Sending        t/uri.t
Sending        t/uri_html.t
Sending        t/uri_text.t
Committed revision 1806113.

Committed revision 1806114.

Closing RESOLVED FIXED.