Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/haproxy/
Date: Sun, 25 Dec 2016 21:21:39
Message-Id: 1482700889.1bb6c3f473858c744e0af80e74e718b3c00ac769.robbat2@gentoo
1 commit: 1bb6c3f473858c744e0af80e74e718b3c00ac769
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 25 21:21:15 2016 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 25 21:21:29 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bb6c3f4
7
8 haproxy: bump.
9
10 Package-Manager: portage-2.3.2
11
12 net-proxy/haproxy/Manifest | 2 +
13 net-proxy/haproxy/haproxy-1.5.19.ebuild | 140 +++++++++++++++++++++++++++
14 net-proxy/haproxy/haproxy-1.6.11.ebuild | 165 ++++++++++++++++++++++++++++++++
15 3 files changed, 307 insertions(+)
16
17 diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
18 index 876d33a..96f87e6 100644
19 --- a/net-proxy/haproxy/Manifest
20 +++ b/net-proxy/haproxy/Manifest
21 @@ -1,6 +1,8 @@
22 DIST haproxy-1.5.14.tar.gz 1345345 SHA256 9565dd38649064d0350a2883fa81ccfe92eb17dcda457ebdc01535e1ab0c8f99 SHA512 83d6101fd402f37845ab3febc914335e4c6d9bdebbb0ff81c8e048d5252ffa5a1b77c4250a434fed5dd541ef1f1f2c47d969b59f7a51d6ab9aea38a8646a9798 WHIRLPOOL 7d2c580589b9b31e1eba169e4bf930ac42d2564e21eb1c25adbdd39b701abd221fd671ebc227167ab956a48b2c30eeb740a6394355a8fa748c408ee42fdff6fc
23 DIST haproxy-1.5.18.tar.gz 1360582 SHA256 14a5684d85cf65c34a8d441afff2aaa4dd9b4234e81b3d4ddd242e6e7c97257e SHA512 b4f85986a6b1e0d152b643f576a0ff770fbc190457d3e0130fbb923ff9bf4d00b634e64edf0eadd5b47d0eb758fd9f6ecf33907fc4c21150a518064df954e7d0 WHIRLPOOL 5faf0aec42332564a3c392b0bbca25dc56c6a754672e1853ca765fc5d95d9ca963cd041dc705bbb38085a3da77219adf061966f2caa209e327ff02f3ee8fde3b
24 +DIST haproxy-1.5.19.tar.gz 1362834 SHA256 e00ae2a633da614967f2e3ebebdb817ec537cba8383b833fc8d9a506876e0d5e SHA512 3462458350d76fe5634428f7b443f21e2d8d4a171ab6254736db2d64587707d11d0df1d851d629c5a2cdfb2858e98cc9345d592859c6d6d8a352b57542dc465a WHIRLPOOL 0cb297dd48e8b9e0c2d6291aa7549c0b6b11e75c58ace3bd50205d7218cf95187129126b21cd13572e0287fc5b311c94ad2ccf664ff30d83a3bc782aea7714ff
25 DIST haproxy-1.6.10.tar.gz 1571842 SHA256 5c865e0238d31b03ec7e31d4bf1a20d08984eea7fcf4bbb36a40bd35d8744460 SHA512 84920ef12357f5149ed286030ea38e0f9ae09b29003e8c000eef7f50a519ea958f3a92d352b25fd71d296f0b68beffb797ca4b6e59b87e71dc02f7fe20d50573 WHIRLPOOL 2c4d4b22d6412b8f7e4e6c3c94e9a666b87d9e38a6cb07094438d28c5cce2c4ef1fe14df00afeb8ed284f306d5a09616d04a1b4a5b8573c6e8d283cdfe26428b
26 +DIST haproxy-1.6.11.tar.gz 1574029 SHA256 62fe982edb102a9f55205792bc14b0d05745cc7993cd6bee5d73cd3c5ae16ace SHA512 73ff1c7301197b3bd75a3b1355787419676854d132ce2dcdacb2a296e297dcdfc52b0c571a4fb715e369f1126e1a58196fabb21f828c880f15904032da78e434 WHIRLPOOL 4454c51da89bb089579aefcf54093fd4c09b42918e81e41772d263ebc19f243a37b42135a02c4012705e4cc31370f377cf0b429e81707f307cffe9ed23f5183b
27 DIST haproxy-1.6.9.tar.gz 1566715 SHA256 cf7d2fa891d2ae4aa6489fc43a9cadf68c42f9cb0de4801afad45d32e7dda133 SHA512 0060a93c628689e1ca9e5845f9f93641f7647efc176cbf093bce59be19496492c317c8101fa50dd6181b130f861c74a20199f18e41ebd6995715364b1ea46a2e WHIRLPOOL a7311cb08507898cf19a422a6a55a6d429cbb99e0329b2de0defea472314c495d6c426a973ef436d532340f95d5abee2ad07fbf1d051d36fe4618ac28b743a35
28 DIST haproxy-1.7.0.tar.gz 1728237 SHA256 abdce486f98c024f3df45dade4011caeb925f48129370f4754a45f1623794622 SHA512 e41c4d73e438f3975dd704de5048eb1179cfa884ae16970d868d8ae7e0958ee0ab5bd58a952113e90b89c040cb84402dafd4ae6e4daf03ea6621e03b861837c7 WHIRLPOOL a82563956cad92ccb257cfe202a43ea1cae3c2b4fa36fb954829096e55b524cbe224080669f60a8b62e38e73e682321a50a59e3d650a6b0ae340d3bf24a9768d
29 DIST haproxy-1.7.1.tar.gz 1730401 SHA256 56a7f5e919755d9b01b64f91b497c2c4eabdbe3a6fd84f7e5192a264097d8759 SHA512 97dd81493a8902efd1b15171ace2da16f77feb537657e22c28f0ace3c05600f860e4d6f70a40f6fde8f0701e5399f8a4a7d982d4acf9cbccda6e2cf7dbe6f68e WHIRLPOOL 5bed6c02e888f2193574881be16c6bb87041438486edf73f2bcbaeda4394012d966465645c95e8a0e9fc30e3c306a327589a603e48b0dc880b6499876bb39116
30
31 diff --git a/net-proxy/haproxy/haproxy-1.5.19.ebuild b/net-proxy/haproxy/haproxy-1.5.19.ebuild
32 new file mode 100644
33 index 00000000..56a14f5
34 --- /dev/null
35 +++ b/net-proxy/haproxy/haproxy-1.5.19.ebuild
36 @@ -0,0 +1,140 @@
37 +# Copyright 1999-2016 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +# $Id$
40 +
41 +EAPI="5"
42 +
43 +inherit user versionator toolchain-funcs flag-o-matic systemd
44 +
45 +MY_P="${PN}-${PV/_beta/-dev}"
46 +
47 +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
48 +HOMEPAGE="http://haproxy.1wt.eu"
49 +SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
50 +
51 +LICENSE="GPL-2 LGPL-2.1"
52 +SLOT="0"
53 +KEYWORDS="~amd64 ~arm ~ppc ~x86"
54 +IUSE="+crypt examples libressl +pcre pcre-jit ssl tools vim-syntax +zlib"
55 +
56 +DEPEND="
57 + pcre? (
58 + dev-libs/libpcre
59 + pcre-jit? ( dev-libs/libpcre[jit] )
60 + )
61 + ssl? (
62 + !libressl? ( dev-libs/openssl:0=[zlib?] )
63 + libressl? ( dev-libs/libressl:0= )
64 + )
65 + zlib? ( sys-libs/zlib )"
66 +RDEPEND="${DEPEND}"
67 +
68 +S="${WORKDIR}/${MY_P}"
69 +
70 +pkg_setup() {
71 + enewgroup haproxy
72 + enewuser haproxy -1 -1 -1 haproxy
73 +}
74 +
75 +src_prepare() {
76 + sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
77 + > contrib/systemd/haproxy.service || die
78 +
79 + sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
80 +}
81 +
82 +src_compile() {
83 + local args="TARGET=linux2628 USE_GETADDRINFO=1"
84 +
85 + if use pcre ; then
86 + args="${args} USE_PCRE=1"
87 + if use pcre-jit; then
88 + args="${args} USE_PCRE_JIT=1"
89 + else
90 + args="${args} USE_PCRE_JIT="
91 + fi
92 + else
93 + args="${args} USE_PCRE= USE_PCRE_JIT="
94 + fi
95 +
96 +# if use kernel_linux; then
97 +# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
98 +# else
99 +# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY="
100 +# fi
101 +
102 + if use crypt ; then
103 + args="${args} USE_LIBCRYPT=1"
104 + else
105 + args="${args} USE_LIBCRYPT="
106 + fi
107 +
108 + if use ssl ; then
109 + args="${args} USE_OPENSSL=1"
110 + else
111 + args="${args} USE_OPENSSL="
112 + fi
113 +
114 + if use zlib ; then
115 + args="${args} USE_ZLIB=1"
116 + else
117 + args="${args} USE_ZLIB="
118 + fi
119 +
120 + # For now, until the strict-aliasing breakage will be fixed
121 + append-cflags -fno-strict-aliasing
122 +
123 + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
124 +
125 + if use tools ; then
126 + for contrib in halog iprange ; do
127 + emake -C contrib/${contrib} \
128 + CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
129 + done
130 + fi
131 +}
132 +
133 +src_install() {
134 + dobin haproxy
135 +
136 + newinitd "${FILESDIR}/haproxy.initd-r2" haproxy
137 +
138 + # Don't install useless files
139 +# rm examples/build.cfg doc/*gpl.txt
140 +
141 + dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt
142 + doman doc/haproxy.1
143 +
144 + dobin haproxy-systemd-wrapper
145 + systemd_dounit contrib/systemd/haproxy.service
146 +
147 + if use tools ; then
148 + for contrib in halog iprange ; do
149 + dobin contrib/${contrib}/${contrib}
150 + done
151 + fi
152 +
153 + if use examples ; then
154 + docinto examples
155 + dodoc examples/*.cfg
156 + fi
157 +
158 + if use vim-syntax ; then
159 + insinto /usr/share/vim/vimfiles/syntax
160 + doins examples/haproxy.vim
161 + fi
162 +}
163 +
164 +pkg_postinst() {
165 + if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
166 + ewarn "You need to create /etc/haproxy.cfg before you start the haproxy service."
167 + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
168 + ewarn "Make use of them with the \"user\" and \"group\" directives."
169 +
170 + if [[ -d "${ROOT}/usr/share/doc/${PF}" ]]; then
171 + einfo "Please consult the installed documentation for learning the configuration file's syntax."
172 + einfo "The documentation and sample configuration files are installed here:"
173 + einfo " ${ROOT}usr/share/doc/${PF}"
174 + fi
175 + fi
176 +}
177
178 diff --git a/net-proxy/haproxy/haproxy-1.6.11.ebuild b/net-proxy/haproxy/haproxy-1.6.11.ebuild
179 new file mode 100644
180 index 00000000..df81d1e
181 --- /dev/null
182 +++ b/net-proxy/haproxy/haproxy-1.6.11.ebuild
183 @@ -0,0 +1,165 @@
184 +# Copyright 1999-2016 Gentoo Foundation
185 +# Distributed under the terms of the GNU General Public License v2
186 +# $Id$
187 +
188 +EAPI="6"
189 +
190 +[[ ${PV} == *9999 ]] && SCM="git-r3"
191 +inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM
192 +
193 +MY_P="${PN}-${PV/_beta/-dev}"
194 +
195 +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
196 +HOMEPAGE="http://haproxy.1wt.eu"
197 +if [[ ${PV} != *9999 ]]; then
198 + SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
199 + KEYWORDS="~amd64 ~arm ~ppc ~x86"
200 +else
201 + EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
202 + EGIT_BRANCH=master
203 +fi
204 +
205 +LICENSE="GPL-2 LGPL-2.1"
206 +SLOT="0"
207 +IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
208 +REQUIRED_USE="pcre-jit? ( pcre )
209 + ?? ( slz zlib )"
210 +
211 +DEPEND="
212 + pcre? (
213 + dev-libs/libpcre
214 + pcre-jit? ( dev-libs/libpcre[jit] )
215 + )
216 + ssl? (
217 + !libressl? ( dev-libs/openssl:0=[zlib?] )
218 + libressl? ( dev-libs/libressl:0= )
219 + )
220 + slz? ( dev-libs/libslz:= )
221 + zlib? ( sys-libs/zlib )
222 + lua? ( dev-lang/lua:5.3 )
223 + device-atlas? ( dev-libs/device-atlas-api-c )"
224 +RDEPEND="${DEPEND}"
225 +
226 +S="${WORKDIR}/${MY_P}"
227 +
228 +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
229 +version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch )
230 +CONTRIBS=( halog iprange )
231 +# ip6range is present in 1.6, but broken.
232 +version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
233 +
234 +haproxy_use() {
235 + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
236 +
237 + usex "${1}" "USE_${2}=1" "USE_${2}="
238 +}
239 +
240 +pkg_setup() {
241 + enewgroup haproxy
242 + enewuser haproxy -1 -1 -1 haproxy
243 +
244 + if use net_ns; then
245 + CONFIG_CHECK="~NET_NS"
246 + linux-info_pkg_setup
247 + fi
248 +}
249 +
250 +src_prepare() {
251 + default
252 +
253 + sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
254 + > contrib/systemd/haproxy.service || die
255 +
256 + sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
257 +}
258 +
259 +src_compile() {
260 + local -a args=(
261 + TARGET=linux2628
262 + USE_GETADDRINFO=1
263 + USE_TFO=1
264 + )
265 +
266 + args+=( $(haproxy_use crypt LIBCRYPT) )
267 + args+=( $(haproxy_use net_ns NS) )
268 + args+=( $(haproxy_use pcre PCRE) )
269 + args+=( $(haproxy_use pcre-jit PCRE_JIT) )
270 + args+=( $(haproxy_use ssl OPENSSL) )
271 + args+=( $(haproxy_use slz SLZ) )
272 + args+=( $(haproxy_use zlib ZLIB) )
273 + args+=( $(haproxy_use lua LUA) )
274 + args+=( $(haproxy_use 51degrees 51DEGREES) )
275 + args+=( $(haproxy_use device-atlas DEVICEATLAS) )
276 + args+=( $(haproxy_use wurfl WURFL) )
277 +
278 + # For now, until the strict-aliasing breakage will be fixed
279 + append-cflags -fno-strict-aliasing
280 +
281 + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
282 +
283 + if use tools ; then
284 + for contrib in ${CONTRIBS[@]} ; do
285 + emake -C contrib/${contrib} \
286 + CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
287 + done
288 + fi
289 +}
290 +
291 +src_install() {
292 + dobin haproxy
293 +
294 + newconfd "${FILESDIR}/${PN}.confd" $PN
295 + newinitd "${FILESDIR}/${PN}.initd-r3" $PN
296 +
297 + doman doc/haproxy.1
298 +
299 + dobin haproxy-systemd-wrapper
300 + systemd_dounit contrib/systemd/haproxy.service
301 +
302 + einstalldocs
303 +
304 + # The errorfiles are used by upstream defaults.
305 + insinto /etc/haproxy/errors/
306 + doins examples/errorfiles/*
307 +
308 + if use doc; then
309 + dodoc ROADMAP doc/*.txt
310 + #if use lua; then
311 + # TODO: doc/lua-api/
312 + #fi
313 + fi
314 +
315 + if use tools ; then
316 + has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
317 + has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
318 + has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
319 + has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
320 + has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
321 + has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
322 + fi
323 +
324 + if use examples ; then
325 + docinto examples
326 + dodoc examples/*.cfg
327 + dodoc examples/seamless_reload.txt
328 + fi
329 +
330 + if use vim-syntax ; then
331 + insinto /usr/share/vim/vimfiles/syntax
332 + doins examples/haproxy.vim
333 + fi
334 +}
335 +
336 +pkg_postinst() {
337 + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
338 + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
339 + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
340 + ewarn "Make use of them with the \"user\" and \"group\" directives."
341 +
342 + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
343 + einfo "Please consult the installed documentation for learning the configuration file's syntax."
344 + einfo "The documentation and sample configuration files are installed here:"
345 + einfo " ${EROOT}usr/share/doc/${PF}"
346 + fi
347 + fi
348 +}