summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-11-03 21:22:17 +0100
committerRichard Levitte <levitte@openssl.org>2017-11-05 22:57:06 +0100
commitb81cfa07ada850fd287d0a0c82ba280907f18ce7 (patch)
tree796f74646a6e66c23af77d8c909bdb2327768437 /Configure
parentbcc096a50811bf0f0c4fd34b2993fed7a7015972 (diff)
Perl: Use our own globbing wrapper rather than File::Glob::glob
File::Glob::glob is deprecated, it's use generates this kind of message: File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob() instead. at ../master/Configure line 277. The first idea was to use a construction that makes the caller glob() use File::Glob::bsd_glob(). That turned out not to work well everywhere, so instead, we make our own wrapper, OpenSSL::Glob and use that. Fixes #4636 (this is an adaptation of #4040 and part of #4069, for 1.1.0) Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4666)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure11
1 files changed, 7 insertions, 4 deletions
diff --git a/Configure b/Configure
index d6449636f3..5b235fe39e 100755
--- a/Configure
+++ b/Configure
@@ -11,10 +11,12 @@
use 5.10.0;
use strict;
+use FindBin;
+use lib "$FindBin::Bin/util";
use File::Basename;
use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/;
use File::Path qw/mkpath/;
-use if $^O ne "VMS", 'File::Glob' => qw/glob/;
+use OpenSSL::Glob;
# see INSTALL for instructions.
@@ -1353,7 +1355,6 @@ my %unified_info = ();
my $buildinfo_debug = defined($ENV{CONFIGURE_DEBUG_BUILDINFO});
if ($builder eq "unified") {
- use lib catdir(dirname(__FILE__),"util");
use with_fallback qw(Text::Template);
sub cleandir {
@@ -1477,8 +1478,10 @@ if ($builder eq "unified") {
my %generate = ();
push @{$config{build_infos}}, catfile(abs2rel($sourced, $blddir), $f);
- my $template = Text::Template->new(TYPE => 'FILE',
- SOURCE => catfile($sourced, $f));
+ my $template =
+ Text::Template->new(TYPE => 'FILE',
+ SOURCE => catfile($sourced, $f),
+ PREPEND => qq{use lib "$FindBin::Bin/util";});
die "Something went wrong with $sourced/$f: $!\n" unless $template;
my @text =
split /^/m,