Commit b81cfa07 authored by Richard Levitte's avatar Richard Levitte
Browse files

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: default avatarAndy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4666)
parent bcc096a5
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ ENDIF
{-
   use File::Spec::Functions;
   use File::Basename;
   use if $^O ne "VMS", 'File::Glob' => qw/glob/;
   use OpenSSL::Glob;

   my @nogo_headers = ( "asn1_mac.h",
                        "__decc_include_prologue.h",
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ use warnings;
use File::Spec::Functions;
use File::Copy;
use File::Basename;
use if $^O ne "VMS", 'File::Glob' => qw/glob/;
use OpenSSL::Glob;
use OpenSSL::Test qw/:DEFAULT srctop_file/;

setup("test_rehash");
+1 −2
Original line number Diff line number Diff line
@@ -12,8 +12,7 @@ use warnings;

use File::Basename;
use File::Compare qw/compare_text/;
use if $^O ne "VMS", 'File::Glob' => qw/glob/;

use OpenSSL::Glob;
use OpenSSL::Test qw/:DEFAULT srctop_dir srctop_file/;
use OpenSSL::Test::Utils qw/disabled alldisabled available_protocols/;

+3 −1
Original line number Diff line number Diff line
@@ -16,7 +16,9 @@ BEGIN {

use File::Spec::Functions qw/catdir catfile curdir abs2rel rel2abs/;
use File::Basename;
use if $^O ne "VMS", 'File::Glob' => qw/glob/;
use FindBin;
use lib "$FindBin::Bin/../util";
use OpenSSL::Glob;
use Module::Load::Conditional qw(can_load);

my $TAP_Harness = can_load(modules => { 'TAP::Harness' => undef }) 
Loading