Gentoo Archives: gentoo-commits

From: Christian Ruppert <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/haproxy/
Date: Fri, 13 May 2022 15:56:32
Message-Id: 1652457383.dea781823431cd4e3b2c5311b47a23a29f458b5d.idl0r@gentoo
1 commit: dea781823431cd4e3b2c5311b47a23a29f458b5d
2 Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 13 15:55:03 2022 +0000
4 Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
5 CommitDate: Fri May 13 15:56:23 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dea78182
7
8 net-proxy/haproxy: Bumps
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org>
12
13 net-proxy/haproxy/Manifest | 4 +
14 net-proxy/haproxy/haproxy-2.0.29.ebuild | 181 ++++++++++++++++++++++++++++++++
15 net-proxy/haproxy/haproxy-2.2.24.ebuild | 181 ++++++++++++++++++++++++++++++++
16 net-proxy/haproxy/haproxy-2.4.17.ebuild | 177 +++++++++++++++++++++++++++++++
17 net-proxy/haproxy/haproxy-2.5.7.ebuild | 177 +++++++++++++++++++++++++++++++
18 5 files changed, 720 insertions(+)
19
20 diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
21 index 1ebe48233094..1098d614cf12 100644
22 --- a/net-proxy/haproxy/Manifest
23 +++ b/net-proxy/haproxy/Manifest
24 @@ -1,13 +1,17 @@
25 DIST haproxy-2.0.25.tar.gz 2707840 BLAKE2B cd85d233623f2791bff8ada00d9ac4ea3743e2c1fbccd45a6fd56b7cc0ae5904619b50849a23576f0a6d21ae2798166acd41692d0311bcf361355dc6ee0da790 SHA512 2c238844a8c82f877d3039b20b76fd22717f95a4e5d94a0bfd501c6e134042ef744d3731fc0ccced0a94e5cb1c1822d3272ed961e07bd9acc4d637eba0529155
26 DIST haproxy-2.0.27.tar.gz 2716937 BLAKE2B 08ab2905b26b8e33068af77f3a153dc489f509436451d2711f9929100ecebfbec9edd14b449c48739b1d20990431fa6a8b49e4fc98d32ade5c1688f72d310f63 SHA512 339a013cb11778ed444370ff1887b4db121947784bda08f818a39b98261d02a5ebeb681ef7040cbb0e493d89c5b8e2c5a32f0cdccf9e89a6327e9d95cc6d5891
27 DIST haproxy-2.0.28.tar.gz 2721568 BLAKE2B c4c7db2836e6296b038825de2467144ec40995182363f7924638f0edb91bdbca383e2a2114f6973445aa2b5933a7c2014643cde66fec81dff562123f89525cfc SHA512 77d1d6cc4a03476e2216568ff687163c98abe380063700fded384fec5bc217f2cfebe335b0c64b8f4adfb80e75eddb7a71b6217064daa73290756871514bf550
28 +DIST haproxy-2.0.29.tar.gz 2722893 BLAKE2B 1f4763ef87c32cb93fcba58ad428938bf08295236d6cc7b81f2098a2a74d26d41af2bac70d9994c1108815caf58e37bcf6c84518c41514a8c8cce5fae60383c4 SHA512 e635a522d62fea040e996f0a518419c7d4a49e3770b2fc15a5cbf1aa98ccf42b8d698a9bf260ae6658bc4896510a8b056487af8f2cf023a1fc97172cc110f553
29 DIST haproxy-2.2.17.tar.gz 2933836 BLAKE2B 750d2c5048f994442d13c05ce6624731d296462951ee2e86110467d517a6708b498e98260a3f0770e110dc5c2cb2bdd746fb76f23ba7cebc1642b0b9c8124a67 SHA512 174197e1e0915a6ae6062b9a070f16102ac7f3429f991f36cdb2e2cce587bd26059bd1dc71a368f904bcdecd292ab5926715160400ae96d498d902aac356864f
30 DIST haproxy-2.2.21.tar.gz 2947789 BLAKE2B 3462f0a67070bd61266cc67d7d419dfb9e209314982f2035bdce6b905f9fe567780669adc09905598a6129152dbb77416790976249076935fcb90e7e03767284 SHA512 2404bf0938b88c3249668bef1f13195973c5b1db8dc056ed9d5b882b8cdabf71076b73de723e8d3d0d953193294edea4acac5edeee8ac472e93ae0bd917bf99b
31 DIST haproxy-2.2.22.tar.gz 2949092 BLAKE2B 3dc7183f31cd0a95be516fbedab1eacae00761f8f2bee8478cd0c446f80c4f40c7012b64485bc598d124e3430611f6b9a748c68e1b6b379519af5308e3ed4c20 SHA512 4a99d196257fb3c99a1d76d6f9a714c673226821439b67f646fa04033f31af9ac8f783f5a984c143372d79d728476aa8b2b35d8a2f31b7fc86c09b8f9ad65615
32 DIST haproxy-2.2.23.tar.gz 2950408 BLAKE2B a718355c1ecaf4d5728b4464fee0b65bcd4c133929be315e17e8a782618031a7508c2172d7e66790b819b884df8d813d399af9aa12cd395079b8e035e37bb76a SHA512 8e4f0e72fbeae0bf31533c74f9d518f4825702f1f7b36137a224a35ba08cbeefbbf587fa0b7ca11cb7306bf64eebc0d0e8aead505a1d53037148e1572c831ff4
33 +DIST haproxy-2.2.24.tar.gz 2952103 BLAKE2B 4e795c06ed329619135d553210e70d1abf57e20a27e857ea26f003cd9fcebba2ea964581fa9d1f33067fb3faa7304806f3a598d2e2b0c08d6c1d4593ad01203c SHA512 021d065e53503248de122fdd9431786b9f375a5f87aca76f870e17e44c8c4001a778bfb4e430b28af781a3f175f3643a549e363e964210c717f212c5966e68d8
34 DIST haproxy-2.4.14.tar.gz 3613642 BLAKE2B b45af8f62cefead1f471b0b61e9bc262dc25e0ca99898469d7702fb6e509cf2b9a9c201f8c6ecae948ef40c8fc8aec0351d8e10479752fdd5ccd66758f632799 SHA512 a4a5d449782dc2f1348d1f53ec266eef4ea4e1b0586e81730a01d818481c3a3cfb018ba1da5968d17bb6668e86017beccf7abefc563993b88a5af8cbd1da1943
35 DIST haproxy-2.4.15.tar.gz 3616441 BLAKE2B 425444a54e22cca8d15cb808283be3baefcd2ce56447d91bce3b4f4b7f6606e03d2eb8a242891c619cfd0fad9aba5bb84026c68d41f07cd55f083481df234899 SHA512 da6f6a4f021bfa719926f4c73dc559429357a77da2c560a4375d2edbb4f342a05548d39ce0a7e3346c305f1779e579a738d8442e8e9e01903f9c435a7b0b6d71
36 DIST haproxy-2.4.16.tar.gz 3621231 BLAKE2B 6cce1d230b0e1068421968adaa75fbaf26b029a6d54eab21ddd1e0e378fbd0d9a39060d946ca676393951e0565d3587eee49fd3badddac11b48794134be87801 SHA512 98c52699fbfeef8699a0d007664ff5be023f02e3eb32ba4d05a71bb4b1bcfa7ff0cb9fbcdd3d863c053cf6d7041168f63ef3fa04d11ab9aa0753c9be6812c0d8
37 +DIST haproxy-2.4.17.tar.gz 3623854 BLAKE2B 54797eb6a16a100951ee9e0bb972a7fbdd8ffd22bd1feccdf41743d86ff37b71de54109504ae339007533d41b507b1abb74d8219e4a06320a13e0fce3557b999 SHA512 98d46b6dbafd95977a32a6479266f3b9fe6e6ed57e39182a3d031add60dabfdaa7494083109a75eaa3e4b15d0293b11081f9b06556eee1777ede40ed6c002a7f
38 DIST haproxy-2.5.4.tar.gz 3819082 BLAKE2B fabc62ebaa968a11a49a6dd131198af31a49adbe73bcae82124ca752c2c90c1d77346621c9d804a10bca8ff254580aa7fbaca774f9df1a6a99ec112375d84a50 SHA512 95eb1ad9121a93cc77f0dd14e0080e18935cd45dc7dc511ab6dd0ecbdbb967bbde5eaa83f70157086796603560b979689f7d50b0cfba93d0245544c3a8c28a87
39 DIST haproxy-2.5.5.tar.gz 3821477 BLAKE2B 0680925026edf56f4369c71092c39f4ff3956a8cf04320326623b3031f719d62077acdca457a6cfd82f6bcbf510920113a0328a2d8cd4a208c3d9e49e1d431b5 SHA512 f68af2be330b0fa817f7611ff46e0d3e0cc52d024b20394a5f1eedf33e6774115ee6f35ecd82d33b9ecedea2fe5afcfa32270cee33a1f6ce1726d96cc8c0d821
40 DIST haproxy-2.5.6.tar.gz 3826838 BLAKE2B 571acbb5dd9fad6ee560a3db25e88815dad4278640730337257ac18ad670b1d69cd9669c7e6a60e03a784adc9c7d8aba8d4e035152d3c13072c1a05a1534facb SHA512 e97f422379af0589edf5c1dea949e95f76a7d1ce05ece75580248607f6c05cfda4a430390aca74f4d37c35de8af6d73c9a0768a699c231e11c8bb4194cb98d41
41 +DIST haproxy-2.5.7.tar.gz 3832801 BLAKE2B 6d54135b56f84129dea497ddc935fecf593abccfb21fc647c7d166f9c1aa4abc670c66bf13e0923e353627d83d47345f632ae8212672c3b3da7a757fd5d24d7c SHA512 cf6994508d559401a84e1304c2b6829952a9b3a14365d03436da42ec7e4553c201ffde9e524044dfa48813e8e614d24095a87b0fae7d9145ce5e66b953666ee9
42
43 diff --git a/net-proxy/haproxy/haproxy-2.0.29.ebuild b/net-proxy/haproxy/haproxy-2.0.29.ebuild
44 new file mode 100644
45 index 000000000000..4ec0188ead43
46 --- /dev/null
47 +++ b/net-proxy/haproxy/haproxy-2.0.29.ebuild
48 @@ -0,0 +1,181 @@
49 +# Copyright 1999-2022 Gentoo Authors
50 +# Distributed under the terms of the GNU General Public License v2
51 +
52 +EAPI="7"
53 +
54 +LUA_COMPAT=( lua5-3 )
55 +
56 +[[ ${PV} == *9999 ]] && SCM="git-r3"
57 +inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
58 +
59 +MY_P="${PN}-${PV/_beta/-dev}"
60 +
61 +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
62 +HOMEPAGE="http://www.haproxy.org"
63 +if [[ ${PV} != *9999 ]]; then
64 + SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz"
65 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
66 +elif [[ ${PV} == 9999 ]]; then
67 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy.git/"
68 + EGIT_BRANCH=master
69 +else
70 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/"
71 + EGIT_BRANCH=master
72 +fi
73 +
74 +LICENSE="GPL-2 LGPL-2.1"
75 +SLOT="0/$(ver_cut 1-2)"
76 +IUSE="+crypt doc examples slz +net_ns +pcre pcre-jit prometheus-exporter
77 +ssl systemd +threads tools vim-syntax +zlib lua 51degrees wurfl"
78 +REQUIRED_USE="pcre-jit? ( pcre )
79 + lua? ( ${LUA_REQUIRED_USE} )
80 + ?? ( slz zlib )"
81 +
82 +BDEPEND="virtual/pkgconfig"
83 +DEPEND="
84 + crypt? ( virtual/libcrypt:= )
85 + pcre? (
86 + dev-libs/libpcre2:=
87 + pcre-jit? ( dev-libs/libpcre2:=[jit] )
88 + )
89 + ssl? (
90 + dev-libs/openssl:0=
91 + )
92 + slz? ( dev-libs/libslz:= )
93 + systemd? ( sys-apps/systemd )
94 + zlib? ( sys-libs/zlib )
95 + lua? ( ${LUA_DEPS} )"
96 +RDEPEND="${DEPEND}
97 + acct-group/haproxy
98 + acct-user/haproxy"
99 +
100 +S="${WORKDIR}/${MY_P}"
101 +
102 +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
103 +CONTRIBS=( halog iprange )
104 +# ip6range is present in 1.6, but broken.
105 +ver_test ${PV} -ge 1.7.0 && CONTRIBS+=( ip6range spoa_example tcploop )
106 +# TODO: mod_defender - requires apache / APR, modsecurity - the same
107 +ver_test ${PV} -ge 1.8.0 && CONTRIBS+=( hpack )
108 +
109 +haproxy_use() {
110 + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
111 +
112 + usex "${1}" "USE_${2}=1" "USE_${2}="
113 +}
114 +
115 +pkg_setup() {
116 + use lua && lua-single_pkg_setup
117 + if use net_ns; then
118 + CONFIG_CHECK="~NET_NS"
119 + linux-info_pkg_setup
120 + fi
121 +}
122 +
123 +src_compile() {
124 + local -a args=(
125 + V=1
126 + TARGET=linux-glibc
127 + # Switching to PCRE2 by default, bug 838013
128 + PCRE=
129 + PCRE_JIT=
130 + )
131 +
132 + # TODO: PCRE2_WIDTH?
133 + args+=( $(haproxy_use threads THREAD) )
134 + args+=( $(haproxy_use crypt LIBCRYPT) )
135 + args+=( $(haproxy_use net_ns NS) )
136 + args+=( $(haproxy_use pcre PCRE2) )
137 + args+=( $(haproxy_use pcre-jit PCRE2_JIT) )
138 + args+=( $(haproxy_use ssl OPENSSL) )
139 + args+=( $(haproxy_use slz SLZ) )
140 + args+=( $(haproxy_use zlib ZLIB) )
141 + args+=( $(haproxy_use lua LUA) )
142 + args+=( $(haproxy_use 51degrees 51DEGREES) )
143 + args+=( $(haproxy_use wurfl WURFL) )
144 + args+=( $(haproxy_use systemd SYSTEMD) )
145 +
146 + # For now, until the strict-aliasing breakage will be fixed
147 + append-cflags -fno-strict-aliasing
148 +
149 + # Bug #668002
150 + if use ppc || use arm || use hppa; then
151 + TARGET_LDFLAGS=-latomic
152 + fi
153 +
154 + if use prometheus-exporter; then
155 + EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
156 + fi
157 +
158 + # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing
159 + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" ${args[@]}
160 + emake -C contrib/systemd SBINDIR=/usr/sbin
161 +
162 + if use tools ; then
163 + for contrib in ${CONTRIBS[@]} ; do
164 + # Those two includes are a workaround for hpack Makefile missing those
165 + emake -C contrib/${contrib} \
166 + CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" ${args[@]}
167 + done
168 + fi
169 +}
170 +
171 +src_install() {
172 + dosbin haproxy
173 + dosym ../sbin/haproxy /usr/bin/haproxy
174 +
175 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
176 + newinitd "${FILESDIR}/${PN}.initd-r7" ${PN}
177 +
178 + doman doc/haproxy.1
179 +
180 + systemd_dounit contrib/systemd/haproxy.service
181 +
182 + einstalldocs
183 +
184 + # The errorfiles are used by upstream defaults.
185 + insinto /etc/haproxy/errors/
186 + doins examples/errorfiles/*
187 +
188 + if use doc; then
189 + dodoc ROADMAP doc/*.txt
190 + #if use lua; then
191 + # TODO: doc/lua-api/
192 + #fi
193 + fi
194 +
195 + if use tools ; then
196 + has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
197 + has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
198 + has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
199 + has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
200 + has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
201 + has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
202 + has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack
203 + fi
204 +
205 + if use examples ; then
206 + docinto examples
207 + dodoc examples/*.cfg
208 + dodoc doc/seamless_reload.txt
209 + fi
210 +
211 + if use vim-syntax ; then
212 + insinto /usr/share/vim/vimfiles/syntax
213 + doins contrib/syntax-highlight/haproxy.vim
214 + fi
215 +}
216 +
217 +pkg_postinst() {
218 + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
219 + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
220 + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
221 + ewarn "Make use of them with the \"user\" and \"group\" directives."
222 +
223 + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
224 + einfo "Please consult the installed documentation for learning the configuration file's syntax."
225 + einfo "The documentation and sample configuration files are installed here:"
226 + einfo " ${EROOT}/usr/share/doc/${PF}"
227 + fi
228 + fi
229 +}
230
231 diff --git a/net-proxy/haproxy/haproxy-2.2.24.ebuild b/net-proxy/haproxy/haproxy-2.2.24.ebuild
232 new file mode 100644
233 index 000000000000..4ec0188ead43
234 --- /dev/null
235 +++ b/net-proxy/haproxy/haproxy-2.2.24.ebuild
236 @@ -0,0 +1,181 @@
237 +# Copyright 1999-2022 Gentoo Authors
238 +# Distributed under the terms of the GNU General Public License v2
239 +
240 +EAPI="7"
241 +
242 +LUA_COMPAT=( lua5-3 )
243 +
244 +[[ ${PV} == *9999 ]] && SCM="git-r3"
245 +inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
246 +
247 +MY_P="${PN}-${PV/_beta/-dev}"
248 +
249 +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
250 +HOMEPAGE="http://www.haproxy.org"
251 +if [[ ${PV} != *9999 ]]; then
252 + SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz"
253 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
254 +elif [[ ${PV} == 9999 ]]; then
255 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy.git/"
256 + EGIT_BRANCH=master
257 +else
258 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/"
259 + EGIT_BRANCH=master
260 +fi
261 +
262 +LICENSE="GPL-2 LGPL-2.1"
263 +SLOT="0/$(ver_cut 1-2)"
264 +IUSE="+crypt doc examples slz +net_ns +pcre pcre-jit prometheus-exporter
265 +ssl systemd +threads tools vim-syntax +zlib lua 51degrees wurfl"
266 +REQUIRED_USE="pcre-jit? ( pcre )
267 + lua? ( ${LUA_REQUIRED_USE} )
268 + ?? ( slz zlib )"
269 +
270 +BDEPEND="virtual/pkgconfig"
271 +DEPEND="
272 + crypt? ( virtual/libcrypt:= )
273 + pcre? (
274 + dev-libs/libpcre2:=
275 + pcre-jit? ( dev-libs/libpcre2:=[jit] )
276 + )
277 + ssl? (
278 + dev-libs/openssl:0=
279 + )
280 + slz? ( dev-libs/libslz:= )
281 + systemd? ( sys-apps/systemd )
282 + zlib? ( sys-libs/zlib )
283 + lua? ( ${LUA_DEPS} )"
284 +RDEPEND="${DEPEND}
285 + acct-group/haproxy
286 + acct-user/haproxy"
287 +
288 +S="${WORKDIR}/${MY_P}"
289 +
290 +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
291 +CONTRIBS=( halog iprange )
292 +# ip6range is present in 1.6, but broken.
293 +ver_test ${PV} -ge 1.7.0 && CONTRIBS+=( ip6range spoa_example tcploop )
294 +# TODO: mod_defender - requires apache / APR, modsecurity - the same
295 +ver_test ${PV} -ge 1.8.0 && CONTRIBS+=( hpack )
296 +
297 +haproxy_use() {
298 + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
299 +
300 + usex "${1}" "USE_${2}=1" "USE_${2}="
301 +}
302 +
303 +pkg_setup() {
304 + use lua && lua-single_pkg_setup
305 + if use net_ns; then
306 + CONFIG_CHECK="~NET_NS"
307 + linux-info_pkg_setup
308 + fi
309 +}
310 +
311 +src_compile() {
312 + local -a args=(
313 + V=1
314 + TARGET=linux-glibc
315 + # Switching to PCRE2 by default, bug 838013
316 + PCRE=
317 + PCRE_JIT=
318 + )
319 +
320 + # TODO: PCRE2_WIDTH?
321 + args+=( $(haproxy_use threads THREAD) )
322 + args+=( $(haproxy_use crypt LIBCRYPT) )
323 + args+=( $(haproxy_use net_ns NS) )
324 + args+=( $(haproxy_use pcre PCRE2) )
325 + args+=( $(haproxy_use pcre-jit PCRE2_JIT) )
326 + args+=( $(haproxy_use ssl OPENSSL) )
327 + args+=( $(haproxy_use slz SLZ) )
328 + args+=( $(haproxy_use zlib ZLIB) )
329 + args+=( $(haproxy_use lua LUA) )
330 + args+=( $(haproxy_use 51degrees 51DEGREES) )
331 + args+=( $(haproxy_use wurfl WURFL) )
332 + args+=( $(haproxy_use systemd SYSTEMD) )
333 +
334 + # For now, until the strict-aliasing breakage will be fixed
335 + append-cflags -fno-strict-aliasing
336 +
337 + # Bug #668002
338 + if use ppc || use arm || use hppa; then
339 + TARGET_LDFLAGS=-latomic
340 + fi
341 +
342 + if use prometheus-exporter; then
343 + EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
344 + fi
345 +
346 + # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing
347 + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" ${args[@]}
348 + emake -C contrib/systemd SBINDIR=/usr/sbin
349 +
350 + if use tools ; then
351 + for contrib in ${CONTRIBS[@]} ; do
352 + # Those two includes are a workaround for hpack Makefile missing those
353 + emake -C contrib/${contrib} \
354 + CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" ${args[@]}
355 + done
356 + fi
357 +}
358 +
359 +src_install() {
360 + dosbin haproxy
361 + dosym ../sbin/haproxy /usr/bin/haproxy
362 +
363 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
364 + newinitd "${FILESDIR}/${PN}.initd-r7" ${PN}
365 +
366 + doman doc/haproxy.1
367 +
368 + systemd_dounit contrib/systemd/haproxy.service
369 +
370 + einstalldocs
371 +
372 + # The errorfiles are used by upstream defaults.
373 + insinto /etc/haproxy/errors/
374 + doins examples/errorfiles/*
375 +
376 + if use doc; then
377 + dodoc ROADMAP doc/*.txt
378 + #if use lua; then
379 + # TODO: doc/lua-api/
380 + #fi
381 + fi
382 +
383 + if use tools ; then
384 + has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
385 + has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
386 + has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
387 + has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
388 + has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
389 + has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
390 + has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack
391 + fi
392 +
393 + if use examples ; then
394 + docinto examples
395 + dodoc examples/*.cfg
396 + dodoc doc/seamless_reload.txt
397 + fi
398 +
399 + if use vim-syntax ; then
400 + insinto /usr/share/vim/vimfiles/syntax
401 + doins contrib/syntax-highlight/haproxy.vim
402 + fi
403 +}
404 +
405 +pkg_postinst() {
406 + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
407 + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
408 + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
409 + ewarn "Make use of them with the \"user\" and \"group\" directives."
410 +
411 + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
412 + einfo "Please consult the installed documentation for learning the configuration file's syntax."
413 + einfo "The documentation and sample configuration files are installed here:"
414 + einfo " ${EROOT}/usr/share/doc/${PF}"
415 + fi
416 + fi
417 +}
418
419 diff --git a/net-proxy/haproxy/haproxy-2.4.17.ebuild b/net-proxy/haproxy/haproxy-2.4.17.ebuild
420 new file mode 100644
421 index 000000000000..959a7a9dac4f
422 --- /dev/null
423 +++ b/net-proxy/haproxy/haproxy-2.4.17.ebuild
424 @@ -0,0 +1,177 @@
425 +# Copyright 1999-2022 Gentoo Authors
426 +# Distributed under the terms of the GNU General Public License v2
427 +
428 +EAPI="7"
429 +
430 +LUA_COMPAT=( lua5-3 )
431 +
432 +[[ ${PV} == *9999 ]] && SCM="git-r3"
433 +inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
434 +
435 +MY_P="${PN}-${PV/_beta/-dev}"
436 +
437 +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
438 +HOMEPAGE="http://www.haproxy.org"
439 +if [[ ${PV} != *9999 ]]; then
440 + SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz"
441 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
442 +elif [[ ${PV} == 9999 ]]; then
443 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy.git/"
444 + EGIT_BRANCH=master
445 +else
446 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/"
447 + EGIT_BRANCH=master
448 +fi
449 +
450 +LICENSE="GPL-2 LGPL-2.1"
451 +SLOT="0/$(ver_cut 1-2)"
452 +IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit prometheus-exporter
453 +ssl systemd +threads tools vim-syntax zlib lua 51degrees wurfl"
454 +REQUIRED_USE="pcre-jit? ( pcre )
455 + lua? ( ${LUA_REQUIRED_USE} )
456 + ?? ( slz zlib )"
457 +
458 +BDEPEND="virtual/pkgconfig"
459 +DEPEND="
460 + crypt? ( virtual/libcrypt:= )
461 + pcre? (
462 + dev-libs/libpcre2:=
463 + pcre-jit? ( dev-libs/libpcre2:=[jit] )
464 + )
465 + ssl? (
466 + dev-libs/openssl:0=
467 + )
468 + systemd? ( sys-apps/systemd )
469 + zlib? ( sys-libs/zlib )
470 + lua? ( ${LUA_DEPS} )"
471 +RDEPEND="${DEPEND}
472 + acct-group/haproxy
473 + acct-user/haproxy"
474 +
475 +S="${WORKDIR}/${MY_P}"
476 +
477 +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
478 +EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack )
479 +
480 +haproxy_use() {
481 + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
482 +
483 + usex "${1}" "USE_${2}=1" "USE_${2}="
484 +}
485 +
486 +pkg_setup() {
487 + use lua && lua-single_pkg_setup
488 + if use net_ns; then
489 + CONFIG_CHECK="~NET_NS"
490 + linux-info_pkg_setup
491 + fi
492 +}
493 +
494 +src_compile() {
495 + local -a args=(
496 + V=1
497 + TARGET=linux-glibc
498 + # Switching to PCRE2 by default, bug 838013
499 + PCRE=
500 + PCRE_JIT=
501 + )
502 +
503 + # TODO: PCRE2_WIDTH?
504 + args+=( $(haproxy_use threads THREAD) )
505 + args+=( $(haproxy_use crypt LIBCRYPT) )
506 + args+=( $(haproxy_use net_ns NS) )
507 + args+=( $(haproxy_use pcre PCRE2) )
508 + args+=( $(haproxy_use pcre-jit PCRE2_JIT) )
509 + args+=( $(haproxy_use ssl OPENSSL) )
510 + args+=( $(haproxy_use slz SLZ) )
511 + args+=( $(haproxy_use zlib ZLIB) )
512 + args+=( $(haproxy_use lua LUA) )
513 + args+=( $(haproxy_use 51degrees 51DEGREES) )
514 + args+=( $(haproxy_use wurfl WURFL) )
515 + args+=( $(haproxy_use systemd SYSTEMD) )
516 + args+=( $(haproxy_use prometheus-exporter PROMEX) )
517 +
518 + # Bug #668002
519 + if use ppc || use arm || use hppa; then
520 + TARGET_LDFLAGS=-latomic
521 + fi
522 +
523 + # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing
524 + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ESYSROOT}/usr/$(get_libdir) ${args[@]}
525 + emake -C admin/systemd CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ESYSROOT}/usr/$(get_libdir) SBINDIR=/usr/sbin
526 +
527 + if use tools ; then
528 + for extra in ${EXTRAS[@]} ; do
529 + if [ "${extra}" = "admin/halog" ]; then
530 + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ESYSROOT}/usr/$(get_libdir) ${args[@]} admin/halog/halog
531 + elif [ "${extra}" = "dev/hpack" ]; then
532 + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ESYSROOT}/usr/$(get_libdir) ${args[@]} dev/hpack/{decode,gen-enc,gen-rht}
533 + else
534 + # Those two includes are a workaround for hpack Makefile missing those
535 + emake -C ${extra} \
536 + CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" ${args[@]}
537 + fi
538 + done
539 + fi
540 +}
541 +
542 +src_install() {
543 + dosbin haproxy
544 + dosym ../sbin/haproxy /usr/bin/haproxy
545 +
546 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
547 + newinitd "${FILESDIR}/${PN}.initd-r7" ${PN}
548 +
549 + doman doc/haproxy.1
550 +
551 + systemd_dounit admin/systemd/haproxy.service
552 +
553 + einstalldocs
554 +
555 + # The errorfiles are used by upstream defaults.
556 + insinto /etc/haproxy/errors/
557 + doins examples/errorfiles/*
558 +
559 + if use doc; then
560 + dodoc ROADMAP doc/*.txt
561 + #if use lua; then
562 + # TODO: doc/lua-api/
563 + #fi
564 + fi
565 +
566 + if use tools ; then
567 + has admin/halog "${EXTRAS[@]}" && dobin admin/halog/halog
568 + has admin/iprange "${EXTRAS[@]}" && { newbin admin/iprange/iprange haproxy_iprange; newbin admin/iprange/ip6range haproxy_ip6range; }
569 + has dev/tcploop "${EXTRAS[@]}" && newbin dev/tcploop/tcploop haproxy_tcploop
570 + has dev/hpack "${EXTRAS[@]}" && {
571 + newbin dev/hpack/gen-rht haproxy_gen-rht
572 + newbin dev/hpack/gen-enc haproxy_gen-enc
573 + newbin dev/hpack/decode haproxy_decode
574 + }
575 + fi
576 +
577 + if use examples ; then
578 + docinto examples
579 + dodoc examples/*.cfg
580 + dodoc doc/seamless_reload.txt
581 + fi
582 +
583 + if use vim-syntax ; then
584 + insinto /usr/share/vim/vimfiles/syntax
585 + doins admin/syntax-highlight/haproxy.vim
586 + fi
587 +}
588 +
589 +pkg_postinst() {
590 + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
591 + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
592 + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
593 + ewarn "Make use of them with the \"user\" and \"group\" directives."
594 +
595 + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
596 + einfo "Please consult the installed documentation for learning the configuration file's syntax."
597 + einfo "The documentation and sample configuration files are installed here:"
598 + einfo " ${EROOT}/usr/share/doc/${PF}"
599 + fi
600 + fi
601 +}
602
603 diff --git a/net-proxy/haproxy/haproxy-2.5.7.ebuild b/net-proxy/haproxy/haproxy-2.5.7.ebuild
604 new file mode 100644
605 index 000000000000..959a7a9dac4f
606 --- /dev/null
607 +++ b/net-proxy/haproxy/haproxy-2.5.7.ebuild
608 @@ -0,0 +1,177 @@
609 +# Copyright 1999-2022 Gentoo Authors
610 +# Distributed under the terms of the GNU General Public License v2
611 +
612 +EAPI="7"
613 +
614 +LUA_COMPAT=( lua5-3 )
615 +
616 +[[ ${PV} == *9999 ]] && SCM="git-r3"
617 +inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
618 +
619 +MY_P="${PN}-${PV/_beta/-dev}"
620 +
621 +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
622 +HOMEPAGE="http://www.haproxy.org"
623 +if [[ ${PV} != *9999 ]]; then
624 + SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz"
625 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
626 +elif [[ ${PV} == 9999 ]]; then
627 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy.git/"
628 + EGIT_BRANCH=master
629 +else
630 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/"
631 + EGIT_BRANCH=master
632 +fi
633 +
634 +LICENSE="GPL-2 LGPL-2.1"
635 +SLOT="0/$(ver_cut 1-2)"
636 +IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit prometheus-exporter
637 +ssl systemd +threads tools vim-syntax zlib lua 51degrees wurfl"
638 +REQUIRED_USE="pcre-jit? ( pcre )
639 + lua? ( ${LUA_REQUIRED_USE} )
640 + ?? ( slz zlib )"
641 +
642 +BDEPEND="virtual/pkgconfig"
643 +DEPEND="
644 + crypt? ( virtual/libcrypt:= )
645 + pcre? (
646 + dev-libs/libpcre2:=
647 + pcre-jit? ( dev-libs/libpcre2:=[jit] )
648 + )
649 + ssl? (
650 + dev-libs/openssl:0=
651 + )
652 + systemd? ( sys-apps/systemd )
653 + zlib? ( sys-libs/zlib )
654 + lua? ( ${LUA_DEPS} )"
655 +RDEPEND="${DEPEND}
656 + acct-group/haproxy
657 + acct-user/haproxy"
658 +
659 +S="${WORKDIR}/${MY_P}"
660 +
661 +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
662 +EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack )
663 +
664 +haproxy_use() {
665 + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
666 +
667 + usex "${1}" "USE_${2}=1" "USE_${2}="
668 +}
669 +
670 +pkg_setup() {
671 + use lua && lua-single_pkg_setup
672 + if use net_ns; then
673 + CONFIG_CHECK="~NET_NS"
674 + linux-info_pkg_setup
675 + fi
676 +}
677 +
678 +src_compile() {
679 + local -a args=(
680 + V=1
681 + TARGET=linux-glibc
682 + # Switching to PCRE2 by default, bug 838013
683 + PCRE=
684 + PCRE_JIT=
685 + )
686 +
687 + # TODO: PCRE2_WIDTH?
688 + args+=( $(haproxy_use threads THREAD) )
689 + args+=( $(haproxy_use crypt LIBCRYPT) )
690 + args+=( $(haproxy_use net_ns NS) )
691 + args+=( $(haproxy_use pcre PCRE2) )
692 + args+=( $(haproxy_use pcre-jit PCRE2_JIT) )
693 + args+=( $(haproxy_use ssl OPENSSL) )
694 + args+=( $(haproxy_use slz SLZ) )
695 + args+=( $(haproxy_use zlib ZLIB) )
696 + args+=( $(haproxy_use lua LUA) )
697 + args+=( $(haproxy_use 51degrees 51DEGREES) )
698 + args+=( $(haproxy_use wurfl WURFL) )
699 + args+=( $(haproxy_use systemd SYSTEMD) )
700 + args+=( $(haproxy_use prometheus-exporter PROMEX) )
701 +
702 + # Bug #668002
703 + if use ppc || use arm || use hppa; then
704 + TARGET_LDFLAGS=-latomic
705 + fi
706 +
707 + # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing
708 + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ESYSROOT}/usr/$(get_libdir) ${args[@]}
709 + emake -C admin/systemd CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ESYSROOT}/usr/$(get_libdir) SBINDIR=/usr/sbin
710 +
711 + if use tools ; then
712 + for extra in ${EXTRAS[@]} ; do
713 + if [ "${extra}" = "admin/halog" ]; then
714 + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ESYSROOT}/usr/$(get_libdir) ${args[@]} admin/halog/halog
715 + elif [ "${extra}" = "dev/hpack" ]; then
716 + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ESYSROOT}/usr/$(get_libdir) ${args[@]} dev/hpack/{decode,gen-enc,gen-rht}
717 + else
718 + # Those two includes are a workaround for hpack Makefile missing those
719 + emake -C ${extra} \
720 + CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" ${args[@]}
721 + fi
722 + done
723 + fi
724 +}
725 +
726 +src_install() {
727 + dosbin haproxy
728 + dosym ../sbin/haproxy /usr/bin/haproxy
729 +
730 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
731 + newinitd "${FILESDIR}/${PN}.initd-r7" ${PN}
732 +
733 + doman doc/haproxy.1
734 +
735 + systemd_dounit admin/systemd/haproxy.service
736 +
737 + einstalldocs
738 +
739 + # The errorfiles are used by upstream defaults.
740 + insinto /etc/haproxy/errors/
741 + doins examples/errorfiles/*
742 +
743 + if use doc; then
744 + dodoc ROADMAP doc/*.txt
745 + #if use lua; then
746 + # TODO: doc/lua-api/
747 + #fi
748 + fi
749 +
750 + if use tools ; then
751 + has admin/halog "${EXTRAS[@]}" && dobin admin/halog/halog
752 + has admin/iprange "${EXTRAS[@]}" && { newbin admin/iprange/iprange haproxy_iprange; newbin admin/iprange/ip6range haproxy_ip6range; }
753 + has dev/tcploop "${EXTRAS[@]}" && newbin dev/tcploop/tcploop haproxy_tcploop
754 + has dev/hpack "${EXTRAS[@]}" && {
755 + newbin dev/hpack/gen-rht haproxy_gen-rht
756 + newbin dev/hpack/gen-enc haproxy_gen-enc
757 + newbin dev/hpack/decode haproxy_decode
758 + }
759 + fi
760 +
761 + if use examples ; then
762 + docinto examples
763 + dodoc examples/*.cfg
764 + dodoc doc/seamless_reload.txt
765 + fi
766 +
767 + if use vim-syntax ; then
768 + insinto /usr/share/vim/vimfiles/syntax
769 + doins admin/syntax-highlight/haproxy.vim
770 + fi
771 +}
772 +
773 +pkg_postinst() {
774 + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
775 + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
776 + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
777 + ewarn "Make use of them with the \"user\" and \"group\" directives."
778 +
779 + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
780 + einfo "Please consult the installed documentation for learning the configuration file's syntax."
781 + einfo "The documentation and sample configuration files are installed here:"
782 + einfo " ${EROOT}/usr/share/doc/${PF}"
783 + fi
784 + fi
785 +}