* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-01-16 10:47 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2008-01-16 10:47 UTC (permalink / raw
To: gentoo-commits
hollow 08/01/16 10:47:46
Modified: apache-2.eclass
Log:
fix #205994
Revision Changes Path
1.6 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.5&r2=1.6
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- apache-2.eclass 31 Dec 2007 23:46:24 -0000 1.5
+++ apache-2.eclass 16 Jan 2008 10:47:45 -0000 1.6
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.5 2007/12/31 23:46:24 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.6 2008/01/16 10:47:45 hollow Exp $
# @ECLASS: apache-2
# @MAINTAINER: apache-devs@gentoo.org
@@ -481,10 +481,8 @@
# link apache2ctl to the init script
dosym /etc/init.d/apache2 /usr/sbin/apache2ctl
- # provide symlinks for all the stuff we no longer rename, bug 177697
- for i in suexec apxs; do
- dosym /usr/sbin/${i} /usr/sbin/${i}2
- done
+ # provide legacy symlink for apxs, bug 177697
+ dosym /usr/sbin/apxs /usr/sbin/apxs2
# install some thirdparty scripts
exeinto /usr/sbin
@@ -512,6 +510,8 @@
if use suexec ; then
fowners 0:apache /usr/sbin/suexec
fperms 4710 /usr/sbin/suexec
+ # provide legacy symlink for suexec, bug 177697
+ dosym /usr/sbin/suexec /usr/sbin/suexec2
fi
# empty dirs
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2014-02-12 0:03 Mike Frysinger (vapier)
0 siblings, 0 replies; 25+ messages in thread
From: Mike Frysinger (vapier) @ 2014-02-12 0:03 UTC (permalink / raw
To: gentoo-commits
vapier 14/02/12 00:03:21
Modified: apache-2.eclass
Log:
add sanity check on code execution in $T to weed out bad mount/kernel settings #500928
Revision Changes Path
1.35 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?r1=1.34&r2=1.35
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- apache-2.eclass 31 Jan 2014 08:29:39 -0000 1.34
+++ apache-2.eclass 12 Feb 2014 00:03:21 -0000 1.35
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.34 2014/01/31 08:29:39 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.35 2014/02/12 00:03:21 vapier Exp $
# @ECLASS: apache-2.eclass
# @MAINTAINER:
@@ -441,6 +441,13 @@
apache-2_src_configure() {
tc-export PKG_CONFIG
+ # Sanity check in case people have bad mounts/TPE settings. #500928
+ if ! "${T}"/pcre-config --help >/dev/null ; then
+ eerror "Could not execute ${T}/pcre-config; do you have bad mount"
+ eerror "permissions in ${T} or have TPE turned on in your kernel?"
+ die "check your runtime settings #500928"
+ fi
+
# Instead of filtering --as-needed (bug #128505), append --no-as-needed
# Thanks to Harald van Dijk
append-ldflags $(no-as-needed)
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2014-01-31 8:29 Mike Frysinger (vapier)
0 siblings, 0 replies; 25+ messages in thread
From: Mike Frysinger (vapier) @ 2014-01-31 8:29 UTC (permalink / raw
To: gentoo-commits
vapier 14/01/31 08:29:39
Modified: apache-2.eclass
Log:
fix pcre-config/pkg-config/apr/apr-util handling when cross-compiling by leveraging SYSROOT #385783 by Bertrand Jacquin
Revision Changes Path
1.34 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.34&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.34&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?r1=1.33&r2=1.34
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- apache-2.eclass 8 Jan 2014 08:38:10 -0000 1.33
+++ apache-2.eclass 31 Jan 2014 08:29:39 -0000 1.34
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.33 2014/01/08 08:38:10 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.34 2014/01/31 08:29:39 vapier Exp $
# @ECLASS: apache-2.eclass
# @MAINTAINER:
@@ -10,7 +10,7 @@
# This eclass handles apache-2.x ebuild functions such as LoadModule generation
# and inter-module dependency checking.
-inherit autotools eutils flag-o-matic multilib ssl-cert user
+inherit autotools eutils flag-o-matic multilib ssl-cert user toolchain-funcs
# ==============================================================================
# INTERNAL VARIABLES
@@ -424,6 +424,14 @@
# patched-in MPMs need the build environment rebuilt
sed -i -e '/sinclude/d' configure.in
AT_M4DIR=build eautoreconf
+
+ # This package really should upgrade to using pcre's .pc file.
+ cat <<-\EOF >"${T}"/pcre-config
+ #!/bin/sh
+ [ "${flag}" = "--version" ] && set -- --modversion
+ exec ${PKG_CONFIG} libpcre "$@"
+ EOF
+ chmod a+x "${T}"/pcre-config
}
# @FUNCTION: apache-2_src_configure
@@ -431,6 +439,8 @@
# This function adds compiler flags and runs econf and emake based on MY_MPM and
# MY_CONF
apache-2_src_configure() {
+ tc-export PKG_CONFIG
+
# Instead of filtering --as-needed (bug #128505), append --no-as-needed
# Thanks to Harald van Dijk
append-ldflags $(no-as-needed)
@@ -442,6 +452,7 @@
# econf overwrites the stuff from config.layout, so we have to put them into
# our myconf line too
+ ac_cv_path_PKGCONFIG=${PKG_CONFIG} \
econf \
--includedir=/usr/include/apache2 \
--libexecdir=/usr/$(get_libdir)/apache2/modules \
@@ -449,9 +460,9 @@
--sysconfdir=/etc/apache2 \
--localstatedir=/var \
--with-mpm=${MY_MPM} \
- --with-apr=/usr \
- --with-apr-util=/usr \
- --with-pcre=/usr \
+ --with-apr="${SYSROOT}"/usr \
+ --with-apr-util="${SYSROOT}"/usr \
+ --with-pcre="${T}"/pcre-config \
--with-z=/usr \
--with-port=80 \
--with-program-name=apache2 \
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2010-12-22 10:02 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2010-12-22 10:02 UTC (permalink / raw
To: gentoo-commits
hollow 10/12/22 10:02:05
Modified: apache-2.eclass
Log:
fix small typo in log message
Revision Changes Path
1.24 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?r1=1.23&r2=1.24
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- apache-2.eclass 28 Aug 2010 14:50:55 -0000 1.23
+++ apache-2.eclass 22 Dec 2010 10:02:05 -0000 1.24
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.23 2010/08/28 14:50:55 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.24 2010/12/22 10:02:05 hollow Exp $
EAPI="2"
@@ -572,7 +572,7 @@
echo
elog "Attention: cgi and cgid modules are now handled via APACHE2_MODULES flags"
elog "in /etc/make.conf. Make sure to enable those in order to compile them."
- elog "In general, you should use 'cgid' with hreaded MPMs and 'cgi' otherwise."
+ elog "In general, you should use 'cgid' with threaded MPMs and 'cgi' otherwise."
echo
}
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2010-08-28 14:50 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2010-08-28 14:50 UTC (permalink / raw
To: gentoo-commits
hollow 10/08/28 14:50:55
Modified: apache-2.eclass
Log:
improve upgrade description wrt #332765
Revision Changes Path
1.23 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?r1=1.22&r2=1.23
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- apache-2.eclass 21 Aug 2010 19:39:52 -0000 1.22
+++ apache-2.eclass 28 Aug 2010 14:50:55 -0000 1.23
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.22 2010/08/21 19:39:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.23 2010/08/28 14:50:55 hollow Exp $
EAPI="2"
@@ -571,9 +571,8 @@
echo
elog "Attention: cgi and cgid modules are now handled via APACHE2_MODULES flags"
- elog "make sure to enable those in order to compile them. In general, you should"
- elog "use 'cgi' with non-multithreaded MPMs (such as prefork) and 'cgid' with"
- elog "multithreaded ones (such as worker)"
+ elog "in /etc/make.conf. Make sure to enable those in order to compile them."
+ elog "In general, you should use 'cgid' with hreaded MPMs and 'cgi' otherwise."
echo
}
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2010-07-11 8:22 Fabio Erculiani (lxnay)
0 siblings, 0 replies; 25+ messages in thread
From: Fabio Erculiani (lxnay) @ 2010-07-11 8:22 UTC (permalink / raw
To: gentoo-commits
lxnay 10/07/11 08:22:40
Modified: apache-2.eclass
Log:
make mod_cgi and mod_cgid modular and handled via USE flags
Revision Changes Path
1.21 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/apache-2.eclass?r1=1.20&r2=1.21
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- apache-2.eclass 5 Mar 2010 09:01:07 -0000 1.20
+++ apache-2.eclass 11 Jul 2010 08:22:40 -0000 1.21
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.20 2010/03/05 09:01:07 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.21 2010/07/11 08:22:40 lxnay Exp $
EAPI="2"
@@ -245,14 +245,6 @@
MY_CONF="${MY_CONF} --without-ssl --disable-ssl"
fi
- if use threads || has ${MY_MPM} ${IUSE_MPMS_THREAD} ; then
- MY_CONF="${MY_CONF} --enable-cgid=${mod_type}"
- MY_MODS="${MY_MODS} cgid"
- else
- MY_CONF="${MY_CONF} --enable-cgi=${mod_type}"
- MY_MODS="${MY_MODS} cgi"
- fi
-
if use suexec ; then
elog "You can manipulate several configure options of suexec"
elog "through the following environment variables:"
@@ -576,6 +568,14 @@
mkdir -p "${ROOT}/var/www/localhost/htdocs"
echo "<html><body><h1>It works!</h1></body></html>" > "${ROOT}/var/www/localhost/htdocs/index.html"
fi
+
+ echo
+ elog "Attention: cgi and cgid modules are now handled via APACHE2_MODULES flags"
+ elog "make sure to enable those in order to compile them. In general, you should"
+ elog "use 'cgi' with non-multithreaded MPMs (such as prefork) and 'cgid' with"
+ elog "multithreaded ones (such as worker)"
+ echo
+
}
EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_install pkg_postinst
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2010-03-05 9:01 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2010-03-05 9:01 UTC (permalink / raw
To: gentoo-commits
hollow 10/03/05 09:01:08
Modified: apache-2.eclass
Log:
do not install magic file unconditionally wrt #307747
Revision Changes Path
1.20 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.19&r2=1.20
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- apache-2.eclass 4 Oct 2009 15:00:45 -0000 1.19
+++ apache-2.eclass 5 Mar 2010 09:01:07 -0000 1.20
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.19 2009/10/04 15:00:45 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.20 2010/03/05 09:01:07 hollow Exp $
EAPI="2"
@@ -486,7 +486,7 @@
generate_load_module
insinto /etc/apache2
doins -r "${GENTOO_PATCHDIR}"/conf/*
- doins docs/conf/magic
+ use apache2_modules_mime_magic && doins docs/conf/magic
insinto /etc/logrotate.d
newins "${GENTOO_PATCHDIR}"/scripts/apache2-logrotate apache2
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2009-10-04 15:00 Samuli Suominen (ssuominen)
0 siblings, 0 replies; 25+ messages in thread
From: Samuli Suominen (ssuominen) @ 2009-10-04 15:00 UTC (permalink / raw
To: gentoo-commits
ssuominen 09/10/04 15:00:46
Modified: apache-2.eclass
Log:
Replace -Wl,--no-as-needed with function from flag-o-matic eclass.
Revision Changes Path
1.19 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.18&r2=1.19
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- apache-2.eclass 20 Sep 2009 08:37:23 -0000 1.18
+++ apache-2.eclass 4 Oct 2009 15:00:45 -0000 1.19
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.18 2009/09/20 08:37:23 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.19 2009/10/04 15:00:45 ssuominen Exp $
EAPI="2"
@@ -444,12 +444,7 @@
apache-2_src_configure() {
# Instead of filtering --as-needed (bug #128505), append --no-as-needed
# Thanks to Harald van Dijk
- # ... but only on platforms that use a GNU linker!
- case ${CHOST} in
- *-solaris* | *-*bsd* | *-linux-gnu)
- append-ldflags -Wl,--no-as-needed
- ;;
- esac
+ append-ldflags $(no-as-needed)
# peruser MPM debugging with -X is nearly impossible
if has peruser ${IUSE_MPMS} && use apache2_mpms_peruser ; then
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2009-09-20 8:37 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2009-09-20 8:37 UTC (permalink / raw
To: gentoo-commits
hollow 09/09/20 08:37:23
Modified: apache-2.eclass
Log:
fix #277297 and #277298; convert to EAPI2
Revision Changes Path
1.18 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.17&r2=1.18
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- apache-2.eclass 5 Jul 2009 16:05:25 -0000 1.17
+++ apache-2.eclass 20 Sep 2009 08:37:23 -0000 1.18
@@ -1,6 +1,8 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.17 2009/07/05 16:05:25 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.18 2009/09/20 08:37:23 hollow Exp $
+
+EAPI="2"
# @ECLASS: apache-2.eclass
# @MAINTAINER:
@@ -10,7 +12,7 @@
# This eclass handles apache-2.x ebuild functions such as LoadModule generation
# and inter-module dependency checking.
-inherit autotools confutils eutils flag-o-matic multilib
+inherit autotools eutils flag-o-matic multilib ssl-cert
# ==============================================================================
# INTERNAL VARIABLES
@@ -79,7 +81,7 @@
DEPEND="dev-lang/perl
=dev-libs/apr-1*
- =dev-libs/apr-util-1*
+ =dev-libs/apr-util-1*[ldap?]
dev-libs/libpcre
ldap? ( =net-nds/openldap-2* )
selinux? ( sec-policy/selinux-apache )
@@ -230,7 +232,6 @@
MY_CONF="--enable-so=static"
if use ldap ; then
- confutils_use_depend_built_with_all ldap dev-libs/apr-util ldap
MY_CONF="${MY_CONF} --enable-authnz_ldap=${mod_type} --enable-ldap=${mod_type}"
MY_MODS="${MY_MODS} ldap authnz_ldap"
else
@@ -392,14 +393,11 @@
fi
}
-# @FUNCTION: apache-2_src_unpack
+# @FUNCTION: apache-2_src_prepare
# @DESCRIPTION:
# This function applies patches, configures a custom file-system layout and
# rebuilds the configure scripts.
-apache-2_src_unpack() {
- unpack ${A}
- cd "${S}"
-
+apache-2_src_prepare() {
# 03_all_gentoo-apache-tools.patch injects -Wl,-z,now, which is not a good
# idea for everyone
case ${CHOST} in
@@ -439,11 +437,11 @@
AT_GNUCONF_UPDATE=yes AT_M4DIR=build eautoreconf
}
-# @FUNCTION: apache-2_src_compile
+# @FUNCTION: apache-2_src_configure
# @DESCRIPTION:
# This function adds compiler flags and runs econf and emake based on MY_MPM and
# MY_CONF
-apache-2_src_compile() {
+apache-2_src_configure() {
# Instead of filtering --as-needed (bug #128505), append --no-as-needed
# Thanks to Harald van Dijk
# ... but only on platforms that use a GNU linker!
@@ -477,8 +475,6 @@
${MY_CONF} || die "econf failed!"
sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h
-
- emake || die "emake failed"
}
# @FUNCTION: apache-2_src_install
@@ -501,10 +497,13 @@
newins "${GENTOO_PATCHDIR}"/scripts/apache2-logrotate apache2
# generate a sane default APACHE2_OPTS
- APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE"
+ APACHE2_OPTS="-D DEFAULT_VHOST -D INFO"
use doc && APACHE2_OPTS="${APACHE2_OPTS} -D MANUAL"
use ssl && APACHE2_OPTS="${APACHE2_OPTS} -D SSL -D SSL_DEFAULT_VHOST"
use suexec && APACHE2_OPTS="${APACHE2_OPTS} -D SUEXEC"
+ if hasq negotiation ${APACHE2_MODULES} && use apache2_modules_negotiation; then
+ APACHE2_OPTS="${APACHE2_OPTS} -D LANGUAGE"
+ fi
sed -i -e "s:APACHE2_OPTS=\".*\":APACHE2_OPTS=\"${APACHE2_OPTS}\":" \
"${GENTOO_PATCHDIR}"/init/apache2.confd || die "sed failed"
@@ -523,10 +522,6 @@
# provide legacy symlink for apxs, bug 177697
dosym /usr/sbin/apxs /usr/sbin/apxs2
- # install some thirdparty scripts
- exeinto /usr/sbin
- use ssl && doexe "${GENTOO_PATCHDIR}"/scripts/gentestcrt.sh
-
# install some documentation
dodoc ABOUT_APACHE CHANGES LAYOUT README README.platforms VERSIONING
dodoc "${GENTOO_PATCHDIR}"/docs/*
@@ -539,10 +534,12 @@
rm -Rf "${D}/usr/share/doc/${PF}/manual"
fi
- # the default webroot gets stored in /usr/share/${PF}/webroot
- ebegin "Installing default webroot to /usr/share/${PF}/webroot"
- dodir /usr/share/${PF}
- mv -f "${D}/var/www/localhost" "${D}/usr/share/${PF}/webroot"
+ # the default icons and error pages get stored in
+ # /usr/share/apache2/{error,icons}
+ dodir /usr/share/apache2
+ mv -f "${D}/var/www/localhost/error" "${D}/usr/share/apache2/error"
+ mv -f "${D}/var/www/localhost/icons" "${D}/usr/share/apache2/icons"
+ rm -rf "${D}/var/www/localhost/"
eend $?
# set some sane permissions for suexec
@@ -559,53 +556,31 @@
fowners apache:apache ${i}
fperms 0755 ${i}
done
-
- # we need /etc/apache2/ssl if USE=ssl
- use ssl && keepdir /etc/apache2/ssl
}
# @FUNCTION: apache-2_pkg_postinst
# @DESCRIPTION:
# This function creates test certificates if SSL is enabled and installs the
-# default webroot to /var/www/localhost if it does not exist. We do this here
+# default index.html to /var/www/localhost if it does not exist. We do this here
# because the default webroot is a copy of the files that exist elsewhere and we
# don't want them to be managed/removed by portage when apache is upgraded.
apache-2_pkg_postinst() {
- einfo
-
- if use ssl && [[ ! -e "${ROOT}/etc/apache2/ssl/server.crt" ]] ; then
- cd "${ROOT}"/etc/apache2/ssl
- einfo "Generating self-signed test certificate in ${ROOT}etc/apache2/ssl ..."
- yes "" 2>/dev/null | \
- "${ROOT}"/usr/sbin/gentestcrt.sh >/dev/null 2>&1 || \
- die "gentestcrt.sh failed"
- einfo
+ if use ssl && [[ ! -e "${ROOT}/etc/ssl/apache2/server.pem" ]]; then
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Apache HTTP Server}"
+ install_cert /etc/ssl/apache2/server
+ ewarn
+ ewarn "The location of SSL certificates has changed. If you are"
+ ewarn "upgrading from ${CATEGORY}/${PN}-2.2.13 or earlier (or remerged"
+ ewarn "*any* apache version), you might want to move your old"
+ ewarn "certificates from /etc/apache2/ssl/ to /etc/ssl/apache2/ and"
+ ewarn "update your config files."
+ ewarn
fi
- if [[ -e "${ROOT}/var/www/localhost" ]] ; then
- elog "The default webroot has not been installed into"
- elog "${ROOT}var/www/localhost because the directory already exists"
- elog "and we do not want to overwrite any files you have put there."
- elog
- elog "If you would like to install the latest webroot, please run"
- elog "emerge --config =${PF}"
- elog
- else
- einfo "Installing default webroot to ${ROOT}var/www/localhost"
- mkdir -p "${ROOT}"/var/www/localhost
- cp -R "${ROOT}"/usr/share/${PF}/webroot/* "${ROOT}"/var/www/localhost/
- einfo
+ if [[ ! -e "${ROOT}/var/www/localhost" ]] ; then
+ mkdir -p "${ROOT}/var/www/localhost/htdocs"
+ echo "<html><body><h1>It works!</h1></body></html>" > "${ROOT}/var/www/localhost/htdocs/index.html"
fi
}
-# @FUNCTION: apache-2_pkg_config
-# @DESCRIPTION:
-# This function installs -- and overwrites -- the default webroot to
-# /var/www/localhost
-apache-2_pkg_config() {
- einfo "Installing default webroot to ${ROOT}var/www/localhost"
- mkdir -p "${ROOT}"/var/www/localhost
- cp -R "${ROOT}"/usr/share/${PF}/webroot/* "${ROOT}"/var/www/localhost/
-}
-
-EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst pkg_config
+EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_install pkg_postinst
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2009-07-05 16:05 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2009-07-05 16:05 UTC (permalink / raw
To: gentoo-commits
hollow 09/07/05 16:05:25
Modified: apache-2.eclass
Log:
fix SUEXEC_CALLER, bug #264261
Revision Changes Path
1.17 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.16&r2=1.17
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- apache-2.eclass 4 Apr 2009 17:50:51 -0000 1.16
+++ apache-2.eclass 5 Jul 2009 16:05:25 -0000 1.17
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.16 2009/04/04 17:50:51 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.17 2009/07/05 16:05:25 hollow Exp $
# @ECLASS: apache-2.eclass
# @MAINTAINER:
@@ -547,7 +547,7 @@
# set some sane permissions for suexec
if use suexec ; then
- fowners 0:apache /usr/sbin/suexec
+ fowners 0:${SUEXEC_CALLER:-apache} /usr/sbin/suexec
fperms 4710 /usr/sbin/suexec
# provide legacy symlink for suexec, bug 177697
dosym /usr/sbin/suexec /usr/sbin/suexec2
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2009-04-04 17:50 Fabian Groffen (grobian)
0 siblings, 0 replies; 25+ messages in thread
From: Fabian Groffen (grobian) @ 2009-04-04 17:50 UTC (permalink / raw
To: gentoo-commits
grobian 09/04/04 17:50:51
Modified: apache-2.eclass
Log:
Backport non-GNU ld fixes for most notably Darwin from Prefix
Revision Changes Path
1.16 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.15&r2=1.16
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- apache-2.eclass 10 Dec 2008 01:15:47 -0000 1.15
+++ apache-2.eclass 4 Apr 2009 17:50:51 -0000 1.16
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.15 2008/12/10 01:15:47 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.16 2009/04/04 17:50:51 grobian Exp $
# @ECLASS: apache-2.eclass
# @MAINTAINER:
@@ -400,6 +400,24 @@
unpack ${A}
cd "${S}"
+ # 03_all_gentoo-apache-tools.patch injects -Wl,-z,now, which is not a good
+ # idea for everyone
+ case ${CHOST} in
+ *-linux-gnu|*-solaris*|*-freebsd*)
+ # do nothing, these use GNU binutils
+ :
+ ;;
+ *-darwin*)
+ sed -i -e 's/-Wl,-z,now/-Wl,-bind_at_load/g' \
+ "${GENTOO_PATCHDIR}"/patches/03_all_gentoo_apache-tools.patch
+ ;;
+ *)
+ # patch it out to be like upstream
+ sed -i -e 's/-Wl,-z,now//g' \
+ "${GENTOO_PATCHDIR}"/patches/03_all_gentoo_apache-tools.patch
+ ;;
+ esac
+
# Use correct multilib libdir in gentoo patches
sed -i -e "s:/usr/lib:/usr/$(get_libdir):g" \
"${GENTOO_PATCHDIR}"/{conf/httpd.conf,init/*,patches/config.layout} \
@@ -428,7 +446,12 @@
apache-2_src_compile() {
# Instead of filtering --as-needed (bug #128505), append --no-as-needed
# Thanks to Harald van Dijk
- append-ldflags -Wl,--no-as-needed
+ # ... but only on platforms that use a GNU linker!
+ case ${CHOST} in
+ *-solaris* | *-*bsd* | *-linux-gnu)
+ append-ldflags -Wl,--no-as-needed
+ ;;
+ esac
# peruser MPM debugging with -X is nearly impossible
if has peruser ${IUSE_MPMS} && use apache2_mpms_peruser ; then
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-12-10 1:15 Robin H. Johnson (robbat2)
0 siblings, 0 replies; 25+ messages in thread
From: Robin H. Johnson (robbat2) @ 2008-12-10 1:15 UTC (permalink / raw
To: gentoo-commits
robbat2 08/12/10 01:15:47
Modified: apache-2.eclass
Log:
Update the comment to say explicitly how to override the variable sanely.
Revision Changes Path
1.15 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.14&r2=1.15
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -p -w -b -B -u -u -r1.14 -r1.15
--- apache-2.eclass 10 Dec 2008 01:06:12 -0000 1.14
+++ apache-2.eclass 10 Dec 2008 01:15:47 -0000 1.15
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.14 2008/12/10 01:06:12 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.15 2008/12/10 01:15:47 robbat2 Exp $
# @ECLASS: apache-2.eclass
# @MAINTAINER:
@@ -19,7 +19,10 @@ inherit autotools confutils eutils flag-
# @ECLASS-VARIABLE: GENTOO_PATCHNAME
# @DESCRIPTION:
# This internal variable contains the prefix for the patch tarball.
-# Defaults to the full version (including revision) of the package.
+# Defaults to the full name and version (including revision) of the package.
+# If you want to override this in an ebuild, use:
+# ORIG_PR="(revision of Gentoo stuff you want)"
+# GENTOO_PATCHNAME="gentoo-${PN}-${PV}${ORIG_PR:+-${ORIG_PR}}"
[[ -n "$GENTOO_PATCHNAME" ]] || GENTOO_PATCHNAME="gentoo-${PF}"
# @ECLASS-VARIABLE: GENTOO_PATCHDIR
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-12-10 1:06 Robin H. Johnson (robbat2)
0 siblings, 0 replies; 25+ messages in thread
From: Robin H. Johnson (robbat2) @ 2008-12-10 1:06 UTC (permalink / raw
To: gentoo-commits
robbat2 08/12/10 01:06:12
Modified: apache-2.eclass
Log:
Allow overriding of $GENTOO_PATCHNAME and $GENTOO_PATCHDIR for easier testing in overlays with other revision numbers. Use GENTOO_PATCHNAME="gentoo-${PV}${ORIG_PR:+-${ORIG_PR}}" in the ebuild.
Revision Changes Path
1.14 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.13&r2=1.14
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -p -w -b -B -u -u -r1.13 -r1.14
--- apache-2.eclass 25 Oct 2008 14:46:00 -0000 1.13
+++ apache-2.eclass 10 Dec 2008 01:06:12 -0000 1.14
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.13 2008/10/25 14:46:00 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.14 2008/12/10 01:06:12 robbat2 Exp $
# @ECLASS: apache-2.eclass
# @MAINTAINER:
@@ -18,14 +18,16 @@ inherit autotools confutils eutils flag-
# @ECLASS-VARIABLE: GENTOO_PATCHNAME
# @DESCRIPTION:
-# This internal variable contains the prefix for the patch tarball
-GENTOO_PATCHNAME="gentoo-${PF}"
+# This internal variable contains the prefix for the patch tarball.
+# Defaults to the full version (including revision) of the package.
+[[ -n "$GENTOO_PATCHNAME" ]] || GENTOO_PATCHNAME="gentoo-${PF}"
# @ECLASS-VARIABLE: GENTOO_PATCHDIR
# @DESCRIPTION:
# This internal variable contains the working directory where patches and config
-# files are located
-GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}"
+# files are located.
+# Defaults to the patchset name appended to the working directory.
+[[ -n "$GENTOO_PATCHDIR" ]] || GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}"
# @VARIABLE: GENTOO_DEVELOPER
# @DESCRIPTION:
@@ -37,8 +39,14 @@ GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PAT
# This variable needs to be set in the ebuild and contains the date the patch
# tarball was created at in YYYYMMDD format
+# @VARIABLE: GENTOO_PATCH_A
+# @DESCRIPTION:
+# This variable should contain the entire filename of patch tarball.
+# Defaults to the name of the patchset, with a datestamp.
+[[ -n "$GENTOO_PATCH_A" ]] || GENTOO_PATCH_A="${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2"
+
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
- http://dev.gentoo.org/~${GENTOO_DEVELOPER}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2"
+ http://dev.gentoo.org/~${GENTOO_DEVELOPER}/dist/apache/${GENTOO_PATCH_A}"
# @VARIABLE: IUSE_MPMS_FORK
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-10-25 14:46 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2008-10-25 14:46 UTC (permalink / raw
To: gentoo-commits
hollow 08/10/25 14:46:00
Modified: apache-2.eclass
Log:
install apache2ctl wrapper script if available
Revision Changes Path
1.13 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.12&r2=1.13
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- apache-2.eclass 29 Aug 2008 13:22:21 -0000 1.12
+++ apache-2.eclass 25 Oct 2008 14:46:00 -0000 1.13
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.12 2008/08/29 13:22:21 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.13 2008/10/25 14:46:00 hollow Exp $
# @ECLASS: apache-2.eclass
# @MAINTAINER:
@@ -478,8 +478,13 @@
newconfd "${GENTOO_PATCHDIR}"/init/apache2.confd apache2
newinitd "${GENTOO_PATCHDIR}"/init/apache2.initd apache2
- # link apache2ctl to the init script
- dosym /etc/init.d/apache2 /usr/sbin/apache2ctl
+ # install apache2ctl wrapper for our init script if available
+ if test -e "${GENTOO_PATCHDIR}"/scripts/apache2ctl; then
+ exeinto /usr/sbin
+ doexe "${GENTOO_PATCHDIR}"/scripts/apache2ctl
+ else
+ dosym /etc/init.d/apache2 /usr/sbin/apache2ctl
+ fi
# provide legacy symlink for apxs, bug 177697
dosym /usr/sbin/apxs /usr/sbin/apxs2
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-08-29 13:22 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2008-08-29 13:22 UTC (permalink / raw
To: gentoo-commits
hollow 08/08/29 13:22:22
Modified: apache-2.eclass
Log:
remove unsupported --with-perl; add message for BSD users
Revision Changes Path
1.12 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.11&r2=1.12
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- apache-2.eclass 23 Mar 2008 13:03:53 -0000 1.11
+++ apache-2.eclass 29 Aug 2008 13:22:21 -0000 1.12
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.11 2008/03/23 13:03:53 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.12 2008/08/29 13:22:21 hollow Exp $
# @ECLASS: apache-2.eclass
# @MAINTAINER:
@@ -373,6 +373,12 @@
elog "Please note that you need SysV IPC support in your kernel."
elog "Make sure CONFIG_SYSVIPC=y is set."
elog
+
+ if use userland_BSD; then
+ elog "On BSD systems you need to add the following line to /boot/loader.conf:"
+ elog " accf_http_load=\"YES\""
+ elog
+ fi
}
# @FUNCTION: apache-2_src_unpack
@@ -427,7 +433,6 @@
--sysconfdir=/etc/apache2 \
--localstatedir=/var \
--with-mpm=${MY_MPM} \
- --with-perl=/usr/bin/perl \
--with-apr=/usr \
--with-apr-util=/usr \
--with-pcre=/usr \
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-03-23 13:03 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2008-03-23 13:03 UTC (permalink / raw
To: gentoo-commits
hollow 08/03/23 13:03:54
Modified: apache-2.eclass
Log:
fix default webroot installation; fix einfo output; update documentation
Revision Changes Path
1.11 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.10&r2=1.11
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- apache-2.eclass 23 Mar 2008 10:28:45 -0000 1.10
+++ apache-2.eclass 23 Mar 2008 13:03:53 -0000 1.11
@@ -1,15 +1,14 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.10 2008/03/23 10:28:45 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.11 2008/03/23 13:03:53 hollow Exp $
# @ECLASS: apache-2.eclass
# @MAINTAINER:
# apache-devs@gentoo.org
-# @BLURB: Provides a common set of functions for >=apache-2.2* ebuilds
+# @BLURB: Provides a common set of functions for apache-2.x ebuilds
# @DESCRIPTION:
-# This eclass handles common apache ebuild functions in a sane way and providing
-# information about where certain interfaces are located such as LoadModule
-# generation and inter-module dependency checking.
+# This eclass handles apache-2.x ebuild functions such as LoadModule generation
+# and inter-module dependency checking.
inherit autotools confutils eutils flag-o-matic multilib
@@ -44,12 +43,12 @@
# @VARIABLE: IUSE_MPMS_FORK
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a list of forking
-# (i.e. non-threaded) MPMS
+# (i.e. non-threaded) MPMs
# @VARIABLE: IUSE_MPMS_THREAD
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a list of threaded
-# MPMS
+# MPMs
# @VARIABLE: IUSE_MODULES
# @DESCRIPTION:
@@ -360,6 +359,10 @@
apache-2_pkg_setup() {
check_upgrade
+ # setup apache user and group
+ enewgroup apache 81
+ enewuser apache 81 -1 /var/www apache
+
setup_mpm
setup_modules
@@ -367,10 +370,6 @@
MY_CONF="${MY_CONF} --enable-maintainer-mode --enable-exception-hook"
fi
- # setup apache user and group
- enewgroup apache 81
- enewuser apache 81 -1 /var/www apache
-
elog "Please note that you need SysV IPC support in your kernel."
elog "Make sure CONFIG_SYSVIPC=y is set."
elog
@@ -445,7 +444,7 @@
# @FUNCTION: apache-2_src_install
# @DESCRIPTION:
-# This function runs emake install and generates, installs and adapts the gentoo
+# This function runs `emake install' and generates, installs and adapts the gentoo
# specific configuration files found in the tarball
apache-2_src_install() {
make DESTDIR="${D}" install || die "make install failed"
@@ -496,11 +495,11 @@
rm -Rf "${D}/usr/share/doc/${PF}/manual"
fi
- # the default webroot gets stored in /usr/share/doc
- ebegin "Installing default webroot to /usr/share/doc/${PF}"
- mv -f "${D}/var/www/localhost" "${D}/usr/share/doc/${PF}/webroot"
+ # the default webroot gets stored in /usr/share/${PF}/webroot
+ ebegin "Installing default webroot to /usr/share/${PF}/webroot"
+ dodir /usr/share/${PF}
+ mv -f "${D}/var/www/localhost" "${D}/usr/share/${PF}/webroot"
eend $?
- keepdir /var/www/localhost/htdocs
# set some sane permissions for suexec
if use suexec ; then
@@ -524,13 +523,14 @@
# @FUNCTION: apache-2_pkg_postinst
# @DESCRIPTION:
# This function creates test certificates if SSL is enabled and installs the
-# default webroot if /var/www/localhost does not exist. We do this here because
-# the default webroot is a copy of the files that exist elsewhere and we don't
-# want them to be managed/removed by portage when apache is upgraded.
+# default webroot to /var/www/localhost if it does not exist. We do this here
+# because the default webroot is a copy of the files that exist elsewhere and we
+# don't want them to be managed/removed by portage when apache is upgraded.
apache-2_pkg_postinst() {
+ einfo
+
if use ssl && [[ ! -e "${ROOT}/etc/apache2/ssl/server.crt" ]] ; then
cd "${ROOT}"/etc/apache2/ssl
- einfo
einfo "Generating self-signed test certificate in ${ROOT}etc/apache2/ssl ..."
yes "" 2>/dev/null | \
"${ROOT}"/usr/sbin/gentestcrt.sh >/dev/null 2>&1 || \
@@ -549,19 +549,19 @@
else
einfo "Installing default webroot to ${ROOT}var/www/localhost"
mkdir -p "${ROOT}"/var/www/localhost
- cp -R "${ROOT}"/usr/share/doc/${PF}/webroot/* "${ROOT}"/var/www/localhost
- chown -R apache:0 "${ROOT}"/var/www/localhost
+ cp -R "${ROOT}"/usr/share/${PF}/webroot/* "${ROOT}"/var/www/localhost/
+ einfo
fi
}
# @FUNCTION: apache-2_pkg_config
# @DESCRIPTION:
-# This function installs -- and removes a previously existing -- default webroot
-# to /var/www/localhost
+# This function installs -- and overwrites -- the default webroot to
+# /var/www/localhost
apache-2_pkg_config() {
einfo "Installing default webroot to ${ROOT}var/www/localhost"
- mkdir "${ROOT}"var{,/www{,/localhost}}
- cp -R "${ROOT}"usr/share/doc/${PF}/webroot/* "${ROOT}"var/www/localhost/
+ mkdir -p "${ROOT}"/var/www/localhost
+ cp -R "${ROOT}"/usr/share/${PF}/webroot/* "${ROOT}"/var/www/localhost/
}
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst pkg_config
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-03-23 10:28 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2008-03-23 10:28 UTC (permalink / raw
To: gentoo-commits
hollow 08/03/23 10:28:45
Modified: apache-2.eclass
Log:
fix documentation syntax
Revision Changes Path
1.10 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.9&r2=1.10
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- apache-2.eclass 23 Mar 2008 00:14:13 -0000 1.9
+++ apache-2.eclass 23 Mar 2008 10:28:45 -0000 1.10
@@ -1,9 +1,10 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.9 2008/03/23 00:14:13 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.10 2008/03/23 10:28:45 hollow Exp $
-# @ECLASS: apache-2
-# @MAINTAINER: apache-devs@gentoo.org
+# @ECLASS: apache-2.eclass
+# @MAINTAINER:
+# apache-devs@gentoo.org
# @BLURB: Provides a common set of functions for >=apache-2.2* ebuilds
# @DESCRIPTION:
# This eclass handles common apache ebuild functions in a sane way and providing
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-03-23 0:14 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2008-03-23 0:14 UTC (permalink / raw
To: gentoo-commits
hollow 08/03/23 00:14:14
Modified: apache-2.eclass
Log:
fix documentation; use confutils eclass
Revision Changes Path
1.9 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.8&r2=1.9
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- apache-2.eclass 2 Feb 2008 10:10:36 -0000 1.8
+++ apache-2.eclass 23 Mar 2008 00:14:13 -0000 1.9
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.8 2008/02/02 10:10:36 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.9 2008/03/23 00:14:13 hollow Exp $
# @ECLASS: apache-2
# @MAINTAINER: apache-devs@gentoo.org
@@ -10,7 +10,7 @@
# information about where certain interfaces are located such as LoadModule
# generation and inter-module dependency checking.
-inherit autotools eutils flag-o-matic multilib
+inherit autotools confutils eutils flag-o-matic multilib
# ==============================================================================
# INTERNAL VARIABLES
@@ -27,12 +27,12 @@
# files are located
GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}"
-# @ECLASS-VARIABLE: GENTOO_DEVELOPER
+# @VARIABLE: GENTOO_DEVELOPER
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains the name of the
# gentoo developer who created the patch tarball
-# @ECLASS-VARIABLE: GENTOO_PATCHSTAMP
+# @VARIABLE: GENTOO_PATCHSTAMP
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains the date the patch
# tarball was created at in YYYYMMDD format
@@ -40,17 +40,17 @@
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
http://dev.gentoo.org/~${GENTOO_DEVELOPER}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2"
-# @ECLASS-VARIABLE: IUSE_MPMS_FORK
+# @VARIABLE: IUSE_MPMS_FORK
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a list of forking
# (i.e. non-threaded) MPMS
-# @ECLASS-VARIABLE: IUSE_MPMS_THREAD
+# @VARIABLE: IUSE_MPMS_THREAD
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a list of threaded
# MPMS
-# @ECLASS-VARIABLE: IUSE_MODULES
+# @VARIABLE: IUSE_MODULES
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a list of available
# built-in modules
@@ -133,7 +133,7 @@
fi
}
-# @ECLASS-VARIABLE: MODULE_CRITICAL
+# @VARIABLE: MODULE_CRITICAL
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a space-separated
# list of modules critical for the default apache. A user may still
@@ -164,7 +164,7 @@
fi
}
-# @ECLASS-VARIABLE: MODULE_DEPENDS
+# @VARIABLE: MODULE_DEPENDS
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a space-separated
# list of dependency tokens each with a module and the module it depends on
@@ -219,12 +219,7 @@
MY_CONF="--enable-so=static"
if use ldap ; then
- if ! built_with_use 'dev-libs/apr-util' ldap ; then
- eerror "dev-libs/apr-util is missing LDAP support. For apache to have"
- eerror "ldap support, apr-util must be built with the ldap USE-flag"
- eerror "enabled."
- die "ldap USE-flag enabled while not supported in apr-util"
- fi
+ confutils_use_depend_built_with_all ldap dev-libs/apr-util ldap
MY_CONF="${MY_CONF} --enable-authnz_ldap=${mod_type} --enable-ldap=${mod_type}"
MY_MODS="${MY_MODS} ldap authnz_ldap"
else
@@ -290,7 +285,7 @@
check_module_critical
}
-# @ECLASS-VARIABLE: MODULE_DEFINES
+# @VARIABLE: MODULE_DEFINES
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a space-separated
# list of tokens each mapping a module to a runtime define which can be
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-02-02 10:10 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2008-02-02 10:10 UTC (permalink / raw
To: gentoo-commits
hollow 08/02/02 10:10:36
Modified: apache-2.eclass
Log:
remove depend.apache usage wrt #208033
Revision Changes Path
1.8 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.7&r2=1.8
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- apache-2.eclass 19 Jan 2008 10:59:08 -0000 1.7
+++ apache-2.eclass 2 Feb 2008 10:10:36 -0000 1.8
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.7 2008/01/19 10:59:08 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.8 2008/02/02 10:10:36 hollow Exp $
# @ECLASS: apache-2
# @MAINTAINER: apache-devs@gentoo.org
@@ -10,7 +10,7 @@
# information about where certain interfaces are located such as LoadModule
# generation and inter-module dependency checking.
-inherit depend.apache eutils flag-o-matic multilib autotools
+inherit autotools eutils flag-o-matic multilib
# ==============================================================================
# INTERNAL VARIABLES
@@ -194,12 +194,12 @@
}
# @ECLASS-VARIABLE: MY_CONF
-# DESCRIPTION:
+# @DESCRIPTION:
# This internal variable contains the econf options for the current module
# selection after a call to setup_modules()
# @ECLASS-VARIABLE: MY_MODS
-# DESCRIPTION:
+# @DESCRIPTION:
# This internal variable contains a sorted, space separated list of currently
# selected modules after a call to setup_modules()
@@ -302,7 +302,7 @@
# This internal function generates the LoadModule lines for httpd.conf based on
# the current module selection and MODULE_DEFINES
generate_load_module() {
- local endit=0 mod_lines= mod_dir="${D}${APACHE2_MODULESDIR}"
+ local endit=0 mod_lines= mod_dir="${D}/usr/$(get_libdir)/apache2/modules"
if use static; then
sed -i -e "/%%LOAD_MODULE%%/d" \
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2008-01-19 10:59 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2008-01-19 10:59 UTC (permalink / raw
To: gentoo-commits
hollow 08/01/19 10:59:09
Modified: apache-2.eclass
Log:
update openssl dependency for TLS extensions; documentation cleanup
Revision Changes Path
1.7 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.6&r2=1.7
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- apache-2.eclass 16 Jan 2008 10:47:45 -0000 1.6
+++ apache-2.eclass 19 Jan 2008 10:59:08 -0000 1.7
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.6 2008/01/16 10:47:45 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.7 2008/01/19 10:59:08 hollow Exp $
# @ECLASS: apache-2
# @MAINTAINER: apache-devs@gentoo.org
@@ -35,7 +35,7 @@
# @ECLASS-VARIABLE: GENTOO_PATCHSTAMP
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains the date the patch
-# tarball was created at in YYMMDD format
+# tarball was created at in YYYYMMDD format
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
http://dev.gentoo.org/~${GENTOO_DEVELOPER}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2"
@@ -72,7 +72,7 @@
dev-libs/libpcre
ldap? ( =net-nds/openldap-2* )
selinux? ( sec-policy/selinux-apache )
- ssl? ( dev-libs/openssl )
+ ssl? ( >=dev-libs/openssl-0.9.8f )
!=www-servers/apache-1*"
RDEPEND="${DEPEND}"
PDEPEND="~app-admin/apache-tools-${PV}"
@@ -84,7 +84,7 @@
# ==============================================================================
# @ECLASS-VARIABLE: MY_MPM
-# DESCRIPTION:
+# @DESCRIPTION:
# This internal variable contains the selected MPM after a call to setup_mpm()
# @FUNCTION: setup_mpm
@@ -179,7 +179,7 @@
for m in ${MY_MODS} ; do
for dep in ${MODULE_DEPENDS} ; do
- if [[ "${m}" == "${dep%:*}" ]]; then
+ if [[ "${m}" == "${dep%:*}" ]] ; then
if ! use apache2_modules_${dep#*:} ; then
eerror "Module '${m}' depends on '${dep#*:}'"
err=1
@@ -449,7 +449,7 @@
# @FUNCTION: apache-2_src_install
# @DESCRIPTION:
-# This function runs emake install and generates, install and adapts the gentoo
+# This function runs emake install and generates, installs and adapts the gentoo
# specific configuration files found in the tarball
apache-2_src_install() {
make DESTDIR="${D}" install || die "make install failed"
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2007-12-31 23:46 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2007-12-31 23:46 UTC (permalink / raw
To: gentoo-commits
hollow 07/12/31 23:46:24
Modified: apache-2.eclass
Log:
fix #202722
Revision Changes Path
1.5 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.4&r2=1.5
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- apache-2.eclass 20 Dec 2007 15:53:19 -0000 1.4
+++ apache-2.eclass 31 Dec 2007 23:46:24 -0000 1.5
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.4 2007/12/20 15:53:19 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.5 2007/12/31 23:46:24 hollow Exp $
# @ECLASS: apache-2
# @MAINTAINER: apache-devs@gentoo.org
@@ -452,7 +452,7 @@
# This function runs emake install and generates, install and adapts the gentoo
# specific configuration files found in the tarball
apache-2_src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
+ make DESTDIR="${D}" install || die "make install failed"
# install our configuration files
keepdir /etc/apache2/vhosts.d
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2007-12-20 15:53 Zac Medico (zmedico)
0 siblings, 0 replies; 25+ messages in thread
From: Zac Medico (zmedico) @ 2007-12-20 15:53 UTC (permalink / raw
To: gentoo-commits
zmedico 07/12/20 15:53:19
Modified: apache-2.eclass
Log:
Bug #202748 - In setup_mpm(), initialize MY_MPM to an empty
string before entering the loop so that it still works when
setup_mpm() is called a second time during pkg_setup() of a
binary package. This is needed for compatibility with
portage-2.1.4 since the MY_MPM value from build time will
still exist at binary package installation time. Thanks to
Tais M. Hansen for <tais.hansen@osd.dk> for debugging this.
Revision Changes Path
1.4 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.3&r2=1.4
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- apache-2.eclass 15 Dec 2007 14:00:19 -0000 1.3
+++ apache-2.eclass 20 Dec 2007 15:53:19 -0000 1.4
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.3 2007/12/15 14:00:19 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.4 2007/12/20 15:53:19 zmedico Exp $
# @ECLASS: apache-2
# @MAINTAINER: apache-devs@gentoo.org
@@ -92,6 +92,7 @@
# This internal function makes sure that only one of APACHE2_MPMS was selected
# or a default based on USE=threads is selected if APACHE2_MPMS is empty
setup_mpm() {
+ MY_MPM=""
for x in ${IUSE_MPMS} ; do
if use apache2_mpms_${x} ; then
if [[ -z "${MY_MPM}" ]] ; then
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2007-12-15 14:00 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2007-12-15 14:00 UTC (permalink / raw
To: gentoo-commits
hollow 07/12/15 14:00:19
Modified: apache-2.eclass
Log:
fix #202376; add a check for critical modules; support local IUSE in apache ebuilds
Revision Changes Path
1.3 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.2&r2=1.3
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- apache-2.eclass 29 Nov 2007 18:43:31 -0000 1.2
+++ apache-2.eclass 15 Dec 2007 14:00:19 -0000 1.3
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.2 2007/11/29 18:43:31 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.3 2007/12/15 14:00:19 hollow Exp $
# @ECLASS: apache-2
# @MAINTAINER: apache-devs@gentoo.org
@@ -56,7 +56,7 @@
# built-in modules
IUSE_MPMS="${IUSE_MPMS_FORK} ${IUSE_MPMS_THREAD}"
-IUSE="debug doc ldap selinux ssl static suexec threads"
+IUSE="${IUSE} debug doc ldap selinux ssl static suexec threads"
for module in ${IUSE_MODULES} ; do
IUSE="${IUSE} apache2_modules_${module}"
@@ -132,6 +132,37 @@
fi
}
+# @ECLASS-VARIABLE: MODULE_CRITICAL
+# @DESCRIPTION:
+# This variable needs to be set in the ebuild and contains a space-separated
+# list of modules critical for the default apache. A user may still
+# disable these modules for custom minimal installation at their own risk.
+
+# @FUNCTION: check_module_critical
+# @DESCRIPTION:
+# This internal function warns the user about modules critical for the default
+# apache configuration.
+check_module_critical() {
+ local unsupported=0
+
+ for m in ${MODULE_CRITICAL} ; do
+ if ! has ${m} ${MY_MODS} ; then
+ ewarn "Module '${m}' is required in the default apache configuration."
+ unsupported=1
+ fi
+ done
+
+ if [[ ${unsupported} -ne 0 ]] ; then
+ ewarn
+ ewarn "You have disabled one or more required modules"
+ ewarn "for the default apache configuration."
+ ewarn "Although this is not an error, please be"
+ ewarn "aware that this setup is UNSUPPORTED."
+ ewarn
+ ebeep 10
+ fi
+}
+
# @ECLASS-VARIABLE: MODULE_DEPENDS
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a space-separated
@@ -255,6 +286,7 @@
# sort and uniquify MY_MODS
MY_MODS=$(echo ${MY_MODS} | tr ' ' '\n' | sort -u)
check_module_depends
+ check_module_critical
}
# @ECLASS-VARIABLE: MODULE_DEFINES
@@ -350,13 +382,7 @@
# @FUNCTION: apache-2_src_unpack
# @DESCRIPTION:
# This function applies patches, configures a custom file-system layout and
-# rebuilds the configure scripts. The patch names are organized as follows:
-#
-# 00-19 Gentoo specific (00_all_some-title.patch)
-# 20-39 Additional MPMs (20_all_${MPM}_some-title.patch)
-# 40-59 USE-flag based (40_all_${USE}_some-title.patch)
-# 60-79 Version specific (60_all_${PV}_some-title.patch)
-# 80-99 Security patches (80_all_${PV}_cve-####-####.patch)
+# rebuilds the configure scripts.
apache-2_src_unpack() {
unpack ${A}
cd "${S}"
@@ -373,13 +399,13 @@
die "Failed preparing config.layout!"
sed -i -e "s:version:${PF}:g" "${S}"/config.layout
- # patched-in MPMs need the build environment rebuilt
- sed -i -e '/sinclude/d' configure.in
- AT_GNUCONF_UPDATE=yes AT_M4DIR=build eautoreconf
-
# apache2.8 instead of httpd.8 (bug #194828)
mv docs/man/{httpd,apache2}.8
sed -i -e 's/httpd\.8/apache2.8/g' Makefile.in
+
+ # patched-in MPMs need the build environment rebuilt
+ sed -i -e '/sinclude/d' configure.in
+ AT_GNUCONF_UPDATE=yes AT_M4DIR=build eautoreconf
}
# @FUNCTION: apache-2_src_compile
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2007-11-29 18:43 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2007-11-29 18:43 UTC (permalink / raw
To: gentoo-commits
hollow 07/11/29 18:43:32
Modified: apache-2.eclass
Log:
Fix #200736 and man-page installation
Revision Changes Path
1.2 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?r1=1.1&r2=1.2
Index: apache-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apache-2.eclass 28 Nov 2007 13:04:12 -0000 1.1
+++ apache-2.eclass 29 Nov 2007 18:43:31 -0000 1.2
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.1 2007/11/28 13:04:12 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.2 2007/11/29 18:43:31 hollow Exp $
# @ECLASS: apache-2
# @MAINTAINER: apache-devs@gentoo.org
@@ -311,7 +311,7 @@
eerror "(${ROOT}etc/apache2/apache2-builtin-mods) exists on your"
eerror "system."
eerror
- eerror "Please read http://www.gentoo.org/proj/en/apache/upgrade.xml"
+ eerror "Please read http://www.gentoo.org/doc/en/apache-upgrading.xml"
eerror "for detailed information how to convert this file to the new"
eerror "APACHE2_MODULES USE_EXPAND variable."
eerror
@@ -379,6 +379,7 @@
# apache2.8 instead of httpd.8 (bug #194828)
mv docs/man/{httpd,apache2}.8
+ sed -i -e 's/httpd\.8/apache2.8/g' Makefile.in
}
# @FUNCTION: apache-2_src_compile
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass
@ 2007-11-28 13:04 Benedikt Boehm (hollow)
0 siblings, 0 replies; 25+ messages in thread
From: Benedikt Boehm (hollow) @ 2007-11-28 13:04 UTC (permalink / raw
To: gentoo-commits
hollow 07/11/28 13:04:13
Added: apache-2.eclass
Log:
Add apache-2 eclass
Revision Changes Path
1.1 eclass/apache-2.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.eclass?rev=1.1&content-type=text/plain
Index: apache-2.eclass
===================================================================
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.1 2007/11/28 13:04:12 hollow Exp $
# @ECLASS: apache-2
# @MAINTAINER: apache-devs@gentoo.org
# @BLURB: Provides a common set of functions for >=apache-2.2* ebuilds
# @DESCRIPTION:
# This eclass handles common apache ebuild functions in a sane way and providing
# information about where certain interfaces are located such as LoadModule
# generation and inter-module dependency checking.
inherit depend.apache eutils flag-o-matic multilib autotools
# ==============================================================================
# INTERNAL VARIABLES
# ==============================================================================
# @ECLASS-VARIABLE: GENTOO_PATCHNAME
# @DESCRIPTION:
# This internal variable contains the prefix for the patch tarball
GENTOO_PATCHNAME="gentoo-${PF}"
# @ECLASS-VARIABLE: GENTOO_PATCHDIR
# @DESCRIPTION:
# This internal variable contains the working directory where patches and config
# files are located
GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}"
# @ECLASS-VARIABLE: GENTOO_DEVELOPER
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains the name of the
# gentoo developer who created the patch tarball
# @ECLASS-VARIABLE: GENTOO_PATCHSTAMP
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains the date the patch
# tarball was created at in YYMMDD format
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
http://dev.gentoo.org/~${GENTOO_DEVELOPER}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2"
# @ECLASS-VARIABLE: IUSE_MPMS_FORK
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a list of forking
# (i.e. non-threaded) MPMS
# @ECLASS-VARIABLE: IUSE_MPMS_THREAD
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a list of threaded
# MPMS
# @ECLASS-VARIABLE: IUSE_MODULES
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a list of available
# built-in modules
IUSE_MPMS="${IUSE_MPMS_FORK} ${IUSE_MPMS_THREAD}"
IUSE="debug doc ldap selinux ssl static suexec threads"
for module in ${IUSE_MODULES} ; do
IUSE="${IUSE} apache2_modules_${module}"
done
for mpm in ${IUSE_MPMS} ; do
IUSE="${IUSE} apache2_mpms_${mpm}"
done
DEPEND="dev-lang/perl
=dev-libs/apr-1*
=dev-libs/apr-util-1*
dev-libs/libpcre
ldap? ( =net-nds/openldap-2* )
selinux? ( sec-policy/selinux-apache )
ssl? ( dev-libs/openssl )
!=www-servers/apache-1*"
RDEPEND="${DEPEND}"
PDEPEND="~app-admin/apache-tools-${PV}"
S="${WORKDIR}/httpd-${PV}"
# ==============================================================================
# INTERNAL FUNCTIONS
# ==============================================================================
# @ECLASS-VARIABLE: MY_MPM
# DESCRIPTION:
# This internal variable contains the selected MPM after a call to setup_mpm()
# @FUNCTION: setup_mpm
# @DESCRIPTION:
# This internal function makes sure that only one of APACHE2_MPMS was selected
# or a default based on USE=threads is selected if APACHE2_MPMS is empty
setup_mpm() {
for x in ${IUSE_MPMS} ; do
if use apache2_mpms_${x} ; then
if [[ -z "${MY_MPM}" ]] ; then
MY_MPM=${x}
elog
elog "Selected MPM: ${MY_MPM}"
elog
else
eerror "You have selected more then one mpm USE-flag."
eerror "Only one MPM is supported."
die "more then one mpm was specified"
fi
fi
done
if [[ -z "${MY_MPM}" ]] ; then
if use threads ; then
MY_MPM=worker
elog
elog "Selected default threaded MPM: ${MY_MPM}"
elog
else
MY_MPM=prefork
elog
elog "Selected default MPM: ${MY_MPM}"
elog
fi
fi
if has ${MY_MPM} ${IUSE_MPMS_THREAD} && ! use threads ; then
eerror "You have selected a threaded MPM but USE=threads is disabled"
die "invalid use flag combination"
fi
if has ${MY_MPM} ${IUSE_MPMS_FORK} && use threads ; then
eerror "You have selected a non-threaded MPM but USE=threads is enabled"
die "invalid use flag combination"
fi
}
# @ECLASS-VARIABLE: MODULE_DEPENDS
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a space-separated
# list of dependency tokens each with a module and the module it depends on
# separated by a colon
# @FUNCTION: check_module_depends
# @DESCRIPTION:
# This internal function makes sure that all inter-module dependencies are
# satisfied with the current module selection
check_module_depends() {
local err=0
for m in ${MY_MODS} ; do
for dep in ${MODULE_DEPENDS} ; do
if [[ "${m}" == "${dep%:*}" ]]; then
if ! use apache2_modules_${dep#*:} ; then
eerror "Module '${m}' depends on '${dep#*:}'"
err=1
fi
fi
done
done
if [[ ${err} -ne 0 ]] ; then
die "invalid use flag combination"
fi
}
# @ECLASS-VARIABLE: MY_CONF
# DESCRIPTION:
# This internal variable contains the econf options for the current module
# selection after a call to setup_modules()
# @ECLASS-VARIABLE: MY_MODS
# DESCRIPTION:
# This internal variable contains a sorted, space separated list of currently
# selected modules after a call to setup_modules()
# @FUNCTION: setup_modules
# @DESCRIPTION:
# This internal function selects all built-in modules based on USE flags and
# APACHE2_MODULES USE_EXPAND flags
setup_modules() {
local mod_type=
if use static ; then
mod_type="static"
else
mod_type="shared"
fi
MY_CONF="--enable-so=static"
if use ldap ; then
if ! built_with_use 'dev-libs/apr-util' ldap ; then
eerror "dev-libs/apr-util is missing LDAP support. For apache to have"
eerror "ldap support, apr-util must be built with the ldap USE-flag"
eerror "enabled."
die "ldap USE-flag enabled while not supported in apr-util"
fi
MY_CONF="${MY_CONF} --enable-authnz_ldap=${mod_type} --enable-ldap=${mod_type}"
MY_MODS="${MY_MODS} ldap authnz_ldap"
else
MY_CONF="${MY_CONF} --disable-authnz_ldap --disable-ldap"
fi
if use ssl ; then
MY_CONF="${MY_CONF} --with-ssl=/usr --enable-ssl=${mod_type}"
MY_MODS="${MY_MODS} ssl"
else
MY_CONF="${MY_CONF} --without-ssl --disable-ssl"
fi
if use threads || has ${MY_MPM} ${IUSE_MPMS_THREAD} ; then
MY_CONF="${MY_CONF} --enable-cgid=${mod_type}"
MY_MODS="${MY_MODS} cgid"
else
MY_CONF="${MY_CONF} --enable-cgi=${mod_type}"
MY_MODS="${MY_MODS} cgi"
fi
if use suexec ; then
elog "You can manipulate several configure options of suexec"
elog "through the following environment variables:"
elog
elog " SUEXEC_SAFEPATH: Default PATH for suexec (default: /usr/local/bin:/usr/bin:/bin)"
elog " SUEXEC_LOGFILE: Path to the suexec logfile (default: /var/log/apache2/suexec_log)"
elog " SUEXEC_CALLER: Name of the user Apache is running as (default: apache)"
elog " SUEXEC_DOCROOT: Directory in which suexec will run scripts (default: /var/www)"
elog " SUEXEC_MINUID: Minimum UID, which is allowed to run scripts via suexec (default: 1000)"
elog " SUEXEC_MINGID: Minimum GID, which is allowed to run scripts via suexec (default: 100)"
elog " SUEXEC_USERDIR: User subdirectories (like /home/user/html) (default: public_html)"
elog " SUEXEC_UMASK: Umask for the suexec process (default: 077)"
elog
MY_CONF="${MY_CONF} --with-suexec-safepath=${SUEXEC_SAFEPATH:-/usr/local/bin:/usr/bin:/bin}"
MY_CONF="${MY_CONF} --with-suexec-logfile=${SUEXEC_LOGFILE:-/var/log/apache2/suexec_log}"
MY_CONF="${MY_CONF} --with-suexec-bin=/usr/sbin/suexec"
MY_CONF="${MY_CONF} --with-suexec-userdir=${SUEXEC_USERDIR:-public_html}"
MY_CONF="${MY_CONF} --with-suexec-caller=${SUEXEC_CALLER:-apache}"
MY_CONF="${MY_CONF} --with-suexec-docroot=${SUEXEC_DOCROOT:-/var/www}"
MY_CONF="${MY_CONF} --with-suexec-uidmin=${SUEXEC_MINUID:-1000}"
MY_CONF="${MY_CONF} --with-suexec-gidmin=${SUEXEC_MINGID:-100}"
MY_CONF="${MY_CONF} --with-suexec-umask=${SUEXEC_UMASK:-077}"
MY_CONF="${MY_CONF} --enable-suexec=${mod_type}"
MY_MODS="${MY_MODS} suexec"
else
MY_CONF="${MY_CONF} --disable-suexec"
fi
for x in ${IUSE_MODULES} ; do
if use apache2_modules_${x} ; then
MY_CONF="${MY_CONF} --enable-${x}=${mod_type}"
MY_MODS="${MY_MODS} ${x}"
else
MY_CONF="${MY_CONF} --disable-${x}"
fi
done
# sort and uniquify MY_MODS
MY_MODS=$(echo ${MY_MODS} | tr ' ' '\n' | sort -u)
check_module_depends
}
# @ECLASS-VARIABLE: MODULE_DEFINES
# @DESCRIPTION:
# This variable needs to be set in the ebuild and contains a space-separated
# list of tokens each mapping a module to a runtime define which can be
# specified in APACHE2_OPTS in /etc/conf.d/apache2 to enable this particular
# module.
# @FUNCTION: generate_load_module
# @DESCRIPTION:
# This internal function generates the LoadModule lines for httpd.conf based on
# the current module selection and MODULE_DEFINES
generate_load_module() {
local endit=0 mod_lines= mod_dir="${D}${APACHE2_MODULESDIR}"
if use static; then
sed -i -e "/%%LOAD_MODULE%%/d" \
"${GENTOO_PATCHDIR}"/conf/httpd.conf
return
fi
for m in ${MY_MODS} ; do
if [[ -e "${mod_dir}/mod_${m}.so" ]] ; then
for def in ${MODULE_DEFINES} ; do
if [[ "${m}" == "${def%:*}" ]] ; then
mod_lines="${mod_lines}\n<IfDefine ${def#*:}>"
endit=1
fi
done
mod_lines="${mod_lines}\nLoadModule ${m}_module modules/mod_${m}.so"
if [[ ${endit} -ne 0 ]] ; then
mod_lines="${mod_lines}\n</IfDefine>"
endit=0
fi
fi
done
sed -i -e "s:%%LOAD_MODULE%%:${mod_lines}:" \
"${GENTOO_PATCHDIR}"/conf/httpd.conf
}
# @FUNCTION: check_upgrade
# @DESCRIPTION:
# This internal function checks if the previous configuration file for built-in
# modules exists in ROOT and prevents upgrade in this case. Users are supposed
# to convert this file to the new APACHE2_MODULES USE_EXPAND variable and remove
# it afterwards.
check_upgrade() {
if [[ -e "${ROOT}"etc/apache2/apache2-builtin-mods ]]; then
eerror "The previous configuration file for built-in modules"
eerror "(${ROOT}etc/apache2/apache2-builtin-mods) exists on your"
eerror "system."
eerror
eerror "Please read http://www.gentoo.org/proj/en/apache/upgrade.xml"
eerror "for detailed information how to convert this file to the new"
eerror "APACHE2_MODULES USE_EXPAND variable."
eerror
die "upgrade not possible with existing ${ROOT}etc/apache2/apache2-builtin-mods"
fi
}
# ==============================================================================
# EXPORTED FUNCTIONS
# ==============================================================================
# @FUNCTION: apache-2_pkg_setup
# @DESCRIPTION:
# This function selects built-in modules, the MPM and other configure options,
# creates the apache user and group and informs about CONFIG_SYSVIPC being
# needed (we don't depend on kernel sources and therefore cannot check).
apache-2_pkg_setup() {
check_upgrade
setup_mpm
setup_modules
if use debug; then
MY_CONF="${MY_CONF} --enable-maintainer-mode --enable-exception-hook"
fi
# setup apache user and group
enewgroup apache 81
enewuser apache 81 -1 /var/www apache
elog "Please note that you need SysV IPC support in your kernel."
elog "Make sure CONFIG_SYSVIPC=y is set."
elog
}
# @FUNCTION: apache-2_src_unpack
# @DESCRIPTION:
# This function applies patches, configures a custom file-system layout and
# rebuilds the configure scripts. The patch names are organized as follows:
#
# 00-19 Gentoo specific (00_all_some-title.patch)
# 20-39 Additional MPMs (20_all_${MPM}_some-title.patch)
# 40-59 USE-flag based (40_all_${USE}_some-title.patch)
# 60-79 Version specific (60_all_${PV}_some-title.patch)
# 80-99 Security patches (80_all_${PV}_cve-####-####.patch)
apache-2_src_unpack() {
unpack ${A}
cd "${S}"
# Use correct multilib libdir in gentoo patches
sed -i -e "s:/usr/lib:/usr/$(get_libdir):g" \
"${GENTOO_PATCHDIR}"/{conf/httpd.conf,init/*,patches/config.layout} \
|| die "libdir sed failed"
epatch "${GENTOO_PATCHDIR}"/patches/*.patch
# setup the filesystem layout config
cat "${GENTOO_PATCHDIR}"/patches/config.layout >> "${S}"/config.layout || \
die "Failed preparing config.layout!"
sed -i -e "s:version:${PF}:g" "${S}"/config.layout
# patched-in MPMs need the build environment rebuilt
sed -i -e '/sinclude/d' configure.in
AT_GNUCONF_UPDATE=yes AT_M4DIR=build eautoreconf
# apache2.8 instead of httpd.8 (bug #194828)
mv docs/man/{httpd,apache2}.8
}
# @FUNCTION: apache-2_src_compile
# @DESCRIPTION:
# This function adds compiler flags and runs econf and emake based on MY_MPM and
# MY_CONF
apache-2_src_compile() {
# Instead of filtering --as-needed (bug #128505), append --no-as-needed
# Thanks to Harald van Dijk
append-ldflags -Wl,--no-as-needed
# peruser MPM debugging with -X is nearly impossible
if has peruser ${IUSE_MPMS} && use apache2_mpms_peruser ; then
use debug && append-flags -DMPM_PERUSER_DEBUG
fi
# econf overwrites the stuff from config.layout, so we have to put them into
# our myconf line too
econf \
--includedir=/usr/include/apache2 \
--libexecdir=/usr/$(get_libdir)/apache2/modules \
--datadir=/var/www/localhost \
--sysconfdir=/etc/apache2 \
--localstatedir=/var \
--with-mpm=${MY_MPM} \
--with-perl=/usr/bin/perl \
--with-apr=/usr \
--with-apr-util=/usr \
--with-pcre=/usr \
--with-z=/usr \
--with-port=80 \
--with-program-name=apache2 \
--enable-layout=Gentoo \
${MY_CONF} || die "econf failed!"
sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h
emake || die "emake failed"
}
# @FUNCTION: apache-2_src_install
# @DESCRIPTION:
# This function runs emake install and generates, install and adapts the gentoo
# specific configuration files found in the tarball
apache-2_src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
# install our configuration files
keepdir /etc/apache2/vhosts.d
keepdir /etc/apache2/modules.d
generate_load_module
insinto /etc/apache2
doins -r "${GENTOO_PATCHDIR}"/conf/*
doins docs/conf/magic
insinto /etc/logrotate.d
newins "${GENTOO_PATCHDIR}"/scripts/apache2-logrotate apache2
# generate a sane default APACHE2_OPTS
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE"
use doc && APACHE2_OPTS="${APACHE2_OPTS} -D MANUAL"
use ssl && APACHE2_OPTS="${APACHE2_OPTS} -D SSL -D SSL_DEFAULT_VHOST"
use suexec && APACHE2_OPTS="${APACHE2_OPTS} -D SUEXEC"
sed -i -e "s:APACHE2_OPTS=\".*\":APACHE2_OPTS=\"${APACHE2_OPTS}\":" \
"${GENTOO_PATCHDIR}"/init/apache2.confd || die "sed failed"
newconfd "${GENTOO_PATCHDIR}"/init/apache2.confd apache2
newinitd "${GENTOO_PATCHDIR}"/init/apache2.initd apache2
# link apache2ctl to the init script
dosym /etc/init.d/apache2 /usr/sbin/apache2ctl
# provide symlinks for all the stuff we no longer rename, bug 177697
for i in suexec apxs; do
dosym /usr/sbin/${i} /usr/sbin/${i}2
done
# install some thirdparty scripts
exeinto /usr/sbin
use ssl && doexe "${GENTOO_PATCHDIR}"/scripts/gentestcrt.sh
# install some documentation
dodoc ABOUT_APACHE CHANGES LAYOUT README README.platforms VERSIONING
dodoc "${GENTOO_PATCHDIR}"/docs/*
# drop in a convenient link to the manual
if use doc ; then
sed -i -e "s:VERSION:${PVR}:" "${D}/etc/apache2/modules.d/00_apache_manual.conf"
else
rm -f "${D}/etc/apache2/modules.d/00_apache_manual.conf"
rm -Rf "${D}/usr/share/doc/${PF}/manual"
fi
# the default webroot gets stored in /usr/share/doc
ebegin "Installing default webroot to /usr/share/doc/${PF}"
mv -f "${D}/var/www/localhost" "${D}/usr/share/doc/${PF}/webroot"
eend $?
keepdir /var/www/localhost/htdocs
# set some sane permissions for suexec
if use suexec ; then
fowners 0:apache /usr/sbin/suexec
fperms 4710 /usr/sbin/suexec
fi
# empty dirs
for i in /var/lib/dav /var/log/apache2 /var/cache/apache2 ; do
keepdir ${i}
fowners apache:apache ${i}
fperms 0755 ${i}
done
# we need /etc/apache2/ssl if USE=ssl
use ssl && keepdir /etc/apache2/ssl
}
# @FUNCTION: apache-2_pkg_postinst
# @DESCRIPTION:
# This function creates test certificates if SSL is enabled and installs the
# default webroot if /var/www/localhost does not exist. We do this here because
# the default webroot is a copy of the files that exist elsewhere and we don't
# want them to be managed/removed by portage when apache is upgraded.
apache-2_pkg_postinst() {
if use ssl && [[ ! -e "${ROOT}/etc/apache2/ssl/server.crt" ]] ; then
cd "${ROOT}"/etc/apache2/ssl
einfo
einfo "Generating self-signed test certificate in ${ROOT}etc/apache2/ssl ..."
yes "" 2>/dev/null | \
"${ROOT}"/usr/sbin/gentestcrt.sh >/dev/null 2>&1 || \
die "gentestcrt.sh failed"
einfo
fi
if [[ -e "${ROOT}/var/www/localhost" ]] ; then
elog "The default webroot has not been installed into"
elog "${ROOT}var/www/localhost because the directory already exists"
elog "and we do not want to overwrite any files you have put there."
elog
elog "If you would like to install the latest webroot, please run"
elog "emerge --config =${PF}"
elog
else
einfo "Installing default webroot to ${ROOT}var/www/localhost"
mkdir -p "${ROOT}"/var/www/localhost
cp -R "${ROOT}"/usr/share/doc/${PF}/webroot/* "${ROOT}"/var/www/localhost
chown -R apache:0 "${ROOT}"/var/www/localhost
fi
}
# @FUNCTION: apache-2_pkg_config
# @DESCRIPTION:
# This function installs -- and removes a previously existing -- default webroot
# to /var/www/localhost
apache-2_pkg_config() {
einfo "Installing default webroot to ${ROOT}var/www/localhost"
mkdir "${ROOT}"var{,/www{,/localhost}}
cp -R "${ROOT}"usr/share/doc/${PF}/webroot/* "${ROOT}"var/www/localhost/
}
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst pkg_config
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2014-02-12 0:03 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-16 10:47 [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass Benedikt Boehm (hollow)
-- strict thread matches above, loose matches on Subject: below --
2014-02-12 0:03 Mike Frysinger (vapier)
2014-01-31 8:29 Mike Frysinger (vapier)
2010-12-22 10:02 Benedikt Boehm (hollow)
2010-08-28 14:50 Benedikt Boehm (hollow)
2010-07-11 8:22 Fabio Erculiani (lxnay)
2010-03-05 9:01 Benedikt Boehm (hollow)
2009-10-04 15:00 Samuli Suominen (ssuominen)
2009-09-20 8:37 Benedikt Boehm (hollow)
2009-07-05 16:05 Benedikt Boehm (hollow)
2009-04-04 17:50 Fabian Groffen (grobian)
2008-12-10 1:15 Robin H. Johnson (robbat2)
2008-12-10 1:06 Robin H. Johnson (robbat2)
2008-10-25 14:46 Benedikt Boehm (hollow)
2008-08-29 13:22 Benedikt Boehm (hollow)
2008-03-23 13:03 Benedikt Boehm (hollow)
2008-03-23 10:28 Benedikt Boehm (hollow)
2008-03-23 0:14 Benedikt Boehm (hollow)
2008-02-02 10:10 Benedikt Boehm (hollow)
2008-01-19 10:59 Benedikt Boehm (hollow)
2007-12-31 23:46 Benedikt Boehm (hollow)
2007-12-20 15:53 Zac Medico (zmedico)
2007-12-15 14:00 Benedikt Boehm (hollow)
2007-11-29 18:43 Benedikt Boehm (hollow)
2007-11-28 13:04 Benedikt Boehm (hollow)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox