postgres.git / summary / log / commit / refs

commit    ba103dc8779f004b01e249261c799773e29a4f38
Author:   Andrew Dunstan <andrew@dunslane.net>
Date:     Sun Oct 28 16:22:32 2018 +0000
First released in: 12.0, 9.3.25, 9.4.20, 9.5.15, 9.6.11, 10.6, 11.1

    Fix perl searchpath for modern perl for MSVC tools
    
    Modern versions of perl no longer include the current directory in the
    perl searchpath, as it's insecure. Instead of adding the current
    directory, we get around the problem by adding the directory where the
    script lives.
    
    Problem noted by Victor Wagner.
    
    Solution adapted from buildfarm client code.
    
    Backpatch to all live versions.


src/tools/msvc/install.pl | 4 ++++ src/tools/msvc/mkvcbuild.pl | 4 ++++ src/tools/msvc/vcregress.pl | 2 ++ 3 files changed, 10 insertions(+) diff --git a/src/tools/msvc/install.pl b/src/tools/msvc/install.pl index bde5b7c793a..d7b7c7ee615 100755 --- a/src/tools/msvc/install.pl +++ b/src/tools/msvc/install.pl @@ -6,6 +6,10 @@ use strict; use warnings; +use File::Basename; +use File::Spec; +BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); } + use Install qw(Install); # buildenv.pl is for specifying the build environment settings diff --git a/src/tools/msvc/mkvcbuild.pl b/src/tools/msvc/mkvcbuild.pl index 6f1c42e5044..748b0eb4156 100644 --- a/src/tools/msvc/mkvcbuild.pl +++ b/src/tools/msvc/mkvcbuild.pl @@ -7,6 +7,10 @@ use strict; use warnings; +use File::Basename; +use File::Spec; +BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); } + use Mkvcbuild; chdir('..\..\..') if (-d '..\msvc' && -d '..\..\..\src'); diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 2188bfed2ca..5811e7c8086 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -10,6 +10,8 @@ use Cwd; use File::Basename; use File::Copy; use File::Find (); +use File::Spec; +BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); } use Install qw(Install); [parent: cc02db82c0f3]