diff options
author | Peter Volkov <pva@gentoo.org> | 2010-03-29 14:59:14 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2010-03-29 14:59:14 +0000 |
commit | f5bdd2587364036b0131b9d7c243fd7a295e1369 (patch) | |
tree | 8a40ed6bc06f88139079cee2b75ad51751567bf1 /dev-perl | |
parent | Version bump to latest releases. Drop old. (diff) | |
download | gentoo-2-f5bdd2587364036b0131b9d7c243fd7a295e1369.tar.gz gentoo-2-f5bdd2587364036b0131b9d7c243fd7a295e1369.tar.bz2 gentoo-2-f5bdd2587364036b0131b9d7c243fd7a295e1369.zip |
Added debian patchset, fixes #299978 thank Diego E. 'Flameeyes' Pettenò for report.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-perl')
13 files changed, 362 insertions, 2 deletions
diff --git a/dev-perl/SpeedyCGI/ChangeLog b/dev-perl/SpeedyCGI/ChangeLog index 2076de02e4b9..728c291a0db4 100644 --- a/dev-perl/SpeedyCGI/ChangeLog +++ b/dev-perl/SpeedyCGI/ChangeLog @@ -1,6 +1,23 @@ # ChangeLog for dev-perl/SpeedyCGI -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-perl/SpeedyCGI/ChangeLog,v 1.8 2009/11/26 12:36:41 flameeyes Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-perl/SpeedyCGI/ChangeLog,v 1.9 2010/03/29 14:59:14 pva Exp $ + +*SpeedyCGI-2.22-r1 (29 Mar 2010) + + 29 Mar 2010; Peter Volkov <pva@gentoo.org> +SpeedyCGI-2.22-r1.ebuild, + +files/SpeedyCGI-2.22-apache-docs.patch, + +files/SpeedyCGI-2.22-apache2.2.patch, + +files/SpeedyCGI-2.22-empty-param.patch, + +files/SpeedyCGI-2.22-makefile-manpage.patch, + +files/SpeedyCGI-2.22-perl5.10.patch, + +files/SpeedyCGI-2.22-perl_sys_init.patch, + +files/SpeedyCGI-2.22-speedy_unsafe_putenv.patch, + +files/SpeedyCGI-2.22-strerror.patch, + +files/SpeedyCGI-2.22-strip-backend-libs.patch, + +files/SpeedyCGI-2.22-test-timeout.patch, + +files/SpeedyCGI-2.22-uninit-crash.patch: + Added debian patchset, fixes #299978 thank Diego E. 'Flameeyes' Pettenò + for report. 26 Nov 2009; Diego E. Pettenò <flameeyes@gentoo.org> SpeedyCGI-2.22.ebuild: diff --git a/dev-perl/SpeedyCGI/SpeedyCGI-2.22-r1.ebuild b/dev-perl/SpeedyCGI/SpeedyCGI-2.22-r1.ebuild new file mode 100644 index 000000000000..29510d4bc3e2 --- /dev/null +++ b/dev-perl/SpeedyCGI/SpeedyCGI-2.22-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-perl/SpeedyCGI/SpeedyCGI-2.22-r1.ebuild,v 1.1 2010/03/29 14:59:14 pva Exp $ + +inherit perl-module + +DESCRIPTION="Speed up perl scripts by running them persistently" +HOMEPAGE="http://daemoninc.com/SpeedyCGI/" +SRC_URI="http://daemoninc.com/SpeedyCGI/CGI-${P}.tar.gz + http://oss.oetiker.ch/smokeping/pub/speedy-error.patch" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~sparc ~x86" +IUSE="" + +DEPEND="dev-lang/perl" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/CGI-${P} + +PATCHES=( "${DISTDIR}/speedy-error.patch" +"${FILESDIR}/${P}-makefile-manpage.patch" +"${FILESDIR}/${P}-empty-param.patch" +"${FILESDIR}/${P}-strerror.patch" +"${FILESDIR}/${P}-apache-docs.patch" +"${FILESDIR}/${P}-apache2.2.patch" +"${FILESDIR}/${P}-strip-backend-libs.patch" +"${FILESDIR}/${P}-test-timeout.patch" +"${FILESDIR}/${P}-speedy_unsafe_putenv.patch" +"${FILESDIR}/${P}-perl5.10.patch" +"${FILESDIR}/${P}-perl_sys_init.patch" +"${FILESDIR}/${P}-uninit-crash.patch" +) + +MAKEOPTS="${MAKEOPTS} -j1" diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache-docs.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache-docs.patch new file mode 100644 index 000000000000..45d35176a0ec --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache-docs.patch @@ -0,0 +1,18 @@ +Author: Niko Tyni <ntyni@iki.fi> +Description: Documentation for bug #204461. +--- a/src/SpeedyCGI.src ++++ b/src/SpeedyCGI.src +@@ -250,6 +250,13 @@ + be Speedy followed by the option name. For example to set the + Timeout option, use the apache directive SpeedyTimeout. + ++Note that these variables are global. There is currently no way to run ++different scripts with different SpeedyCGI options when they are run ++from the Apache module. Any <Directory> or <Location> contexts ++have no effect on the scope of the SpeedyCGI options. When the ++same SpeedyCGI option is set several times, the last one overrides ++the others. ++ + =back + + =head2 Context diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache2.2.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache2.2.patch new file mode 100644 index 000000000000..3cd754674379 --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-apache2.2.patch @@ -0,0 +1,56 @@ +Author: Niko Tyni <ntyni@iki.fi> +Description: Apache 2.2 compatibility fixes (#393017): +* APR_BRIGADE_FOREACH macro removal +* apr_filename_of_pathname() rename +--- a/src/mod_speedycgi2.c ++++ b/src/mod_speedycgi2.c +@@ -340,7 +340,10 @@ + const char *buf; + apr_size_t len; + apr_status_t rv; +- APR_BRIGADE_FOREACH(e, bb) { ++ for (e = APR_BRIGADE_FIRST(bb); ++ e != APR_BRIGADE_SENTINEL(bb); ++ e = APR_BUCKET_NEXT(e)) { ++ + if (APR_BUCKET_IS_EOS(e)) { + break; + } +@@ -380,7 +383,7 @@ + return DECLINED; + } + +- argv0 = apr_filename_of_pathname(r->filename); ++ argv0 = apr_filepath_name_get(r->filename); + nph = !(strncmp(argv0, "nph-", 4)); + + if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) +@@ -436,7 +439,7 @@ + if ((rv = default_build_command(&command, &argv, r, p)) != APR_SUCCESS) { + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rv, r, + "don't know how to spawn child process: %s", +- apr_filename_of_pathname(r->filename)); ++ apr_filepath_name_get(r->filename)); + return HTTP_INTERNAL_SERVER_ERROR; + } + +@@ -445,7 +448,7 @@ + command, argv, r, p)) != APR_SUCCESS) { + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rv, r, + "couldn't spawn child process: %s", +- apr_filename_of_pathname(r->filename)); ++ apr_filepath_name_get(r->filename)); + return HTTP_INTERNAL_SERVER_ERROR; + } + +@@ -465,7 +468,9 @@ + return rv; + } + +- APR_BRIGADE_FOREACH(bucket, bb) { ++ for (bucket = APR_BRIGADE_FIRST(bb); ++ bucket != APR_BRIGADE_SENTINEL(bb); ++ bucket = APR_BUCKET_NEXT(bucket)) { + const char *data; + apr_size_t len; + diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-empty-param.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-empty-param.patch new file mode 100644 index 000000000000..0b9b7fa3c56d --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-empty-param.patch @@ -0,0 +1,40 @@ +Author: Niko Tyni <ntyni@iki.fi> +Description: Allow empty strings as command-line parameters +--- a/src/speedy_frontend.c ++++ b/src/speedy_frontend.c +@@ -535,7 +535,26 @@ + ADD_STRING(b, s, l); + } + } ++ /* Terminate with zero-length string */ ++ ADDCHAR(b, 0); ++} ++ ++/* Copy a block of strings into the buffer, including empty strings */ ++static void add_strings_with_empty(register SpeedyBuf *b, register const char * const * p) ++{ ++ int l; ++ register const char *s; + ++ /* Add strings in p array */ ++ for (; (s = *p); ++p) { ++ if ((l = strlen(s))) { ++ ADD_STRING(b, s, l); ++ } else { ++ /* add a 1-byte long string containing just '\0' */ ++ l = 1; ++ ADD_STRING(b, s, l); ++ } ++ } + /* Terminate with zero-length string */ + ADDCHAR(b, 0); + } +@@ -560,7 +579,7 @@ + + /* Add env and argv */ + add_strings(sb, envp); +- add_strings(sb, scr_argv+1); ++ add_strings_with_empty(sb, scr_argv+1); + + /* Put script filename into buffer */ + add_string(sb, script_fname, strlen(script_fname)); diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-makefile-manpage.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-makefile-manpage.patch new file mode 100644 index 000000000000..8e1d4b73acba --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-makefile-manpage.patch @@ -0,0 +1,16 @@ +Author: Niko Tyni <ntyni@iki.fi> +Description: Makefile.PL tries to be too smart, make it generate a manpage. +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -34,9 +34,9 @@ + VERSION_FROM => 'src/SpeedyCGI.src', + EXE_FILES => [qw(speedy/speedy speedy_backend/speedy_backend)], + CONFIGURE => sub { return {DIR=>\@dirs} }, +- PM => {'src/SpeedyCGI.pm'=>'$(INST_LIBDIR)/SpeedyCGI.pm'}, ++ # PM => {'src/SpeedyCGI.pm'=>'$(INST_LIBDIR)/SpeedyCGI.pm'}, + MAN1PODS => {}, +- MAN3PODS => {}, ++ # MAN3PODS => {}, + dist => {DIST_DEFAULT => 'mydist'}, + realclean => {FILES => 'README README.html lib'}, + %write_makefile_common diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl5.10.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl5.10.patch new file mode 100644 index 000000000000..8445dad26683 --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl5.10.patch @@ -0,0 +1,26 @@ +Author: Niko Tyni <ntyni@debian.org> +Description: Fix build failures with Perl 5.10. +Pod::Text::pod2text() calling conventions changed +use Newx() instead of New() +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -71,7 +71,7 @@ + chmod -R u+w,go-w,go+r . + + README: src/SpeedyCGI.pm +- cd src && $(PERL) -e "use Pod::Text; pod2text(-80)" <SpeedyCGI.pm >../README ++ cd src && pod2text -80 <SpeedyCGI.pm >../README + + README.html: src/SpeedyCGI.pm + cd src && pod2html SpeedyCGI.pm >../README.html && $(RM_F) pod2h* +--- a/src/speedy_backend_main.h ++++ b/src/speedy_backend_main.h +@@ -38,7 +38,7 @@ + + #else + +-#define speedy_new(s,n,t) New(123,s,n,t) ++#define speedy_new(s,n,t) Newx(s,n,t) + #define speedy_renew Renew + #define speedy_free Safefree + diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl_sys_init.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl_sys_init.patch new file mode 100644 index 000000000000..e8da0b9d0f92 --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-perl_sys_init.patch @@ -0,0 +1,28 @@ +Author: Niko Tyni <ntyni@debian.org> +Description: Properly call PERL_SYS_INIT3() to fix lockups on hppa with perl 5.10.0. (Closes: #486070) + +This was always buggy but didn't bite until now. From 'perldoc perlembed': + +The macros PERL_SYS_INIT3() and PERL_SYS_TERM() provide system-specific +tune up of the C runtime environment necessary to run Perl interpreters +--- a/src/speedy_backend_main.c ++++ b/src/speedy_backend_main.c +@@ -170,6 +170,8 @@ + int i; + SigList sl; + ++ PERL_SYS_INIT3(&argc, &argv, &_junk); ++ + speedy_util_unlimit_core(); + + if (!(my_perl = perl_alloc())) +--- a/src/speedy_perl.c ++++ b/src/speedy_perl.c +@@ -405,6 +405,7 @@ + + perl_destruct(my_perl); + } ++ PERL_SYS_TERM(); + speedy_util_exit(0,0); + } + diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-speedy_unsafe_putenv.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-speedy_unsafe_putenv.patch new file mode 100644 index 000000000000..c4adb7b8c6ec --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-speedy_unsafe_putenv.patch @@ -0,0 +1,16 @@ +Author: banb@yahoo.co.jp +Description: Debian #418447, CPAN #13521 +http://rt.cpan.org/Public/Bug/Display.html?id=13521 +--- a/src/speedy_backend_main.c ++++ b/src/speedy_backend_main.c +@@ -176,6 +176,10 @@ + DIE_QUIET("Cannot allocate perl"); + perl_construct(my_perl); + ++#if defined(PL_use_safe_putenv) || defined(PL_Guse_safe_putenv) ++ PL_use_safe_putenv = 0; ++#endif ++ + #ifdef SPEEDY_DEBUG + dont_fork = getenv("SPEEDY_NOPARENT") != NULL; + #endif diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strerror.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strerror.patch new file mode 100644 index 000000000000..608ac39c566e --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strerror.patch @@ -0,0 +1,47 @@ +Author: Niko Tyni <ntyni@iki.fi> +Description: Don't crash while printing a fatal error. +--- a/src/speedy_util.c ++++ b/src/speedy_util.c +@@ -96,13 +96,42 @@ + } + + static void just_die(const char *fmt, va_list ap) { ++ /* ++ * All this strerror_r() stuff is here because ++ * including perl.h in some cases (Perl 5.8?) replaces ++ * strerr() with a wrapper that needs an embedded perl ++ * interpreter running. Otherwise we get SIGSEGV when ++ * accessing interpreter-specific global variables for the ++ * strerror buffer ++ * ++ * Furthermore, there are two implementations of ++ * strerror_r() out there, with different prototypes. ++ */ ++ + char buf[2048]; ++#ifdef HAS_STRERROR_R ++ char errbuf[256]; ++ int errsv; ++#endif + + sprintf(buf, "%s[%u]: ", SPEEDY_PROGNAME, (int)getpid()); + vsprintf(buf + strlen(buf), fmt, ap); + if (errno) { + strcat(buf, ": "); ++#ifdef HAS_STRERROR_R ++#ifdef _GNU_SOURCE ++ strcat(buf, strerror_r(errno, errbuf, sizeof(errbuf))); ++#else /* ! _GNU_SOURCE */ ++ errsv = errno; ++ if (strerror_r(errsv, errbuf, sizeof(errbuf)) ++ sprintf(buf + strlen(buf), "(errno = %d)", errsv); ++ else ++ strcat(buf, errbuf); ++ } ++#endif ++#else /* ! HAS_STRERROR_R */ + strcat(buf, strerror(errno)); ++#endif /* HAS_STRERROR_R */ + } + strcat(buf, "\n"); + # ifdef SPEEDY_DEBUG diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strip-backend-libs.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strip-backend-libs.patch new file mode 100644 index 000000000000..537af4188be5 --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-strip-backend-libs.patch @@ -0,0 +1,31 @@ +Author: Niko Tyni <ntyni@iki.fi> +Description: Use the automatic 'remove extra libs' feature with speedy_backend too. +These unnecessary linking flags get removed: -lm -lcrypt -lpthread +--- a/speedy_backend/Makefile.PL ++++ b/speedy_backend/Makefile.PL +@@ -29,6 +29,10 @@ + sub am_frontend {0} + sub my_name {'backend'} + ++sub remove_libs { my $class = shift; ++ 'BIN=speedy_backend ../util/remove_libs'; ++} ++ + use ExtUtils::Embed; + + my $tmp = "xsinit.tmp$$"; +--- a/util/remove_libs ++++ b/util/remove_libs +@@ -3,7 +3,11 @@ + # Remove extranaeous libs from the linking command. Reduces shared-library + # overhead at exec time. + +-BIN=speedy ++# allow testing other binaries too ++if [ "x$BIN" = "x" ] ++then ++ BIN=speedy ++fi + TMP1=/tmp/remove_libs$$ + TMP2="${TMP1}2" + diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-test-timeout.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-test-timeout.patch new file mode 100644 index 000000000000..62bbc4ea30d2 --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-test-timeout.patch @@ -0,0 +1,14 @@ +Author: Niko Tyni <ntyni@iki.fi> +Description: Increase the time for the backend to start so slower buildds +have a chance. (#418717) +--- a/speedy/t/killfe.t ++++ b/speedy/t/killfe.t +@@ -9,7 +9,7 @@ + my $cmd = "exec $ENV{SPEEDY} -- -M1 $scr </dev/null |"; + + my $pid = open (RUN1, $cmd); +-sleep(1); ++sleep(3); + kill(9, $pid); + wait; + open (RUN2, $cmd); diff --git a/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-uninit-crash.patch b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-uninit-crash.patch new file mode 100644 index 000000000000..767fb8de8fe6 --- /dev/null +++ b/dev-perl/SpeedyCGI/files/SpeedyCGI-2.22-uninit-crash.patch @@ -0,0 +1,15 @@ +Author: Niko Tyni <ntyni@debian.org> +Description: Closes: #537996 +The SvIV call crashes in on Perl 5.10.0 when warnings are +enabled and the value is undef. +--- a/src/speedy_perl.c ++++ b/src/speedy_perl.c +@@ -818,7 +818,7 @@ + my_call_sv(get_perlvar(&PERLVAR_RESET_GLOBALS)); + + /* Copy option values in from the perl vars */ +- if (SvIV(PERLVAL_OPTS_CHANGED)) { ++ if (SvTRUE(PERLVAL_OPTS_CHANGED)) { + int i; + for (i = 0; i < SPEEDY_NUMOPTS; ++i) { + OptRec *o = speedy_optdefs + i; |