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