Index: SOURCES/perl-5.22.1-CVE-2015-8607.patch
===================================================================
--- SOURCES/perl-5.22.1-CVE-2015-8607.patch	(revision 1008725)
+++ SOURCES/perl-5.22.1-CVE-2015-8607.patch	(nonexistent)
@@ -1,48 +0,0 @@
-@@ -, +, @@ 
----
- dist/PathTools/Cwd.xs    |  1 +
- dist/PathTools/t/taint.t | 19 ++++++++++++++++++-
- 2 files changed, 19 insertions(+), 1 deletion(-)
---- a/dist/PathTools/Cwd.xs	
-+++ a/dist/PathTools/Cwd.xs	
-@@ -535,6 +535,7 @@ THX_unix_canonpath(pTHX_ SV *path)
-     *o = 0;
-     SvPOK_on(retval);
-     SvCUR_set(retval, o - SvPVX(retval));
-+    SvTAINT(retval);
-     return retval;
- }
- 
---- a/dist/PathTools/t/taint.t	
-+++ a/dist/PathTools/t/taint.t	
-@@ -12,7 +12,7 @@ use Test::More;
- BEGIN {
-     plan(
-         ${^TAINT}
--        ? (tests => 17)
-+        ? (tests => 21)
-         : (skip_all => "A perl without taint support")
-     );
- }
-@@ -34,3 +34,20 @@ foreach my $func (@Functions) {
- 
- # Previous versions of Cwd tainted $^O
- is !tainted($^O), 1, "\$^O should not be tainted";
-+
-+{
-+    # [perl #126862] canonpath() loses taint
-+    my $tainted = substr($ENV{PATH}, 0, 0);
-+    # yes, getcwd()'s result should be tainted, and is tested above
-+    # but be sure
-+    ok tainted(File::Spec->canonpath($tainted . Cwd::getcwd)),
-+        "canonpath() keeps taint on non-empty string";
-+    ok tainted(File::Spec->canonpath($tainted)),
-+        "canonpath() keeps taint on empty string";
-+
-+    (Cwd::getcwd() =~ /^(.*)/);
-+    my $untainted = $1;
-+    ok !tainted($untainted), "make sure our untainted value is untainted";
-+    ok !tainted(File::Spec->canonpath($untainted)),
-+        "canonpath() doesn't add taint to untainted string";
-+}
--- 
Index: SOURCES/perl-5.22.x-dup-env-entries.patch
===================================================================
--- SOURCES/perl-5.22.x-dup-env-entries.patch	(revision 1008725)
+++ SOURCES/perl-5.22.x-dup-env-entries.patch	(nonexistent)
@@ -1,100 +0,0 @@
-commit 58eaa1131a38c16ee4a66d0bc36288cfde1a39bf
-Author: Tony Cook <tony@develop-help.com>
-Date:   Wed Jan 27 11:52:15 2016 +1100
-
-    remove duplicate environment variables from environ
-    
-    If we see duplicate environment variables while iterating over
-    environ[]:
-    
-    a) make sure we use the same value in %ENV that getenv() returns.
-    
-    Previously on a duplicate, %ENV would have the last entry for the name
-    from environ[], but a typical getenv() would return the first entry.
-    
-    Rather than assuming all getenv() implementations return the first entry
-    explicitly call getenv() to ensure they agree.
-    
-    b) remove duplicate entries from environ
-    
-    Previously if there was a duplicate definition for a name in environ[]
-    setting that name in %ENV could result in an unsafe value being passed
-    to a child process, so ensure environ[] has no duplicates.
-
-diff --git a/perl.c b/perl.c
-index 16a6ca4..8ef7474 100644
---- a/perl.c
-+++ b/perl.c
-@@ -4298,23 +4298,70 @@ S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env)
- 	}
- 	if (env) {
- 	  char *s, *old_var;
-+          STRLEN nlen;
- 	  SV *sv;
-+          HV *dups = newHV();
-+
- 	  for (; *env; env++) {
- 	    old_var = *env;
- 
- 	    if (!(s = strchr(old_var,'=')) || s == old_var)
- 		continue;
-+            nlen = s - old_var;
- 
- #if defined(MSDOS) && !defined(DJGPP)
- 	    *s = '\0';
- 	    (void)strupr(old_var);
- 	    *s = '=';
- #endif
--	    sv = newSVpv(s+1, 0);
--	    (void)hv_store(hv, old_var, s - old_var, sv, 0);
-+            if (hv_exists(hv, old_var, nlen)) {
-+                const char *name = savepvn(old_var, nlen);
-+
-+                /* make sure we use the same value as getenv(), otherwise code that
-+                   uses getenv() (like setlocale()) might see a different value to %ENV
-+                 */
-+                sv = newSVpv(PerlEnv_getenv(name), 0);
-+
-+                /* keep a count of the dups of this name so we can de-dup environ later */
-+                if (hv_exists(dups, name, nlen))
-+                    ++SvIVX(*hv_fetch(dups, name, nlen, 0));
-+                else
-+                    (void)hv_store(dups, name, nlen, newSViv(1), 0);
-+
-+                Safefree(name);
-+            }
-+            else {
-+                sv = newSVpv(s+1, 0);
-+            }
-+	    (void)hv_store(hv, old_var, nlen, sv, 0);
- 	    if (env_is_not_environ)
- 	        mg_set(sv);
- 	  }
-+          if (HvKEYS(dups)) {
-+              /* environ has some duplicate definitions, remove them */
-+              HE *entry;
-+              hv_iterinit(dups);
-+              while ((entry = hv_iternext_flags(dups, 0))) {
-+                  STRLEN nlen;
-+                  const char *name = HePV(entry, nlen);
-+                  IV count = SvIV(HeVAL(entry));
-+                  IV i;
-+                  SV **valp = hv_fetch(hv, name, nlen, 0);
-+
-+                  assert(valp);
-+
-+                  /* try to remove any duplicate names, depending on the
-+                   * implementation used in my_setenv() the iteration might
-+                   * not be necessary, but let's be safe.
-+                   */
-+                  for (i = 0; i < count; ++i)
-+                      my_setenv(name, 0);
-+
-+                  /* and set it back to the value we set $ENV{name} to */
-+                  my_setenv(name, SvPV_nolen(*valp));
-+              }
-+          }
-+          SvREFCNT_dec_NN(dups);
-       }
- #endif /* USE_ENVIRON_ARRAY */
- #endif /* !PERL_MICRO */

Property changes on: SOURCES/perl-5.22.x-dup-env-entries.patch
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Index: SOURCES/sha1.lst
===================================================================
--- SOURCES/sha1.lst	(revision 1008725)
+++ SOURCES/sha1.lst	(working copy)
@@ -1 +1 @@
-8cb3b099f7c74d4f541a9318c108906daef942c1  perl-5.22.1.tar.xz
+43b599def873413012fc8bcfd0a64bbce40b4ed2  perl-5.22.2.tar.xz
Index: SPECS/perl.spec
===================================================================
--- SPECS/perl.spec	(revision 1008725)
+++ SPECS/perl.spec	(working copy)
@@ -47,8 +47,8 @@
 %define lc_distro %(echo %{distribution} | cut -d" " -f1 | tr "A-Z" "a-z")
 
 Name:     perl
-Version:  5.22.1
-Release:  %mkrel 3
+Version:  5.22.2
+Release:  %mkrel 1
 Epoch:    2
 
 %define rel %{nil}
@@ -94,9 +94,6 @@
 # mdvbz#34505, get rid of this patch as soon as possible :-/
 Patch48:  perl-5.16.0-workaround-segfault-freeing-scalar-a-second-time.patch
 
-# Patch for MGA#17861 , https://www.debian.org/security/2016/dsa-3501
-Patch49:  perl-5.22.x-dup-env-entries.patch
-
 #
 # fixes taken from debian
 #
@@ -115,8 +112,6 @@
 # Link XS modules to libperl.so with EU::MM on Linux, bug #960048
 Patch201:       perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch
 
-Patch500:	perl-5.22.1-CVE-2015-8607.patch
-
 Requires: perl-base = %{epoch}:%{version}-%{release}
 
 # --
@@ -272,7 +267,6 @@
 %patch44 -p0
 %patch45 -p0
 %patch48 -p0
-%patch49 -p1
 
 %patch65 -p1
 %patch66 -p1 -b .cflags
@@ -285,13 +279,11 @@
 %patch200 -p1
 %patch201 -p1
 
-%patch500 -p1
-
 chmod -R u+w *
 
 %build
 sh Configure -des \
-  -Dinc_version_list="5.22.1 5.22.1/%{full_arch} 5.22.0 5.22.0/%{full_arch} 5.20.1 5.20.0 5.18.2 5.18.1 5.18.0 5.16.3 5.16.3 5.16.2 5.16.2 5.16.1 5.16.1 5.16.0 5.16.0" \
+  -Dinc_version_list="5.22.2 5.22.2/%{full_arch} 5.22.1 5.22.1/%{full_arch} 5.22.0 5.22.0/%{full_arch} 5.20.1 5.20.0 5.18.2 5.18.1 5.18.0 5.16.3 5.16.3 5.16.2 5.16.2 5.16.1 5.16.1 5.16.0 5.16.0" \
   -Darchname=%{arch}-%{_os} \
   -Dcc='%{__cc}' \
 %if %debugging
