Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 627678

Summary: <mail-filter/spamassassin-3.4.1-r15 fails tests without '.' in @INC (Can't locate SATest.pm in @INC, Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30))
Product: Gentoo Linux Reporter: Kent Fredric (IRC: kent\n) (RETIRED) <kentnl>
Component: Current packagesAssignee: Philippe Chaintreuil <gentoo_bugs_peep>
Status: RESOLVED FIXED    
Severity: normal CC: bug, mjo, proxy-maint
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 612408    
Attachments: spamassassin-3.4.1-r12:20170812-072448.log

Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-08-12 07:44:12 UTC
Created attachment 488670 [details]
spamassassin-3.4.1-r12:20170812-072448.log

After fixing the '.' in @INC related compile failure, 2 types of issues are exposed by tests.

Neither of these are "serious now" but they should be fixed ASAP because they'll be problems in future.

1.  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.


This issue only appears when somebody has explicitly set 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 )

2.  Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.{ <-- HERE ,200}).*$


This is a precarious subclass of the "unescaped { deprecation", because that syntax was officially deprecated for 5.26, but a few sub-variations of that syntax were given extended life for one of two reasons:

  1. The original deprecation failed to warn that this would be an issue
  2. The widespread use of the syntax lead to things like autoconf being broken, and so autoconf-esque syntax was specialcased.

There are more changes in this department scheduled for 5.26.1 though, so I have no idea if this will get better or worse. At this point, its mostly a guessing game.
Comment 1 Philippe Chaintreuil 2017-08-13 21:33:02 UTC
Regarding part 1: Is uri_text.t the only test that fails that way or just the first?  A really dumb grep shows that these files "use SATest", but don't "use lib '.'" like the rest of the tests.

===========================
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
===========================


More of a note-to-self than anything: upstream's bug & fix for part 2: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7404
Comment 2 Michael Orlitzky gentoo-dev 2017-08-13 21:44:48 UTC
(In reply to Philippe Chaintreuil from comment #1)
> 
> More of a note-to-self than anything: upstream's bug & fix for part 2:
> https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7404

This one applies cleanly, thanks for tracking it down. I'll hold off a bit on an -r13 to see if we can't fix it all at once.
Comment 3 Philippe Chaintreuil 2017-08-22 13:10:28 UTC
Created a pull request with fixes for part 1.  Looks like @mjo already fixed part 2.

P.S.  All the files I listed above required the fix, which was obvious in retrospect by just looking at the log from @kent\n.
Comment 4 Philippe Chaintreuil 2017-08-22 13:10:52 UTC
Helps to actually post the URL for the pull request: https://github.com/gentoo/gentoo/pull/5506
Comment 5 Philippe Chaintreuil 2017-08-22 13:20:46 UTC
Submitted patch for part 1 ("Can't locate SATest.pm in @INC") upstream: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7462
Comment 6 Michael Orlitzky gentoo-dev 2017-08-23 12:23:03 UTC
Hi Kent, Philippe's spamassassin-3.4.1-r15 should fix this, would you like to confirm with your perl of the future? I'm still on 5.24.1.
Comment 7 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-08-29 16:23:10 UTC
Just tested -r16, looks good to me.