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: Mon, 02 May 2022 07:09:21
Message-Id: 1651475356.2d58379b74934e3f4e068aa9ce41caa6201ecc49.idl0r@gentoo
1 commit: 2d58379b74934e3f4e068aa9ce41caa6201ecc49
2 Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 2 07:08:56 2022 +0000
4 Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
5 CommitDate: Mon May 2 07:09:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d58379b
7
8 net-proxy/haproxy: Bump
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 | 1 +
14 net-proxy/haproxy/haproxy-2.4.16.ebuild | 177 ++++++++++++++++++++++++++++++++
15 2 files changed, 178 insertions(+)
16
17 diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
18 index e7414543e774..75965054e6e8 100644
19 --- a/net-proxy/haproxy/Manifest
20 +++ b/net-proxy/haproxy/Manifest
21 @@ -6,6 +6,7 @@ DIST haproxy-2.2.21.tar.gz 2947789 BLAKE2B 3462f0a67070bd61266cc67d7d419dfb9e209
22 DIST haproxy-2.2.22.tar.gz 2949092 BLAKE2B 3dc7183f31cd0a95be516fbedab1eacae00761f8f2bee8478cd0c446f80c4f40c7012b64485bc598d124e3430611f6b9a748c68e1b6b379519af5308e3ed4c20 SHA512 4a99d196257fb3c99a1d76d6f9a714c673226821439b67f646fa04033f31af9ac8f783f5a984c143372d79d728476aa8b2b35d8a2f31b7fc86c09b8f9ad65615
23 DIST haproxy-2.4.14.tar.gz 3613642 BLAKE2B b45af8f62cefead1f471b0b61e9bc262dc25e0ca99898469d7702fb6e509cf2b9a9c201f8c6ecae948ef40c8fc8aec0351d8e10479752fdd5ccd66758f632799 SHA512 a4a5d449782dc2f1348d1f53ec266eef4ea4e1b0586e81730a01d818481c3a3cfb018ba1da5968d17bb6668e86017beccf7abefc563993b88a5af8cbd1da1943
24 DIST haproxy-2.4.15.tar.gz 3616441 BLAKE2B 425444a54e22cca8d15cb808283be3baefcd2ce56447d91bce3b4f4b7f6606e03d2eb8a242891c619cfd0fad9aba5bb84026c68d41f07cd55f083481df234899 SHA512 da6f6a4f021bfa719926f4c73dc559429357a77da2c560a4375d2edbb4f342a05548d39ce0a7e3346c305f1779e579a738d8442e8e9e01903f9c435a7b0b6d71
25 +DIST haproxy-2.4.16.tar.gz 3621231 BLAKE2B 6cce1d230b0e1068421968adaa75fbaf26b029a6d54eab21ddd1e0e378fbd0d9a39060d946ca676393951e0565d3587eee49fd3badddac11b48794134be87801 SHA512 98c52699fbfeef8699a0d007664ff5be023f02e3eb32ba4d05a71bb4b1bcfa7ff0cb9fbcdd3d863c053cf6d7041168f63ef3fa04d11ab9aa0753c9be6812c0d8
26 DIST haproxy-2.5.4.tar.gz 3819082 BLAKE2B fabc62ebaa968a11a49a6dd131198af31a49adbe73bcae82124ca752c2c90c1d77346621c9d804a10bca8ff254580aa7fbaca774f9df1a6a99ec112375d84a50 SHA512 95eb1ad9121a93cc77f0dd14e0080e18935cd45dc7dc511ab6dd0ecbdbb967bbde5eaa83f70157086796603560b979689f7d50b0cfba93d0245544c3a8c28a87
27 DIST haproxy-2.5.5.tar.gz 3821477 BLAKE2B 0680925026edf56f4369c71092c39f4ff3956a8cf04320326623b3031f719d62077acdca457a6cfd82f6bcbf510920113a0328a2d8cd4a208c3d9e49e1d431b5 SHA512 f68af2be330b0fa817f7611ff46e0d3e0cc52d024b20394a5f1eedf33e6774115ee6f35ecd82d33b9ecedea2fe5afcfa32270cee33a1f6ce1726d96cc8c0d821
28 DIST haproxy-2.5.6.tar.gz 3826838 BLAKE2B 571acbb5dd9fad6ee560a3db25e88815dad4278640730337257ac18ad670b1d69cd9669c7e6a60e03a784adc9c7d8aba8d4e035152d3c13072c1a05a1534facb SHA512 e97f422379af0589edf5c1dea949e95f76a7d1ce05ece75580248607f6c05cfda4a430390aca74f4d37c35de8af6d73c9a0768a699c231e11c8bb4194cb98d41
29
30 diff --git a/net-proxy/haproxy/haproxy-2.4.16.ebuild b/net-proxy/haproxy/haproxy-2.4.16.ebuild
31 new file mode 100644
32 index 000000000000..959a7a9dac4f
33 --- /dev/null
34 +++ b/net-proxy/haproxy/haproxy-2.4.16.ebuild
35 @@ -0,0 +1,177 @@
36 +# Copyright 1999-2022 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI="7"
40 +
41 +LUA_COMPAT=( lua5-3 )
42 +
43 +[[ ${PV} == *9999 ]] && SCM="git-r3"
44 +inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM}
45 +
46 +MY_P="${PN}-${PV/_beta/-dev}"
47 +
48 +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
49 +HOMEPAGE="http://www.haproxy.org"
50 +if [[ ${PV} != *9999 ]]; then
51 + SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz"
52 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
53 +elif [[ ${PV} == 9999 ]]; then
54 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy.git/"
55 + EGIT_BRANCH=master
56 +else
57 + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/"
58 + EGIT_BRANCH=master
59 +fi
60 +
61 +LICENSE="GPL-2 LGPL-2.1"
62 +SLOT="0/$(ver_cut 1-2)"
63 +IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit prometheus-exporter
64 +ssl systemd +threads tools vim-syntax zlib lua 51degrees wurfl"
65 +REQUIRED_USE="pcre-jit? ( pcre )
66 + lua? ( ${LUA_REQUIRED_USE} )
67 + ?? ( slz zlib )"
68 +
69 +BDEPEND="virtual/pkgconfig"
70 +DEPEND="
71 + crypt? ( virtual/libcrypt:= )
72 + pcre? (
73 + dev-libs/libpcre2:=
74 + pcre-jit? ( dev-libs/libpcre2:=[jit] )
75 + )
76 + ssl? (
77 + dev-libs/openssl:0=
78 + )
79 + systemd? ( sys-apps/systemd )
80 + zlib? ( sys-libs/zlib )
81 + lua? ( ${LUA_DEPS} )"
82 +RDEPEND="${DEPEND}
83 + acct-group/haproxy
84 + acct-user/haproxy"
85 +
86 +S="${WORKDIR}/${MY_P}"
87 +
88 +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
89 +EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack )
90 +
91 +haproxy_use() {
92 + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
93 +
94 + usex "${1}" "USE_${2}=1" "USE_${2}="
95 +}
96 +
97 +pkg_setup() {
98 + use lua && lua-single_pkg_setup
99 + if use net_ns; then
100 + CONFIG_CHECK="~NET_NS"
101 + linux-info_pkg_setup
102 + fi
103 +}
104 +
105 +src_compile() {
106 + local -a args=(
107 + V=1
108 + TARGET=linux-glibc
109 + # Switching to PCRE2 by default, bug 838013
110 + PCRE=
111 + PCRE_JIT=
112 + )
113 +
114 + # TODO: PCRE2_WIDTH?
115 + args+=( $(haproxy_use threads THREAD) )
116 + args+=( $(haproxy_use crypt LIBCRYPT) )
117 + args+=( $(haproxy_use net_ns NS) )
118 + args+=( $(haproxy_use pcre PCRE2) )
119 + args+=( $(haproxy_use pcre-jit PCRE2_JIT) )
120 + args+=( $(haproxy_use ssl OPENSSL) )
121 + args+=( $(haproxy_use slz SLZ) )
122 + args+=( $(haproxy_use zlib ZLIB) )
123 + args+=( $(haproxy_use lua LUA) )
124 + args+=( $(haproxy_use 51degrees 51DEGREES) )
125 + args+=( $(haproxy_use wurfl WURFL) )
126 + args+=( $(haproxy_use systemd SYSTEMD) )
127 + args+=( $(haproxy_use prometheus-exporter PROMEX) )
128 +
129 + # Bug #668002
130 + if use ppc || use arm || use hppa; then
131 + TARGET_LDFLAGS=-latomic
132 + fi
133 +
134 + # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing
135 + 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[@]}
136 + 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
137 +
138 + if use tools ; then
139 + for extra in ${EXTRAS[@]} ; do
140 + if [ "${extra}" = "admin/halog" ]; then
141 + 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
142 + elif [ "${extra}" = "dev/hpack" ]; then
143 + 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}
144 + else
145 + # Those two includes are a workaround for hpack Makefile missing those
146 + emake -C ${extra} \
147 + CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" ${args[@]}
148 + fi
149 + done
150 + fi
151 +}
152 +
153 +src_install() {
154 + dosbin haproxy
155 + dosym ../sbin/haproxy /usr/bin/haproxy
156 +
157 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
158 + newinitd "${FILESDIR}/${PN}.initd-r7" ${PN}
159 +
160 + doman doc/haproxy.1
161 +
162 + systemd_dounit admin/systemd/haproxy.service
163 +
164 + einstalldocs
165 +
166 + # The errorfiles are used by upstream defaults.
167 + insinto /etc/haproxy/errors/
168 + doins examples/errorfiles/*
169 +
170 + if use doc; then
171 + dodoc ROADMAP doc/*.txt
172 + #if use lua; then
173 + # TODO: doc/lua-api/
174 + #fi
175 + fi
176 +
177 + if use tools ; then
178 + has admin/halog "${EXTRAS[@]}" && dobin admin/halog/halog
179 + has admin/iprange "${EXTRAS[@]}" && { newbin admin/iprange/iprange haproxy_iprange; newbin admin/iprange/ip6range haproxy_ip6range; }
180 + has dev/tcploop "${EXTRAS[@]}" && newbin dev/tcploop/tcploop haproxy_tcploop
181 + has dev/hpack "${EXTRAS[@]}" && {
182 + newbin dev/hpack/gen-rht haproxy_gen-rht
183 + newbin dev/hpack/gen-enc haproxy_gen-enc
184 + newbin dev/hpack/decode haproxy_decode
185 + }
186 + fi
187 +
188 + if use examples ; then
189 + docinto examples
190 + dodoc examples/*.cfg
191 + dodoc doc/seamless_reload.txt
192 + fi
193 +
194 + if use vim-syntax ; then
195 + insinto /usr/share/vim/vimfiles/syntax
196 + doins admin/syntax-highlight/haproxy.vim
197 + fi
198 +}
199 +
200 +pkg_postinst() {
201 + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
202 + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
203 + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
204 + ewarn "Make use of them with the \"user\" and \"group\" directives."
205 +
206 + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
207 + einfo "Please consult the installed documentation for learning the configuration file's syntax."
208 + einfo "The documentation and sample configuration files are installed here:"
209 + einfo " ${EROOT}/usr/share/doc/${PF}"
210 + fi
211 + fi
212 +}