1 |
hollow 07/09/07 21:46:27 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: apache-2.2.6.ebuild apache-2.0.61.ebuild |
5 |
Removed: apache-2.0.59-r2.ebuild |
6 |
Log: |
7 |
version bumps |
8 |
(Portage version: 2.1.3.7) |
9 |
|
10 |
Revision Changes Path |
11 |
1.17 www-servers/apache/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/ChangeLog?rev=1.17&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/ChangeLog?rev=1.17&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/ChangeLog?r1=1.16&r2=1.17 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/apache/ChangeLog,v |
20 |
retrieving revision 1.16 |
21 |
retrieving revision 1.17 |
22 |
diff -u -r1.16 -r1.17 |
23 |
--- ChangeLog 4 Sep 2007 18:37:12 -0000 1.16 |
24 |
+++ ChangeLog 7 Sep 2007 21:46:27 -0000 1.17 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for www-servers/apache |
27 |
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/apache/ChangeLog,v 1.16 2007/09/04 18:37:12 armin76 Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/apache/ChangeLog,v 1.17 2007/09/07 21:46:27 hollow Exp $ |
30 |
+ |
31 |
+*apache-2.2.6 (07 Sep 2007) |
32 |
+*apache-2.0.61 (07 Sep 2007) |
33 |
+ |
34 |
+ 07 Sep 2007; Benedikt Böhm <hollow@g.o> -apache-2.0.59-r2.ebuild, |
35 |
+ +apache-2.0.61.ebuild, +apache-2.2.6.ebuild: |
36 |
+ version bumps |
37 |
|
38 |
04 Sep 2007; Raúl Porcel <armin76@g.o> apache-2.0.59-r5.ebuild, |
39 |
apache-2.2.4-r12.ebuild: |
40 |
|
41 |
|
42 |
|
43 |
1.1 www-servers/apache/apache-2.2.6.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/apache-2.2.6.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/apache-2.2.6.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: apache-2.2.6.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2007 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/apache/apache-2.2.6.ebuild,v 1.1 2007/09/07 21:46:27 hollow Exp $ |
53 |
|
54 |
inherit eutils flag-o-matic gnuconfig multilib autotools |
55 |
|
56 |
# latest gentoo apache files |
57 |
GENTOO_PATCHNAME="gentoo-${PF}" |
58 |
GENTOO_PATCHSTAMP="20070907" |
59 |
GENTOO_DEVSPACE="hollow" |
60 |
GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}" |
61 |
|
62 |
DESCRIPTION="The Apache Web Server." |
63 |
HOMEPAGE="http://httpd.apache.org/" |
64 |
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2 |
65 |
http://dev.gentoo.org/~${GENTOO_DEVSPACE}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2" |
66 |
|
67 |
# some helper scripts are apache-1.1, thus both are here |
68 |
LICENSE="Apache-2.0 Apache-1.1" |
69 |
SLOT="2" |
70 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
71 |
IUSE="debug doc ldap mpm-event mpm-itk mpm-peruser mpm-prefork mpm-worker no-suexec selinux ssl static-modules threads" |
72 |
|
73 |
DEPEND="dev-lang/perl |
74 |
=dev-libs/apr-1* |
75 |
=dev-libs/apr-util-1* |
76 |
dev-libs/expat |
77 |
dev-libs/libpcre |
78 |
sys-libs/zlib |
79 |
ldap? ( =net-nds/openldap-2* ) |
80 |
selinux? ( sec-policy/selinux-apache ) |
81 |
ssl? ( dev-libs/openssl ) |
82 |
!=www-servers/apache-1* |
83 |
!=app-admin/apache-tools-2.2.4-r2" |
84 |
|
85 |
RDEPEND="${DEPEND} |
86 |
app-misc/mime-types" |
87 |
|
88 |
PDEPEND="~app-admin/apache-tools-${PV}" |
89 |
|
90 |
S="${WORKDIR}/httpd-${PV}" |
91 |
|
92 |
pkg_setup() { |
93 |
if use ldap && ! built_with_use 'dev-libs/apr-util' ldap ; then |
94 |
eerror "dev-libs/apr-util is missing LDAP support. For apache to have" |
95 |
eerror "ldap support, apr-util must be built with the ldap USE-flag" |
96 |
eerror "enabled." |
97 |
die "ldap USE-flag enabled while not supported in apr-util" |
98 |
fi |
99 |
|
100 |
# Select the default MPM module |
101 |
MPM_LIST="event itk peruser prefork worker" |
102 |
for x in ${MPM_LIST} ; do |
103 |
if use mpm-${x} ; then |
104 |
if [[ "x${mpm}" == "x" ]] ; then |
105 |
mpm=${x} |
106 |
elog |
107 |
elog "Selected MPM: ${mpm}" |
108 |
elog |
109 |
else |
110 |
eerror "You have selected more then one mpm USE-flag." |
111 |
eerror "Only one MPM is supported." |
112 |
die "more then one mpm was specified" |
113 |
fi |
114 |
fi |
115 |
done |
116 |
|
117 |
if [[ "x${mpm}" == "x" ]] ; then |
118 |
if use threads ; then |
119 |
mpm=worker |
120 |
elog |
121 |
elog "Selected default threaded MPM: ${mpm}"; |
122 |
elog |
123 |
else |
124 |
mpm=prefork |
125 |
elog |
126 |
elog "Selected default MPM: ${mpm}"; |
127 |
elog |
128 |
fi |
129 |
fi |
130 |
|
131 |
# setup apache user and group |
132 |
enewgroup apache 81 |
133 |
enewuser apache 81 -1 /var/www apache |
134 |
|
135 |
if ! use no-suexec ; then |
136 |
elog |
137 |
elog "You can manipulate several configure options of suexec" |
138 |
elog "through the following environment variables:" |
139 |
elog |
140 |
elog " SUEXEC_SAFEPATH: Default PATH for suexec (default: /usr/local/bin:/usr/bin:/bin)" |
141 |
elog " SUEXEC_LOGFILE: Path to the suexec logfile (default: /var/log/apache2/suexec_log)" |
142 |
elog " SUEXEC_CALLER: Name of the user Apache is running as (default: apache)" |
143 |
elog " SUEXEC_DOCROOT: Directory in which suexec will run scripts (default: /var/www)" |
144 |
elog " SUEXEC_MINUID: Minimum UID, which is allowed to run scripts via suexec (default: 1000)" |
145 |
elog " SUEXEC_MINGID: Minimum GID, which is allowed to run scripts via suexec (default: 100)" |
146 |
elog " SUEXEC_USERDIR: User subdirectories (like /home/user/html) (default: public_html)" |
147 |
elog " SUEXEC_UMASK: Umask for the suexec process (default: 077)" |
148 |
elog |
149 |
fi |
150 |
} |
151 |
|
152 |
src_unpack() { |
153 |
unpack ${A} |
154 |
cd "${S}" |
155 |
|
156 |
# Use correct multilib libdir in gentoo patches |
157 |
sed -i -e "s:/usr/lib:/usr/$(get_libdir):g" \ |
158 |
"${GENTOO_PATCHDIR}"/{conf/httpd.conf,init/*,patches/config.layout} \ |
159 |
|| die "libdir sed failed" |
160 |
|
161 |
#### Patch Organization |
162 |
# 00-19 Gentoo specific (00_all_some-title.patch) |
163 |
# 20-39 Additional MPMs (20_all_${MPM}_some-title.patch) |
164 |
# 40-59 USE-flag based (40_all_${USE}_some-title.patch) |
165 |
# 60-79 Version specific (60_all_${PV}_some-title.patch) |
166 |
# 80-99 Security patches (80_all_${PV}_cve-####-####.patch) |
167 |
|
168 |
epatch "${GENTOO_PATCHDIR}"/patches/*.patch |
169 |
|
170 |
# setup the filesystem layout config |
171 |
cat "${GENTOO_PATCHDIR}"/patches/config.layout >> "${S}"/config.layout || \ |
172 |
die "Failed preparing config.layout!" |
173 |
sed -i -e "s:version:${PF}:g" "${S}"/config.layout |
174 |
|
175 |
# patched-in MPMs need the build environment rebuilt |
176 |
sed -i -e '/sinclude/d' configure.in |
177 |
AT_GNUCONF_UPDATE=yes AT_M4DIR=build eautoreconf |
178 |
} |
179 |
|
180 |
src_compile() { |
181 |
local modtype="shared" myconf="" |
182 |
cd "${S}" |
183 |
|
184 |
# Instead of filtering --as-needed (bug #128505), append --no-as-needed |
185 |
# Thanks to Harald van Dijk |
186 |
append-ldflags -Wl,--no-as-needed |
187 |
|
188 |
# peruser MPM debugging with -X is nearly impossible |
189 |
use mpm-peruser && use debug && append-flags -DMPM_PERUSER_DEBUG |
190 |
|
191 |
use static-modules && modtype="static" |
192 |
select_modules_config || die "determining modules failed" |
193 |
|
194 |
if use ldap ; then |
195 |
mods="${mods} ldap authnz_ldap" |
196 |
myconf="${myconf} --enable-authnz-ldap=${modtype} --enable-ldap=${modtype}" |
197 |
fi |
198 |
|
199 |
if use threads; then |
200 |
mods="${mods} cgid" |
201 |
myconf="${myconf} --enable-cgid=${modtype}" |
202 |
else |
203 |
mods="${mods} cgi" |
204 |
myconf="${myconf} --enable-cgi=${modtype}" |
205 |
fi |
206 |
|
207 |
if use ssl; then |
208 |
mods="${mods} ssl" |
209 |
myconf="${myconf} --with-ssl=/usr --enable-ssl=${modtype}" |
210 |
fi |
211 |
|
212 |
# Only build suexec with USE=-no-suexec |
213 |
if use no-suexec ; then |
214 |
myconf="${myconf} --disable-suexec" |
215 |
else |
216 |
myconf="${myconf} --with-suexec-safepath=${SUEXEC_SAFEPATH:-/usr/local/bin:/usr/bin:/bin}" |
217 |
myconf="${myconf} --with-suexec-logfile=${SUEXEC_LOGFILE:-/var/log/apache2/suexec_log}" |
218 |
myconf="${myconf} --with-suexec-bin=/usr/sbin/suexec" |
219 |
myconf="${myconf} --with-suexec-userdir=${SUEXEC_USERDIR:-public_html}" |
220 |
myconf="${myconf} --with-suexec-caller=${SUEXEC_CALLER:-apache}" |
221 |
myconf="${myconf} --with-suexec-docroot=${SUEXEC_DOCROOT:-/var/www}" |
222 |
myconf="${myconf} --with-suexec-uidmin=${SUEXEC_MINUID:-1000}" |
223 |
myconf="${myconf} --with-suexec-gidmin=${SUEXEC_MINGID:-100}" |
224 |
myconf="${myconf} --with-suexec-umask=${SUEXEC_UMASK:-077}" |
225 |
myconf="${myconf} --enable-suexec=${modtype}" |
226 |
mods="${mods} suexec" |
227 |
fi |
228 |
|
229 |
# econf overwrites the stuff from config.layout, so we have to put them into |
230 |
# our myconf line too |
231 |
|
232 |
econf \ |
233 |
--includedir=/usr/include/apache2 \ |
234 |
--libexecdir=/usr/$(get_libdir)/apache2/modules \ |
235 |
--datadir=/var/www/localhost \ |
236 |
--sysconfdir=/etc/apache2 \ |
237 |
--localstatedir=/var \ |
238 |
--with-mpm=${mpm} \ |
239 |
--with-perl=/usr/bin/perl \ |
240 |
--with-expat=/usr \ |
241 |
--with-z=/usr \ |
242 |
--with-apr=/usr \ |
243 |
--with-apr-util=/usr \ |
244 |
--with-pcre=/usr \ |
245 |
--with-port=80 \ |
246 |
--with-program-name=apache2 \ |
247 |
--enable-layout=Gentoo \ |
248 |
$( use_enable debug maintainer-mode ) \ |
249 |
${myconf} ${MY_BUILTINS} || die "econf failed!" |
250 |
|
251 |
sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h |
252 |
|
253 |
emake || die "emake failed" |
254 |
} |
255 |
|
256 |
src_install () { |
257 |
emake DESTDIR="${D}" install || die "emake install failed" |
258 |
|
259 |
# This is a mapping of module names to the -D options in APACHE2_OPTS |
260 |
# Used for creating optional LoadModule lines |
261 |
mod_defines=" |
262 |
authnz_ldap:AUTH_LDAP |
263 |
cache:CACHE |
264 |
dav:DAV |
265 |
dav_fs:DAV |
266 |
dav_lock:DAV |
267 |
disk_cache:CACHE |
268 |
file_cache:CACHE |
269 |
info:INFO |
270 |
ldap:LDAP |
271 |
mem_cache:CACHE |
272 |
proxy:PROXY |
273 |
proxy_ajp:PROXY |
274 |
proxy_balancer:PROXY |
275 |
proxy_connect:PROXY |
276 |
proxy_http:PROXY |
277 |
ssl:SSL |
278 |
status:INFO |
279 |
suexec:SUEXEC |
280 |
userdir:USERDIR |
281 |
" |
282 |
|
283 |
# create our LoadModule lines |
284 |
if ! use static-modules ; then |
285 |
load_module="" |
286 |
moddir="${D}/usr/$(get_libdir)/apache2/modules" |
287 |
for m in ${mods} ; do |
288 |
endid="no" |
289 |
|
290 |
if [[ -e "${moddir}/mod_${m}.so" ]] ; then |
291 |
for def in ${mod_defines} ; do |
292 |
if [[ "${m}" == "${def%:*}" ]] ; then |
293 |
load_module="${load_module}\n<IfDefine ${def#*:}>" |
294 |
endid="yes" |
295 |
fi |
296 |
done |
297 |
load_module="${load_module}\nLoadModule ${m}_module modules/mod_${m}.so" |
298 |
if [[ "${endid}" == "yes" ]] ; then |
299 |
load_module="${load_module}\n</IfDefine>" |
300 |
fi |
301 |
fi |
302 |
done |
303 |
fi |
304 |
sed -i -e "s:%%LOAD_MODULE%%:${load_module}:" \ |
305 |
"${GENTOO_PATCHDIR}"/conf/httpd.conf || die "sed failed" |
306 |
|
307 |
# Install our configuration files |
308 |
insinto /etc/apache2 |
309 |
doins docs/conf/magic |
310 |
doins -r "${GENTOO_PATCHDIR}"/conf/* |
311 |
insinto /etc/logrotate.d |
312 |
newins "${GENTOO_PATCHDIR}"/scripts/apache2-logrotate apache2 |
313 |
|
314 |
# generate a sane default APACHE2_OPTS |
315 |
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE" |
316 |
use doc && APACHE2_OPTS="${APACHE2_OPTS} -D MANUAL" |
317 |
use ssl && APACHE2_OPTS="${APACHE2_OPTS} -D SSL -D SSL_DEFAULT_VHOST" |
318 |
use no-suexec || APACHE2_OPTS="${APACHE2_OPTS} -D SUEXEC" |
319 |
|
320 |
sed -i -e "s:APACHE2_OPTS=\".*\":APACHE2_OPTS=\"${APACHE2_OPTS}\":" \ |
321 |
"${GENTOO_PATCHDIR}"/init/apache2.confd || die "sed failed" |
322 |
|
323 |
newconfd "${GENTOO_PATCHDIR}"/init/apache2.confd apache2 |
324 |
newinitd "${GENTOO_PATCHDIR}"/init/apache2.initd apache2 |
325 |
|
326 |
# Link apache2ctl to the init script |
327 |
dosym /etc/init.d/apache2 /usr/sbin/apache2ctl |
328 |
|
329 |
# provide symlinks for all the stuff we no longer rename, bug 177697 |
330 |
for i in suexec apxs; do |
331 |
dosym /usr/sbin/${i} /usr/sbin/${i}2 |
332 |
done |
333 |
|
334 |
# Install some thirdparty scripts |
335 |
exeinto /usr/sbin |
336 |
for i in apache2logserverstatus apache2splitlogfile ; do |
337 |
doexe "${GENTOO_PATCHDIR}"/scripts/${i} |
338 |
done |
339 |
use ssl && doexe "${GENTOO_PATCHDIR}"/scripts/gentestcrt.sh |
340 |
|
341 |
# Install some documentation |
342 |
dodoc ABOUT_APACHE CHANGES LAYOUT README README.platforms VERSIONING |
343 |
dodoc "${GENTOO_PATCHDIR}"/docs/* |
344 |
|
345 |
# drop in a convenient link to the manual |
346 |
if use doc ; then |
347 |
sed -i -e "s:VERSION:${PVR}:" "${D}/etc/apache2/modules.d/00_apache_manual.conf" |
348 |
else |
349 |
rm -f "${D}/etc/apache2/modules.d/00_apache_manual.conf" |
350 |
rm -Rf "${D}/usr/share/doc/${PF}/manual" |
351 |
fi |
352 |
|
353 |
# the default webroot gets stored in /usr/share/doc |
354 |
ebegin "Installing default webroot to /usr/share/doc/${PF}" |
355 |
mv -f "${D}/var/www/localhost" "${D}/usr/share/doc/${PF}/webroot" |
356 |
eend $? |
357 |
keepdir /var/www/localhost/htdocs |
358 |
|
359 |
if ! use no-suexec ; then |
360 |
# Set some sane permissions for suexec |
361 |
fowners 0:apache /usr/sbin/suexec |
362 |
fperms 4710 /usr/sbin/suexec |
363 |
fi |
364 |
|
365 |
keepdir /etc/apache2/vhosts.d |
366 |
keepdir /etc/apache2/modules.d |
367 |
|
368 |
# empty dirs |
369 |
for i in /var/lib/dav /var/log/apache2 /var/cache/apache2 ; do |
370 |
keepdir ${i} |
371 |
fowners apache:apache ${i} |
372 |
fperms 0755 ${i} |
373 |
done |
374 |
|
375 |
# We'll be needing /etc/apache2/ssl if USE=ssl |
376 |
use ssl && keepdir /etc/apache2/ssl |
377 |
} |
378 |
|
379 |
pkg_postinst() { |
380 |
# Automatically generate test certificates if ssl USE flag is being set |
381 |
if use ssl && [[ ! -e "${ROOT}/etc/apache2/ssl/server.crt" ]] ; then |
382 |
cd "${ROOT}"/etc/apache2/ssl |
383 |
einfo |
384 |
einfo "Generating self-signed test certificate in ${ROOT}/etc/apache2/ssl ..." |
385 |
yes "" 2>/dev/null | \ |
386 |
"${ROOT}"/usr/sbin/gentestcrt.sh >/dev/null 2>&1 || \ |
387 |
die "gentestcrt.sh failed" |
388 |
einfo |
389 |
fi |
390 |
|
391 |
# we do this here because the default webroot is a copy of the files |
392 |
# that exist elsewhere and we don't want them managed/removed by portage |
393 |
# when apache is upgraded. |
394 |
|
395 |
if [[ -e "${ROOT}/var/www/localhost" ]] ; then |
396 |
elog "The default webroot has not been installed into" |
397 |
elog "${ROOT}/var/www/localhost because the directory already exists" |
398 |
elog "and we do not want to overwrite any files you have put there." |
399 |
elog |
400 |
elog "If you would like to install the latest webroot, please run" |
401 |
elog "emerge --config =${PF}" |
402 |
else |
403 |
einfo "Installing default webroot to ${ROOT}/var/www/localhost" |
404 |
mkdir -p "${ROOT}"/var/www/localhost |
405 |
cp -R "${ROOT}"/usr/share/doc/${PF}/webroot/* "${ROOT}"/var/www/localhost |
406 |
chown -R apache:0 "${ROOT}"/var/www/localhost |
407 |
fi |
408 |
|
409 |
# Previous installations of apache-2.2 installed the upstream configuration |
410 |
# files, which shouldn't even have been installed! |
411 |
if has_version '>=www-servers/apache-2.2.4' ; then |
412 |
[ -f "${ROOT}"/etc/apache2/apache2.conf ] && \ |
413 |
rm -f "${ROOT}"/etc/apache2/apache2.conf >/dev/null 2>&1 |
414 |
|
415 |
for i in extra original ; do |
416 |
[ -d "${ROOT}"/etc/apache2/$i ] && \ |
417 |
rm -rf "${ROOT}"/etc/apache2/$i >/dev/null 2>&1 |
418 |
done |
419 |
fi |
420 |
|
421 |
# Note the changes regarding DEFAULT_VHOST and SSL_DEFAULT_VHOST |
422 |
if has_version '<www-servers/apache-2.2.4-r7' ; then |
423 |
elog |
424 |
elog "Listen directives have been moved into the default virtual host" |
425 |
elog "configuation. At least DEFAULT_VHOST has been enabled for you" |
426 |
elog "(depending on your USE-flags." |
427 |
elog |
428 |
elog "If you disable DEFAULT_VHOST or SSL_DEFAULT_VHOST, there would" |
429 |
elog "be no listening sockets available." |
430 |
elog |
431 |
fi |
432 |
|
433 |
# Note the user of the config changes |
434 |
if has_version '<www-servers/apache-2.2.4-r5' ; then |
435 |
elog |
436 |
elog "Please make sure that you update your /etc directory." |
437 |
elog "Between the versions, we had to changes some config files" |
438 |
elog "and move some stuff out of the main httpd.conf file to a seperate" |
439 |
elog "modules.d entry." |
440 |
elog |
441 |
elog "Thus please update your /etc directory either via etc-update," |
442 |
elog "dispatch-conf or conf-update !" |
443 |
elog |
444 |
fi |
445 |
|
446 |
# Check for dual/upgrade install |
447 |
if has_version '<www-servers/apache-2.2.0' ; then |
448 |
elog |
449 |
elog "When upgrading from versions below 2.2.0 to this version, you" |
450 |
elog "need to rebuild all your modules. Please do so for your modules" |
451 |
elog "to continue working correctly." |
452 |
elog |
453 |
elog "Also note that some configuration directives have been" |
454 |
elog "split into their own files under ${ROOT}/etc/apache2/modules.d/" |
455 |
elog "and that some modules, foremost the authentication related ones," |
456 |
elog "have been renamed." |
457 |
elog |
458 |
elog "Some examples:" |
459 |
elog " - USERDIR is now configureable in ${ROOT}etc/apache2/modules.d/00_mod_userdir.conf." |
460 |
elog |
461 |
elog "For more information on what you may need to change, please" |
462 |
elog "see the overview of changes at:" |
463 |
elog "http://httpd.apache.org/docs/2.2/new_features_2_2.html" |
464 |
elog "and the upgrading guide at:" |
465 |
elog "http://httpd.apache.org/docs/2.2/upgrading.html" |
466 |
elog |
467 |
fi |
468 |
|
469 |
# Cleanup the vim backup files, placed in /etc/apache2 by the last |
470 |
# patchtarball (gentoo-apache-2.2.4-r7-20070615) |
471 |
rm -f "${ROOT}/etc/apache2/modules.d/*.conf~" |
472 |
} |
473 |
|
474 |
pkg_config() { |
475 |
einfo "Installing default webroot to ${ROOT}/var/www/localhost" |
476 |
cp -R "${ROOT}"/usr/share/doc/${PF}/webroot/* "${ROOT}"/var/www/localhost |
477 |
} |
478 |
|
479 |
parse_modules_config() { |
480 |
local name="" |
481 |
local disable="" |
482 |
local version="undef" |
483 |
MY_BUILTINS="" |
484 |
mods="" |
485 |
[[ -f "${1}" ]] || return 1 |
486 |
|
487 |
for i in $(sed 's/#.*//' < $1) ; do |
488 |
if [[ "$i" == "VERSION:" ]] ; then |
489 |
version="select" |
490 |
elif [[ "${version}" == "select" ]] ; then |
491 |
version="$i" |
492 |
# start with - option for backwards compatibility only |
493 |
elif [[ "$i" == "-" ]] ; then |
494 |
disable="true" |
495 |
elif [[ -z "${name}" ]] && [[ "$i" != "${i/mod_/}" ]] ; then |
496 |
name="${i/mod_/}" |
497 |
elif [[ -n "${disable}" ]] || [[ "$i" == "disabled" ]] ; then |
498 |
MY_BUILTINS="${MY_BUILTINS} --disable-${name}" |
499 |
name="" ; disable="" |
500 |
elif [[ "$i" == "static" ]] || use static-modules ; then |
501 |
MY_BUILTINS="${MY_BUILTINS} --enable-${name}=static" |
502 |
name="" ; disable="" |
503 |
elif [[ "$i" == "shared" ]] ; then |
504 |
MY_BUILTINS="${MY_BUILTINS} --enable-${name}=shared" |
505 |
mods="${mods} ${name}" |
506 |
name="" ; disable="" |
507 |
else |
508 |
ewarn "Parse error in ${1} - unknown option: $i" |
509 |
fi |
510 |
done |
511 |
|
512 |
# reject the file if it's unversioned or doesn't match our |
513 |
# package major.minor. This is to make upgrading work smoothly. |
514 |
if [[ "${version}" != "${PV%.*}" ]] ; then |
515 |
mods="" |
516 |
MY_BUILTINS="" |
517 |
return 1 |
518 |
fi |
519 |
|
520 |
einfo "Using ${1}" |
521 |
einfo "options: ${MY_BUILTINS}" |
522 |
einfo "LoadModules: ${mods}" |
523 |
} |
524 |
|
525 |
select_modules_config() { |
526 |
parse_modules_config "${ROOT}"/etc/apache2/apache2-builtin-mods || \ |
527 |
parse_modules_config "${GENTOO_PATCHDIR}"/conf/apache2-builtin-mods || \ |
528 |
return 1 |
529 |
} |
530 |
|
531 |
|
532 |
|
533 |
1.1 www-servers/apache/apache-2.0.61.ebuild |
534 |
|
535 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/apache-2.0.61.ebuild?rev=1.1&view=markup |
536 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/apache-2.0.61.ebuild?rev=1.1&content-type=text/plain |
537 |
|
538 |
Index: apache-2.0.61.ebuild |
539 |
=================================================================== |
540 |
# Copyright 1999-2007 Gentoo Foundation |
541 |
# Distributed under the terms of the GNU General Public License v2 |
542 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/apache/apache-2.0.61.ebuild,v 1.1 2007/09/07 21:46:27 hollow Exp $ |
543 |
|
544 |
inherit eutils flag-o-matic gnuconfig multilib |
545 |
|
546 |
# latest gentoo apache files |
547 |
GENTOO_PATCHNAME="gentoo-apache-${PVR}" |
548 |
GENTOO_PATCHSTAMP="20070907" |
549 |
GENTOO_DEVSPACE="hollow" |
550 |
GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}" |
551 |
|
552 |
DESCRIPTION="The Apache Web Server" |
553 |
HOMEPAGE="http://httpd.apache.org/" |
554 |
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2 |
555 |
http://dev.gentoo.org/~${GENTOO_DEVSPACE}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2" |
556 |
|
557 |
LICENSE="Apache-2.0" |
558 |
SLOT="2" |
559 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
560 |
IUSE="apache2 debug doc ldap mpm-itk mpm-leader mpm-peruser mpm-prefork mpm-threadpool mpm-worker ssl static-modules threads selinux" |
561 |
|
562 |
RDEPEND="dev-lang/perl |
563 |
=dev-libs/apr-0* |
564 |
=dev-libs/apr-util-0* |
565 |
dev-libs/expat |
566 |
app-misc/mime-types |
567 |
sys-libs/zlib |
568 |
mpm-itk? ( sys-libs/libcap ) |
569 |
ssl? ( dev-libs/openssl ) |
570 |
selinux? ( sec-policy/selinux-apache ) |
571 |
!mips? ( ldap? ( =net-nds/openldap-2* ) )" |
572 |
DEPEND="${RDEPEND} |
573 |
>=sys-devel/autoconf-2.59-r4" |
574 |
|
575 |
S="${WORKDIR}/httpd-${PV}" |
576 |
|
577 |
big_fat_warnings() { |
578 |
|
579 |
if use ldap && ! built_with_use '=dev-libs/apr-util-0*' ldap; then |
580 |
eerror "dev-libs/apr-util is missing LDAP support. For apache to have" |
581 |
eerror "ldap support, apr-util must be built with the ldap USE-flag" |
582 |
eerror "enabled." |
583 |
die "ldap USE-flag enabled while not supported in apr-util" |
584 |
fi |
585 |
|
586 |
if use mpm-peruser || use mpm-itk; then |
587 |
ewarn "-BIG- -FAT- -WARNING-" |
588 |
ewarn |
589 |
ewarn "The peruser (USE=mpm-peruser) and itk (USE=mpm-itk) MPMs are considered" |
590 |
ewarn "highly experimental and are not (yet) supported, nor are they recommended" |
591 |
ewarn "for production use. You have been warned!" |
592 |
ewarn |
593 |
ewarn "Continuing in 5 seconds ..." |
594 |
sleep 5 |
595 |
fi |
596 |
|
597 |
} |
598 |
|
599 |
pkg_setup() { |
600 |
big_fat_warnings |
601 |
select_mpms |
602 |
|
603 |
# setup apache user and group |
604 |
enewgroup apache 81 |
605 |
enewuser apache 81 -1 /var/www apache |
606 |
|
607 |
} |
608 |
|
609 |
src_unpack() { |
610 |
unpack ${A} || die |
611 |
cd ${S} || die |
612 |
|
613 |
# Use correct multilib libdir in gentoo patches |
614 |
sed -i -e "s:/usr/lib:/usr/$(get_libdir):g" \ |
615 |
${GENTOO_PATCHDIR}/{conf/httpd.conf,init/*,patches/config.layout} \ |
616 |
|| die "sed failed" |
617 |
|
618 |
EPATCH_SUFFIX="patch" |
619 |
epatch ${GENTOO_PATCHDIR}/patches/[0-8]* || die "internal ebuild error" |
620 |
|
621 |
# security patches are version based |
622 |
# 99_all_${PV}_Name.patch |
623 |
if $(ls ${GENTOO_PATCHDIR}/patches/9?_*_${PV}_* &>/dev/null); then |
624 |
epatch ${GENTOO_PATCHDIR}/patches/9?_*_${PV}_* || \ |
625 |
die "Patching for version ${PV} failed" |
626 |
fi |
627 |
|
628 |
# avoid utf-8 charset problems |
629 |
export LC_CTYPE=C |
630 |
|
631 |
# setup the filesystem layout config |
632 |
cat ${GENTOO_PATCHDIR}/patches/config.layout >> config.layout |
633 |
sed -i -e 's:version:${PF}:g' config.layout |
634 |
|
635 |
# peruser need to build conf |
636 |
WANT_AUTOCONF=2.5 ./buildconf || die "buildconf failed" |
637 |
} |
638 |
|
639 |
src_compile() { |
640 |
|
641 |
# bug 128505 |
642 |
filter-ldflags -Wl,--as-needed --as-needed |
643 |
|
644 |
# actually we do not provide a very dynamic way of those vars |
645 |
# however, you may predefine them in shell before emerging |
646 |
# to override the official default locations |
647 |
|
648 |
# standard location for Gentoo Linux |
649 |
USERDIR="${USERDIR:-public_html}" |
650 |
|
651 |
einfo "USERDIR is set to: ${USERDIR}" |
652 |
|
653 |
select_mpms |
654 |
|
655 |
# Detect mips and uclibc systems properly |
656 |
gnuconfig_update |
657 |
|
658 |
local modtype |
659 |
if useq static-modules; then |
660 |
modtype="static" |
661 |
else |
662 |
modtype="shared" |
663 |
fi |
664 |
|
665 |
select_modules_config || die "determining modules" |
666 |
|
667 |
local myconf |
668 |
useq ldap && myconf="${myconf} --enable-auth-ldap=${modtype} --enable-ldap=${modtype}" |
669 |
useq ssl && myconf="${myconf} --with-ssl=/usr --enable-ssl=${modtype}" |
670 |
useq ssl || myconf="${myconf} --disable-ssl" |
671 |
|
672 |
# Fix for bug #24215 - robbat2@g.o, 30 Oct 2003 |
673 |
# We pre-load the cache with the correct answer! This avoids |
674 |
# it violating the sandbox. This may have to be changed for |
675 |
# non-Linux systems or if sem_open changes on Linux. This |
676 |
# hack is built around documentation in /usr/include/semaphore.h |
677 |
# and the glibc (pthread) source |
678 |
echo 'ac_cv_func_sem_open=${ac_cv_func_sem_open=no}' >> ${S}/config.cache |
679 |
|
680 |
# no more USE=no-suexec because of bug 148082 |
681 |
# see the 2.2 ebuilds for how this can be done cleanly with a working system |
682 |
# "out of the box" |
683 |
# if useq no-suexec; then |
684 |
# myconf="${myconf} --disable-suexec" |
685 |
# else |
686 |
myconf="${myconf} |
687 |
--with-suexec-safepath="/usr/local/bin:/usr/bin:/bin" \ |
688 |
--with-suexec-logfile=/var/log/apache2/suexec_log \ |
689 |
--with-suexec-bin=/usr/sbin/suexec2 \ |
690 |
--with-suexec-userdir=${USERDIR} \ |
691 |
--with-suexec-caller=apache \ |
692 |
--with-suexec-docroot=/var/www \ |
693 |
--with-suexec-uidmin=1000 \ |
694 |
--with-suexec-gidmin=100 \ |
695 |
--with-suexec-umask=077 \ |
696 |
--enable-suexec=shared" |
697 |
# fi |
698 |
|
699 |
# common confopts |
700 |
myconf="${myconf} \ |
701 |
--with-apr=/usr \ |
702 |
--with-apr-util=/usr \ |
703 |
--cache-file=${S}/config.cache \ |
704 |
--with-perl=/usr/bin/perl \ |
705 |
--with-expat=/usr \ |
706 |
--with-z=/usr \ |
707 |
--with-port=80 \ |
708 |
--enable-layout=Gentoo \ |
709 |
--with-program-name=apache2 \ |
710 |
--with-devrandom=/dev/urandom \ |
711 |
--host=${CHOST} ${MY_BUILTINS}" |
712 |
|
713 |
# debugging support |
714 |
if useq debug ; then |
715 |
myconf="${myconf} --enable-maintainer-mode" |
716 |
fi |
717 |
|
718 |
./configure --with-mpm=${mpm} ${myconf} ${EXTRA_ECONF} || die "bad ./configure please submit bug report to bugs.gentoo.org. Include your config.layout and config.log" |
719 |
|
720 |
# we don't want to try and recompile the ssl_expr_parse.c file, because |
721 |
# the lex source is broken |
722 |
touch modules/ssl/ssl_expr_scan.c |
723 |
|
724 |
# as decided on IRC-AGENDA-10.2004, we use httpd.conf as standard config file name |
725 |
sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h |
726 |
|
727 |
emake || die "problem compiling apache2" |
728 |
|
729 |
# build ssl version of apache bench (ab-ssl) |
730 |
if useq ssl; then |
731 |
cd support |
732 |
rm -f ab .libs/ab ab.lo ab.o |
733 |
make ab CFLAGS="${CFLAGS} -DUSE_SSL -lcrypto -lssl -I/usr/include/openssl -L/usr/$(get_libdir)" || die |
734 |
mv ab ab-ssl |
735 |
rm -f ab.lo ab.o |
736 |
make ab || die |
737 |
fi |
738 |
} |
739 |
|
740 |
src_install () { |
741 |
# general install |
742 |
make DESTDIR=${D} install || die |
743 |
dodoc ABOUT_APACHE CHANGES INSTALL LAYOUT LICENSE README* ${GENTOO_PATCHDIR}/docs/robots.txt |
744 |
|
745 |
# protect the suexec binary |
746 |
# if ! useq no-suexec; then |
747 |
fowners root:apache /usr/sbin/suexec |
748 |
fperms 4710 /usr/sbin/suexec |
749 |
# fi |
750 |
|
751 |
# apxs needs this to pickup the right lib for install |
752 |
dosym /usr/$(get_libdir) /usr/$(get_libdir)/apache2/lib |
753 |
dosym /var/log/apache2 /usr/$(get_libdir)/apache2/logs |
754 |
dosym /etc/apache2 /usr/$(get_libdir)/apache2/conf |
755 |
|
756 |
# Credits to advx.org people for these scripts. Heck, thanks for |
757 |
# the nice layout and everything else ;-) |
758 |
exeinto /usr/sbin |
759 |
for i in apache2logserverstatus apache2splitlogfile; do |
760 |
doexe ${GENTOO_PATCHDIR}/scripts/${i} |
761 |
done |
762 |
# gentestcrt.sh only if USE=ssl |
763 |
useq ssl && doexe ${GENTOO_PATCHDIR}/scripts/gentestcrt.sh |
764 |
|
765 |
# some more scripts |
766 |
for i in split-logfile list_hooks.pl logresolve.pl log_server_status; do |
767 |
doexe ${S}/support/${i} |
768 |
done |
769 |
|
770 |
# the ssl version of apache bench |
771 |
useq ssl && doexe support/ab-ssl |
772 |
|
773 |
# install mpm bins |
774 |
doexe ${S}/apache2 |
775 |
|
776 |
# modules.d config file snippets |
777 |
insinto /etc/apache2/modules.d |
778 |
doins ${GENTOO_PATCHDIR}/conf/modules.d/45_mod_dav.conf |
779 |
useq ldap && doins ${GENTOO_PATCHDIR}/conf/modules.d/46_mod_ldap.conf |
780 |
if useq ssl; then |
781 |
doins ${GENTOO_PATCHDIR}/conf/modules.d/40_mod_ssl.conf |
782 |
doins ${GENTOO_PATCHDIR}/conf/modules.d/41_mod_ssl.default-vhost.conf |
783 |
fi |
784 |
|
785 |
# drop in a convenient link to the manual |
786 |
if useq doc; then |
787 |
insinto /etc/apache2/modules.d |
788 |
doins ${GENTOO_PATCHDIR}/conf/modules.d/00_apache_manual.conf |
789 |
sed -i -e "s:2.0.49:${PVR}:" ${D}/etc/apache2/modules.d/00_apache_manual.conf |
790 |
else |
791 |
rm -rf ${D}/usr/share/doc/${PF}/manual |
792 |
fi |
793 |
|
794 |
# SLOT=2 |
795 |
cd ${D} |
796 |
for i in htdigest htpasswd logresolve apxs ab rotatelogs dbmmanage checkgid split-logfile; do |
797 |
mv -v usr/sbin/${i} usr/sbin/${i}2 |
798 |
done |
799 |
mv -v usr/sbin/apachectl usr/sbin/apache2ctl |
800 |
mv -v usr/sbin/list_hooks.pl usr/sbin/list_hooks2.pl |
801 |
mv -v usr/sbin/logresolve.pl usr/sbin/logresolve2.pl |
802 |
useq ssl && mv -v usr/sbin/ab-ssl usr/sbin/ab2-ssl |
803 |
# useq no-suexec || |
804 |
mv -v usr/sbin/suexec usr/sbin/suexec2 |
805 |
|
806 |
# do the man pages |
807 |
for i in htdigest.1 htpasswd.1 dbmmanage.1; do |
808 |
mv -v usr/share/man/man1/${i} usr/share/man/man1/${i/./2.} |
809 |
done |
810 |
for i in ab.8 apxs.8 logresolve.8 rotatelogs.8; do |
811 |
mv -v usr/share/man/man8/${i} usr/share/man/man8/${i/./2.} |
812 |
done |
813 |
#useq no-suexec || |
814 |
mv -v usr/share/man/man8/suexec.8 usr/share/man/man8/suexec2.8 |
815 |
|
816 |
mv -v usr/share/man/man8/apachectl.8 usr/share/man/man8/apache2ctl.8 |
817 |
mv -v usr/share/man/man8/httpd.8 usr/share/man/man8/apache2.8 |
818 |
|
819 |
# tidy up |
820 |
mv usr/sbin/envvars* usr/$(get_libdir)/apache2/build |
821 |
dodoc etc/apache2/*-std.conf |
822 |
rm -f etc/apache2/*.conf |
823 |
rm -f etc/apache2/mime.types |
824 |
rm -rf var/run var/log |
825 |
|
826 |
# the default webroot gets stored in /usr/share/doc |
827 |
einfo "Installing default webroot to /usr/share/doc/${PF}" |
828 |
mv ${D}/var/www/localhost ${D}/usr/share/doc/${PF}/webroot |
829 |
|
830 |
# config files |
831 |
newconfd ${GENTOO_PATCHDIR}/init/apache2.confd apache2 |
832 |
newinitd ${GENTOO_PATCHDIR}/init/apache2.initd apache2 |
833 |
|
834 |
insinto /etc/logrotate.d |
835 |
newins ${GENTOO_PATCHDIR}/scripts/apache2-logrotate apache2 |
836 |
|
837 |
insinto /etc/apache2 |
838 |
doins ${GENTOO_PATCHDIR}/conf/apache2-builtin-mods |
839 |
doins ${GENTOO_PATCHDIR}/conf/httpd.conf |
840 |
|
841 |
insinto /etc/apache2/vhosts.d |
842 |
doins ${GENTOO_PATCHDIR}/conf/vhosts.d/00_default_vhost.conf |
843 |
|
844 |
keepdir /etc/apache2/vhosts.d |
845 |
keepdir /etc/apache2/modules.d |
846 |
|
847 |
# fix bug 92348 |
848 |
fperms 755 /usr/sbin/apache2logserverstatus |
849 |
fperms 755 /usr/sbin/apache2splitlogfile |
850 |
|
851 |
# empty dirs |
852 |
for i in /var/lib/dav /var/log/apache2 /var/cache/apache2; do |
853 |
keepdir ${i} |
854 |
fowners apache:apache ${i} |
855 |
fperms 755 ${i} |
856 |
done |
857 |
|
858 |
# We'll be needing /etc/apache2/ssl if USE=ssl |
859 |
useq ssl && keepdir /etc/apache2/ssl |
860 |
|
861 |
} |
862 |
|
863 |
pkg_postinst() { |
864 |
# Automatically generate test ceritificates if ssl USE flag is being set |
865 |
if useq ssl -a !-e ${ROOT}/etc/apache2/ssl/server.crt; then |
866 |
cd ${ROOT}/etc/apache2/ssl |
867 |
einfo |
868 |
einfo "Generating self-signed test certificate in /etc/apache2/ssl..." |
869 |
yes "" 2>/dev/null | \ |
870 |
${ROOT}/usr/sbin/gentestcrt.sh >/dev/null 2>&1 || \ |
871 |
die "gentestcrt.sh failed" |
872 |
einfo |
873 |
fi |
874 |
|
875 |
# we do this here because the default webroot is a copy of the files |
876 |
# that exist elsewhere and we don't want them managed/removed by portage |
877 |
# when apache is upgraded. |
878 |
if [ -e "${ROOT}/var/www/localhost" ]; then |
879 |
einfo "The default webroot has not been installed into" |
880 |
einfo "${ROOT}/var/www/localhost because the directory already exists" |
881 |
einfo "and we do not want to overwrite any files you have put there." |
882 |
einfo |
883 |
einfo "If you would like to install the latest webroot, please run" |
884 |
einfo "emerge --config =${PF}" |
885 |
else |
886 |
einfo "Installing default webroot to ${ROOT}/var/www/localhost" |
887 |
mkdir -p ${ROOT}/var/www/localhost |
888 |
cp -r ${ROOT}/usr/share/doc/${PF}/webroot/* ${ROOT}/var/www/localhost |
889 |
chown -R apache: ${ROOT}/var/www/localhost |
890 |
fi |
891 |
|
892 |
# Check for dual/upgrade install |
893 |
if has_version '=www-servers/apache-1*' || ! use apache2 ; then |
894 |
ewarn |
895 |
ewarn "Please add the 'apache2' flag to your USE variable and (re)install" |
896 |
ewarn "any additional DSO modules you may wish to use with Apache-2.x." |
897 |
ewarn "Addon modules are configured in /etc/apache2/modules.d/" |
898 |
ewarn |
899 |
fi |
900 |
|
901 |
# Check for obsolete symlinks |
902 |
local list="" |
903 |
for i in lib logs modules extramodules; do |
904 |
local d="/etc/apache2/${i}" |
905 |
[ -s "${d}" ] && list="${list} ${d}" |
906 |
done |
907 |
[ -n "${list}" ] && einfo "You should delete these old symlinks: ${list}" |
908 |
|
909 |
if has_version '<www-servers/apache-2.0.54-r30' && has_version '>=www-servers/apache-2.0.0' ; then |
910 |
einfo "Configuration locations have changed, you will need to migrate" |
911 |
einfo "your configuration from /etc/apache2/conf/apache2.conf and" |
912 |
einfo "/etc/apache2/conf/commonapache2.conf to /etc/apache2/httpd.conf." |
913 |
einfo |
914 |
einfo "Apache now checks for the old configuration and refuses to start" |
915 |
einfo "if it exists. You must remove the old configuration first" |
916 |
einfo |
917 |
einfo "You should also at this time rebuild all your modules" |
918 |
einfo |
919 |
einfo "For more information, see" |
920 |
einfo " http://www.gentoo.org/doc/en/apache-upgrading.xml" |
921 |
einfo |
922 |
fi |
923 |
|
924 |
big_fat_warnings |
925 |
} |
926 |
|
927 |
pkg_config() { |
928 |
|
929 |
einfo "Installing default webroot to ${ROOT}/var/www/localhost" |
930 |
mkdir -p ${ROOT}/var/www/localhost |
931 |
cp -r ${ROOT}/usr/share/doc/${PF}/webroot/* ${ROOT}/var/www/localhost |
932 |
chown -R apache: ${ROOT}/var/www/localhost |
933 |
|
934 |
} |
935 |
|
936 |
mpm_die() { |
937 |
eerror "You attempted to specify the MPM $1, but MPM $2 was already specified." |
938 |
eerror "The apache ebuilds no longer support multiple MPM installations. Please choose" |
939 |
eerror "one MPM and reinstall." |
940 |
die "More than one MPM was specified." |
941 |
} |
942 |
|
943 |
select_mpms() { |
944 |
|
945 |
mpm="" |
946 |
|
947 |
for trympm in prefork worker peruser threadpool leader itk; do |
948 |
if useq mpm-${trympm}; then |
949 |
if [ "x${mpm}" = "x" ]; then |
950 |
mpm=${trympm} |
951 |
else |
952 |
mpm_die ${trympm} ${mpm} |
953 |
fi |
954 |
fi |
955 |
done |
956 |
|
957 |
if [ "x${mpm}" = "x" ]; then |
958 |
if useq threads; then |
959 |
einfo "Threads specified without a mpm-specification, using mpm-worker." |
960 |
mpm="worker" |
961 |
else |
962 |
einfo "No MPM style was specified, defaulting to mpm-prefork." |
963 |
mpm="prefork" |
964 |
fi |
965 |
fi |
966 |
|
967 |
} |
968 |
|
969 |
parse_modules_config() { |
970 |
local name="" |
971 |
local disable="" |
972 |
[ -f ${1} ] || return 1 |
973 |
|
974 |
for i in `cat $1 | sed "s/^#.*//"`; do |
975 |
if [ $i == "-" ]; then |
976 |
disable="true" |
977 |
elif [ -z "$name" ] && [ ! -z "`echo $i | grep "mod_"`" ]; then |
978 |
name=`echo $i | sed "s/mod_//"` |
979 |
elif [ "$disable" ] && ( [ $i == "static" ] || [ $i == "shared" ] ); then |
980 |
MY_BUILTINS="${MY_BUILTINS} --disable-$name" |
981 |
name="" ; disable="" |
982 |
elif [ $i == "static" ] || useq static-modules; then |
983 |
MY_BUILTINS="${MY_BUILTINS} --enable-$name=yes" |
984 |
name="" ; disable="" |
985 |
elif [ $i == "shared" ]; then |
986 |
MY_BUILTINS="${MY_BUILTINS} --enable-$name=shared" |
987 |
name="" ; disable="" |
988 |
fi |
989 |
done |
990 |
|
991 |
einfo "${1} options:\n${MY_BUILTINS}" |
992 |
} |
993 |
|
994 |
select_modules_config() { |
995 |
parse_modules_config /etc/apache2/apache2-builtin-mods || \ |
996 |
parse_modules_config ${GENTOO_PATCHDIR}/conf/apache2-builtin-mods || \ |
997 |
return 1 |
998 |
} |
999 |
|
1000 |
# vim:ts=4 |
1001 |
|
1002 |
|
1003 |
|
1004 |
-- |
1005 |
gentoo-commits@g.o mailing list |