# HG changeset patch # User Michael Schloh von Bennewitz # Date 1316107769 -7200 # Node ID 832ab278201b480816d1394f94395aa5203d8487 # Parent cce1eb91ccfc74da1fc88e6b25398e0d6ef692ce Resynchronize with upstream package maintainer version. diff -r cce1eb91ccfc -r 832ab278201b perl/perl.patch --- a/perl/perl.patch Thu Sep 15 17:11:15 2011 +0200 +++ b/perl/perl.patch Thu Sep 15 19:29:29 2011 +0200 @@ -4,123 +4,29 @@ area is. Index: installperl ---- installperl.orig 2007-12-18 11:47:07 +0100 -+++ installperl 2008-03-28 15:23:47 +0100 -@@ -211,6 +211,8 @@ - my $installarchlib = "$destdir$Config{installarchlib}"; - my $installsitelib = "$destdir$Config{installsitelib}"; - my $installsitearch = "$destdir$Config{installsitearch}"; -+my $installvendorlib = "$destdir$Config{installvendorlib}"; -+my $installvendorarch = "$destdir$Config{installvendorarch}"; - my $installman1dir = "$destdir$Config{installman1dir}"; +--- installperl.orig 2011-06-09 22:04:29.000000000 +0200 ++++ installperl 2011-06-17 15:20:48.000000000 +0200 +@@ -200,6 +200,8 @@ + my $installarchlib = "$opts{destdir}$Config{installarchlib}"; + my $installsitelib = "$opts{destdir}$Config{installsitelib}"; + my $installsitearch = "$opts{destdir}$Config{installsitearch}"; ++my $installvendorlib = "$opts{destdir}$Config{installvendorlib}"; ++my $installvendorarch = "$opts{destdir}$Config{installvendorarch}"; + my $installman1dir = "$opts{destdir}$Config{installman1dir}"; my $man1ext = $Config{man1ext}; my $libperl = $Config{libperl}; -@@ -372,6 +374,8 @@ - mkpath($installarchlib, $verbose, 0777); - mkpath($installsitelib, $verbose, 0777) if ($installsitelib); - mkpath($installsitearch, $verbose, 0777) if ($installsitearch); -+mkpath($installvendorlib, $verbose, 0777) if ($installvendorlib); -+mkpath($installvendorarch, $verbose, 0777) if ($installvendorarch); +@@ -349,6 +351,8 @@ + mkpath($installarchlib, $opts{verbose}, 0777); + mkpath($installsitelib, $opts{verbose}, 0777) if ($installsitelib); + mkpath($installsitearch, $opts{verbose}, 0777) if ($installsitearch); ++mkpath($installvendorlib, $opts{verbose}, 0777) if ($installvendorlib); ++mkpath($installvendorarch, $opts{verbose}, 0777) if ($installvendorarch); if (chdir "lib") { $do_installarchlib = ! samepath($installarchlib, '.'); ----------------------------------------------------------------------------- -By default, the Perl module search order is "use lib, -I, PERL[5]LIB, -perl, site, vendor, other". This means that in OpenPKG both the modules -installed via CPAN shell (in "site" area) and the "perl-xxx" packages -(in "vendor" area) cannot override the (sometimes obsoleted) module -versions distributed with Perl (in "perl" area). Hence, we change -the search order to a more reasonable one for OpenPKG: "use lib, -I, -PERL[5]LIB, site, vendor, perl, other". - -Index: perl.c ---- perl.c.orig 2007-12-18 11:47:08 +0100 -+++ perl.c 2008-03-28 15:23:47 +0100 -@@ -4753,39 +4753,6 @@ - incpush(APPLLIB_EXP, TRUE, TRUE, TRUE, TRUE); - #endif - --#ifdef ARCHLIB_EXP -- incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); --#endif --#ifdef MACOS_TRADITIONAL -- { -- Stat_t tmpstatbuf; -- SV * privdir = newSV(0); -- char * macperl = PerlEnv_getenv("MACPERL"); -- -- if (!macperl) -- macperl = ""; -- -- Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); -- if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) -- incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); -- Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); -- if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) -- incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); -- -- SvREFCNT_dec(privdir); -- } -- if (!PL_tainting) -- incpush(":", FALSE, FALSE, TRUE, FALSE); --#else --#ifndef PRIVLIB_EXP --# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" --#endif --#if defined(WIN32) -- incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); --#else -- incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); --#endif -- - #ifdef SITEARCH_EXP - /* sitearch is always relative to sitelib on Windows for - * DLL-based path intuition to work correctly */ -@@ -4828,6 +4795,39 @@ - incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE, TRUE); - #endif - -+#ifdef ARCHLIB_EXP -+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); -+#endif -+#ifdef MACOS_TRADITIONAL -+ { -+ Stat_t tmpstatbuf; -+ SV * privdir = newSV(0); -+ char * macperl = PerlEnv_getenv("MACPERL"); -+ -+ if (!macperl) -+ macperl = ""; -+ -+ Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); -+ if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) -+ incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); -+ Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); -+ if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) -+ incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); -+ -+ SvREFCNT_dec(privdir); -+ } -+ if (!PL_tainting) -+ incpush(":", FALSE, FALSE, TRUE, FALSE); -+#else -+#ifndef PRIVLIB_EXP -+# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" -+#endif -+#if defined(WIN32) -+ incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); -+#else -+ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); -+#endif -+ - #ifdef PERL_OTHERLIBDIRS - incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE, TRUE); - #endif - ------------------------------------------------------------------------------ - Port to [Open]Darwin 6.6.2: 1. In OpenPKG, Perl does not use the vendor GCC and our GCC does not @@ -135,19 +41,9 @@ related to the non-standard "__private_extern__" attribute. Index: hints/darwin.sh ---- hints/darwin.sh.orig 2007-12-18 11:47:07 +0100 -+++ hints/darwin.sh 2008-03-28 15:23:47 +0100 -@@ -120,9 +120,6 @@ - *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;; - esac - --# Avoid Apple's cpp precompiler, better for extensions --cppflags="${cppflags} -no-cpp-precomp" -- - # This is necessary because perl's build system doesn't - # apply cppflags to cc compile lines as it should. - ccflags="${ccflags} ${cppflags}" -@@ -182,8 +179,7 @@ +--- hints/darwin.sh.orig 2011-06-09 22:04:29.000000000 +0200 ++++ hints/darwin.sh 2011-06-17 15:20:48.000000000 +0200 +@@ -189,8 +189,7 @@ esac ldlibpthname='DYLD_LIBRARY_PATH'; @@ -157,10 +53,27 @@ cat > UU/archname.cbu <<'EOCBU' # This script UU/archname.cbu will get 'called-back' by Configure +Index: ext/DynaLoader/dl_dyld.xs +--- ext/DynaLoader/dl_dyld.xs.orig 2011-04-13 13:36:34.000000000 +0200 ++++ ext/DynaLoader/dl_dyld.xs 2011-06-17 15:20:48.000000000 +0200 +@@ -47,7 +47,13 @@ + + #undef environ + #undef bool ++#ifdef PERL_DARWIN ++#define __private_extern__ extern ++#include ++#undef __private_extern__ ++#else + #import ++#endif + + static char *dlerror() + { Index: perlio.c ---- perlio.c.orig 2007-12-18 11:47:08 +0100 -+++ perlio.c 2008-03-28 15:23:47 +0100 -@@ -472,7 +472,14 @@ +--- perlio.c.orig 2011-06-09 22:04:29.000000000 +0200 ++++ perlio.c 2011-06-17 15:20:48.000000000 +0200 +@@ -476,7 +476,14 @@ #include #endif #ifdef HAS_MMAP @@ -175,23 +88,6 @@ #endif void -Index: ext/DynaLoader/dl_dyld.xs ---- ext/DynaLoader/dl_dyld.xs.orig 2007-12-18 11:47:07 +0100 -+++ ext/DynaLoader/dl_dyld.xs 2008-03-28 15:23:47 +0100 -@@ -45,7 +45,13 @@ - - #undef environ - #undef bool -+#ifdef PERL_DARWIN -+#define __private_extern__ extern -+#include -+#undef __private_extern__ -+#else - #import -+#endif - - static char *dlerror() - { ----------------------------------------------------------------------------- @@ -204,8 +100,8 @@ it works at all. Index: hints/dec_osf.sh ---- hints/dec_osf.sh.orig 2007-12-18 11:47:07 +0100 -+++ hints/dec_osf.sh 2008-03-28 15:23:47 +0100 +--- hints/dec_osf.sh.orig 2011-06-17 02:06:09.000000000 +0200 ++++ hints/dec_osf.sh 2011-06-17 15:20:48.000000000 +0200 @@ -73,15 +73,6 @@ *) if $test "X$optimize" = "X$undef"; then lddlflags="$lddlflags -msym" @@ -225,59 +121,32 @@ ----------------------------------------------------------------------------- -http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0976 - Multiple scripts in the perl package in Trustix Secure Linux 1.5 - through 2.1, and possibly other operating systems, allows local - users to overwrite files via a symlink attack on temporary files. - -Index: lib/CGI/Cookie.pm ---- lib/CGI/Cookie.pm.orig 2007-12-18 11:47:07 +0100 -+++ lib/CGI/Cookie.pm 2008-03-28 15:23:47 +0100 -@@ -470,7 +470,7 @@ - You may also retrieve cookies that were stored in some external - form using the parse() class method: - -- $COOKIES = `cat /usr/tmp/Cookie_stash`; -+ $COOKIES = `cat /var/run/www/Cookie_stash`; - %cookies = parse CGI::Cookie($COOKIES); - - If you are in a mod_perl environment, you can save some overhead by -Index: lib/Shell.pm ---- lib/Shell.pm.orig 2007-12-18 11:47:07 +0100 -+++ lib/Shell.pm 2008-03-28 15:23:47 +0100 -@@ -151,7 +151,7 @@ - use Shell qw(cat ps cp); - $passwd = cat('new; - ------------------------------------------------------------------------------ +Linker flag change for Solaris. Index: Configure ---- Configure.orig 2007-12-18 11:47:07 +0100 -+++ Configure 2008-03-28 15:23:47 +0100 -@@ -7871,7 +7871,7 @@ +--- Configure.orig 2011-06-09 22:04:29.000000000 +0200 ++++ Configure 2011-06-17 15:20:48.000000000 +0200 +@@ -8078,9 +8058,9 @@ ;; linux|irix*|gnu*) dflt="-shared $optimize" ;; next) dflt='none' ;; - solaris) dflt='-G' ;; + solaris) dflt='-shared' ;; sunos) dflt='-assert nodefinitions' ;; - svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; +- svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; ++ svr4*|esix*|nonstopux) dflt="-shared $ldflags" ;; *) dflt='none' ;; + esac + ;; ----------------------------------------------------------------------------- Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) Index: sv.c ---- sv.c.orig 2007-12-18 11:47:08 +0100 -+++ sv.c 2008-03-28 15:23:47 +0100 -@@ -8667,7 +8667,10 @@ +--- sv.c.orig 2011-06-17 02:06:09.000000000 +0200 ++++ sv.c 2011-06-17 15:20:48.000000000 +0200 +@@ -10198,7 +10198,10 @@ if ( (width = expect_number(&q)) ) { if (*q == '$') { ++q; @@ -292,34 +161,127 @@ ----------------------------------------------------------------------------- -Detect NetBSD 5.x as well +Do not use -fstack-protector as it causes too much portability issues. -Index: hints/netbsd.sh ---- hints/netbsd.sh.orig 2007-12-18 11:47:07.000000000 +0100 -+++ hints/netbsd.sh 2008-12-24 10:51:08.000000000 +0100 -@@ -79,7 +79,7 @@ +Index: Configure +--- Configure.orig 2011-06-09 22:04:29.000000000 +0200 ++++ Configure 2011-06-17 15:20:48.000000000 +0200 +@@ -5158,17 +5158,6 @@ + ;; + esac + +- # on x86_64 (at least) we require an extra library (libssp) in the +- # link command line. This library is not named, so I infer that it is +- # an implementation detail that may change. Hence the safest approach +- # is to add the flag to the flags passed to the compiler at link time, +- # as that way the compiler can do the right implementation dependant +- # thing. (NWC) +- case "$gccversion" in +- ?*) set stack-protector -fstack-protector +- eval $checkccflag +- ;; +- esac ;; esac - case "$osvers" in --0.9*|1.*|2.*|3.*|4.*) -+0.9*|1.*|2.*|3.*|4.*|5.*) - d_getprotoent_r="$undef" - d_getprotobyname_r="$undef" - d_getprotobynumber_r="$undef" + +@@ -5307,15 +5296,6 @@ + ;; + *) dflt="$ldflags";; + esac +-# See note above about -fstack-protector +-case "$ccflags" in +-*-fstack-protector*) +- case "$dflt" in +- *-fstack-protector*) ;; # Don't add it again +- *) dflt="$dflt -fstack-protector" ;; +- esac +- ;; +-esac + + : Try to guess additional flags to pick up local libraries. + for thislibdir in $libpth; do +@@ -8107,14 +8087,6 @@ + ''|' ') dflt='none' ;; + esac + +- case "$ldflags" in +- *-fstack-protector*) +- case "$dflt" in +- *-fstack-protector*) ;; # Don't add it again +- *) dflt="$dflt -fstack-protector" ;; +- esac +- ;; +- esac + + + rp="Any special flags to pass to $ld to create a dynamically loaded library?" ----------------------------------------------------------------------------- -Corrections for Solaris 11: +Make sure we install into /lib/perl/ and not /lib/perl5/ -Index: perl.h -diff -Nau perl.h.orig perl.h ---- perl.h.orig 2007-12-18 11:47:08.000000000 +0100 -+++ perl.h 2009-01-06 15:28:45.843276063 +0100 -@@ -1393,6 +1393,7 @@ - */ +Index: Configure +--- Configure.orig 2009-08-24 18:33:49 +0200 ++++ Configure 2009-08-24 18:44:39 +0200 +@@ -1769,7 +1769,7 @@ + touch posthint.sh - #if defined(I_SYSMODE) && !defined(PERL_MICRO) -+#include - #include - #endif + : set package name +-package='perl5' ++package='perl' + first=`echo $package | sed -e 's/^\(.\).*/\1/'` + last=`echo $package | sed -e 's/^.\(.*\)/\1/'` + case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in + +----------------------------------------------------------------------------- +http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0976 + Multiple scripts in the perl package in Trustix Secure Linux 1.5 + through 2.1, and possibly other operating systems, allows local + users to overwrite files via a symlink attack on temporary files. + +Index: cpan/CGI/lib/CGI/Cookie.pm +--- cpan/CGI/lib/CGI/Cookie.pm.orig 2011-06-09 22:04:29.000000000 +0200 ++++ cpan/CGI/lib/CGI/Cookie.pm 2011-06-17 15:22:59.000000000 +0200 +@@ -464,7 +464,7 @@ + You may also retrieve cookies that were stored in some external + form using the parse() class method: + +- $COOKIES = `cat /usr/tmp/Cookie_stash`; ++ $COOKIES = `cat /var/run/www/Cookie_stash`; + %cookies = CGI::Cookie->parse($COOKIES); + + If you are in a mod_perl environment, you can save some overhead by +Index: cpan/Shell/Shell.pm +--- cpan/Shell/Shell.pm.orig 2011-06-17 02:06:09.000000000 +0200 ++++ cpan/Shell/Shell.pm 2011-06-17 15:20:48.000000000 +0200 +@@ -153,7 +153,7 @@ + use Shell qw(cat ps cp); + $passwd = cat('new; + +----------------------------------------------------------------------------- + +Linking against just libgdbm_compat under at least SUSE fails +because it also needs libgdbm (which Perl doesn't pick up, too) + +Index: hints/linux.sh +--- hints/linux.sh.orig 2011-06-09 22:04:29.000000000 +0200 ++++ hints/linux.sh 2011-06-17 15:20:48.000000000 +0200 +@@ -55,7 +55,9 @@ + libswanted="$*" + + # Debian 4.0 puts ndbm in the -lgdbm_compat library. +-libswanted="$libswanted gdbm_compat" ++if [ -f /etc/debian_version -o -f /etc/ubuntu_version ]; then ++ libswanted="$libswanted gdbm_compat" ++fi + + # If you have glibc, then report the version for ./myconfig bug reporting. + # (Configure doesn't need to know the specific version since it just uses + diff -r cce1eb91ccfc -r 832ab278201b perl/perl.spec --- a/perl/perl.spec Thu Sep 15 17:11:15 2011 +0200 +++ b/perl/perl.spec Thu Sep 15 19:29:29 2011 +0200 @@ -1,6 +1,6 @@ ## ## perl.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## Copyright (c) 2000-2011 OpenPKG Foundation e.V. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -31,20 +31,16 @@ Class: CORE Group: Perl License: GPL/Artistic -Version: 5.10.0 -Release: 20090106 +Version: 5.14.1 +Release: 20110618 # list of sources -Source0: ftp://ftp.cpan.org/pub/CPAN/src/perl-%{version}.tar.gz +Source0: http://www.cpan.org/src/perl-%{version}.tar.gz Patch0: perl.patch # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20040130, gcc -PreReq: OpenPKG, openpkg >= 20040130 -AutoReq: no -AutoReqProv: no +BuildPreReq: OpenPKG, openpkg >= 20100101, gcc +PreReq: OpenPKG, openpkg >= 20100101 %description Perl ("Practical Reporting and Extraction Language") is a very @@ -55,8 +51,8 @@ %track prog perl = { version = %{version} - url = ftp://ftp.cpan.org/pub/CPAN/src/ - regex = perl-(5\.10\.\d+)\.tar\.gz + url = http://www.cpan.org/src/ + regex = perl-(5\.(?:[02468]|1[02468])\.\d+)\.tar\.gz } %prep @@ -119,7 +115,6 @@ %{l_make} %{l_mflags} -f Makefile %install - rm -rf $RPM_BUILD_ROOT # install the Perl package via standard procedure %{l_make} %{l_mflags} -f Makefile install DESTDIR=$RPM_BUILD_ROOT @@ -185,12 +180,17 @@ # resolve file conflicts (with perl-locale) rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/enc2xs \ - $RPM_BUILD_ROOT%{l_prefix}/bin/piconv + $RPM_BUILD_ROOT%{l_prefix}/bin/piconv \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/enc2xs.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/piconv.1 # resolve file conflicts (with perl-module) rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/corelist \ $RPM_BUILD_ROOT%{l_prefix}/bin/config_data \ - $RPM_BUILD_ROOT%{l_prefix}/man/man1/config_data.1 + $RPM_BUILD_ROOT%{l_prefix}/man/man1/config_data.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/corelist.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/cpan.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/instmodsh.1 # resolve file conflicts (with perl-sys) rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ptar \ @@ -208,5 +208,4 @@ %files -f files %clean - rm -rf $RPM_BUILD_ROOT