[libapache2-mod-perl2] 02/05: Drop Perl 5.22 compatibility patches, applied upstream

Niko Tyni ntyni at moszumanska.debian.org
Sun Oct 16 20:41:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

ntyni pushed a commit to branch master
in repository libapache2-mod-perl2.

commit e2cfef0c9074d18ebc6f4ecfab97fb293b9c3391
Author: Niko Tyni <ntyni at debian.org>
Date:   Sun Oct 16 22:29:17 2016 +0300

    Drop Perl 5.22 compatibility patches, applied upstream
---
 ...ri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch |  43 ----
 ...rl-print.t-t-modperl-printf.t-and-t-direc.patch |  35 ---
 debian/patches/series                              |   3 -
 debian/patches/svn-r1717474-perl-5.22.patch        | 273 ---------------------
 4 files changed, 354 deletions(-)

diff --git a/debian/patches/0001-Fix-t-api-uri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch b/debian/patches/0001-Fix-t-api-uri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch
deleted file mode 100644
index 7bc696d..0000000
--- a/debian/patches/0001-Fix-t-api-uri.t-t-apr-uri.t-and-t-apr-ext-uri.t-unde.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From d5eb71f8b1ea0b491fb80c62da54f5386a675a68 Mon Sep 17 00:00:00 2001
-From: Steve Hay <stevehay at apache.org>
-Date: Thu, 10 Sep 2015 08:58:55 +0000
-Subject: [PATCH 1/2] Fix t/api/uri.t, t/apr/uri.t and t/apr-ext/uri.t under
- perl-5.22.0
-
-I'm working on CPAN RT#101962: Support for perl-5.22.0. The new "Redundant argument in sprintf" warning has revealed a couple of problems in our test suite which causes these tests to fail.
-
-git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1702195 13f79535-47bb-0310-9956-ffa450edef68
----
- t/lib/TestAPRlib/uri.pm   | 2 +-
- t/response/TestAPI/uri.pm | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/t/lib/TestAPRlib/uri.pm b/t/lib/TestAPRlib/uri.pm
-index a68ad77..8c01282 100644
---- a/t/lib/TestAPRlib/uri.pm
-+++ b/t/lib/TestAPRlib/uri.pm
-@@ -88,7 +88,7 @@ sub test {
-     # - if no flags are passed to unparse, APR::Const::URI_UNP_OMITPASSWORD
-     #   is passed by default -- it hides the password
-     my $url1 = sprintf "%s://%s\@%s%s",
--        map { $url{$_}[1] } grep !/^(password|port)$/, @keys_urls;
-+        map { $url{$_}[1] } qw(scheme user hostname path);
-     ok t_cmp($url_unparsed, $url1, "unparsed url");
- 
-     # various unparse flags #
-diff --git a/t/response/TestAPI/uri.pm b/t/response/TestAPI/uri.pm
-index 89f22bc..87ff65d 100644
---- a/t/response/TestAPI/uri.pm
-+++ b/t/response/TestAPI/uri.pm
-@@ -105,7 +105,7 @@ sub handler {
-     }
-     {
-         # this time include args and a pool object
--        my $curl = $r->construct_url(sprintf "%s?%s", $r->uri, $r->args,
-+        my $curl = $r->construct_url(sprintf("%s?%s", $r->uri, $r->args),
-                                      $r->pool->new);
-         t_debug("construct_url: $curl");
-         t_debug("r->uri: ", $r->uri);
--- 
-2.6.2
-
diff --git a/debian/patches/0002-Fix-t-modperl-print.t-t-modperl-printf.t-and-t-direc.patch b/debian/patches/0002-Fix-t-modperl-print.t-t-modperl-printf.t-and-t-direc.patch
deleted file mode 100644
index 08a254b..0000000
--- a/debian/patches/0002-Fix-t-modperl-print.t-t-modperl-printf.t-and-t-direc.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 1a4fec3b514b9107a5a805372864dbc7d2086d67 Mon Sep 17 00:00:00 2001
-From: Steve Hay <stevehay at apache.org>
-Date: Fri, 11 Sep 2015 08:28:54 +0000
-Subject: [PATCH 2/2] Fix t/modperl/print.t, t/modperl/printf.t and
- t/directive/perlloadmodule3.t under perl-5.22.0
-
-I'm working on CPAN RT#101962: Support for perl-5.22.0. The new "Redundant argument in subroutine entry" warning for printf-type functions has revealed a problem in our printf override which causes these tests to fail. In threaded builds we wrongly included the thread context in the count of arguments being passed to perl's sprintf implementation, which then warned that more arguments were being passed than the format string required. With warnings being fatalized in all test scripts thi [...]
-
-git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1702395 13f79535-47bb-0310-9956-ffa450edef68
----
- xs/Apache2/RequestIO/Apache2__RequestIO.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/xs/Apache2/RequestIO/Apache2__RequestIO.h b/xs/Apache2/RequestIO/Apache2__RequestIO.h
-index 6c80830..ca5cb74 100644
---- a/xs/Apache2/RequestIO/Apache2__RequestIO.h
-+++ b/xs/Apache2/RequestIO/Apache2__RequestIO.h
-@@ -111,6 +111,14 @@ apr_size_t mpxs_ap_rprintf(pTHX_ I32 items, SV **MARK, SV **SP)
- 
-     rcfg = modperl_config_req_get(r);
- 
-+    /* Reduce items by 1 for threaded builds since it otherwise includes
-+     * the thread context, which shouldn't be included in the count of
-+     * arguments being given to the sprintf() call.
-+     */
-+#ifdef USE_ITHREADS
-+    --items;
-+#endif
-+
-     /* XXX: we could have an rcfg->sprintf_buffer to reuse this SV
-      * across requests
-      */
--- 
-2.6.2
-
diff --git a/debian/patches/series b/debian/patches/series
index e4e05df..fa2de9f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,8 +11,5 @@ avoid-db-linkage.patch
 260_fix_pipelined_response_deadlock.patch
 #330-mod_authz_core.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
-svn-r1717474-perl-5.22.patch
 0001-Skip-t-protocol-pseudo_http.t-incompatible-with-Apac.patch
 honour-env-LDFLAGS.patch
diff --git a/debian/patches/svn-r1717474-perl-5.22.patch b/debian/patches/svn-r1717474-perl-5.22.patch
deleted file mode 100644
index cb3f446..0000000
--- a/debian/patches/svn-r1717474-perl-5.22.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-Subject: Add support for Perl 5.22.x
-Author: Steve Hay <steve.m.hay at googlemail.com>
-Author: Niko Tyni <ntyni at debian.org>
-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
-
-As outlined by Leon Timmermans in [perl #123687]:
-
-  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);
-     }
- 
-+    modperl_env_init(aTHX);
-+
-     /* suspend END blocks to be run at server shutdown */
-     endav = PL_endav;
-     PL_endav = (AV *)NULL;
-@@ -576,9 +578,6 @@
-     /* modifies PL_ppaddr */
-     modperl_perl_pp_set_all();
- 
--    /* modifies PL_vtbl_env{elem} */
--    modperl_env_init();
--
-     return APR_SUCCESS;
- }
- 
-@@ -597,8 +596,6 @@
- 
-     MP_TRACE_i(MP_FUNC, "mod_perl sys term");
- 
--    modperl_env_unload();
--
-     modperl_perl_pp_unset_all();
- 
-     PERL_SYS_TERM();
-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;
- 
-+    modperl_env_init(aTHX);
-     modperl_env_untie(mg_flags);
- 
-     array = apr_table_elts(table);
-@@ -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;
--
- #define MP_PL_vtbl_call(name, meth) \
--    MP_PERL_vtbl_##name.svt_##meth(aTHX_ sv, mg)
-+    PL_vtbl_##name.svt_##meth(aTHX_ sv, mg)
- 
- #define MP_dENV_KEY \
-     STRLEN klen; \
-@@ -529,6 +526,26 @@
-     return 0;
- }
- 
-+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 = {
-+MGVTBL MP_vtbl_env = {
-     0,
-     modperl_env_magic_set_all,
-     0,
-     modperl_env_magic_clear_all,
--    0
-+    0,
-+    modperl_env_magic_copy,
-+    0,
-+    modperl_env_magic_local_all
- };
- 
--static MGVTBL MP_vtbl_envelem = {
-+MGVTBL MP_vtbl_envelem = {
-     0,
-     modperl_env_magic_set,
-     0,
-@@ -629,22 +649,64 @@
-     0
- };
- 
--void modperl_env_init(void)
-+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 *mg;
- 
--    /* replace with our versions */
--    StructCopy(&MP_vtbl_env, &PL_vtbl_env, MGVTBL);
--    StructCopy(&MP_vtbl_envelem, &PL_vtbl_envelem, MGVTBL);
-+    /* Find the 'E' magic on %ENV */
-+    if (!my_perl)
-+        return;
-+    if (!PL_envgv)
-+        return;
-+    if (!SvRMAGICAL(ENVHV))
-+        return;
-+    mg = mg_find((const SV *)ENVHV, PERL_MAGIC_env);
-+    if (!mg)
-+        return;
-+       
-+    /* Ignore it if it isn't perl's original version */
-+    if (mg->mg_virtual != &PL_vtbl_env)
-+        return;
-+
-+    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)
- {
--    /* 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;
-+    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 perl's original version */
-+    sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &PL_vtbl_env, (char*)NULL, 0);
- }
- 
- /*
-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)
- 
- #define modperl_envelem_tie(sv, key, klen) \
--    sv_magic(sv, (SV *)NULL, 'e', key, klen)
-+    sv_magicext(sv, (SV *)NULL, PERL_MAGIC_envelem, &MP_vtbl_envelem, key, klen)
- 
- void modperl_env_hash_keys(pTHX);
- 
-@@ -58,10 +58,13 @@
- 
- void modperl_env_request_untie(pTHX_ request_rec *r);
- 
--void modperl_env_init(void);
-+void modperl_env_init(pTHX);
- 
--void modperl_env_unload(void);
-+void modperl_env_unload(pTHX);
- 
-+MGVTBL MP_vtbl_env;
-+MGVTBL MP_vtbl_envelem;
-+
- #endif /* MODPERL_ENV_H */
- 
- /*
-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 @@
-         }
-     }
- 
-+    modperl_env_unload(perl);
-+
-     perl_destruct(perl);
- 
-     /* XXX: big bug in 5.6.1 fixed in 5.7.2+
-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;
- 
--    plan $r, tests => 23 + keys(%ENV);
-+    plan $r, tests => 23 + 3 * keys(%ENV);
- 
-     my $env = $r->subprocess_env;
- 
-@@ -75,6 +75,8 @@
-     for my $key (sort keys %ENV) {
-         eval { delete $ENV{$key}; };
-         ok t_cmp($@, '', $key);
-+        ok t_cmp($ENV{$key}, undef, "ENV{$key} is empty");
-+        ok t_cmp($env->get($key), undef, "subprocess_env($key) is empty");
-     }
- 
-     Apache2::Const::OK;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libapache2-mod-perl2.git



More information about the Pkg-perl-cvs-commits mailing list