Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
michael@22 | 1 | By default, the "vendor" area is not used, so Perl's installation |
michael@22 | 2 | procedure forgot to create its top-level paths, too. In OpenPKG we use |
michael@22 | 3 | the "vendor" area, so make sure it is created the same way the "site" |
michael@22 | 4 | area is. |
michael@22 | 5 | |
michael@22 | 6 | Index: installperl |
michael@501 | 7 | --- installperl.orig 2012-04-25 02:18:34.000000000 +0200 |
michael@501 | 8 | +++ installperl 2012-05-31 21:51:43.000000000 +0200 |
michael@501 | 9 | @@ -196,6 +196,8 @@ |
michael@358 | 10 | my $installarchlib = "$opts{destdir}$Config{installarchlib}"; |
michael@358 | 11 | my $installsitelib = "$opts{destdir}$Config{installsitelib}"; |
michael@358 | 12 | my $installsitearch = "$opts{destdir}$Config{installsitearch}"; |
michael@358 | 13 | +my $installvendorlib = "$opts{destdir}$Config{installvendorlib}"; |
michael@358 | 14 | +my $installvendorarch = "$opts{destdir}$Config{installvendorarch}"; |
michael@358 | 15 | my $installman1dir = "$opts{destdir}$Config{installman1dir}"; |
michael@22 | 16 | my $man1ext = $Config{man1ext}; |
michael@22 | 17 | my $libperl = $Config{libperl}; |
michael@501 | 18 | @@ -347,6 +349,8 @@ |
michael@358 | 19 | mkpath($installarchlib, $opts{verbose}, 0777); |
michael@358 | 20 | mkpath($installsitelib, $opts{verbose}, 0777) if ($installsitelib); |
michael@358 | 21 | mkpath($installsitearch, $opts{verbose}, 0777) if ($installsitearch); |
michael@358 | 22 | +mkpath($installvendorlib, $opts{verbose}, 0777) if ($installvendorlib); |
michael@358 | 23 | +mkpath($installvendorarch, $opts{verbose}, 0777) if ($installvendorarch); |
michael@22 | 24 | |
michael@501 | 25 | if (-d 'lib') { |
michael@501 | 26 | find({no_chdir => 1, wanted => \&installlib}, 'lib') |
michael@22 | 27 | |
michael@22 | 28 | ----------------------------------------------------------------------------- |
michael@22 | 29 | |
michael@22 | 30 | Port to [Open]Darwin 6.6.2: |
michael@22 | 31 | |
michael@22 | 32 | 1. In OpenPKG, Perl does not use the vendor GCC and our GCC does not |
michael@22 | 33 | understand "-no-cpp-precomp", so remove this build option. |
michael@22 | 34 | |
michael@22 | 35 | 2. The <sys/mman.h> indirectly includes system specific headers |
michael@22 | 36 | which in turn have fields named "environ" while Perl uses |
michael@22 | 37 | a define of "environ" internally. So wrap the inclusion. |
michael@22 | 38 | |
michael@22 | 39 | 3. Darwin 6 no longer accepts the non-standard "#import" statements, |
michael@22 | 40 | so replace with "#include" and circumvent some header problem |
michael@22 | 41 | related to the non-standard "__private_extern__" attribute. |
michael@22 | 42 | |
michael@22 | 43 | Index: hints/darwin.sh |
michael@501 | 44 | --- hints/darwin.sh.orig 2012-02-20 20:48:38.000000000 +0100 |
michael@501 | 45 | +++ hints/darwin.sh 2012-05-31 21:51:43.000000000 +0200 |
michael@501 | 46 | @@ -181,6 +181,20 @@ |
michael@501 | 47 | ldflags="${ldflags} -flat_namespace" |
michael@501 | 48 | lddlflags="${ldflags} -bundle -undefined suppress" |
michael@501 | 49 | ;; |
michael@501 | 50 | +9.*) |
michael@501 | 51 | + lddlflags="${ldflags} -bundle -undefined dynamic_lookup" |
michael@501 | 52 | + case "$ld" in |
michael@501 | 53 | + *MACOSX_DEVELOPMENT_TARGET*) ;; |
michael@501 | 54 | + *) ld="env MACOSX_DEPLOYMENT_TARGET=10.5 ${ld}" ;; |
michael@501 | 55 | + esac |
michael@501 | 56 | + ;; |
michael@501 | 57 | +10.*) |
michael@501 | 58 | + lddlflags="${ldflags} -bundle -undefined dynamic_lookup" |
michael@501 | 59 | + case "$ld" in |
michael@501 | 60 | + *MACOSX_DEVELOPMENT_TARGET*) ;; |
michael@501 | 61 | + *) ld="env MACOSX_DEPLOYMENT_TARGET=10.6 ${ld}" ;; |
michael@501 | 62 | + esac |
michael@501 | 63 | + ;; |
michael@501 | 64 | *) |
michael@501 | 65 | lddlflags="${ldflags} -bundle -undefined dynamic_lookup" |
michael@501 | 66 | case "$ld" in |
michael@501 | 67 | @@ -191,8 +205,7 @@ |
michael@22 | 68 | esac |
michael@22 | 69 | ldlibpthname='DYLD_LIBRARY_PATH'; |
michael@22 | 70 | |
michael@22 | 71 | -# useshrplib=true results in much slower startup times. |
michael@22 | 72 | -# 'false' is the default value. Use Configure -Duseshrplib to override. |
michael@22 | 73 | +useshrplib='true' |
michael@22 | 74 | |
michael@22 | 75 | cat > UU/archname.cbu <<'EOCBU' |
michael@22 | 76 | # This script UU/archname.cbu will get 'called-back' by Configure |
michael@501 | 77 | @@ -326,3 +339,6 @@ |
michael@501 | 78 | # makefile in the same place. Since Darwin uses GNU make, this dodges |
michael@501 | 79 | # the problem. |
michael@501 | 80 | firstmakefile=GNUmakefile; |
michael@501 | 81 | + |
michael@501 | 82 | +usenm='false' |
michael@501 | 83 | + |
michael@358 | 84 | Index: ext/DynaLoader/dl_dyld.xs |
michael@501 | 85 | --- ext/DynaLoader/dl_dyld.xs.orig 2012-02-15 05:44:47.000000000 +0100 |
michael@501 | 86 | +++ ext/DynaLoader/dl_dyld.xs 2012-05-31 21:51:43.000000000 +0200 |
michael@358 | 87 | @@ -47,7 +47,13 @@ |
michael@358 | 88 | |
michael@358 | 89 | #undef environ |
michael@358 | 90 | #undef bool |
michael@358 | 91 | +#ifdef PERL_DARWIN |
michael@358 | 92 | +#define __private_extern__ extern |
michael@358 | 93 | +#include <mach-o/dyld.h> |
michael@358 | 94 | +#undef __private_extern__ |
michael@358 | 95 | +#else |
michael@358 | 96 | #import <mach-o/dyld.h> |
michael@358 | 97 | +#endif |
michael@358 | 98 | |
michael@358 | 99 | static char *dlerror() |
michael@358 | 100 | { |
michael@22 | 101 | |
michael@22 | 102 | ----------------------------------------------------------------------------- |
michael@22 | 103 | |
michael@22 | 104 | Port to Tru64 5.1: |
michael@22 | 105 | |
michael@22 | 106 | Under Tru64 our gcc has to be built without binutils and the system |
michael@22 | 107 | ld(1) does not accept a "-O" option, so remove the whole passing of |
michael@22 | 108 | optimization flags to ld(1). Under a brain-dead platform like Tru64 we |
michael@22 | 109 | really don't need any more optimization because we are already happy if |
michael@22 | 110 | it works at all. |
michael@22 | 111 | |
michael@22 | 112 | Index: hints/dec_osf.sh |
michael@501 | 113 | --- hints/dec_osf.sh.orig 2012-04-25 02:18:34.000000000 +0200 |
michael@501 | 114 | +++ hints/dec_osf.sh 2012-05-31 21:51:43.000000000 +0200 |
michael@22 | 115 | @@ -73,15 +73,6 @@ |
michael@22 | 116 | *) if $test "X$optimize" = "X$undef"; then |
michael@22 | 117 | lddlflags="$lddlflags -msym" |
michael@22 | 118 | else |
michael@22 | 119 | - case "$myosvers" in |
michael@22 | 120 | - *4.0D*) |
michael@22 | 121 | - # QAR 56761: -O4 + .so may produce broken code, |
michael@22 | 122 | - # fixed in 4.0E or better. |
michael@22 | 123 | - ;; |
michael@22 | 124 | - *) |
michael@22 | 125 | - lddlflags="$lddlflags $optimize" |
michael@22 | 126 | - ;; |
michael@22 | 127 | - esac |
michael@22 | 128 | # -msym: If using a sufficiently recent /sbin/loader, |
michael@22 | 129 | # keep the module symbols with the modules. |
michael@22 | 130 | lddlflags="$lddlflags -msym $_lddlflags_strict_ansi" |
michael@22 | 131 | |
michael@22 | 132 | ----------------------------------------------------------------------------- |
michael@22 | 133 | |
michael@358 | 134 | Linker flag change for Solaris. |
michael@22 | 135 | |
michael@22 | 136 | Index: Configure |
michael@501 | 137 | --- Configure.orig 2012-04-25 02:18:30.000000000 +0200 |
michael@501 | 138 | +++ Configure 2012-05-31 21:51:44.000000000 +0200 |
michael@501 | 139 | @@ -8014,9 +7994,9 @@ |
michael@22 | 140 | ;; |
michael@22 | 141 | linux|irix*|gnu*) dflt="-shared $optimize" ;; |
michael@22 | 142 | next) dflt='none' ;; |
michael@22 | 143 | - solaris) dflt='-G' ;; |
michael@22 | 144 | + solaris) dflt='-shared' ;; |
michael@22 | 145 | sunos) dflt='-assert nodefinitions' ;; |
michael@358 | 146 | - svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; |
michael@358 | 147 | + svr4*|esix*|nonstopux) dflt="-shared $ldflags" ;; |
michael@22 | 148 | *) dflt='none' ;; |
michael@358 | 149 | esac |
michael@358 | 150 | ;; |
michael@22 | 151 | |
michael@22 | 152 | ----------------------------------------------------------------------------- |
michael@22 | 153 | |
michael@22 | 154 | Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) |
michael@22 | 155 | |
michael@22 | 156 | Index: sv.c |
michael@501 | 157 | --- sv.c.orig 2012-04-25 02:18:35.000000000 +0200 |
michael@501 | 158 | +++ sv.c 2012-05-31 21:51:44.000000000 +0200 |
michael@501 | 159 | @@ -10283,7 +10283,10 @@ |
michael@22 | 160 | if ( (width = expect_number(&q)) ) { |
michael@22 | 161 | if (*q == '$') { |
michael@22 | 162 | ++q; |
michael@22 | 163 | - efix = width; |
michael@22 | 164 | + if (width > PERL_INT_MAX) |
michael@22 | 165 | + efix = PERL_INT_MAX; |
michael@22 | 166 | + else |
michael@22 | 167 | + efix = width; |
michael@22 | 168 | } else { |
michael@22 | 169 | goto gotwidth; |
michael@22 | 170 | } |
michael@22 | 171 | |
michael@22 | 172 | ----------------------------------------------------------------------------- |
michael@22 | 173 | |
michael@358 | 174 | Do not use -fstack-protector as it causes too much portability issues. |
michael@22 | 175 | |
michael@358 | 176 | Index: Configure |
michael@501 | 177 | --- Configure.orig 2012-04-25 02:18:30.000000000 +0200 |
michael@501 | 178 | +++ Configure 2012-05-31 21:51:44.000000000 +0200 |
michael@501 | 179 | @@ -5103,17 +5103,6 @@ |
michael@358 | 180 | ;; |
michael@358 | 181 | esac |
michael@358 | 182 | |
michael@358 | 183 | - # on x86_64 (at least) we require an extra library (libssp) in the |
michael@358 | 184 | - # link command line. This library is not named, so I infer that it is |
michael@358 | 185 | - # an implementation detail that may change. Hence the safest approach |
michael@358 | 186 | - # is to add the flag to the flags passed to the compiler at link time, |
michael@358 | 187 | - # as that way the compiler can do the right implementation dependant |
michael@358 | 188 | - # thing. (NWC) |
michael@358 | 189 | - case "$gccversion" in |
michael@358 | 190 | - ?*) set stack-protector -fstack-protector |
michael@358 | 191 | - eval $checkccflag |
michael@358 | 192 | - ;; |
michael@358 | 193 | - esac |
michael@22 | 194 | ;; |
michael@22 | 195 | esac |
michael@358 | 196 | |
michael@501 | 197 | @@ -5252,15 +5241,6 @@ |
michael@358 | 198 | ;; |
michael@358 | 199 | *) dflt="$ldflags";; |
michael@358 | 200 | esac |
michael@358 | 201 | -# See note above about -fstack-protector |
michael@358 | 202 | -case "$ccflags" in |
michael@358 | 203 | -*-fstack-protector*) |
michael@358 | 204 | - case "$dflt" in |
michael@358 | 205 | - *-fstack-protector*) ;; # Don't add it again |
michael@358 | 206 | - *) dflt="$dflt -fstack-protector" ;; |
michael@358 | 207 | - esac |
michael@358 | 208 | - ;; |
michael@358 | 209 | -esac |
michael@358 | 210 | |
michael@358 | 211 | : Try to guess additional flags to pick up local libraries. |
michael@358 | 212 | for thislibdir in $libpth; do |
michael@501 | 213 | @@ -8043,14 +8023,6 @@ |
michael@358 | 214 | ''|' ') dflt='none' ;; |
michael@358 | 215 | esac |
michael@358 | 216 | |
michael@358 | 217 | - case "$ldflags" in |
michael@358 | 218 | - *-fstack-protector*) |
michael@358 | 219 | - case "$dflt" in |
michael@358 | 220 | - *-fstack-protector*) ;; # Don't add it again |
michael@358 | 221 | - *) dflt="$dflt -fstack-protector" ;; |
michael@358 | 222 | - esac |
michael@358 | 223 | - ;; |
michael@358 | 224 | - esac |
michael@358 | 225 | |
michael@358 | 226 | |
michael@358 | 227 | rp="Any special flags to pass to $ld to create a dynamically loaded library?" |
michael@22 | 228 | |
michael@23 | 229 | ----------------------------------------------------------------------------- |
michael@23 | 230 | |
michael@358 | 231 | Make sure we install into <prefix>/lib/perl/ and not <prefix>/lib/perl5/ |
michael@23 | 232 | |
michael@358 | 233 | Index: Configure |
michael@501 | 234 | --- Configure.orig 2012-04-25 02:18:30.000000000 +0200 |
michael@501 | 235 | +++ Configure 2012-05-31 21:51:44.000000000 +0200 |
michael@501 | 236 | @@ -1778,7 +1778,7 @@ |
michael@358 | 237 | touch posthint.sh |
michael@23 | 238 | |
michael@358 | 239 | : set package name |
michael@358 | 240 | -package='perl5' |
michael@358 | 241 | +package='perl' |
michael@358 | 242 | first=`echo $package | sed -e 's/^\(.\).*/\1/'` |
michael@358 | 243 | last=`echo $package | sed -e 's/^.\(.*\)/\1/'` |
michael@358 | 244 | case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in |
michael@358 | 245 | |
michael@358 | 246 | ----------------------------------------------------------------------------- |
michael@23 | 247 | |
michael@358 | 248 | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0976 |
michael@358 | 249 | Multiple scripts in the perl package in Trustix Secure Linux 1.5 |
michael@358 | 250 | through 2.1, and possibly other operating systems, allows local |
michael@358 | 251 | users to overwrite files via a symlink attack on temporary files. |
michael@358 | 252 | |
michael@358 | 253 | Index: cpan/CGI/lib/CGI/Cookie.pm |
michael@501 | 254 | --- cpan/CGI/lib/CGI/Cookie.pm.orig 2012-02-15 05:44:36.000000000 +0100 |
michael@501 | 255 | +++ cpan/CGI/lib/CGI/Cookie.pm 2012-05-31 21:51:44.000000000 +0200 |
michael@358 | 256 | @@ -464,7 +464,7 @@ |
michael@358 | 257 | You may also retrieve cookies that were stored in some external |
michael@358 | 258 | form using the parse() class method: |
michael@358 | 259 | |
michael@358 | 260 | - $COOKIES = `cat /usr/tmp/Cookie_stash`; |
michael@358 | 261 | + $COOKIES = `cat /var/run/www/Cookie_stash`; |
michael@358 | 262 | %cookies = CGI::Cookie->parse($COOKIES); |
michael@358 | 263 | |
michael@358 | 264 | If you are in a mod_perl environment, you can save some overhead by |
michael@358 | 265 | |
michael@358 | 266 | ----------------------------------------------------------------------------- |
michael@358 | 267 | |
michael@358 | 268 | Linking against just libgdbm_compat under at least SUSE fails |
michael@358 | 269 | because it also needs libgdbm (which Perl doesn't pick up, too) |
michael@358 | 270 | |
michael@358 | 271 | Index: hints/linux.sh |
michael@501 | 272 | --- hints/linux.sh.orig 2012-05-14 21:49:22.000000000 +0200 |
michael@501 | 273 | +++ hints/linux.sh 2012-05-31 21:51:44.000000000 +0200 |
michael@501 | 274 | @@ -58,7 +58,9 @@ |
michael@358 | 275 | libswanted="$*" |
michael@358 | 276 | |
michael@358 | 277 | # Debian 4.0 puts ndbm in the -lgdbm_compat library. |
michael@358 | 278 | -libswanted="$libswanted gdbm_compat" |
michael@358 | 279 | +if [ -f /etc/debian_version -o -f /etc/ubuntu_version ]; then |
michael@358 | 280 | + libswanted="$libswanted gdbm_compat" |
michael@358 | 281 | +fi |
michael@358 | 282 | |
michael@358 | 283 | # If you have glibc, then report the version for ./myconfig bug reporting. |
michael@358 | 284 | # (Configure doesn't need to know the specific version since it just uses |
michael@358 | 285 |