autoconf/lib/Autom4te
Zack Weinberg 730f382a92
mktmpdir: Ensure that $tmp is always an absolute pathname.
Several autotools programs use ‘do’ to evaluate Perl code
generated into a file in the temporary directory created by
Autom4te::General::mktmpdir.  If the environment variable
TMPDIR is a relative path, mktmpdir will set $tmp to a
relative path and we’ll end up trying to ‘do’ a relative
path, which searches for the file in @INC.  This doesn’t
work under perl 5.26 or later, because ‘.’ was removed
from @INC in that version (for security reasons).

Ensure that mktmpdir sets $tmp to an absolute pathname.
Also use File::Temp::tempdir to create the temporary
directory, instead of shelling out to ‘mktemp -d’;
this eliminates a subprocess and means we don’t have
to worry about cleaning up the directory on exit.

Problem found by Kent Fredric and reported as
<https://bugs.gentoo.org/625576>.
Supersedes Gentoo’s autoconf-2.69-perl-5.26-2.patch.

* lib/Autom4te/General.pm
  (mktmpdir): Use File::Temp to create temporary directory.
  Ensure that $tmp is an absolute path.
  (END): No need to clean up $tmp.

* tests/tools.at (autotools and relative TMPDIR): New test.
2020-09-24 16:06:23 -04:00
..
C4che.pm Consistently use ‘our’ instead of ‘use vars’ in Perl. 2020-09-21 14:33:52 -04:00
ChannelDefs.pm New utility function Autom4te::ChannelDefs::merge_WARNINGS. 2020-09-22 15:46:42 -04:00
Channels.pm make fetch yet again 2020-09-21 14:26:17 -04:00
Config.pm Manually sync ChannelDefs.pm from automake. 2020-09-22 15:46:42 -04:00
Configure_ac.pm make fetch yet again 2020-09-21 14:26:17 -04:00
FileUtils.pm make fetch yet again 2020-09-21 14:26:17 -04:00
General.pm mktmpdir: Ensure that $tmp is always an absolute pathname. 2020-09-24 16:06:23 -04:00
Getopt.pm make fetch yet again 2020-09-21 14:26:17 -04:00
Request.pm Fatalize all warnings in Perl code. 2020-08-31 13:15:46 -04:00
XFile.pm make fetch yet again 2020-09-21 14:26:17 -04:00