summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2009-07-05 16:43:16 +0000
committerBenedikt Boehm <hollow@gentoo.org>2009-07-05 16:43:16 +0000
commit29dcad8e6f4f80e2e9ec70ac53081f9603ba8bf7 (patch)
tree6af3a242a2ff6f99ddf6c97129e8eacd2b256694 /www-apache/mod_perl
parentFix dependency (boot needs python useflag), switch to EAPI-2 (diff)
downloadgentoo-2-29dcad8e6f4f80e2e9ec70ac53081f9603ba8bf7.tar.gz
gentoo-2-29dcad8e6f4f80e2e9ec70ac53081f9603ba8bf7.tar.bz2
gentoo-2-29dcad8e6f4f80e2e9ec70ac53081f9603ba8bf7.zip
fix #266035
(Portage version: 2.2_rc33/cvs/Linux i686)
Diffstat (limited to 'www-apache/mod_perl')
-rw-r--r--www-apache/mod_perl/ChangeLog9
-rw-r--r--www-apache/mod_perl/files/CVE-2009-0796.patch47
-rw-r--r--www-apache/mod_perl/mod_perl-2.0.4-r1.ebuild (renamed from www-apache/mod_perl/mod_perl-2.0.3-r1.ebuild)91
3 files changed, 87 insertions, 60 deletions
diff --git a/www-apache/mod_perl/ChangeLog b/www-apache/mod_perl/ChangeLog
index 930f597af594..220a43e5128c 100644
--- a/www-apache/mod_perl/ChangeLog
+++ b/www-apache/mod_perl/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for www-apache/mod_perl
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_perl/ChangeLog,v 1.70 2009/05/26 17:52:59 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_perl/ChangeLog,v 1.71 2009/07/05 16:43:16 hollow Exp $
+
+*mod_perl-2.0.4-r1 (05 Jul 2009)
+
+ 05 Jul 2009; Benedikt Böhm <hollow@gentoo.org>
+ +files/CVE-2009-0796.patch, -mod_perl-2.0.3-r1.ebuild,
+ +mod_perl-2.0.4-r1.ebuild:
+ fix #266035
26 May 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
mod_perl-2.0.3-r1.ebuild:
diff --git a/www-apache/mod_perl/files/CVE-2009-0796.patch b/www-apache/mod_perl/files/CVE-2009-0796.patch
new file mode 100644
index 000000000000..c13db0de155a
--- /dev/null
+++ b/www-apache/mod_perl/files/CVE-2009-0796.patch
@@ -0,0 +1,47 @@
+--- perl/modperl/trunk/lib/Apache2/Status.pm 2007/12/31 08:05:11 607697
++++ perl/modperl/trunk/lib/Apache2/Status.pm 2009/04/01 15:39:56 760926
+@@ -29,7 +29,7 @@
+
+ use Apache2::Const -compile => qw(OK);
+
+-$Apache2::Status::VERSION = '4.00'; # mod_perl 2.0
++$Apache2::Status::VERSION = '4.01'; # mod_perl 2.0
+
+ use constant IS_WIN32 => ($^O eq "MSWin32");
+
+@@ -126,7 +126,7 @@
+ $r->print(symdump($r, $qs));
+ }
+ else {
+- my $uri = $r->uri;
++ my $uri = $r->location;
+ $r->print('<p>');
+ $r->print(
+ map { qq[<a href="$uri?$_">$status{$_}</a><br />\n] } sort { lc $a cmp lc $b } keys %status
+@@ -198,7 +198,7 @@
+ sub status_inc {
+ my ($r) = @_;
+
+- my $uri = $r->uri;
++ my $uri = $r->location;
+ my @retval = (
+ '<table border="1">',
+ "<tr>",
+@@ -289,7 +289,7 @@
+ my ($r) = @_;
+
+ local $_;
+- my $uri = $r->uri;
++ my $uri = $r->location;
+ my $cache = __PACKAGE__->registry_cache;
+
+ my @retval = "<h2>Compiled registry scripts grouped by their handler</h2>";
+@@ -765,7 +765,7 @@
+ my ($self, $package, $r) = @_;
+
+ my @m = qw(<table>);
+- my $uri = $r->uri;
++ my $uri = $r->location;
+ my $is_main = $package eq "main";
+
+ my $do_dump = has($r, "dumper");
diff --git a/www-apache/mod_perl/mod_perl-2.0.3-r1.ebuild b/www-apache/mod_perl/mod_perl-2.0.4-r1.ebuild
index c631863f1e5e..1a3026e1768c 100644
--- a/www-apache/mod_perl/mod_perl-2.0.3-r1.ebuild
+++ b/www-apache/mod_perl/mod_perl-2.0.4-r1.ebuild
@@ -1,14 +1,15 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_perl/mod_perl-2.0.3-r1.ebuild,v 1.12 2009/05/26 17:52:59 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_perl/mod_perl-2.0.4-r1.ebuild,v 1.1 2009/07/05 16:43:16 hollow Exp $
inherit apache-module perl-module eutils multilib
+
DESCRIPTION="An embedded Perl interpreter for Apache2"
-SRC_URI="mirror://cpan/authors/id/P/PG/PGOLLUCCI/${P}.tar.gz"
+SRC_URI="mirror://apache/perl/${P}.tar.gz"
HOMEPAGE="http://perl.apache.org/"
LICENSE="GPL-2"
-KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE=""
SLOT="1"
@@ -19,33 +20,21 @@ DEPEND=">=dev-perl/Apache-Test-1.27
app-admin/sudo"
RDEPEND="${DEPEND}"
-APACHE2_MOD_CONF="75_${PN}.conf apache2-mod_perl-startup.pl"
-DOCFILES="Changes INSTALL LICENSE README STATUS"
+APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so"
+APACHE2_MOD_CONF="2.0.3/75_${PN}"
APACHE2_MOD_DEFINE="PERL"
+DOCFILES="Changes INSTALL LICENSE README STATUS"
+
need_apache2
pkg_setup() {
- perl-module_pkg_setup
+ has_apache_threads_in dev-lang/perl ithreads
}
src_unpack() {
- INSTALLED_MPM="$(/usr/sbin/apxs2 -q MPM_NAME)"
- eval `perl '-V:useithreads'`
- ITHREADS="${useithreads}"
- if [ "${INSTALLED_MPM}" != "prefork" ]; then
- if [ "${ITHREADS}" == "undef" ]; then
- eerror "You cannot build mod_perl on a threaded apache"
- eerror "with an unthreaded perl. You must either emerge"
- eerror "perl with ithreads in your USE flags, or emerge"
- eerror "apache without threading support"
- die
- fi
- fi
-
unpack ${A}
-
- cd ${S}
+ cd "${S}"
# I am not entirely happy with this solution, but here's what's
# going on here if someone wants to take a stab at another
@@ -74,34 +63,27 @@ src_unpack() {
# Robert Coie <rac@gentoo.org> 2003.05.06
- sed -i -e "s/sleep \$_/sleep \$_ << 2/" ${S}/Apache-Test/lib/Apache/TestServer.pm || die "problem editing TestServer.pm"
-
- # i wonder if this is the same sandbox issue, but TMPDIR is not
- # getting through via SetEnv. sneak it through here.
-
- # Bug 172676
- epatch "${FILESDIR}/RegistryCooker.patch"
+ sed -i -e "s/sleep \$_/sleep \$_ << 2/" \
+ "${S}"/Apache-Test/lib/Apache/TestServer.pm \
+ || die "problem editing TestServer.pm"
# rendhalver - this got redone for 2.0.1 and seems to fix the make test problems
- epatch ${FILESDIR}/mod_perl-2.0.1-sneak-tmpdir.patch
+ epatch "${FILESDIR}"/mod_perl-2.0.1-sneak-tmpdir.patch
+
+ epatch "${FILESDIR}"/CVE-2009-0796.patch
}
src_compile() {
perl Makefile.PL \
- PREFIX=${D}/usr \
+ PREFIX="${D}"/usr \
MP_TRACE=1 \
MP_DEBUG=1 \
MP_USE_DSO=1 \
- MP_APXS=/usr/sbin/apxs2 \
+ MP_APXS=${APXS} \
INSTALLDIRS=vendor </dev/null || die
# reported that parallel make is broken in bug 30257
emake -j1 || die
-
- # mcummings - disabling tests right, there's a bug i haven't found an override for
- # rendhalver - i seem to have fixed this so turning them back on again.
- # yet that sets /tmp as your tmp dir
- #hasq maketest $FEATURES && src_test
}
src_test() {
@@ -110,50 +92,41 @@ src_test() {
# 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}
- chown nobody:nobody ${T}
+ if [[ "$(id -u)" == "0" ]]; then
+ chown nobody:nobody "${WORKDIR}"
+ chown nobody:nobody "${T}"
fi
# this does not || die because of bug 21325. kudos to smark for
# the idea of setting HOME.
-
TMPDIR="${T}" HOME="${T}/" make test
}
src_install() {
- dodir /usr/$(get_libdir)/apache2/modules
+ apache-module_src_install
+
+ dodir "${APACHE_MODULESDIR}"
make install \
- MODPERL_AP_LIBEXECDIR=${D}/usr/$(get_libdir)/apache2/modules \
- MODPERL_AP_INCLUDEDIR=${D}/usr/include/apache2 \
+ MODPERL_AP_LIBEXECDIR="${D}${APACHE_MODULESDIR}" \
+ MODPERL_AP_INCLUDEDIR="${D}${APACHE_INCLUDEDIR}" \
MP_INST_APACHE2=1 \
INSTALLDIRS=vendor || die
# rendhalver - fix the perllocal.pod that gets installed
# it seems to me that this has been getting installed for ages
-
fixlocalpod
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl
+ cp -pPR docs "${D}"/usr/share/doc/${PF}
+ cp -pPR todo "${D}"/usr/share/doc/${PF}
+
# 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.
-
- # this is not needed anymore because Apache2.pm no longer exists
- #eval $(perl -V:vendorarch)
- #cp ${FILESDIR}/${P}-Apache2.pm ${D}/${vendorarch}/Apache2.pm
-
- insinto /etc/apache2/modules.d
- doins ${FILESDIR}/${PV}/75_mod_perl.conf \
- ${FILESDIR}/${PV}/apache2-mod_perl-startup.pl
-
- dodoc ${FILESDIR}/${PV}/75_mod_perl.conf Changes \
- INSTALL LICENSE README STATUS
- cp -pPR docs ${D}/usr/share/doc/${PF}
- cp -pPR todo ${D}/usr/share/doc/${PF}
- for FILE in `grep -lr portage ${D}/*|grep -v ".so"`; do
+ for FILE in $(grep -lr portage "${D}"/*|grep -v ".so"); do
sed -i -e "s:${D}:/:g" ${FILE}
done
}