Gentoo Archives: gentoo-commits

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