1 |
commit: 552b68046ac0ecf4feaf52a77a73f663c379610a |
2 |
Author: Daniel Campbell <zlg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 7 09:38:11 2017 +0000 |
4 |
Commit: Daniel Campbell <zlg <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 7 09:47:39 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=552b6804 |
7 |
|
8 |
www-servers/lighttpd: correct USE="-ipv6" behavior |
9 |
|
10 |
Thanks to nicorac & upstream for the patch, to Oschtan for reporting, |
11 |
and Felix Janda for the lead. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/636650 |
14 |
Package-Manager: Portage-2.3.13, Repoman-2.3.4 |
15 |
|
16 |
...ighttpd-1.4.47-3d257ec3-respect-HAVE_IPV6.patch | 31 ++++++++++++++++++++++ |
17 |
www-servers/lighttpd/lighttpd-1.4.47.ebuild | 4 +++ |
18 |
2 files changed, 35 insertions(+) |
19 |
|
20 |
diff --git a/www-servers/lighttpd/files/lighttpd-1.4.47-3d257ec3-respect-HAVE_IPV6.patch b/www-servers/lighttpd/files/lighttpd-1.4.47-3d257ec3-respect-HAVE_IPV6.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..7916ac0b53f |
23 |
--- /dev/null |
24 |
+++ b/www-servers/lighttpd/files/lighttpd-1.4.47-3d257ec3-respect-HAVE_IPV6.patch |
25 |
@@ -0,0 +1,31 @@ |
26 |
+Backport upstream fixes for Gentoo bug #636650 |
27 |
+ |
28 |
+Original upstream commit message: |
29 |
+ |
30 |
+Author: nicorac <claudio.nicora@×××××.com> |
31 |
+Date: Wed Oct 25 16:48:24 2017 +0200 |
32 |
+ |
33 |
+ [core] fix build --disable-ipv6 (fixes #2832) |
34 |
+ |
35 |
+ x-ref: |
36 |
+ "Build error on systems without IPV6 support (regression from 1.4.46)" |
37 |
+ https://redmine.lighttpd.net/issues/2832 |
38 |
+ |
39 |
+ github: closes #87 |
40 |
+ |
41 |
+--- a/src/network.c |
42 |
++++ b/src/network.c |
43 |
+@@ -77,9 +77,13 @@ static void network_host_normalize_addr_str(buffer *host, sock_addr *addr) { |
44 |
+ if (addr->plain.sa_family == AF_INET6) |
45 |
+ buffer_append_string_len(host, CONST_STR_LEN("]")); |
46 |
+ if (addr->plain.sa_family != AF_UNIX) { |
47 |
++ #ifdef HAVE_IPV6 |
48 |
+ unsigned short port = (addr->plain.sa_family == AF_INET) |
49 |
+ ? ntohs(addr->ipv4.sin_port) |
50 |
+ : ntohs(addr->ipv6.sin6_port); |
51 |
++ #else |
52 |
++ unsigned short port = ntohs(addr->ipv4.sin_port); |
53 |
++ #endif |
54 |
+ buffer_append_string_len(host, CONST_STR_LEN(":")); |
55 |
+ buffer_append_int(host, (int)port); |
56 |
+ } |
57 |
|
58 |
diff --git a/www-servers/lighttpd/lighttpd-1.4.47.ebuild b/www-servers/lighttpd/lighttpd-1.4.47.ebuild |
59 |
index 69a3db322f6..7267b9187d2 100644 |
60 |
--- a/www-servers/lighttpd/lighttpd-1.4.47.ebuild |
61 |
+++ b/www-servers/lighttpd/lighttpd-1.4.47.ebuild |
62 |
@@ -51,6 +51,10 @@ RDEPEND="${CDEPEND} |
63 |
selinux? ( sec-policy/selinux-apache ) |
64 |
" |
65 |
|
66 |
+PATCHES=( |
67 |
+ "${FILESDIR}/${P}-3d257ec3-respect-HAVE_IPV6.patch" |
68 |
+) |
69 |
+ |
70 |
# update certain parts of lighttpd.conf based on conditionals |
71 |
update_config() { |
72 |
local config="${D}/etc/lighttpd/lighttpd.conf" |