This is an automated email from the git hooks/post-receive script. dom pushed a commit to branch master in repository libapache2-mod-perl2.
commit 2eebf5d7a7c8e78f756eeae9fb0c7e46bd6767d9 Author: Dominic Hargreaves <d...@earth.li> Date: Wed Dec 2 14:19:23 2015 +0000 Update Perl 5.22 patch to version from mod_perl subversion (r1717474) --- debian/changelog | 6 + debian/patches/series | 2 +- ...y-take-4.patch => svn-r1717474-perl-5.22.patch} | 179 +++++++++++++-------- 3 files changed, 119 insertions(+), 68 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3c41e50..e840897 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libapache2-mod-perl2 (2.0.9-3) UNRELEASED; urgency=medium + + * Update Perl 5.22 patch to version from mod_perl subversion (r1717474) + + -- Dominic Hargreaves <d...@earth.li> Wed, 02 Dec 2015 14:18:03 +0000 + libapache2-mod-perl2 (2.0.9-2) experimental; urgency=low * Fixes for the "reproducible builds" effort: diff --git a/debian/patches/series b/debian/patches/series index 0bfc3a7..9d123a8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -13,4 +13,4 @@ avoid-db-linkage.patch 360-conditional-linux-pid-module.patch 0001-Fix-t-api-uri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch 0002-Fix-t-modperl-print.t-t-modperl-printf.t-and-t-direc.patch -Perl-5.22-compatibility-take-4.patch +svn-r1717474-perl-5.22.patch diff --git a/debian/patches/Perl-5.22-compatibility-take-4.patch b/debian/patches/svn-r1717474-perl-5.22.patch similarity index 56% rename from debian/patches/Perl-5.22-compatibility-take-4.patch rename to debian/patches/svn-r1717474-perl-5.22.patch index 318a9d6..cb3f446 100644 --- a/debian/patches/Perl-5.22-compatibility-take-4.patch +++ b/debian/patches/svn-r1717474-perl-5.22.patch @@ -1,14 +1,30 @@ -Subject: Perl 5.22 compatibility +Subject: Add support for Perl 5.22.x Author: Steve Hay <steve.m....@googlemail.com> Author: Niko Tyni <nt...@debian.org> -Origin: https://rt.cpan.org/Ticket/Attachment/1564180/834925/Perl-5.22-compatibility-take-4.patch +Origin: http://svn.apache.org/viewvc?view=revision&revision=1717474 Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101962 Bug-Debian: https://bugs.debian.org/787493 -Please note that this patch is still work in progress. +As outlined by Leon Timmermans in [perl #123687]: ---- libapache2-mod-perl2.orig/src/modules/perl/mod_perl.c -+++ libapache2-mod-perl2/src/modules/perl/mod_perl.c + lookup %ENV's magic, and then replace the pointer to PL_vtbl_env with + a pointer to MP_vtbl_env. You may have to add some svt_copy magic to + make it cast MP_vtbl_envelem instead of PL_vtbl_envelem on the elements. + +with an added svt_local for the 'local %ENV' tests. + +While at it, augment t/modperl/env.t to check that deleting %ENV elements really removes them from subprocess_env. This highlights the need for modifying their vtable, currently in the modperl_envelem_tie() macro. + +(MP_vtbl_envelem probably shouldn't be a global variable, but the modperl_envelem_tie() macro needs it, and the perl vtables are global too anyway. I've made MP_vtbl_env global too for symmetry.) + +Based on ++Niko Tyni's 0001-Steps-at-Perl-5.22-compatibility-take-3.patch in [rt.cpan.org #101962]. + +[This version of the patch excludes the change to Changes] + +Index: src/modules/perl/mod_perl.c +=================================================================== +--- a/src/modules/perl/mod_perl.c (revision 1717473) ++++ b/src/modules/perl/mod_perl.c (working copy) @@ -262,6 +262,8 @@ exit(1); } @@ -37,8 +53,10 @@ Please note that this patch is still work in progress. modperl_perl_pp_unset_all(); PERL_SYS_TERM(); ---- libapache2-mod-perl2.orig/src/modules/perl/modperl_env.c -+++ libapache2-mod-perl2/src/modules/perl/modperl_env.c +Index: src/modules/perl/modperl_env.c +=================================================================== +--- a/src/modules/perl/modperl_env.c (revision 1717473) ++++ b/src/modules/perl/modperl_env.c (working copy) @@ -121,6 +121,7 @@ const apr_array_header_t *array; apr_table_entry_t *elts; @@ -47,9 +65,13 @@ Please note that this patch is still work in progress. modperl_env_untie(mg_flags); array = apr_table_elts(table); -@@ -434,11 +435,8 @@ - /* to store the original virtual tables - * these are global, not per-interpreter +@@ -431,14 +432,10 @@ + #endif + } + +-/* to store the original virtual tables +- * these are global, not per-interpreter ++/* handy access to perl's original virtual tables */ -static MGVTBL MP_PERL_vtbl_env; -static MGVTBL MP_PERL_vtbl_envelem; @@ -60,15 +82,39 @@ Please note that this patch is still work in progress. #define MP_dENV_KEY \ STRLEN klen; \ -@@ -612,16 +610,22 @@ +@@ -529,6 +526,26 @@ + return 0; } - #endif -+static int modperl_env_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, const char *name, I32 namlen); -+static int modperl_env_magic_local_all(pTHX_ SV *nsv, MAGIC *mg); ++static int modperl_env_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, const char *name, I32 namlen) ++{ ++ MP_TRACE_e(MP_FUNC, "setting up %%ENV element magic"); ++ sv_magicext(nsv, mg->mg_obj, toLOWER(mg->mg_type), &MP_vtbl_envelem, name, namlen); ++ ++ return 1; ++} ++ ++static int modperl_env_magic_local_all(pTHX_ SV *nsv, MAGIC *mg) ++{ ++ MAGIC *nmg; ++ MP_TRACE_e(MP_FUNC, "localizing %%ENV"); ++ nmg = sv_magicext(nsv, mg->mg_obj, mg->mg_type, &MP_vtbl_env, (char*)NULL, 0); ++ nmg->mg_ptr = mg->mg_ptr; ++ nmg->mg_flags |= MGf_COPY; ++ nmg->mg_flags |= MGf_LOCAL; ++ ++ return 1; ++} + + static int modperl_env_magic_set(pTHX_ SV *sv, MAGIC *mg) + { + request_rec *r = (request_rec *)EnvMgObj; +@@ -613,15 +630,18 @@ + #endif + /* override %ENV virtual tables with our own */ - static MGVTBL MP_vtbl_env = { +-static MGVTBL MP_vtbl_env = { ++MGVTBL MP_vtbl_env = { 0, modperl_env_magic_set_all, 0, @@ -85,52 +131,22 @@ Please note that this patch is still work in progress. 0, modperl_env_magic_set, 0, -@@ -629,22 +633,73 @@ +@@ -629,22 +649,64 @@ 0 }; -void modperl_env_init(void) -+static int modperl_env_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, const char *name, I32 namlen) -+{ -+ MP_TRACE_e(MP_FUNC, "setting up %%ENV element magic"); -+ sv_magicext(nsv, mg->mg_obj, -+ toLOWER(mg->mg_type), -+ &MP_vtbl_envelem, -+ name, namlen); -+ -+ return 1; -+} -+ -+static int modperl_env_magic_local_all(pTHX_ SV *nsv, MAGIC *mg) ++void modperl_env_init(pTHX) { - /* save originals */ - StructCopy(&PL_vtbl_env, &MP_PERL_vtbl_env, MGVTBL); - StructCopy(&PL_vtbl_envelem, &MP_PERL_vtbl_envelem, MGVTBL); -+ MAGIC *nmg; -+ MP_TRACE_e(MP_FUNC, "localizing %%ENV"); -+ nmg = sv_magicext(nsv, mg->mg_obj, -+ mg->mg_type, -+ &MP_vtbl_env, -+ NULL, 0); -+ nmg->mg_ptr = mg->mg_ptr; -+ nmg->mg_flags |= MGf_COPY; -+ nmg->mg_flags |= MGf_LOCAL; ++ MAGIC *mg; - /* replace with our versions */ - StructCopy(&MP_vtbl_env, &PL_vtbl_env, MGVTBL); - StructCopy(&MP_vtbl_envelem, &PL_vtbl_envelem, MGVTBL); -+ return 1; - } - --void modperl_env_unload(void) -+void modperl_env_init(pTHX) - { -- /* restore originals */ -- StructCopy(&MP_PERL_vtbl_env, &PL_vtbl_env, MGVTBL); -- StructCopy(&MP_PERL_vtbl_envelem, &PL_vtbl_envelem, MGVTBL); -+ MAGIC *mg; -+ /* Remove existing 'E' magic from %ENV */ -+ /* TODO: Should check there is not multiple 'E' magic! */ ++ /* Find the 'E' magic on %ENV */ + if (!my_perl) + return; + if (!PL_envgv) @@ -140,38 +156,61 @@ Please note that this patch is still work in progress. + mg = mg_find((const SV *)ENVHV, PERL_MAGIC_env); + if (!mg) + return; -+ if (mg->mg_virtual == &MP_vtbl_env) ++ ++ /* Ignore it if it isn't perl's original version */ ++ if (mg->mg_virtual != &PL_vtbl_env) + return; -+ MP_TRACE_d(MP_FUNC, "ptr: %x obj: %x flags:%x", mg->mg_ptr, mg->mg_obj, mg->mg_flags); ++ ++ MP_TRACE_e(MP_FUNC, "env_init - ptr: %x obj: %x flags: %x", ++ mg->mg_ptr, mg->mg_obj, mg->mg_flags); ++ ++ /* Remove it */ + mg_free_type((SV*)ENVHV, PERL_MAGIC_env); + + /* Add our version instead */ + mg = sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &MP_vtbl_env, (char*)NULL, 0); + mg->mg_flags |= MGf_COPY; + mg->mg_flags |= MGf_LOCAL; -+} -+ + } + +-void modperl_env_unload(void) +void modperl_env_unload(pTHX) -+{ -+ /* Remove our 'E' magic from %ENV */ -+ /* TODO: Should check there is not multiple 'E' magic! */ + { +- /* restore originals */ +- StructCopy(&MP_PERL_vtbl_env, &PL_vtbl_env, MGVTBL); +- StructCopy(&MP_PERL_vtbl_envelem, &PL_vtbl_envelem, MGVTBL); ++ MAGIC *mg; ++ ++ /* Find the 'E' magic on %ENV */ + if (!my_perl) + return; + if (!PL_envgv) + return; + if (!SvRMAGICAL(ENVHV)) + return; -+ if (!mg_find((const SV *)ENVHV, PERL_MAGIC_env)) ++ mg = mg_find((const SV *)ENVHV, PERL_MAGIC_env); ++ if (!mg) ++ return; ++ ++ /* Ignore it if it isn't our version */ ++ if (mg->mg_virtual != &MP_vtbl_env) + return; ++ ++ MP_TRACE_e(MP_FUNC, "env_unload - ptr: %x obj: %x flags: %x", ++ mg->mg_ptr, mg->mg_obj, mg->mg_flags); ++ ++ /* Remove it */ + mg_free_type((SV*)ENVHV, PERL_MAGIC_env); + -+ /* Restore original */ ++ /* Restore perl's original version */ + sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &PL_vtbl_env, (char*)NULL, 0); } /* ---- libapache2-mod-perl2.orig/src/modules/perl/modperl_env.h -+++ libapache2-mod-perl2/src/modules/perl/modperl_env.h +Index: src/modules/perl/modperl_env.h +=================================================================== +--- a/src/modules/perl/modperl_env.h (revision 1717473) ++++ b/src/modules/perl/modperl_env.h (working copy) @@ -28,7 +28,7 @@ MP_magical_tie(ENVHV, mg_flags) @@ -181,7 +220,7 @@ Please note that this patch is still work in progress. void modperl_env_hash_keys(pTHX); -@@ -58,9 +58,11 @@ +@@ -58,10 +58,13 @@ void modperl_env_request_untie(pTHX_ request_rec *r); @@ -190,13 +229,17 @@ Please note that this patch is still work in progress. -void modperl_env_unload(void); +void modperl_env_unload(pTHX); -+ -+MGVTBL MP_vtbl_envelem; ++MGVTBL MP_vtbl_env; ++MGVTBL MP_vtbl_envelem; ++ #endif /* MODPERL_ENV_H */ ---- libapache2-mod-perl2.orig/src/modules/perl/modperl_perl.c -+++ libapache2-mod-perl2/src/modules/perl/modperl_perl.c + /* +Index: src/modules/perl/modperl_perl.c +=================================================================== +--- a/src/modules/perl/modperl_perl.c (revision 1717473) ++++ b/src/modules/perl/modperl_perl.c (working copy) @@ -181,6 +181,8 @@ } } @@ -206,8 +249,10 @@ Please note that this patch is still work in progress. perl_destruct(perl); /* XXX: big bug in 5.6.1 fixed in 5.7.2+ ---- libapache2-mod-perl2.orig/t/response/TestModperl/env.pm -+++ libapache2-mod-perl2/t/response/TestModperl/env.pm +Index: t/response/TestModperl/env.pm +=================================================================== +--- a/t/response/TestModperl/env.pm (revision 1717473) ++++ b/t/response/TestModperl/env.pm (working copy) @@ -15,7 +15,7 @@ sub handler { my $r = shift; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libapache2-mod-perl2.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits