diff options
author | 2004-04-15 13:48:46 +0000 | |
---|---|---|
committer | 2004-04-15 13:48:46 +0000 | |
commit | d59b44024edb9c442997ca810638ca9d53548885 (patch) | |
tree | 008ebea9b4784365024b96e379eb26df89b8a978 | |
parent | Marked stable on x86. (Manifest recommit) (diff) | |
download | gentoo-2-d59b44024edb9c442997ca810638ca9d53548885.tar.gz gentoo-2-d59b44024edb9c442997ca810638ca9d53548885.tar.bz2 gentoo-2-d59b44024edb9c442997ca810638ca9d53548885.zip |
New release, bug fixes, and cleanups.
-rw-r--r-- | net-www/apache/ChangeLog | 15 | ||||
-rw-r--r-- | net-www/apache/Manifest | 2 | ||||
-rw-r--r-- | net-www/apache/apache-2.0.49-r1.ebuild | 371 | ||||
-rw-r--r-- | net-www/apache/files/common/apr-config.layout | 16 | ||||
-rw-r--r-- | net-www/apache/files/common/apr-util-config.layout | 15 | ||||
-rw-r--r-- | net-www/apache/files/common/config.layout | 23 | ||||
-rw-r--r-- | net-www/apache/files/digest-apache-2.0.49-r1 | 1 | ||||
-rw-r--r-- | net-www/apache/files/httpd-2.0.49-ipv6.patch | 22 |
8 files changed, 464 insertions, 1 deletions
diff --git a/net-www/apache/ChangeLog b/net-www/apache/ChangeLog index 48892b2f89b9..59d527795c38 100644 --- a/net-www/apache/ChangeLog +++ b/net-www/apache/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for net-www/apache # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-www/apache/ChangeLog,v 1.122 2004/04/10 19:25:58 zul Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-www/apache/ChangeLog,v 1.123 2004/04/15 13:48:45 zul Exp $ + +*apache-2.0.49-r1 (15 Apr 2004) + + 15 Apr 2004; Chuck Short <zul@gentoo.org> apache-2.0.49-r1.ebuild, + files/httpd-2.0.49-ipv6.patch, files/common/apr-config.layout, + files/common/apr-util-config.layout, files/common/config.layout: + Version bump. + Bunch of fixes for reported bugs with apache: + - Added ipv6 patch. Closes 42007. + - Added UserDIR detection. Closes #46772. + - Added the threads use flag. Closes #35568. + - Added berkely db version detection. Closes #39562. + Ebuild cleanus as well. 10 Apr 2004; Chuck Short <zul@gentoo.org> files/apache2: Improved apache2 rottelog format. diff --git a/net-www/apache/Manifest b/net-www/apache/Manifest index 6b22cffab744..f2a52a9fe0e0 100644 --- a/net-www/apache/Manifest +++ b/net-www/apache/Manifest @@ -1,3 +1,4 @@ +MD5 177aef16062daaf3760656d171523cf7 apache-2.0.49-r1.ebuild 11846 MD5 10e4a9049e606b4014c2873749420ddf apache-2.0.48-r4.ebuild 12358 MD5 e51a4bbbd442f2d14e53c16eb603d501 apache-1.3.29-r1.ebuild 7414 MD5 29f2c58ba79acec1ff040144ac52bd50 apache-2.0.49.ebuild 12675 @@ -9,6 +10,7 @@ MD5 97c7a2efed7a3fd05614167426c495d9 files/apache-builtin-mods 2465 MD5 589e8773eb94f785be510f74b2e39ad0 files/digest-apache-1.3.29-r1 211 MD5 d3626a1e31a675c60d066c111d552adf files/suexec.pam 59 MD5 4cc91d25cf4117b8db0fec344bebec4d files/digest-apache-2.0.48-r4 65 +MD5 3a7818b24f0952694c7b878ba3d8e79a files/digest-apache-2.0.49-r1 65 MD5 5dbbb01b1f4e39ff052a49389caa76ed files/apache-1.3.27_db4_gentoo.patch 956 MD5 2c7dedfa1c3b2b815d733e90acfa06fc files/apache-2.0.48-export.diff 706 MD5 43283cd264b5b1a6b3e5a4adba5ee2c1 files/apache-2.0.48-gentoo.diff 5905 diff --git a/net-www/apache/apache-2.0.49-r1.ebuild b/net-www/apache/apache-2.0.49-r1.ebuild new file mode 100644 index 000000000000..1f52233c9485 --- /dev/null +++ b/net-www/apache/apache-2.0.49-r1.ebuild @@ -0,0 +1,371 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/apache/apache-2.0.49-r1.ebuild,v 1.1 2004/04/15 13:48:45 zul Exp $ + +inherit flag-o-matic eutils fixheadtails + +DESCRIPTION="Apache Web Server, Version 2.0.x" +HOMEPAGE="http://www.apache.org/" + +S="${WORKDIR}/httpd-${PV}" +SRC_URI="http://www.apache.org/dist/httpd/httpd-${PV}.tar.gz" +KEYWORDS="~x86 ~ppc ~alpha ~hppa ~mips ~sparc ~amd64 ~ia64" +LICENSE="Apache-2.0" +SLOT="2" + +#Standard location for Gentoo Linux +DATADIR="/var/www/localhost" + +DEPEND="dev-util/yacc + dev-lang/perl + sys-libs/zlib + dev-libs/expat + dev-libs/openssl + >=sys-apps/sed-4 + berkdb? ( sys-libs/db ) + gdbm? ( sys-libs/gdbm ) + !mips? ( ldap? ( =net-nds/openldap-2* ) )" +IUSE="berkdb gdbm ldap threads ipv6" + +apache_setup_vars() { + # Sets the USERDIR to default. + USERDIR="public_html" + + if use berkdb; then + db_major=`grep DB_VERSION_MAJOR /usr/include/db.h | cut -f3` + db_minor=`grep DB_VERSION_MINOR /usr/include/db.h | cut -f3` + if [ $db_minor -gt 0 ]; + then + db_version="db4" + else + db_version=`echo "db$db_major.$db_minor"` + fi + append-ldflags -l`echo "$db_version"` + fi + einfo "USERDIR is set to: $USERDIR" + einfo "DB verison detected is $db_version" +} + +set_filter_flags () { + has_version =sys-libs/glibc-2.2* && filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE +} + +src_unpack() { + set_filter_flags + + unpack ${A} || die + cd ${S} || die + epatch ${FILESDIR}/apache-2.0.49-gentoo.diff || die + + #avoid utf-8 charset problems + export LC_CTYPE=C + + ht_fix_file srclib/apr/build/buildcheck.sh + + #give it the stamp + sed -i -e 's:(" PLATFORM "):(Gentoo/Linux):g' server/core.c + + #fix perl with perl! + find -type f | xargs perl -pi -e \ + "s|/usr/local/bin/perl|/usr/bin/perl|g; \ + s|/usr/local/bin/perl5|/usr/bin/perl|g; \ + s|/path/to/bin/perl|/usr/bin/perl|g;" + #dont want this cruft in /usr/bin + sed -i -e 's:@exp_bindir@:@exp_installbuilddir:g' support/apachectl.in + + #setup the filesystem layout config + cat ${FILESDIR}/common/config.layout >> config.layout + sed -i -e 's:version:${PF}:g' config.layout + + cat ${FILESDIR}/common/apr-config.layout >> srclib/apr/config.layout + cat ${FILESDIR}/common/apr-util-config.layout >> srclib/apr-util/config.layout + + WANT_AUTOCONF_2_5=1 WANT_AUTOCONF=2.5 ./buildconf || die "buildconf failed" +} + +src_compile() { + set_filter_flags + apache_setup_vars + + local myconf + if use ldap; then + if use mips; then + eerror "Sorry, LDAP support isn't available yet for MIPS" + eerror "Test out OpenLDAP and report it via BugZilla!" + eerror "Continuing in 5 seconds" + sleep 5s + else + einfo "Enabling LDAP" + myconf="--with-ldap --enable-auth-ldap=shared --enable-ldap=shared" + fi + fi + + if use ipv6; then + einfo "Enabling ipv6" + myconf="${myconf} --enable-vp4" + else + myconf="${myconf} --disable-ipv6" + fi + + if use threads; then + einfo "Enabling threads support" + myconf="${myconf} --with-mpm=worker" + else + myconf="${myconf} --with-mpm=${MPM:=prefork}" + fi + + select_modules_config || die "determining modules" + + # 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 + + # Workaround for bug #32444 - robbat2@gentoo.org, 28 Nov 2003 + # Apache2 tries to build SCTP support even when all the parts of it aren't there + # So for the moment we tell it to ignore SCTP support + echo 'ac_cv_sctp=${ac_cv_sctp=no}' >> ${S}/config.cache + echo 'ac_cv_header_netinet_sctp_h=${ac_cv_header_netinet_sctp_h=no}' >> ${S}/config.cache + echo 'ac_cv_header_netinet_sctp_uio_h=${ac_cv_header_netinet_sctp_uio_h=no}' >> ${S}/config.cache + + SSL_BASE="SYSTEM" \ + WANT_AUTOCONF_2_5=1 WANT_AUTOCONF=2.5 + ./configure \ + --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 \ + \ + ${MY_BUILTINS} \ + \ + --cache-file=${S}/config.cache \ + --with-perl=/usr/bin/perl \ + --with-expat=/usr \ + --with-ssl=/usr \ + --with-z=/usr \ + --with-port=80 \ + --enable-layout=Gentoo \ + --with-program-name=apache2 \ + --with-random=/dev/urandom \ + --host=${CHOST} ${myconf} || die "bad ./configure" + #--with-mpm={worker|prefork|perchild|leader|threadpool} + + emake || die "problem compiling Apache2 :(" + + #build ssl version of apache bench (ab-ssl) + 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/lib" || die + mv ab ab-ssl; mv .libs/ab .libs/ab-ssl; rm -f ab.lo ab.o + make ab || die +} + +src_install () { + set_filter_flags + + local i + make DESTDIR=${D} install || die + dodoc ABOUT_APACHE CHANGES INSTALL LAYOUT \ + LICENSE README* ${FILESDIR}/robots.txt + + #bogus values pointing at /var/tmp/portage + sed -i -e 's:APR_SOURCE_DIR=.*:APR_SOURCE_DIR=:g' ${D}/usr/bin/apr-config + sed -i -e 's:APU_SOURCE_DIR=.*:APU_SOURCE_DIR=:g' ${D}/usr/bin/apu-config + sed -i -e 's:APU_BUILD_DIR=.*:APU_BUILD_DIR=:g' ${D}/usr/bin/apu-config + + #protect the suexec binary + local gid=`id -g apache` + [ -z "${gid}" ] && gid=81 + fowners root:${gid} /usr/sbin/suexec + fperms 4710 /usr/sbin/suexec + + #apxs needs this to pickup the right lib for install + dosym /usr/lib /usr/lib/apache2/lib + dosym /var/log/apache2 /usr/lib/apache2/logs + dosym /usr/lib/apache2-extramodules /usr/lib/apache2/extramodules + dosym /etc/apache2/conf /usr/lib/apache2/conf + + cd ${S} + #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 ${FILESDIR}/2.0.49/$i + done + exeinto /usr/lib/ssl/apache2-mod_ssl + doexe ${FILESDIR}/2.0.49/gentestcrt.sh + + #some more scripts + exeinto /usr/sbin + 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 + doexe support/.libs/ab-ssl + + #move some mods to extramodules + dodir /usr/lib/apache2-extramodules + for i in mod_ssl.so mod_ldap.so mod_auth_ldap.so + do + [ -x ${D}/usr/lib/apache2/modules/$i ] && \ + mv ${D}/usr/lib/apache2/modules/$i ${D}/usr/lib/apache2-extramodules + done + + #modules.d config file snippets + insinto /etc/apache2/conf/modules.d + for i in 40_mod_ssl.conf 41_mod_ssl.default-vhost.conf 45_mod_dav.conf + do + doins ${FILESDIR}/2.0.49/$i + done + use !mips && use ldap && doins ${FILESDIR}/2.0.49/46_mod_ldap.conf + + #drop in a convenient link to the manual + dosym /usr/share/doc/${PF}/manual ${DATADIR}/htdocs/manual + + #SLOT=2!!! + cd ${D} + # do non-man pages + cd ${D} + mv -v usr/sbin/apachectl usr/sbin/apache2ctl + mv -v usr/sbin/htdigest usr/sbin/htdigest2 + mv -v usr/sbin/htpasswd usr/sbin/htpasswd2 + mv -v usr/sbin/logresolve usr/sbin/logresolve2 + mv -v usr/sbin/apxs usr/sbin/apxs2 + mv -v usr/sbin/ab usr/sbin/ab2 + mv -v usr/sbin/ab-ssl usr/sbin/ab2-ssl + mv -v usr/sbin/suexec usr/sbin/suexec2 + mv -v usr/sbin/rotatelogs usr/sbin/rotatelogs2 + mv -v usr/sbin/dbmmanage usr/sbin/dbmmanage2 + mv -v usr/sbin/checkgid usr/sbin/checkgid2 + mv -v usr/sbin/split-logfile usr/sbin/split-logfile2 + mv -v usr/sbin/list_hooks.pl usr/sbin/list_hooks2.pl + mv -v usr/sbin/logresolve.pl usr/sbin/logresolve2.pl + + # do the man pages + mv -v usr/share/man/man1/htdigest.1 usr/share/man/man1/htdigest2.1 + mv -v usr/share/man/man1/htpasswd.1 usr/share/man/man1/htpasswd2.1 + mv -v usr/share/man/man1/dbmmanage.1 usr/share/man/man1/dbmmanage2.1 + mv -v usr/share/man/man8/ab.8 usr/share/man/man8/ab2.8 + mv -v usr/share/man/man8/apxs.8 usr/share/man/man8/apxs2.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 + mv -v usr/share/man/man8/logresolve.8 usr/share/man/man8/logresolve2.8 + mv -v usr/share/man/man8/rotatelogs.8 usr/share/man/man8/rotatelogs2.8 + mv -v usr/share/man/man8/suexec.8 usr/share/man/man8/suexec2.8 + + #tidy up + mv ${D}/usr/sbin/envvars* ${D}/usr/lib/apache2/build + dodoc ${D}/etc/apache2/conf/*-std.conf + rm -f ${D}/etc/apache2/conf/*.conf + rm -rf ${D}/var/run ${D}/var/log + + #config files + insinto /etc/conf.d; newins ${FILESDIR}/2.0.49/apache2.confd apache2 + exeinto /etc/init.d; newexe ${FILESDIR}/2.0.49/apache2.initd apache2 + insinto /etc/apache2; doins ${FILESDIR}/2.0.49/apache2-builtin-mods + insinto /etc/apache2/conf + doins ${FILESDIR}/2.0.49/commonapache2.conf + doins ${FILESDIR}/2.0.49/apache2.conf + insinto /etc/apache2/conf/vhosts + doins ${FILESDIR}/2.0.49/virtual-homepages.conf + doins ${FILESDIR}/2.0.49/dynamic-vhosts.conf + doins ${FILESDIR}/2.0.49/vhosts.conf + + # Added by Jason Wever <weeve@gentoo.org> + # A little sedfu to fix bug #7172 for sparc64s + if [ ${ARCH} = "sparc" ] + then + sed -i -e '13a\AcceptMutex fcntl' \ + ${D}/etc/apache2/conf/apache2.conf + fi +} + +parse_modules_config() { + set_filter_flags + + local filename=$1 + local name="" + local dso="" + local disable="" + [ -f ${filename} ] || return 1 + for i in `cat $filename | 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" ] ; 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 "${filename} options:\n${MY_BUILTINS}" +} + +select_modules_config() { + parse_modules_config /etc/apache2/apache2-builtin-mods || \ + parse_modules_config ${FILESDIR}/2.0.49/apache2-builtin-mods || \ + return 1 +} + +pkg_postinst() { + set_filter_flags + + #empty dirs... + keepdir ${ROOT}/var/lib/dav ; fowners root:apache /var/lib/dav ; fperms 0755 /var/lib/dav + keepdir ${ROOT}/var/lib/apache2 ; fowners root:root /var/log/apache2 ; fperms 0755 /var/log/apache2 + keepdir ${ROOT}/var/cache/apache2 ; fowners root:root /var/cache/apache2 ; fperms 0755 /var/cache/apache2 + + if use ssl; then + # install -d -m0755 -o root -g root ${ROOT}/etc/apache2/conf/ssl + keepdir ${ROOT}/etc/apache2/conf/ssl ; fowners root:root ${ROOT}/etc/apache2/conf/ssl ; fperms 0755 ${ROOT}/etc/apache2/conf/ssll + cd ${ROOT}/etc/apache2/conf/ssl + einfo + einfo "Generating self-signed test certificate in /etc/apache2/conf/ssl..." + yes "" 2>/dev/null | ${ROOT}/usr/lib/ssl/apache2-mod_ssl/gentestcrt.sh >/dev/null 2>&1 + einfo + fi + + if has_version '=net-www/apache-1*' ; 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/conf/modules.d/" + ewarn + fi + + # Check to see if this is an upgrade + if [ -d /home/httpd ]; + then + einfo + einfo "Please remember to update your config files in /etc/apache2" + einfo "as --datadir has been changed to ${DATADIR}, and ServerRoot" + einfo "has changed to /usr/lib/apache2!" + einfo + fi + + local list="" + for i in lib logs modules extramodules; do + local d="/etc/apache2/${i}" + [ -s "${d}" ] && list="${list} ${d}" + done + if [ -n "${list}" ]; then + einfo "You should delete these old symlinks: ${list}" + fi +} diff --git a/net-www/apache/files/common/apr-config.layout b/net-www/apache/files/common/apr-config.layout new file mode 100644 index 000000000000..11e009ab05dd --- /dev/null +++ b/net-www/apache/files/common/apr-config.layout @@ -0,0 +1,16 @@ +<Layout Gentoo> +prefix: /usr +exec_prefix: /usr +bindir: /usr/bin +sbindir: /usr/sbin +libdir: /usr/lib +libexecdir: /usr/lib/apache2/modules +mandir: /usr/share/man +sysconfdir: /etc/apache2/conf +datadir: /var/www/localhost +installbuilddir: /usr/lib/apache2/build +includedir: /usr/include/apache2 +localstatedir: /var +libsuffix: -${APR_MAJOR_VERSION} +</Layout> + diff --git a/net-www/apache/files/common/apr-util-config.layout b/net-www/apache/files/common/apr-util-config.layout new file mode 100644 index 000000000000..8f1f63a3fe6a --- /dev/null +++ b/net-www/apache/files/common/apr-util-config.layout @@ -0,0 +1,15 @@ +<Layout Gentoo> +prefix: /usr +exec_prefix: /usr +bindir: /usr/bin +sbindir: /usr/sbin +libdir: /usr/lib +libexecdir: /usr/lib/apache2/modules +mandir: /usr/share/man +sysconfdir: /etc/apache2/conf +datadir: /var/www/localhost +installbuilddir: /usr/lib/apache2/build +includedir: /usr/include/apache2 +localstatedir: /var +libsuffix: -${APRUTIL_MAJOR_VERSION} +</Layout> diff --git a/net-www/apache/files/common/config.layout b/net-www/apache/files/common/config.layout new file mode 100644 index 000000000000..06321780a46c --- /dev/null +++ b/net-www/apache/files/common/config.layout @@ -0,0 +1,23 @@ +<Layout Gentoo> +prefix: /usr +exec_prefix: /usr +bindir: /usr/bin +sbindir: /usr/sbin +libdir: /usr/lib +libexecdir: /usr/lib/apache2/modules +mandir: /usr/share/man +infodir: /usr/share/info +includedir: /usr/include/apache2 +installbuilddir: /usr/lib/apache2/build +datadir: /var/www/localhost +errordir: /var/www/localhost/error +iconsdir: /var/www/localhost/icons +htdocsdir: /var/www/localhost/htdocs +cgidir: /var/www/localhost/cgi-bin +manualdir: /usr/share/doc/apache-2.0.49/manual +sysconfdir: /etc/apache2/conf +localstatedir: /var +runtimedir: /var/run +logfiledir: /var/log/apache2 +proxycachedir: /var/cache/apache2 +</Layout> diff --git a/net-www/apache/files/digest-apache-2.0.49-r1 b/net-www/apache/files/digest-apache-2.0.49-r1 new file mode 100644 index 000000000000..caa6620e2194 --- /dev/null +++ b/net-www/apache/files/digest-apache-2.0.49-r1 @@ -0,0 +1 @@ +MD5 275d3d37eed1b070f333d3618f7d1954 httpd-2.0.49.tar.gz 5919279 diff --git a/net-www/apache/files/httpd-2.0.49-ipv6.patch b/net-www/apache/files/httpd-2.0.49-ipv6.patch new file mode 100644 index 000000000000..46f8f85e5fa1 --- /dev/null +++ b/net-www/apache/files/httpd-2.0.49-ipv6.patch @@ -0,0 +1,22 @@ +--- httpd-2.0.49/server/.orig/listen.c 2004-03-24 18:01:40.000000000 -0600 ++++ httpd-2.0.49/server/listen.c 2004-03-24 18:07:30.000000000 -0600 +@@ -74,19 +74,6 @@ + return stat; + } + +-#if APR_HAVE_IPV6 +- if (server->bind_addr->family == APR_INET6) { +- stat = apr_socket_opt_set(s, APR_IPV6_V6ONLY, v6only_setting); +- if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) { +- ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, +- "make_sock: for address %pI, apr_socket_opt_set: " +- "(IPV6_V6ONLY)", +- server->bind_addr); +- apr_socket_close(s); +- return stat; +- } +- } +-#endif + + /* + * To send data over high bandwidth-delay connections at full |