Gentoo Archives: gentoo-commits

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