From 73e2f4545ba9b49cb7b057ec237b360a129230782411a76e2ce667a46fb6364b Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 17 May 2017 10:00:29 +0000 Subject: [PATCH 1/2] Accepting request 494775 from home:coolo:branches:openSUSE:Factory - Fix building with zlib-1.2.10 (RT#119762): * Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch - Update to perl-5.24.1 -Di switch is now required for PerlIO debugging output Previously PerlIO debugging output would be sent to the file specified by the "PERLIO_DEBUG" environment variable if perl wasn't running setuid and the -T or -t switches hadn't been parsed yet. If perl performed output at a point where it hadn't yet parsed its switches this could result in perl creating or overwriting the file named by "PERLIO_DEBUG" even when the -T switch had been supplied. Perl now requires the -Di switch to produce PerlIO debugging output. By default this is written to "stderr", but can optionally be redirected to a file by setting the "PERLIO_DEBUG" environment variable. If perl is running setuid or the -T switch was supplied "PERLIO_DEBUG" is ignored and the debugging output is sent to "stderr" as for any other -D switch. Core modules and tools no longer search "." for optional modules The tools and many modules supplied in core no longer search the default current directory entry in @INC for optional modules. For example, Storable will remove the final "." from @INC before trying to load Log::Agent. This prevents an attacker injecting an optional module into a process run by another user where the current directory is writable by the attacker, e.g. the /tmp directory. - Refresh patches OBS-URL: https://build.opensuse.org/request/show/494775 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=148 --- ...lib-2.071-Adapt-tests-to-zlib-1.2.11.patch | 45 ++ perl-5.18.2-overflow.diff | 8 +- perl-5.22.0_wrong_rpm_provides.diff | 12 +- perl-5.24.0.dif | 506 ++++++++++-------- perl-5.24.0.tar.xz | 3 - perl-5.24.1.tar.xz | 3 + perl-HiRes.t-timeout.diff | 24 +- perl-incfix.diff | 10 +- perl-netcmdutf8.diff | 19 +- perl-nroff.diff | 6 +- perl-regexp-refoverflow.diff | 8 +- perl-saverecontext.diff | 8 +- perl.changes | 40 ++ perl.spec | 9 +- 14 files changed, 441 insertions(+), 260 deletions(-) create mode 100644 Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch delete mode 100644 perl-5.24.0.tar.xz create mode 100644 perl-5.24.1.tar.xz diff --git a/Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch b/Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch new file mode 100644 index 0000000..95d56e4 --- /dev/null +++ b/Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch @@ -0,0 +1,45 @@ +Index: cpan/Compress-Raw-Zlib/t/02zlib.t +=================================================================== +--- cpan/Compress-Raw-Zlib/t/02zlib.t.orig ++++ cpan/Compress-Raw-Zlib/t/02zlib.t +@@ -24,13 +24,13 @@ BEGIN + + my $count = 0 ; + if ($] < 5.005) { +- $count = 232 ; ++ $count = 236 ; + } + elsif ($] >= 5.006) { +- $count = 317 ; ++ $count = 320 ; + } + else { +- $count = 275 ; ++ $count = 278 ; + } + + plan tests => $count + $extra; +@@ -537,6 +537,7 @@ SKIP: + + $status = $x->deflate($hello, $Answer) ; + cmp_ok $status, '==', Z_OK ; ++ cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ; + $input .= $hello; + + # error cases +@@ -561,6 +562,7 @@ SKIP: + + $status = $x->deflate($goodbye, $Answer) ; + cmp_ok $status, '==', Z_OK ; ++ cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ; + $input .= $goodbye; + + # change only Level +@@ -572,6 +574,7 @@ SKIP: + + $status = $x->deflate($goodbye, $Answer) ; + cmp_ok $status, '==', Z_OK ; ++ cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ; + $input .= $goodbye; + + # change only Strategy diff --git a/perl-5.18.2-overflow.diff b/perl-5.18.2-overflow.diff index f9bec2e..cfee578 100644 --- a/perl-5.18.2-overflow.diff +++ b/perl-5.18.2-overflow.diff @@ -1,6 +1,8 @@ ---- sv.c.bak 2014-03-24 15:11:48.007595042 +0100 -+++ sv.c 2014-03-25 11:57:41.154752451 +0100 -@@ -2175,7 +2175,7 @@ S_sv_2iuv_common(pTHX_ SV *const sv) +Index: sv.c +=================================================================== +--- sv.c.orig ++++ sv.c +@@ -2153,7 +2153,7 @@ S_sv_2iuv_common(pTHX_ SV *const sv) #ifndef NV_PRESERVES_UV && SvIVX(sv) != IV_MIN /* avoid negating IV_MIN below */ && (((UV)1 << NV_PRESERVES_UV_BITS) > diff --git a/perl-5.22.0_wrong_rpm_provides.diff b/perl-5.22.0_wrong_rpm_provides.diff index bce5613..1d8065b 100644 --- a/perl-5.22.0_wrong_rpm_provides.diff +++ b/perl-5.22.0_wrong_rpm_provides.diff @@ -1,5 +1,7 @@ ---- ./cpan/Math-BigInt/lib/Math/BigInt/CalcEmu.pm.orig 2016-03-01 12:33:01.000000000 +0000 -+++ ./cpan/Math-BigInt/lib/Math/BigInt/CalcEmu.pm 2016-05-09 11:56:55.769386963 +0000 +Index: cpan/Math-BigInt/lib/Math/BigInt/CalcEmu.pm +=================================================================== +--- cpan/Math-BigInt/lib/Math/BigInt/CalcEmu.pm.orig ++++ cpan/Math-BigInt/lib/Math/BigInt/CalcEmu.pm @@ -7,7 +7,8 @@ use warnings; our $VERSION = '1.999715'; $VERSION = eval $VERSION; @@ -10,8 +12,10 @@ # See SYNOPSIS below. ---- ./lib/sigtrap.pm.orig 2016-03-01 12:33:02.000000000 +0000 -+++ ./lib/sigtrap.pm 2016-05-09 11:56:55.769386963 +0000 +Index: lib/sigtrap.pm +=================================================================== +--- lib/sigtrap.pm.orig ++++ lib/sigtrap.pm @@ -80,7 +80,8 @@ sub handler_die { } diff --git a/perl-5.24.0.dif b/perl-5.24.0.dif index 9ec5acd..8720079 100644 --- a/perl-5.24.0.dif +++ b/perl-5.24.0.dif @@ -1,5 +1,7 @@ ---- ./Configure.orig 2016-04-26 22:11:09.000000000 +0000 -+++ ./Configure 2016-05-09 11:46:57.865487194 +0000 +Index: Configure +=================================================================== +--- Configure.orig ++++ Configure @@ -117,7 +117,7 @@ paths="$paths /usr/5bin /etc /usr/gnu/bi paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" @@ -93,185 +95,10 @@ perl_patchlevel='$perl_patchlevel' perl_static_inline='$perl_static_inline' perladmin='$perladmin' ---- ./SuSE/SuSEconfig.perl.orig 2016-05-09 11:46:57.866487189 +0000 -+++ ./SuSE/SuSEconfig.perl 2016-05-09 11:46:57.866487189 +0000 -@@ -0,0 +1,76 @@ -+#! /bin/bash -+# -+# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved. -+# -+# Author: Burchard Steinbild , 1996 -+# Martin Scherbaum , 5/1997 -+# Ruediger Oertel , 7/1998 -+ -+# -+# Variables in /etc/sysconfig/suseconfig used by this script are: -+# CREATE_PERLLOCAL_POD -+# -+# This script calls the scripts: -+# /usr/sbin/perllocal.suse which comes from the package perl -+# -+ -+# -+# check if we are started as root -+# only one of UID and USER must be set correctly -+# -+if test "$UID" != 0 -a "$USER" != root; then -+ echo "You must be root to start $0." -+ exit 1 -+fi -+ -+# -+# SuSEconfig sometimes sets the variable CHECK_NEWPACKAGE. If it is set -+# to false, we don't have to do anything. -+# -+test "$CHECK_NEWPACKAGE" = false && exit 0 -+ -+test -f /etc/sysconfig/suseconfig || { echo "No /etc/sysconfig/suseconfig found." && exit 1 ; } -+. /etc/sysconfig/suseconfig -+ -+# this skript only works in a running system. -+ -+test -n "$ROOT" && exit 0 -+ -+perl -e 'exit 0' 2>/dev/null || { echo "Perl not found." && exit 0 ; } -+ -+# -+# see if we may do any work -+# -+test -n "$CREATE_PERLLOCAL_POD" -a "$CREATE_PERLLOCAL_POD" = "yes" \ -+ || { echo "disabled in sysconfig/suseconfig" && exit 1 ; } -+ -+# -+# check if anything to add -+# -+PERLLOCAL_PATH=`perl -V:installarchlib | sed -e "s/.*='\(.*\)'.*/\1/"` -+ -+NEEDED="false" -+ -+if test -d /var/adm/perl-modules ; then -+ if test /var/adm/perl-modules -nt $PERLLOCAL_PATH/perllocal.pod ; then -+ NEEDED="true" -+ elif test ! -f $PERLLOCAL_PATH/perllocal.pod ; then -+ NEEDED="true" -+ fi -+fi -+ -+# -+# now call the working script -+# -+if "$NEEDED" = "true" ; then -+ if test -x /usr/lib/perl5/perllocal.SuSE ; then -+ /usr/lib/perl5/perllocal.SuSE -+ pod2man $PERLLOCAL_PATH/perllocal.pod | gzip > /usr/share/man/man3/perllocal.3pm.gz -+ else -+ echo "SuSEconfig.perl: /usr/lib/perl5/perllocal.SuSE not found!" -+ fi -+fi -+ -+# -+# end of file SuSEconfig.perl -+# ---- ./SuSE/perllocal.SuSE.orig 2016-05-09 11:46:57.866487189 +0000 -+++ ./SuSE/perllocal.SuSE 2016-05-09 11:46:57.866487189 +0000 -@@ -0,0 +1,84 @@ -+#!/usr/bin/perl -+# Copyright (c) 1998 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved. -+# -+# Author: Ruediger Oertel , 1998 -+# -+ -+use Config; -+ -+sub ReadFile { -+ local (*IF,*modules) = @_; -+ -+ while() { -+ chomp ($_); -+ next if (/^$/); -+ if (/^=head2.*$/) { -+ ($front,$rear) = split (': ',$_); -+ $front =~ s/^=head2\s*//; -+ $modules{$rear} = "$front"; -+ } elsif (/^=over [0-9]*$/) { -+ ($dummy,$num) = split ('\s',$_); -+ $curnum = 0; -+ } elsif (/^C<.*:.*>$/) { -+ $entry = $_; -+ $curnum++; -+ $modules{$rear} .= "\0$entry"; -+ } elsif (/^=back$/) { -+ ; -+ } elsif (/^=item \*$/) { -+ ; -+ } else { -+ print "SuSEconfig.perl: parsing perllocal:\n"; -+ print "ignoring line: $_\n"; -+ } -+ } -+ return %modules; -+} -+ -+local (%allmodules); -+ -+if (open (IF, "<$Config{'installarchlib'}/perllocal.pod")) { -+ %allmodules = ReadFile(*IF,*allmodules); -+} -+close (IF); -+ -+opendir (DIR, "/var/adm/perl-modules"); -+while ($dirent = readdir(DIR)) { -+ next if ($dirent =~ /^\./); -+ open (IF , "/var/adm/perl-modules/$dirent"); -+ %allmodules = ReadFile(*IF,*allmodules); -+ close (IF); -+} -+closedir (DIR); -+ -+ -+if (open (OF, ">$Config{'installarchlib'}/perllocal.pod")) { -+ foreach $key (keys(%allmodules)) { -+ $name = $key; -+ $name =~ s/^.*L\$//; -+ $name =~ s/::/\//; -+ @entries = split ('\0',$allmodules{$key}); -+ $ipath = $entries[1]; -+ $ipath =~ s/^.*\:\s//; -+ $ipath =~ s/>$//; -+ -+ # test if the module is really there, else skip -+ if ( -d "$ipath/$Config{'archname'}/auto/$name" || -+ -d "$Config{'installarchlib'}/auto/$name" ) { -+ $num = $#entries; -+ print OF "=head2 ",shift(@entries),": $key\n\n"; -+ print OF "=over $num\n\n"; -+ while ($_ = shift(@entries)) { -+ print OF "=item *\n\n"; -+ print OF "$_\n\n"; -+ } -+ print OF "=back\n\n"; -+ } -+ } -+ close (OF); -+} else { -+ print "SuSEconfig.perl: Can't write to file $Config{'installarchlib'}/perllocal.pod !\n\n"; -+} -+ ---- ./SuSE/sysconfig.suseconfig-perl.orig 2016-05-09 11:46:57.866487189 +0000 -+++ ./SuSE/sysconfig.suseconfig-perl 2016-05-09 11:46:57.866487189 +0000 -@@ -0,0 +1,8 @@ -+## Path: System/SuSEconfig -+## Type: yesno -+## Default: yes -+## Config: perl -+# -+# May SuSEconfig modify your perllocal.pod? (yes/no) -+# -+CREATE_PERLLOCAL_POD="yes" ---- ./cpan/Compress-Raw-Zlib/config.in.orig 2015-10-14 13:17:05.000000000 +0000 -+++ ./cpan/Compress-Raw-Zlib/config.in 2016-05-09 11:46:57.867487184 +0000 +Index: cpan/Compress-Raw-Zlib/config.in +=================================================================== +--- cpan/Compress-Raw-Zlib/config.in.orig ++++ cpan/Compress-Raw-Zlib/config.in @@ -16,9 +16,9 @@ # Setting the Gzip OS Code # @@ -285,9 +112,11 @@ OLD_ZLIB = False GZIP_OS_CODE = AUTO_DETECT ---- ./cpan/Encode/bin/enc2xs.orig 2016-03-01 12:33:01.000000000 +0000 -+++ ./cpan/Encode/bin/enc2xs 2016-05-09 11:46:57.867487184 +0000 -@@ -1065,7 +1065,7 @@ sub make_configlocal_pm { +Index: cpan/Encode/bin/enc2xs +=================================================================== +--- cpan/Encode/bin/enc2xs.orig ++++ cpan/Encode/bin/enc2xs +@@ -1066,7 +1066,7 @@ sub make_configlocal_pm { $LocalMod{$enc} ||= $mod; } }; @@ -296,8 +125,10 @@ $_ModLines = ""; for my $enc ( sort keys %LocalMod ) { $_ModLines .= ---- ./cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm.orig 2016-03-01 12:33:01.000000000 +0000 -+++ ./cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm 2016-05-09 11:46:57.868487180 +0000 +Index: cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm +=================================================================== +--- cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm.orig ++++ cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm @@ -207,8 +207,11 @@ foreach my $key (sort(keys(%{$self->{dat { if (! -e $key) @@ -312,8 +143,10 @@ } } return(@missing); ---- ./cpan/File-Temp/lib/File/Temp.pm.orig 2016-02-05 15:26:05.000000000 +0000 -+++ ./cpan/File-Temp/lib/File/Temp.pm 2016-05-09 11:46:57.869487178 +0000 +Index: cpan/File-Temp/lib/File/Temp.pm +=================================================================== +--- cpan/File-Temp/lib/File/Temp.pm.orig ++++ cpan/File-Temp/lib/File/Temp.pm @@ -16,7 +16,7 @@ use Fcntl 1.03; use IO::Seekable; # For SEEK_* use Errno; @@ -323,19 +156,11 @@ # pre-emptively load Carp::Heavy. If we don't when we run out of file # handles and attempt to call croak() we get an error message telling ---- ./cpan/Sys-Syslog/t/syslog.t.orig 2016-02-05 15:26:05.000000000 +0000 -+++ ./cpan/Sys-Syslog/t/syslog.t 2016-05-09 11:46:57.869487178 +0000 -@@ -220,6 +220,7 @@ SKIP: { - } - } - else { -+ $r = 1 unless -e '/dev/log'; - ok( $r, "setlogsock() should return true: '$r'" ); - } - ---- ./cpan/libnet/lib/Net/Config.pm.orig 2016-03-01 12:33:02.000000000 +0000 -+++ ./cpan/libnet/lib/Net/Config.pm 2016-05-09 11:46:57.869487178 +0000 -@@ -48,7 +48,7 @@ our %NetConfig = ( +Index: cpan/libnet/lib/Net/Config.pm +=================================================================== +--- cpan/libnet/lib/Net/Config.pm.orig ++++ cpan/libnet/lib/Net/Config.pm +@@ -53,7 +53,7 @@ our %NetConfig = ( { ## no critic (BuiltinFunctions::ProhibitStringyEval) $^O eq 'MacOS' and eval < $self->{CCFLAGS} = $Config{ccflags} . ' -I/usr/include/libelf' @@ -354,8 +193,21 @@ +# module, so add cccdlflags if we're going for a shared libperl +$self->{CCFLAGS} = ($self->{CCFLAGS} || $Config{ccflags}) . " $Config{cccdlflags}" if $Config{'useshrplib'} eq 'true'; 1; ---- ./ext/ODBM_File/Makefile.PL.orig 2015-10-14 13:17:06.000000000 +0000 -+++ ./ext/ODBM_File/Makefile.PL 2016-05-09 11:46:57.870487175 +0000 +Index: ext/ODBM_File/hints/linux.pl +=================================================================== +--- ext/ODBM_File/hints/linux.pl.orig ++++ ext/ODBM_File/hints/linux.pl +@@ -1,5 +1,5 @@ + # uses GDBM dbm compatibility feature - at least on SuSE 8.0 +-$self->{LIBS} = ['-lgdbm']; ++$self->{LIBS} = ['-lgdbm -lgdbm_compat']; + + # Debian/Ubuntu have libgdbm_compat.so but not this file, + # so linking may fail +Index: ext/ODBM_File/Makefile.PL +=================================================================== +--- ext/ODBM_File/Makefile.PL.orig ++++ ext/ODBM_File/Makefile.PL @@ -1,7 +1,7 @@ use ExtUtils::MakeMaker; WriteMakefile( @@ -365,17 +217,10 @@ XSPROTOARG => '-noprototypes', # XXX remove later? VERSION_FROM => 'ODBM_File.pm', ); ---- ./ext/ODBM_File/hints/linux.pl.orig 2015-10-14 13:17:06.000000000 +0000 -+++ ./ext/ODBM_File/hints/linux.pl 2016-05-09 11:46:57.870487175 +0000 -@@ -1,5 +1,5 @@ - # uses GDBM dbm compatibility feature - at least on SuSE 8.0 --$self->{LIBS} = ['-lgdbm']; -+$self->{LIBS} = ['-lgdbm -lgdbm_compat']; - - # Debian/Ubuntu have libgdbm_compat.so but not this file, - # so linking may fail ---- ./hints/linux.sh.orig 2016-03-01 12:33:02.000000000 +0000 -+++ ./hints/linux.sh 2016-05-09 11:46:57.871487171 +0000 +Index: hints/linux.sh +=================================================================== +--- hints/linux.sh.orig ++++ hints/linux.sh @@ -53,7 +53,7 @@ ignore_versioned_solibs='y' # BSD compatibility library no longer needed # 'kaffe' has a /usr/lib/libnet.so which is not at all relevant for perl. @@ -474,8 +319,10 @@ ;; esac EOCBU ---- ./installperl.orig 2016-03-01 12:33:02.000000000 +0000 -+++ ./installperl 2016-05-09 11:46:57.871487171 +0000 +Index: installperl +=================================================================== +--- installperl.orig ++++ installperl @@ -728,7 +728,7 @@ sub installlib { return if $name eq 'ExtUtils/MakeMaker/version/regex.pm'; @@ -485,9 +332,11 @@ ($name =~ /^(.*)\.(?:pm|pod)$/ && $archpms{$1}) || ($name =~ /^(.*)\.(?:h|lib)$/i && ($Is_W32 || $Is_NetWare)) || $name=~/^Config_(heavy|git)\.pl\z/ ---- ./lib/perl5db.pl.orig 2016-04-26 22:11:09.000000000 +0000 -+++ ./lib/perl5db.pl 2016-05-09 11:46:57.874487160 +0000 -@@ -2356,6 +2356,8 @@ sub _DB__handle_run_command_in_pager_com +Index: lib/perl5db.pl +=================================================================== +--- lib/perl5db.pl.orig ++++ lib/perl5db.pl +@@ -2359,6 +2359,8 @@ sub _DB__handle_run_command_in_pager_com open( OUT, ">&STDOUT" ) # XXX: lost message || _db_warn("Can't restore DB::OUT"); } @@ -496,7 +345,7 @@ next CMD; } ## end unless ($piped = open(OUT,... -@@ -2460,6 +2462,9 @@ sub _DB__at_end_of_every_command { +@@ -2463,6 +2465,9 @@ sub _DB__at_end_of_every_command { $obj->selected(""); } @@ -506,9 +355,194 @@ # No pipes now. $obj->piped(""); } ## end if ($piped) ---- ./utils/perlbug.PL.orig 2016-02-05 15:26:06.000000000 +0000 -+++ ./utils/perlbug.PL 2016-05-09 11:46:57.875487157 +0000 -@@ -1038,6 +1038,7 @@ sub _message_headers { +Index: SuSE/perllocal.SuSE +=================================================================== +--- /dev/null ++++ SuSE/perllocal.SuSE +@@ -0,0 +1,84 @@ ++#!/usr/bin/perl ++# Copyright (c) 1998 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved. ++# ++# Author: Ruediger Oertel , 1998 ++# ++ ++use Config; ++ ++sub ReadFile { ++ local (*IF,*modules) = @_; ++ ++ while() { ++ chomp ($_); ++ next if (/^$/); ++ if (/^=head2.*$/) { ++ ($front,$rear) = split (': ',$_); ++ $front =~ s/^=head2\s*//; ++ $modules{$rear} = "$front"; ++ } elsif (/^=over [0-9]*$/) { ++ ($dummy,$num) = split ('\s',$_); ++ $curnum = 0; ++ } elsif (/^C<.*:.*>$/) { ++ $entry = $_; ++ $curnum++; ++ $modules{$rear} .= "\0$entry"; ++ } elsif (/^=back$/) { ++ ; ++ } elsif (/^=item \*$/) { ++ ; ++ } else { ++ print "SuSEconfig.perl: parsing perllocal:\n"; ++ print "ignoring line: $_\n"; ++ } ++ } ++ return %modules; ++} ++ ++local (%allmodules); ++ ++if (open (IF, "<$Config{'installarchlib'}/perllocal.pod")) { ++ %allmodules = ReadFile(*IF,*allmodules); ++} ++close (IF); ++ ++opendir (DIR, "/var/adm/perl-modules"); ++while ($dirent = readdir(DIR)) { ++ next if ($dirent =~ /^\./); ++ open (IF , "/var/adm/perl-modules/$dirent"); ++ %allmodules = ReadFile(*IF,*allmodules); ++ close (IF); ++} ++closedir (DIR); ++ ++ ++if (open (OF, ">$Config{'installarchlib'}/perllocal.pod")) { ++ foreach $key (keys(%allmodules)) { ++ $name = $key; ++ $name =~ s/^.*L\$//; ++ $name =~ s/::/\//; ++ @entries = split ('\0',$allmodules{$key}); ++ $ipath = $entries[1]; ++ $ipath =~ s/^.*\:\s//; ++ $ipath =~ s/>$//; ++ ++ # test if the module is really there, else skip ++ if ( -d "$ipath/$Config{'archname'}/auto/$name" || ++ -d "$Config{'installarchlib'}/auto/$name" ) { ++ $num = $#entries; ++ print OF "=head2 ",shift(@entries),": $key\n\n"; ++ print OF "=over $num\n\n"; ++ while ($_ = shift(@entries)) { ++ print OF "=item *\n\n"; ++ print OF "$_\n\n"; ++ } ++ print OF "=back\n\n"; ++ } ++ } ++ close (OF); ++} else { ++ print "SuSEconfig.perl: Can't write to file $Config{'installarchlib'}/perllocal.pod !\n\n"; ++} ++ +Index: SuSE/SuSEconfig.perl +=================================================================== +--- /dev/null ++++ SuSE/SuSEconfig.perl +@@ -0,0 +1,76 @@ ++#! /bin/bash ++# ++# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved. ++# ++# Author: Burchard Steinbild , 1996 ++# Martin Scherbaum , 5/1997 ++# Ruediger Oertel , 7/1998 ++ ++# ++# Variables in /etc/sysconfig/suseconfig used by this script are: ++# CREATE_PERLLOCAL_POD ++# ++# This script calls the scripts: ++# /usr/sbin/perllocal.suse which comes from the package perl ++# ++ ++# ++# check if we are started as root ++# only one of UID and USER must be set correctly ++# ++if test "$UID" != 0 -a "$USER" != root; then ++ echo "You must be root to start $0." ++ exit 1 ++fi ++ ++# ++# SuSEconfig sometimes sets the variable CHECK_NEWPACKAGE. If it is set ++# to false, we don't have to do anything. ++# ++test "$CHECK_NEWPACKAGE" = false && exit 0 ++ ++test -f /etc/sysconfig/suseconfig || { echo "No /etc/sysconfig/suseconfig found." && exit 1 ; } ++. /etc/sysconfig/suseconfig ++ ++# this skript only works in a running system. ++ ++test -n "$ROOT" && exit 0 ++ ++perl -e 'exit 0' 2>/dev/null || { echo "Perl not found." && exit 0 ; } ++ ++# ++# see if we may do any work ++# ++test -n "$CREATE_PERLLOCAL_POD" -a "$CREATE_PERLLOCAL_POD" = "yes" \ ++ || { echo "disabled in sysconfig/suseconfig" && exit 1 ; } ++ ++# ++# check if anything to add ++# ++PERLLOCAL_PATH=`perl -V:installarchlib | sed -e "s/.*='\(.*\)'.*/\1/"` ++ ++NEEDED="false" ++ ++if test -d /var/adm/perl-modules ; then ++ if test /var/adm/perl-modules -nt $PERLLOCAL_PATH/perllocal.pod ; then ++ NEEDED="true" ++ elif test ! -f $PERLLOCAL_PATH/perllocal.pod ; then ++ NEEDED="true" ++ fi ++fi ++ ++# ++# now call the working script ++# ++if "$NEEDED" = "true" ; then ++ if test -x /usr/lib/perl5/perllocal.SuSE ; then ++ /usr/lib/perl5/perllocal.SuSE ++ pod2man $PERLLOCAL_PATH/perllocal.pod | gzip > /usr/share/man/man3/perllocal.3pm.gz ++ else ++ echo "SuSEconfig.perl: /usr/lib/perl5/perllocal.SuSE not found!" ++ fi ++fi ++ ++# ++# end of file SuSEconfig.perl ++# +Index: SuSE/sysconfig.suseconfig-perl +=================================================================== +--- /dev/null ++++ SuSE/sysconfig.suseconfig-perl +@@ -0,0 +1,8 @@ ++## Path: System/SuSEconfig ++## Type: yesno ++## Default: yes ++## Config: perl ++# ++# May SuSEconfig modify your perllocal.pod? (yes/no) ++# ++CREATE_PERLLOCAL_POD="yes" +Index: utils/perlbug.PL +=================================================================== +--- utils/perlbug.PL.orig ++++ utils/perlbug.PL +@@ -1039,6 +1039,7 @@ sub _message_headers { $headers{'Cc'} = $cc if ($cc); $headers{'Message-Id'} = $messageid if ($messageid); $headers{'Reply-To'} = $from if ($from); @@ -516,3 +550,25 @@ $headers{'From'} = $from if ($from); if ($have_attachment) { $headers{'MIME-Version'} = '1.0'; +Index: t/porting/customized.dat +=================================================================== +--- t/porting/customized.dat.orig ++++ t/porting/customized.dat +@@ -10,7 +10,7 @@ CPAN cpan/CPAN/scripts/cpan c43050c8c631 + Digest cpan/Digest/Digest.pm 43f7f544cb11842b2f55c73e28930da50774e081 + Digest::SHA cpan/Digest-SHA/lib/Digest/SHA.pm 5841fcf70f7290e07befdd16f05093664c618a96 + Digest::SHA cpan/Digest-SHA/shasum f92faa37afc098e2a825e4ecda1097890492d957 +-Encode cpan/Encode/bin/enc2xs 7bbd4ca8d81e0189b87d703aa058b95a837b97d3 ++Encode cpan/Encode/bin/enc2xs 91d5d4a16b97452ba23c1ba845572aada4ca0aa2 + Encode cpan/Encode/bin/encguess f1e7a130995c4bad53bb6d3034dae625cfe61e32 + Encode cpan/Encode/bin/piconv 80ea7f9afff580e41c4b29f5ab214ed378274b49 + Encode cpan/Encode/bin/ucmlint 495862125269a60536b78fd0a7910d024c4d21fe +@@ -165,7 +165,7 @@ bignum cpan/bignum/lib/bigrat.pm 7fccc9d + bignum cpan/bignum/lib/Math/BigFloat/Trace.pm a6b4b995e18f4083252e6dc72e9bef69671893dd + bignum cpan/bignum/lib/Math/BigInt/Trace.pm d9596963673760cae3eeeb752c1eeeec50bb2290 + libnet cpan/libnet/lib/Net/Cmd.pm a44a10c939a4c35f923c4638054178c32f1d283a +-libnet cpan/libnet/lib/Net/Config.pm 9bd49bf4de0dc438bceee0ef4baf8ba7a6633327 ++libnet cpan/libnet/lib/Net/Config.pm 2167a2653b40c9f94e6d52574829532e62394a17 + libnet cpan/libnet/lib/Net/Domain.pm 1bbed50f70fd1ff3e1cdf087b19a9349cddfaced + libnet cpan/libnet/lib/Net/FTP.pm 40dba553c8d44e1530daec2d07a6e50910401f2e + libnet cpan/libnet/lib/Net/FTP/A.pm c570b10730b168990034dcf9cb00e305a100f336 diff --git a/perl-5.24.0.tar.xz b/perl-5.24.0.tar.xz deleted file mode 100644 index fce66aa..0000000 --- a/perl-5.24.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a9a37c0860380ecd7b23aa06d61c20fc5bc6d95198029f3684c44a9d7e2952f2 -size 11483228 diff --git a/perl-5.24.1.tar.xz b/perl-5.24.1.tar.xz new file mode 100644 index 0000000..c55b8a5 --- /dev/null +++ b/perl-5.24.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03a77bac4505c270f1890ece75afc7d4b555090b41aa41ea478747e23b2afb3f +size 11569284 diff --git a/perl-HiRes.t-timeout.diff b/perl-HiRes.t-timeout.diff index 0835f5e..395840c 100644 --- a/perl-HiRes.t-timeout.diff +++ b/perl-HiRes.t-timeout.diff @@ -1,5 +1,7 @@ ---- ./dist/Time-HiRes/t/alarm.t.orig 2016-03-01 12:33:02.000000000 +0000 -+++ ./dist/Time-HiRes/t/alarm.t 2016-05-09 11:52:55.105232324 +0000 +Index: dist/Time-HiRes/t/alarm.t +=================================================================== +--- dist/Time-HiRes/t/alarm.t.orig ++++ dist/Time-HiRes/t/alarm.t @@ -7,7 +7,7 @@ BEGIN { require_ok "Time::HiRes"; } use Config; @@ -9,8 +11,10 @@ my $xdefine = ''; if (open(XDEFINE, "xdefine")) { ---- ./dist/Time-HiRes/t/clock.t.orig 2016-03-01 12:33:02.000000000 +0000 -+++ ./dist/Time-HiRes/t/clock.t 2016-05-09 11:52:55.106232324 +0000 +Index: dist/Time-HiRes/t/clock.t +=================================================================== +--- dist/Time-HiRes/t/clock.t.orig ++++ dist/Time-HiRes/t/clock.t @@ -28,7 +28,7 @@ note sprintf "have_clock = %d" # completes fine with (say) 30% slosh, and fail otherwise. If you do that, # consider changing over to test.pl at the same time. @@ -20,8 +24,10 @@ SKIP: { skip "no clock_gettime", 1 ---- ./dist/Time-HiRes/t/itimer.t.orig 2016-03-01 12:33:02.000000000 +0000 -+++ ./dist/Time-HiRes/t/itimer.t 2016-05-09 11:52:55.106232324 +0000 +Index: dist/Time-HiRes/t/itimer.t +=================================================================== +--- dist/Time-HiRes/t/itimer.t.orig ++++ dist/Time-HiRes/t/itimer.t @@ -28,7 +28,7 @@ BEGIN { use Test::More 0.82 tests => 2; use t::Watchdog; @@ -31,8 +37,10 @@ my $i = 3; my $r = [Time::HiRes::gettimeofday()]; ---- ./dist/Time-HiRes/t/usleep.t.orig 2016-03-01 12:33:02.000000000 +0000 -+++ ./dist/Time-HiRes/t/usleep.t 2016-05-09 11:52:55.107232323 +0000 +Index: dist/Time-HiRes/t/usleep.t +=================================================================== +--- dist/Time-HiRes/t/usleep.t.orig ++++ dist/Time-HiRes/t/usleep.t @@ -15,7 +15,7 @@ eval { Time::HiRes::usleep(-2) }; like $@, qr/::usleep\(-2\): negative time not invented yet/, "negative time error"; diff --git a/perl-incfix.diff b/perl-incfix.diff index baaae39..42cbfd3 100644 --- a/perl-incfix.diff +++ b/perl-incfix.diff @@ -1,6 +1,8 @@ ---- perl.c.orig 2013-09-03 15:36:39.767794693 +0000 -+++ perl.c 2013-09-03 15:39:05.334794435 +0000 -@@ -4423,11 +4423,13 @@ S_init_perllib(pTHX) +Index: perl.c +=================================================================== +--- perl.c.orig ++++ perl.c +@@ -4544,11 +4544,13 @@ S_init_perllib(pTHX) # endif #endif @@ -14,7 +16,7 @@ if (!TAINTING_get) { #ifndef VMS -@@ -4469,20 +4471,19 @@ S_init_perllib(pTHX) +@@ -4590,20 +4592,19 @@ S_init_perllib(pTHX) #if defined(SITELIB_STEM) && defined(PERL_INC_VERSION_LIST) /* Search for version-specific dirs below here */ S_incpush_use_sep(aTHX_ STR_WITH_LEN(SITELIB_STEM), diff --git a/perl-netcmdutf8.diff b/perl-netcmdutf8.diff index d212e3c..10ccf60 100644 --- a/perl-netcmdutf8.diff +++ b/perl-netcmdutf8.diff @@ -1,5 +1,7 @@ ---- ./cpan/libnet/lib/Net/Cmd.pm.orig 2016-03-01 12:33:02.000000000 +0000 -+++ ./cpan/libnet/lib/Net/Cmd.pm 2016-05-09 11:50:16.976787779 +0000 +Index: cpan/libnet/lib/Net/Cmd.pm +=================================================================== +--- cpan/libnet/lib/Net/Cmd.pm.orig ++++ cpan/libnet/lib/Net/Cmd.pm @@ -290,6 +290,10 @@ sub command { $str = $cmd->toascii($str) if $tr; $str .= "\015\012"; @@ -22,3 +24,16 @@ return 1 unless length($line); +Index: t/porting/customized.dat +=================================================================== +--- t/porting/customized.dat.orig ++++ t/porting/customized.dat +@@ -164,7 +164,7 @@ bignum cpan/bignum/lib/bignum.pm e999973 + bignum cpan/bignum/lib/bigrat.pm 7fccc9df30e43dbbae6e5ea91b26c8046545c9a9 + bignum cpan/bignum/lib/Math/BigFloat/Trace.pm a6b4b995e18f4083252e6dc72e9bef69671893dd + bignum cpan/bignum/lib/Math/BigInt/Trace.pm d9596963673760cae3eeeb752c1eeeec50bb2290 +-libnet cpan/libnet/lib/Net/Cmd.pm a44a10c939a4c35f923c4638054178c32f1d283a ++libnet cpan/libnet/lib/Net/Cmd.pm 3f34ca6479008268714bd02962624d270d04a01e + libnet cpan/libnet/lib/Net/Config.pm 2167a2653b40c9f94e6d52574829532e62394a17 + libnet cpan/libnet/lib/Net/Domain.pm 1bbed50f70fd1ff3e1cdf087b19a9349cddfaced + libnet cpan/libnet/lib/Net/FTP.pm 40dba553c8d44e1530daec2d07a6e50910401f2e diff --git a/perl-nroff.diff b/perl-nroff.diff index 9aede8e..4a6e94d 100644 --- a/perl-nroff.diff +++ b/perl-nroff.diff @@ -1,5 +1,7 @@ ---- ./cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm.orig 2014-06-02 14:40:44.776012754 +0000 -+++ ./cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm 2014-06-02 14:41:31.621766916 +0000 +Index: cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm +=================================================================== +--- cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm.orig ++++ cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm @@ -64,7 +64,7 @@ sub _roffer_candidates { my( $self ) = @_; diff --git a/perl-regexp-refoverflow.diff b/perl-regexp-refoverflow.diff index 48a538b..fc7111a 100644 --- a/perl-regexp-refoverflow.diff +++ b/perl-regexp-refoverflow.diff @@ -1,6 +1,8 @@ ---- ./regcomp.c.orig 2014-05-26 13:34:20.000000000 +0000 -+++ ./regcomp.c 2014-06-02 14:39:25.188429940 +0000 -@@ -10170,7 +10170,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I +Index: regcomp.c +=================================================================== +--- regcomp.c.orig ++++ regcomp.c +@@ -10742,7 +10742,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I ret = reg2Lanode(pRExC_state, GOSUB, num, RExC_recurse_count); if (!SIZE_ONLY) { diff --git a/perl-saverecontext.diff b/perl-saverecontext.diff index c69fa6a..35e2a46 100644 --- a/perl-saverecontext.diff +++ b/perl-saverecontext.diff @@ -1,6 +1,8 @@ ---- ./regcomp.c.orig 2015-05-13 22:19:30.000000000 +0200 -+++ ./regcomp.c 2015-06-02 09:01:18.881114678 +0200 -@@ -17744,8 +17744,21 @@ +Index: regcomp.c +=================================================================== +--- regcomp.c.orig ++++ regcomp.c +@@ -19613,8 +19613,21 @@ Perl_save_re_context(pTHX) if (gvp) { GV * const gv = *gvp; diff --git a/perl.changes b/perl.changes index 98538eb..4d77915 100644 --- a/perl.changes +++ b/perl.changes @@ -1,3 +1,43 @@ +------------------------------------------------------------------- +Wed May 10 13:52:26 UTC 2017 - mpluskal@suse.com + +- Fix building with zlib-1.2.10 (RT#119762): + * Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch + +------------------------------------------------------------------- +Wed May 3 13:51:56 UTC 2017 - coolo@suse.com + +- Update to perl-5.24.1 + + -Di switch is now required for PerlIO debugging output + Previously PerlIO debugging output would be sent to the file specified + by the "PERLIO_DEBUG" environment variable if perl wasn't running setuid + and the -T or -t switches hadn't been parsed yet. + + If perl performed output at a point where it hadn't yet parsed its + switches this could result in perl creating or overwriting the file + named by "PERLIO_DEBUG" even when the -T switch had been supplied. + + Perl now requires the -Di switch to produce PerlIO debugging output. By + default this is written to "stderr", but can optionally be redirected to + a file by setting the "PERLIO_DEBUG" environment variable. + + If perl is running setuid or the -T switch was supplied "PERLIO_DEBUG" + is ignored and the debugging output is sent to "stderr" as for any other + -D switch. + + Core modules and tools no longer search "." for optional modules + The tools and many modules supplied in core no longer search the default + current directory entry in @INC for optional modules. For example, + Storable will remove the final "." from @INC before trying to load + Log::Agent. + + This prevents an attacker injecting an optional module into a process + run by another user where the current directory is writable by the + attacker, e.g. the /tmp directory. + +- Refresh patches + ------------------------------------------------------------------- Sun Jun 26 08:45:05 UTC 2016 - schwab@suse.de diff --git a/perl.spec b/perl.spec index d3ac252..c4229bc 100644 --- a/perl.spec +++ b/perl.spec @@ -1,7 +1,7 @@ # # spec file for package perl # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,9 +21,9 @@ Name: perl Summary: The Perl interpreter License: Artistic-1.0 or GPL-2.0+ Group: Development/Languages/Perl -Version: 5.24.0 +Version: 5.24.1 Release: 0 -%define pversion 5.24.0 +%define pversion 5.24.1 Url: http://www.perl.org/ Source: http://www.cpan.org/src/5.0/perl-%{version}.tar.xz Source1: %name-rpmlintrc @@ -43,6 +43,8 @@ Patch9: perl-incfix.diff Patch11: perl-5.18.2-overflow.diff # PATCH-FIX-UPSTREAM Fix a warning in cop.h , upstream commit f2b9631d5d19d2b71c1776e1193173d13f3620bf Patch12: perl-avoid-warnings.patch +# PATCH-FIX-UPSTREAM RT#119762 +Patch13: Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: perl-base = %version #PreReq: %fillup_prereq @@ -185,6 +187,7 @@ cp -p %{S:3} . %patch9 %patch11 %patch12 -p1 +%patch13 %build cp -a lib savelib From 9caa36433dd2698d53bbf69801115880ab626428961b30bcbaceff45c22ec3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Fri, 19 May 2017 13:54:21 +0000 Subject: [PATCH 2/2] Accepting request 496340 from home:scarabeus_iv:branches:devel:languages:perl - Remove patch from previous commit, does not work: * Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch - Add patch taken from upstream release instead: * Compress-Raw-Zlib-2.071-zlib-1.2.11.patch OBS-URL: https://build.opensuse.org/request/show/496340 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=149 --- ...lib-2.071-Adapt-tests-to-zlib-1.2.11.patch | 45 --- Compress-Raw-Zlib-2.071-zlib-1.2.11.patch | 372 ++++++++++++++++++ perl.changes | 8 + perl.spec | 4 +- 4 files changed, 382 insertions(+), 47 deletions(-) delete mode 100644 Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch create mode 100644 Compress-Raw-Zlib-2.071-zlib-1.2.11.patch diff --git a/Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch b/Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch deleted file mode 100644 index 95d56e4..0000000 --- a/Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch +++ /dev/null @@ -1,45 +0,0 @@ -Index: cpan/Compress-Raw-Zlib/t/02zlib.t -=================================================================== ---- cpan/Compress-Raw-Zlib/t/02zlib.t.orig -+++ cpan/Compress-Raw-Zlib/t/02zlib.t -@@ -24,13 +24,13 @@ BEGIN - - my $count = 0 ; - if ($] < 5.005) { -- $count = 232 ; -+ $count = 236 ; - } - elsif ($] >= 5.006) { -- $count = 317 ; -+ $count = 320 ; - } - else { -- $count = 275 ; -+ $count = 278 ; - } - - plan tests => $count + $extra; -@@ -537,6 +537,7 @@ SKIP: - - $status = $x->deflate($hello, $Answer) ; - cmp_ok $status, '==', Z_OK ; -+ cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ; - $input .= $hello; - - # error cases -@@ -561,6 +562,7 @@ SKIP: - - $status = $x->deflate($goodbye, $Answer) ; - cmp_ok $status, '==', Z_OK ; -+ cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ; - $input .= $goodbye; - - # change only Level -@@ -572,6 +574,7 @@ SKIP: - - $status = $x->deflate($goodbye, $Answer) ; - cmp_ok $status, '==', Z_OK ; -+ cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ; - $input .= $goodbye; - - # change only Strategy diff --git a/Compress-Raw-Zlib-2.071-zlib-1.2.11.patch b/Compress-Raw-Zlib-2.071-zlib-1.2.11.patch new file mode 100644 index 0000000..d928ec7 --- /dev/null +++ b/Compress-Raw-Zlib-2.071-zlib-1.2.11.patch @@ -0,0 +1,372 @@ +Index: perl-5.24.1/cpan/Compress-Raw-Zlib/Zlib.xs +=================================================================== +--- perl-5.24.1.orig/cpan/Compress-Raw-Zlib/Zlib.xs ++++ perl-5.24.1/cpan/Compress-Raw-Zlib/Zlib.xs +@@ -74,6 +74,10 @@ + # define AT_LEAST_ZLIB_1_2_8 + #endif + ++#if defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1290 ++# define AT_LEAST_ZLIB_1_2_9 ++#endif ++ + #ifdef USE_PPPORT_H + # define NEED_sv_2pvbyte + # define NEED_sv_2pv_nolen +@@ -134,12 +138,13 @@ typedef struct di_stream { + uLong dict_adler ; + int last_error ; + bool zip_mode ; +-#define SETP_BYTE ++/* #define SETP_BYTE */ + #ifdef SETP_BYTE ++ /* SETP_BYTE only works with zlib up to 1.2.8 */ + bool deflateParams_out_valid ; + Bytef deflateParams_out_byte; + #else +-#define deflateParams_BUFFER_SIZE 0x4000 ++#define deflateParams_BUFFER_SIZE 0x40000 + uLong deflateParams_out_length; + Bytef* deflateParams_out_buffer; + #endif +@@ -636,6 +641,103 @@ char * string ; + return sv ; + } + ++#if 0 ++int ++flushToBuffer(di_stream* s, int flush) ++{ ++ dTHX; ++ int ret ; ++ z_stream * strm = &s->stream; ++ ++ Bytef* output = s->deflateParams_out_buffer ; ++ ++ strm->next_in = NULL; ++ strm->avail_in = 0; ++ ++ uLong total_output = 0; ++ uLong have = 0; ++ ++ do ++ { ++ if (output) ++ output = (unsigned char *)saferealloc(output, total_output + s->bufsize); ++ else ++ output = (unsigned char *)safemalloc(s->bufsize); ++ ++ strm->next_out = output + total_output; ++ strm->avail_out = s->bufsize; ++ ++ ret = deflate(strm, flush); /* no bad return value */ ++ //assert(ret != Z_STREAM_ERROR); /* state not clobbered */ ++ if(ret == Z_STREAM_ERROR) ++ { ++ safefree(output); ++ return ret; ++ } ++ have = s->bufsize - strm->avail_out; ++ total_output += have; ++ ++ //fprintf(stderr, "FLUSH %s %d, return %d\n", flush_flags[flush], have, ret); ++ ++ } while (strm->avail_out == 0); ++ ++ s->deflateParams_out_buffer = output; ++ s->deflateParams_out_length = total_output; ++ ++ return Z_OK; ++} ++#endif ++ ++#ifndef SETP_BYTE ++int ++flushParams(di_stream* s) ++{ ++ dTHX; ++ int ret ; ++ z_stream * strm = &s->stream; ++ ++ Bytef* output = s->deflateParams_out_buffer ; ++ uLong total_output = s->deflateParams_out_length; ++ ++ uLong have = 0; ++ ++ strm->next_in = NULL; ++ strm->avail_in = 0; ++ ++ do ++ { ++ if (output) ++ output = (unsigned char *)saferealloc(output, total_output + s->bufsize); ++ else ++ output = (unsigned char *)safemalloc(s->bufsize); ++ ++ strm->next_out = output + total_output; ++ strm->avail_out = s->bufsize; ++ ++ ret = deflateParams(&(s->stream), s->Level, s->Strategy); ++ /* fprintf(stderr, "deflateParams %d %s %lu\n", ret, ++ GetErrorString(ret), s->bufsize - strm->avail_out); */ ++ ++ if (ret == Z_STREAM_ERROR) ++ break; ++ ++ have = s->bufsize - strm->avail_out; ++ total_output += have; ++ ++ ++ } while (ret == Z_BUF_ERROR) ; ++ ++ if(ret == Z_STREAM_ERROR) ++ safefree(output); ++ else ++ { ++ s->deflateParams_out_buffer = output; ++ s->deflateParams_out_length = total_output; ++ } ++ ++ return ret; ++} ++#endif /* ! SETP_BYTE */ + + #include "constants.h" + +@@ -991,20 +1093,24 @@ deflate (s, buf, output) + /* Check for saved output from deflateParams */ + if (s->deflateParams_out_length) { + uLong plen = s->deflateParams_out_length ; +- /* printf("Copy %d bytes saved data\n", plen);*/ ++ /* printf("Copy %lu bytes saved data\n", plen); */ + if (s->stream.avail_out < plen) { +- /*printf("GROW from %d to %d\n", s->stream.avail_out, +- SvLEN(output) + plen - s->stream.avail_out); */ +- Sv_Grow(output, SvLEN(output) + plen - s->stream.avail_out) ; ++ /* printf("GROW from %d to %lu\n", s->stream.avail_out, ++ SvLEN(output) + plen - s->stream.avail_out); */ ++ s->stream.next_out = (Bytef*) Sv_Grow(output, SvLEN(output) + plen - s->stream.avail_out) ; ++ s->stream.next_out += cur_length; + } + +- Copy(s->stream.next_out, s->deflateParams_out_buffer, plen, Bytef) ; +- cur_length = cur_length + plen; ++ Copy(s->deflateParams_out_buffer, s->stream.next_out, plen, Bytef) ; ++ cur_length += plen; + SvCUR_set(output, cur_length); +- s->stream.next_out += plen ; +- s->stream.avail_out = SvLEN(output) - cur_length ; +- increment = s->stream.avail_out; +- s->deflateParams_out_length = 0; ++ s->stream.next_out += plen ; ++ s->stream.avail_out = SvLEN(output) - cur_length ; ++ increment = s->stream.avail_out; ++ ++ s->deflateParams_out_length = 0; ++ Safefree(s->deflateParams_out_buffer); ++ s->deflateParams_out_buffer = NULL; + } + #endif + RETVAL = Z_OK ; +@@ -1027,6 +1133,12 @@ deflate (s, buf, output) + } + + RETVAL = deflate(&(s->stream), Z_NO_FLUSH); ++ if (RETVAL != Z_STREAM_ERROR) { ++ int done = increment - s->stream.avail_out ; ++ /* printf("std DEFLATEr returned %d '%s' avail in %d, out %d wrote %d\n", RETVAL, ++ GetErrorString(RETVAL), s->stream.avail_in, ++s->stream.avail_out, done); */ ++ } + + if (trace) { + printf("DEFLATE returned %d %s, avail in %d, out %d\n", RETVAL, +@@ -1080,7 +1192,6 @@ flush(s, output, f=Z_FINISH) + CODE: + bufinc = s->bufsize; + +- s->stream.avail_in = 0; /* should be zero already anyway */ + + /* retrieve the output buffer */ + output = deRef_l(output, "flush") ; +@@ -1108,20 +1219,24 @@ flush(s, output, f=Z_FINISH) + /* Check for saved output from deflateParams */ + if (s->deflateParams_out_length) { + uLong plen = s->deflateParams_out_length ; +- /* printf("Copy %d bytes saved data\n", plen); */ ++ /* printf("Copy %lu bytes saved data\n", plen); */ + if (s->stream.avail_out < plen) { +- /* printf("GROW from %d to %d\n", s->stream.avail_out, ++ /* printf("GROW from %d to %lu\n", s->stream.avail_out, + SvLEN(output) + plen - s->stream.avail_out); */ +- Sv_Grow(output, SvLEN(output) + plen - s->stream.avail_out) ; ++ s->stream.next_out = (Bytef*) Sv_Grow(output, SvLEN(output) + plen - s->stream.avail_out) ; ++ s->stream.next_out += cur_length; + } + +- Copy(s->stream.next_out, s->deflateParams_out_buffer, plen, Bytef) ; +- cur_length = cur_length + plen; ++ Copy(s->deflateParams_out_buffer, s->stream.next_out, plen, Bytef) ; ++ cur_length += plen; + SvCUR_set(output, cur_length); +- s->stream.next_out += plen ; +- s->stream.avail_out = SvLEN(output) - cur_length ; +- increment = s->stream.avail_out; +- s->deflateParams_out_length = 0; ++ s->stream.next_out += plen ; ++ s->stream.avail_out = SvLEN(output) - cur_length ; ++ increment = s->stream.avail_out; ++ ++ s->deflateParams_out_length = 0; ++ Safefree(s->deflateParams_out_buffer); ++ s->deflateParams_out_buffer = NULL; + } + #endif + +@@ -1145,9 +1260,15 @@ flush(s, output, f=Z_FINISH) + } + + RETVAL = deflate(&(s->stream), f); ++ if (RETVAL != Z_STREAM_ERROR) { ++ int done = availableout - s->stream.avail_out ; ++ /* printf("flush DEFLATEr returned %d '%s' avail in %d, out %d wrote %d\n", RETVAL, ++ GetErrorString(RETVAL), s->stream.avail_in, ++s->stream.avail_out, done); */ ++ } + + if (trace) { +- printf("flush DEFLATE returned %d %s, avail in %d, out %d\n", RETVAL, ++ printf("flush DEFLATE returned %d '%s', avail in %d, out %d\n", RETVAL, + GetErrorString(RETVAL), s->stream.avail_in, s->stream.avail_out); + DispStream(s, "AFTER"); + } +@@ -1184,41 +1305,38 @@ _deflateParams(s, flags, level, strategy + int level + int strategy + uLong bufsize ++ bool changed = FALSE; + CODE: +- /* printf("_deflateParams(Flags %d Level %d Strategy %d Bufsize %d)\n", flags, level, strategy, bufsize); +- printf("Before -- Level %d, Strategy %d, Bufsize %d\n", s->Level, s->Strategy, s->bufsize); */ +- if (flags & 1) +- s->Level = level ; +- if (flags & 2) +- s->Strategy = strategy ; +- if (flags & 4) { ++ /* printf("_deflateParams(Flags %d Level %d Strategy %d Bufsize %d)\n", flags, level, strategy, bufsize); ++ printf("Before -- Level %d, Strategy %d, Bufsize %d\n", s->Level, s->Strategy, s->bufsize); */ ++ if (flags & 1 && level != s->Level) { ++ s->Level = level ; ++ changed = TRUE; ++ } ++ if (flags & 2 && strategy != s->Strategy) { ++ s->Strategy = strategy ; ++ changed = TRUE; ++ } ++ if (flags & 4) + s->bufsize = bufsize; +- } +- /* printf("After -- Level %d, Strategy %d, Bufsize %d\n", s->Level, s->Strategy, s->bufsize);*/ ++ if (changed) { + #ifdef SETP_BYTE +- s->stream.avail_in = 0; +- s->stream.next_out = &(s->deflateParams_out_byte) ; +- s->stream.avail_out = 1; +- RETVAL = deflateParams(&(s->stream), s->Level, s->Strategy); +- s->deflateParams_out_valid = +- (RETVAL == Z_OK && s->stream.avail_out == 0) ; +- /* printf("RETVAL %d, avail out %d, byte %c\n", RETVAL, s->stream.avail_out, s->deflateParams_out_byte); */ ++ s->stream.avail_in = 0; ++ s->stream.next_out = &(s->deflateParams_out_byte) ; ++ s->stream.avail_out = 1; ++ RETVAL = deflateParams(&(s->stream), s->Level, s->Strategy); ++ s->deflateParams_out_valid = ++ (RETVAL == Z_OK && s->stream.avail_out == 0) ; + #else +- /* printf("Level %d Strategy %d, Prev Len %d\n", ++ /* printf("Level %d Strategy %d, Prev Len %d\n", + s->Level, s->Strategy, s->deflateParams_out_length); */ +- s->stream.avail_in = 0; +- if (s->deflateParams_out_buffer == NULL) +- s->deflateParams_out_buffer = safemalloc(deflateParams_BUFFER_SIZE); +- s->stream.next_out = s->deflateParams_out_buffer ; +- s->stream.avail_out = deflateParams_BUFFER_SIZE; +- +- RETVAL = deflateParams(&(s->stream), s->Level, s->Strategy); +- s->deflateParams_out_length = deflateParams_BUFFER_SIZE - s->stream.avail_out; +- /* printf("RETVAL %d, length out %d, avail %d\n", +- RETVAL, s->deflateParams_out_length, s->stream.avail_out ); */ ++ RETVAL = flushParams(s); + #endif ++ } ++ else ++ RETVAL = Z_OK; + OUTPUT: +- RETVAL ++ RETVAL + + + int +Index: perl-5.24.1/cpan/Compress-Raw-Zlib/t/02zlib.t +=================================================================== +--- perl-5.24.1.orig/cpan/Compress-Raw-Zlib/t/02zlib.t ++++ perl-5.24.1/cpan/Compress-Raw-Zlib/t/02zlib.t +@@ -27,7 +27,7 @@ BEGIN + $count = 232 ; + } + elsif ($] >= 5.006) { +- $count = 317 ; ++ $count = 320 ; + } + else { + $count = 275 ; +@@ -559,6 +559,13 @@ SKIP: + is $x->get_Level(), Z_BEST_SPEED; + is $x->get_Strategy(), Z_HUFFMAN_ONLY; + ++ # change both Level & Strategy again without any calls to deflate ++ $status = $x->deflateParams(-Level => Z_DEFAULT_COMPRESSION, -Strategy => Z_DEFAULT_STRATEGY, -Bufsize => 1234) ; ++ cmp_ok $status, '==', Z_OK ; ++ ++ is $x->get_Level(), Z_DEFAULT_COMPRESSION; ++ is $x->get_Strategy(), Z_DEFAULT_STRATEGY; ++ + $status = $x->deflate($goodbye, $Answer) ; + cmp_ok $status, '==', Z_OK ; + $input .= $goodbye; +@@ -568,7 +575,7 @@ SKIP: + cmp_ok $status, '==', Z_OK ; + + is $x->get_Level(), Z_NO_COMPRESSION; +- is $x->get_Strategy(), Z_HUFFMAN_ONLY; ++ is $x->get_Strategy(), Z_DEFAULT_STRATEGY; + + $status = $x->deflate($goodbye, $Answer) ; + cmp_ok $status, '==', Z_OK ; +Index: perl-5.24.1/cpan/Compress-Raw-Zlib/t/compress/CompTestUtils.pm +=================================================================== +--- perl-5.24.1.orig/cpan/Compress-Raw-Zlib/t/compress/CompTestUtils.pm ++++ perl-5.24.1/cpan/Compress-Raw-Zlib/t/compress/CompTestUtils.pm +@@ -70,8 +70,8 @@ BEGIN { + + our ($index); + $index = '00000'; +- our ($useTempFile) = defined &File::Temp::tempdir; +- our ($useTempDir) = defined &File::Temp::newdir; ++ our ($useTempFile); ++ our ($useTempDir); + + sub new + { +Index: perl-5.24.1/cpan/Compress-Raw-Zlib/zlib-src/inflate.c +=================================================================== +--- perl-5.24.1.orig/cpan/Compress-Raw-Zlib/zlib-src/inflate.c ++++ perl-5.24.1/cpan/Compress-Raw-Zlib/zlib-src/inflate.c +@@ -1494,6 +1494,7 @@ int ZEXPORT inflateUndermine( + state->sane = !subvert; + return Z_OK; + #else ++ (void)subvert; + state->sane = 1; + return Z_DATA_ERROR; + #endif diff --git a/perl.changes b/perl.changes index 4d77915..6e8500f 100644 --- a/perl.changes +++ b/perl.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu May 18 13:36:24 UTC 2017 - tchvatal@suse.com + +- Remove patch from previous commit, does not work: + * Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch +- Add patch taken from upstream release instead: + * Compress-Raw-Zlib-2.071-zlib-1.2.11.patch + ------------------------------------------------------------------- Wed May 10 13:52:26 UTC 2017 - mpluskal@suse.com diff --git a/perl.spec b/perl.spec index c4229bc..f61566b 100644 --- a/perl.spec +++ b/perl.spec @@ -44,7 +44,7 @@ Patch11: perl-5.18.2-overflow.diff # PATCH-FIX-UPSTREAM Fix a warning in cop.h , upstream commit f2b9631d5d19d2b71c1776e1193173d13f3620bf Patch12: perl-avoid-warnings.patch # PATCH-FIX-UPSTREAM RT#119762 -Patch13: Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch +Patch13: Compress-Raw-Zlib-2.071-zlib-1.2.11.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: perl-base = %version #PreReq: %fillup_prereq @@ -187,7 +187,7 @@ cp -p %{S:3} . %patch9 %patch11 %patch12 -p1 -%patch13 +%patch13 -p1 %build cp -a lib savelib