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@22: --- installperl.orig 2007-12-18 11:47:07 +0100 michael@22: +++ installperl 2008-03-28 15:23:47 +0100 michael@22: @@ -211,6 +211,8 @@ michael@22: my $installarchlib = "$destdir$Config{installarchlib}"; michael@22: my $installsitelib = "$destdir$Config{installsitelib}"; michael@22: my $installsitearch = "$destdir$Config{installsitearch}"; michael@22: +my $installvendorlib = "$destdir$Config{installvendorlib}"; michael@22: +my $installvendorarch = "$destdir$Config{installvendorarch}"; michael@22: my $installman1dir = "$destdir$Config{installman1dir}"; michael@22: my $man1ext = $Config{man1ext}; michael@22: my $libperl = $Config{libperl}; michael@22: @@ -372,6 +374,8 @@ michael@22: mkpath($installarchlib, $verbose, 0777); michael@22: mkpath($installsitelib, $verbose, 0777) if ($installsitelib); michael@22: mkpath($installsitearch, $verbose, 0777) if ($installsitearch); michael@22: +mkpath($installvendorlib, $verbose, 0777) if ($installvendorlib); michael@22: +mkpath($installvendorarch, $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: By default, the Perl module search order is "use lib, -I, PERL[5]LIB, michael@22: perl, site, vendor, other". This means that in OpenPKG both the modules michael@22: installed via CPAN shell (in "site" area) and the "perl-xxx" packages michael@22: (in "vendor" area) cannot override the (sometimes obsoleted) module michael@22: versions distributed with Perl (in "perl" area). Hence, we change michael@22: the search order to a more reasonable one for OpenPKG: "use lib, -I, michael@22: PERL[5]LIB, site, vendor, perl, other". michael@22: michael@22: Index: perl.c michael@22: --- perl.c.orig 2007-12-18 11:47:08 +0100 michael@22: +++ perl.c 2008-03-28 15:23:47 +0100 michael@22: @@ -4753,39 +4753,6 @@ michael@22: incpush(APPLLIB_EXP, TRUE, TRUE, TRUE, TRUE); michael@22: #endif michael@22: michael@22: -#ifdef ARCHLIB_EXP michael@22: - incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); michael@22: -#endif michael@22: -#ifdef MACOS_TRADITIONAL michael@22: - { michael@22: - Stat_t tmpstatbuf; michael@22: - SV * privdir = newSV(0); michael@22: - char * macperl = PerlEnv_getenv("MACPERL"); michael@22: - michael@22: - if (!macperl) michael@22: - macperl = ""; michael@22: - michael@22: - Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); michael@22: - if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) michael@22: - incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); michael@22: - Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); michael@22: - if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) michael@22: - incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); michael@22: - michael@22: - SvREFCNT_dec(privdir); michael@22: - } michael@22: - if (!PL_tainting) michael@22: - incpush(":", FALSE, FALSE, TRUE, FALSE); michael@22: -#else michael@22: -#ifndef PRIVLIB_EXP michael@22: -# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" michael@22: -#endif michael@22: -#if defined(WIN32) michael@22: - incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); michael@22: -#else michael@22: - incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); michael@22: -#endif michael@22: - michael@22: #ifdef SITEARCH_EXP michael@22: /* sitearch is always relative to sitelib on Windows for michael@22: * DLL-based path intuition to work correctly */ michael@22: @@ -4828,6 +4795,39 @@ michael@22: incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE, TRUE); michael@22: #endif michael@22: michael@22: +#ifdef ARCHLIB_EXP michael@22: + incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE, TRUE); michael@22: +#endif michael@22: +#ifdef MACOS_TRADITIONAL michael@22: + { michael@22: + Stat_t tmpstatbuf; michael@22: + SV * privdir = newSV(0); michael@22: + char * macperl = PerlEnv_getenv("MACPERL"); michael@22: + michael@22: + if (!macperl) michael@22: + macperl = ""; michael@22: + michael@22: + Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); michael@22: + if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) michael@22: + incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); michael@22: + Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); michael@22: + if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) michael@22: + incpush(SvPVX(privdir), TRUE, FALSE, TRUE, FALSE); michael@22: + michael@22: + SvREFCNT_dec(privdir); michael@22: + } michael@22: + if (!PL_tainting) michael@22: + incpush(":", FALSE, FALSE, TRUE, FALSE); michael@22: +#else michael@22: +#ifndef PRIVLIB_EXP michael@22: +# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" michael@22: +#endif michael@22: +#if defined(WIN32) michael@22: + incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE, TRUE); michael@22: +#else michael@22: + incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE, TRUE); michael@22: +#endif michael@22: + michael@22: #ifdef PERL_OTHERLIBDIRS michael@22: incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE, TRUE); michael@22: #endif 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@22: --- hints/darwin.sh.orig 2007-12-18 11:47:07 +0100 michael@22: +++ hints/darwin.sh 2008-03-28 15:23:47 +0100 michael@22: @@ -120,9 +120,6 @@ michael@22: *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;; michael@22: esac michael@22: michael@22: -# Avoid Apple's cpp precompiler, better for extensions michael@22: -cppflags="${cppflags} -no-cpp-precomp" michael@22: - michael@22: # This is necessary because perl's build system doesn't michael@22: # apply cppflags to cc compile lines as it should. michael@22: ccflags="${ccflags} ${cppflags}" michael@22: @@ -182,8 +179,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@22: Index: perlio.c michael@22: --- perlio.c.orig 2007-12-18 11:47:08 +0100 michael@22: +++ perlio.c 2008-03-28 15:23:47 +0100 michael@22: @@ -472,7 +472,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: Index: ext/DynaLoader/dl_dyld.xs michael@22: --- ext/DynaLoader/dl_dyld.xs.orig 2007-12-18 11:47:07 +0100 michael@22: +++ ext/DynaLoader/dl_dyld.xs 2008-03-28 15:23:47 +0100 michael@22: @@ -45,7 +45,13 @@ michael@22: michael@22: #undef environ michael@22: #undef bool michael@22: +#ifdef PERL_DARWIN michael@22: +#define __private_extern__ extern michael@22: +#include michael@22: +#undef __private_extern__ michael@22: +#else michael@22: #import michael@22: +#endif michael@22: michael@22: static char *dlerror() michael@22: { 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@22: --- hints/dec_osf.sh.orig 2007-12-18 11:47:07 +0100 michael@22: +++ hints/dec_osf.sh 2008-03-28 15:23:47 +0100 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@22: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0976 michael@22: Multiple scripts in the perl package in Trustix Secure Linux 1.5 michael@22: through 2.1, and possibly other operating systems, allows local michael@22: users to overwrite files via a symlink attack on temporary files. michael@22: michael@22: Index: lib/CGI/Cookie.pm michael@22: --- lib/CGI/Cookie.pm.orig 2007-12-18 11:47:07 +0100 michael@22: +++ lib/CGI/Cookie.pm 2008-03-28 15:23:47 +0100 michael@22: @@ -470,7 +470,7 @@ michael@22: You may also retrieve cookies that were stored in some external michael@22: form using the parse() class method: michael@22: michael@22: - $COOKIES = `cat /usr/tmp/Cookie_stash`; michael@22: + $COOKIES = `cat /var/run/www/Cookie_stash`; michael@22: %cookies = parse CGI::Cookie($COOKIES); michael@22: michael@22: If you are in a mod_perl environment, you can save some overhead by michael@22: Index: lib/Shell.pm michael@22: --- lib/Shell.pm.orig 2007-12-18 11:47:07 +0100 michael@22: +++ lib/Shell.pm 2008-03-28 15:23:47 +0100 michael@22: @@ -151,7 +151,7 @@ michael@22: use Shell qw(cat ps cp); michael@22: $passwd = cat('new; michael@22: michael@22: ----------------------------------------------------------------------------- michael@22: michael@22: Index: Configure michael@22: --- Configure.orig 2007-12-18 11:47:07 +0100 michael@22: +++ Configure 2008-03-28 15:23:47 +0100 michael@22: @@ -7871,7 +7871,7 @@ 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@22: svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; michael@22: *) dflt='none' ;; 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@22: --- sv.c.orig 2007-12-18 11:47:08 +0100 michael@22: +++ sv.c 2008-03-28 15:23:47 +0100 michael@22: @@ -8667,7 +8667,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@22: Detect NetBSD 5.x as well michael@22: michael@22: Index: hints/netbsd.sh michael@22: --- hints/netbsd.sh.orig 2007-12-18 11:47:07.000000000 +0100 michael@22: +++ hints/netbsd.sh 2008-12-24 10:51:08.000000000 +0100 michael@22: @@ -79,7 +79,7 @@ michael@22: ;; michael@22: esac michael@22: case "$osvers" in michael@22: -0.9*|1.*|2.*|3.*|4.*) michael@22: +0.9*|1.*|2.*|3.*|4.*|5.*) michael@22: d_getprotoent_r="$undef" michael@22: d_getprotobyname_r="$undef" michael@22: d_getprotobynumber_r="$undef" michael@22: