Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/apache/
Date: Thu, 29 Apr 2021 09:20:51
Message-Id: 1619688040.982d649964e0a10974d1fdf4f0fe0cc7c62a7f38.polynomial-c@gentoo
1 commit: 982d649964e0a10974d1fdf4f0fe0cc7c62a7f38
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 29 09:19:31 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 29 09:20:40 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=982d6499
7
8 www-servers/apache: Bump to version 2.4.47
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 www-servers/apache/Manifest | 1 +
13 www-servers/apache/apache-2.4.47.ebuild | 257 ++++++++++++++++++++++++++++++++
14 2 files changed, 258 insertions(+)
15
16 diff --git a/www-servers/apache/Manifest b/www-servers/apache/Manifest
17 index 73ede662d01..9fa74a1081b 100644
18 --- a/www-servers/apache/Manifest
19 +++ b/www-servers/apache/Manifest
20 @@ -2,3 +2,4 @@ DIST gentoo-apache-2.4.39-20190402.tar.bz2 25491 BLAKE2B ce230b07ec156048c7d7c1e
21 DIST gentoo-apache-2.4.46-r4-20201230.tar.bz2 25821 BLAKE2B 3f83b48aa36fa8b9adc75a2cbeaadddad8fb0d69d1602753e0a1978cd6136b1dbf15ad06a837f36c26244e3950bae3ecdfbcdd7668a4d2fc4f0d9f58a909e5b7 SHA512 cea71f3e40ac1409206d906df36c772d7985a79a9e713a3016a9fae67dad032e24ce124789089a4b92454bc98455a70c66515106c8f3c33e05aeaf3037ffabe8
22 DIST gentoo-apache-2.4.46-r6-20210212.tar.bz2 25854 BLAKE2B 001f16c1beac8c90fd407bb2f77417f886296baf02acf0f6d81dc0f10c209270db7005f58d845d309dec8332773556da88db41a57c6ecc86f24b8a5141ba07d0 SHA512 976dde952277542efca70831b67da32b8bf636a346adeeb6e0bc5a65b3543a7ca4fb182bc01204f747b583dd753607d184d91ef46a93d5e2f3ab55ed787860a2
23 DIST httpd-2.4.46.tar.bz2 7187805 BLAKE2B 2cd8a40be0b7b60ae5b06a286aa6dd801b8615fd0483a4653ceea6f9832c9ebb111f67ba4f69827b01acd1e5552e70ac0441df49573c9da0ca26d4c2f589f0bc SHA512 5936784bb662e9d8a4f7fe38b70c043b468114d931cd10ea831bfe74461ea5856b64f88f42c567ab791fc8907640a99884ba4b6a600f86d661781812735b6f13
24 +DIST httpd-2.4.47.tar.bz2 7187445 BLAKE2B ba5b6ebac73aaa6f2f0d7a34d5bf9d13bd4ac862ee9d04b105c315c3aad16401b842b6901424dba6a44a0b5d255c0356e0bf72b5d1898b4b091b12192c204c96 SHA512 ac05e878604037572b484c32c767e022bf027e5efa2a2ed28472939d9f536448f1536ede4d809f1e913a29a0247bdd27981bd00d3d8614f978573c14bce7c7af
25
26 diff --git a/www-servers/apache/apache-2.4.47.ebuild b/www-servers/apache/apache-2.4.47.ebuild
27 new file mode 100644
28 index 00000000000..c4b85183a2b
29 --- /dev/null
30 +++ b/www-servers/apache/apache-2.4.47.ebuild
31 @@ -0,0 +1,257 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +# latest gentoo apache files
38 +GENTOO_PATCHSTAMP="20210212"
39 +GENTOO_DEVELOPER="polynomial-c"
40 +GENTOO_PATCHNAME="gentoo-apache-2.4.46-r6"
41 +
42 +# IUSE/USE_EXPAND magic
43 +IUSE_MPMS_FORK="prefork"
44 +IUSE_MPMS_THREAD="event worker"
45 +
46 +# << obsolete modules:
47 +# authn_default authz_default mem_cache
48 +# mem_cache is replaced by cache_disk
49 +# ?? buggy modules
50 +# proxy_scgi: startup error: undefined symbol "ap_proxy_release_connection", no fix found
51 +# >> added modules for reason:
52 +# compat: compatibility with 2.2 access control
53 +# authz_host: new module for access control
54 +# authn_core: functionality provided by authn_alias in previous versions
55 +# authz_core: new module, provides core authorization capabilities
56 +# cache_disk: replacement for mem_cache
57 +# lbmethod_byrequests: Split off from mod_proxy_balancer in 2.3
58 +# lbmethod_bytraffic: Split off from mod_proxy_balancer in 2.3
59 +# lbmethod_bybusyness: Split off from mod_proxy_balancer in 2.3
60 +# lbmethod_heartbeat: Split off from mod_proxy_balancer in 2.3
61 +# slotmem_shm: Slot-based shared memory provider (for lbmethod_byrequests).
62 +# socache_shmcb: shared object cache provider. Default config with ssl needs it
63 +# unixd: fixes startup error: Invalid command 'User'
64 +IUSE_MODULES="access_compat actions alias asis auth_basic auth_digest auth_form
65 +authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authn_socache authz_core
66 +authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex
67 +brotli cache cache_disk cache_socache cern_meta charset_lite cgi cgid dav dav_fs dav_lock
68 +dbd deflate dir dumpio env expires ext_filter file_cache filter headers http2
69 +ident imagemap include info lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness
70 +lbmethod_heartbeat log_config log_forensic logio lua macro md mime mime_magic negotiation
71 +proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_html proxy_http proxy_scgi
72 +proxy_http2 proxy_fcgi proxy_wstunnel rewrite ratelimit remoteip reqtimeout
73 +session session_cookie session_crypto session_dbd setenvif slotmem_shm speling
74 +socache_memcache socache_shmcb status substitute unique_id userdir usertrack
75 +unixd version vhost_alias watchdog xml2enc"
76 +# The following are also in the source as of this version, but are not available
77 +# for user selection:
78 +# bucketeer case_filter case_filter_in echo http isapi optional_fn_export
79 +# optional_fn_import optional_hook_export optional_hook_import
80 +
81 +# inter-module dependencies
82 +# TODO: this may still be incomplete
83 +MODULE_DEPENDS="
84 + auth_form:session
85 + brotli:filter
86 + dav_fs:dav
87 + dav_lock:dav
88 + deflate:filter
89 + cache_disk:cache
90 + ext_filter:filter
91 + file_cache:cache
92 + lbmethod_byrequests:proxy_balancer
93 + lbmethod_byrequests:slotmem_shm
94 + lbmethod_bytraffic:proxy_balancer
95 + lbmethod_bybusyness:proxy_balancer
96 + lbmethod_heartbeat:proxy_balancer
97 + log_forensic:log_config
98 + logio:log_config
99 + cache_disk:cache
100 + cache_socache:cache
101 + md:watchdog
102 + mime_magic:mime
103 + proxy_ajp:proxy
104 + proxy_balancer:proxy
105 + proxy_balancer:slotmem_shm
106 + proxy_connect:proxy
107 + proxy_ftp:proxy
108 + proxy_html:proxy
109 + proxy_html:xml2enc
110 + proxy_http:proxy
111 + proxy_http2:proxy
112 + proxy_scgi:proxy
113 + proxy_fcgi:proxy
114 + proxy_wstunnel:proxy
115 + session_cookie:session
116 + session_dbd:dbd
117 + session_dbd:session
118 + socache_memcache:cache
119 + substitute:filter
120 +"
121 +
122 +# module<->define mappings
123 +MODULE_DEFINES="
124 + auth_digest:AUTH_DIGEST
125 + authnz_ldap:AUTHNZ_LDAP
126 + cache:CACHE
127 + cache_disk:CACHE
128 + cache_socache:CACHE
129 + dav:DAV
130 + dav_fs:DAV
131 + dav_lock:DAV
132 + file_cache:CACHE
133 + http2:HTTP2
134 + info:INFO
135 + ldap:LDAP
136 + lua:LUA
137 + md:SSL
138 + proxy:PROXY
139 + proxy_ajp:PROXY
140 + proxy_balancer:PROXY
141 + proxy_connect:PROXY
142 + proxy_ftp:PROXY
143 + proxy_html:PROXY
144 + proxy_http:PROXY
145 + proxy_fcgi:PROXY
146 + proxy_scgi:PROXY
147 + proxy_wstunnel:PROXY
148 + socache_shmcb:SSL
149 + socache_memcache:CACHE
150 + ssl:SSL
151 + status:STATUS
152 + suexec:SUEXEC
153 + userdir:USERDIR
154 +"
155 +
156 +# critical modules for the default config
157 +MODULE_CRITICAL="
158 + authn_core
159 + authz_core
160 + authz_host
161 + dir
162 + mime
163 + unixd
164 +"
165 +inherit apache-2 systemd tmpfiles toolchain-funcs
166 +
167 +DESCRIPTION="The Apache Web Server"
168 +HOMEPAGE="https://httpd.apache.org/"
169 +
170 +# some helper scripts are Apache-1.1, thus both are here
171 +LICENSE="Apache-2.0 Apache-1.1"
172 +SLOT="2"
173 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x64-macos ~sparc64-solaris ~x64-solaris"
174 +
175 +# FIXME! Move this to eclass once all ebuilds are EAPI-7
176 +RDEPEND+=" apache2_modules_lua? ( ${LUA_DEPS} )"
177 +REQUIRED_USE+=" apache2_modules_lua? ( ${LUA_REQUIRED_USE} )"
178 +
179 +PATCHES=(
180 + "${FILESDIR}/${PN}-2.4.41-libressl.patch" #668060
181 +)
182 +
183 +pkg_setup() {
184 + # dependend critical modules which are not allowed in global scope due
185 + # to USE flag conditionals (bug #499260)
186 + use ssl && MODULE_CRITICAL+=" socache_shmcb"
187 + use doc && MODULE_CRITICAL+=" alias negotiation setenvif"
188 + apache-2_pkg_setup
189 +}
190 +
191 +src_configure() {
192 + # Brain dead check.
193 + tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no"
194 +
195 + apache-2_src_configure
196 +}
197 +
198 +src_compile() {
199 + if tc-is-cross-compiler; then
200 + # This header is the same across targets, so use the build compiler.
201 + pushd server >/dev/null
202 + emake gen_test_char
203 + tc-export_build_env BUILD_CC
204 + ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \
205 + gen_test_char.c -o gen_test_char $(apr-1-config --includes) || die
206 + popd >/dev/null
207 + fi
208 +
209 + default
210 +}
211 +
212 +src_install() {
213 + apache-2_src_install
214 + local i
215 + local apache_tools_prune_list=(
216 + /usr/bin/{htdigest,logresolve,htpasswd,htdbm,ab,httxt2dbm}
217 + /usr/sbin/{checkgid,fcgistarter,htcacheclean,rotatelogs}
218 + /usr/share/man/man1/{logresolve.1,htdbm.1,htdigest.1,htpasswd.1,dbmmanage.1,ab.1}
219 + /usr/share/man/man8/{rotatelogs.8,htcacheclean.8}
220 + )
221 + for i in ${apache_tools_prune_list[@]} ; do
222 + rm "${ED}"/${i} || die "Failed to prune apache-tools bits"
223 + done
224 +
225 + # install apxs in /usr/bin (bug #502384) and put a symlink into the
226 + # old location until all ebuilds and eclasses have been modified to
227 + # use the new location.
228 + dobin support/apxs
229 + use split-usr && dosym ../bin/apxs /usr/sbin/apxs
230 +
231 + # Note: wait for mod_systemd to be included in some forthcoming release,
232 + # Then apache2.4.service can be used and systemd support controlled
233 + # through --enable-systemd
234 + systemd_newunit "${FILESDIR}/apache2.2-hardened.service" "apache2.service"
235 + dotmpfiles "${FILESDIR}/apache.conf"
236 + #insinto /etc/apache2/modules.d
237 + #doins "${FILESDIR}/00_systemd.conf"
238 +
239 + # Install http2 module config
240 + insinto /etc/apache2/modules.d
241 + doins "${FILESDIR}"/41_mod_http2.conf
242 +
243 + # Fix path to apache libdir
244 + sed "s|@LIBDIR@|$(get_libdir)|" -i "${ED}"/usr/sbin/apache2ctl || die
245 +}
246 +
247 +pkg_postinst() {
248 + apache-2_pkg_postinst || die "apache-2_pkg_postinst failed"
249 +
250 + tmpfiles_process apache.conf #662544
251 +
252 + # warnings that default config might not work out of the box
253 + local mod cmod
254 + for mod in ${MODULE_CRITICAL} ; do
255 + if ! use "apache2_modules_${mod}"; then
256 + echo
257 + ewarn "Warning: Critical module not installed!"
258 + ewarn "Modules 'authn_core', 'authz_core' and 'unixd'"
259 + ewarn "are highly recomended but might not be in the base profile yet."
260 + ewarn "Default config for ssl needs module 'socache_shmcb'."
261 + ewarn "Enabling the following flags is highly recommended:"
262 + for cmod in ${MODULE_CRITICAL} ; do
263 + use "apache2_modules_${cmod}" || \
264 + ewarn "+ apache2_modules_${cmod}"
265 + done
266 + echo
267 + break
268 + fi
269 + done
270 + # warning for proxy_balancer and missing load balancing scheduler
271 + if use apache2_modules_proxy_balancer; then
272 + local lbset=
273 + for mod in lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat; do
274 + if use "apache2_modules_${mod}"; then
275 + lbset=1 && break
276 + fi
277 + done
278 + if [ ! ${lbset} ] ; then
279 + echo
280 + ewarn "Info: Missing load balancing scheduler algorithm module"
281 + ewarn "(They were split off from proxy_balancer in 2.3)"
282 + ewarn "In order to get the ability of load balancing, at least"
283 + ewarn "one of these modules has to be present:"
284 + ewarn "lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat"
285 + echo
286 + fi
287 + fi
288 +}