Changes to make apache multilib aware
authorMichael Stewart <vericgar@gentoo.org>
Sun, 18 Sep 2005 05:01:04 +0000 (05:01 +0000)
committerMichael Stewart <vericgar@gentoo.org>
Sun, 18 Sep 2005 05:01:04 +0000 (05:01 +0000)
Package-Manager: portage-2.0.51.22-r2

net-www/apache/ChangeLog
net-www/apache/Manifest
net-www/apache/apache-1.3.33-r12.ebuild [new file with mode: 0644]
net-www/apache/apache-2.0.54-r31.ebuild [new file with mode: 0644]
net-www/apache/files/digest-apache-1.3.33-r12 [new file with mode: 0644]
net-www/apache/files/digest-apache-2.0.54-r31 [new file with mode: 0644]

index 977a364829e398cd6acec89b91cb04e8d1d8885d..1966874a4146df34a6015b2e5c997b62212f9adc 100644 (file)
@@ -1,11 +1,21 @@
 # ChangeLog for net-www/apache
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/apache/ChangeLog,v 1.415 2005/09/18 00:21:07 kloeri Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/apache/ChangeLog,v 1.416 2005/09/18 05:01:04 vericgar Exp $
+
+*apache-2.0.54-r31 (18 Sep 2005)
+*apache-1.3.33-r12 (18 Sep 2005)
+
+  18 Sep 2005; Michael Stewart <vericgar@gentoo.org>
+  +apache-1.3.33-r12.ebuild, +apache-2.0.54-r31.ebuild:
+  Apache is now multilib aware
 
   18 Sep 2005; Bryan Ã˜stergaard <kloeri@gentoo.org>
   apache-1.3.33-r6.ebuild:
   Stable on ia64, bug 104807.
 
+  17 Sep 2005; Michael Stewart <vericgar@gentoo.org> ChangeLog:
+  Modify incremental DirectoryIndex patch to work with gcc-2. Fixes bug 100025
+
   17 Sep 2005; Aron Griffis <agriffis@gentoo.org> ChangeLog:
   Mark 2.0.54-r15 stable on ia64
 
index d2c48eb55e428fc39b8b7fa8150551bed84d2a48..999f6654203a3480ca59701df2b98c8312e5af6e 100644 (file)
@@ -1,7 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 2a6c47ec6c41c34b88d30d26fc62d6c4 ChangeLog 70170
 MD5 b56779cb8460b101ad6912c8f45ff583 apache-1.3.29-r2.ebuild 7237
 MD5 3e32afd7bbab740bdce0fc0cf45d5be3 apache-1.3.31-r1.ebuild 6816
 MD5 a448a0e7566f85098cf55c54e4c6621f apache-1.3.31-r2.ebuild 6941
@@ -16,12 +12,15 @@ MD5 7ffd5d16d8cb2f8192d1fc48b75371df apache-1.3.33-r3.ebuild 6952
 MD5 2c34b40a3fe461014b19ca5e4763203e apache-1.3.33-r4.ebuild 8673
 MD5 eb173dd548089cf594c543d29b48948c apache-1.3.33-r5.ebuild 7105
 MD5 ca6b47f0c2a0006b71fc1153937824e5 apache-1.3.33.ebuild 6927
-MD5 37f5ed6f2423381241b029e6685bcdd2 metadata.xml 493
-MD5 6984dca404209fbedd4492e8ffdd8298 apache-2.0.54-r9.ebuild 12609
 MD5 170ac9a47fbef6414a686b59592b7470 apache-1.3.33-r11.ebuild 8773
 MD5 4076cfc82dfd527b50eba2a0dd479c8f apache-1.3.33-r6.ebuild 7104
-MD5 ba03c4e043789f82af1967df63f04e5c apache-2.0.54-r15.ebuild 12613
 MD5 2ddaadd5674de61b49fbbb0bcf859036 apache-2.0.54-r30.ebuild 12945
+MD5 ba03c4e043789f82af1967df63f04e5c apache-2.0.54-r15.ebuild 12613
+MD5 34cae34ddca559e6a710d5c25989a344 ChangeLog 70524
+MD5 5c8d532b77f81bb37056d93a654ea2a3 apache-2.0.54-r31.ebuild 13203
+MD5 902506a3b7bacb71ab46a904d0e6cbf0 apache-1.3.33-r12.ebuild 9033
+MD5 37f5ed6f2423381241b029e6685bcdd2 metadata.xml 493
+MD5 6984dca404209fbedd4492e8ffdd8298 apache-2.0.54-r9.ebuild 12609
 MD5 8b12871dd74fcd3f4fdf451c9d8c259e files/00_apache_manual.conf 781
 MD5 998b4b7df08eb15641e0b9132443b365 files/apache-1.3.27-apachectl.patch 1328
 MD5 37d2c4ea8e1a6725deaca42b6aa22c69 files/apache-1.3.27_db4_gentoo.patch 1006
@@ -52,8 +51,11 @@ MD5 7534b79d78a91297c44cc69ac4545cc8 files/digest-apache-1.3.33-r2 286
 MD5 bb9ffec6d5f5d409b6705a2d8c19bc6a files/digest-apache-1.3.33-r3 212
 MD5 0282c9d20ad05b752812c62f655b50ce files/digest-apache-1.3.33-r4 286
 MD5 b75d2bfc008916e050f1bafb8a04c944 files/digest-apache-1.3.33-r5 221
+MD5 81bbd0e99cf3c40a3f803533fd41370d files/digest-apache-1.3.33-r11 287
+MD5 324e63ccba6d27b9d9b08209c9992fe4 files/digest-apache-1.3.33-r6 221
 MD5 282e8f0ae737d778a643251ad4f21122 files/digest-apache-2.0.54-r15 217
-MD5 b9925be24e72acc1031f76a8bc0a07cb files/digest-apache-2.0.54-r30 151
+MD5 4abaf2f56e5334d61e610b1f1c54e46c files/digest-apache-2.0.54-r31 151
+MD5 3638e8cbd8f5929889a95bf9a3ce08f8 files/digest-apache-1.3.33-r12 287
 MD5 b9ff3534313dae1b8ac96df0e3e01373 files/httpd-2.0.48-ipv6.patch 865
 MD5 d52999376f67a872ee48cbae72db0160 files/httpd-2.0.49-cgi.patch 10319
 MD5 8cb4313e58d7bd5dc369eb92f75daa2b files/httpd-2.0.49-ipv6.patch 788
@@ -61,8 +63,7 @@ MD5 59a6ba7dcde461f5350af41e6aff92b1 files/robots.txt 342
 MD5 d3626a1e31a675c60d066c111d552adf files/suexec.pam 59
 MD5 161245c7aa1eb785db53b34d6a10be43 files/suexec_pam_gentoo.patch 2149
 MD5 35d8cf2217559d96a69696d69f4c85cc files/digest-apache-2.0.54-r9 214
-MD5 81bbd0e99cf3c40a3f803533fd41370d files/digest-apache-1.3.33-r11 287
-MD5 324e63ccba6d27b9d9b08209c9992fe4 files/digest-apache-1.3.33-r6 221
+MD5 b9925be24e72acc1031f76a8bc0a07cb files/digest-apache-2.0.54-r30 151
 MD5 3d94c56af17136b6c408f076c32e0362 files/2.0.49/40_mod_ssl.conf 3213
 MD5 1d10cc98714a34ddc38525743c2989f9 files/2.0.49/41_mod_ssl.default-vhost.conf 8053
 MD5 819ee444395cf42ccc8009529a94af37 files/2.0.49/45_mod_dav.conf 583
@@ -101,10 +102,3 @@ MD5 30add456de1ed8fab4bc473a4afda161 files/patches/2.0.49-r1/04_ssl_makefile.pat
 MD5 21a6ee55341125140e40c0f48144277d files/patches/2.0.49-r1/Readme.PATCHES 507
 MD5 d52999376f67a872ee48cbae72db0160 files/patches/2.0.49-r2/01_gentoo_cgi.patch 10319
 MD5 5d45e2b46965e7c6866b259df4efe4b2 files/patches/2.0.50-r1/Readme.PATCHES 357
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (GNU/Linux)
-
-iD8DBQFDLLMEKf2g/qXtneoRAvwkAJ9+LmohIMNw1denvRrrYiE5/agHTgCgwQpW
-O5gaBoIOf3otcdX5OPfOq4A=
-=Mw7U
------END PGP SIGNATURE-----
diff --git a/net-www/apache/apache-1.3.33-r12.ebuild b/net-www/apache/apache-1.3.33-r12.ebuild
new file mode 100644 (file)
index 0000000..eb9f265
--- /dev/null
@@ -0,0 +1,317 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/apache/apache-1.3.33-r12.ebuild,v 1.1 2005/09/18 05:01:04 vericgar Exp $
+
+inherit eutils fixheadtails multilib
+
+# latest gentoo apache files
+GENTOO_PATCHNAME="gentoo-apache-${PVR}"
+GENTOO_PATCHSTAMP="20050917"
+GENTOO_DEVSPACE="vericgar"
+GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}"
+
+# The mod_ssl archive is only for providing the EAPI patch in here.
+# You should install the net-www/mod_ssl package for the actual DSO.
+mod_ssl_ver=2.8.24
+lingerd_ver=0.94
+
+DESCRIPTION="The Apache Web Server"
+HOMEPAGE="http://httpd.apache.org"
+SRC_URI="mirror://apache/httpd/apache_${PV}.tar.gz
+               ssl? ( ftp://ftp.modssl.org/source/mod_ssl-${mod_ssl_ver}-${PV}.tar.gz )
+               lingerd? ( http://images.iagora.com/media/software/lingerd/lingerd-${lingerd_ver}.tar.gz )
+               http://dev.gentoo.org/~${GENTOO_DEVSPACE}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="1"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc ssl pam lingerd no-suexec static-modules apache2 selinux"
+
+DEPEND="dev-lang/perl
+               >=sys-libs/db-1.85-r1
+               >=dev-libs/mm-1.1.3
+               >=sys-libs/gdbm-1.8
+               >=dev-libs/expat-1.95.2
+               net-www/gentoo-webroot-default
+               app-misc/mime-types
+               selinux? ( sec-policy/selinux-apache )
+               lingerd? ( =net-www/lingerd-${lingerd_ver} )"
+
+# so leave it out until it's available
+PDEPEND="ssl? ( =net-www/mod_ssl-${mod_ssl_ver}-r1 )"
+
+S=${WORKDIR}/${PN}_${PV}
+
+src_unpack() {
+       unpack ${A} || die
+       cd ${S} || die
+
+       # 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 "sed failed"
+
+       EPATCH_SUFFIX="patch"
+       epatch ${GENTOO_PATCHDIR}/patches/[0-2]*
+
+       # setup the filesystem layout config
+       cat ${GENTOO_PATCHDIR}/patches/config.layout >> config.layout
+       sed -i -e 's:version:${PF}:g' config.layout
+
+       if useq pam; then
+               epatch ${GENTOO_PATCHDIR}/patches/31_all_gentoo_suexec_pam.patch || die "pam patch failed"
+       fi
+
+       # fix obsolete 'head -1' and 'tail -1' calls
+       ht_fix_file src/Configure src/helpers/getuid.sh src/helpers/buildinfo.sh src/helpers/fmn.sh
+
+       # setup mod_ssl eapi
+       if useq ssl; then
+               local myssl
+               myssl=${WORKDIR}/mod_ssl-${mod_ssl_ver}-${PV}
+               cp ${myssl}/pkg.eapi/*.h src/include
+               cp ${myssl}/pkg.eapi/*.c src/ap
+               epatch ${myssl}/pkg.eapi/eapi.patch || die "failed to setup mod_ssl eapi"
+       fi
+
+       # set a reasonable MM_CORE_PATH location..
+       sed -i -e 's:logs/mm:/var/cache/apache-mm/mm:' src/include/httpd.h
+
+       if useq lingerd; then
+               local mylingerd=${WORKDIR}/lingerd-${lingerd_ver}
+               cp ${mylingerd}/apache-1.3/ap_lingerd.c ${mylingerd}/li_config.h src/main
+               cd src
+               if useq ssl; then
+                       epatch ${mylingerd}/apache-1.3/aplinger-ssl.diff
+               else
+                       epatch ${mylingerd}/apache-1.3/aplinger.diff
+               fi
+               cd ..
+       fi
+}
+
+src_compile() {
+       local myconf
+
+       setup_apache_vars
+
+       select_modules_config || die "determining modules"
+
+       if ! useq no-suexec; then
+               myconf="${myconf}
+                               --enable-suexec
+                               --suexec-uidmin=1000 \
+                               --suexec-gidmin=100 \
+                               --suexec-caller=apache \
+                               --suexec-userdir=public_html \
+                               --suexec-docroot=/var/www \
+                               --suexec-safepath="/usr/local/bin:/usr/bin:/bin" \
+                               --suexec-logfile=/var/log/apache/suexec_log"
+       fi
+
+       if useq ssl; then
+               myconf="${myconf} --enable-rule=EAPI"
+       fi
+
+       OPTIM="${MY_CFLAGS} -DHARD_SERVER_LIMIT=${HARD_SERVER_LIMIT:=512} \
+               -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
+       LIBS="-ldb -lgdbm -lgdbm_compat -lpthread" \
+       EAPI_MM=SYSTEM \
+       ./configure \
+               --with-layout=Gentoo \
+               --target=apache \
+               --server-uid=apache \
+               --server-gid=apache \
+               --with-perl=/usr/bin/perl \
+               --enable-rule=SHARED_CHAIN \
+               ${MY_BUILTINS} ${myconf} || die "bad ./configure please submit bug report to bugs.gentoo.org. Include your config.layout and config.log"
+
+       emake || die "problem compiling apache"
+
+       # build ssl version of apache bench (ab-ssl)
+       if useq ssl; then
+               cd src/support
+               rm -f ab ab.o
+               make ab CFLAGS="${CFLAGS} -DUSE_SSL -lcrypto -lssl
+               -I/usr/include/openssl -L/usr/$(get_libdir)" || die
+               mv ab ab-ssl
+               rm -f ab.o
+               make ab || die
+       fi
+}
+
+src_install() {
+       # setup apache user and group
+       enewgroup apache 81
+       enewuser apache 81 -1 /var/www apache
+
+       # general install
+       make install-quiet root=${D} || die
+       dodoc ABOUT_APACHE Announcement INSTALL LICENSE README* ${GENTOO_PATCHDIR}/docs/robots.txt
+
+       # protect the suexec binary
+       if ! useq no-suexec; then
+               fowners root:apache /usr/sbin/suexec
+               fperms 4710 /usr/sbin/suexec
+       fi
+
+       # apxs needs this to pickup the right lib for install
+       dosym /usr/$(get_libdir) /usr/$(get_libdir)/apache/lib
+       dosym /var/log/apache /usr/$(get_libdir)/apache/logs
+       dosym /etc/apache /usr/$(get_libdir)/apache/conf
+
+       # nice support scripts
+       exeinto /usr/sbin
+       for i in apachelogserverstatus apachesplitlogfile; do
+               doexe ${GENTOO_PATCHDIR}/scripts/${i}
+       done
+
+       # some more scripts
+       for i in split-logfile logresolve.pl log_server_status; do
+               doexe ${S}/src/support/${i}
+       done
+
+       # the ssl version of apache bench
+       if useq ssl; then
+               doexe src/support/ab-ssl
+       fi
+
+       # drop in a convenient link to the manual
+       if useq doc; then
+               insinto /etc/apache/modules.d
+               doins ${GENTOO_PATCHDIR}/conf/modules.d/00_apache_manual.conf
+               sed -i -e "s:1.3.32:${PVR}:" ${D}/etc/apache/modules.d/00_apache_manual.conf
+       else
+               rm -rf ${D}/usr/share/doc/${PF}/manual
+       fi
+
+       # tidy up
+       cd ${D}
+       dodoc etc/apache/*.default
+       rm -f etc/apache/*.default
+       rm -f etc/apache/*.conf
+       rm -f etc/apache/mime.types
+
+       # we DEPEND on net-www/gentoo-webroot-default for sharing this by now
+       rm -rf var/www/localhost
+
+       # config files
+       insinto /etc/conf.d
+       newins ${GENTOO_PATCHDIR}/init/apache.confd apache
+
+       exeinto /etc/init.d
+       newexe ${GENTOO_PATCHDIR}/init/apache.initd apache
+
+       insinto /etc/apache
+       doins ${GENTOO_PATCHDIR}/conf/apache-builtin-mods
+       doins ${GENTOO_PATCHDIR}/conf/httpd.conf
+
+       insinto /etc/apache/vhosts.d
+       doins ${GENTOO_PATCHDIR}/conf/vhosts.d/00_default_vhost.conf
+
+       keepdir /etc/apache/vhosts.d
+       keepdir /etc/apache/modules.d
+
+       # Added by Jason Wever <weeve@gentoo.org>
+       # A little sedfu to fix bug #7172 for sparc64s
+       if [ ${ARCH} = "sparc" ]; then
+               sed -i -e '15a\AcceptMutex fcntl' ${D}/etc/apache/httpd.conf
+       fi
+
+       if useq lingerd; then
+               sed -i 's:\(need net.*\):\1 lingerd:g' ${D}/etc/init.d/apache
+       fi
+
+       if useq pam; then
+               insinto /etc/pam.d
+               newins ${GENTOO_PATCHDIR}/patches/suexec.pam suexec
+       fi
+
+       # empty dirs
+       for i in /var/log/apache /var/cache/apache /var/cache/apache-mm; do
+               keepdir ${i}
+               fowners apache:apache ${i}
+               fperms 755 ${i}
+       done
+}
+
+pkg_postinst() {
+       einfo
+       einfo "Please remember to update your config files in /etc/apache"
+       einfo "as --datadir has been changed to ${DATADIR}, and ServerRoot"
+       einfo "has changed to /usr/$(get_libdir)/apache!"
+       einfo
+
+       # Check for obsolete symlinks
+       local list=""
+       for i in lib logs modules extramodules; do
+               local d="/etc/apache/${i}"
+               [ -s "${d}" ] && list="${list} ${d}"
+       done
+       [ -n "${list}" ] && einfo "You should delete these old symlinks: ${list}"
+
+       if has_version '<net-www/apache-1.3.33-r10' ; then
+               einfo "Configuration locations have changed, you will need to migrate"
+               einfo "your configuration from /etc/apache/conf/apache.conf and"
+               einfo "/etc/apache/conf/commonapache.conf to /etc/apache/httpd.conf."
+               einfo
+               einfo "Apache now checks for the old configuration and refuses to start"
+               einfo "if it exists. You must remove the old configuration first"
+               einfo
+               einfo "For more information, see"
+               einfo "  http://www.gentoo.org/doc/en/apache-upgrading.xml"
+               einfo
+       fi
+
+       if use apache2 ; then
+               ewarn "You have apache2 in USE. Any modules that you"
+               ewarn "install may depend on apache-2.* instead of"
+               ewarn "apache-1*. It's recommended that you remove"
+               ewarn "apache2 from USE."
+       fi
+
+
+}
+
+setup_apache_vars() {
+       MY_CFLAGS="${CFLAGS}"
+       unset CFLAGS
+       unset CXXFLAGS
+
+       # standard location for Gentoo Linux
+       DATADIR="${DATADIR:-/var/www/localhost}"
+       einfo "DATADIR is set to: ${DATADIR}"
+}
+
+parse_modules_config() {
+       local name=""
+       local disable=""
+       [ -f ${1} ] || return 1
+
+       for i in `cat $1 | sed "s/^#.*//"` ; do
+               if [ $i == "-" ]; then
+                       disable="true"
+               elif [ -z "$name" ] && [ ! -z "`echo $i | grep "mod_"`" ]; then
+                       name=`echo $i | sed "s/mod_//"`
+               elif [ "$disable" ] && ( [ $i == "static" ] || [ $i == "shared" ] ); then
+                       MY_BUILTINS="${MY_BUILTINS} --disable-module=$name"
+                       name="" ; disable=""
+               elif [ $i == "static" ] || useq static-modules; then
+                       MY_BUILTINS="${MY_BUILTINS} --enable-module=$name --disable-shared=$name"
+                       name="" ; disable=""
+               elif [ $i == "shared" ]; then
+                       MY_BUILTINS="${MY_BUILTINS} --enable-module=$name --enable-shared=$name"
+                       name="" ; disable=""
+               fi
+       done
+
+       einfo "${1} options:\n${MY_BUILTINS}"
+}
+
+select_modules_config() {
+       parse_modules_config /etc/apache/apache-builtin-mods || \
+       parse_modules_config ${GENTOO_PATCHDIR}/conf/apache-builtin-mods || \
+       return 1
+}
+
+# vim:ts=4
diff --git a/net-www/apache/apache-2.0.54-r31.ebuild b/net-www/apache/apache-2.0.54-r31.ebuild
new file mode 100644 (file)
index 0000000..6b106c7
--- /dev/null
@@ -0,0 +1,439 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/apache/apache-2.0.54-r31.ebuild,v 1.1 2005/09/18 05:01:04 vericgar Exp $
+
+inherit eutils gnuconfig multilib
+
+# latest gentoo apache files
+GENTOO_PATCHNAME="gentoo-apache-${PVR}"
+GENTOO_PATCHSTAMP="20050917"
+GENTOO_DEVSPACE="vericgar"
+GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}"
+
+DESCRIPTION="The Apache Web Server, Version 2.0.x"
+HOMEPAGE="http://httpd.apache.org/"
+SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
+       http://dev.gentoo.org/~${GENTOO_DEVSPACE}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="apache2 debug doc ldap mpm-leader mpm-peruser mpm-prefork mpm-threadpool mpm-worker no-suexec ssl static-modules threads selinux"
+
+RDEPEND="dev-lang/perl
+       ~dev-libs/apr-0.9.6
+       ~dev-libs/apr-util-0.9.6
+       dev-libs/expat
+       net-www/gentoo-webroot-default
+       app-misc/mime-types
+       sys-libs/zlib
+       ssl? ( dev-libs/openssl )
+       selinux? ( sec-policy/selinux-apache )
+       !mips? ( ldap? ( =net-nds/openldap-2* ) )"
+DEPEND="${RDEPEND}
+       >=sys-devel/autoconf-2.59-r4"
+
+S="${WORKDIR}/httpd-${PV}"
+
+big_fat_warnings() {
+
+       if use ldap && ! 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
+
+       if use mpm-peruser; then
+               ewarn " -BIG- -FAT- -WARNING-"
+               ewarn ""
+               ewarn "The peruser (USE=mpm-peruser) MPM is considered highly experimental"
+               ewarn "and are not (yet) supported, nor are they recommended for production"
+               ewarn "use.  You have been warned!"
+               ewarn
+               ewarn "Continuing in 5 seconds.."
+               sleep 5
+       fi
+
+       ewarn ""
+       ewarn "LFS support has been removed due to incompatibilites with other packages."
+       ewarn "You _will_ have to re-emerge any Apache modules you have installed, or"
+       ewarn "they will likely misbehave/segfault."
+       ewarn ""
+       ewarn ""
+       ewarn "Multiple MPM support has been disabled due to problems with external"
+       ewarn "modules.  If you have relied on this functionality you will need"
+       ewarn "to find another solution.  The Gentoo Apache team apologizes for"
+       ewarn "any inconvienence this may cause you."
+       ewarn ""
+}
+
+pkg_setup() {
+       big_fat_warnings
+       select_mpms
+}
+
+src_unpack() {
+       unpack ${A} || die
+       cd ${S} || die
+
+       # 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 "sed failed"
+
+       EPATCH_SUFFIX="patch"
+       epatch ${GENTOO_PATCHDIR}/patches/[0-2]* || die "internal ebuild error"
+
+       # avoid utf-8 charset problems
+       export LC_CTYPE=C
+
+       # setup the filesystem layout config
+       cat ${GENTOO_PATCHDIR}/patches/config.layout >> config.layout
+       sed -i -e 's:version:${PF}:g' config.layout
+
+       # peruser need to build conf
+       WANT_AUTOCONF=2.5 ./buildconf || die "buildconf failed"
+}
+
+src_compile() {
+       setup_apache_vars
+
+       # Detect mips and uclibc systems properly
+       gnuconfig_update
+
+       local modtype
+       if useq static-modules; then
+               modtype="static"
+       else
+               modtype="shared"
+       fi
+
+       select_modules_config || die "determining modules"
+
+       local myconf
+       useq ldap && myconf="${myconf} --enable-auth-ldap=${modtype} --enable-ldap=${modtype}"
+       useq ssl && myconf="${myconf} --with-ssl=/usr  --enable-ssl=${modtype}"
+
+       # Fix for bug #24215 - robbat2@gentoo.org, 30 Oct 2003
+       # We pre-load the cache with the correct answer!  This avoids
+       # it violating the sandbox.  This may have to be changed for
+       # non-Linux systems or if sem_open changes on Linux.  This
+       # hack is built around documentation in /usr/include/semaphore.h
+       # and the glibc (pthread) source
+       echo 'ac_cv_func_sem_open=${ac_cv_func_sem_open=no}' >> ${S}/config.cache
+
+       if useq no-suexec; then
+               myconf="${myconf} --disable-suexec"
+       else
+               myconf="${myconf}
+                               --with-suexec-safepath="/usr/local/bin:/usr/bin:/bin" \
+                               --with-suexec-logfile=/var/log/apache2/suexec_log \
+                               --with-suexec-bin=/usr/sbin/suexec2 \
+                               --with-suexec-userdir=${USERDIR} \
+                               --with-suexec-caller=apache \
+                               --with-suexec-docroot=/var/www \
+                               --with-suexec-uidmin=1000 \
+                               --with-suexec-gidmin=100 \
+                               --with-suexec-umask=077 \
+                               --enable-suexec=shared"
+       fi
+
+       # common confopts
+       myconf="${myconf} \
+                       --with-apr=/usr \
+                       --with-apr-util=/usr \
+                       --cache-file=${S}/config.cache \
+                       --with-perl=/usr/bin/perl \
+                       --with-expat=/usr \
+                       --with-z=/usr \
+                       --with-port=80 \
+                       --enable-layout=Gentoo \
+                       --with-program-name=apache2 \
+                       --with-devrandom=/dev/urandom \
+                       --host=${CHOST} ${MY_BUILTINS}"
+
+       # debugging support
+       if useq debug ; then
+               myconf="${myconf} --enable-maintainer-mode"
+       fi
+
+       ./configure --with-mpm=${mpm} ${myconf} || die "bad ./configure please submit bug report to bugs.gentoo.org. Include your config.layout and config.log"
+
+       # we don't want to try and recompile the ssl_expr_parse.c file, because
+       # the lex source is broken
+       touch modules/ssl/ssl_expr_scan.c
+
+       # as decided on IRC-AGENDA-10.2004, we use httpd.conf as standard config file name
+       sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h
+
+       emake || die "problem compiling apache2"
+
+       # build ssl version of apache bench (ab-ssl)
+       if useq ssl; then
+               cd support
+               rm -f ab .libs/ab ab.lo ab.o
+               make ab CFLAGS="${CFLAGS} -DUSE_SSL -lcrypto -lssl -I/usr/include/openssl -L/usr/$(get_libdir)" || die
+               mv ab ab-ssl
+               rm -f ab.lo ab.o
+               make ab || die
+       fi
+}
+
+src_install () {
+       # setup apache user and group
+       enewgroup apache 81
+       enewuser apache 81 -1 /var/www apache
+
+       # general install
+       make DESTDIR=${D} install || die
+       dodoc ABOUT_APACHE CHANGES INSTALL LAYOUT LICENSE README* ${GENTOO_PATCHDIR}/docs/robots.txt
+
+       # protect the suexec binary
+       if ! useq no-suexec; then
+               fowners root:apache /usr/sbin/suexec
+               fperms 4710 /usr/sbin/suexec
+       fi
+
+       # apxs needs this to pickup the right lib for install
+       dosym /usr/$(get_libdir) /usr/$(get_libdir)/apache2/lib
+       dosym /var/log/apache2 /usr/$(get_libdir)/apache2/logs
+       dosym /etc/apache2 /usr/$(get_libdir)/apache2/conf
+
+       # Credits to advx.org people for these scripts. Heck, thanks for
+       # the nice layout and everything else ;-)
+       exeinto /usr/sbin
+       for i in apache2logserverstatus apache2splitlogfile; do
+               doexe ${GENTOO_PATCHDIR}/scripts/${i}
+       done
+       # gentestcrt.sh only if USE=ssl
+       useq ssl && doexe ${GENTOO_PATCHDIR}/scripts/gentestcrt.sh
+
+       # some more scripts
+       for i in split-logfile list_hooks.pl logresolve.pl log_server_status; do
+               doexe ${S}/support/${i}
+       done
+
+       # the ssl version of apache bench
+       useq ssl && doexe support/ab-ssl
+
+       # install mpm bins
+       doexe ${S}/apache2
+
+       # modules.d config file snippets
+       insinto /etc/apache2/modules.d
+       doins ${GENTOO_PATCHDIR}/conf/modules.d/45_mod_dav.conf
+       useq ldap && doins ${GENTOO_PATCHDIR}/conf/modules.d/46_mod_ldap.conf
+       if useq ssl; then
+               doins ${GENTOO_PATCHDIR}/conf/modules.d/40_mod_ssl.conf
+               doins ${GENTOO_PATCHDIR}/conf/modules.d/41_mod_ssl.default-vhost.conf
+       fi
+
+       # drop in a convenient link to the manual
+       if useq doc; then
+               insinto /etc/apache2/modules.d
+               doins ${GENTOO_PATCHDIR}/conf/modules.d/00_apache_manual.conf
+               sed -i -e "s:2.0.49:${PVR}:" ${D}/etc/apache2/modules.d/00_apache_manual.conf
+       else
+               rm -rf ${D}/usr/share/doc/${PF}/manual
+       fi
+
+       # SLOT=2
+       cd ${D}
+       for i in htdigest htpasswd logresolve apxs ab rotatelogs dbmmanage checkgid split-logfile; do
+               mv -v usr/sbin/${i} usr/sbin/${i}2
+       done
+       mv -v usr/sbin/apachectl usr/sbin/apache2ctl
+       mv -v usr/sbin/list_hooks.pl usr/sbin/list_hooks2.pl
+       mv -v usr/sbin/logresolve.pl usr/sbin/logresolve2.pl
+       useq ssl && mv -v usr/sbin/ab-ssl usr/sbin/ab2-ssl
+       useq no-suexec || mv -v usr/sbin/suexec usr/sbin/suexec2
+
+       # do the man pages
+       for i in htdigest.1 htpasswd.1 dbmmanage.1; do
+               mv -v usr/share/man/man1/${i} usr/share/man/man1/${i/./2.}
+       done
+       for i in ab.8 apxs.8 logresolve.8 rotatelogs.8; do
+               mv -v usr/share/man/man8/${i} usr/share/man/man8/${i/./2.}
+       done
+       useq no-suexec || mv -v usr/share/man/man8/suexec.8 usr/share/man/man8/suexec2.8
+       mv -v usr/share/man/man8/apachectl.8 usr/share/man/man8/apache2ctl.8
+       mv -v usr/share/man/man8/httpd.8 usr/share/man/man8/apache2.8
+
+       # tidy up
+       mv usr/sbin/envvars* usr/$(get_libdir)/apache2/build
+       dodoc etc/apache2/*-std.conf
+       rm -f etc/apache2/*.conf
+       rm -rf var/run var/log
+
+       # we DEPEND on net-www/gentoo-webroot-default for sharing this by now
+       rm -rf var/www/localhost
+
+       # config files
+       insinto /etc/conf.d
+       newins ${GENTOO_PATCHDIR}/init/apache2.confd apache2
+
+       exeinto /etc/init.d
+       newexe ${GENTOO_PATCHDIR}/init/apache2.initd apache2
+
+       insinto /etc/logrotate.d
+       newins ${GENTOO_PATCHDIR}/scripts/apache2-logrotate apache2
+
+       insinto /etc/apache2
+       doins ${GENTOO_PATCHDIR}/conf/apache2-builtin-mods
+       doins ${GENTOO_PATCHDIR}/conf/httpd.conf
+
+       insinto /etc/apache2/vhosts.d
+       doins ${GENTOO_PATCHDIR}/conf/vhosts.d/00_default_vhost.conf
+
+       keepdir /etc/apache2/vhosts.d
+       keepdir /etc/apache2/modules.d
+
+       # fix bug 92348
+       fperms 755 /usr/sbin/apache2logserverstatus
+       fperms 755 /usr/sbin/apache2splitlogfile
+
+       # empty dirs
+       for i in /var/lib/dav /var/log/apache2 /var/cache/apache2; do
+               keepdir ${i}
+               fowners apache:apache ${i}
+               fperms 755 ${i}
+       done
+
+       # We'll be needing /etc/apache2/ssl if USE=ssl
+       useq ssl && keepdir /etc/apache2/ssl
+
+}
+
+pkg_postinst() {
+
+       # Automatically generate test ceritificates if ssl USE flag is beeing set
+       if useq ssl; then
+               cd ${ROOT}/etc/apache2/ssl
+               einfo
+               einfo "Generating self-signed test certificate in /etc/apache2/ssl..."
+               yes "" 2>/dev/null | \
+                       ${ROOT}/usr/sbin/gentestcrt.sh >/dev/null 2>&1 || \
+                       die "gentestcrt.sh failed"
+               einfo
+       fi
+
+       # Check for dual/upgrade install
+       if has_version '=net-www/apache-1*' || ! use apache2 ; then
+               ewarn
+               ewarn "Please add the 'apache2' flag to your USE variable and (re)install"
+               ewarn "any additional DSO modules you may wish to use with Apache-2.x."
+               ewarn "Addon modules are configured in /etc/apache2/modules.d/"
+               ewarn
+       fi
+
+       # Check for obsolete symlinks
+       local list=""
+       for i in lib logs modules extramodules; do
+               local d="/etc/apache2/${i}"
+               [ -s "${d}" ] && list="${list} ${d}"
+       done
+       [ -n "${list}" ] && einfo "You should delete these old symlinks: ${list}"
+
+       if has_version '<net-www/apache-2.0.54-r30' && has_version '>=net-www/apache-2.0.0' ; then
+               einfo "Configuration locations have changed, you will need to migrate"
+               einfo "your configuration from /etc/apache2/conf/apache2.conf and"
+               einfo "/etc/apache2/conf/commonapache2.conf to /etc/apache2/httpd.conf."
+               einfo
+               einfo "Apache now checks for the old configuration and refuses to start"
+               einfo "if it exists. You must remove the old configuration first"
+               einfo
+               einfo "You should also at this time rebuild all your modules"
+               einfo
+               einfo "For more information, see"
+               einfo "    http://www.gentoo.org/proj/en/apache/upgrading.xml"
+               einfo
+       fi
+
+       big_fat_warnings
+}
+
+setup_apache_vars() {
+       # actually we do not provide a very dynamic way of those vars
+       # however, you may predefine them in shell before emerging
+       # to override the official default locations
+
+       # standard location for Gentoo Linux
+       DATADIR="${DATADIR:-/var/www/localhost}"
+       USERDIR="${USERDIR:-public_html}"
+
+       einfo "DATADIR is set to: ${DATADIR}"
+       einfo "USERDIR is set to: ${USERDIR}"
+}
+
+mpm_die() {
+       eerror "You attempted to specify the MPM $1, but MPM $2 was already specified."
+       eerror "The apache ebuilds no longer support multiple MPM installations.  Please choose"
+       eerror "one MPM and reinstall."
+       die "More than one MPM was specified."
+}
+
+try_mpm() {
+       local nmpm=$1
+
+       if [ -z "${nmpm}" ]; then
+               die "mpm to try not specified!"
+       fi
+
+       if [ -n "${mpm}" ]; then
+               mpm_die ${nmpm} ${mpm}
+       fi
+
+       mpm="${nmpm}"
+}
+
+select_mpms() {
+       useq mpm-prefork && try_mpm prefork
+       useq mpm-worker && try_mpm worker
+       useq mpm-peruser && try_mpm peruser
+       useq mpm-threadpool && try_mpm threadpool
+       useq mpm-leader && try_mpm leader
+
+       if [ "x${mpm}" = "x" ]; then
+               if useq threads; then
+                       einfo "Threads specified without a mpm-specification, using mpm-worker."
+                       mpm="worker"
+               else
+                       einfo "No MPM style was specified, defaulting to mpm-prefork."
+                       mpm="prefork"
+               fi
+       fi
+}
+
+parse_modules_config() {
+       local name=""
+       local disable=""
+       [ -f ${1} ] || return 1
+
+       for i in `cat $1 | sed "s/^#.*//"`; do
+               if [ $i == "-" ]; then
+                       disable="true"
+               elif [ -z "$name" ] && [ ! -z "`echo $i | grep "mod_"`" ]; then
+                       name=`echo $i | sed "s/mod_//"`
+               elif [ "$disable" ] && ( [ $i == "static" ] || [ $i == "shared" ] ); then
+                       MY_BUILTINS="${MY_BUILTINS} --disable-$name"
+                       name="" ; disable=""
+               elif [ $i == "static" ] || useq static-modules; then
+                       MY_BUILTINS="${MY_BUILTINS} --enable-$name=yes"
+                       name="" ; disable=""
+               elif [ $i == "shared" ]; then
+                       MY_BUILTINS="${MY_BUILTINS} --enable-$name=shared"
+                       name="" ; disable=""
+               fi
+       done
+
+       einfo "${1} options:\n${MY_BUILTINS}"
+}
+
+select_modules_config() {
+       parse_modules_config /etc/apache2/apache2-builtin-mods || \
+       parse_modules_config ${GENTOO_PATCHDIR}/conf/apache2-builtin-mods || \
+       return 1
+}
+
+# vim:ts=4
diff --git a/net-www/apache/files/digest-apache-1.3.33-r12 b/net-www/apache/files/digest-apache-1.3.33-r12
new file mode 100644 (file)
index 0000000..fce5fed
--- /dev/null
@@ -0,0 +1,4 @@
+MD5 3dfd2c3778f37a2dfc22b97417a61407 apache_1.3.33.tar.gz 2468567
+MD5 4f28dcf0f090a7dc2ab148e6a503e99a mod_ssl-2.8.24-1.3.33.tar.gz 820292
+MD5 6401015bafad4f44fdf8a9a1795d9258 lingerd-0.94.tar.gz 33938
+MD5 6753cc0aa9cce1dafdde862bfe662949 gentoo-apache-1.3.33-r12-20050917.tar.bz2 28630
diff --git a/net-www/apache/files/digest-apache-2.0.54-r31 b/net-www/apache/files/digest-apache-2.0.54-r31
new file mode 100644 (file)
index 0000000..858e4d3
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 4ae8a38c6b5db9046616ce10a0d551a2 httpd-2.0.54.tar.bz2 5566979
+MD5 c0dc3eb851a6fbb97c1f886064efa249 gentoo-apache-2.0.54-r31-20050917.tar.bz2 54248