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