From 7f510379f6c6d8bff1aa5beded99f0582c29096a Mon Sep 17 00:00:00 2001 From: Julian Squires Date: Sun, 26 Mar 2017 15:44:59 -0400 Subject: [PATCH] Fix perl @INC for scripts which include make.pl In perl 5.26, and some earlier perls that have been proactively patched (Debian's perl 5.24, for example), '.' was removed from @INC for security reasons. For details, see: http://blogs.perl.org/users/todd_rinaldo/2016/11/how-removing-from-inc-is-about-to-break-cpan.html https://www.masteringperl.org/2017/01/perl-v5-26-removes-from-inc-but-dont-think-youre-safe/ et cetera. This breaks the generation scripts which source make.pl with do 'bin/make.pl' Although this might be indicative that it's time to refactor these scripts, I opted for the simplest possible fix for now: restoring '.' to @INC in each script that depends on make.pl. --- auto/bin/make_def_fun.pl | 1 + auto/bin/make_def_var.pl | 1 + auto/bin/make_enable_index.pl | 1 + auto/bin/make_header.pl | 1 + auto/bin/make_html.pl | 1 + auto/bin/make_index.pl | 1 + auto/bin/make_info.pl | 1 + auto/bin/make_info_list.pl | 1 + auto/bin/make_init.pl | 1 + auto/bin/make_initd.pl | 1 + auto/bin/make_list.pl | 1 + auto/bin/make_list2.pl | 1 + auto/bin/make_str.pl | 1 + auto/bin/make_struct_fun.pl | 1 + auto/bin/make_struct_var.pl | 1 + 15 files changed, 15 insertions(+) diff --git a/auto/bin/make_def_fun.pl b/auto/bin/make_def_fun.pl index 2ed8b4e..49f7e7e 100755 --- a/auto/bin/make_def_fun.pl +++ b/auto/bin/make_def_fun.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; # function pointer declaration diff --git a/auto/bin/make_def_var.pl b/auto/bin/make_def_var.pl index 7c8bc5f..b1868e8 100755 --- a/auto/bin/make_def_var.pl +++ b/auto/bin/make_def_var.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; my @extlist = (); diff --git a/auto/bin/make_enable_index.pl b/auto/bin/make_enable_index.pl index 226612d..b5f7261 100755 --- a/auto/bin/make_enable_index.pl +++ b/auto/bin/make_enable_index.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; ## diff --git a/auto/bin/make_header.pl b/auto/bin/make_header.pl index 5c7f94a..3a73efb 100755 --- a/auto/bin/make_header.pl +++ b/auto/bin/make_header.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; # token diff --git a/auto/bin/make_html.pl b/auto/bin/make_html.pl index 486e7fd..59305bd 100755 --- a/auto/bin/make_html.pl +++ b/auto/bin/make_html.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; #--------------------------------------------------------------------------------------- diff --git a/auto/bin/make_index.pl b/auto/bin/make_index.pl index bfaf300..1d2b5d4 100755 --- a/auto/bin/make_index.pl +++ b/auto/bin/make_index.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; ## diff --git a/auto/bin/make_info.pl b/auto/bin/make_info.pl index 78295fc..78e8f82 100755 --- a/auto/bin/make_info.pl +++ b/auto/bin/make_info.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; #--------------------------------------------------------------------------------------- diff --git a/auto/bin/make_info_list.pl b/auto/bin/make_info_list.pl index 5bc65fa..e27d36a 100755 --- a/auto/bin/make_info_list.pl +++ b/auto/bin/make_info_list.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; #--------------------------------------------------------------------------------------- diff --git a/auto/bin/make_init.pl b/auto/bin/make_init.pl index 343a1ad..7f7d3aa 100755 --- a/auto/bin/make_init.pl +++ b/auto/bin/make_init.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; #------------------------------------------------------------------------------- diff --git a/auto/bin/make_initd.pl b/auto/bin/make_initd.pl index 35c3b5d..0521726 100755 --- a/auto/bin/make_initd.pl +++ b/auto/bin/make_initd.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; ## Output declarations for the _glewInit_[extension] functions defined diff --git a/auto/bin/make_list.pl b/auto/bin/make_list.pl index ef1d81e..a5e8ec7 100755 --- a/auto/bin/make_list.pl +++ b/auto/bin/make_list.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; #--------------------------------------------------------------------------------------- diff --git a/auto/bin/make_list2.pl b/auto/bin/make_list2.pl index 572fdc9..26d3d3d 100755 --- a/auto/bin/make_list2.pl +++ b/auto/bin/make_list2.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; #--------------------------------------------------------------------------------------- diff --git a/auto/bin/make_str.pl b/auto/bin/make_str.pl index 6673a80..8859585 100755 --- a/auto/bin/make_str.pl +++ b/auto/bin/make_str.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; my @extlist = (); diff --git a/auto/bin/make_struct_fun.pl b/auto/bin/make_struct_fun.pl index 3eedafe..661c302 100755 --- a/auto/bin/make_struct_fun.pl +++ b/auto/bin/make_struct_fun.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; # function pointer declaration diff --git a/auto/bin/make_struct_var.pl b/auto/bin/make_struct_var.pl index c88b559..802ae49 100755 --- a/auto/bin/make_struct_var.pl +++ b/auto/bin/make_struct_var.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use lib '.'; do 'bin/make.pl'; my @extlist = ();