Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-perl/SpeedyCGI/files: SpeedyCGI-2.22-apache-docs.patch SpeedyCGI-2.22-speedy_unsafe_putenv.patch SpeedyCGI-2.22-uninit-crash.patch SpeedyCGI-2.22-strip-backend-libs.patch SpeedyCGI-2.22-perl5.10.patch SpeedyCGI-2.22-apache2.2.patch SpeedyCGI-2.22-perl_sys_init.patch SpeedyCGI-2.22-test-timeout.patch SpeedyCGI-2.22-strerror.patch SpeedyCGI-2.22-makefile-manpage.patch SpeedyCGI-2.22-empty-param.patch
Date: Mon, 29 Mar 2010 14:59:18
Message-Id: E1NwGQs-0000rF-SU@stork.gentoo.org
1 pva 10/03/29 14:59:14
2
3 Added: SpeedyCGI-2.22-apache-docs.patch
4 SpeedyCGI-2.22-speedy_unsafe_putenv.patch
5 SpeedyCGI-2.22-uninit-crash.patch
6 SpeedyCGI-2.22-strip-backend-libs.patch
7 SpeedyCGI-2.22-perl5.10.patch
8 SpeedyCGI-2.22-apache2.2.patch
9 SpeedyCGI-2.22-perl_sys_init.patch
10 SpeedyCGI-2.22-test-timeout.patch
11 SpeedyCGI-2.22-strerror.patch
12 SpeedyCGI-2.22-makefile-manpage.patch
13 SpeedyCGI-2.22-empty-param.patch
14 Log:
15 Added debian patchset, fixes #299978 thank Diego E. 'Flameeyes' Pettenò for report.
16 (Portage version: 2.2_rc67/cvs/Linux x86_64)
17
18 Revision Changes Path
19 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache-docs.patch
20
21 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache-docs.patch?rev=1.1&view=markup
22 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache-docs.patch?rev=1.1&content-type=text/plain
23
24 Index: SpeedyCGI-2.22-apache-docs.patch
25 ===================================================================
26 Author: Niko Tyni <ntyni@×××.fi>
27 Description: Documentation for bug #204461.
28 --- a/src/SpeedyCGI.src
29 +++ b/src/SpeedyCGI.src
30 @@ -250,6 +250,13 @@
31 be Speedy followed by the option name. For example to set the
32 Timeout option, use the apache directive SpeedyTimeout.
33
34 +Note that these variables are global. There is currently no way to run
35 +different scripts with different SpeedyCGI options when they are run
36 +from the Apache module. Any <Directory> or <Location> contexts
37 +have no effect on the scope of the SpeedyCGI options. When the
38 +same SpeedyCGI option is set several times, the last one overrides
39 +the others.
40 +
41 =back
42
43 =head2 Context
44
45
46
47 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-speedy_unsafe_putenv.patch
48
49 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-speedy_unsafe_putenv.patch?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-speedy_unsafe_putenv.patch?rev=1.1&content-type=text/plain
51
52 Index: SpeedyCGI-2.22-speedy_unsafe_putenv.patch
53 ===================================================================
54 Author: banb@××××××××.jp
55 Description: Debian #418447, CPAN #13521
56 http://rt.cpan.org/Public/Bug/Display.html?id=13521
57 --- a/src/speedy_backend_main.c
58 +++ b/src/speedy_backend_main.c
59 @@ -176,6 +176,10 @@
60 DIE_QUIET("Cannot allocate perl");
61 perl_construct(my_perl);
62
63 +#if defined(PL_use_safe_putenv) || defined(PL_Guse_safe_putenv)
64 + PL_use_safe_putenv = 0;
65 +#endif
66 +
67 #ifdef SPEEDY_DEBUG
68 dont_fork = getenv("SPEEDY_NOPARENT") != NULL;
69 #endif
70
71
72
73 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-uninit-crash.patch
74
75 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-uninit-crash.patch?rev=1.1&view=markup
76 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-uninit-crash.patch?rev=1.1&content-type=text/plain
77
78 Index: SpeedyCGI-2.22-uninit-crash.patch
79 ===================================================================
80 Author: Niko Tyni <ntyni@××××××.org>
81 Description: Closes: #537996
82 The SvIV call crashes in on Perl 5.10.0 when warnings are
83 enabled and the value is undef.
84 --- a/src/speedy_perl.c
85 +++ b/src/speedy_perl.c
86 @@ -818,7 +818,7 @@
87 my_call_sv(get_perlvar(&PERLVAR_RESET_GLOBALS));
88
89 /* Copy option values in from the perl vars */
90 - if (SvIV(PERLVAL_OPTS_CHANGED)) {
91 + if (SvTRUE(PERLVAL_OPTS_CHANGED)) {
92 int i;
93 for (i = 0; i < SPEEDY_NUMOPTS; ++i) {
94 OptRec *o = speedy_optdefs + i;
95
96
97
98 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strip-backend-libs.patch
99
100 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strip-backend-libs.patch?rev=1.1&view=markup
101 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strip-backend-libs.patch?rev=1.1&content-type=text/plain
102
103 Index: SpeedyCGI-2.22-strip-backend-libs.patch
104 ===================================================================
105 Author: Niko Tyni <ntyni@×××.fi>
106 Description: Use the automatic 'remove extra libs' feature with speedy_backend too.
107 These unnecessary linking flags get removed: -lm -lcrypt -lpthread
108 --- a/speedy_backend/Makefile.PL
109 +++ b/speedy_backend/Makefile.PL
110 @@ -29,6 +29,10 @@
111 sub am_frontend {0}
112 sub my_name {'backend'}
113
114 +sub remove_libs { my $class = shift;
115 + 'BIN=speedy_backend ../util/remove_libs';
116 +}
117 +
118 use ExtUtils::Embed;
119
120 my $tmp = "xsinit.tmp$$";
121 --- a/util/remove_libs
122 +++ b/util/remove_libs
123 @@ -3,7 +3,11 @@
124 # Remove extranaeous libs from the linking command. Reduces shared-library
125 # overhead at exec time.
126
127 -BIN=speedy
128 +# allow testing other binaries too
129 +if [ "x$BIN" = "x" ]
130 +then
131 + BIN=speedy
132 +fi
133 TMP1=/tmp/remove_libs$$
134 TMP2="${TMP1}2"
135
136
137
138
139 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl5.10.patch
140
141 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl5.10.patch?rev=1.1&view=markup
142 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl5.10.patch?rev=1.1&content-type=text/plain
143
144 Index: SpeedyCGI-2.22-perl5.10.patch
145 ===================================================================
146 Author: Niko Tyni <ntyni@××××××.org>
147 Description: Fix build failures with Perl 5.10.
148 Pod::Text::pod2text() calling conventions changed
149 use Newx() instead of New()
150 --- a/Makefile.PL
151 +++ b/Makefile.PL
152 @@ -71,7 +71,7 @@
153 chmod -R u+w,go-w,go+r .
154
155 README: src/SpeedyCGI.pm
156 - cd src && $(PERL) -e "use Pod::Text; pod2text(-80)" <SpeedyCGI.pm >../README
157 + cd src && pod2text -80 <SpeedyCGI.pm >../README
158
159 README.html: src/SpeedyCGI.pm
160 cd src && pod2html SpeedyCGI.pm >../README.html && $(RM_F) pod2h*
161 --- a/src/speedy_backend_main.h
162 +++ b/src/speedy_backend_main.h
163 @@ -38,7 +38,7 @@
164
165 #else
166
167 -#define speedy_new(s,n,t) New(123,s,n,t)
168 +#define speedy_new(s,n,t) Newx(s,n,t)
169 #define speedy_renew Renew
170 #define speedy_free Safefree
171
172
173
174
175 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache2.2.patch
176
177 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache2.2.patch?rev=1.1&view=markup
178 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache2.2.patch?rev=1.1&content-type=text/plain
179
180 Index: SpeedyCGI-2.22-apache2.2.patch
181 ===================================================================
182 Author: Niko Tyni <ntyni@×××.fi>
183 Description: Apache 2.2 compatibility fixes (#393017):
184 * APR_BRIGADE_FOREACH macro removal
185 * apr_filename_of_pathname() rename
186 --- a/src/mod_speedycgi2.c
187 +++ b/src/mod_speedycgi2.c
188 @@ -340,7 +340,10 @@
189 const char *buf;
190 apr_size_t len;
191 apr_status_t rv;
192 - APR_BRIGADE_FOREACH(e, bb) {
193 + for (e = APR_BRIGADE_FIRST(bb);
194 + e != APR_BRIGADE_SENTINEL(bb);
195 + e = APR_BUCKET_NEXT(e)) {
196 +
197 if (APR_BUCKET_IS_EOS(e)) {
198 break;
199 }
200 @@ -380,7 +383,7 @@
201 return DECLINED;
202 }
203
204 - argv0 = apr_filename_of_pathname(r->filename);
205 + argv0 = apr_filepath_name_get(r->filename);
206 nph = !(strncmp(argv0, "nph-", 4));
207
208 if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r))
209 @@ -436,7 +439,7 @@
210 if ((rv = default_build_command(&command, &argv, r, p)) != APR_SUCCESS) {
211 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rv, r,
212 "don't know how to spawn child process: %s",
213 - apr_filename_of_pathname(r->filename));
214 + apr_filepath_name_get(r->filename));
215 return HTTP_INTERNAL_SERVER_ERROR;
216 }
217
218 @@ -445,7 +448,7 @@
219 command, argv, r, p)) != APR_SUCCESS) {
220 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rv, r,
221 "couldn't spawn child process: %s",
222 - apr_filename_of_pathname(r->filename));
223 + apr_filepath_name_get(r->filename));
224 return HTTP_INTERNAL_SERVER_ERROR;
225 }
226
227 @@ -465,7 +468,9 @@
228 return rv;
229 }
230
231 - APR_BRIGADE_FOREACH(bucket, bb) {
232 + for (bucket = APR_BRIGADE_FIRST(bb);
233 + bucket != APR_BRIGADE_SENTINEL(bb);
234 + bucket = APR_BUCKET_NEXT(bucket)) {
235 const char *data;
236 apr_size_t len;
237
238
239
240
241 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl_sys_init.patch
242
243 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl_sys_init.patch?rev=1.1&view=markup
244 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl_sys_init.patch?rev=1.1&content-type=text/plain
245
246 Index: SpeedyCGI-2.22-perl_sys_init.patch
247 ===================================================================
248 Author: Niko Tyni <ntyni@××××××.org>
249 Description: Properly call PERL_SYS_INIT3() to fix lockups on hppa with perl 5.10.0. (Closes: #486070)
250
251 This was always buggy but didn't bite until now. From 'perldoc perlembed':
252
253 The macros PERL_SYS_INIT3() and PERL_SYS_TERM() provide system-specific
254 tune up of the C runtime environment necessary to run Perl interpreters
255 --- a/src/speedy_backend_main.c
256 +++ b/src/speedy_backend_main.c
257 @@ -170,6 +170,8 @@
258 int i;
259 SigList sl;
260
261 + PERL_SYS_INIT3(&argc, &argv, &_junk);
262 +
263 speedy_util_unlimit_core();
264
265 if (!(my_perl = perl_alloc()))
266 --- a/src/speedy_perl.c
267 +++ b/src/speedy_perl.c
268 @@ -405,6 +405,7 @@
269
270 perl_destruct(my_perl);
271 }
272 + PERL_SYS_TERM();
273 speedy_util_exit(0,0);
274 }
275
276
277
278
279 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-test-timeout.patch
280
281 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-test-timeout.patch?rev=1.1&view=markup
282 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-test-timeout.patch?rev=1.1&content-type=text/plain
283
284 Index: SpeedyCGI-2.22-test-timeout.patch
285 ===================================================================
286 Author: Niko Tyni <ntyni@×××.fi>
287 Description: Increase the time for the backend to start so slower buildds
288 have a chance. (#418717)
289 --- a/speedy/t/killfe.t
290 +++ b/speedy/t/killfe.t
291 @@ -9,7 +9,7 @@
292 my $cmd = "exec $ENV{SPEEDY} -- -M1 $scr </dev/null |";
293
294 my $pid = open (RUN1, $cmd);
295 -sleep(1);
296 +sleep(3);
297 kill(9, $pid);
298 wait;
299 open (RUN2, $cmd);
300
301
302
303 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strerror.patch
304
305 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strerror.patch?rev=1.1&view=markup
306 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strerror.patch?rev=1.1&content-type=text/plain
307
308 Index: SpeedyCGI-2.22-strerror.patch
309 ===================================================================
310 Author: Niko Tyni <ntyni@×××.fi>
311 Description: Don't crash while printing a fatal error.
312 --- a/src/speedy_util.c
313 +++ b/src/speedy_util.c
314 @@ -96,13 +96,42 @@
315 }
316
317 static void just_die(const char *fmt, va_list ap) {
318 + /*
319 + * All this strerror_r() stuff is here because
320 + * including perl.h in some cases (Perl 5.8?) replaces
321 + * strerr() with a wrapper that needs an embedded perl
322 + * interpreter running. Otherwise we get SIGSEGV when
323 + * accessing interpreter-specific global variables for the
324 + * strerror buffer
325 + *
326 + * Furthermore, there are two implementations of
327 + * strerror_r() out there, with different prototypes.
328 + */
329 +
330 char buf[2048];
331 +#ifdef HAS_STRERROR_R
332 + char errbuf[256];
333 + int errsv;
334 +#endif
335
336 sprintf(buf, "%s[%u]: ", SPEEDY_PROGNAME, (int)getpid());
337 vsprintf(buf + strlen(buf), fmt, ap);
338 if (errno) {
339 strcat(buf, ": ");
340 +#ifdef HAS_STRERROR_R
341 +#ifdef _GNU_SOURCE
342 + strcat(buf, strerror_r(errno, errbuf, sizeof(errbuf)));
343 +#else /* ! _GNU_SOURCE */
344 + errsv = errno;
345 + if (strerror_r(errsv, errbuf, sizeof(errbuf))
346 + sprintf(buf + strlen(buf), "(errno = %d)", errsv);
347 + else
348 + strcat(buf, errbuf);
349 + }
350 +#endif
351 +#else /* ! HAS_STRERROR_R */
352 strcat(buf, strerror(errno));
353 +#endif /* HAS_STRERROR_R */
354 }
355 strcat(buf, "\n");
356 # ifdef SPEEDY_DEBUG
357
358
359
360 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-makefile-manpage.patch
361
362 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-makefile-manpage.patch?rev=1.1&view=markup
363 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-makefile-manpage.patch?rev=1.1&content-type=text/plain
364
365 Index: SpeedyCGI-2.22-makefile-manpage.patch
366 ===================================================================
367 Author: Niko Tyni <ntyni@×××.fi>
368 Description: Makefile.PL tries to be too smart, make it generate a manpage.
369 --- a/Makefile.PL
370 +++ b/Makefile.PL
371 @@ -34,9 +34,9 @@
372 VERSION_FROM => 'src/SpeedyCGI.src',
373 EXE_FILES => [qw(speedy/speedy speedy_backend/speedy_backend)],
374 CONFIGURE => sub { return {DIR=>\@dirs} },
375 - PM => {'src/SpeedyCGI.pm'=>'$(INST_LIBDIR)/SpeedyCGI.pm'},
376 + # PM => {'src/SpeedyCGI.pm'=>'$(INST_LIBDIR)/SpeedyCGI.pm'},
377 MAN1PODS => {},
378 - MAN3PODS => {},
379 + # MAN3PODS => {},
380 dist => {DIST_DEFAULT => 'mydist'},
381 realclean => {FILES => 'README README.html lib'},
382 %write_makefile_common
383
384
385
386 1.1 dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-empty-param.patch
387
388 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-empty-param.patch?rev=1.1&view=markup
389 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-empty-param.patch?rev=1.1&content-type=text/plain
390
391 Index: SpeedyCGI-2.22-empty-param.patch
392 ===================================================================
393 Author: Niko Tyni <ntyni@×××.fi>
394 Description: Allow empty strings as command-line parameters
395 --- a/src/speedy_frontend.c
396 +++ b/src/speedy_frontend.c
397 @@ -535,7 +535,26 @@
398 ADD_STRING(b, s, l);
399 }
400 }
401 + /* Terminate with zero-length string */
402 + ADDCHAR(b, 0);
403 +}
404 +
405 +/* Copy a block of strings into the buffer, including empty strings */
406 +static void add_strings_with_empty(register SpeedyBuf *b, register const char * const * p)
407 +{
408 + int l;
409 + register const char *s;
410
411 + /* Add strings in p array */
412 + for (; (s = *p); ++p) {
413 + if ((l = strlen(s))) {
414 + ADD_STRING(b, s, l);
415 + } else {
416 + /* add a 1-byte long string containing just '\0' */
417 + l = 1;
418 + ADD_STRING(b, s, l);
419 + }
420 + }
421 /* Terminate with zero-length string */
422 ADDCHAR(b, 0);
423 }
424 @@ -560,7 +579,7 @@
425
426 /* Add env and argv */
427 add_strings(sb, envp);
428 - add_strings(sb, scr_argv+1);
429 + add_strings_with_empty(sb, scr_argv+1);
430
431 /* Put script filename into buffer */
432 add_string(sb, script_fname, strlen(script_fname));