apache sni fix again
Hanno Böck

Hanno Böck commited on 2014-06-16 11:46:34
Zeige 2 geänderte Dateien mit 234 Einfügungen und 0 Löschungen.

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