From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- .../mod_perl/files/2.0.3/75_mod_perl.2.2.conf | 50 ++++++++++++++ www-apache/mod_perl/files/2.0.3/75_mod_perl.conf | 54 +++++++++++++++ .../files/2.0.3/apache2-mod_perl-startup.pl | 24 +++++++ .../files/mod_perl-2.0.1-sneak-tmpdir.patch | 11 +++ .../mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch | 36 ++++++++++ .../mod_perl-2.0.10_rc1-bundled-Apache-Test.patch | 80 ++++++++++++++++++++++ .../mod_perl/files/mod_perl-2.0.4-inline.patch | 22 ++++++ 7 files changed, 277 insertions(+) create mode 100644 www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf create mode 100644 www-apache/mod_perl/files/2.0.3/75_mod_perl.conf create mode 100644 www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl create mode 100644 www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch create mode 100644 www-apache/mod_perl/files/mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch create mode 100644 www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch create mode 100644 www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch (limited to 'www-apache/mod_perl/files') 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 new file mode 100644 index 000000000000..596d2cc73c6e --- /dev/null +++ b/www-apache/mod_perl/files/2.0.3/75_mod_perl.2.2.conf @@ -0,0 +1,50 @@ + +LoadModule perl_module modules/mod_perl.so + +#PerlTrace all +PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl" +PerlModule ModPerl::Registry + +# Provide two aliases to the same cgi-bin directory, to see the effects of the +# 2 different mod_perl modes for Apache2::Registry Mode +Alias /perl/ /var/www/localhost/perl/ +# for Apache2::Perlrun Mode +Alias /cgi-perl/ /var/www/localhost/perl/ + + + SetHandler perl-script + PerlResponseHandler Apache2::Status + Order deny,allow + Deny from all + Allow from 127.0.0.1 + + + + SetHandler perl-script + PerlResponseHandler ModPerl::PerlRun + Options -Indexes ExecCGI + PerlOptions +ParseHeaders + + +# set Apache::Registry Mode for /perl Alias + + SetHandler perl-script + PerlResponseHandler ModPerl::Registry + Options -Indexes ExecCGI + PerlSendHeader On + Order allow,deny + Allow from all + + +# set Apache::PerlRun Mode for /cgi-perl Alias + + SetHandler perl-script + PerlResponseHandler ModPerl::PerlRun + Options -Indexes ExecCGI + PerlSendHeader On + Order allow,deny + Allow from all + + + +# vim: ts=4 filetype=apache 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 new file mode 100644 index 000000000000..9cf7b7b4394f --- /dev/null +++ b/www-apache/mod_perl/files/2.0.3/75_mod_perl.conf @@ -0,0 +1,54 @@ + +LoadModule perl_module modules/mod_perl.so + +#PerlTrace all +PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl" +PerlModule ModPerl::Registry + +# Provide two aliases to the same cgi-bin directory, to see the effects of the +# 2 different mod_perl modes for Apache2::Registry Mode +Alias /perl/ /var/www/localhost/perl/ +# for Apache2::Perlrun Mode +Alias /cgi-perl/ /var/www/localhost/perl/ + + + SetHandler perl-script + PerlResponseHandler Apache2::Status + Require host localhost + + + + SetHandler perl-script + PerlResponseHandler ModPerl::PerlRun + PerlOptions +ParseHeaders + + # Clear all existing options and only permit cgi. + Options ExecCGI + + +# set Apache::Registry Mode for /perl Alias + + SetHandler perl-script + PerlResponseHandler ModPerl::Registry + PerlSendHeader On + + # Clear all existing options and only permit cgi. + Options ExecCGI + + Require all granted + + +# set Apache::PerlRun Mode for /cgi-perl Alias + + SetHandler perl-script + PerlResponseHandler ModPerl::PerlRun + PerlSendHeader On + + # Clear all existing options and only permit cgi. + Options ExecCGI + + Require all granted + + + +# vim: ts=4 filetype=apache 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 new file mode 100644 index 000000000000..afc048ac125b --- /dev/null +++ b/www-apache/mod_perl/files/2.0.3/apache2-mod_perl-startup.pl @@ -0,0 +1,24 @@ +use lib qw(/home/httpd/perl); + +# enable if the mod_perl 1.0 compatibility is needed +#use Apache2::compat (); + +use ModPerl::Util (); #for CORE::GLOBAL::exit + +use Apache2::RequestRec (); +use Apache2::RequestIO (); +use Apache2::RequestUtil (); + +use Apache2::ServerRec (); +use Apache2::ServerUtil (); +use Apache2::Connection (); +use Apache2::Log (); + +use APR::Table (); + +use ModPerl::Registry (); + +use Apache2::Const -compile => ':common'; +use APR::Const -compile => ':common'; + +1; 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 new file mode 100644 index 000000000000..0930278aeba3 --- /dev/null +++ b/www-apache/mod_perl/files/mod_perl-2.0.1-sneak-tmpdir.patch @@ -0,0 +1,11 @@ +--- t/conf/modperl_extra.pl.orig 2005-05-16 18:27:45.000000000 +1000 ++++ t/conf/modperl_extra.pl 2005-05-16 18:34:46.000000000 +1000 +@@ -136,6 +136,8 @@ + sub test_modperl_env { + # see t/response/TestModperl/env.pm + $ENV{MODPERL_EXTRA_PL} = __FILE__; ++ $ENV{TMPDIR} = __FILE__; ++ $ENV{TMPDIR} =~ s,/work/.*,/temp,; + } + + 1; diff --git a/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch b/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch new file mode 100644 index 000000000000..578878f05d04 --- /dev/null +++ b/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-Gentoo-not-Unix.patch @@ -0,0 +1,36 @@ +Tests fail because the server banner contains "Gentoo" instead of "Unix". Disable them. + + +diff -ruN mod_perl-2.0.10-rc1.orig/t/response/TestAPI/server_const.pm mod_perl-2.0.10-rc1/t/response/TestAPI/server_const.pm +--- mod_perl-2.0.10-rc1.orig/t/response/TestAPI/server_const.pm 2016-09-30 14:45:31.000000000 +0200 ++++ mod_perl-2.0.10-rc1/t/response/TestAPI/server_const.pm 2016-10-01 13:18:02.359794404 +0200 +@@ -25,7 +25,7 @@ + + my $r = shift; + +- plan $r, tests => 6; ++ plan $r, tests => 4; + + # test Apache2::ServerUtil constant subroutines + +@@ -45,13 +45,13 @@ + ok t_cmp($server_descr, qr!\bworld domination series/2\.0\b!, + 'Apache2::ServerUtil::get_server_description() -- component'); + +- # assuming ServerTokens Full (default) the banner equals description +- ok t_cmp(Apache2::ServerUtil::get_server_banner, $server_descr, +- 'Apache2::ServerUtil::get_server_banner()'); +- +- # version is just an alias for banner +- ok t_cmp(Apache2::ServerUtil::get_server_version, $server_descr, +- 'Apache2::ServerUtil::get_server_version()'); ++# # assuming ServerTokens Full (default) the banner equals description ++# ok t_cmp(Apache2::ServerUtil::get_server_banner, $server_descr, ++# 'Apache2::ServerUtil::get_server_banner()'); ++ ++# # version is just an alias for banner ++# ok t_cmp(Apache2::ServerUtil::get_server_version, $server_descr, ++# 'Apache2::ServerUtil::get_server_version()'); + + Apache2::Const::OK; + } diff --git a/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch b/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch new file mode 100644 index 000000000000..e8ec5d0308da --- /dev/null +++ b/www-apache/mod_perl/files/mod_perl-2.0.10_rc1-bundled-Apache-Test.patch @@ -0,0 +1,80 @@ +diff -ruN mod_perl-2.0.10-rc1.orig/Makefile.PL mod_perl-2.0.10-rc1/Makefile.PL +--- mod_perl-2.0.10-rc1.orig/Makefile.PL 2016-09-30 14:45:23.000000000 +0200 ++++ mod_perl-2.0.10-rc1/Makefile.PL 2016-10-01 00:35:17.140862642 +0200 +@@ -25,7 +25,7 @@ + + } + +-use lib qw(lib Apache-Test/lib); ++use lib qw(lib); + + use Config; + use File::Spec::Functions; +@@ -122,15 +122,6 @@ + + sub configure { + +- # mod_perl test suite relies on having Apache-Test bundled with +- # the mod_perl source, since any pre-installed version may not do +- # the right thing +- unless (-d "Apache-Test") { +- error "Can't find a sub-directory Apache-Test. " . +- "Make sure that you are using a complete source distribution"; +- exit 1; +- } +- + set_modperl_version(); + + if ($old_modperl_version) { +@@ -853,14 +844,9 @@ + run_subtests :: + cd ModPerl-Registry && $(MAKE) test + +-run_subtests :: +- cd Apache-Reload && $(MAKE) test +- + EOF + + $preamble .= <<'EOF' unless $build->mpm_is_threaded(); +-run_subtests :: +- cd Apache-SizeLimit && $(MAKE) test + + EOF + +diff -ruN mod_perl-2.0.10-rc1.orig/lib/ModPerl/BuildMM.pm mod_perl-2.0.10-rc1/lib/ModPerl/BuildMM.pm +--- mod_perl-2.0.10-rc1.orig/lib/ModPerl/BuildMM.pm 2016-09-30 14:45:23.000000000 +0200 ++++ mod_perl-2.0.10-rc1/lib/ModPerl/BuildMM.pm 2016-10-01 00:35:17.140862642 +0200 +@@ -39,12 +39,10 @@ + ModPerl::MM::override_eu_mm_mv_all_methods(@methods); + use strict 'refs'; + +-my $apache_test_dir = catdir Cwd::getcwd(), "Apache-Test", "lib"; +- + #to override MakeMaker MOD_INSTALL macro + sub mod_install { + q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \\}."\n" . +- qq{-I$apache_test_dir -MModPerl::BuildMM \\}."\n" . ++ qq{-MModPerl::BuildMM \\}."\n" . + q{-e "ExtUtils::Install::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n"; + } + +@@ -271,7 +269,7 @@ + + push @target, + '$(FULLPERL) -I$(INST_LIB) ' . +- "-I$apache_test_dir -MModPerl::BuildMM " . ++ "-MModPerl::BuildMM " . + "-e ModPerl::BuildMM::glue_pod $pm $podpath $blib"; + + # Win32 doesn't normally install man pages +diff -ruN mod_perl-2.0.10-rc1.orig/lib/ModPerl/Manifest.pm mod_perl-2.0.10-rc1/lib/ModPerl/Manifest.pm +--- mod_perl-2.0.10-rc1.orig/lib/ModPerl/Manifest.pm 2016-09-30 14:45:23.000000000 +0200 ++++ mod_perl-2.0.10-rc1/lib/ModPerl/Manifest.pm 2016-10-01 00:35:17.140862642 +0200 +@@ -119,7 +119,6 @@ + t/apr-ext/perlio + # PAUSE breaks if a dist has more than one META.yml. the top-level + # META.yml already excludes Apache-Test from indexing +-Apache-Test/META.yml + # exclude Apache-Test/MANIFEST since it confuses the mp2 build (e.g it + # wants Apache-Test/META.yml which we don't supply, see above) + Apache-Test/MANIFEST 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 new file mode 100644 index 000000000000..5c51a803b816 --- /dev/null +++ b/www-apache/mod_perl/files/mod_perl-2.0.4-inline.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/550244 + +taken from Fedora: +http://pkgs.fedoraproject.org/cgit/mod_perl.git/tree/mod_perl-2.0.4-inline.patch?h=f22 + +fixes building with gcc-5: +apache2: Syntax error on line 148 of /etc/apache2/httpd.conf: +Syntax error on line 2 of /etc/apache2/modules.d/75_mod_perl.conf: +Cannot load modules/mod_perl.so into server: +/usr/lib64/apache2/modules/mod_perl.so: undefined symbol: modperl_handler_name + +--- mod_perl-2.0.4/src/modules/perl/modperl_common_util.h.inline ++++ mod_perl-2.0.4/src/modules/perl/modperl_common_util.h +@@ -22,7 +22,7 @@ + #ifdef MP_DEBUG + #define MP_INLINE + #else +-#define MP_INLINE APR_INLINE ++#define MP_INLINE + #endif + + #ifdef CYGWIN -- cgit v1.2.3