Gentoo Archives: gentoo-commits

From: "Benedikt Boehm (hollow)" <hollow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: webapp.eclass
Date: Fri, 22 Feb 2008 14:59:45
Message-Id: E1JSZMi-0004Xm-Em@stork.gentoo.org
1 hollow 08/02/22 14:59:08
2
3 Modified: webapp.eclass
4 Log:
5 fix #202895
6
7 Revision Changes Path
8 1.57 eclass/webapp.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/webapp.eclass?rev=1.57&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/webapp.eclass?rev=1.57&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/webapp.eclass?r1=1.56&r2=1.57
13
14 Index: webapp.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v
17 retrieving revision 1.56
18 retrieving revision 1.57
19 diff -u -r1.56 -r1.57
20 --- webapp.eclass 22 Feb 2008 14:44:16 -0000 1.56
21 +++ webapp.eclass 22 Feb 2008 14:59:07 -0000 1.57
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2006 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.56 2008/02/22 14:44:16 hollow Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.57 2008/02/22 14:59:07 hollow Exp $
27 #
28 # @ECLASS: webapp.eclass
29 # @MAINTAINER:
30 @@ -22,6 +22,7 @@
31 IS_REPLACE=0
32
33 INSTALL_CHECK_FILE="installed_by_webapp_eclass"
34 +SETUP_CHECK_FILE="setup_by_webapp_eclass"
35
36 ETC_CONFIG="${ROOT}etc/vhosts/webapp-config"
37 WEBAPP_CONFIG="${ROOT}usr/sbin/webapp-config"
38 @@ -285,34 +286,6 @@
39 # EXPORTED FUNCTIONS
40 # ==============================================================================
41
42 -# @FUNCTION: webapp_src_install
43 -# @DESCRIPTION:
44 -# This is the default src_install(). For now, we just make sure that root owns
45 -# everything, and that there are no setuid files.
46 -#
47 -# You need to call this function AFTER everything else has run in your custom
48 -# src_install().
49 -webapp_src_install() {
50 - debug-print-function $FUNCNAME $*
51 -
52 - chown -R "${VHOST_DEFAULT_UID}:${VHOST_DEFAULT_GID}" "${D}/"
53 - chmod -R u-s "${D}/"
54 - chmod -R g-s "${D}/"
55 -
56 - keepdir "${MY_PERSISTDIR}"
57 - fowners "root:0" "${MY_PERSISTDIR}"
58 - fperms 755 "${MY_PERSISTDIR}"
59 -
60 - # to test whether or not the ebuild has correctly called this function
61 - # we add an empty file to the filesystem
62 - #
63 - # we used to just set a variable in the shell script, but we can
64 - # no longer rely on Portage calling both webapp_src_install() and
65 - # webapp_pkg_postinst() within the same shell process
66 -
67 - touch "${D}/${MY_APPDIR}/${INSTALL_CHECK_FILE}"
68 -}
69 -
70 # @FUNCTION: webapp_pkg_setup
71 # @DESCRIPTION:
72 # The default pkg_setup() for this eclass. This will gather required variables
73 @@ -324,6 +297,14 @@
74 webapp_pkg_setup() {
75 debug-print-function $FUNCNAME $*
76
77 + # to test whether or not the ebuild has correctly called this function
78 + # we add an empty file to the filesystem
79 + #
80 + # we used to just set a variable in the shell script, but we can
81 + # no longer rely on Portage calling both webapp_pkg_setup() and
82 + # webapp_src_install() within the same shell process
83 + touch "${T}/${SETUP_CHECK_FILE}"
84 +
85 # special case - some ebuilds *do* need to overwride the SLOT
86 if [[ "${SLOT}+" != "${PVR}+" && "${WEBAPP_MANUAL_SLOT}" != "yes" ]]; then
87 die "Set WEBAPP_MANUAL_SLOT=\"yes\" if you need to SLOT manually"
88 @@ -363,6 +344,48 @@
89 echo
90 die "Cannot upgrade contents of ${my_dir}"
91 fi
92 +
93 +}
94 +
95 +# @FUNCTION: webapp_src_install
96 +# @DESCRIPTION:
97 +# This is the default src_install(). For now, we just make sure that root owns
98 +# everything, and that there are no setuid files.
99 +#
100 +# You need to call this function AFTER everything else has run in your custom
101 +# src_install().
102 +webapp_src_install() {
103 + debug-print-function $FUNCNAME $*
104 +
105 + # to test whether or not the ebuild has correctly called this function
106 + # we add an empty file to the filesystem
107 + #
108 + # we used to just set a variable in the shell script, but we can
109 + # no longer rely on Portage calling both webapp_src_install() and
110 + # webapp_pkg_postinst() within the same shell process
111 + touch "${D}/${MY_APPDIR}/${INSTALL_CHECK_FILE}"
112 +
113 + # sanity checks, to catch bugs in the ebuild
114 + if [[ ! -f "${T}/${SETUP_CHECK_FILE}" ]]; then
115 + eerror
116 + eerror "This ebuild did not call webapp_pkg_setup() at the beginning"
117 + eerror "of the pkg_setup() function"
118 + eerror
119 + eerror "Please log a bug on http://bugs.gentoo.org"
120 + eerror
121 + eerror "You should use emerge -C to remove this package, as the"
122 + eerror "installation is incomplete"
123 + eerror
124 + die "Ebuild did not call webapp_pkg_setup() - report to http://bugs.gentoo.org"
125 + fi
126 +
127 + chown -R "${VHOST_DEFAULT_UID}:${VHOST_DEFAULT_GID}" "${D}/"
128 + chmod -R u-s "${D}/"
129 + chmod -R g-s "${D}/"
130 +
131 + keepdir "${MY_PERSISTDIR}"
132 + fowners "root:0" "${MY_PERSISTDIR}"
133 + fperms 755 "${MY_PERSISTDIR}"
134 }
135
136 # @FUNCTION: webapp_pkg_postinst
137
138
139
140 --
141 gentoo-commits@l.g.o mailing list