1 |
commit: 05d8230b31fa9ecffd92089b8b24078a56bbe29e |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 30 16:53:12 2016 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 30 16:53:12 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/dev/dilfridge.git/commit/?id=05d8230b |
7 |
|
8 |
www-apache/mod_perl: Copy from main tree |
9 |
|
10 |
www-apache/mod_perl/Manifest | 2 + |
11 |
.../mod_perl/files/2.0.3/75_mod_perl.2.2.conf | 50 +++++ |
12 |
www-apache/mod_perl/files/2.0.3/75_mod_perl.conf | 54 +++++ |
13 |
.../files/2.0.3/apache2-mod_perl-startup.pl | 24 ++ |
14 |
.../files/mod_perl-2.0.1-sneak-tmpdir.patch | 11 + |
15 |
...perl-2.0.10_pre201601-bundled-Apache-Test.patch | 123 +++++++++++ |
16 |
.../mod_perl/files/mod_perl-2.0.4-inline.patch | 22 ++ |
17 |
.../files/mod_perl-2.0.7-bundled-Apache-Test.patch | 134 ++++++++++++ |
18 |
.../files/mod_perl-2.0.8-bundled-Apache-Test.patch | 127 +++++++++++ |
19 |
.../mod_perl/files/mod_perl_init_b554794.patch | 241 +++++++++++++++++++++ |
20 |
...ip-client_add-instead-of-remote_ip-remote.patch | 47 ++++ |
21 |
.../files/use-log.level-instead-of-loglevel.patch | 27 +++ |
22 |
www-apache/mod_perl/metadata.xml | 12 + |
23 |
.../mod_perl/mod_perl-2.0.10_pre201601.ebuild | 165 ++++++++++++++ |
24 |
www-apache/mod_perl/mod_perl-2.0.8-r3.ebuild | 165 ++++++++++++++ |
25 |
www-apache/mod_perl/mod_perl-2.0.8.ebuild | 157 ++++++++++++++ |
26 |
16 files changed, 1361 insertions(+) |
27 |
|
28 |
diff --git a/www-apache/mod_perl/Manifest b/www-apache/mod_perl/Manifest |
29 |
new file mode 100644 |
30 |
index 0000000..3c73173 |
31 |
--- /dev/null |
32 |
+++ b/www-apache/mod_perl/Manifest |
33 |
@@ -0,0 +1,2 @@ |
34 |
+DIST mod_perl-2.0.10_pre201601.tar.gz 3854229 SHA256 a89c23b66b21c600b74a48125c02c91159c07b08cc07fb4f55015e8e07713697 SHA512 04e57e79031374f3ec432e950fb9f79d1202da9dfc0d86a5137b7346c18f313a4e58ecfffed51efd7e6494baec86b22a42d6712ce5f7824f9f479c05bac00659 WHIRLPOOL 5d37b067aa945cafc0cc7a1f1b27257d8409f6804f22880ae7fd6c21424bbd2c07bace483d95590d255678725f67d081741978cff24cfc91716c08294547e622 |
35 |
+DIST mod_perl-2.0.8.tar.gz 3790026 SHA256 35dc1b7a40a90a395ce88bba2df84f22289975f34d1757de6d715560c20a20e6 SHA512 d5090651699c4436fe8d0a525226543c971aa05db337dc1b1e89023183df1c7dd8b8775f3a0f7d3b9ec40e8c058ac23bd24141cf15a5fe5806226d634dfb4c87 WHIRLPOOL d22e1c353339b08ad752e9f9c7fc0ec4d6a173c4cd3004380b14098e1028737e0eb69d2f56dbe0da3cbfb01b31232c5073d7edb28bf4fed6b2ccd67b09ad7080 |
36 |
|
37 |
diff --git a/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf b/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf |
38 |
new file mode 100644 |
39 |
index 0000000..596d2cc |
40 |
--- /dev/null |
41 |
+++ b/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf |
42 |
@@ -0,0 +1,50 @@ |
43 |
+<IfDefine PERL> |
44 |
+LoadModule perl_module modules/mod_perl.so |
45 |
+ |
46 |
+#PerlTrace all |
47 |
+PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl" |
48 |
+PerlModule ModPerl::Registry |
49 |
+ |
50 |
+# Provide two aliases to the same cgi-bin directory, to see the effects of the |
51 |
+# 2 different mod_perl modes for Apache2::Registry Mode |
52 |
+Alias /perl/ /var/www/localhost/perl/ |
53 |
+# for Apache2::Perlrun Mode |
54 |
+Alias /cgi-perl/ /var/www/localhost/perl/ |
55 |
+ |
56 |
+<Location /perl-status> |
57 |
+ SetHandler perl-script |
58 |
+ PerlResponseHandler Apache2::Status |
59 |
+ Order deny,allow |
60 |
+ Deny from all |
61 |
+ Allow from 127.0.0.1 |
62 |
+</Location> |
63 |
+ |
64 |
+<Directory /home/*/public_html/perl> |
65 |
+ SetHandler perl-script |
66 |
+ PerlResponseHandler ModPerl::PerlRun |
67 |
+ Options -Indexes ExecCGI |
68 |
+ PerlOptions +ParseHeaders |
69 |
+</Directory> |
70 |
+ |
71 |
+# set Apache::Registry Mode for /perl Alias |
72 |
+<Location /perl/*.pl> |
73 |
+ SetHandler perl-script |
74 |
+ PerlResponseHandler ModPerl::Registry |
75 |
+ Options -Indexes ExecCGI |
76 |
+ PerlSendHeader On |
77 |
+ Order allow,deny |
78 |
+ Allow from all |
79 |
+</Location> |
80 |
+ |
81 |
+# set Apache::PerlRun Mode for /cgi-perl Alias |
82 |
+<Location /cgi-perl/*.pl> |
83 |
+ SetHandler perl-script |
84 |
+ PerlResponseHandler ModPerl::PerlRun |
85 |
+ Options -Indexes ExecCGI |
86 |
+ PerlSendHeader On |
87 |
+ Order allow,deny |
88 |
+ Allow from all |
89 |
+</Location> |
90 |
+</IfDefine> |
91 |
+ |
92 |
+# vim: ts=4 filetype=apache |
93 |
|
94 |
diff --git a/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf b/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf |
95 |
new file mode 100644 |
96 |
index 0000000..9cf7b7b |
97 |
--- /dev/null |
98 |
+++ b/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf |
99 |
@@ -0,0 +1,54 @@ |
100 |
+<IfDefine PERL> |
101 |
+LoadModule perl_module modules/mod_perl.so |
102 |
+ |
103 |
+#PerlTrace all |
104 |
+PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl" |
105 |
+PerlModule ModPerl::Registry |
106 |
+ |
107 |
+# Provide two aliases to the same cgi-bin directory, to see the effects of the |
108 |
+# 2 different mod_perl modes for Apache2::Registry Mode |
109 |
+Alias /perl/ /var/www/localhost/perl/ |
110 |
+# for Apache2::Perlrun Mode |
111 |
+Alias /cgi-perl/ /var/www/localhost/perl/ |
112 |
+ |
113 |
+<Location /perl-status> |
114 |
+ SetHandler perl-script |
115 |
+ PerlResponseHandler Apache2::Status |
116 |
+ Require host localhost |
117 |
+</Location> |
118 |
+ |
119 |
+<Directory /home/*/public_html/perl> |
120 |
+ SetHandler perl-script |
121 |
+ PerlResponseHandler ModPerl::PerlRun |
122 |
+ PerlOptions +ParseHeaders |
123 |
+ |
124 |
+ # Clear all existing options and only permit cgi. |
125 |
+ Options ExecCGI |
126 |
+</Directory> |
127 |
+ |
128 |
+# set Apache::Registry Mode for /perl Alias |
129 |
+<Location /perl/*.pl> |
130 |
+ SetHandler perl-script |
131 |
+ PerlResponseHandler ModPerl::Registry |
132 |
+ PerlSendHeader On |
133 |
+ |
134 |
+ # Clear all existing options and only permit cgi. |
135 |
+ Options ExecCGI |
136 |
+ |
137 |
+ Require all granted |
138 |
+</Location> |
139 |
+ |
140 |
+# set Apache::PerlRun Mode for /cgi-perl Alias |
141 |
+<Location /cgi-perl/*.pl> |
142 |
+ SetHandler perl-script |
143 |
+ PerlResponseHandler ModPerl::PerlRun |
144 |
+ PerlSendHeader On |
145 |
+ |
146 |
+ # Clear all existing options and only permit cgi. |
147 |
+ Options ExecCGI |
148 |
+ |
149 |
+ Require all granted |
150 |
+</Location> |
151 |
+</IfDefine> |
152 |
+ |
153 |
+# vim: ts=4 filetype=apache |
154 |
|
155 |
diff --git a/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl b/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl |
156 |
new file mode 100644 |
157 |
index 0000000..afc048a |
158 |
--- /dev/null |
159 |
+++ b/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl |
160 |
@@ -0,0 +1,24 @@ |
161 |
+use lib qw(/home/httpd/perl); |
162 |
+ |
163 |
+# enable if the mod_perl 1.0 compatibility is needed |
164 |
+#use Apache2::compat (); |
165 |
+ |
166 |
+use ModPerl::Util (); #for CORE::GLOBAL::exit |
167 |
+ |
168 |
+use Apache2::RequestRec (); |
169 |
+use Apache2::RequestIO (); |
170 |
+use Apache2::RequestUtil (); |
171 |
+ |
172 |
+use Apache2::ServerRec (); |
173 |
+use Apache2::ServerUtil (); |
174 |
+use Apache2::Connection (); |
175 |
+use Apache2::Log (); |
176 |
+ |
177 |
+use APR::Table (); |
178 |
+ |
179 |
+use ModPerl::Registry (); |
180 |
+ |
181 |
+use Apache2::Const -compile => ':common'; |
182 |
+use APR::Const -compile => ':common'; |
183 |
+ |
184 |
+1; |
185 |
|
186 |
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch b/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch |
187 |
new file mode 100644 |
188 |
index 0000000..0930278 |
189 |
--- /dev/null |
190 |
+++ b/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch |
191 |
@@ -0,0 +1,11 @@ |
192 |
+--- t/conf/modperl_extra.pl.orig 2005-05-16 18:27:45.000000000 +1000 |
193 |
++++ t/conf/modperl_extra.pl 2005-05-16 18:34:46.000000000 +1000 |
194 |
+@@ -136,6 +136,8 @@ |
195 |
+ sub test_modperl_env { |
196 |
+ # see t/response/TestModperl/env.pm |
197 |
+ $ENV{MODPERL_EXTRA_PL} = __FILE__; |
198 |
++ $ENV{TMPDIR} = __FILE__; |
199 |
++ $ENV{TMPDIR} =~ s,/work/.*,/temp,; |
200 |
+ } |
201 |
+ |
202 |
+ 1; |
203 |
|
204 |
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.10_pre201601-bundled-Apache-Test.patch b/www-apache/mod_perl/files/mod_perl-2.0.10_pre201601-bundled-Apache-Test.patch |
205 |
new file mode 100644 |
206 |
index 0000000..af53cad |
207 |
--- /dev/null |
208 |
+++ b/www-apache/mod_perl/files/mod_perl-2.0.10_pre201601-bundled-Apache-Test.patch |
209 |
@@ -0,0 +1,123 @@ |
210 |
+diff -ruN mod_perl-2.0.10_pre201601.orig/Makefile.PL mod_perl-2.0.10_pre201601/Makefile.PL |
211 |
+--- mod_perl-2.0.10_pre201601.orig/Makefile.PL 2015-05-13 10:01:18.000000000 +0200 |
212 |
++++ mod_perl-2.0.10_pre201601/Makefile.PL 2016-01-09 21:02:00.000000000 +0100 |
213 |
+@@ -25,7 +25,7 @@ |
214 |
+ |
215 |
+ } |
216 |
+ |
217 |
+-use lib qw(lib Apache-Test/lib); |
218 |
++use lib qw(lib); |
219 |
+ |
220 |
+ use Config; |
221 |
+ use File::Spec::Functions; |
222 |
+@@ -122,15 +122,6 @@ |
223 |
+ |
224 |
+ sub configure { |
225 |
+ |
226 |
+- # mod_perl test suite relies on having Apache-Test bundled with |
227 |
+- # the mod_perl source, since any pre-installed version may not do |
228 |
+- # the right thing |
229 |
+- unless (-d "Apache-Test") { |
230 |
+- error "Can't find a sub-directory Apache-Test. " . |
231 |
+- "Make sure that you are using a complete source distribution"; |
232 |
+- exit 1; |
233 |
+- } |
234 |
+- |
235 |
+ set_modperl_version(); |
236 |
+ |
237 |
+ if ($old_modperl_version) { |
238 |
+@@ -853,14 +844,9 @@ |
239 |
+ run_subtests :: |
240 |
+ cd ModPerl-Registry && $(MAKE) test |
241 |
+ |
242 |
+-run_subtests :: |
243 |
+- cd Apache-Reload && $(MAKE) test |
244 |
+- |
245 |
+ EOF |
246 |
+ |
247 |
+ $preamble .= <<'EOF' unless $build->mpm_is_threaded(); |
248 |
+-run_subtests :: |
249 |
+- cd Apache-SizeLimit && $(MAKE) test |
250 |
+ |
251 |
+ EOF |
252 |
+ |
253 |
+@@ -871,42 +857,6 @@ |
254 |
+ return $preamble; |
255 |
+ } |
256 |
+ |
257 |
+-sub MY::postamble { |
258 |
+- my $self = shift; |
259 |
+- |
260 |
+- my $string = $self->ModPerl::BuildMM::MY::postamble; |
261 |
+- |
262 |
+- if (!WIN32) { |
263 |
+- $string .= <<'EOF'; |
264 |
+-rpm: dist |
265 |
+- @[ -d $(PWD)/rpm ] || mkdir $(PWD)/rpm |
266 |
+- rpmbuild -ta --define "_rpmdir $(PWD)/rpm" \ |
267 |
+- --define "_srcrpmdir $(PWD)/rpm" \ |
268 |
+- $(DISTVNAME).tar.gz |
269 |
+- @mv $(PWD)/rpm/*/*.rpm $(PWD)/rpm/ |
270 |
+- @rm -rf $(PWD)/rpm/*/ |
271 |
+- |
272 |
+-EOF |
273 |
+- } |
274 |
+- |
275 |
+- $string .= <<'EOF'; |
276 |
+-mydist : Apache-Test/META.yml mod_perl.spec manifest tardist |
277 |
+- |
278 |
+-mod_perl.spec: build/make_rpm_spec |
279 |
+- $(PERL) build/make_rpm_spec |
280 |
+- |
281 |
+-Apache-Test/META.yml: |
282 |
+- cd Apache-Test && make metafile |
283 |
+- |
284 |
+-tag : |
285 |
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/trunk https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM) |
286 |
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM) https://svn.apache.org/repos/asf/perl/modperl/tags/$(VERSION_SYM) |
287 |
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/docs/trunk https://svn.apache.org/repos/asf/perl/modperl/docs/tags/$(VERSION_SYM) |
288 |
+-EOF |
289 |
+- |
290 |
+- return $string; |
291 |
+-} |
292 |
+- |
293 |
+ # this is a workaround so that ModPerl::MM will move MY::constants |
294 |
+ # away, and Apache-Test/Makefile.PL which has its own MY::constants |
295 |
+ # won't get complaints on MY::constants redefined |
296 |
+diff -ruN mod_perl-2.0.10_pre201601.orig/lib/ModPerl/BuildMM.pm mod_perl-2.0.10_pre201601/lib/ModPerl/BuildMM.pm |
297 |
+--- mod_perl-2.0.10_pre201601.orig/lib/ModPerl/BuildMM.pm 2015-04-01 18:19:18.000000000 +0200 |
298 |
++++ mod_perl-2.0.10_pre201601/lib/ModPerl/BuildMM.pm 2016-01-09 21:04:34.000000000 +0100 |
299 |
+@@ -39,12 +39,10 @@ |
300 |
+ ModPerl::MM::override_eu_mm_mv_all_methods(@methods); |
301 |
+ use strict 'refs'; |
302 |
+ |
303 |
+-my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib"; |
304 |
+- |
305 |
+ #to override MakeMaker MOD_INSTALL macro |
306 |
+ sub mod_install { |
307 |
+ q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" . |
308 |
+- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" . |
309 |
++ qq{-MModPerl::BuildMM \\}."\n" . |
310 |
+ q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n"; |
311 |
+ } |
312 |
+ |
313 |
+@@ -271,7 +269,7 @@ |
314 |
+ |
315 |
+ push @target, |
316 |
+ '$(FULLPERL) -I$(INST_LIB) ' . |
317 |
+- "-I$apache_test_dir -MModPerl::BuildMM " . |
318 |
++ "-MModPerl::BuildMM " . |
319 |
+ "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib"; |
320 |
+ |
321 |
+ # Win32 doesn't normally install man pages |
322 |
+diff -ruN mod_perl-2.0.10_pre201601.orig/lib/ModPerl/Manifest.pm mod_perl-2.0.10_pre201601/lib/ModPerl/Manifest.pm |
323 |
+--- mod_perl-2.0.10_pre201601.orig/lib/ModPerl/Manifest.pm 2015-05-13 09:23:09.000000000 +0200 |
324 |
++++ mod_perl-2.0.10_pre201601/lib/ModPerl/Manifest.pm 2016-01-09 21:04:50.000000000 +0100 |
325 |
+@@ -119,7 +119,6 @@ |
326 |
+ t/apr-ext/perlio |
327 |
+ # PAUSE breaks if a dist has more than one META.yml. the top-level |
328 |
+ # META.yml already excludes Apache-Test from indexing |
329 |
+-Apache-Test/META.yml |
330 |
+ # exclude Apache-Test/MANIFEST since it confuses the mp2 build (e.g it |
331 |
+ # wants Apache-Test/META.yml which we don't supply, see above) |
332 |
+ Apache-Test/MANIFEST |
333 |
|
334 |
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch b/www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch |
335 |
new file mode 100644 |
336 |
index 0000000..5c51a80 |
337 |
--- /dev/null |
338 |
+++ b/www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch |
339 |
@@ -0,0 +1,22 @@ |
340 |
+https://bugs.gentoo.org/550244 |
341 |
+ |
342 |
+taken from Fedora: |
343 |
+http://pkgs.fedoraproject.org/cgit/mod_perl.git/tree/mod_perl-2.0.4-inline.patch?h=f22 |
344 |
+ |
345 |
+fixes building with gcc-5: |
346 |
+apache2: Syntax error on line 148 of /etc/apache2/httpd.conf: |
347 |
+Syntax error on line 2 of /etc/apache2/modules.d/75_mod_perl.conf: |
348 |
+Cannot load modules/mod_perl.so into server: |
349 |
+/usr/lib64/apache2/modules/mod_perl.so: undefined symbol: modperl_handler_name |
350 |
+ |
351 |
+--- mod_perl-2.0.4/src/modules/perl/modperl_common_util.h.inline |
352 |
++++ mod_perl-2.0.4/src/modules/perl/modperl_common_util.h |
353 |
+@@ -22,7 +22,7 @@ |
354 |
+ #ifdef MP_DEBUG |
355 |
+ #define MP_INLINE |
356 |
+ #else |
357 |
+-#define MP_INLINE APR_INLINE |
358 |
++#define MP_INLINE |
359 |
+ #endif |
360 |
+ |
361 |
+ #ifdef CYGWIN |
362 |
|
363 |
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.7-bundled-Apache-Test.patch b/www-apache/mod_perl/files/mod_perl-2.0.7-bundled-Apache-Test.patch |
364 |
new file mode 100644 |
365 |
index 0000000..478495e |
366 |
--- /dev/null |
367 |
+++ b/www-apache/mod_perl/files/mod_perl-2.0.7-bundled-Apache-Test.patch |
368 |
@@ -0,0 +1,134 @@ |
369 |
+diff --git a/Makefile.PL b/Makefile.PL |
370 |
+index c4a0430..e85cf01 100644 |
371 |
+--- a/Makefile.PL |
372 |
++++ b/Makefile.PL |
373 |
+@@ -24,7 +24,7 @@ BEGIN { |
374 |
+ |
375 |
+ } |
376 |
+ |
377 |
+-use lib qw(lib Apache-Test/lib); |
378 |
++use lib qw(lib); |
379 |
+ |
380 |
+ use Config; |
381 |
+ use File::Spec::Functions; |
382 |
+@@ -117,16 +117,6 @@ sub get_DEFINE { |
383 |
+ } |
384 |
+ |
385 |
+ sub configure { |
386 |
+- |
387 |
+- # mod_perl test suite relies on having Apache-Test bundled with |
388 |
+- # the mod_perl source, since any pre-installed version may not do |
389 |
+- # the right thing |
390 |
+- unless (-d "Apache-Test") { |
391 |
+- error "Can't find a sub-directory Apache-Test. " . |
392 |
+- "Make sure that you are using a complete source distribution"; |
393 |
+- exit 1; |
394 |
+- } |
395 |
+- |
396 |
+ set_modperl_version(); |
397 |
+ |
398 |
+ if ($old_modperl_version) { |
399 |
+@@ -798,14 +788,9 @@ run_tests : test_clean |
400 |
+ run_subtests :: |
401 |
+ cd ModPerl-Registry && $(MAKE) test |
402 |
+ |
403 |
+-run_subtests :: |
404 |
+- cd Apache-Reload && $(MAKE) test |
405 |
+- |
406 |
+ EOF |
407 |
+ |
408 |
+ $preamble .= <<'EOF' unless $build->mpm_is_threaded(); |
409 |
+-run_subtests :: |
410 |
+- cd Apache-SizeLimit && $(MAKE) test |
411 |
+ |
412 |
+ EOF |
413 |
+ |
414 |
+@@ -816,36 +801,6 @@ EOF |
415 |
+ return $preamble; |
416 |
+ } |
417 |
+ |
418 |
+-sub MY::postamble { |
419 |
+- my $self = shift; |
420 |
+- |
421 |
+- my $string = $self->ModPerl::BuildMM::MY::postamble; |
422 |
+- |
423 |
+- $string .= <<'EOF'; |
424 |
+-mydist : Apache-Test/META.yml mod_perl.spec manifest tardist |
425 |
+- |
426 |
+-rpm: dist |
427 |
+- @[ -d $(PWD)/rpm ] || mkdir $(PWD)/rpm |
428 |
+- rpmbuild -ta --define "_rpmdir $(PWD)/rpm" \ |
429 |
+- --define "_srcrpmdir $(PWD)/rpm" \ |
430 |
+- $(DISTVNAME).tar.gz |
431 |
+- @mv $(PWD)/rpm/*/*.rpm $(PWD)/rpm/ |
432 |
+- @rm -rf $(PWD)/rpm/*/ |
433 |
+- |
434 |
+-mod_perl.spec: build/make_rpm_spec |
435 |
+- $(PERL) build/make_rpm_spec |
436 |
+- |
437 |
+-Apache-Test/META.yml: |
438 |
+- cd Apache-Test && make metafile |
439 |
+- |
440 |
+-tag : |
441 |
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM) https://svn.apache.org/repos/asf/perl/modperl/tags/$(VERSION_SYM) |
442 |
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/docs/trunk https://svn.apache.org/repos/asf/perl/modperl/docs/tags/$(VERSION_SYM) |
443 |
+-EOF |
444 |
+- |
445 |
+- return $string; |
446 |
+-} |
447 |
+- |
448 |
+ # this is a workaround so that ModPerl::MM will move MY::constants |
449 |
+ # away, and Apache-Test/Makefile.PL which has its own MY::constants |
450 |
+ # won't get complaints on MY::constants redefined |
451 |
+diff --git a/ModPerl-Registry/Makefile.PL b/ModPerl-Registry/Makefile.PL |
452 |
+index e72e65c..8610935 100644 |
453 |
+--- a/ModPerl-Registry/Makefile.PL |
454 |
++++ b/ModPerl-Registry/Makefile.PL |
455 |
+@@ -14,7 +14,7 @@ use Apache::TestMM qw(test clean); |
456 |
+ |
457 |
+ # prerequisites |
458 |
+ my %require = ( |
459 |
+- "Apache::Test" => "", # any version will do? |
460 |
++ "Apache::Test" => 0, # any version will do? |
461 |
+ ); |
462 |
+ |
463 |
+ my @scripts = qw(t/TEST t/SMOKE); |
464 |
+diff --git a/lib/ModPerl/BuildMM.pm b/lib/ModPerl/BuildMM.pm |
465 |
+index 1c729e2..8651999 100644 |
466 |
+--- a/lib/ModPerl/BuildMM.pm |
467 |
++++ b/lib/ModPerl/BuildMM.pm |
468 |
+@@ -38,12 +38,10 @@ my @methods = grep *{$stash->{$_}}{CODE}, keys %$stash; |
469 |
+ ModPerl::MM::override_eu_mm_mv_all_methods(@methods); |
470 |
+ use strict 'refs'; |
471 |
+ |
472 |
+-my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib"; |
473 |
+- |
474 |
+ #to override MakeMaker MOD_INSTALL macro |
475 |
+ sub mod_install { |
476 |
+ q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" . |
477 |
+- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" . |
478 |
++ qq{-MModPerl::BuildMM \\}."\n" . |
479 |
+ q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n"; |
480 |
+ } |
481 |
+ |
482 |
+@@ -269,7 +267,7 @@ sub ModPerl::BuildMM::MY::postamble { |
483 |
+ |
484 |
+ push @target, |
485 |
+ '$(FULLPERL) -I$(INST_LIB) ' . |
486 |
+- "-I$apache_test_dir -MModPerl::BuildMM " . |
487 |
++ "-MModPerl::BuildMM " . |
488 |
+ "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib"; |
489 |
+ |
490 |
+ # Win32 doesn't normally install man pages |
491 |
+diff --git a/lib/ModPerl/Manifest.pm b/lib/ModPerl/Manifest.pm |
492 |
+index 1e856bc..9f1833c 100644 |
493 |
+--- a/lib/ModPerl/Manifest.pm |
494 |
++++ b/lib/ModPerl/Manifest.pm |
495 |
+@@ -33,7 +33,6 @@ our @EXPORT_OK = qw(mkmanifest); |
496 |
+ my @add_files = qw{ |
497 |
+ MANIFEST |
498 |
+ mod_perl.spec |
499 |
+- Apache-Test/META.yml |
500 |
+ }; |
501 |
+ |
502 |
+ sub get_svn_files { |
503 |
|
504 |
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.8-bundled-Apache-Test.patch b/www-apache/mod_perl/files/mod_perl-2.0.8-bundled-Apache-Test.patch |
505 |
new file mode 100644 |
506 |
index 0000000..2e4da92 |
507 |
--- /dev/null |
508 |
+++ b/www-apache/mod_perl/files/mod_perl-2.0.8-bundled-Apache-Test.patch |
509 |
@@ -0,0 +1,127 @@ |
510 |
+--- a/Makefile.PL |
511 |
++++ b/Makefile.PL |
512 |
+@@ -24,7 +24,7 @@ BEGIN { |
513 |
+ |
514 |
+ } |
515 |
+ |
516 |
+-use lib qw(lib Apache-Test/lib); |
517 |
++use lib qw(lib); |
518 |
+ |
519 |
+ use Config; |
520 |
+ use File::Spec::Functions; |
521 |
+@@ -117,16 +117,6 @@ sub get_DEFINE { |
522 |
+ } |
523 |
+ |
524 |
+ sub configure { |
525 |
+- |
526 |
+- # mod_perl test suite relies on having Apache-Test bundled with |
527 |
+- # the mod_perl source, since any pre-installed version may not do |
528 |
+- # the right thing |
529 |
+- unless (-d "Apache-Test") { |
530 |
+- error "Can't find a sub-directory Apache-Test. " . |
531 |
+- "Make sure that you are using a complete source distribution"; |
532 |
+- exit 1; |
533 |
+- } |
534 |
+- |
535 |
+ set_modperl_version(); |
536 |
+ |
537 |
+ if ($old_modperl_version) { |
538 |
+@@ -798,14 +788,9 @@ run_tests : test_clean |
539 |
+ run_subtests :: |
540 |
+ cd ModPerl-Registry && $(MAKE) test |
541 |
+ |
542 |
+-run_subtests :: |
543 |
+- cd Apache-Reload && $(MAKE) test |
544 |
+- |
545 |
+ EOF |
546 |
+ |
547 |
+ $preamble .= <<'EOF' unless $build->mpm_is_threaded(); |
548 |
+-run_subtests :: |
549 |
+- cd Apache-SizeLimit && $(MAKE) test |
550 |
+ |
551 |
+ EOF |
552 |
+ |
553 |
+@@ -816,37 +801,6 @@ EOF |
554 |
+ return $preamble; |
555 |
+ } |
556 |
+ |
557 |
+-sub MY::postamble { |
558 |
+- my $self = shift; |
559 |
+- |
560 |
+- my $string = $self->ModPerl::BuildMM::MY::postamble; |
561 |
+- |
562 |
+- $string .= <<'EOF'; |
563 |
+-mydist : Apache-Test/META.yml mod_perl.spec manifest tardist |
564 |
+- |
565 |
+-rpm: dist |
566 |
+- @[ -d $(PWD)/rpm ] || mkdir $(PWD)/rpm |
567 |
+- rpmbuild -ta --define "_rpmdir $(PWD)/rpm" \ |
568 |
+- --define "_srcrpmdir $(PWD)/rpm" \ |
569 |
+- $(DISTVNAME).tar.gz |
570 |
+- @mv $(PWD)/rpm/*/*.rpm $(PWD)/rpm/ |
571 |
+- @rm -rf $(PWD)/rpm/*/ |
572 |
+- |
573 |
+-mod_perl.spec: build/make_rpm_spec |
574 |
+- $(PERL) build/make_rpm_spec |
575 |
+- |
576 |
+-Apache-Test/META.yml: |
577 |
+- cd Apache-Test && make metafile |
578 |
+- |
579 |
+-tag : |
580 |
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/trunk https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM) |
581 |
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/branches/release/$(VERSION_SYM) https://svn.apache.org/repos/asf/perl/modperl/tags/$(VERSION_SYM) |
582 |
+- svn copy https://svn.apache.org/repos/asf/perl/modperl/docs/trunk https://svn.apache.org/repos/asf/perl/modperl/docs/tags/$(VERSION_SYM) |
583 |
+-EOF |
584 |
+- |
585 |
+- return $string; |
586 |
+-} |
587 |
+- |
588 |
+ # this is a workaround so that ModPerl::MM will move MY::constants |
589 |
+ # away, and Apache-Test/Makefile.PL which has its own MY::constants |
590 |
+ # won't get complaints on MY::constants redefined |
591 |
+--- a/ModPerl-Registry/Makefile.PL |
592 |
++++ b/ModPerl-Registry/Makefile.PL |
593 |
+@@ -14,7 +14,7 @@ use Apache::TestMM qw(test clean); |
594 |
+ |
595 |
+ # prerequisites |
596 |
+ my %require = ( |
597 |
+- "Apache::Test" => "", # any version will do? |
598 |
++ "Apache::Test" => 0, # any version will do? |
599 |
+ ); |
600 |
+ |
601 |
+ my @scripts = qw(t/TEST t/SMOKE); |
602 |
+--- a/lib/ModPerl/BuildMM.pm |
603 |
++++ b/lib/ModPerl/BuildMM.pm |
604 |
+@@ -38,12 +38,10 @@ my @methods = grep *{$stash->{$_}}{CODE} |
605 |
+ ModPerl::MM::override_eu_mm_mv_all_methods(@methods); |
606 |
+ use strict 'refs'; |
607 |
+ |
608 |
+-my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib"; |
609 |
+- |
610 |
+ #to override MakeMaker MOD_INSTALL macro |
611 |
+ sub mod_install { |
612 |
+ q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" . |
613 |
+- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" . |
614 |
++ qq{-MModPerl::BuildMM \\}."\n" . |
615 |
+ q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n"; |
616 |
+ } |
617 |
+ |
618 |
+@@ -269,7 +267,7 @@ sub ModPerl::BuildMM::MY::postamble { |
619 |
+ |
620 |
+ push @target, |
621 |
+ '$(FULLPERL) -I$(INST_LIB) ' . |
622 |
+- "-I$apache_test_dir -MModPerl::BuildMM " . |
623 |
++ "-MModPerl::BuildMM " . |
624 |
+ "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib"; |
625 |
+ |
626 |
+ # Win32 doesn't normally install man pages |
627 |
+--- a/lib/ModPerl/Manifest.pm |
628 |
++++ b/lib/ModPerl/Manifest.pm |
629 |
+@@ -33,7 +33,6 @@ our @EXPORT_OK = qw(mkmanifest); |
630 |
+ my @add_files = qw{ |
631 |
+ MANIFEST |
632 |
+ mod_perl.spec |
633 |
+- Apache-Test/META.yml |
634 |
+ }; |
635 |
+ |
636 |
+ sub get_svn_files { |
637 |
|
638 |
diff --git a/www-apache/mod_perl/files/mod_perl_init_b554794.patch b/www-apache/mod_perl/files/mod_perl_init_b554794.patch |
639 |
new file mode 100644 |
640 |
index 0000000..b33a34a |
641 |
--- /dev/null |
642 |
+++ b/www-apache/mod_perl/files/mod_perl_init_b554794.patch |
643 |
@@ -0,0 +1,241 @@ |
644 |
+--- a/src/modules/perl/modperl_env.c.orig 2015-12-28 11:42:26.604632457 +0100 |
645 |
++++ b/src/modules/perl/modperl_env.c 2015-12-28 12:36:35.305228288 +0100 |
646 |
+@@ -120,6 +120,7 @@ |
647 |
+ const apr_array_header_t *array; |
648 |
+ apr_table_entry_t *elts; |
649 |
+ |
650 |
++ modperl_env_init(aTHX); |
651 |
+ modperl_env_untie(mg_flags); |
652 |
+ |
653 |
+ array = apr_table_elts(table); |
654 |
+@@ -431,13 +432,11 @@ |
655 |
+ } |
656 |
+ |
657 |
+ /* to store the original virtual tables |
658 |
+- * these are global, not per-interpreter |
659 |
++ * handy access to perl's original virtual tables |
660 |
+ */ |
661 |
+-static MGVTBL MP_PERL_vtbl_env; |
662 |
+-static MGVTBL MP_PERL_vtbl_envelem; |
663 |
+ |
664 |
+ #define MP_PL_vtbl_call(name, meth) \ |
665 |
+- MP_PERL_vtbl_##name.svt_##meth(aTHX_ sv, mg) |
666 |
++ PL_vtbl_##name.svt_##meth(aTHX_ sv, mg) |
667 |
+ |
668 |
+ #define MP_dENV_KEY \ |
669 |
+ STRLEN klen; \ |
670 |
+@@ -534,6 +533,26 @@ |
671 |
+ return 0; |
672 |
+ } |
673 |
+ |
674 |
++static int modperl_env_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, const char *name, I32 namlen) |
675 |
++{ |
676 |
++ MP_TRACE_e(MP_FUNC, "setting up %%ENV element magic"); |
677 |
++ sv_magicext(nsv, mg->mg_obj, toLOWER(mg->mg_type), &MP_vtbl_envelem, name, namlen); |
678 |
++ |
679 |
++ return 1; |
680 |
++} |
681 |
++ |
682 |
++static int modperl_env_magic_local_all(pTHX_ SV *nsv, MAGIC *mg) |
683 |
++{ |
684 |
++ MAGIC *nmg; |
685 |
++ MP_TRACE_e(MP_FUNC, "localizing %%ENV"); |
686 |
++ nmg = sv_magicext(nsv, mg->mg_obj, mg->mg_type, &MP_vtbl_env, (char*)NULL, 0); |
687 |
++ nmg->mg_ptr = mg->mg_ptr; |
688 |
++ nmg->mg_flags |= MGf_COPY; |
689 |
++ nmg->mg_flags |= MGf_LOCAL; |
690 |
++ |
691 |
++ return 1; |
692 |
++} |
693 |
++ |
694 |
+ static int modperl_env_magic_set(pTHX_ SV *sv, MAGIC *mg) |
695 |
+ { |
696 |
+ request_rec *r = (request_rec *)EnvMgObj; |
697 |
+@@ -625,15 +644,18 @@ |
698 |
+ #endif |
699 |
+ |
700 |
+ /* override %ENV virtual tables with our own */ |
701 |
+-static MGVTBL MP_vtbl_env = { |
702 |
++MGVTBL MP_vtbl_env = { |
703 |
+ 0, |
704 |
+ modperl_env_magic_set_all, |
705 |
+ 0, |
706 |
+ modperl_env_magic_clear_all, |
707 |
+- 0 |
708 |
++ 0, |
709 |
++ modperl_env_magic_copy, |
710 |
++ 0, |
711 |
++ modperl_env_magic_local_all |
712 |
+ }; |
713 |
+ |
714 |
+-static MGVTBL MP_vtbl_envelem = { |
715 |
++MGVTBL MP_vtbl_envelem = { |
716 |
+ 0, |
717 |
+ modperl_env_magic_set, |
718 |
+ 0, |
719 |
+@@ -641,20 +663,62 @@ |
720 |
+ 0 |
721 |
+ }; |
722 |
+ |
723 |
+-void modperl_env_init(void) |
724 |
++void modperl_env_init(pTHX) |
725 |
+ { |
726 |
+- /* save originals */ |
727 |
+- StructCopy(&PL_vtbl_env, &MP_PERL_vtbl_env, MGVTBL); |
728 |
+- StructCopy(&PL_vtbl_envelem, &MP_PERL_vtbl_envelem, MGVTBL); |
729 |
++ MAGIC *mg; |
730 |
+ |
731 |
+- /* replace with our versions */ |
732 |
+- StructCopy(&MP_vtbl_env, &PL_vtbl_env, MGVTBL); |
733 |
+- StructCopy(&MP_vtbl_envelem, &PL_vtbl_envelem, MGVTBL); |
734 |
++ /* Find the 'E' magic on %ENV */ |
735 |
++ if (!my_perl) |
736 |
++ return; |
737 |
++ if (!PL_envgv) |
738 |
++ return; |
739 |
++ if (!SvRMAGICAL(ENVHV)) |
740 |
++ return; |
741 |
++ mg = mg_find((const SV *)ENVHV, PERL_MAGIC_env); |
742 |
++ if (!mg) |
743 |
++ return; |
744 |
++ |
745 |
++ /* Ignore it if it isn't perl's original version */ |
746 |
++ if (mg->mg_virtual != &PL_vtbl_env) |
747 |
++ return; |
748 |
++ |
749 |
++ MP_TRACE_e(MP_FUNC, "env_init - ptr: %x obj: %x flags: %x", |
750 |
++ mg->mg_ptr, mg->mg_obj, mg->mg_flags); |
751 |
++ |
752 |
++ /* Remove it */ |
753 |
++ mg_free_type((SV*)ENVHV, PERL_MAGIC_env); |
754 |
++ |
755 |
++ /* Add our version instead */ |
756 |
++ mg = sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &MP_vtbl_env, (char*)NULL, 0); |
757 |
++ mg->mg_flags |= MGf_COPY; |
758 |
++ mg->mg_flags |= MGf_LOCAL; |
759 |
+ } |
760 |
+ |
761 |
+-void modperl_env_unload(void) |
762 |
++void modperl_env_unload(pTHX) |
763 |
+ { |
764 |
+- /* restore originals */ |
765 |
+- StructCopy(&MP_PERL_vtbl_env, &PL_vtbl_env, MGVTBL); |
766 |
+- StructCopy(&MP_PERL_vtbl_envelem, &PL_vtbl_envelem, MGVTBL); |
767 |
++ MAGIC *mg; |
768 |
++ |
769 |
++ /* Find the 'E' magic on %ENV */ |
770 |
++ if (!my_perl) |
771 |
++ return; |
772 |
++ if (!PL_envgv) |
773 |
++ return; |
774 |
++ if (!SvRMAGICAL(ENVHV)) |
775 |
++ return; |
776 |
++ mg = mg_find((const SV *)ENVHV, PERL_MAGIC_env); |
777 |
++ if (!mg) |
778 |
++ return; |
779 |
++ |
780 |
++ /* Ignore it if it isn't our version */ |
781 |
++ if (mg->mg_virtual != &MP_vtbl_env) |
782 |
++ return; |
783 |
++ |
784 |
++ MP_TRACE_e(MP_FUNC, "env_unload - ptr: %x obj: %x flags: %x", |
785 |
++ mg->mg_ptr, mg->mg_obj, mg->mg_flags); |
786 |
++ |
787 |
++ /* Remove it */ |
788 |
++ mg_free_type((SV*)ENVHV, PERL_MAGIC_env); |
789 |
++ |
790 |
++ /* Restore perl's original version */ |
791 |
++ sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &PL_vtbl_env, (char*)NULL, 0); |
792 |
+ } |
793 |
+--- a/src/modules/perl/modperl_env.h.orig 2015-12-28 11:42:34.868727490 +0100 |
794 |
++++ b/src/modules/perl/modperl_env.h 2015-12-28 12:37:47.730041274 +0100 |
795 |
+@@ -28,7 +28,7 @@ |
796 |
+ MP_magical_tie(ENVHV, mg_flags) |
797 |
+ |
798 |
+ #define modperl_envelem_tie(sv, key, klen) \ |
799 |
+- sv_magic(sv, (SV *)NULL, 'e', key, klen) |
800 |
++ sv_magicext(sv, (SV *)NULL, PERL_MAGIC_envelem, &MP_vtbl_envelem, key, klen) |
801 |
+ |
802 |
+ void modperl_env_hash_keys(pTHX); |
803 |
+ |
804 |
+@@ -58,8 +58,11 @@ |
805 |
+ |
806 |
+ void modperl_env_request_untie(pTHX_ request_rec *r); |
807 |
+ |
808 |
+-void modperl_env_init(void); |
809 |
++void modperl_env_init(pTHX); |
810 |
+ |
811 |
+-void modperl_env_unload(void); |
812 |
++void modperl_env_unload(pTHX); |
813 |
++ |
814 |
++MGVTBL MP_vtbl_env; |
815 |
++MGVTBL MP_vtbl_envelem; |
816 |
+ |
817 |
+ #endif /* MODPERL_ENV_H */ |
818 |
+Index: trunk/src/modules/perl/modperl_perl.c |
819 |
+=================================================================== |
820 |
+--- trunk/src/modules/perl/modperl_perl.c (revision 1717473) |
821 |
++++ trunk/src/modules/perl/modperl_perl.c (revision 1717474) |
822 |
+@@ -181,6 +181,8 @@ |
823 |
+ } |
824 |
+ } |
825 |
+ |
826 |
++ modperl_env_unload(perl); |
827 |
++ |
828 |
+ perl_destruct(perl); |
829 |
+ |
830 |
+ /* XXX: big bug in 5.6.1 fixed in 5.7.2+ |
831 |
+Index: trunk/src/modules/perl/mod_perl.c |
832 |
+=================================================================== |
833 |
+--- trunk/src/modules/perl/mod_perl.c (revision 1717473) |
834 |
++++ trunk/src/modules/perl/mod_perl.c (revision 1717474) |
835 |
+@@ -262,6 +262,8 @@ |
836 |
+ exit(1); |
837 |
+ } |
838 |
+ |
839 |
++ modperl_env_init(aTHX); |
840 |
++ |
841 |
+ /* suspend END blocks to be run at server shutdown */ |
842 |
+ endav = PL_endav; |
843 |
+ PL_endav = (AV *)NULL; |
844 |
+@@ -576,9 +578,6 @@ |
845 |
+ /* modifies PL_ppaddr */ |
846 |
+ modperl_perl_pp_set_all(); |
847 |
+ |
848 |
+- /* modifies PL_vtbl_env{elem} */ |
849 |
+- modperl_env_init(); |
850 |
+- |
851 |
+ return APR_SUCCESS; |
852 |
+ } |
853 |
+ |
854 |
+@@ -597,8 +596,6 @@ |
855 |
+ |
856 |
+ MP_TRACE_i(MP_FUNC, "mod_perl sys term"); |
857 |
+ |
858 |
+- modperl_env_unload(); |
859 |
+- |
860 |
+ modperl_perl_pp_unset_all(); |
861 |
+ |
862 |
+ PERL_SYS_TERM(); |
863 |
+Index: trunk/t/response/TestModperl/env.pm |
864 |
+=================================================================== |
865 |
+--- trunk/t/response/TestModperl/env.pm (revision 1717473) |
866 |
++++ trunk/t/response/TestModperl/env.pm (revision 1717474) |
867 |
+@@ -15,7 +15,7 @@ |
868 |
+ sub handler { |
869 |
+ my $r = shift; |
870 |
+ |
871 |
+- plan $r, tests => 23 + keys(%ENV); |
872 |
++ plan $r, tests => 23 + 3 * keys(%ENV); |
873 |
+ |
874 |
+ my $env = $r->subprocess_env; |
875 |
+ |
876 |
+@@ -75,6 +75,8 @@ |
877 |
+ for my $key (sort keys %ENV) { |
878 |
+ eval { delete $ENV{$key}; }; |
879 |
+ ok t_cmp($@, '', $key); |
880 |
++ ok t_cmp($ENV{$key}, undef, "ENV{$key} is empty"); |
881 |
++ ok t_cmp($env->get($key), undef, "subprocess_env($key) is empty"); |
882 |
+ } |
883 |
+ |
884 |
+ Apache2::Const::OK; |
885 |
|
886 |
diff --git a/www-apache/mod_perl/files/use-client_ip-client_add-instead-of-remote_ip-remote.patch b/www-apache/mod_perl/files/use-client_ip-client_add-instead-of-remote_ip-remote.patch |
887 |
new file mode 100644 |
888 |
index 0000000..1a695b8 |
889 |
--- /dev/null |
890 |
+++ b/www-apache/mod_perl/files/use-client_ip-client_add-instead-of-remote_ip-remote.patch |
891 |
@@ -0,0 +1,47 @@ |
892 |
+From 3fb7843aa2aa992be430068929f4e1cc7787a233 Mon Sep 17 00:00:00 2001 |
893 |
+From: Martin Jansa <Martin.Jansa@×××××.com> |
894 |
+Date: Tue, 3 Apr 2012 19:25:41 +0200 |
895 |
+Subject: [PATCH] use client_ip/client_add instead of remote_ip/remote_addr |
896 |
+ |
897 |
+Signed-off-by: Martin Jansa <Martin.Jansa@×××××.com> |
898 |
+--- |
899 |
+ xs/maps/apache2_structures.map | 4 ++-- |
900 |
+ xs/tables/current/Apache2/StructureTable.pm | 4 ++-- |
901 |
+ 2 files changed, 4 insertions(+), 4 deletions(-) |
902 |
+ |
903 |
+diff --git a/xs/maps/apache2_structures.map b/xs/maps/apache2_structures.map |
904 |
+index f86ec93..c0fcf78 100644 |
905 |
+--- a/xs/maps/apache2_structures.map |
906 |
++++ b/xs/maps/apache2_structures.map |
907 |
+@@ -106,8 +106,8 @@ $ limit_req_fields |
908 |
+ < local_addr |
909 |
+ < local_ip |
910 |
+ < local_host |
911 |
+-< remote_addr |
912 |
+- remote_ip |
913 |
++< client_addr |
914 |
++ client_ip |
915 |
+ < remote_host |
916 |
+ - remote_logname |
917 |
+ < aborted |
918 |
+diff --git a/xs/tables/current/Apache2/StructureTable.pm b/xs/tables/current/Apache2/StructureTable.pm |
919 |
+index af50be1..0c0465a 100644 |
920 |
+--- a/xs/tables/current/Apache2/StructureTable.pm |
921 |
++++ b/xs/tables/current/Apache2/StructureTable.pm |
922 |
+@@ -2708,11 +2708,11 @@ $Apache2::StructureTable = [ |
923 |
+ }, |
924 |
+ { |
925 |
+ 'type' => 'apr_sockaddr_t *', |
926 |
+- 'name' => 'remote_addr' |
927 |
++ 'name' => 'client_addr' |
928 |
+ }, |
929 |
+ { |
930 |
+ 'type' => 'char *', |
931 |
+- 'name' => 'remote_ip' |
932 |
++ 'name' => 'client_ip' |
933 |
+ }, |
934 |
+ { |
935 |
+ 'type' => 'char *', |
936 |
+-- |
937 |
+1.7.8.5 |
938 |
+ |
939 |
|
940 |
diff --git a/www-apache/mod_perl/files/use-log.level-instead-of-loglevel.patch b/www-apache/mod_perl/files/use-log.level-instead-of-loglevel.patch |
941 |
new file mode 100644 |
942 |
index 0000000..aeb8d98 |
943 |
--- /dev/null |
944 |
+++ b/www-apache/mod_perl/files/use-log.level-instead-of-loglevel.patch |
945 |
@@ -0,0 +1,27 @@ |
946 |
+From 0d6ac25c1c7871be52e8399c6e8bc8509ed5f3d9 Mon Sep 17 00:00:00 2001 |
947 |
+From: Martin Jansa <Martin.Jansa@×××××.com> |
948 |
+Date: Tue, 3 Apr 2012 19:30:33 +0200 |
949 |
+Subject: [PATCH] use log.level instead of loglevel |
950 |
+ |
951 |
+Signed-off-by: Martin Jansa <Martin.Jansa@×××××.com> |
952 |
+--- |
953 |
+ xs/maps/apache2_structures.map | 2 +- |
954 |
+ xs/tables/current/Apache2/StructureTable.pm | 2 +- |
955 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
956 |
+ |
957 |
+diff --git a/xs/tables/current/Apache2/StructureTable.pm b/xs/tables/current/Apache2/StructureTable.pm |
958 |
+index 0c0465a..439184e 100644 |
959 |
+--- a/xs/tables/current/Apache2/StructureTable.pm |
960 |
++++ b/xs/tables/current/Apache2/StructureTable.pm |
961 |
+@@ -3245,7 +3245,7 @@ $Apache2::StructureTable = [ |
962 |
+ }, |
963 |
+ { |
964 |
+ 'type' => 'int', |
965 |
+- 'name' => 'loglevel' |
966 |
++ 'name' => 'log.level' |
967 |
+ }, |
968 |
+ { |
969 |
+ 'type' => 'int', |
970 |
+-- |
971 |
+1.7.8.5 |
972 |
+ |
973 |
|
974 |
diff --git a/www-apache/mod_perl/metadata.xml b/www-apache/mod_perl/metadata.xml |
975 |
new file mode 100644 |
976 |
index 0000000..f75208c |
977 |
--- /dev/null |
978 |
+++ b/www-apache/mod_perl/metadata.xml |
979 |
@@ -0,0 +1,12 @@ |
980 |
+<?xml version="1.0" encoding="UTF-8"?> |
981 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
982 |
+<pkgmetadata> |
983 |
+ <maintainer type="person"> |
984 |
+ <email>idl0r@g.o</email> |
985 |
+ <name>Christian Ruppert</name> |
986 |
+ </maintainer> |
987 |
+<maintainer type="project"> |
988 |
+ <email>perl@g.o</email> |
989 |
+ <name>Gentoo Perl Project</name> |
990 |
+ </maintainer> |
991 |
+</pkgmetadata> |
992 |
|
993 |
diff --git a/www-apache/mod_perl/mod_perl-2.0.10_pre201601.ebuild b/www-apache/mod_perl/mod_perl-2.0.10_pre201601.ebuild |
994 |
new file mode 100644 |
995 |
index 0000000..9735237 |
996 |
--- /dev/null |
997 |
+++ b/www-apache/mod_perl/mod_perl-2.0.10_pre201601.ebuild |
998 |
@@ -0,0 +1,165 @@ |
999 |
+# Copyright 1999-2016 Gentoo Foundation |
1000 |
+# Distributed under the terms of the GNU General Public License v2 |
1001 |
+# $Id$ |
1002 |
+ |
1003 |
+EAPI=5 |
1004 |
+ |
1005 |
+inherit depend.apache apache-module perl-module eutils |
1006 |
+ |
1007 |
+DESCRIPTION="An embedded Perl interpreter for Apache2" |
1008 |
+HOMEPAGE="https://projects.apache.org/projects/mod_perl.html" |
1009 |
+#SRC_URI="mirror://apache/perl/${P}.tar.gz" |
1010 |
+SRC_URI="http://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.gz" |
1011 |
+ |
1012 |
+LICENSE="GPL-2" |
1013 |
+SLOT="1" |
1014 |
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86" |
1015 |
+IUSE="debug" |
1016 |
+ |
1017 |
+# Make sure we always use the latest Apache-Test version or even check the |
1018 |
+# version of the bundled Apache-Test! |
1019 |
+# |
1020 |
+# We need both, apache and perl but either apache without threads or perl with |
1021 |
+# ithreads, bug 373943 |
1022 |
+DEPEND=" |
1023 |
+ >=dev-perl/Apache-Test-1.360 |
1024 |
+ >=dev-perl/CGI-3.08 |
1025 |
+ dev-lang/perl[ithreads] |
1026 |
+ www-servers/apache |
1027 |
+" |
1028 |
+RDEPEND="${DEPEND}" |
1029 |
+PDEPEND=">=dev-perl/Apache-Reload-0.11 |
1030 |
+ >=dev-perl/Apache-SizeLimit-0.95" |
1031 |
+ |
1032 |
+APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so" |
1033 |
+APACHE2_MOD_CONF="2.0.3/75_${PN}" |
1034 |
+APACHE2_MOD_DEFINE="PERL" |
1035 |
+ |
1036 |
+SRC_TEST="do" |
1037 |
+ |
1038 |
+DOCFILES="Changes INSTALL README STATUS" |
1039 |
+ |
1040 |
+need_apache2 |
1041 |
+ |
1042 |
+src_prepare() { |
1043 |
+ perl-module_src_prepare |
1044 |
+ |
1045 |
+ # I am not entirely happy with this solution, but here's what's |
1046 |
+ # going on here if someone wants to take a stab at another |
1047 |
+ # approach. When userpriv compilation is off, then the make |
1048 |
+ # process drops to user "nobody" to run the test servers. This |
1049 |
+ # server is closed, and then the socket is rebound using |
1050 |
+ # SO_REUSEADDR. If the same user does this, there is no problem, |
1051 |
+ # and the socket may be rebound immediately. If a different user |
1052 |
+ # (yes, in my testing, even root) attempts to rebind, it fails. |
1053 |
+ # Since the "is the socket available yet" code and the |
1054 |
+ # second-batch bind call both run as root, this will fail. |
1055 |
+ |
1056 |
+ # The upstream settings on my test machine cause the second batch |
1057 |
+ # of tests to fail, believing the socket to still be in use. I |
1058 |
+ # tried patching various parts to make them run as the user |
1059 |
+ # specified in $config->{vars}{user} using getpwnam, but found |
1060 |
+ # this patch to be fairly intrusive, because the userid must be |
1061 |
+ # restored and the patch must be applied to multiple places. |
1062 |
+ |
1063 |
+ # For now, we will simply extend the timeout in hopes that in the |
1064 |
+ # non-userpriv case, the socket will clear from the kernel tables |
1065 |
+ # normally, and the tests will proceed. |
1066 |
+ |
1067 |
+ # If anybody is still having problems, then commenting out "make |
1068 |
+ # test" below should allow the software to build properly. |
1069 |
+ |
1070 |
+ # Robert Coie <rac@g.o> 2003.05.06 |
1071 |
+# sed -i -e "s/sleep \$_/sleep \$_ << 2/" \ |
1072 |
+# "${S}"/Apache-Test/lib/Apache/TestServer.pm \ |
1073 |
+# || die "problem editing TestServer.pm" |
1074 |
+ |
1075 |
+ # rendhalver - this got redone for 2.0.1 and seems to fix the make test problems |
1076 |
+ epatch "${FILESDIR}"/${PN}-2.0.1-sneak-tmpdir.patch |
1077 |
+ epatch "${FILESDIR}"/${PN}-2.0.4-inline.patch #550244 |
1078 |
+ |
1079 |
+ # bug 352724 |
1080 |
+ epatch "${FILESDIR}/${P}-bundled-Apache-Test.patch" |
1081 |
+ rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/ |
1082 |
+ |
1083 |
+# sed -i \ |
1084 |
+# -e 's:^Apache-\(Reload\|SizeLimit\|Test\).*::' \ |
1085 |
+# -e 's:^lib/Bundle/Apache2.pm::' \ |
1086 |
+# MANIFEST || die |
1087 |
+# uncomment this once we're packaging a proper release again |
1088 |
+ |
1089 |
+ # 410453 |
1090 |
+ epatch "${FILESDIR}/use-client_ip-client_add-instead-of-remote_ip-remote.patch" |
1091 |
+ epatch "${FILESDIR}/use-log.level-instead-of-loglevel.patch" |
1092 |
+} |
1093 |
+ |
1094 |
+src_configure() { |
1095 |
+ local debug=$(usex debug 1 0) |
1096 |
+ perl Makefile.PL \ |
1097 |
+ PREFIX="${EPREFIX}"/usr \ |
1098 |
+ INSTALLDIRS=vendor \ |
1099 |
+ MP_USE_DSO=1 \ |
1100 |
+ MP_APXS=${APXS} \ |
1101 |
+ MP_APR_CONFIG=/usr/bin/apr-1-config \ |
1102 |
+ MP_TRACE=${debug} \ |
1103 |
+ MP_DEBUG=${debug} \ |
1104 |
+ || die |
1105 |
+} |
1106 |
+ |
1107 |
+src_test() { |
1108 |
+ # make test notes whether it is running as root, and drops |
1109 |
+ # privileges all the way to "nobody" if so, so we must adjust |
1110 |
+ # write permissions accordingly in this case. |
1111 |
+ |
1112 |
+ # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail! |
1113 |
+ if [[ "$(id -u)" == "0" ]]; then |
1114 |
+ chown nobody:nobody "${WORKDIR}" "${T}" |
1115 |
+ fi |
1116 |
+ |
1117 |
+ # this does not || die because of bug 21325. kudos to smark for |
1118 |
+ # the idea of setting HOME. |
1119 |
+ TMPDIR="${T}" HOME="${T}/" perl-module_src_test |
1120 |
+} |
1121 |
+ |
1122 |
+src_install() { |
1123 |
+ apache-module_src_install |
1124 |
+ |
1125 |
+ default |
1126 |
+#emake DESTDIR="${D}" install || die |
1127 |
+ |
1128 |
+ # TODO: add some stuff from docs/ back? |
1129 |
+ |
1130 |
+ # rendhalver - fix the perllocal.pod that gets installed |
1131 |
+ # it seems to me that this has been getting installed for ages |
1132 |
+ perl_delete_localpod |
1133 |
+ # Remove empty .bs files as well |
1134 |
+ perl_delete_packlist |
1135 |
+ |
1136 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
1137 |
+ doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl |
1138 |
+ |
1139 |
+ # this is an attempt to get @INC in line with /usr/bin/perl. |
1140 |
+ # there is blib garbage in the mainstream one that can only be |
1141 |
+ # useful during internal testing, so we wait until here and then |
1142 |
+ # just go with a clean slate. should be much easier to see what's |
1143 |
+ # happening and revert if problematic. |
1144 |
+ |
1145 |
+ # Sorry for this evil hack... |
1146 |
+ perl_set_version # just to be sure... |
1147 |
+ sed -i \ |
1148 |
+ -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \ |
1149 |
+ -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \ |
1150 |
+ -e "s,${S}\(/[^[:space:]\"\']\+\)\?,/,g" \ |
1151 |
+ "${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die |
1152 |
+ |
1153 |
+ for fname in $(find "${D}" -type f -not -name '*.so'); do |
1154 |
+ grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}" |
1155 |
+ sed -i -e "s:\(${D}\|${S}\):/:g" ${fname} |
1156 |
+ done |
1157 |
+ # All the rest |
1158 |
+ perl_remove_temppath |
1159 |
+} |
1160 |
+ |
1161 |
+pkg_postinst() { |
1162 |
+ apache-module_pkg_postinst |
1163 |
+} |
1164 |
|
1165 |
diff --git a/www-apache/mod_perl/mod_perl-2.0.8-r3.ebuild b/www-apache/mod_perl/mod_perl-2.0.8-r3.ebuild |
1166 |
new file mode 100644 |
1167 |
index 0000000..0f895d1 |
1168 |
--- /dev/null |
1169 |
+++ b/www-apache/mod_perl/mod_perl-2.0.8-r3.ebuild |
1170 |
@@ -0,0 +1,165 @@ |
1171 |
+# Copyright 1999-2016 Gentoo Foundation |
1172 |
+# Distributed under the terms of the GNU General Public License v2 |
1173 |
+# $Id$ |
1174 |
+ |
1175 |
+EAPI="5" |
1176 |
+ |
1177 |
+inherit depend.apache apache-module perl-module eutils |
1178 |
+ |
1179 |
+DESCRIPTION="An embedded Perl interpreter for Apache2" |
1180 |
+HOMEPAGE="https://projects.apache.org/projects/mod_perl.html" |
1181 |
+SRC_URI="mirror://apache/perl/${P}.tar.gz" |
1182 |
+ |
1183 |
+LICENSE="GPL-2" |
1184 |
+SLOT="1" |
1185 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
1186 |
+IUSE="debug" |
1187 |
+ |
1188 |
+# Make sure we always use the latest Apache-Test version or even check the |
1189 |
+# version of the bundled Apache-Test! |
1190 |
+# |
1191 |
+# We need both, apache and perl but either apache without threads or perl with |
1192 |
+# ithreads, bug 373943 |
1193 |
+DEPEND=" |
1194 |
+ >=dev-perl/Apache-Test-1.360 |
1195 |
+ >=dev-perl/CGI-3.08 |
1196 |
+ dev-lang/perl[ithreads] |
1197 |
+ www-servers/apache |
1198 |
+" |
1199 |
+RDEPEND="${DEPEND}" |
1200 |
+PDEPEND=">=dev-perl/Apache-Reload-0.11 |
1201 |
+ >=dev-perl/Apache-SizeLimit-0.95" |
1202 |
+ |
1203 |
+APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so" |
1204 |
+APACHE2_MOD_CONF="2.0.3/75_${PN}" |
1205 |
+APACHE2_MOD_DEFINE="PERL" |
1206 |
+ |
1207 |
+SRC_TEST="do" |
1208 |
+ |
1209 |
+DOCFILES="Changes INSTALL README STATUS" |
1210 |
+ |
1211 |
+need_apache2_4 |
1212 |
+ |
1213 |
+src_prepare() { |
1214 |
+ perl-module_src_prepare |
1215 |
+ |
1216 |
+ # I am not entirely happy with this solution, but here's what's |
1217 |
+ # going on here if someone wants to take a stab at another |
1218 |
+ # approach. When userpriv compilation is off, then the make |
1219 |
+ # process drops to user "nobody" to run the test servers. This |
1220 |
+ # server is closed, and then the socket is rebound using |
1221 |
+ # SO_REUSEADDR. If the same user does this, there is no problem, |
1222 |
+ # and the socket may be rebound immediately. If a different user |
1223 |
+ # (yes, in my testing, even root) attempts to rebind, it fails. |
1224 |
+ # Since the "is the socket available yet" code and the |
1225 |
+ # second-batch bind call both run as root, this will fail. |
1226 |
+ |
1227 |
+ # The upstream settings on my test machine cause the second batch |
1228 |
+ # of tests to fail, believing the socket to still be in use. I |
1229 |
+ # tried patching various parts to make them run as the user |
1230 |
+ # specified in $config->{vars}{user} using getpwnam, but found |
1231 |
+ # this patch to be fairly intrusive, because the userid must be |
1232 |
+ # restored and the patch must be applied to multiple places. |
1233 |
+ |
1234 |
+ # For now, we will simply extend the timeout in hopes that in the |
1235 |
+ # non-userpriv case, the socket will clear from the kernel tables |
1236 |
+ # normally, and the tests will proceed. |
1237 |
+ |
1238 |
+ # If anybody is still having problems, then commenting out "make |
1239 |
+ # test" below should allow the software to build properly. |
1240 |
+ |
1241 |
+ # Robert Coie <rac@g.o> 2003.05.06 |
1242 |
+# sed -i -e "s/sleep \$_/sleep \$_ << 2/" \ |
1243 |
+# "${S}"/Apache-Test/lib/Apache/TestServer.pm \ |
1244 |
+# || die "problem editing TestServer.pm" |
1245 |
+ |
1246 |
+ # rendhalver - this got redone for 2.0.1 and seems to fix the make test problems |
1247 |
+ epatch "${FILESDIR}"/${PN}-2.0.1-sneak-tmpdir.patch |
1248 |
+ epatch "${FILESDIR}"/${PN}-2.0.4-inline.patch #550244 |
1249 |
+ |
1250 |
+ # bug 352724 |
1251 |
+ epatch "${FILESDIR}/${P}-bundled-Apache-Test.patch" |
1252 |
+ rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/ |
1253 |
+ sed -i \ |
1254 |
+ -e 's:^Apache-\(Reload\|SizeLimit\|Test\).*::' \ |
1255 |
+ -e 's:^lib/Bundle/Apache2.pm::' \ |
1256 |
+ MANIFEST || die |
1257 |
+ |
1258 |
+ # 410453 |
1259 |
+ epatch "${FILESDIR}/use-client_ip-client_add-instead-of-remote_ip-remote.patch" |
1260 |
+ epatch "${FILESDIR}/use-log.level-instead-of-loglevel.patch" |
1261 |
+ |
1262 |
+ # 554794 |
1263 |
+ epatch "${FILESDIR}/mod_perl_init_b554794.patch" |
1264 |
+} |
1265 |
+ |
1266 |
+src_configure() { |
1267 |
+ local debug=$(usex debug 1 0) |
1268 |
+ perl Makefile.PL \ |
1269 |
+ PREFIX="${EPREFIX}"/usr \ |
1270 |
+ INSTALLDIRS=vendor \ |
1271 |
+ MP_USE_DSO=1 \ |
1272 |
+ MP_APXS=${APXS} \ |
1273 |
+ MP_APR_CONFIG=/usr/bin/apr-1-config \ |
1274 |
+ MP_TRACE=${debug} \ |
1275 |
+ MP_DEBUG=${debug} \ |
1276 |
+ || die |
1277 |
+} |
1278 |
+ |
1279 |
+src_test() { |
1280 |
+ # make test notes whether it is running as root, and drops |
1281 |
+ # privileges all the way to "nobody" if so, so we must adjust |
1282 |
+ # write permissions accordingly in this case. |
1283 |
+ |
1284 |
+ # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail! |
1285 |
+ if [[ "$(id -u)" == "0" ]]; then |
1286 |
+ chown nobody:nobody "${WORKDIR}" "${T}" |
1287 |
+ fi |
1288 |
+ |
1289 |
+ # this does not || die because of bug 21325. kudos to smark for |
1290 |
+ # the idea of setting HOME. |
1291 |
+ TMPDIR="${T}" HOME="${T}/" perl-module_src_test |
1292 |
+} |
1293 |
+ |
1294 |
+src_install() { |
1295 |
+ apache-module_src_install |
1296 |
+ |
1297 |
+ default |
1298 |
+#emake DESTDIR="${D}" install || die |
1299 |
+ |
1300 |
+ # TODO: add some stuff from docs/ back? |
1301 |
+ |
1302 |
+ # rendhalver - fix the perllocal.pod that gets installed |
1303 |
+ # it seems to me that this has been getting installed for ages |
1304 |
+ perl_delete_localpod |
1305 |
+ # Remove empty .bs files as well |
1306 |
+ perl_delete_packlist |
1307 |
+ |
1308 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
1309 |
+ doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl |
1310 |
+ |
1311 |
+ # this is an attempt to get @INC in line with /usr/bin/perl. |
1312 |
+ # there is blib garbage in the mainstream one that can only be |
1313 |
+ # useful during internal testing, so we wait until here and then |
1314 |
+ # just go with a clean slate. should be much easier to see what's |
1315 |
+ # happening and revert if problematic. |
1316 |
+ |
1317 |
+ # Sorry for this evil hack... |
1318 |
+ perl_set_version # just to be sure... |
1319 |
+ sed -i \ |
1320 |
+ -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \ |
1321 |
+ -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \ |
1322 |
+ -e "s,${S}\(/[^[:space:]\"\']\+\)\?,/,g" \ |
1323 |
+ "${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die |
1324 |
+ |
1325 |
+ for fname in $(find "${D}" -type f -not -name '*.so'); do |
1326 |
+ grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}" |
1327 |
+ sed -i -e "s:\(${D}\|${S}\):/:g" ${fname} |
1328 |
+ done |
1329 |
+ # All the rest |
1330 |
+ perl_remove_temppath |
1331 |
+} |
1332 |
+ |
1333 |
+pkg_postinst() { |
1334 |
+ apache-module_pkg_postinst |
1335 |
+} |
1336 |
|
1337 |
diff --git a/www-apache/mod_perl/mod_perl-2.0.8.ebuild b/www-apache/mod_perl/mod_perl-2.0.8.ebuild |
1338 |
new file mode 100644 |
1339 |
index 0000000..c605774 |
1340 |
--- /dev/null |
1341 |
+++ b/www-apache/mod_perl/mod_perl-2.0.8.ebuild |
1342 |
@@ -0,0 +1,157 @@ |
1343 |
+# Copyright 1999-2015 Gentoo Foundation |
1344 |
+# Distributed under the terms of the GNU General Public License v2 |
1345 |
+# $Id$ |
1346 |
+ |
1347 |
+EAPI="5" |
1348 |
+ |
1349 |
+inherit depend.apache apache-module perl-module eutils |
1350 |
+ |
1351 |
+DESCRIPTION="An embedded Perl interpreter for Apache2" |
1352 |
+SRC_URI="mirror://apache/perl/${P}.tar.gz" |
1353 |
+HOMEPAGE="https://projects.apache.org/projects/mod_perl.html" |
1354 |
+ |
1355 |
+LICENSE="GPL-2" |
1356 |
+KEYWORDS="alpha amd64 ~hppa ia64 ppc ppc64 sparc x86" |
1357 |
+IUSE="debug" |
1358 |
+SLOT="1" |
1359 |
+ |
1360 |
+# Make sure we always use the latest Apache-Test version or even check the |
1361 |
+# version of the bundled Apache-Test! |
1362 |
+# |
1363 |
+# We need both, apache and perl but either apache without threads or perl with |
1364 |
+# ithreads, bug 373943 |
1365 |
+DEPEND="<www-servers/apache-2.4 |
1366 |
+ >=dev-perl/Apache-Test-1.360 |
1367 |
+ >=dev-perl/CGI-3.08 |
1368 |
+ dev-lang/perl |
1369 |
+ www-servers/apache |
1370 |
+ || ( www-servers/apache[-threads] dev-lang/perl[ithreads] )" |
1371 |
+RDEPEND="${DEPEND}" |
1372 |
+PDEPEND=">=dev-perl/Apache-Reload-0.11 |
1373 |
+ >=dev-perl/Apache-SizeLimit-0.95" |
1374 |
+ |
1375 |
+APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so" |
1376 |
+APACHE2_MOD_CONF="2.0.3/75_${PN}.2.2" |
1377 |
+APACHE2_MOD_DEFINE="PERL" |
1378 |
+ |
1379 |
+SRC_TEST="do" |
1380 |
+ |
1381 |
+DOCFILES="Changes INSTALL README STATUS" |
1382 |
+ |
1383 |
+need_apache2 |
1384 |
+ |
1385 |
+src_prepare() { |
1386 |
+ perl-module_src_prepare |
1387 |
+ |
1388 |
+ # I am not entirely happy with this solution, but here's what's |
1389 |
+ # going on here if someone wants to take a stab at another |
1390 |
+ # approach. When userpriv compilation is off, then the make |
1391 |
+ # process drops to user "nobody" to run the test servers. This |
1392 |
+ # server is closed, and then the socket is rebound using |
1393 |
+ # SO_REUSEADDR. If the same user does this, there is no problem, |
1394 |
+ # and the socket may be rebound immediately. If a different user |
1395 |
+ # (yes, in my testing, even root) attempts to rebind, it fails. |
1396 |
+ # Since the "is the socket available yet" code and the |
1397 |
+ # second-batch bind call both run as root, this will fail. |
1398 |
+ |
1399 |
+ # The upstream settings on my test machine cause the second batch |
1400 |
+ # of tests to fail, believing the socket to still be in use. I |
1401 |
+ # tried patching various parts to make them run as the user |
1402 |
+ # specified in $config->{vars}{user} using getpwnam, but found |
1403 |
+ # this patch to be fairly intrusive, because the userid must be |
1404 |
+ # restored and the patch must be applied to multiple places. |
1405 |
+ |
1406 |
+ # For now, we will simply extend the timeout in hopes that in the |
1407 |
+ # non-userpriv case, the socket will clear from the kernel tables |
1408 |
+ # normally, and the tests will proceed. |
1409 |
+ |
1410 |
+ # If anybody is still having problems, then commenting out "make |
1411 |
+ # test" below should allow the software to build properly. |
1412 |
+ |
1413 |
+ # Robert Coie <rac@g.o> 2003.05.06 |
1414 |
+# sed -i -e "s/sleep \$_/sleep \$_ << 2/" \ |
1415 |
+# "${S}"/Apache-Test/lib/Apache/TestServer.pm \ |
1416 |
+# || die "problem editing TestServer.pm" |
1417 |
+ |
1418 |
+ # rendhalver - this got redone for 2.0.1 and seems to fix the make test problems |
1419 |
+ epatch "${FILESDIR}"/mod_perl-2.0.1-sneak-tmpdir.patch |
1420 |
+ |
1421 |
+ # bug 352724 |
1422 |
+ epatch "${FILESDIR}/${P}-bundled-Apache-Test.patch" |
1423 |
+ rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/ |
1424 |
+ sed -i -e 's:^Apache-\(Reload\|SizeLimit\|Test\).*::' \ |
1425 |
+ -e 's:^lib/Bundle/Apache2.pm::' MANIFEST || die |
1426 |
+} |
1427 |
+ |
1428 |
+src_configure() { |
1429 |
+ local myargs= |
1430 |
+ |
1431 |
+ if use debug; then |
1432 |
+ myargs="MP_TRACE=1 MP_DEBUG=1" |
1433 |
+ else |
1434 |
+ myargs="MP_TRACE=0 MP_DEBUG=0" |
1435 |
+ fi |
1436 |
+ |
1437 |
+ perl Makefile.PL \ |
1438 |
+ PREFIX="${EPREFIX}"/usr \ |
1439 |
+ INSTALLDIRS=vendor \ |
1440 |
+ MP_USE_DSO=1 \ |
1441 |
+ MP_APXS=${APXS} \ |
1442 |
+ ${myargs} || die |
1443 |
+} |
1444 |
+ |
1445 |
+src_test() { |
1446 |
+ # make test notes whether it is running as root, and drops |
1447 |
+ # privileges all the way to "nobody" if so, so we must adjust |
1448 |
+ # write permissions accordingly in this case. |
1449 |
+ |
1450 |
+ # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail! |
1451 |
+ if [[ "$(id -u)" == "0" ]]; then |
1452 |
+ chown nobody:nobody "${WORKDIR}" |
1453 |
+ chown nobody:nobody "${T}" |
1454 |
+ fi |
1455 |
+ |
1456 |
+ # this does not || die because of bug 21325. kudos to smark for |
1457 |
+ # the idea of setting HOME. |
1458 |
+ TMPDIR="${T}" HOME="${T}/" perl-module_src_test |
1459 |
+} |
1460 |
+ |
1461 |
+src_install() { |
1462 |
+ apache-module_src_install |
1463 |
+ |
1464 |
+ emake DESTDIR="${D}" install || die |
1465 |
+ |
1466 |
+ # TODO: add some stuff from docs/ back? |
1467 |
+ |
1468 |
+ # rendhalver - fix the perllocal.pod that gets installed |
1469 |
+ # it seems to me that this has been getting installed for ages |
1470 |
+ perl_delete_localpod |
1471 |
+ # Remove empty .bs files as well |
1472 |
+ perl_delete_packlist |
1473 |
+ |
1474 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
1475 |
+ doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl || die |
1476 |
+ |
1477 |
+ # this is an attempt to get @INC in line with /usr/bin/perl. |
1478 |
+ # there is blib garbage in the mainstream one that can only be |
1479 |
+ # useful during internal testing, so we wait until here and then |
1480 |
+ # just go with a clean slate. should be much easier to see what's |
1481 |
+ # happening and revert if problematic. |
1482 |
+ |
1483 |
+ # Sorry for this evil hack... |
1484 |
+ perl_set_version # just to be sure... |
1485 |
+ sed -i -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \ |
1486 |
+ -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \ |
1487 |
+ -e "s,${S}\(/[^[:space:]\"\']\+\)\?,/,g" "${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die |
1488 |
+ |
1489 |
+ for fname in $(find "${D}" -type f -not -name '*.so'); do |
1490 |
+ grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}" |
1491 |
+ sed -i -e "s:\(${D}\|${S}\):/:g" ${fname} |
1492 |
+ done |
1493 |
+ # All the rest |
1494 |
+ perl_remove_temppath |
1495 |
+} |
1496 |
+ |
1497 |
+pkg_postinst() { |
1498 |
+ apache-module_pkg_postinst |
1499 |
+} |