michael@22: By default, the "vendor" area is not used, so Perl's installation michael@22: procedure forgot to create its top-level paths, too. In OpenPKG we use michael@22: the "vendor" area, so make sure it is created the same way the "site" michael@22: area is. michael@22: michael@22: Index: installperl michael@358: --- installperl.orig 2011-06-09 22:04:29.000000000 +0200 michael@358: +++ installperl 2011-06-17 15:20:48.000000000 +0200 michael@358: @@ -200,6 +200,8 @@ michael@358: my $installarchlib = "$opts{destdir}$Config{installarchlib}"; michael@358: my $installsitelib = "$opts{destdir}$Config{installsitelib}"; michael@358: my $installsitearch = "$opts{destdir}$Config{installsitearch}"; michael@358: +my $installvendorlib = "$opts{destdir}$Config{installvendorlib}"; michael@358: +my $installvendorarch = "$opts{destdir}$Config{installvendorarch}"; michael@358: my $installman1dir = "$opts{destdir}$Config{installman1dir}"; michael@22: my $man1ext = $Config{man1ext}; michael@22: my $libperl = $Config{libperl}; michael@358: @@ -349,6 +351,8 @@ michael@358: mkpath($installarchlib, $opts{verbose}, 0777); michael@358: mkpath($installsitelib, $opts{verbose}, 0777) if ($installsitelib); michael@358: mkpath($installsitearch, $opts{verbose}, 0777) if ($installsitearch); michael@358: +mkpath($installvendorlib, $opts{verbose}, 0777) if ($installvendorlib); michael@358: +mkpath($installvendorarch, $opts{verbose}, 0777) if ($installvendorarch); michael@22: michael@22: if (chdir "lib") { michael@22: $do_installarchlib = ! samepath($installarchlib, '.'); michael@22: michael@22: ----------------------------------------------------------------------------- michael@22: michael@22: Port to [Open]Darwin 6.6.2: michael@22: michael@22: 1. In OpenPKG, Perl does not use the vendor GCC and our GCC does not michael@22: understand "-no-cpp-precomp", so remove this build option. michael@22: michael@22: 2. The indirectly includes system specific headers michael@22: which in turn have fields named "environ" while Perl uses michael@22: a define of "environ" internally. So wrap the inclusion. michael@22: michael@22: 3. Darwin 6 no longer accepts the non-standard "#import" statements, michael@22: so replace with "#include" and circumvent some header problem michael@22: related to the non-standard "__private_extern__" attribute. michael@22: michael@22: Index: hints/darwin.sh michael@358: --- hints/darwin.sh.orig 2011-06-09 22:04:29.000000000 +0200 michael@358: +++ hints/darwin.sh 2011-06-17 15:20:48.000000000 +0200 michael@358: @@ -189,8 +189,7 @@ michael@22: esac michael@22: ldlibpthname='DYLD_LIBRARY_PATH'; michael@22: michael@22: -# useshrplib=true results in much slower startup times. michael@22: -# 'false' is the default value. Use Configure -Duseshrplib to override. michael@22: +useshrplib='true' michael@22: michael@22: cat > UU/archname.cbu <<'EOCBU' michael@22: # This script UU/archname.cbu will get 'called-back' by Configure michael@358: Index: ext/DynaLoader/dl_dyld.xs michael@358: --- ext/DynaLoader/dl_dyld.xs.orig 2011-04-13 13:36:34.000000000 +0200 michael@358: +++ ext/DynaLoader/dl_dyld.xs 2011-06-17 15:20:48.000000000 +0200 michael@358: @@ -47,7 +47,13 @@ michael@358: michael@358: #undef environ michael@358: #undef bool michael@358: +#ifdef PERL_DARWIN michael@358: +#define __private_extern__ extern michael@358: +#include michael@358: +#undef __private_extern__ michael@358: +#else michael@358: #import michael@358: +#endif michael@358: michael@358: static char *dlerror() michael@358: { michael@22: Index: perlio.c michael@358: --- perlio.c.orig 2011-06-09 22:04:29.000000000 +0200 michael@358: +++ perlio.c 2011-06-17 15:20:48.000000000 +0200 michael@358: @@ -476,7 +476,14 @@ michael@22: #include michael@22: #endif michael@22: #ifdef HAS_MMAP michael@22: +#ifdef PERL_DARWIN michael@22: +#define environ_safe environ michael@22: +#undef environ michael@22: #include michael@22: +#define environ environ_safe michael@22: +#else michael@22: +#include michael@22: +#endif michael@22: #endif michael@22: michael@22: void michael@22: michael@22: ----------------------------------------------------------------------------- michael@22: michael@22: Port to Tru64 5.1: michael@22: michael@22: Under Tru64 our gcc has to be built without binutils and the system michael@22: ld(1) does not accept a "-O" option, so remove the whole passing of michael@22: optimization flags to ld(1). Under a brain-dead platform like Tru64 we michael@22: really don't need any more optimization because we are already happy if michael@22: it works at all. michael@22: michael@22: Index: hints/dec_osf.sh michael@358: --- hints/dec_osf.sh.orig 2011-06-17 02:06:09.000000000 +0200 michael@358: +++ hints/dec_osf.sh 2011-06-17 15:20:48.000000000 +0200 michael@22: @@ -73,15 +73,6 @@ michael@22: *) if $test "X$optimize" = "X$undef"; then michael@22: lddlflags="$lddlflags -msym" michael@22: else michael@22: - case "$myosvers" in michael@22: - *4.0D*) michael@22: - # QAR 56761: -O4 + .so may produce broken code, michael@22: - # fixed in 4.0E or better. michael@22: - ;; michael@22: - *) michael@22: - lddlflags="$lddlflags $optimize" michael@22: - ;; michael@22: - esac michael@22: # -msym: If using a sufficiently recent /sbin/loader, michael@22: # keep the module symbols with the modules. michael@22: lddlflags="$lddlflags -msym $_lddlflags_strict_ansi" michael@22: michael@22: ----------------------------------------------------------------------------- michael@22: michael@358: Linker flag change for Solaris. michael@22: michael@22: Index: Configure michael@358: --- Configure.orig 2011-06-09 22:04:29.000000000 +0200 michael@358: +++ Configure 2011-06-17 15:20:48.000000000 +0200 michael@358: @@ -8078,9 +8058,9 @@ michael@22: ;; michael@22: linux|irix*|gnu*) dflt="-shared $optimize" ;; michael@22: next) dflt='none' ;; michael@22: - solaris) dflt='-G' ;; michael@22: + solaris) dflt='-shared' ;; michael@22: sunos) dflt='-assert nodefinitions' ;; michael@358: - svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; michael@358: + svr4*|esix*|nonstopux) dflt="-shared $ldflags" ;; michael@22: *) dflt='none' ;; michael@358: esac michael@358: ;; michael@22: michael@22: ----------------------------------------------------------------------------- michael@22: michael@22: Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) michael@22: michael@22: Index: sv.c michael@358: --- sv.c.orig 2011-06-17 02:06:09.000000000 +0200 michael@358: +++ sv.c 2011-06-17 15:20:48.000000000 +0200 michael@358: @@ -10198,7 +10198,10 @@ michael@22: if ( (width = expect_number(&q)) ) { michael@22: if (*q == '$') { michael@22: ++q; michael@22: - efix = width; michael@22: + if (width > PERL_INT_MAX) michael@22: + efix = PERL_INT_MAX; michael@22: + else michael@22: + efix = width; michael@22: } else { michael@22: goto gotwidth; michael@22: } michael@22: michael@22: ----------------------------------------------------------------------------- michael@22: michael@358: Do not use -fstack-protector as it causes too much portability issues. michael@22: michael@358: Index: Configure michael@358: --- Configure.orig 2011-06-09 22:04:29.000000000 +0200 michael@358: +++ Configure 2011-06-17 15:20:48.000000000 +0200 michael@358: @@ -5158,17 +5158,6 @@ michael@358: ;; michael@358: esac michael@358: michael@358: - # on x86_64 (at least) we require an extra library (libssp) in the michael@358: - # link command line. This library is not named, so I infer that it is michael@358: - # an implementation detail that may change. Hence the safest approach michael@358: - # is to add the flag to the flags passed to the compiler at link time, michael@358: - # as that way the compiler can do the right implementation dependant michael@358: - # thing. (NWC) michael@358: - case "$gccversion" in michael@358: - ?*) set stack-protector -fstack-protector michael@358: - eval $checkccflag michael@358: - ;; michael@358: - esac michael@22: ;; michael@22: esac michael@358: michael@358: @@ -5307,15 +5296,6 @@ michael@358: ;; michael@358: *) dflt="$ldflags";; michael@358: esac michael@358: -# See note above about -fstack-protector michael@358: -case "$ccflags" in michael@358: -*-fstack-protector*) michael@358: - case "$dflt" in michael@358: - *-fstack-protector*) ;; # Don't add it again michael@358: - *) dflt="$dflt -fstack-protector" ;; michael@358: - esac michael@358: - ;; michael@358: -esac michael@358: michael@358: : Try to guess additional flags to pick up local libraries. michael@358: for thislibdir in $libpth; do michael@358: @@ -8107,14 +8087,6 @@ michael@358: ''|' ') dflt='none' ;; michael@358: esac michael@358: michael@358: - case "$ldflags" in michael@358: - *-fstack-protector*) michael@358: - case "$dflt" in michael@358: - *-fstack-protector*) ;; # Don't add it again michael@358: - *) dflt="$dflt -fstack-protector" ;; michael@358: - esac michael@358: - ;; michael@358: - esac michael@358: michael@358: michael@358: rp="Any special flags to pass to $ld to create a dynamically loaded library?" michael@22: michael@23: ----------------------------------------------------------------------------- michael@23: michael@358: Make sure we install into /lib/perl/ and not /lib/perl5/ michael@23: michael@358: Index: Configure michael@358: --- Configure.orig 2009-08-24 18:33:49 +0200 michael@358: +++ Configure 2009-08-24 18:44:39 +0200 michael@358: @@ -1769,7 +1769,7 @@ michael@358: touch posthint.sh michael@23: michael@358: : set package name michael@358: -package='perl5' michael@358: +package='perl' michael@358: first=`echo $package | sed -e 's/^\(.\).*/\1/'` michael@358: last=`echo $package | sed -e 's/^.\(.*\)/\1/'` michael@358: case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in michael@358: michael@358: ----------------------------------------------------------------------------- michael@23: michael@358: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0976 michael@358: Multiple scripts in the perl package in Trustix Secure Linux 1.5 michael@358: through 2.1, and possibly other operating systems, allows local michael@358: users to overwrite files via a symlink attack on temporary files. michael@358: michael@358: Index: cpan/CGI/lib/CGI/Cookie.pm michael@358: --- cpan/CGI/lib/CGI/Cookie.pm.orig 2011-06-09 22:04:29.000000000 +0200 michael@358: +++ cpan/CGI/lib/CGI/Cookie.pm 2011-06-17 15:22:59.000000000 +0200 michael@358: @@ -464,7 +464,7 @@ michael@358: You may also retrieve cookies that were stored in some external michael@358: form using the parse() class method: michael@358: michael@358: - $COOKIES = `cat /usr/tmp/Cookie_stash`; michael@358: + $COOKIES = `cat /var/run/www/Cookie_stash`; michael@358: %cookies = CGI::Cookie->parse($COOKIES); michael@358: michael@358: If you are in a mod_perl environment, you can save some overhead by michael@358: Index: cpan/Shell/Shell.pm michael@358: --- cpan/Shell/Shell.pm.orig 2011-06-17 02:06:09.000000000 +0200 michael@358: +++ cpan/Shell/Shell.pm 2011-06-17 15:20:48.000000000 +0200 michael@358: @@ -153,7 +153,7 @@ michael@358: use Shell qw(cat ps cp); michael@358: $passwd = cat('new; michael@358: michael@358: ----------------------------------------------------------------------------- michael@358: michael@358: Linking against just libgdbm_compat under at least SUSE fails michael@358: because it also needs libgdbm (which Perl doesn't pick up, too) michael@358: michael@358: Index: hints/linux.sh michael@358: --- hints/linux.sh.orig 2011-06-09 22:04:29.000000000 +0200 michael@358: +++ hints/linux.sh 2011-06-17 15:20:48.000000000 +0200 michael@358: @@ -55,7 +55,9 @@ michael@358: libswanted="$*" michael@358: michael@358: # Debian 4.0 puts ndbm in the -lgdbm_compat library. michael@358: -libswanted="$libswanted gdbm_compat" michael@358: +if [ -f /etc/debian_version -o -f /etc/ubuntu_version ]; then michael@358: + libswanted="$libswanted gdbm_compat" michael@358: +fi michael@358: michael@358: # If you have glibc, then report the version for ./myconfig bug reporting. michael@358: # (Configure doesn't need to know the specific version since it just uses michael@358: