From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JdPrg-0003e9-D3 for garchives@archives.gentoo.org; Sun, 23 Mar 2008 13:03:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCA9FE06AD; Sun, 23 Mar 2008 13:03:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9629FE06AD for ; Sun, 23 Mar 2008 13:03:55 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 330DE656F2 for ; Sun, 23 Mar 2008 13:03:55 +0000 (UTC) Received: from hollow by stork.gentoo.org with local (Exim 4.68) (envelope-from ) id 1JdPre-0002sp-6e for gentoo-commits@lists.gentoo.org; Sun, 23 Mar 2008 13:03:54 +0000 From: "Benedikt Boehm (hollow)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, hollow@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: apache-2.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: apache-2.eclass X-VCS-Directories: eclass X-VCS-Committer: hollow X-VCS-Committer-Name: Benedikt Boehm Content-Type: text/plain; charset=utf8 Message-Id: Sender: Benedikt Boehm Date: Sun, 23 Mar 2008 13:03:54 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 7e552160-8716-4a1a-a034-c8128432c0fb X-Archives-Hash: ecb187470048d09cde93fd29b4d9370c hollow 08/03/23 13:03:54 Modified: apache-2.eclass Log: fix default webroot installation; fix einfo output; update documentatio= n Revision Changes Path 1.11 eclass/apache-2.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.ec= lass?rev=3D1.11&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.ec= lass?rev=3D1.11&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/apache-2.ec= lass?r1=3D1.10&r2=3D1.11 Index: apache-2.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 $ =20 # @ECLASS: apache-2.eclass # @MAINTAINER: # apache-devs@gentoo.org -# @BLURB: Provides a common set of functions for >=3Dapache-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 p= roviding -# information about where certain interfaces are located such as LoadMod= ule -# generation and inter-module dependency checking. +# This eclass handles apache-2.x ebuild functions such as LoadModule gen= eration +# and inter-module dependency checking. =20 inherit autotools confutils eutils flag-o-matic multilib =20 @@ -44,12 +43,12 @@ # @VARIABLE: IUSE_MPMS_FORK # @DESCRIPTION: # This variable needs to be set in the ebuild and contains a list of for= king -# (i.e. non-threaded) MPMS +# (i.e. non-threaded) MPMs =20 # @VARIABLE: IUSE_MPMS_THREAD # @DESCRIPTION: # This variable needs to be set in the ebuild and contains a list of thr= eaded -# MPMS +# MPMs =20 # @VARIABLE: IUSE_MODULES # @DESCRIPTION: @@ -360,6 +359,10 @@ apache-2_pkg_setup() { check_upgrade =20 + # setup apache user and group + enewgroup apache 81 + enewuser apache 81 -1 /var/www apache + setup_mpm setup_modules =20 @@ -367,10 +370,6 @@ MY_CONF=3D"${MY_CONF} --enable-maintainer-mode --enable-exception-hook= " fi =20 - # 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=3Dy is set." elog @@ -445,7 +444,7 @@ =20 # @FUNCTION: apache-2_src_install # @DESCRIPTION: -# This function runs emake install and generates, installs and adapts th= e 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=3D"${D}" install || die "make install failed" @@ -496,11 +495,11 @@ rm -Rf "${D}/usr/share/doc/${PF}/manual" fi =20 - # 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 =20 # 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 elsewher= e and we +# don't want them to be managed/removed by portage when apache is upgrad= ed. 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/s= sl ..." 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/localh= ost - chown -R apache:0 "${ROOT}"/var/www/localhost + cp -R "${ROOT}"/usr/share/${PF}/webroot/* "${ROOT}"/var/www/localhost/ + einfo fi } =20 # @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/ } =20 EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postin= st pkg_config --=20 gentoo-commits@lists.gentoo.org mailing list