[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNU Autoconf 2.69] "do" call in autoheader possibly broken under future
[GNU Autoconf 2.69] "do" call in autoheader possibly broken under future Perl 5.26 ( testsuite: 38 501 failed , test tools.at fails with "error: AC_CONFIG_HEADERS not found in file with funny ' $x & #! name .in" )
Sat, 29 Apr 2017 10:43:41 +1200
Since Perl 5.25.11, Perl has omitted "." from its default library path.
This affects both "require" and "do", which autoheader uses.
Previously, people assumed (incorrectly) that:
Was *literally* equivalent to
eval `cat foo.pm`
Unfortunately, due to a gross lack of clarity in the documentation, this
was only *effectively* the case due to @INC traversal where '.' ( CWD )
made it work.
The end result now is this statement in autoheader:
185 debug "$me: 'do'ing $tmp/traces.pl:\n" . `sed 's/^/| /'
186 do "$tmp/traces.pl";
187 warn "couldn't parse $tmp/traces.pl: $@" if $@;
188 unless ($config_h)
Will habitually do the wrong thing, and emits a failure in tools.at as
--- /dev/null 2017-04-23 16:19:22.434000368 +0000
2017-04-28 21:00:36.523807621 +0000
@@ -0,0 +1,2 @@
+do " tmp dir with funny ' $x & #! name /ahV118Zr/traces.pl" failed, '.' is no
longer in @INC; did you mean do "./ tmp dir with funny ' $x & #! name
+autoheader: error: AC_CONFIG_HEADERS not found in file with funny ' $x & #!
./tools.at:1310: exit code was 1, expected 0
38. tools.at:1278: 38. autotools and whitespace in file names (tools.at:1278):
# -*- compilation -*-
The solution may be simple:
Both "do" and "require" can have @INC traversal subverted by passing
either an explicitly relative path ( that is, with a leading './' ), or
a computed absolute path, as these are special cased in the underling
mechanic. Do exercise extreme caution here, as not to blindly reinsert
'.' into @INC as that has possible security implications.
In the event the consequences of this is limited only to testing,
affected end users can temporarily restore the traditional behaviour of
an implicit ".", by setting PERL_USE_UNSAFE_INC=1 in their environment,
and this value is used in a few significant CPAN toolchain pieces to
mitigate the consequences of this change there.
However, if as I suspect the problem is greater than just this test
failing, and the real failure exhibits real problems at runtime, this
work around will need to be applied everywhere they expect autoheader
to be run, until a real fix is applied.
Attached is the full build output and test logs from Gentoo's (patched)
version of 2.69, which already has some fixes applied for perl 5.26.
Description: Text Data
Description: Text Data
Description: OpenPGP digital signature
|[Prev in Thread]
||[Next in Thread]|
- [GNU Autoconf 2.69] "do" call in autoheader possibly broken under future Perl 5.26 ( testsuite: 38 501 failed , test tools.at fails with "error: AC_CONFIG_HEADERS not found in file with funny ' $x & #! name .in" ),
Kent Fredric <=