1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-16 20:55:20 +03:00

testing/apache2-mod-perl: more refined patch to work with perl 5.22

This patch is replaces the previous one: http://patchwork.alpinelinux.org/patch/851/

- all unused patches and post-install script are removed
- added the latest patch from https://rt.cpan.org/Public/Bug/Display.html?id=101962#txn-1558194
- many tests are fail, so 'make test' is not included in build()
- some minor cleanups in APKBUILD

Now apache not crashes to segfault with this module ;)
This commit is contained in:
Valery Kartel 2015-11-20 16:12:50 +02:00 committed by Natanael Copa
parent 1d04c940d7
commit 48ee788e89
6 changed files with 20 additions and 141 deletions

View file

@ -1,28 +1,30 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=apache2-mod-perl
_realname=mod_perl
_pkgreal=mod_perl
pkgver=2.0.9
_pkgver=${pkgver/_rc1/-rc1}
pkgrel=1
pkgrel=2
pkgdesc="Perl Module for Apache2"
url="http://perl.apache.org/"
arch="all"
license="ASL 2.0"
depends="apache2 perl"
depends="apache2"
depends_dev="$pkgname"
makedepends="$depends_dev apache2-dev perl-dev perl-linux-pid apr-dev apr-util-dev"
install="$pkgname.post-install"
install=""
subpackages="$pkgname-doc $pkgname-dev"
source="http://www.eu.apache.org/dist/perl/mod_perl-$pkgver.tar.gz
$pkgname.apache2.conf"
source="http://www.eu.apache.org/dist/perl/$_pkgreal-$pkgver.tar.gz
https://rt.cpan.org/Public/Ticket/Attachment/1549932/827564/env2.patch
$pkgname.conf"
_builddir="$srcdir"/${_realname}-${_pkgver}
_builddir="$srcdir"/${_pkgreal}-${_pkgver}
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
*.patch) msg $i; [ ! -f "$srcdir"/$i ]; patch -p$? -i "$srcdir"/${i##*/} || return 1;;
esac
done
}
@ -33,6 +35,7 @@ build() {
make xs_generate
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor \
MP_CCOPTS=-fgnu89-inline \
MP_APXS=/usr/bin/apxs \
MP_APR_CONFIG=/usr/bin/apr-1-config || return 1
make || return 1
@ -42,34 +45,17 @@ package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
# install the apache2 config
install -Dm644 "$srcdir"/$pkgname.apache2.conf \
"$pkgdir"/etc/apache2/conf.d/perl-module.conf || return 1
}
doc() {
arch="noarch"
# man pages
mkdir -p "$subpkgdir"/usr/share/man || return 1
mv "$pkgdir"/usr/share/man/man* "$subpkgdir"/usr/share/man/ \
|| return 1
# doc files
_docs="BRANCHING Changes INSTALL LICENSE MANIFEST NOTICE README \
README-SVN RELEASE STATUS SVN-MOVE"
for _doc in $_docs; do
install -Dm644 "$_builddir"/$_doc \
"$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
done
cp -ra "$_builddir"/docs/ "$subpkgdir"/usr/share/doc/$pkgname/ \
|| return 1
rm -fr "$pkgdir"/usr/bin
install -Dm644 "$srcdir"/$pkgname.conf \
"$pkgdir"/etc/apache2/conf.d/$_pkgreal.conf || return 1
}
md5sums="fdab9a145bf35f54fce997c96c76f8e2 mod_perl-2.0.9.tar.gz
86b84bb56b49a95772a7f773fc019043 apache2-mod-perl.apache2.conf"
f8c2de81056faea64a4d5e53fef9fb99 env2.patch
86b84bb56b49a95772a7f773fc019043 apache2-mod-perl.conf"
sha256sums="0260f26ab771c1c95fadc67544b3400e420bb30b8a77565d2d02ad05498ef52b mod_perl-2.0.9.tar.gz
92dfc84c1506f34fc55cb65f4f2b0399254d811a03c5bcea1e6cf010e60a5227 apache2-mod-perl.apache2.conf"
6d2cd5d39dc6a53e5c9e2211f6e59d195af582ffa0313f61cb08d1654a456a6f env2.patch
92dfc84c1506f34fc55cb65f4f2b0399254d811a03c5bcea1e6cf010e60a5227 apache2-mod-perl.conf"
sha512sums="421d385f0d5d04cbe8c1e9559960eea86a017fa1bed88e614009143550baf852e2345001faff1fb849d9b3e6383786e0011f45ebc3e7d26ad57651fbad4e2f2c mod_perl-2.0.9.tar.gz
716650058af077b0494833301f3dfdf517499bdb2021427431cacc7f63e5fe520cd6f5f7daee44bed15e257c9a2d1fb7d18a75954455fa894dd24a8ef32af50b apache2-mod-perl.apache2.conf"
add28358a740005baa0891d910ea8597341a3cb07f6baa629059c782d90282b4a1e8275d2fffe6d90d0faac9820037e5e06ab4196d1beb6a663634b7f0832bdd env2.patch
716650058af077b0494833301f3dfdf517499bdb2021427431cacc7f63e5fe520cd6f5f7daee44bed15e257c9a2d1fb7d18a75954455fa894dd24a8ef32af50b apache2-mod-perl.conf"

View file

@ -1,10 +0,0 @@
#!/bin/sh
echo "*" >&2
echo "* To finish installing apache2-mod-perl:" >&2
echo "* 1) See if you need to modify the apache2 config:" >&2
echo "* /etc/apache2/conf.d/perl-module.conf" >&2
echo "* 2) Restart apache2 when done." >&2
echo "*" >&2
exit 0

View file

@ -1,14 +0,0 @@
Index: mod_perl-2.0.5/lib/Apache2/Build.pm
===================================================================
--- mod_perl-2.0.5.orig/lib/Apache2/Build.pm 2011-02-02 21:23:47.000000000 +0100
+++ mod_perl-2.0.5/lib/Apache2/Build.pm 2011-05-26 17:12:46.276946520 +0200
@@ -2147,7 +2147,8 @@ sub has_large_files_conflict {
# with it is that we didn't have such a case yet, but may need to
# deal with it later
- return $perl_lfs64 ^ $apr_lfs64;
+ return 0;
+ # $perl_lfs64 ^ $apr_lfs64;
}
# if perl is built with uselargefiles, but apr not, the build won't

View file

@ -1,13 +0,0 @@
diff -upr mod_perl-2.0.6.orig/lib/Apache2/Build.pm mod_perl-2.0.6/lib/Apache2/Build.pm
--- mod_perl-2.0.6.orig/lib/Apache2/Build.pm 2012-05-26 22:31:00.000000000 +0300
+++ mod_perl-2.0.6/lib/Apache2/Build.pm 2012-05-26 22:31:32.000000000 +0300
@@ -2207,7 +2207,8 @@ sub has_large_files_conflict {
# with it is that we didn't have such a case yet, but may need to
# deal with it later
- return $perl_lfs64 ^ $apr_lfs64;
+ return 0;
+ # $perl_lfs64 ^ $apr_lfs64;
}
# if perl is built with uselargefiles, but apr not, the build won't

View file

@ -1,70 +0,0 @@
Index: xs/tables/current/Apache2/StructureTable.pm
===================================================================
--- a/xs/tables/current/Apache2/StructureTable.pm (revision 1324590)
+++ b/xs/tables/current/Apache2/StructureTable.pm (working copy)
@@ -2708,11 +2708,11 @@
},
{
'type' => 'apr_sockaddr_t *',
- 'name' => 'remote_addr'
+ 'name' => 'client_addr'
},
{
'type' => 'char *',
- 'name' => 'remote_ip'
+ 'name' => 'client_ip'
},
{
'type' => 'char *',
@@ -2955,6 +2955,14 @@
},
{
'type' => 'char *',
+ 'name' => 'useragent_ip'
+ },
+ {
+ 'type' => 'apr_sockaddr_t *',
+ 'name' => 'useragent_addr'
+ },
+ {
+ 'type' => 'char *',
'name' => 'the_request'
},
{
@@ -3245,10 +3253,6 @@
},
{
'type' => 'int',
- 'name' => 'loglevel'
- },
- {
- 'type' => 'int',
'name' => 'is_virtual'
},
{
Index: Apache-Reload/Makefile.PL
===================================================================
--- a/Apache-Reload/Makefile.PL (revision 1324590)
+++ b/Apache-Reload/Makefile.PL (working copy)
@@ -11,7 +11,7 @@
# MOD_PERL_2_BUILD is set from building from mod_perl Makefile.PL which should
# also set MP_APXS
if ($ENV{MOD_PERL_2_BUILD}) {
- push @ARGV, "-apxs", $ENV{MP_APXS};
+ push @ARGV, "-apxs $ENV{MP_APXS}";
my $mp_gen = satisfy_mp_generation(2);
}
else {
Index: Apache-SizeLimit/Makefile.PL
===================================================================
--- a/Apache-SizeLimit/Makefile.PL (revision 1324590)
+++ b/Apache-SizeLimit/Makefile.PL (working copy)
@@ -11,7 +11,7 @@
# MOD_PERL_2_BUILD is set from building from mod_perl Makefile.PL which should
# also set MP_APXS
if ($ENV{MOD_PERL_2_BUILD}) {
- push @ARGV, "-apxs", $ENV{MP_APXS};
+ push @ARGV, "-apxs $ENV{MP_APXS}";
my $mp_gen = satisfy_mp_generation(2);
}
else {