packages/lang/perl/patches/910-miniperl-needs-inc-dot.patch
Philip Prindeville 4a94479f96 perl: update to 5.26.1
Required changes:

* Add qualifying '.' to scripts or to @INC, as appropriate since we're
  enabling default_inc_excludes_dot;

* Add new platform/library definitions like double-double format and
  locale library functions/headers;

* Delete patch 020 as it's been upstreamed;

Optional changes:

* Instead of using -@rm and having that fail, emit an error message,
  and be ignored, just use @rm -f instead which will always succeed.

Security
[CVE-2017-12837] Heap buffer overflow in regular expression compiler

Compiling certain regular expression patterns with the case-insensitive
modifier could cause a heap buffer overflow and crash perl. This has
now been fixed. [perl #131582]

[CVE-2017-12883] Buffer over-read in regular expression parser

For certain types of syntax error in a regular expression pattern, the
error message could either contain the contents of a random, possibly
large, chunk of memory, or could crash perl. This has now been fixed.
[perl #131598]

[CVE-2017-12814] $ENV{$key} stack buffer overflow on Windows

A possible stack buffer overflow in the %ENV code on Windows has been
fixed by removing the buffer completely since it was superfluous anyway.
[perl #131665]

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-10-24 11:40:34 -06:00

80 lines
3.5 KiB
Diff

--- a/Makefile.SH 2017-10-15 18:57:08.436234652 -0600
+++ b/Makefile.SH 2017-10-15 19:02:47.587658819 -0600
@@ -327,7 +327,7 @@ PATH_SEP = $p_
# Macros to invoke a copy of miniperl during the build. Targets which
# are built using these macros should depend on \$(MINIPERL_EXE)
MINIPERL_EXE = miniperl\$(EXE_EXT)
-MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib
+MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib -I.
# Macros to invoke sort the MANIFEST during build
MANIFEST_SRT = MANIFEST.srt
@@ -990,7 +990,7 @@ NAMESPACEFLAGS = -force_flat_namespace
@$(RMS) miniperl.xok
$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
+ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
;;
@@ -1001,16 +1001,16 @@ lib/buildcustomize.pl: $& $(miniperl_obj
@\$(RMS) miniperl.xok
@\$(RMS) \$(MINIPERL_EXE)
\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
- \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
+ \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
!GROK!THIS!
else
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl
@$(RMS) miniperl.xok
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
+ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -I. -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
fi
--- a/cpan/Devel-PPPort/PPPort_pm.PL 2017-07-18 16:59:59.000000000 -0600
+++ b/cpan/Devel-PPPort/PPPort_pm.PL 2017-10-15 19:19:27.341543182 -0600
@@ -15,6 +15,7 @@
use strict;
$^W = 1;
+push(@INC, '.');
require "parts/ppptools.pl";
my $INCLUDE = 'parts/inc';
--- a/cpan/Devel-PPPort/ppport_h.PL 2017-07-18 16:59:59.000000000 -0600
+++ b/cpan/Devel-PPPort/ppport_h.PL 2017-10-15 19:27:16.594178623 -0600
@@ -14,6 +14,7 @@
################################################################################
package Devel::PPPort;
+push(@INC, '.');
require "PPPort.pm";
rename 'ppport.h', 'ppport.old' if -f 'ppport.h';
unlink "ppport.old" if WriteFile("ppport.h") && -f 'ppport.h';
--- a/cpan/Devel-PPPort/PPPort_xs.PL 2017-07-18 16:59:59.000000000 -0600
+++ b/cpan/Devel-PPPort/PPPort_xs.PL 2017-10-15 19:38:09.296679968 -0600
@@ -15,6 +15,7 @@
use strict;
$^W = 1;
+push(@INC, '.');
require "parts/ppptools.pl";
my %SECTION = (
--- a/cpan/Unicode-Collate/Makefile.PL 2017-07-18 16:49:51.000000000 -0600
+++ b/cpan/Unicode-Collate/Makefile.PL 2017-10-15 20:19:31.890439791 -0600
@@ -6,7 +6,7 @@ my $clean = {};
if (-f "Collate.xs") {
print "Making header files for XS...\n";
- do 'mkheader' or die $@ || "mkheader: $!";
+ do './mkheader' or die $@ || "mkheader: $!";
$clean = { FILES => 'ucatbl.h' };
}