1 |
hollow 07/10/20 17:15:21 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: apache-2.2.6-r2.ebuild |
5 |
Log: |
6 |
fix #82311, #193492, #194415, #194546, #194828, #195792 |
7 |
(Portage version: 2.1.3.13) |
8 |
|
9 |
Revision Changes Path |
10 |
1.33 www-servers/apache/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/ChangeLog?rev=1.33&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/ChangeLog?rev=1.33&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/ChangeLog?r1=1.32&r2=1.33 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/apache/ChangeLog,v |
19 |
retrieving revision 1.32 |
20 |
retrieving revision 1.33 |
21 |
diff -u -r1.32 -r1.33 |
22 |
--- ChangeLog 25 Sep 2007 14:31:47 -0000 1.32 |
23 |
+++ ChangeLog 20 Oct 2007 17:15:21 -0000 1.33 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for www-servers/apache |
26 |
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/apache/ChangeLog,v 1.32 2007/09/25 14:31:47 armin76 Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/apache/ChangeLog,v 1.33 2007/10/20 17:15:21 hollow Exp $ |
29 |
+ |
30 |
+*apache-2.2.6-r2 (20 Oct 2007) |
31 |
+ |
32 |
+ 20 Oct 2007; Benedikt Böhm <hollow@g.o> +apache-2.2.6-r2.ebuild: |
33 |
+ fix #82311, #193492, #194415, #194546, #194828, #195792 |
34 |
|
35 |
25 Sep 2007; Raúl Porcel <armin76@g.o> apache-2.0.59-r5.ebuild, |
36 |
apache-2.2.6.ebuild: |
37 |
|
38 |
|
39 |
|
40 |
1.1 www-servers/apache/apache-2.2.6-r2.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/apache-2.2.6-r2.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/apache/apache-2.2.6-r2.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: apache-2.2.6-r2.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2007 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/apache/apache-2.2.6-r2.ebuild,v 1.1 2007/10/20 17:15:21 hollow Exp $ |
50 |
|
51 |
inherit eutils flag-o-matic multilib autotools |
52 |
|
53 |
# latest gentoo apache files |
54 |
GENTOO_PATCHNAME="gentoo-${PF}" |
55 |
GENTOO_PATCHSTAMP="20071020" |
56 |
GENTOO_DEVSPACE="hollow" |
57 |
GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}" |
58 |
|
59 |
DESCRIPTION="The Apache Web Server." |
60 |
HOMEPAGE="http://httpd.apache.org/" |
61 |
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2 |
62 |
http://dev.gentoo.org/~${GENTOO_DEVSPACE}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2" |
63 |
|
64 |
# some helper scripts are apache-1.1, thus both are here |
65 |
LICENSE="Apache-2.0 Apache-1.1" |
66 |
SLOT="2" |
67 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
68 |
IUSE="debug doc ldap mpm-event mpm-itk mpm-peruser mpm-prefork mpm-worker no-suexec selinux ssl static-modules threads" |
69 |
|
70 |
DEPEND="dev-lang/perl |
71 |
=dev-libs/apr-1* |
72 |
=dev-libs/apr-util-1* |
73 |
dev-libs/expat |
74 |
dev-libs/libpcre |
75 |
sys-libs/zlib |
76 |
ldap? ( =net-nds/openldap-2* ) |
77 |
selinux? ( sec-policy/selinux-apache ) |
78 |
ssl? ( dev-libs/openssl ) |
79 |
!=www-servers/apache-1* |
80 |
!=app-admin/apache-tools-2.2.4-r2" |
81 |
|
82 |
RDEPEND="${DEPEND} |
83 |
app-misc/mime-types" |
84 |
|
85 |
PDEPEND="~app-admin/apache-tools-${PV}" |
86 |
|
87 |
S="${WORKDIR}/httpd-${PV}" |
88 |
|
89 |
pkg_setup() { |
90 |
if use ldap && ! built_with_use 'dev-libs/apr-util' ldap ; then |
91 |
eerror "dev-libs/apr-util is missing LDAP support. For apache to have" |
92 |
eerror "ldap support, apr-util must be built with the ldap USE-flag" |
93 |
eerror "enabled." |
94 |
die "ldap USE-flag enabled while not supported in apr-util" |
95 |
fi |
96 |
|
97 |
# Select the default MPM module |
98 |
MPM_LIST="event itk peruser prefork worker" |
99 |
for x in ${MPM_LIST} ; do |
100 |
if use mpm-${x} ; then |
101 |
if [[ "x${mpm}" == "x" ]] ; then |
102 |
mpm=${x} |
103 |
elog |
104 |
elog "Selected MPM: ${mpm}" |
105 |
elog |
106 |
else |
107 |
eerror "You have selected more then one mpm USE-flag." |
108 |
eerror "Only one MPM is supported." |
109 |
die "more then one mpm was specified" |
110 |
fi |
111 |
fi |
112 |
done |
113 |
|
114 |
if [[ "x${mpm}" == "x" ]] ; then |
115 |
if use threads ; then |
116 |
mpm=worker |
117 |
elog |
118 |
elog "Selected default threaded MPM: ${mpm}"; |
119 |
elog |
120 |
else |
121 |
mpm=prefork |
122 |
elog |
123 |
elog "Selected default MPM: ${mpm}"; |
124 |
elog |
125 |
fi |
126 |
fi |
127 |
|
128 |
# setup apache user and group |
129 |
enewgroup apache 81 |
130 |
enewuser apache 81 -1 /var/www apache |
131 |
|
132 |
if ! use no-suexec ; then |
133 |
elog |
134 |
elog "You can manipulate several configure options of suexec" |
135 |
elog "through the following environment variables:" |
136 |
elog |
137 |
elog " SUEXEC_SAFEPATH: Default PATH for suexec (default: /usr/local/bin:/usr/bin:/bin)" |
138 |
elog " SUEXEC_LOGFILE: Path to the suexec logfile (default: /var/log/apache2/suexec_log)" |
139 |
elog " SUEXEC_CALLER: Name of the user Apache is running as (default: apache)" |
140 |
elog " SUEXEC_DOCROOT: Directory in which suexec will run scripts (default: /var/www)" |
141 |
elog " SUEXEC_MINUID: Minimum UID, which is allowed to run scripts via suexec (default: 1000)" |
142 |
elog " SUEXEC_MINGID: Minimum GID, which is allowed to run scripts via suexec (default: 100)" |
143 |
elog " SUEXEC_USERDIR: User subdirectories (like /home/user/html) (default: public_html)" |
144 |
elog " SUEXEC_UMASK: Umask for the suexec process (default: 077)" |
145 |
elog |
146 |
fi |
147 |
} |
148 |
|
149 |
src_unpack() { |
150 |
unpack ${A} |
151 |
cd "${S}" |
152 |
|
153 |
# Use correct multilib libdir in gentoo patches |
154 |
sed -i -e "s:/usr/lib:/usr/$(get_libdir):g" \ |
155 |
"${GENTOO_PATCHDIR}"/{conf/httpd.conf,init/*,patches/config.layout} \ |
156 |
|| die "libdir sed failed" |
157 |
|
158 |
#### Patch Organization |
159 |
# 00-19 Gentoo specific (00_all_some-title.patch) |
160 |
# 20-39 Additional MPMs (20_all_${MPM}_some-title.patch) |
161 |
# 40-59 USE-flag based (40_all_${USE}_some-title.patch) |
162 |
# 60-79 Version specific (60_all_${PV}_some-title.patch) |
163 |
# 80-99 Security patches (80_all_${PV}_cve-####-####.patch) |
164 |
|
165 |
epatch "${GENTOO_PATCHDIR}"/patches/*.patch |
166 |
|
167 |
# setup the filesystem layout config |
168 |
cat "${GENTOO_PATCHDIR}"/patches/config.layout >> "${S}"/config.layout || \ |
169 |
die "Failed preparing config.layout!" |
170 |
sed -i -e "s:version:${PF}:g" "${S}"/config.layout |
171 |
|
172 |
# patched-in MPMs need the build environment rebuilt |
173 |
sed -i -e '/sinclude/d' configure.in |
174 |
AT_GNUCONF_UPDATE=yes AT_M4DIR=build eautoreconf |
175 |
|
176 |
# apache2.8 instead of httpd.8 (bug #194828) |
177 |
mv docs/man/{httpd,apache2}.8 |
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 || use mpm-worker || use mpm-event; 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 |
if use debug; then |
213 |
myconf="${myconf} --enable-maintainer-mode --enable-exception-hook" |
214 |
fi |
215 |
|
216 |
# Only build suexec with USE=-no-suexec |
217 |
if use no-suexec ; then |
218 |
myconf="${myconf} --disable-suexec" |
219 |
else |
220 |
myconf="${myconf} --with-suexec-safepath=${SUEXEC_SAFEPATH:-/usr/local/bin:/usr/bin:/bin}" |
221 |
myconf="${myconf} --with-suexec-logfile=${SUEXEC_LOGFILE:-/var/log/apache2/suexec_log}" |
222 |
myconf="${myconf} --with-suexec-bin=/usr/sbin/suexec" |
223 |
myconf="${myconf} --with-suexec-userdir=${SUEXEC_USERDIR:-public_html}" |
224 |
myconf="${myconf} --with-suexec-caller=${SUEXEC_CALLER:-apache}" |
225 |
myconf="${myconf} --with-suexec-docroot=${SUEXEC_DOCROOT:-/var/www}" |
226 |
myconf="${myconf} --with-suexec-uidmin=${SUEXEC_MINUID:-1000}" |
227 |
myconf="${myconf} --with-suexec-gidmin=${SUEXEC_MINGID:-100}" |
228 |
myconf="${myconf} --with-suexec-umask=${SUEXEC_UMASK:-077}" |
229 |
myconf="${myconf} --enable-suexec=${modtype}" |
230 |
mods="${mods} suexec" |
231 |
fi |
232 |
|
233 |
# econf overwrites the stuff from config.layout, so we have to put them into |
234 |
# our myconf line too |
235 |
|
236 |
econf \ |
237 |
--includedir=/usr/include/apache2 \ |
238 |
--libexecdir=/usr/$(get_libdir)/apache2/modules \ |
239 |
--datadir=/var/www/localhost \ |
240 |
--sysconfdir=/etc/apache2 \ |
241 |
--localstatedir=/var \ |
242 |
--with-mpm=${mpm} \ |
243 |
--with-perl=/usr/bin/perl \ |
244 |
--with-expat=/usr \ |
245 |
--with-z=/usr \ |
246 |
--with-apr=/usr \ |
247 |
--with-apr-util=/usr \ |
248 |
--with-pcre=/usr \ |
249 |
--with-port=80 \ |
250 |
--with-program-name=apache2 \ |
251 |
--enable-layout=Gentoo \ |
252 |
${myconf} ${MY_BUILTINS} || die "econf failed!" |
253 |
|
254 |
sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h |
255 |
|
256 |
emake || die "emake failed" |
257 |
} |
258 |
|
259 |
src_install () { |
260 |
emake DESTDIR="${D}" install || die "emake install failed" |
261 |
|
262 |
# This is a mapping of module names to the -D options in APACHE2_OPTS |
263 |
# Used for creating optional LoadModule lines |
264 |
mod_defines=" |
265 |
auth_digest:AUTH_DIGEST |
266 |
authnz_ldap:AUTHNZ_LDAP |
267 |
cache:CACHE |
268 |
dav:DAV |
269 |
dav_fs:DAV |
270 |
dav_lock:DAV |
271 |
disk_cache:CACHE |
272 |
file_cache:CACHE |
273 |
info:INFO |
274 |
ldap:LDAP |
275 |
mem_cache:CACHE |
276 |
proxy:PROXY |
277 |
proxy_ajp:PROXY |
278 |
proxy_balancer:PROXY |
279 |
proxy_connect:PROXY |
280 |
proxy_http:PROXY |
281 |
ssl:SSL |
282 |
status:INFO |
283 |
suexec:SUEXEC |
284 |
userdir:USERDIR |
285 |
" |
286 |
|
287 |
# create our LoadModule lines |
288 |
if ! use static-modules ; then |
289 |
load_module="" |
290 |
moddir="${D}/usr/$(get_libdir)/apache2/modules" |
291 |
for m in $(echo ${mods}|tr ' ' '\n'|sort -u) ; do |
292 |
endid="no" |
293 |
|
294 |
if [[ -e "${moddir}/mod_${m}.so" ]] ; then |
295 |
for def in ${mod_defines} ; do |
296 |
if [[ "${m}" == "${def%:*}" ]] ; then |
297 |
load_module="${load_module}\n<IfDefine ${def#*:}>" |
298 |
endid="yes" |
299 |
fi |
300 |
done |
301 |
load_module="${load_module}\nLoadModule ${m}_module modules/mod_${m}.so" |
302 |
if [[ "${endid}" == "yes" ]] ; then |
303 |
load_module="${load_module}\n</IfDefine>" |
304 |
fi |
305 |
fi |
306 |
done |
307 |
fi |
308 |
sed -i -e "s:%%LOAD_MODULE%%:${load_module}:" \ |
309 |
"${GENTOO_PATCHDIR}"/conf/httpd.conf || die "sed failed" |
310 |
|
311 |
# Install our configuration files |
312 |
insinto /etc/apache2 |
313 |
doins docs/conf/magic |
314 |
doins -r "${GENTOO_PATCHDIR}"/conf/* |
315 |
insinto /etc/logrotate.d |
316 |
newins "${GENTOO_PATCHDIR}"/scripts/apache2-logrotate apache2 |
317 |
|
318 |
# generate a sane default APACHE2_OPTS |
319 |
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE" |
320 |
use doc && APACHE2_OPTS="${APACHE2_OPTS} -D MANUAL" |
321 |
use ssl && APACHE2_OPTS="${APACHE2_OPTS} -D SSL -D SSL_DEFAULT_VHOST" |
322 |
use no-suexec || APACHE2_OPTS="${APACHE2_OPTS} -D SUEXEC" |
323 |
|
324 |
sed -i -e "s:APACHE2_OPTS=\".*\":APACHE2_OPTS=\"${APACHE2_OPTS}\":" \ |
325 |
"${GENTOO_PATCHDIR}"/init/apache2.confd || die "sed failed" |
326 |
|
327 |
newconfd "${GENTOO_PATCHDIR}"/init/apache2.confd apache2 |
328 |
newinitd "${GENTOO_PATCHDIR}"/init/apache2.initd apache2 |
329 |
|
330 |
# Link apache2ctl to the init script |
331 |
dosym /etc/init.d/apache2 /usr/sbin/apache2ctl |
332 |
|
333 |
# provide symlinks for all the stuff we no longer rename, bug 177697 |
334 |
for i in suexec apxs; do |
335 |
dosym /usr/sbin/${i} /usr/sbin/${i}2 |
336 |
done |
337 |
|
338 |
# Install some thirdparty scripts |
339 |
exeinto /usr/sbin |
340 |
use ssl && doexe "${GENTOO_PATCHDIR}"/scripts/gentestcrt.sh |
341 |
|
342 |
# Install some documentation |
343 |
dodoc ABOUT_APACHE CHANGES LAYOUT README README.platforms VERSIONING |
344 |
dodoc "${GENTOO_PATCHDIR}"/docs/* |
345 |
|
346 |
# drop in a convenient link to the manual |
347 |
if use doc ; then |
348 |
sed -i -e "s:VERSION:${PVR}:" "${D}/etc/apache2/modules.d/00_apache_manual.conf" |
349 |
else |
350 |
rm -f "${D}/etc/apache2/modules.d/00_apache_manual.conf" |
351 |
rm -Rf "${D}/usr/share/doc/${PF}/manual" |
352 |
fi |
353 |
|
354 |
# the default webroot gets stored in /usr/share/doc |
355 |
ebegin "Installing default webroot to /usr/share/doc/${PF}" |
356 |
mv -f "${D}/var/www/localhost" "${D}/usr/share/doc/${PF}/webroot" |
357 |
eend $? |
358 |
keepdir /var/www/localhost/htdocs |
359 |
|
360 |
if ! use no-suexec ; then |
361 |
# Set some sane permissions for suexec |
362 |
fowners 0:apache /usr/sbin/suexec |
363 |
fperms 4710 /usr/sbin/suexec |
364 |
fi |
365 |
|
366 |
keepdir /etc/apache2/vhosts.d |
367 |
keepdir /etc/apache2/modules.d |
368 |
|
369 |
# empty dirs |
370 |
for i in /var/lib/dav /var/log/apache2 /var/cache/apache2 ; do |
371 |
keepdir ${i} |
372 |
fowners apache:apache ${i} |
373 |
fperms 0755 ${i} |
374 |
done |
375 |
|
376 |
# We'll be needing /etc/apache2/ssl if USE=ssl |
377 |
use ssl && keepdir /etc/apache2/ssl |
378 |
} |
379 |
|
380 |
pkg_postinst() { |
381 |
# Automatically generate test certificates if ssl USE flag is being set |
382 |
if use ssl && [[ ! -e "${ROOT}/etc/apache2/ssl/server.crt" ]] ; then |
383 |
cd "${ROOT}"/etc/apache2/ssl |
384 |
einfo |
385 |
einfo "Generating self-signed test certificate in ${ROOT}etc/apache2/ssl ..." |
386 |
yes "" 2>/dev/null | \ |
387 |
"${ROOT}"/usr/sbin/gentestcrt.sh >/dev/null 2>&1 || \ |
388 |
die "gentestcrt.sh failed" |
389 |
einfo |
390 |
fi |
391 |
|
392 |
# we do this here because the default webroot is a copy of the files |
393 |
# that exist elsewhere and we don't want them managed/removed by portage |
394 |
# when apache is upgraded. |
395 |
|
396 |
if [[ -e "${ROOT}/var/www/localhost" ]] ; then |
397 |
elog "The default webroot has not been installed into" |
398 |
elog "${ROOT}var/www/localhost because the directory already exists" |
399 |
elog "and we do not want to overwrite any files you have put there." |
400 |
elog |
401 |
elog "If you would like to install the latest webroot, please run" |
402 |
elog "emerge --config =${PF}" |
403 |
else |
404 |
einfo "Installing default webroot to ${ROOT}var/www/localhost" |
405 |
mkdir -p "${ROOT}"/var/www/localhost |
406 |
cp -R "${ROOT}"/usr/share/doc/${PF}/webroot/* "${ROOT}"/var/www/localhost |
407 |
chown -R apache:0 "${ROOT}"/var/www/localhost |
408 |
fi |
409 |
|
410 |
# Previous installations of apache-2.2 installed the upstream configuration |
411 |
# files, which shouldn't even have been installed! |
412 |
if has_version '>=www-servers/apache-2.2.4' ; then |
413 |
[ -f "${ROOT}"/etc/apache2/apache2.conf ] && \ |
414 |
rm -f "${ROOT}"/etc/apache2/apache2.conf >/dev/null 2>&1 |
415 |
|
416 |
for i in extra original ; do |
417 |
[ -d "${ROOT}"/etc/apache2/$i ] && \ |
418 |
rm -rf "${ROOT}"/etc/apache2/$i >/dev/null 2>&1 |
419 |
done |
420 |
fi |
421 |
|
422 |
# Note regarding IfDefine changes |
423 |
if has_version '<www-servers/apache-2.2.6-r1' ; then |
424 |
elog |
425 |
elog "When upgrading from versions 2.2.6 or earlier, please be aware" |
426 |
elog "that the define for mod_authnz_ldap has changed from AUTH_LDAP" |
427 |
elog "to AUTHNZ_LDAP. Additionally mod_auth_digest needs to be enabled" |
428 |
elog "with AUTH_DIGEST now." |
429 |
elog |
430 |
fi |
431 |
|
432 |
# Note the changes regarding DEFAULT_VHOST and SSL_DEFAULT_VHOST |
433 |
if has_version '<www-servers/apache-2.2.4-r7' ; then |
434 |
elog |
435 |
elog "Listen directives have been moved into the default virtual host" |
436 |
elog "configuation. At least DEFAULT_VHOST has been enabled for you" |
437 |
elog "(depending on your USE-flags." |
438 |
elog |
439 |
elog "If you disable DEFAULT_VHOST or SSL_DEFAULT_VHOST, there would" |
440 |
elog "be no listening sockets available." |
441 |
elog |
442 |
fi |
443 |
|
444 |
# Note the user of the config changes |
445 |
if has_version '<www-servers/apache-2.2.4-r5' ; then |
446 |
elog |
447 |
elog "Please make sure that you update your /etc directory." |
448 |
elog "Between the versions, we had to changes some config files" |
449 |
elog "and move some stuff out of the main httpd.conf file to a seperate" |
450 |
elog "modules.d entry." |
451 |
elog |
452 |
elog "Thus please update your /etc directory either via etc-update," |
453 |
elog "dispatch-conf or conf-update !" |
454 |
elog |
455 |
fi |
456 |
|
457 |
# Check for dual/upgrade install |
458 |
if has_version '<www-servers/apache-2.2.0' ; then |
459 |
elog |
460 |
elog "When upgrading from versions below 2.2.0 to this version, you" |
461 |
elog "need to rebuild all your modules. Please do so for your modules" |
462 |
elog "to continue working correctly." |
463 |
elog |
464 |
elog "Also note that some configuration directives have been" |
465 |
elog "split into their own files under ${ROOT}etc/apache2/modules.d/" |
466 |
elog "and that some modules, foremost the authentication related ones," |
467 |
elog "have been renamed." |
468 |
elog |
469 |
elog "Some examples:" |
470 |
elog " - USERDIR is now configureable in ${ROOT}etc/apache2/modules.d/00_mod_userdir.conf." |
471 |
elog |
472 |
elog "For more information on what you may need to change, please" |
473 |
elog "see the overview of changes at:" |
474 |
elog "http://httpd.apache.org/docs/2.2/new_features_2_2.html" |
475 |
elog "and the upgrading guide at:" |
476 |
elog "http://httpd.apache.org/docs/2.2/upgrading.html" |
477 |
elog |
478 |
fi |
479 |
|
480 |
# Cleanup the vim backup files, placed in /etc/apache2 by the last |
481 |
# patchtarball (gentoo-apache-2.2.4-r7-20070615) |
482 |
rm -f "${ROOT}/etc/apache2/modules.d/*.conf~" |
483 |
} |
484 |
|
485 |
pkg_config() { |
486 |
einfo "Installing default webroot to ${ROOT}var/www/localhost" |
487 |
mkdir "${ROOT}"var{,/www{,/localhost}} |
488 |
cp -R "${ROOT}"usr/share/doc/${PF}/webroot/* "${ROOT}"var/www/localhost/ |
489 |
} |
490 |
|
491 |
parse_modules_config() { |
492 |
local name="" |
493 |
local disable="" |
494 |
local version="undef" |
495 |
MY_BUILTINS="" |
496 |
mods="" |
497 |
[[ -f "${1}" ]] || return 1 |
498 |
|
499 |
for i in $(sed 's/#.*//' < $1) ; do |
500 |
if [[ "$i" == "VERSION:" ]] ; then |
501 |
version="select" |
502 |
elif [[ "${version}" == "select" ]] ; then |
503 |
version="$i" |
504 |
# start with - option for backwards compatibility only |
505 |
elif [[ "$i" == "-" ]] ; then |
506 |
disable="true" |
507 |
elif [[ -z "${name}" ]] && [[ "$i" != "${i/mod_/}" ]] ; then |
508 |
name="${i/mod_/}" |
509 |
elif [[ -n "${disable}" ]] || [[ "$i" == "disabled" ]] ; then |
510 |
MY_BUILTINS="${MY_BUILTINS} --disable-${name}" |
511 |
name="" ; disable="" |
512 |
elif [[ "$i" == "static" ]] || use static-modules ; then |
513 |
MY_BUILTINS="${MY_BUILTINS} --enable-${name}=static" |
514 |
name="" ; disable="" |
515 |
elif [[ "$i" == "shared" ]] ; then |
516 |
MY_BUILTINS="${MY_BUILTINS} --enable-${name}=shared" |
517 |
mods="${mods} ${name}" |
518 |
name="" ; disable="" |
519 |
else |
520 |
ewarn "Parse error in ${1} - unknown option: $i" |
521 |
fi |
522 |
done |
523 |
|
524 |
# reject the file if it's unversioned or doesn't match our |
525 |
# package major.minor. This is to make upgrading work smoothly. |
526 |
if [[ "${version}" != "${PV%.*}" ]] ; then |
527 |
mods="" |
528 |
MY_BUILTINS="" |
529 |
return 1 |
530 |
fi |
531 |
|
532 |
einfo "Using ${1}" |
533 |
einfo "options: ${MY_BUILTINS}" |
534 |
einfo "LoadModules: ${mods}" |
535 |
} |
536 |
|
537 |
select_modules_config() { |
538 |
parse_modules_config "${ROOT}"/etc/apache2/apache2-builtin-mods || \ |
539 |
parse_modules_config "${GENTOO_PATCHDIR}"/conf/apache2-builtin-mods || \ |
540 |
return 1 |
541 |
} |
542 |
|
543 |
|
544 |
|
545 |
-- |
546 |
gentoo-commits@g.o mailing list |