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