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, 03 Sep 2019 07:56:37
Message-Id: 1567497317.940c00751c3468b0805a99f3626330d89f5806a1.polynomial-c@gentoo
1 commit: 940c00751c3468b0805a99f3626330d89f5806a1
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 3 07:55:17 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 3 07:55:17 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=940c0075
7
8 www-servers/apache: Security cleanup
9
10 Bug: https://bugs.gentoo.org/692172
11 Package-Manager: Portage-2.3.75, Repoman-2.3.17
12 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
13
14 www-servers/apache/Manifest | 1 -
15 www-servers/apache/apache-2.4.39.ebuild | 257 --------------------------------
16 2 files changed, 258 deletions(-)
17
18 diff --git a/www-servers/apache/Manifest b/www-servers/apache/Manifest
19 index 6814d971320..b93ba5f41cd 100644
20 --- a/www-servers/apache/Manifest
21 +++ b/www-servers/apache/Manifest
22 @@ -1,5 +1,4 @@
23 DIST gentoo-apache-2.2.34-20170918.tar.bz2 64390 BLAKE2B d3f6d85192706d7c49a38cc36e816b3ae531f8c0d42111c33ec32ed39900d36d8a2a85a5d1b5afca22331137f04fb24fb424a42a21caa7eb4f6906fa39cb8224 SHA512 10b42e50dcc196f60bcaefe90c382d62a61339dd8a56e899d6afb6998be4acdd376e2c3509791f22a0acf99d06add497e32703b6d523f640306a6db5e05f358a
24 DIST gentoo-apache-2.4.39-20190402.tar.bz2 25491 BLAKE2B ce230b07ec156048c7d7c1eb4b0e732fa6140f55d136e317714591327bde3f85bab7780424e6eef04b7a4518cbdcfdddcbc094409f4ca19ffea1ce967bdf7cf1 SHA512 bc0ffa20cffd9a89c2ea64420fa2243d77e97d7922bcd0b387a7fcfcc3c6908a056972b499a81344f7c3e3e19b55ffc300fd034c54b287f4f32d8931bd50cde4
25 DIST httpd-2.2.34.tar.bz2 5779739 BLAKE2B 8cdd41fb5d1880da4a1cfef252b4682f613b938594057ea4c9665d3881a50b298fb7339c1ceb3dafc215aa927048f99d500f2d29c125016d5766954be9b632b4 SHA512 e6dac5865a48533c025fe17523ee74d68c3a23f9512c9441b78a140e33cfb6835573eb049b0ad424eb5c5ca78a1915778c54e8a409da95fbdd3890cb99e08240
26 -DIST httpd-2.4.39.tar.bz2 7030539 BLAKE2B 1e378833efb9bbdd6fdc277a779620a08752d064524489f9ad747cf85350fbb6ad65f57b30c81d57273cd6693d8a2c4e988f5a2c42bd5c9c538b305b9b7719e8 SHA512 9742202040b3dc6344b301540f54b2d3f8e36898410d24206a7f8dcecb1bea7d7230fabc7256752724558af249facf64bffe2cf678b8f7cccb64076737abfda7
27 DIST httpd-2.4.41.tar.bz2 7072373 BLAKE2B 88a2390736209d5ef04bffcb867bc8d6019302885e6f3cc63d18123336d4d0657252105a3bfebf4e91b8daa02119d4a61f4c0a9702244858a3193ec6cf681c0f SHA512 350cc7dcd2c439e0590338fa6da3f44df44f9bb885c381e91f91b14c2f48597f6f0bbac0ea118a8a67eaa70ae7edbb769beace368643ed73f6daee44c307b335
28
29 diff --git a/www-servers/apache/apache-2.4.39.ebuild b/www-servers/apache/apache-2.4.39.ebuild
30 deleted file mode 100644
31 index 7c3e8d290f8..00000000000
32 --- a/www-servers/apache/apache-2.4.39.ebuild
33 +++ /dev/null
34 @@ -1,257 +0,0 @@
35 -# Copyright 1999-2019 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="20190402"
42 -GENTOO_DEVELOPER="polynomial-c"
43 -GENTOO_PATCHNAME="gentoo-apache-2.4.39"
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
68 -authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file 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 setenvif
76 -slotmem_shm speling 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 - 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_scgi:proxy
113 - proxy_fcgi:proxy
114 - proxy_wstunnel:proxy
115 - substitute:filter
116 -"
117 -
118 -# module<->define mappings
119 -MODULE_DEFINES="
120 - auth_digest:AUTH_DIGEST
121 - authnz_ldap:AUTHNZ_LDAP
122 - cache:CACHE
123 - cache_disk:CACHE
124 - cache_socache:CACHE
125 - dav:DAV
126 - dav_fs:DAV
127 - dav_lock:DAV
128 - file_cache:CACHE
129 - http2:HTTP2
130 - info:INFO
131 - ldap:LDAP
132 - md:SSL
133 - proxy:PROXY
134 - proxy_ajp:PROXY
135 - proxy_balancer:PROXY
136 - proxy_connect:PROXY
137 - proxy_ftp:PROXY
138 - proxy_html:PROXY
139 - proxy_http:PROXY
140 - proxy_fcgi:PROXY
141 - proxy_scgi:PROXY
142 - proxy_wstunnel:PROXY
143 - socache_shmcb:SSL
144 - ssl:SSL
145 - status:STATUS
146 - suexec:SUEXEC
147 - userdir:USERDIR
148 -"
149 -
150 -# critical modules for the default config
151 -MODULE_CRITICAL="
152 - authn_core
153 - authz_core
154 - authz_host
155 - dir
156 - mime
157 - unixd
158 -"
159 -inherit apache-2 systemd tmpfiles toolchain-funcs
160 -
161 -DESCRIPTION="The Apache Web Server"
162 -HOMEPAGE="https://httpd.apache.org/"
163 -
164 -# some helper scripts are Apache-1.1, thus both are here
165 -LICENSE="Apache-2.0 Apache-1.1"
166 -SLOT="2"
167 -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x64-macos ~x86-macos ~m68k-mint ~sparc64-solaris ~x64-solaris"
168 -
169 -# Enable http2 by default (bug #563452)
170 -# FIXME: Move to apache-2.eclass once this has reached stable.
171 -IUSE="${IUSE/apache2_modules_http2/+apache2_modules_http2}"
172 -# New suexec options (since 2.4.34)
173 -IUSE="${IUSE} +suexec-caps suexec-syslog"
174 -
175 -CDEPEND="apache2_modules_brotli? ( >=app-arch/brotli-0.6.0:= )
176 - apache2_modules_http2? ( >=net-libs/nghttp2-1.2.1 )
177 - apache2_modules_md? ( >=dev-libs/jansson-2.10 )"
178 -
179 -DEPEND+="${CDEPEND}
180 - suexec? ( suexec-caps? ( sys-libs/libcap ) )"
181 -RDEPEND+="${CDEPEND}"
182 -
183 -REQUIRED_USE="apache2_modules_http2? ( ssl )
184 - apache2_modules_md? ( ssl )"
185 -
186 -pkg_setup() {
187 - # dependend critical modules which are not allowed in global scope due
188 - # to USE flag conditionals (bug #499260)
189 - use ssl && MODULE_CRITICAL+=" socache_shmcb"
190 - use doc && MODULE_CRITICAL+=" alias negotiation setenvif"
191 - apache-2_pkg_setup
192 -}
193 -
194 -src_configure() {
195 - # Brain dead check.
196 - tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no"
197 -
198 - apache-2_src_configure
199 -}
200 -
201 -src_compile() {
202 - if tc-is-cross-compiler; then
203 - # This header is the same across targets, so use the build compiler.
204 - pushd server >/dev/null
205 - emake gen_test_char
206 - tc-export_build_env BUILD_CC
207 - ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \
208 - gen_test_char.c -o gen_test_char $(apr-1-config --includes) || die
209 - popd >/dev/null
210 - fi
211 -
212 - default
213 -}
214 -
215 -src_install() {
216 - apache-2_src_install
217 - local i
218 - local apache_tools_prune_list=(
219 - /usr/bin/{htdigest,logresolve,htpasswd,htdbm,ab,httxt2dbm}
220 - /usr/sbin/{checkgid,fcgistarter,htcacheclean,rotatelogs}
221 - /usr/share/man/man1/{logresolve.1,htdbm.1,htdigest.1,htpasswd.1,dbmmanage.1,ab.1}
222 - /usr/share/man/man8/{rotatelogs.8,htcacheclean.8}
223 - )
224 - for i in ${apache_tools_prune_list[@]} ; do
225 - rm "${ED%/}"/${i} || die "Failed to prune apache-tools bits"
226 - done
227 -
228 - # install apxs in /usr/bin (bug #502384) and put a symlink into the
229 - # old location until all ebuilds and eclasses have been modified to
230 - # use the new location.
231 - dobin support/apxs
232 - dosym ../bin/apxs /usr/sbin/apxs
233 -
234 - # Note: wait for mod_systemd to be included in some forthcoming release,
235 - # Then apache2.4.service can be used and systemd support controlled
236 - # through --enable-systemd
237 - systemd_newunit "${FILESDIR}/apache2.2-hardened.service" "apache2.service"
238 - systemd_dotmpfilesd "${FILESDIR}/apache.conf"
239 - #insinto /etc/apache2/modules.d
240 - #doins "${FILESDIR}/00_systemd.conf"
241 -
242 - # Install http2 module config
243 - insinto /etc/apache2/modules.d
244 - doins "${FILESDIR}"/41_mod_http2.conf
245 -
246 - # Fix path to apache libdir
247 - sed "s|@LIBDIR@|$(get_libdir)|" -i "${ED%/}"/usr/sbin/apache2ctl || die
248 -}
249 -
250 -pkg_postinst() {
251 - apache-2_pkg_postinst || die "apache-2_pkg_postinst failed"
252 -
253 - tmpfiles_process apache.conf #662544
254 -
255 - # warnings that default config might not work out of the box
256 - local mod cmod
257 - for mod in ${MODULE_CRITICAL} ; do
258 - if ! use "apache2_modules_${mod}"; then
259 - echo
260 - ewarn "Warning: Critical module not installed!"
261 - ewarn "Modules 'authn_core', 'authz_core' and 'unixd'"
262 - ewarn "are highly recomended but might not be in the base profile yet."
263 - ewarn "Default config for ssl needs module 'socache_shmcb'."
264 - ewarn "Enabling the following flags is highly recommended:"
265 - for cmod in ${MODULE_CRITICAL} ; do
266 - use "apache2_modules_${cmod}" || \
267 - ewarn "+ apache2_modules_${cmod}"
268 - done
269 - echo
270 - break
271 - fi
272 - done
273 - # warning for proxy_balancer and missing load balancing scheduler
274 - if use apache2_modules_proxy_balancer; then
275 - local lbset=
276 - for mod in lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat; do
277 - if use "apache2_modules_${mod}"; then
278 - lbset=1 && break
279 - fi
280 - done
281 - if [ ! ${lbset} ] ; then
282 - echo
283 - ewarn "Info: Missing load balancing scheduler algorithm module"
284 - ewarn "(They were split off from proxy_balancer in 2.3)"
285 - ewarn "In order to get the ability of load balancing, at least"
286 - ewarn "one of these modules has to be present:"
287 - ewarn "lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat"
288 - echo
289 - fi
290 - fi
291 -}