From 6afaa04bd96f98c7cdfdc270035083460876e6e9 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sat, 29 Oct 2016 23:52:54 +0100 Subject: net-proxy/haproxy: Version bump Package-Manager: portage-2.3.0 --- net-proxy/haproxy/Manifest | 5 +- ...mpression-Fix-how-chunked-data-are-copied.patch | 47 ------- net-proxy/haproxy/haproxy-1.7_beta4.ebuild | 151 --------------------- net-proxy/haproxy/haproxy-1.7_beta5.ebuild | 146 ++++++++++++++++++++ 4 files changed, 148 insertions(+), 201 deletions(-) delete mode 100644 net-proxy/haproxy/files/0001-BUG-http-compression-Fix-how-chunked-data-are-copied.patch delete mode 100644 net-proxy/haproxy/haproxy-1.7_beta4.ebuild create mode 100644 net-proxy/haproxy/haproxy-1.7_beta5.ebuild diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest index 98a7751a..7abe7def 100644 --- a/net-proxy/haproxy/Manifest +++ b/net-proxy/haproxy/Manifest @@ -1,6 +1,5 @@ -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 3832 SHA256 4fd4ef75fc13032ab2b2e8d6990815d459302e0fd935ad820b15a9d977255187 WHIRLPOOL 1f5180002f4c196e3db5765d6effec52f784a12dc25423c912f08b7a035b4e55e178f982498961ebb0760c04389999ac1892cb4fdad9c1b0d34804a7a496809c +DIST haproxy-1.7-dev5.tar.gz 1667747 SHA256 a1f5d05e4c4f11a396a74dde4bdebabba2936febceaa1fc1c955d9de08580a4f WHIRLPOOL f6928ce21dabc9cb6caa2014d68ca5b2323a27df8b0282a212dfac12ad5055e617231ebc60df3e3225a9155132f4848ce55c7302663afed5717bc520c72743f5 +EBUILD haproxy-1.7_beta5.ebuild 3634 SHA256 26e6b34ff9aa968717ad63fb4a6a92649b15747a6bad9ed62c1e5f1028d04150 WHIRLPOOL 63216dc3db139c0f537dac58c2dcedd8bf91e30b1301955dd15e491425c04bce80076188fc7849c115c8afd015f1c671be940f94c8a9d0f1e372ad50b1004133 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 deleted file mode 100644 index 18b6eeb1..00000000 --- a/net-proxy/haproxy/files/0001-BUG-http-compression-Fix-how-chunked-data-are-copied.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d756fba92d1c14ab80c2c962843ddd556c5135ea Mon Sep 17 00:00:00 2001 -From: Christopher Faulet -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 deleted file mode 100644 index a4ec7f38..00000000 --- a/net-proxy/haproxy/haproxy-1.7_beta4.ebuild +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="6" - -inherit user versionator toolchain-funcs flag-o-matic systemd linux-info - -MY_P="${PN}-${PV/_beta/-dev}" - -DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" -HOMEPAGE="http://haproxy.1wt.eu" -SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/devel/${MY_P}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc ~x86" -IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua -REQUIRED_USE="pcre-jit? ( pcre ) - ?? ( slz zlib )" - -DEPEND=" - pcre? ( - dev-libs/libpcre - pcre-jit? ( dev-libs/libpcre[jit] ) - ) - ssl? ( - !libressl? ( dev-libs/openssl:0=[zlib?] ) - libressl? ( dev-libs/libressl:0= ) - ) - 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() { - (( $# != 2 )) && die "${FUNCNAME} " - - usex "${1}" "USE_${2}=1" "USE_${2}=" -} - -pkg_setup() { - enewgroup haproxy - enewuser haproxy -1 -1 -1 haproxy - - if use net_ns; then - CONFIG_CHECK="~NET_NS" - linux-info_pkg_setup - fi -} - -src_prepare() { - default - - sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \ - > contrib/systemd/haproxy.service || die - - sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die -} - -src_compile() { - local -a args=( - TARGET=linux2628 - USE_GETADDRINFO=1 - ) - - args+=( $(haproxy_use crypt LIBCRYPT) ) - -# bug 541042 -# args+=( $(haproxy_use lua LUA) ) - - args+=( $(haproxy_use net_ns NS) ) - args+=( $(haproxy_use pcre PCRE) ) - args+=( $(haproxy_use pcre-jit PCRE_JIT) ) - -# args+=( $(haproxy_use kernel_linux LINUX_SPLICE) ) -# args+=( $(haproxy_use kernel_linux LINUX_TPROXY) ) - - args+=( $(haproxy_use ssl OPENSSL) ) - args+=( $(haproxy_use slz SLZ) ) - args+=( $(haproxy_use zlib ZLIB) ) - - # For now, until the strict-aliasing breakage will be fixed - append-cflags -fno-strict-aliasing - - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} - - if use tools ; then - for contrib in halog iprange ; do - emake -C contrib/${contrib} \ - CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} - done - fi -} - -src_install() { - dobin haproxy - - newconfd "${FILESDIR}/${PN}.confd" $PN - newinitd "${FILESDIR}/${PN}.initd-r3" $PN - - doman doc/haproxy.1 - - dobin haproxy-systemd-wrapper - systemd_dounit contrib/systemd/haproxy.service - - einstalldocs - - if use doc; then - dodoc ROADMAP doc/{close-options,configuration,cookie-options,intro,linux-syn-cookies,management,proxy-protocol}.txt - fi - - if use tools ; then - dobin contrib/halog/halog - newbin contrib/iprange/iprange haproxy_iprange - fi - - if use net_ns && use doc; then - dodoc doc/network-namespaces.txt - fi - - if use examples ; then - docinto examples - dodoc examples/*.cfg - dodoc examples/seamless_reload.txt - fi - - if use vim-syntax ; then - insinto /usr/share/vim/vimfiles/syntax - doins examples/haproxy.vim - fi -} - -pkg_postinst() { - if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then - ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." - ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." - ewarn "Make use of them with the \"user\" and \"group\" directives." - - if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then - einfo "Please consult the installed documentation for learning the configuration file's syntax." - einfo "The documentation and sample configuration files are installed here:" - einfo " ${EROOT}usr/share/doc/${PF}" - fi - fi -} diff --git a/net-proxy/haproxy/haproxy-1.7_beta5.ebuild b/net-proxy/haproxy/haproxy-1.7_beta5.ebuild new file mode 100644 index 00000000..91b48a68 --- /dev/null +++ b/net-proxy/haproxy/haproxy-1.7_beta5.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="6" + +inherit user versionator toolchain-funcs flag-o-matic systemd linux-info + +MY_P="${PN}-${PV/_beta/-dev}" + +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" +HOMEPAGE="http://haproxy.1wt.eu" +SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/devel/${MY_P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86" +IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua +REQUIRED_USE="pcre-jit? ( pcre ) + ?? ( slz zlib )" + +DEPEND=" + pcre? ( + dev-libs/libpcre + pcre-jit? ( dev-libs/libpcre[jit] ) + ) + ssl? ( + !libressl? ( dev-libs/openssl:0=[zlib?] ) + libressl? ( dev-libs/libressl:0= ) + ) + slz? ( dev-libs/libslz:= ) + zlib? ( sys-libs/zlib )" +# lua? ( dev-lang/lua:5.3 ) +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS ) + +haproxy_use() { + (( $# != 2 )) && die "${FUNCNAME} " + + usex "${1}" "USE_${2}=1" "USE_${2}=" +} + +pkg_setup() { + enewgroup haproxy + enewuser haproxy -1 -1 -1 haproxy + + if use net_ns; then + CONFIG_CHECK="~NET_NS" + linux-info_pkg_setup + fi +} + +src_prepare() { + default + + sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \ + > contrib/systemd/haproxy.service || die + + sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die +} + +src_compile() { + local -a args=( + TARGET=linux2628 + USE_GETADDRINFO=1 + ) + + args+=( $(haproxy_use crypt LIBCRYPT) ) + +# bug 541042 +# args+=( $(haproxy_use lua LUA) ) + + args+=( $(haproxy_use net_ns NS) ) + args+=( $(haproxy_use pcre PCRE) ) + args+=( $(haproxy_use pcre-jit PCRE_JIT) ) + args+=( $(haproxy_use ssl OPENSSL) ) + args+=( $(haproxy_use slz SLZ) ) + args+=( $(haproxy_use zlib ZLIB) ) + + # For now, until the strict-aliasing breakage will be fixed + append-cflags -fno-strict-aliasing + + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} + + if use tools ; then + for contrib in halog iprange ; do + emake -C contrib/${contrib} \ + CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} + done + fi +} + +src_install() { + dobin haproxy + + newconfd "${FILESDIR}/${PN}.confd" $PN + newinitd "${FILESDIR}/${PN}.initd-r3" $PN + + doman doc/haproxy.1 + + dobin haproxy-systemd-wrapper + systemd_dounit contrib/systemd/haproxy.service + + einstalldocs + + if use doc; then + dodoc ROADMAP doc/{close-options,configuration,cookie-options,intro,linux-syn-cookies,management,proxy-protocol}.txt + fi + + if use tools ; then + dobin contrib/halog/halog + newbin contrib/iprange/iprange haproxy_iprange + fi + + if use net_ns && use doc; then + dodoc doc/network-namespaces.txt + fi + + if use examples ; then + docinto examples + dodoc examples/*.cfg + dodoc examples/seamless_reload.txt + fi + + if use vim-syntax ; then + insinto /usr/share/vim/vimfiles/syntax + doins examples/haproxy.vim + fi +} + +pkg_postinst() { + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." + ewarn "Make use of them with the \"user\" and \"group\" directives." + + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then + einfo "Please consult the installed documentation for learning the configuration file's syntax." + einfo "The documentation and sample configuration files are installed here:" + einfo " ${EROOT}usr/share/doc/${PF}" + fi + fi +} -- cgit v1.2.3