diff options
author | Richard Levitte <levitte@openssl.org> | 2021-06-16 10:32:43 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-06-18 09:08:16 +0200 |
commit | 0eed845ce2d76a1f2d8882cb32e1d36c30236d5e (patch) | |
tree | 5a15eaa71eb973fabbd43b57f3576aa2e1bc7ad2 /util | |
parent | 1abcd1e858ea4b1e924bdd8141d55b889cc2fbc2 (diff) | |
download | openssl-0eed845ce2d76a1f2d8882cb32e1d36c30236d5e.tar.gz |
Make util/wrap.pl work better on VMS
Perl's system() on VMS needs to have the command line properly fixed
up, even with arguments passed in list form. We arrange that by
having util/wrap.pl use the same command line fixups as OpenSSL::Test.
As a consequence, util/wrap.pl needs to be generated, to easily pick
up data from configdata.pm. This also removes yet another file
copying hack from the build file templates.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15791)
Diffstat (limited to 'util')
-rw-r--r-- | util/build.info | 3 | ||||
-rw-r--r--[-rwxr-xr-x] | util/wrap.pl.in (renamed from util/wrap.pl) | 19 |
2 files changed, 20 insertions, 2 deletions
diff --git a/util/build.info b/util/build.info index 65e17a9b87..80120fdae1 100644 --- a/util/build.info +++ b/util/build.info @@ -6,3 +6,6 @@ ELSIF[{- $target{build_scheme}->[1] eq "unix" -}] SCRIPTS{noinst}=shlib_wrap.sh SOURCE[shlib_wrap.sh]=shlib_wrap.sh.in ENDIF +SCRIPTS{noinst}=wrap.pl +SOURCE[wrap.pl]=wrap.pl.in +DEPEND[wrap.pl]=../configdata.pm diff --git a/util/wrap.pl b/util/wrap.pl.in index 1ca09bfdf4..2ac068ce96 100755..100644 --- a/util/wrap.pl +++ b/util/wrap.pl.in @@ -1,4 +1,4 @@ -#! /usr/bin/env perl +#! {- $config{HASHBANGPERL} -} use strict; use warnings; @@ -6,6 +6,18 @@ use warnings; use File::Basename; use File::Spec::Functions; +BEGIN { + # This method corresponds exactly to 'use OpenSSL::Util', + # but allows us to use a platform specific file spec. + require {- + use Cwd qw(abs_path); + + "'" . abs_path(catfile($config{sourcedir}, + 'util', 'perl', 'OpenSSL', 'Util.pm')) . "'"; + -}; + OpenSSL::Util->import(); +} + my $there = canonpath(catdir(dirname($0), updir())); my $std_engines = catdir($there, 'engines'); my $std_providers = catdir($there, 'providers'); @@ -22,7 +34,10 @@ $ENV{OPENSSL_CONF} = $std_openssl_conf my $use_system = 0; my @cmd; -if (-x $unix_shlib_wrap) { +if ($^O eq 'VMS') { + # VMS needs the command to be appropriately quotified + @cmd = fixup_cmd(@ARGV); +} elsif (-x $unix_shlib_wrap) { @cmd = ( $unix_shlib_wrap, @ARGV ); } else { # Hope for the best |