summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/libslz/Manifest2
-rw-r--r--dev-libs/libslz/libslz-1.0.0.ebuild8
-rw-r--r--net-proxy/haproxy/Manifest5
-rw-r--r--net-proxy/haproxy/files/0001-BUG-http-compression-Fix-how-chunked-data-are-copied.patch47
-rw-r--r--net-proxy/haproxy/haproxy-1.7_beta4.ebuild9
-rw-r--r--net-proxy/haproxy/metadata.xml1
-rw-r--r--profiles/use.local.desc1
7 files changed, 62 insertions, 11 deletions
diff --git a/dev-libs/libslz/Manifest b/dev-libs/libslz/Manifest
index b1639a07..0eaa978b 100644
--- a/dev-libs/libslz/Manifest
+++ b/dev-libs/libslz/Manifest
@@ -9,5 +9,5 @@ AUX 1.0.0-build-specify-destination-file-for-consistency.patch 1452 SHA256 4e8c5
AUX 1.0.0-build-split-install-target-in-per-purpose-targets.patch 1704 SHA256 d311defb87a5831881f1766d1a8f4273561460e17d3fcd22d436ca112025975e WHIRLPOOL ab9a539193d0f9b112a0a1a4050fc0b890d09ac4373b25d1660bd947384e77b6c5c2a9c9e9982e3b5e8e590076c54d2a420cfa0da0ddf0f7b95807685639b522
AUX 1.0.0-build-use-intermediate-static-and-tools-targets-for-.patch 619 SHA256 e9e53ab09ef1a6f7952908348ef66b8b61fdf3770d3c181a61b36743d6111086 WHIRLPOOL ed87bc39fa66d3d12bf51850f2373022c833ab29651ba8ce979b2951d5fc5c36c6cdffe9b33da9dca2be488398a954518df20de565096dfd34b8447b3d6cd5b2
DIST libslz-1.0.0.tar.gz 146155 SHA256 4696da81bc4ac5ec5bbc36a62c168bdca4d35f4fbe63da76b2d9cf54be857a45 WHIRLPOOL d54b53f281e88e7c8fd4b39ef86b5b3d5d6a9d3073ea58fccbc8dedf6f70f7504703c52e54059a3832f07e1aaf33fa243b29f5f6bf81118923892de0819572fd
-EBUILD libslz-1.0.0.ebuild 1603 SHA256 fd3b4bfedd2a3aad4f10c749cc202d0a64d09ca3fba37419948141b29df5fc2d WHIRLPOOL 79a4722dafb032f3a83d646ac9e089344631a5a4c93497dc0fc9234949f293801608cfefbfa2778e70843a2d20fef386d0978f1a2066aa9492b266e0d0b87a2c
+EBUILD libslz-1.0.0.ebuild 1616 SHA256 d099fcce5e46b77528a84694dea98805e878ace5ba34db5031a76957a8ec633a WHIRLPOOL 3c196735478600a4304c2cf0d48c2ad517feda8301fc8bb0d2d35da20e6d3bb1116e95128262fd6ea7a19d96955ae6254e8a526eadf16f121c689b4dd0c02d42
MISC metadata.xml 1060 SHA256 3f7f86009eebc70cf0699b1dfa17285f6d4bd24835a12dc8411c7e28e0ad83fd WHIRLPOOL c33dbb73b7cdffa29f148900dc2dbd6a7fc34f8cbc3f62ece5298d68da01242df37c21df62f6b9cb2a13a6305227907050b364de5835a747444fdce02cb394ea
diff --git a/dev-libs/libslz/libslz-1.0.0.ebuild b/dev-libs/libslz/libslz-1.0.0.ebuild
index ad8466a1..030eb976 100644
--- a/dev-libs/libslz/libslz-1.0.0.ebuild
+++ b/dev-libs/libslz/libslz-1.0.0.ebuild
@@ -36,8 +36,8 @@ src_compile() {
OPT_CFLAGS="${CFLAGS}" \
USR_LFLAGS="${LDFLAGS}" \
shared \
- $(usex static-libs static) \
- $(usex tools tools)
+ $(usex static-libs static '') \
+ $(usex tools tools '')
}
src_install() {
@@ -48,8 +48,8 @@ src_install() {
LIBDIR="$(get_libdir)" \
install-headers \
install-shared \
- $(usex static-libs install-static) \
- $(usex tools install-tools)
+ $(usex static-libs install-static '') \
+ $(usex tools install-tools '')
einstalldocs
}
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
index 1b63b66d..98a7751a 100644
--- a/net-proxy/haproxy/Manifest
+++ b/net-proxy/haproxy/Manifest
@@ -1,5 +1,6 @@
+AUX 0001-BUG-http-compression-Fix-how-chunked-data-are-copied.patch 1606 SHA256 f2abb3c8b28e6e373f2b04ab68c3bd861a3bc083ac5fe283ad576da646c54272 WHIRLPOOL 699bab28de5fc8d2983682e22783b7ecf51ee7f4ee15059330ab56a81dfbe3ca28b73aedf70a827ec14ebd27d1523fd6d19e225eb770ceb34a62e3539e093e8a
AUX haproxy.confd 622 SHA256 ce3063b75e15246c30e5fca82d510fe0770f2e476739a18d47c91c467584ce30 WHIRLPOOL c4accbf3ec8329e67284342ac276e7d45745a34821113b69f48bd700ffb92f20d77726156f2fde16a33ba00ffd3f91bb68c42b2bdd94d2a916e4c0514ca7c3d5
AUX haproxy.initd-r3 1542 SHA256 2af2f481ea9da31d0c18da08d6b76a84b7b11ecf1df046245263afe19a5d42e9 WHIRLPOOL 1a3746ce7ff3d4b209202a8780885d68b056fd890de2b43f9706a361a54acd756b32b122f4886fd2b50249b3acadb80a02761c59dc215508b03575206ed4edac
DIST haproxy-1.7-dev4.tar.gz 1653326 SHA256 23a27d414a27cc56398b3ffc937eed7fd1ac4a36d4648c2c3ec259bcd19751ac WHIRLPOOL 66679fa7ee8c21dc6ad433eafd360fe29998eea5f8b3173a24d92ddfd176a4026fdc714b3c4e04fb6e2656cb3cff9990305444b23fec59ba961dee6fc2cfb443
-EBUILD haproxy-1.7_beta4.ebuild 3752 SHA256 1209871d692770907a32ccab3db907858bc9411f2a88579864b57e452d3e06bc WHIRLPOOL c332983c59d989aafd6235b2a5ff438bd6b323e37b8f95637fae00cb8e43ad1394cb50268ae62c85a8fe4fe004032f81d530fcd520570ea46d5a0b27e1e1e9b5
-MISC metadata.xml 1659 SHA256 a4691aac2f6ddf5a902622c1be998c4660f8cc7316618122dd51e776a279fcf8 WHIRLPOOL b77497249c8e3b5c14068829c0f4b965223a4eb4ad3998fd429aa57586b0a6eb4ed20c75dd9bd7996b1d7761134b97d1bbf18fa70f51874f0ada0e9535ed56e9
+EBUILD haproxy-1.7_beta4.ebuild 3832 SHA256 4fd4ef75fc13032ab2b2e8d6990815d459302e0fd935ad820b15a9d977255187 WHIRLPOOL 1f5180002f4c196e3db5765d6effec52f784a12dc25423c912f08b7a035b4e55e178f982498961ebb0760c04389999ac1892cb4fdad9c1b0d34804a7a496809c
+MISC metadata.xml 1736 SHA256 257d4fb47dc3abab68e59171320b29349670d335c1d674b99a53417764c94e37 WHIRLPOOL 969b172c040efa81f2a9408436ef2db18a6eb2fb50d7bd4518e6ec03a269e30a248739a8be5b9d97192c32c7a4def0be162bd079efe4aa3946c3e74514668cd2
diff --git a/net-proxy/haproxy/files/0001-BUG-http-compression-Fix-how-chunked-data-are-copied.patch b/net-proxy/haproxy/files/0001-BUG-http-compression-Fix-how-chunked-data-are-copied.patch
new file mode 100644
index 00000000..18b6eeb1
--- /dev/null
+++ b/net-proxy/haproxy/files/0001-BUG-http-compression-Fix-how-chunked-data-are-copied.patch
@@ -0,0 +1,47 @@
+From d756fba92d1c14ab80c2c962843ddd556c5135ea Mon Sep 17 00:00:00 2001
+From: Christopher Faulet <christopher.faulet@capflam.org>
+Date: Thu, 22 Sep 2016 15:31:43 +0200
+Subject: [PATCH] BUG: http/compression: Fix how chunked data are copied during
+ the HTTP body parsing
+
+When the compression is enable on HTTP responses, the chunked data are copied in
+a temporary buffer during the HTTP body parsing and then compressed when
+everything is forwarded to the client. But the amout of data that can be copied
+was not correctly calculated. In many cases, it worked, else on the edge when
+the channel buffer was almost full.
+---
+ src/flt_http_comp.c | 16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c
+index 9ddc858..249ccdf 100644
+--- a/src/flt_http_comp.c
++++ b/src/flt_http_comp.c
+@@ -177,15 +177,17 @@ comp_http_data(struct stream *s, struct filter *filter, struct http_msg *msg)
+ }
+
+ if (msg->flags & HTTP_MSGF_TE_CHNK) {
+- int block = bi_contig_data(buf);
++ int block;
+
+ len = MIN(tmpbuf->size - buffer_len(tmpbuf), len);
+- if (len > block) {
+- memcpy(bi_end(tmpbuf), b_ptr(buf, *nxt), block);
+- memcpy(bi_end(tmpbuf)+block, buf->data, len - block);
+- }
+- else
+- memcpy(bi_end(tmpbuf), b_ptr(buf, *nxt), len);
++
++ b_adv(buf, *nxt);
++ block = bi_contig_data(buf);
++ memcpy(bi_end(tmpbuf), bi_ptr(buf), block);
++ if (len > block)
++ memcpy(bi_end(tmpbuf)+block, buf->data, len-block);
++ b_rew(buf, *nxt);
++
+ tmpbuf->i += len;
+ ret = len;
+ }
+--
+2.7.4
+
diff --git a/net-proxy/haproxy/haproxy-1.7_beta4.ebuild b/net-proxy/haproxy/haproxy-1.7_beta4.ebuild
index c50ac957..a4ec7f38 100644
--- a/net-proxy/haproxy/haproxy-1.7_beta4.ebuild
+++ b/net-proxy/haproxy/haproxy-1.7_beta4.ebuild
@@ -15,9 +15,9 @@ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/d
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~x86"
-IUSE="+crypt doc examples libressl libslz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua
REQUIRED_USE="pcre-jit? ( pcre )
- ?? ( libslz zlib )"
+ ?? ( slz zlib )"
DEPEND="
pcre? (
@@ -28,13 +28,14 @@ DEPEND="
!libressl? ( dev-libs/openssl:0=[zlib?] )
libressl? ( dev-libs/libressl:0= )
)
- libslz? ( sys-libs/libslz )
+ slz? ( dev-libs/libslz:= )
zlib? ( sys-libs/zlib )"
# lua? ( dev-lang/lua:5.3 )
RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"
+PATCHES=( "${FILESDIR}/0001-BUG-http-compression-Fix-how-chunked-data-are-copied.patch" )
DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS )
haproxy_use() {
@@ -81,7 +82,7 @@ src_compile() {
# args+=( $(haproxy_use kernel_linux LINUX_TPROXY) )
args+=( $(haproxy_use ssl OPENSSL) )
- args+=( $(haproxy_use libslz SLZ) )
+ args+=( $(haproxy_use slz SLZ) )
args+=( $(haproxy_use zlib ZLIB) )
# For now, until the strict-aliasing breakage will be fixed
diff --git a/net-proxy/haproxy/metadata.xml b/net-proxy/haproxy/metadata.xml
index 56529589..2aaccf14 100644
--- a/net-proxy/haproxy/metadata.xml
+++ b/net-proxy/haproxy/metadata.xml
@@ -21,6 +21,7 @@ Its event-driven architecture allows it to easily handle thousands of simultaneo
<use>
<flag name="net_ns">Enable network namespace support (CONFIG_NET_NS)</flag>
<flag name="pcre-jit">Use JIT support for PCRE</flag>
+ <flag name="slz">Use <pkg>dev-libs/libslz</pkg> compression library</flag>
<flag name="tools">Install additional tools (halog, iprange)</flag>
</use>
</pkgmetadata>
diff --git a/profiles/use.local.desc b/profiles/use.local.desc
index 38a410a4..6b9f6939 100644
--- a/profiles/use.local.desc
+++ b/profiles/use.local.desc
@@ -67,6 +67,7 @@ net-misc/icmptx:client - Enable client support
net-misc/icmptx:server - Enable server support
net-proxy/haproxy:net_ns - Enable network namespace support (CONFIG_NET_NS)
net-proxy/haproxy:pcre-jit - Use JIT support for PCRE
+net-proxy/haproxy:slz - Use dev-libs/libslz compression library
net-proxy/haproxy:tools - Install additional tools (halog, iprange)
sys-firmware/gnuk:tools - Install aditional tools
virtual/linux-sources:firmware - Install linux kernel firmware