Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 625316 - mail-filter/spamassassin fails install without '.' in @INC (do "version.h.pl" failed, '.' is no longer in @INC)
Summary: mail-filter/spamassassin fails install without '.' in @INC (do "version.h.pl"...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Philippe Chaintreuil
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: perl-5.26-no-dot-inc perl-5.26-unmask
  Show dependency tree
 
Reported: 2017-07-16 21:09 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2017-08-04 20:59 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (spamassassin-3.4.1-r11:20170716-210815.log,5.81 KB, text/plain)
2017-07-16 21:09 UTC, Kent Fredric (IRC: kent\n) (RETIRED)
Details
spamassassin-3.4.1-perl526.patch (spamassassin-3.4.1-perl526.patch,484 bytes, patch)
2017-08-04 15:10 UTC, Lars Wendler (Polynomial-C)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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) 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.