SHA256
1
0
forked from pool/perl

- update to perl-5.18.1

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=101
This commit is contained in:
Michael Schröder 2013-09-03 16:08:31 +00:00 committed by Git OBS Bridge
parent 9b96f2328e
commit eb7ba19c1d
6 changed files with 205 additions and 8 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e56698de4ad3e3d54e8ed25d2e91ddffd6758c32b72a0de89c38a763e2f783b7
size 17323206

3
perl-5.18.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:655e11a8ffba8853efcdce568a142c232600ed120ac24aaebb4e6efe74e85b2b
size 17337400

40
perl-incfix.diff Normal file
View File

@ -0,0 +1,40 @@
--- 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)
# endif
#endif
+#if 0
#ifdef PERL_OTHERLIBDIRS
S_incpush_use_sep(aTHX_ STR_WITH_LEN(PERL_OTHERLIBDIRS),
INCPUSH_ADD_VERSIONED_SUB_DIRS|INCPUSH_NOT_BASEDIR
|INCPUSH_CAN_RELOCATE);
#endif
+#endif
if (!TAINTING_get) {
#ifndef VMS
@@ -4469,20 +4471,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),
- INCPUSH_ADD_OLD_VERS|INCPUSH_CAN_RELOCATE);
+ INCPUSH_ADD_OLD_VERS|INCPUSH_NOT_BASEDIR|INCPUSH_CAN_RELOCATE);
#endif
#if defined(PERL_VENDORLIB_STEM) && defined(PERL_INC_VERSION_LIST)
/* Search for version-specific dirs below here */
S_incpush_use_sep(aTHX_ STR_WITH_LEN(PERL_VENDORLIB_STEM),
- INCPUSH_ADD_OLD_VERS|INCPUSH_CAN_RELOCATE);
+ INCPUSH_ADD_OLD_VERS|INCPUSH_NOT_BASEDIR|INCPUSH_CAN_RELOCATE);
#endif
#ifdef PERL_OTHERLIBDIRS
S_incpush_use_sep(aTHX_ STR_WITH_LEN(PERL_OTHERLIBDIRS),
- INCPUSH_ADD_OLD_VERS|INCPUSH_ADD_ARCHONLY_SUB_DIRS
- |INCPUSH_CAN_RELOCATE);
+ INCPUSH_CAN_RELOCATE);
#endif
#endif /* !PERL_IS_MINIPERL */

127
perl-reg89.diff Normal file
View File

@ -0,0 +1,127 @@
--- ./regcomp.c.orig 2013-09-03 14:34:06.277801336 +0000
+++ ./regcomp.c 2013-09-03 14:34:38.600801279 +0000
@@ -10643,7 +10643,7 @@ tryagain:
if (num < 1)
vFAIL("Reference to nonexistent or unclosed group");
}
- if (!isg && (num < 0 || (num > 9 && num >= RExC_npar)))
+ if (!isg && num > 9 && num >= RExC_npar && *RExC_parse != '8' && *RExC_parse != '9')
/* Probably a character specified in octal, e.g. \35 */
goto defchar;
else {
@@ -10920,10 +10920,28 @@ tryagain:
p++;
ender = grok_bslash_c(*p++, UTF, SIZE_ONLY);
break;
- case '0': case '1': case '2': case '3':case '4':
+ case '8': case '9': /* must be a backreference */
+ --p;
+ goto loopdone;
+ case '1': case '2': case '3':case '4':
case '5': case '6': case '7':
- if (*p == '0' ||
- (isDIGIT(p[1]) && (U32)atoi(p) >= (U32)RExC_npar))
+ /* When we parse backslash escapes there is ambiguity between
+ * backreferences and octal escapes. Any escape from \1 - \9 is
+ * a backreference, any multi-digit escape which does not start with
+ * 0 and which when evaluated as decimal could refer to an already
+ * parsed capture buffer is a backslash. Anything else is octal.
+ *
+ * Note this implies that \118 could be interpreted as 118 OR as
+ * "\11" . "8" depending on whether there were 118 capture buffers
+ * defined already in the pattern.
+ */
+ if ( !isDIGIT(p[1]) || atoi(p) <= RExC_npar )
+ { /* Not to be treated as an octal constant, go
+ find backref */
+ --p;
+ goto loopdone;
+ }
+ case '0':
{
I32 flags = PERL_SCAN_SILENT_ILLDIGIT;
STRLEN numlen = 3;
@@ -10942,11 +10960,6 @@ tryagain:
form_short_octal_warning(p, numlen));
}
}
- else { /* Not to be treated as an octal constant, go
- find backref */
- --p;
- goto loopdone;
- }
if (PL_encoding && ender < 0x100)
goto recode_encoding;
break;
--- ./t/re/pat.t.orig 2013-09-03 14:34:06.277801336 +0000
+++ ./t/re/pat.t 2013-09-03 14:34:13.645801323 +0000
@@ -20,7 +20,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 472; # Update this when adding/deleting tests.
+plan tests => 572; # Update this when adding/deleting tests.
run_tests() unless caller;
@@ -1380,6 +1380,23 @@ EOP
is ($s, 'XXcdXXX&', 'RT #119125 with /x');
}
+ {
+ # if we have 87 capture buffers defined then \87 should refer to the 87th.
+ # test that this is true for 1..100
+ my $str= "aa";
+ for my $i (1..100) {
+ my $pat= "a";
+ $pat= "($pat)" for 1 .. $i;
+ $pat.="\\$i";
+ eval {
+ ok($str=~/$pat/,"\\$i works with $i buffers");
+ 1;
+ } or do {
+ ok(0,"\\$i works with $i buffers");
+ };
+ }
+ }
+
} # End of sub run_tests
1;
--- ./t/re/re_tests.orig 2013-09-03 14:34:06.277801336 +0000
+++ ./t/re/re_tests 2013-09-03 14:34:13.646801323 +0000
@@ -1487,9 +1487,9 @@ abc\N{def - c - \\N{NAME} must be resolv
[a\o{1000}] \x{200} y $& \x{200}
# The below were inserting a NULL
-\87 87 y $& 87
-a\87 a87 y $& a87
-a\97 a97 y $& a97
+\87 87 c - Reference to nonexistent group in regex
+a\87 a87 c - Reference to nonexistent group in regex
+a\97 a97 c - Reference to nonexistent group in regex
# The below was inserting a NULL into the character class.
--- ./t/re/reg_mesg.t.orig 2013-09-03 14:34:06.277801336 +0000
+++ ./t/re/reg_mesg.t 2013-09-03 14:34:13.646801323 +0000
@@ -174,6 +174,9 @@ my @death =
'm/[\o]/' => 'Missing braces on \o{} {#} m/[\o{#}]/',
'm/[\o{}]/' => 'Number with no digits {#} m/[\o{}{#}]/',
'm/(?^-i:foo)/' => 'Sequence (?^-...) not recognized {#} m/(?^-{#}i:foo)/',
+ 'm/\87/' => 'Reference to nonexistent group {#} m/\87{#}/',
+ 'm/a\87/' => 'Reference to nonexistent group {#} m/a\87{#}/',
+ 'm/a\97/' => 'Reference to nonexistent group {#} m/a\97{#}/',
);
# Tests involving a user-defined charnames translator are in pat_advanced.t
@@ -200,9 +203,6 @@ my @warning = (
'/\018/' => '\'\018\' resolved to \'\o{1}8\' {#} m/\018{#}/',
'/[\08]/' => '\'\08\' resolved to \'\o{0}8\' {#} m/[\08{#}]/',
'/[\018]/' => '\'\018\' resolved to \'\o{1}8\' {#} m/[\018{#}]/',
- '/\87/' => 'Unrecognized escape \8 passed through {#} m/\8{#}7/',
- '/a\87/' => 'Unrecognized escape \8 passed through {#} m/a\8{#}7/',
- '/a\97/' => 'Unrecognized escape \9 passed through {#} m/a\9{#}7/',
'/(?=a)*/' => '(?=a)* matches null string many times {#} m/(?=a)*{#}/',
'my $x = \'\m\'; qr/a$x/' => 'Unrecognized escape \m passed through {#} m/a\m{#}/',
'/\q/' => 'Unrecognized escape \q passed through {#} m/\q{#}/',

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Tue Sep 3 15:30:23 CEST 2013 - mls@suse.de
- update to perl-5.18.1
* B has been upgraded from 1.42 to 1.42_01
* Digest::SHA has been upgraded from 5.84 to 5.84_01
* Module::CoreList has been upgraded from 2.89 to 2.96
* A number of memory leaks in regexp have been plugged
* The debugger's man command been fixed
* @_ is now correctly visible in the debugger
* Lexical constants no longer crash when inlined
* Deep recursion warnings no longer crash lexical subroutines
- backport backref fix from upstream
- fix INC containing directories multiple times
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 8 14:51:42 UTC 2013 - dvaleev@suse.com Thu Aug 8 14:51:42 UTC 2013 - dvaleev@suse.com

View File

@ -21,9 +21,9 @@ Name: perl
Summary: The Perl interpreter Summary: The Perl interpreter
License: Artistic-1.0 or GPL-2.0+ License: Artistic-1.0 or GPL-2.0+
Group: Development/Languages/Perl Group: Development/Languages/Perl
Version: 5.18.0 Version: 5.18.1
Release: 0 Release: 0
%define pversion 5.18.0 %define pversion 5.18.1
Url: http://www.perl.org/ Url: http://www.perl.org/
Source: http://www.cpan.org/src/5.0/perl-%{version}.tar.gz Source: http://www.cpan.org/src/5.0/perl-%{version}.tar.gz
Source1: %name-rpmlintrc Source1: %name-rpmlintrc
@ -39,6 +39,8 @@ Patch5: perl-HiRes.t-timeout.diff
Patch6: perl-saverecontext.diff Patch6: perl-saverecontext.diff
Patch7: perl-db6.diff Patch7: perl-db6.diff
Patch8: skip_time_hires.patch Patch8: skip_time_hires.patch
Patch9: perl-reg89.diff
Patch10: perl-incfix.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: perl-base = %version PreReq: perl-base = %version
#PreReq: %fillup_prereq #PreReq: %fillup_prereq
@ -56,6 +58,8 @@ Provides: perl = %pversion-%release
Provides: perl-500 Provides: perl-500
Provides: perl-Filter-Simple Provides: perl-Filter-Simple
Provides: perl(:MODULE_COMPAT_%pversion) Provides: perl(:MODULE_COMPAT_%pversion)
%global versionlist 5.18.0
Provides: perl(:MODULE_COMPAT_5.18.0)
Obsoletes: perl-Filter-Simple Obsoletes: perl-Filter-Simple
Provides: perl-I18N-LangTags Provides: perl-I18N-LangTags
Obsoletes: perl-I18N-LangTags Obsoletes: perl-I18N-LangTags
@ -169,6 +173,8 @@ cp -p %{S:3} .
%ifarch ppc ppc64 %ifarch ppc ppc64
%patch8 -p1 %patch8 -p1
%endif %endif
%patch9
%patch10
%build %build
cp -a lib savelib cp -a lib savelib
@ -184,9 +190,18 @@ options="-Doptimize='$RPM_OPT_FLAGS -Wall -pipe -mieee'"
%ifarch ppc ppc64 %ifarch ppc ppc64
options="$options -Duse64bitint" options="$options -Duse64bitint"
%endif %endif
# this needs an installed perl, sorry
archname=%(perl -V:archname | sed "s!.*='!!;s!'.*!!")
test -n "$archname"
versionlist=
for v in %{?versionlist} ; do
test "$v" == none || versionlist="$versionlist $v/$archname $v"
done
test -n "$versionlist" || versionlist=none
versionlist=${versionlist# }
# always use glibc's setenv # always use glibc's setenv
options="$options -Accflags='-DPERL_USE_SAFE_PUTENV'" options="$options -Accflags='-DPERL_USE_SAFE_PUTENV'"
options="$options -Dotherlibdirs=/usr/lib/perl5/site_perl -Dinc_version_list=none" options="$options -Dotherlibdirs=/usr/lib/perl5/site_perl -Dinc_version_list='$versionlist'"
chmod 755 ./configure.gnu chmod 755 ./configure.gnu
./configure.gnu --prefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Dd_dbm_open -Duseshrplib=\'true\' $options ./configure.gnu --prefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Dd_dbm_open -Duseshrplib=\'true\' $options
make %{?_smp_mflags} make %{?_smp_mflags}
@ -245,8 +260,8 @@ rm $RPM_BUILD_ROOT/usr/lib/perl5/*/*/CORE/libperl.a
#touch $cpa/perllocal.pod #touch $cpa/perllocal.pod
# test CVE-2007-5116 # test CVE-2007-5116
$RPM_BUILD_ROOT/usr/bin/perl -e '$r=chr(128)."\\x{100}";/$r/' $RPM_BUILD_ROOT/usr/bin/perl -e '$r=chr(128)."\\x{100}";/$r/'
# test perl-regexp-refoverflow.diff # test perl-regexp-refoverflow.diff, should not crash or hang
$RPM_BUILD_ROOT/usr/bin/perl -e '/\6666666666/' $RPM_BUILD_ROOT/usr/bin/perl -e 'eval "/\\6666666666/"'
%if 0 %if 0
# remove unrelated target/os manpages # remove unrelated target/os manpages
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlaix.1* rm $RPM_BUILD_ROOT/usr/share/man/man1/perlaix.1*