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

Bug 625316

Summary: mail-filter/spamassassin fails install without '.' in @INC (do "version.h.pl" failed, '.' is no longer in @INC)
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    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 612408, 621410    
Attachments: build.log
spamassassin-3.4.1-perl526.patch

Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-07-16 21:09:22 UTC
Created attachment 485156 [details]
build.log

See tracker bug and https://wiki.gentoo.org/wiki/Project:Perl/Dot-In-INC-Removal for details.

Makefile written by ExtUtils::MakeMaker 7.24
make -j3 CC=x86_64-pc-linux-gnu-gcc 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' spamc/Makefile
/usr/bin/perl spamc/configure.pl --prefix="/usr" --sysconfdir="/etc/mail/spamassassin" --datadir="/usr/share/spamassassin" --enable-ssl="yes"
cd spamc
/usr/bin/perl version.h.pl
do "version.h.pl" failed, '.' is no longer in @INC; did you mean do "./version.h.pl"? at spamc/configure.pl line 72.
spamc/configure.pl: Can't exec `version.h.pl': No such file or directory at spamc/configure.pl line 74.
make: *** [Makefile:1619: spamc/Makefile] Error 2
Comment 1 Philippe Chaintreuil 2017-07-16 21:55:08 UTC
Looks like upstream's issue 7389[1] attempts to address this and has a patch, although is simply prepends the configure call in the spamc makefile target with PERL_USE_UNSAFE_INC=1.

[1] https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7389
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-07-16 22:09:50 UTC
> configure call in the spamc makefile target with PERL_USE_UNSAFE_INC=1.

Yeah, that's dumb. That fix is only for end users, not for use in actual code.

Especially as that workaround will be removed around 5.30, and we'll be re-visiting that bug a second time.

Its bad enough that the person who proposes that as a fix is the guy who made '.' in @INC happen in the first place -_-

So much fail.

The bug should be properly fixed at its source.
Comment 3 Philippe Chaintreuil 2017-07-17 12:59:21 UTC
Found another one[1].  This one seems more kosher; prepends "./" on version.h.pl.

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7367
Comment 4 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-07-17 20:20:11 UTC
Yeah, that looks more sensible.

From the diff context alone I'd say that changing the 

< do $0 >

to

< do "./$0"  >

On a later line may also have done the same thing.
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-08-04 15:10:51 UTC
Created attachment 487904 [details, diff]
spamassassin-3.4.1-perl526.patch

Posible fix taken from upstream bug report but with nicer patch formatting.
Comment 6 Michael Orlitzky gentoo-dev 2017-08-04 20:59:32 UTC
Thanks Lars. Upstream keeps promising 3.4.2 release candidates, but we can't wait forever, so I added your patch to spamassassin-3.4.1-r12.