1 |
commit: 241214d7fb7cfaac52b3333deadb2c9880d58682 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 20 00:26:40 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 29 08:39:44 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=241214d7 |
7 |
|
8 |
www-servers/apache: drop which dependency |
9 |
|
10 |
Apply to apache itself too just in case & for consistency. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/844868 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
Closes: https://github.com/gentoo/gentoo/pull/25984 |
15 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
16 |
|
17 |
www-servers/apache/apache-2.4.54-r1.ebuild | 266 +++++++++++++++++++++ |
18 |
.../apache/files/apache-2.4.54-no-which.patch | 54 +++++ |
19 |
2 files changed, 320 insertions(+) |
20 |
|
21 |
diff --git a/www-servers/apache/apache-2.4.54-r1.ebuild b/www-servers/apache/apache-2.4.54-r1.ebuild |
22 |
new file mode 100644 |
23 |
index 000000000000..1b3ba9f9ea6f |
24 |
--- /dev/null |
25 |
+++ b/www-servers/apache/apache-2.4.54-r1.ebuild |
26 |
@@ -0,0 +1,266 @@ |
27 |
+# Copyright 1999-2022 Gentoo Authors |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+ |
30 |
+EAPI=7 |
31 |
+ |
32 |
+# latest gentoo apache files |
33 |
+GENTOO_PATCHSTAMP="20210212" |
34 |
+GENTOO_DEVELOPER="polynomial-c" |
35 |
+GENTOO_PATCHNAME="gentoo-apache-2.4.46-r6" |
36 |
+ |
37 |
+# IUSE/USE_EXPAND magic |
38 |
+IUSE_MPMS_FORK="prefork" |
39 |
+IUSE_MPMS_THREAD="event worker" |
40 |
+ |
41 |
+# << obsolete modules: |
42 |
+# authn_default authz_default mem_cache |
43 |
+# mem_cache is replaced by cache_disk |
44 |
+# ?? buggy modules |
45 |
+# proxy_scgi: startup error: undefined symbol "ap_proxy_release_connection", no fix found |
46 |
+# >> added modules for reason: |
47 |
+# compat: compatibility with 2.2 access control |
48 |
+# authz_host: new module for access control |
49 |
+# authn_core: functionality provided by authn_alias in previous versions |
50 |
+# authz_core: new module, provides core authorization capabilities |
51 |
+# cache_disk: replacement for mem_cache |
52 |
+# lbmethod_byrequests: Split off from mod_proxy_balancer in 2.3 |
53 |
+# lbmethod_bytraffic: Split off from mod_proxy_balancer in 2.3 |
54 |
+# lbmethod_bybusyness: Split off from mod_proxy_balancer in 2.3 |
55 |
+# lbmethod_heartbeat: Split off from mod_proxy_balancer in 2.3 |
56 |
+# slotmem_shm: Slot-based shared memory provider (for lbmethod_byrequests). |
57 |
+# socache_shmcb: shared object cache provider. Default config with ssl needs it |
58 |
+# unixd: fixes startup error: Invalid command 'User' |
59 |
+IUSE_MODULES="access_compat actions alias asis auth_basic auth_digest auth_form |
60 |
+authn_anon authn_core authn_dbd authn_dbm authn_file authn_socache authz_core |
61 |
+authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex |
62 |
+brotli cache cache_disk cache_socache cern_meta charset_lite cgi cgid dav dav_fs dav_lock |
63 |
+dbd deflate dir dumpio env expires ext_filter file_cache filter headers http2 |
64 |
+ident imagemap include info lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness |
65 |
+lbmethod_heartbeat log_config log_forensic logio lua macro md mime mime_magic negotiation |
66 |
+proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_hcheck proxy_html proxy_http proxy_scgi |
67 |
+proxy_http2 proxy_fcgi proxy_uwsgi proxy_wstunnel rewrite ratelimit remoteip reqtimeout |
68 |
+session session_cookie session_crypto session_dbd setenvif slotmem_shm socache_memcache |
69 |
+socache_shmcb speling status substitute systemd unique_id userdir usertrack |
70 |
+unixd version vhost_alias watchdog xml2enc" |
71 |
+# The following are also in the source as of this version, but are not available |
72 |
+# for user selection: |
73 |
+# bucketeer case_filter case_filter_in echo http isapi optional_fn_export |
74 |
+# optional_fn_import optional_hook_export optional_hook_import |
75 |
+ |
76 |
+# inter-module dependencies |
77 |
+# TODO: this may still be incomplete |
78 |
+MODULE_DEPENDS=" |
79 |
+ auth_form:session |
80 |
+ brotli:filter |
81 |
+ dav_fs:dav |
82 |
+ dav_lock:dav |
83 |
+ deflate:filter |
84 |
+ cache_disk:cache |
85 |
+ ext_filter:filter |
86 |
+ file_cache:cache |
87 |
+ lbmethod_byrequests:proxy_balancer |
88 |
+ lbmethod_byrequests:slotmem_shm |
89 |
+ lbmethod_bytraffic:proxy_balancer |
90 |
+ lbmethod_bybusyness:proxy_balancer |
91 |
+ lbmethod_heartbeat:proxy_balancer |
92 |
+ log_forensic:log_config |
93 |
+ logio:log_config |
94 |
+ cache_disk:cache |
95 |
+ cache_socache:cache |
96 |
+ md:watchdog |
97 |
+ mime_magic:mime |
98 |
+ proxy_ajp:proxy |
99 |
+ proxy_balancer:proxy |
100 |
+ proxy_balancer:slotmem_shm |
101 |
+ proxy_connect:proxy |
102 |
+ proxy_ftp:proxy |
103 |
+ proxy_hcheck:proxy |
104 |
+ proxy_hcheck:watchdog |
105 |
+ proxy_html:proxy |
106 |
+ proxy_html:xml2enc |
107 |
+ proxy_http:proxy |
108 |
+ proxy_http2:proxy |
109 |
+ proxy_scgi:proxy |
110 |
+ proxy_uwsgi:proxy |
111 |
+ proxy_fcgi:proxy |
112 |
+ proxy_wstunnel:proxy |
113 |
+ session_cookie:session |
114 |
+ session_dbd:dbd |
115 |
+ session_dbd:session |
116 |
+ socache_memcache:cache |
117 |
+ substitute:filter |
118 |
+" |
119 |
+ |
120 |
+# module<->define mappings |
121 |
+MODULE_DEFINES=" |
122 |
+ auth_digest:AUTH_DIGEST |
123 |
+ authnz_ldap:AUTHNZ_LDAP |
124 |
+ cache:CACHE |
125 |
+ cache_disk:CACHE |
126 |
+ cache_socache:CACHE |
127 |
+ dav:DAV |
128 |
+ dav_fs:DAV |
129 |
+ dav_lock:DAV |
130 |
+ file_cache:CACHE |
131 |
+ http2:HTTP2 |
132 |
+ info:INFO |
133 |
+ ldap:LDAP |
134 |
+ lua:LUA |
135 |
+ md:SSL |
136 |
+ proxy:PROXY |
137 |
+ proxy_ajp:PROXY |
138 |
+ proxy_balancer:PROXY |
139 |
+ proxy_connect:PROXY |
140 |
+ proxy_ftp:PROXY |
141 |
+ proxy_html:PROXY |
142 |
+ proxy_http:PROXY |
143 |
+ proxy_hcheck:PROXY |
144 |
+ proxy_fcgi:PROXY |
145 |
+ proxy_scgi:PROXY |
146 |
+ proxy_wstunnel:PROXY |
147 |
+ socache_shmcb:SSL |
148 |
+ socache_memcache:CACHE |
149 |
+ ssl:SSL |
150 |
+ status:STATUS |
151 |
+ suexec:SUEXEC |
152 |
+ systemd:SYSTEMD |
153 |
+ userdir:USERDIR |
154 |
+" |
155 |
+ |
156 |
+# critical modules for the default config |
157 |
+MODULE_CRITICAL=" |
158 |
+ authn_core |
159 |
+ authz_core |
160 |
+ authz_host |
161 |
+ dir |
162 |
+ mime |
163 |
+ unixd |
164 |
+" |
165 |
+inherit apache-2 systemd tmpfiles toolchain-funcs |
166 |
+ |
167 |
+DESCRIPTION="The Apache Web Server" |
168 |
+HOMEPAGE="https://httpd.apache.org/" |
169 |
+ |
170 |
+# some helper scripts are Apache-1.1, thus both are here |
171 |
+LICENSE="Apache-2.0 Apache-1.1" |
172 |
+SLOT="2" |
173 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x64-macos ~sparc64-solaris ~x64-solaris" |
174 |
+ |
175 |
+PATCHES=( |
176 |
+ "${FILESDIR}"/${PN}-2.4.54-no-which.patch # bug #844868 |
177 |
+) |
178 |
+ |
179 |
+pkg_setup() { |
180 |
+ # dependend critical modules which are not allowed in global scope due |
181 |
+ # to USE flag conditionals (bug #499260) |
182 |
+ use ssl && MODULE_CRITICAL+=" socache_shmcb" |
183 |
+ use doc && MODULE_CRITICAL+=" alias negotiation setenvif" |
184 |
+ apache-2_pkg_setup |
185 |
+} |
186 |
+ |
187 |
+src_configure() { |
188 |
+ # Brain dead check. |
189 |
+ tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no" |
190 |
+ |
191 |
+ apache-2_src_configure |
192 |
+} |
193 |
+ |
194 |
+src_compile() { |
195 |
+ if tc-is-cross-compiler ; then |
196 |
+ # This header is the same across targets, so use the build compiler. |
197 |
+ pushd server >/dev/null |
198 |
+ emake gen_test_char |
199 |
+ tc-export_build_env BUILD_CC |
200 |
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \ |
201 |
+ gen_test_char.c -o gen_test_char $(apr-1-config --includes) || die |
202 |
+ popd >/dev/null |
203 |
+ fi |
204 |
+ |
205 |
+ default |
206 |
+} |
207 |
+ |
208 |
+src_install() { |
209 |
+ apache-2_src_install |
210 |
+ local i |
211 |
+ local apache_tools_prune_list=( |
212 |
+ /usr/bin/{htdigest,logresolve,htpasswd,htdbm,ab,httxt2dbm} |
213 |
+ /usr/sbin/{checkgid,fcgistarter,htcacheclean,rotatelogs} |
214 |
+ /usr/share/man/man1/{logresolve.1,htdbm.1,htdigest.1,htpasswd.1,dbmmanage.1,ab.1} |
215 |
+ /usr/share/man/man8/{rotatelogs.8,htcacheclean.8} |
216 |
+ ) |
217 |
+ for i in ${apache_tools_prune_list[@]} ; do |
218 |
+ rm "${ED}"/${i} || die "Failed to prune apache-tools bits" |
219 |
+ done |
220 |
+ |
221 |
+ # install apxs in /usr/bin (bug #502384) and put a symlink into the |
222 |
+ # old location until all ebuilds and eclasses have been modified to |
223 |
+ # use the new location. |
224 |
+ dobin support/apxs |
225 |
+ use split-usr && dosym ../bin/apxs /usr/sbin/apxs |
226 |
+ |
227 |
+ # Note: wait for mod_systemd to be included in some forthcoming release, |
228 |
+ # Then apache2.4.service can be used and systemd support controlled |
229 |
+ # through --enable-systemd |
230 |
+ systemd_newunit "${FILESDIR}/apache2.2-hardened.service" "apache2.service" |
231 |
+ dotmpfiles "${FILESDIR}/apache.conf" |
232 |
+ #insinto /etc/apache2/modules.d |
233 |
+ #doins "${FILESDIR}/00_systemd.conf" |
234 |
+ |
235 |
+ # Install http2 module config |
236 |
+ insinto /etc/apache2/modules.d |
237 |
+ doins "${FILESDIR}"/41_mod_http2.conf |
238 |
+ |
239 |
+ # Fix path to apache libdir |
240 |
+ sed "s|@LIBDIR@|$(get_libdir)|" -i "${ED}"/usr/sbin/apache2ctl || die |
241 |
+} |
242 |
+ |
243 |
+pkg_postinst() { |
244 |
+ echo |
245 |
+ ewarn "Downgrading to pre-GLEP 81 user for now." |
246 |
+ ewarn "See bug #802495 and bug #803500 for more information." |
247 |
+ ewarn "" |
248 |
+ ewarn "You will need to run the following command to unlock the user:" |
249 |
+ ewarn "usermod -e '' -U apache 2>/dev/null" |
250 |
+ echo |
251 |
+ |
252 |
+ apache-2_pkg_postinst || die "apache-2_pkg_postinst failed" |
253 |
+ |
254 |
+ tmpfiles_process apache.conf #662544 |
255 |
+ |
256 |
+ # warnings that default config might not work out of the box |
257 |
+ local mod cmod |
258 |
+ for mod in ${MODULE_CRITICAL} ; do |
259 |
+ if ! use "apache2_modules_${mod}"; then |
260 |
+ echo |
261 |
+ ewarn "Warning: Critical module not installed!" |
262 |
+ ewarn "Modules 'authn_core', 'authz_core' and 'unixd'" |
263 |
+ ewarn "are highly recomended but might not be in the base profile yet." |
264 |
+ ewarn "Default config for ssl needs module 'socache_shmcb'." |
265 |
+ ewarn "Enabling the following flags is highly recommended:" |
266 |
+ for cmod in ${MODULE_CRITICAL} ; do |
267 |
+ use "apache2_modules_${cmod}" || \ |
268 |
+ ewarn "+ apache2_modules_${cmod}" |
269 |
+ done |
270 |
+ echo |
271 |
+ break |
272 |
+ fi |
273 |
+ done |
274 |
+ # warning for proxy_balancer and missing load balancing scheduler |
275 |
+ if use apache2_modules_proxy_balancer; then |
276 |
+ local lbset= |
277 |
+ for mod in lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat; do |
278 |
+ if use "apache2_modules_${mod}"; then |
279 |
+ lbset=1 && break |
280 |
+ fi |
281 |
+ done |
282 |
+ if [[ ! ${lbset} ]] ; then |
283 |
+ echo |
284 |
+ ewarn "Info: Missing load balancing scheduler algorithm module" |
285 |
+ ewarn "(They were split off from proxy_balancer in 2.3)" |
286 |
+ ewarn "In order to get the ability of load balancing, at least" |
287 |
+ ewarn "one of these modules has to be present:" |
288 |
+ ewarn "lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat" |
289 |
+ echo |
290 |
+ fi |
291 |
+ fi |
292 |
+} |
293 |
|
294 |
diff --git a/www-servers/apache/files/apache-2.4.54-no-which.patch b/www-servers/apache/files/apache-2.4.54-no-which.patch |
295 |
new file mode 100644 |
296 |
index 000000000000..65764dfe022a |
297 |
--- /dev/null |
298 |
+++ b/www-servers/apache/files/apache-2.4.54-no-which.patch |
299 |
@@ -0,0 +1,54 @@ |
300 |
+https://bugs.gentoo.org/844868 |
301 |
+https://bz.apache.org/bugzilla/show_bug.cgi?id=66130 |
302 |
+--- a/build/aix/buildaix.ksh |
303 |
++++ b/build/aix/buildaix.ksh |
304 |
+@@ -26,14 +26,14 @@ export CFLAGS='-O2 -qlanglvl=extc99' |
305 |
+ lslpp -L bos.adt.insttools >/dev/null |
306 |
+ [[ $? -ne 0 ]] && echo "must have bos.adt.insttools installed" && exit -1 |
307 |
+ |
308 |
+-apr_config=`which apr-1-config` |
309 |
+-apu_config=`which apu-1-config` |
310 |
++apr_config=`command -v apr-1-config 2>/dev/null` |
311 |
++apu_config=`command -v apu-1-config 2>/dev/null` |
312 |
+ |
313 |
+ if [[ -z ${apr_config} && -z ${apu_config} ]] |
314 |
+ then |
315 |
+ export PATH=/opt/bin:${PATH} |
316 |
+- apr_config=`which apr-1-config` |
317 |
+- apu_config=`which apu-1-config` |
318 |
++ apr_config=`command -v apr-1-config 2>/dev/null` |
319 |
++ apu_config=`command -v apu-1-config 2>/dev/null` |
320 |
+ fi |
321 |
+ |
322 |
+ while test $# -gt 0 |
323 |
+--- a/build/pkg/buildpkg.sh |
324 |
++++ b/build/pkg/buildpkg.sh |
325 |
+@@ -24,8 +24,8 @@ PREFIX=/usr/local/apache2 |
326 |
+ TEMPDIR=/var/tmp/$USER/httpd-root |
327 |
+ rm -rf $TEMPDIR |
328 |
+ |
329 |
+-apr_config=`which apr-1-config` |
330 |
+-apu_config=`which apu-1-config` |
331 |
++apr_config=`command -v apr-1-config 2>/dev/null` |
332 |
++apu_config=`command -v apu-1-config 2>/dev/null` |
333 |
+ |
334 |
+ while test $# -gt 0 |
335 |
+ do |
336 |
+--- a/configure.in |
337 |
++++ b/configure.in |
338 |
+@@ -216,13 +216,13 @@ AC_ARG_WITH(pcre, |
339 |
+ APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library)) |
340 |
+ if test "x$with_pcre" = "x" || test "$with_pcre" = "yes"; then |
341 |
+ with_pcre="$PATH" |
342 |
+-else if which $with_pcre 2>/dev/null; then :; else |
343 |
++else if command -v $with_pcre 2>/dev/null; then :; else |
344 |
+ with_pcre="$with_pcre/bin:$with_pcre" |
345 |
+ fi |
346 |
+ fi |
347 |
+ |
348 |
+ AC_CHECK_TARGET_TOOLS(PCRE_CONFIG, [pcre2-config pcre-config], |
349 |
+- [`which $with_pcre 2>/dev/null`], $with_pcre) |
350 |
++ [`command -v $with_pcre 2>/dev/null`], $with_pcre) |
351 |
+ |
352 |
+ if test "x$PCRE_CONFIG" != "x"; then |
353 |
+ if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else |