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 1JSZNJ-0005lo-9l for garchives@archives.gentoo.org; Fri, 22 Feb 2008 14:59:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B983DE02DC; Fri, 22 Feb 2008 14:59:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7286EE02DC for ; Fri, 22 Feb 2008 14:59:10 +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 9855A653B0 for ; Fri, 22 Feb 2008 14:59:09 +0000 (UTC) Received: from hollow by stork.gentoo.org with local (Exim 4.68) (envelope-from ) id 1JSZMi-0004Xm-Em for gentoo-commits@lists.gentoo.org; Fri, 22 Feb 2008 14:59:08 +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: webapp.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: webapp.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: Fri, 22 Feb 2008 14:59:08 +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: fca59679-6e84-4e81-9adf-5ee16983a4a2 X-Archives-Hash: 3435acf4c19cdd2d55ce05ad392b3d47 hollow 08/02/22 14:59:08 Modified: webapp.eclass Log: fix #202895 Revision Changes Path 1.57 eclass/webapp.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/webapp.ecla= ss?rev=3D1.57&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/webapp.ecla= ss?rev=3D1.57&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/webapp.ecla= ss?r1=3D1.56&r2=3D1.57 Index: webapp.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/webapp.eclass,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- webapp.eclass 22 Feb 2008 14:44:16 -0000 1.56 +++ webapp.eclass 22 Feb 2008 14:59:07 -0000 1.57 @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.56 2008/02/2= 2 14:44:16 hollow Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.57 2008/02/2= 2 14:59:07 hollow Exp $ # # @ECLASS: webapp.eclass # @MAINTAINER: @@ -22,6 +22,7 @@ IS_REPLACE=3D0 =20 INSTALL_CHECK_FILE=3D"installed_by_webapp_eclass" +SETUP_CHECK_FILE=3D"setup_by_webapp_eclass" =20 ETC_CONFIG=3D"${ROOT}etc/vhosts/webapp-config" WEBAPP_CONFIG=3D"${ROOT}usr/sbin/webapp-config" @@ -285,34 +286,6 @@ # EXPORTED FUNCTIONS # =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=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 -# @FUNCTION: webapp_src_install -# @DESCRIPTION: -# This is the default src_install(). For now, we just make sure that roo= t owns -# everything, and that there are no setuid files. -# -# You need to call this function AFTER everything else has run in your c= ustom -# src_install(). -webapp_src_install() { - debug-print-function $FUNCNAME $* - - chown -R "${VHOST_DEFAULT_UID}:${VHOST_DEFAULT_GID}" "${D}/" - chmod -R u-s "${D}/" - chmod -R g-s "${D}/" - - keepdir "${MY_PERSISTDIR}" - fowners "root:0" "${MY_PERSISTDIR}" - fperms 755 "${MY_PERSISTDIR}" - - # to test whether or not the ebuild has correctly called this function - # we add an empty file to the filesystem - # - # we used to just set a variable in the shell script, but we can - # no longer rely on Portage calling both webapp_src_install() and - # webapp_pkg_postinst() within the same shell process - - touch "${D}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" -} - # @FUNCTION: webapp_pkg_setup # @DESCRIPTION: # The default pkg_setup() for this eclass. This will gather required var= iables @@ -324,6 +297,14 @@ webapp_pkg_setup() { debug-print-function $FUNCNAME $* =20 + # to test whether or not the ebuild has correctly called this function + # we add an empty file to the filesystem + # + # we used to just set a variable in the shell script, but we can + # no longer rely on Portage calling both webapp_pkg_setup() and + # webapp_src_install() within the same shell process + touch "${T}/${SETUP_CHECK_FILE}" + # special case - some ebuilds *do* need to overwride the SLOT if [[ "${SLOT}+" !=3D "${PVR}+" && "${WEBAPP_MANUAL_SLOT}" !=3D "yes" ]= ]; then die "Set WEBAPP_MANUAL_SLOT=3D\"yes\" if you need to SLOT manually" @@ -363,6 +344,48 @@ echo die "Cannot upgrade contents of ${my_dir}" fi + +} + +# @FUNCTION: webapp_src_install +# @DESCRIPTION: +# This is the default src_install(). For now, we just make sure that roo= t owns +# everything, and that there are no setuid files. +# +# You need to call this function AFTER everything else has run in your c= ustom +# src_install(). +webapp_src_install() { + debug-print-function $FUNCNAME $* + + # to test whether or not the ebuild has correctly called this function + # we add an empty file to the filesystem + # + # we used to just set a variable in the shell script, but we can + # no longer rely on Portage calling both webapp_src_install() and + # webapp_pkg_postinst() within the same shell process + touch "${D}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" + + # sanity checks, to catch bugs in the ebuild + if [[ ! -f "${T}/${SETUP_CHECK_FILE}" ]]; then + eerror + eerror "This ebuild did not call webapp_pkg_setup() at the beginning" + eerror "of the pkg_setup() function" + eerror + eerror "Please log a bug on http://bugs.gentoo.org" + eerror + eerror "You should use emerge -C to remove this package, as the" + eerror "installation is incomplete" + eerror + die "Ebuild did not call webapp_pkg_setup() - report to http://bugs.ge= ntoo.org" + fi + + chown -R "${VHOST_DEFAULT_UID}:${VHOST_DEFAULT_GID}" "${D}/" + chmod -R u-s "${D}/" + chmod -R g-s "${D}/" + + keepdir "${MY_PERSISTDIR}" + fowners "root:0" "${MY_PERSISTDIR}" + fperms 755 "${MY_PERSISTDIR}" } =20 # @FUNCTION: webapp_pkg_postinst --=20 gentoo-commits@lists.gentoo.org mailing list