perl/perl.patch

changeset 792
e4d1703d7593
parent 358
832ab278201b
equal deleted inserted replaced
2:2991bcd0aa90 3:8bbbcd1102c0
2 procedure forgot to create its top-level paths, too. In OpenPKG we use 2 procedure forgot to create its top-level paths, too. In OpenPKG we use
3 the "vendor" area, so make sure it is created the same way the "site" 3 the "vendor" area, so make sure it is created the same way the "site"
4 area is. 4 area is.
5 5
6 Index: installperl 6 Index: installperl
7 --- installperl.orig 2011-06-09 22:04:29.000000000 +0200 7 --- installperl.orig 2012-04-25 02:18:34.000000000 +0200
8 +++ installperl 2011-06-17 15:20:48.000000000 +0200 8 +++ installperl 2012-05-31 21:51:43.000000000 +0200
9 @@ -200,6 +200,8 @@ 9 @@ -196,6 +196,8 @@
10 my $installarchlib = "$opts{destdir}$Config{installarchlib}"; 10 my $installarchlib = "$opts{destdir}$Config{installarchlib}";
11 my $installsitelib = "$opts{destdir}$Config{installsitelib}"; 11 my $installsitelib = "$opts{destdir}$Config{installsitelib}";
12 my $installsitearch = "$opts{destdir}$Config{installsitearch}"; 12 my $installsitearch = "$opts{destdir}$Config{installsitearch}";
13 +my $installvendorlib = "$opts{destdir}$Config{installvendorlib}"; 13 +my $installvendorlib = "$opts{destdir}$Config{installvendorlib}";
14 +my $installvendorarch = "$opts{destdir}$Config{installvendorarch}"; 14 +my $installvendorarch = "$opts{destdir}$Config{installvendorarch}";
15 my $installman1dir = "$opts{destdir}$Config{installman1dir}"; 15 my $installman1dir = "$opts{destdir}$Config{installman1dir}";
16 my $man1ext = $Config{man1ext}; 16 my $man1ext = $Config{man1ext};
17 my $libperl = $Config{libperl}; 17 my $libperl = $Config{libperl};
18 @@ -349,6 +351,8 @@ 18 @@ -347,6 +349,8 @@
19 mkpath($installarchlib, $opts{verbose}, 0777); 19 mkpath($installarchlib, $opts{verbose}, 0777);
20 mkpath($installsitelib, $opts{verbose}, 0777) if ($installsitelib); 20 mkpath($installsitelib, $opts{verbose}, 0777) if ($installsitelib);
21 mkpath($installsitearch, $opts{verbose}, 0777) if ($installsitearch); 21 mkpath($installsitearch, $opts{verbose}, 0777) if ($installsitearch);
22 +mkpath($installvendorlib, $opts{verbose}, 0777) if ($installvendorlib); 22 +mkpath($installvendorlib, $opts{verbose}, 0777) if ($installvendorlib);
23 +mkpath($installvendorarch, $opts{verbose}, 0777) if ($installvendorarch); 23 +mkpath($installvendorarch, $opts{verbose}, 0777) if ($installvendorarch);
24 24
25 if (chdir "lib") { 25 if (-d 'lib') {
26 $do_installarchlib = ! samepath($installarchlib, '.'); 26 find({no_chdir => 1, wanted => \&installlib}, 'lib')
27 27
28 ----------------------------------------------------------------------------- 28 -----------------------------------------------------------------------------
29 29
30 Port to [Open]Darwin 6.6.2: 30 Port to [Open]Darwin 6.6.2:
31 31
39 3. Darwin 6 no longer accepts the non-standard "#import" statements, 39 3. Darwin 6 no longer accepts the non-standard "#import" statements,
40 so replace with "#include" and circumvent some header problem 40 so replace with "#include" and circumvent some header problem
41 related to the non-standard "__private_extern__" attribute. 41 related to the non-standard "__private_extern__" attribute.
42 42
43 Index: hints/darwin.sh 43 Index: hints/darwin.sh
44 --- hints/darwin.sh.orig 2011-06-09 22:04:29.000000000 +0200 44 --- hints/darwin.sh.orig 2012-02-20 20:48:38.000000000 +0100
45 +++ hints/darwin.sh 2011-06-17 15:20:48.000000000 +0200 45 +++ hints/darwin.sh 2012-05-31 21:51:43.000000000 +0200
46 @@ -189,8 +189,7 @@ 46 @@ -181,6 +181,20 @@
47 ldflags="${ldflags} -flat_namespace"
48 lddlflags="${ldflags} -bundle -undefined suppress"
49 ;;
50 +9.*)
51 + lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
52 + case "$ld" in
53 + *MACOSX_DEVELOPMENT_TARGET*) ;;
54 + *) ld="env MACOSX_DEPLOYMENT_TARGET=10.5 ${ld}" ;;
55 + esac
56 + ;;
57 +10.*)
58 + lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
59 + case "$ld" in
60 + *MACOSX_DEVELOPMENT_TARGET*) ;;
61 + *) ld="env MACOSX_DEPLOYMENT_TARGET=10.6 ${ld}" ;;
62 + esac
63 + ;;
64 *)
65 lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
66 case "$ld" in
67 @@ -191,8 +205,7 @@
47 esac 68 esac
48 ldlibpthname='DYLD_LIBRARY_PATH'; 69 ldlibpthname='DYLD_LIBRARY_PATH';
49 70
50 -# useshrplib=true results in much slower startup times. 71 -# useshrplib=true results in much slower startup times.
51 -# 'false' is the default value. Use Configure -Duseshrplib to override. 72 -# 'false' is the default value. Use Configure -Duseshrplib to override.
52 +useshrplib='true' 73 +useshrplib='true'
53 74
54 cat > UU/archname.cbu <<'EOCBU' 75 cat > UU/archname.cbu <<'EOCBU'
55 # This script UU/archname.cbu will get 'called-back' by Configure 76 # This script UU/archname.cbu will get 'called-back' by Configure
77 @@ -326,3 +339,6 @@
78 # makefile in the same place. Since Darwin uses GNU make, this dodges
79 # the problem.
80 firstmakefile=GNUmakefile;
81 +
82 +usenm='false'
83 +
56 Index: ext/DynaLoader/dl_dyld.xs 84 Index: ext/DynaLoader/dl_dyld.xs
57 --- ext/DynaLoader/dl_dyld.xs.orig 2011-04-13 13:36:34.000000000 +0200 85 --- ext/DynaLoader/dl_dyld.xs.orig 2012-02-15 05:44:47.000000000 +0100
58 +++ ext/DynaLoader/dl_dyld.xs 2011-06-17 15:20:48.000000000 +0200 86 +++ ext/DynaLoader/dl_dyld.xs 2012-05-31 21:51:43.000000000 +0200
59 @@ -47,7 +47,13 @@ 87 @@ -47,7 +47,13 @@
60 88
61 #undef environ 89 #undef environ
62 #undef bool 90 #undef bool
63 +#ifdef PERL_DARWIN 91 +#ifdef PERL_DARWIN
68 #import <mach-o/dyld.h> 96 #import <mach-o/dyld.h>
69 +#endif 97 +#endif
70 98
71 static char *dlerror() 99 static char *dlerror()
72 { 100 {
73 Index: perlio.c
74 --- perlio.c.orig 2011-06-09 22:04:29.000000000 +0200
75 +++ perlio.c 2011-06-17 15:20:48.000000000 +0200
76 @@ -476,7 +476,14 @@
77 #include <unistd.h>
78 #endif
79 #ifdef HAS_MMAP
80 +#ifdef PERL_DARWIN
81 +#define environ_safe environ
82 +#undef environ
83 #include <sys/mman.h>
84 +#define environ environ_safe
85 +#else
86 +#include <sys/mman.h>
87 +#endif
88 #endif
89
90 void
91 101
92 ----------------------------------------------------------------------------- 102 -----------------------------------------------------------------------------
93 103
94 Port to Tru64 5.1: 104 Port to Tru64 5.1:
95 105
98 optimization flags to ld(1). Under a brain-dead platform like Tru64 we 108 optimization flags to ld(1). Under a brain-dead platform like Tru64 we
99 really don't need any more optimization because we are already happy if 109 really don't need any more optimization because we are already happy if
100 it works at all. 110 it works at all.
101 111
102 Index: hints/dec_osf.sh 112 Index: hints/dec_osf.sh
103 --- hints/dec_osf.sh.orig 2011-06-17 02:06:09.000000000 +0200 113 --- hints/dec_osf.sh.orig 2012-04-25 02:18:34.000000000 +0200
104 +++ hints/dec_osf.sh 2011-06-17 15:20:48.000000000 +0200 114 +++ hints/dec_osf.sh 2012-05-31 21:51:43.000000000 +0200
105 @@ -73,15 +73,6 @@ 115 @@ -73,15 +73,6 @@
106 *) if $test "X$optimize" = "X$undef"; then 116 *) if $test "X$optimize" = "X$undef"; then
107 lddlflags="$lddlflags -msym" 117 lddlflags="$lddlflags -msym"
108 else 118 else
109 - case "$myosvers" in 119 - case "$myosvers" in
122 ----------------------------------------------------------------------------- 132 -----------------------------------------------------------------------------
123 133
124 Linker flag change for Solaris. 134 Linker flag change for Solaris.
125 135
126 Index: Configure 136 Index: Configure
127 --- Configure.orig 2011-06-09 22:04:29.000000000 +0200 137 --- Configure.orig 2012-04-25 02:18:30.000000000 +0200
128 +++ Configure 2011-06-17 15:20:48.000000000 +0200 138 +++ Configure 2012-05-31 21:51:44.000000000 +0200
129 @@ -8078,9 +8058,9 @@ 139 @@ -8014,9 +7994,9 @@
130 ;; 140 ;;
131 linux|irix*|gnu*) dflt="-shared $optimize" ;; 141 linux|irix*|gnu*) dflt="-shared $optimize" ;;
132 next) dflt='none' ;; 142 next) dflt='none' ;;
133 - solaris) dflt='-G' ;; 143 - solaris) dflt='-G' ;;
134 + solaris) dflt='-shared' ;; 144 + solaris) dflt='-shared' ;;
142 ----------------------------------------------------------------------------- 152 -----------------------------------------------------------------------------
143 153
144 Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) 154 Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl)
145 155
146 Index: sv.c 156 Index: sv.c
147 --- sv.c.orig 2011-06-17 02:06:09.000000000 +0200 157 --- sv.c.orig 2012-04-25 02:18:35.000000000 +0200
148 +++ sv.c 2011-06-17 15:20:48.000000000 +0200 158 +++ sv.c 2012-05-31 21:51:44.000000000 +0200
149 @@ -10198,7 +10198,10 @@ 159 @@ -10283,7 +10283,10 @@
150 if ( (width = expect_number(&q)) ) { 160 if ( (width = expect_number(&q)) ) {
151 if (*q == '$') { 161 if (*q == '$') {
152 ++q; 162 ++q;
153 - efix = width; 163 - efix = width;
154 + if (width > PERL_INT_MAX) 164 + if (width > PERL_INT_MAX)
162 ----------------------------------------------------------------------------- 172 -----------------------------------------------------------------------------
163 173
164 Do not use -fstack-protector as it causes too much portability issues. 174 Do not use -fstack-protector as it causes too much portability issues.
165 175
166 Index: Configure 176 Index: Configure
167 --- Configure.orig 2011-06-09 22:04:29.000000000 +0200 177 --- Configure.orig 2012-04-25 02:18:30.000000000 +0200
168 +++ Configure 2011-06-17 15:20:48.000000000 +0200 178 +++ Configure 2012-05-31 21:51:44.000000000 +0200
169 @@ -5158,17 +5158,6 @@ 179 @@ -5103,17 +5103,6 @@
170 ;; 180 ;;
171 esac 181 esac
172 182
173 - # on x86_64 (at least) we require an extra library (libssp) in the 183 - # on x86_64 (at least) we require an extra library (libssp) in the
174 - # link command line. This library is not named, so I infer that it is 184 - # link command line. This library is not named, so I infer that it is
182 - ;; 192 - ;;
183 - esac 193 - esac
184 ;; 194 ;;
185 esac 195 esac
186 196
187 @@ -5307,15 +5296,6 @@ 197 @@ -5252,15 +5241,6 @@
188 ;; 198 ;;
189 *) dflt="$ldflags";; 199 *) dflt="$ldflags";;
190 esac 200 esac
191 -# See note above about -fstack-protector 201 -# See note above about -fstack-protector
192 -case "$ccflags" in 202 -case "$ccflags" in
198 - ;; 208 - ;;
199 -esac 209 -esac
200 210
201 : Try to guess additional flags to pick up local libraries. 211 : Try to guess additional flags to pick up local libraries.
202 for thislibdir in $libpth; do 212 for thislibdir in $libpth; do
203 @@ -8107,14 +8087,6 @@ 213 @@ -8043,14 +8023,6 @@
204 ''|' ') dflt='none' ;; 214 ''|' ') dflt='none' ;;
205 esac 215 esac
206 216
207 - case "$ldflags" in 217 - case "$ldflags" in
208 - *-fstack-protector*) 218 - *-fstack-protector*)
219 ----------------------------------------------------------------------------- 229 -----------------------------------------------------------------------------
220 230
221 Make sure we install into <prefix>/lib/perl/ and not <prefix>/lib/perl5/ 231 Make sure we install into <prefix>/lib/perl/ and not <prefix>/lib/perl5/
222 232
223 Index: Configure 233 Index: Configure
224 --- Configure.orig 2009-08-24 18:33:49 +0200 234 --- Configure.orig 2012-04-25 02:18:30.000000000 +0200
225 +++ Configure 2009-08-24 18:44:39 +0200 235 +++ Configure 2012-05-31 21:51:44.000000000 +0200
226 @@ -1769,7 +1769,7 @@ 236 @@ -1778,7 +1778,7 @@
227 touch posthint.sh 237 touch posthint.sh
228 238
229 : set package name 239 : set package name
230 -package='perl5' 240 -package='perl5'
231 +package='perl' 241 +package='perl'
239 Multiple scripts in the perl package in Trustix Secure Linux 1.5 249 Multiple scripts in the perl package in Trustix Secure Linux 1.5
240 through 2.1, and possibly other operating systems, allows local 250 through 2.1, and possibly other operating systems, allows local
241 users to overwrite files via a symlink attack on temporary files. 251 users to overwrite files via a symlink attack on temporary files.
242 252
243 Index: cpan/CGI/lib/CGI/Cookie.pm 253 Index: cpan/CGI/lib/CGI/Cookie.pm
244 --- cpan/CGI/lib/CGI/Cookie.pm.orig 2011-06-09 22:04:29.000000000 +0200 254 --- cpan/CGI/lib/CGI/Cookie.pm.orig 2012-02-15 05:44:36.000000000 +0100
245 +++ cpan/CGI/lib/CGI/Cookie.pm 2011-06-17 15:22:59.000000000 +0200 255 +++ cpan/CGI/lib/CGI/Cookie.pm 2012-05-31 21:51:44.000000000 +0200
246 @@ -464,7 +464,7 @@ 256 @@ -464,7 +464,7 @@
247 You may also retrieve cookies that were stored in some external 257 You may also retrieve cookies that were stored in some external
248 form using the parse() class method: 258 form using the parse() class method:
249 259
250 - $COOKIES = `cat /usr/tmp/Cookie_stash`; 260 - $COOKIES = `cat /usr/tmp/Cookie_stash`;
251 + $COOKIES = `cat /var/run/www/Cookie_stash`; 261 + $COOKIES = `cat /var/run/www/Cookie_stash`;
252 %cookies = CGI::Cookie->parse($COOKIES); 262 %cookies = CGI::Cookie->parse($COOKIES);
253 263
254 If you are in a mod_perl environment, you can save some overhead by 264 If you are in a mod_perl environment, you can save some overhead by
255 Index: cpan/Shell/Shell.pm
256 --- cpan/Shell/Shell.pm.orig 2011-06-17 02:06:09.000000000 +0200
257 +++ cpan/Shell/Shell.pm 2011-06-17 15:20:48.000000000 +0200
258 @@ -153,7 +153,7 @@
259 use Shell qw(cat ps cp);
260 $passwd = cat('</etc/passwd');
261 @pslines = ps('-ww'),
262 - cp("/etc/passwd", "/tmp/passwd");
263 + cp("/etc/passwd", "/etc/passwd.orig");
264
265 # object oriented
266 my $sh = Shell->new;
267 265
268 ----------------------------------------------------------------------------- 266 -----------------------------------------------------------------------------
269 267
270 Linking against just libgdbm_compat under at least SUSE fails 268 Linking against just libgdbm_compat under at least SUSE fails
271 because it also needs libgdbm (which Perl doesn't pick up, too) 269 because it also needs libgdbm (which Perl doesn't pick up, too)
272 270
273 Index: hints/linux.sh 271 Index: hints/linux.sh
274 --- hints/linux.sh.orig 2011-06-09 22:04:29.000000000 +0200 272 --- hints/linux.sh.orig 2012-05-14 21:49:22.000000000 +0200
275 +++ hints/linux.sh 2011-06-17 15:20:48.000000000 +0200 273 +++ hints/linux.sh 2012-05-31 21:51:44.000000000 +0200
276 @@ -55,7 +55,9 @@ 274 @@ -58,7 +58,9 @@
277 libswanted="$*" 275 libswanted="$*"
278 276
279 # Debian 4.0 puts ndbm in the -lgdbm_compat library. 277 # Debian 4.0 puts ndbm in the -lgdbm_compat library.
280 -libswanted="$libswanted gdbm_compat" 278 -libswanted="$libswanted gdbm_compat"
281 +if [ -f /etc/debian_version -o -f /etc/ubuntu_version ]; then 279 +if [ -f /etc/debian_version -o -f /etc/ubuntu_version ]; then

mercurial