summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-07-05 01:32:32 +0100
committerSam James <sam@gentoo.org>2023-07-05 01:38:22 +0100
commit7cc1e787332e9a2217e560abf40bbd3d10403ce0 (patch)
tree6f356ff015686b84ee6c657f806b5916a9eb8945 /www-apache
parentdev-perl/Cpanel-JSON-XS: add 4.370.0 (diff)
downloadgentoo-7cc1e787332e9a2217e560abf40bbd3d10403ce0.tar.gz
gentoo-7cc1e787332e9a2217e560abf40bbd3d10403ce0.tar.bz2
gentoo-7cc1e787332e9a2217e560abf40bbd3d10403ce0.zip
www-apache/mod_perl: add 2.0.12
Closes: https://bugs.gentoo.org/835357 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'www-apache')
-rw-r--r--www-apache/mod_perl/Manifest1
-rw-r--r--www-apache/mod_perl/files/mod_perl-2.0.12-avoid-pch.patch22
-rw-r--r--www-apache/mod_perl/files/mod_perl-2.0.12-perl538.patch25
-rw-r--r--www-apache/mod_perl/mod_perl-2.0.12.ebuild144
4 files changed, 192 insertions, 0 deletions
diff --git a/www-apache/mod_perl/Manifest b/www-apache/mod_perl/Manifest
index 238175ecb66c..5e94a56ae488 100644
--- a/www-apache/mod_perl/Manifest
+++ b/www-apache/mod_perl/Manifest
@@ -1 +1,2 @@
DIST mod_perl-2.0.11.tar.gz 3848147 BLAKE2B 8eeef6d1fadbf9d2e3bcff33c5114e588f032c2497f5191b1edd30da8bce72eadf5ea62482ec8ece7d7fde308c8c41d6682d1a325760c627bee75c3ce8cf6272 SHA512 f232b215ccb9217f69ccced8a037470e5975900b9a6fcc5a2e4674e6559d21f026547c1b97c48109352043946dc22539dd38004759be16ad5cfcb3a96973dfdf
+DIST mod_perl-2.0.12.tar.gz 3848030 BLAKE2B fe4e57d76f7e7a79f171a96d2bab65743eeae45528c0bc3a8bc8ef6d91bb875d3857799f7d65cbf590994c30699a8646dbc905d76551fb97151d0827222a9ba2 SHA512 890dca0950847e32180485cabbeffbf236af2c92c7df957a233c210022b5172957eddb1db3e9281b87cd438d2fa404a05ae99c7eda098267c68d5e9262b400b0
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.12-avoid-pch.patch b/www-apache/mod_perl/files/mod_perl-2.0.12-avoid-pch.patch
new file mode 100644
index 000000000000..989d472831f7
--- /dev/null
+++ b/www-apache/mod_perl/files/mod_perl-2.0.12-avoid-pch.patch
@@ -0,0 +1,22 @@
+Avoid sandbox denial while attempting to generate PCH:
+```
+F: fopen_wr
+S: deny
+P: /usr/include/apr-1/apr.h.gch
+A: /usr/include/apr-1/apr.h.gch
+R: /usr/include/apr-1/apr.h.gch
+C: /usr/libexec/gcc/x86_64-pc-linux-gnu/13/cc1 -quiet /usr/include/apr-1/apr.h -quiet -dM -dumpdir a- -dumpbase apr.h -dumpbase-ext .h -mtune=generic -march=x86-64 -o /tmp/ccfl5N0L.s --output-pch /usr/include/apr-1/apr.h.gch
+```
+
+Sent upstream by email on 2023-07-05.
+--- a/lib/Apache2/Build.pm
++++ b/lib/Apache2/Build.pm
+@@ -1502,7 +1502,7 @@ sub get_apr_config {
+ };
+ }
+ else {
+- my @command = ($self->perl_config('cpp'), '-dM', $header);
++ my @command = ($self->perl_config('cpp'), '-E', '-dM', $header);
+ open $fh, '-|', @command or do {
+ error "Unable to preprocess $header with @command: $!";
+ return undef;
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.12-perl538.patch b/www-apache/mod_perl/files/mod_perl-2.0.12-perl538.patch
new file mode 100644
index 000000000000..3932dffe4a68
--- /dev/null
+++ b/www-apache/mod_perl/files/mod_perl-2.0.12-perl538.patch
@@ -0,0 +1,25 @@
+https://github.com/apache/mod_perl/commit/991cfeca9bac185f191510e0064f174d45718e6a
+
+From 991cfeca9bac185f191510e0064f174d45718e6a Mon Sep 17 00:00:00 2001
+From: Steve Hay <stevehay@apache.org>
+Date: Tue, 27 Jun 2023 08:38:15 +0000
+Subject: [PATCH] Stop using do_open9() - this deprecated function was removed
+ in 5.37.1
+
+Patch by Jitka Plesnikova <jplesnik@redhat.com> from https://rt.cpan.org/Ticket/Display.html?id=148451
+
+git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1910623 13f79535-47bb-0310-9956-ffa450edef68
+--- a/src/modules/perl/modperl_io.c
++++ b/src/modules/perl/modperl_io.c
+@@ -116,8 +116,8 @@ modperl_io_perlio_override_stdhandle(pTHX_ request_rec *r, int mode)
+ save_gp(handle, 1);
+
+ sv_setref_pv(sv, "Apache2::RequestRec", (void*)r);
+- status = do_open9(handle, mode == O_RDONLY ? "<:Apache2" : ">:Apache2",
+- 9, FALSE, mode, 0, (PerlIO *)NULL, sv, 1);
++ status = do_openn(handle, mode == O_RDONLY ? "<:Apache2" : ">:Apache2",
++ 9, FALSE, mode, 0, (PerlIO *)NULL, &sv, 1);
+ if (status == 0) {
+ Perl_croak(aTHX_ "Failed to open STD%s: %" SVf,
+ mode == O_RDONLY ? "IN" : "OUT", get_sv("!", TRUE));
+
diff --git a/www-apache/mod_perl/mod_perl-2.0.12.ebuild b/www-apache/mod_perl/mod_perl-2.0.12.ebuild
new file mode 100644
index 000000000000..cf5c08e8fa9b
--- /dev/null
+++ b/www-apache/mod_perl/mod_perl-2.0.12.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DIST_TEST=do
+inherit depend.apache apache-module perl-module
+
+DESCRIPTION="An embedded Perl interpreter for Apache2"
+HOMEPAGE="https://perl.apache.org/ https://projects.apache.org/project.html?perl-mod_perl"
+SRC_URI="mirror://apache/perl/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="1"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~x86"
+IUSE="debug ithreads test"
+RESTRICT="!test? ( test )"
+
+# Apache::Reload, Apache::SizeLimit, and Apache::Test are force-unbundled.
+# The minimum versions requested here are the bundled versions.
+
+# The test dependencies are from CPAN (Bundle::Apache2).
+
+# When all MPMs are disabled via useflags, the apache ebuild selects a
+# default one, which will likely need threading.
+
+RDEPEND="
+ dev-lang/perl[ithreads=]
+ >=dev-perl/Apache-Test-1.420.0
+ >=www-servers/apache-2.0.47
+ >=dev-libs/apr-util-1.4
+ !ithreads? ( www-servers/apache[-apache2_mpms_event,-apache2_mpms_worker,apache2_mpms_prefork] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-perl/Module-Build
+ test? (
+ >=dev-perl/CGI-3.110.0
+ dev-perl/Chatbot-Eliza
+ dev-perl/Devel-Symdump
+ dev-perl/HTML-Parser
+ dev-perl/IPC-Run3
+ dev-perl/libwww-perl
+ www-servers/apache[apache2_modules_version,-apache2_modules_unique_id]
+ !www-apache/mpm_itk
+ )
+"
+PDEPEND="
+ >=dev-perl/Apache-Reload-0.130.0
+ >=dev-perl/Apache-SizeLimit-0.970.0
+"
+
+APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so"
+APACHE2_MOD_CONF="2.0.3/75_${PN}"
+APACHE2_MOD_DEFINE="PERL"
+
+need_apache2
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.0.1-sneak-tmpdir.patch # seems to fix the make test problem
+ "${FILESDIR}"/${PN}-2.0.4-inline.patch # 550244
+ "${FILESDIR}"/${PN}-2.0.10_rc1-bundled-Apache-Test.patch # 352724
+ "${FILESDIR}"/${PN}-2.0.10_rc1-Gentoo-not-Unix.patch
+ "${FILESDIR}"/${PN}-2.0.11-ranlib.patch # 728554
+ "${FILESDIR}"/${PN}-2.0.12-perl538.patch
+ "${FILESDIR}"/${PN}-2.0.12-avoid-pch.patch
+)
+
+src_prepare() {
+ perl-module_src_prepare
+
+ # chainsaw unbundling
+ rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/ || die
+}
+
+src_configure() {
+ _init_apache2_late
+
+ local debug=$(usex debug 1 0)
+ local nothreads=$(usex ithreads 0 1)
+ myconf=(
+ MP_USE_DSO=1
+ MP_APXS=${APXS}
+ MP_APR_CONFIG=/usr/bin/apr-1-config
+ MP_TRACE=${debug}
+ MP_DEBUG=${debug}
+ MP_NO_THREADS=${nothreads}
+ )
+
+ perl-module_src_configure
+}
+
+src_test() {
+ # make test notes whether it is running as root, and drops
+ # privileges all the way to "nobody" if so, so we must adjust
+ # write permissions accordingly in this case.
+
+ # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail!
+ if [[ "$(id -u)" == "0" ]]; then
+ chown nobody:nobody "${WORKDIR}" "${T}" || die
+ fi
+
+ # We force verbose tests for now to get meaningful bug reports.
+ MAKEOPTS+=" -j1"
+ TMPDIR="${T}" HOME="${T}/" TEST_VERBOSE=1 LC_TIME=C perl-module_src_test
+}
+
+src_install() {
+ apache-module_src_install
+
+ default
+
+ perl_delete_localpod
+ perl_fix_packlist
+ perl_delete_emptybsdir
+
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl
+
+ # this is an attempt to get @INC in line with /usr/bin/perl.
+ # there is blib garbage in the mainstream one that can only be
+ # useful during internal testing, so we wait until here and then
+ # just go with a clean slate. should be much easier to see what's
+ # happening and revert if problematic.
+
+ perl_set_version
+ sed -i \
+ -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,${S}\(/[^[:space:]\"\']\+\)\?,/,g" \
+ "${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die
+
+ local fname
+ for fname in $(find "${D}" -type f -not -name '*.so'); do
+ grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}"
+ sed -i -e "s:\(${D}\|${S}\):/:g" ${fname} || die
+ done
+
+ perl_remove_temppath
+}
+
+pkg_postinst() {
+ apache-module_pkg_postinst
+}