1 |
commit: 17964e543c5361d803b030541d3db42a2ada02ac |
2 |
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 5 08:53:49 2022 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 5 08:53:56 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17964e54 |
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.2.21.ebuild | 186 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 187 insertions(+) |
16 |
|
17 |
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest |
18 |
index ab8e73561193..335bf3f58955 100644 |
19 |
--- a/net-proxy/haproxy/Manifest |
20 |
+++ b/net-proxy/haproxy/Manifest |
21 |
@@ -2,6 +2,7 @@ DIST haproxy-2.0.25.tar.gz 2707840 BLAKE2B cd85d233623f2791bff8ada00d9ac4ea3743e |
22 |
DIST haproxy-2.0.27.tar.gz 2716937 BLAKE2B 08ab2905b26b8e33068af77f3a153dc489f509436451d2711f9929100ecebfbec9edd14b449c48739b1d20990431fa6a8b49e4fc98d32ade5c1688f72d310f63 SHA512 339a013cb11778ed444370ff1887b4db121947784bda08f818a39b98261d02a5ebeb681ef7040cbb0e493d89c5b8e2c5a32f0cdccf9e89a6327e9d95cc6d5891 |
23 |
DIST haproxy-2.2.17.tar.gz 2933836 BLAKE2B 750d2c5048f994442d13c05ce6624731d296462951ee2e86110467d517a6708b498e98260a3f0770e110dc5c2cb2bdd746fb76f23ba7cebc1642b0b9c8124a67 SHA512 174197e1e0915a6ae6062b9a070f16102ac7f3429f991f36cdb2e2cce587bd26059bd1dc71a368f904bcdecd292ab5926715160400ae96d498d902aac356864f |
24 |
DIST haproxy-2.2.20.tar.gz 2945047 BLAKE2B d2462b3c43e75f86752bcc0edf3af173fba10f9d8191e715b15c926bffb6018b495a54e3f9883dfe6cc80f33cd5f362ac1e2db88f9d0e8b85be74c1fd28dc21a SHA512 53b8466b3717dd5e4d167d48ae449da6e97b3a6d9a06951f040aec34685b961a7014137a5e4d285bd2b8b6eaacc3028f1939c66f450775a01802df085d70a098 |
25 |
+DIST haproxy-2.2.21.tar.gz 2947789 BLAKE2B 3462f0a67070bd61266cc67d7d419dfb9e209314982f2035bdce6b905f9fe567780669adc09905598a6129152dbb77416790976249076935fcb90e7e03767284 SHA512 2404bf0938b88c3249668bef1f13195973c5b1db8dc056ed9d5b882b8cdabf71076b73de723e8d3d0d953193294edea4acac5edeee8ac472e93ae0bd917bf99b |
26 |
DIST haproxy-2.4.13.tar.gz 3611045 BLAKE2B 7eda0293a766d48ef3d14891affa684500203437a81efece38f77d5e8006882d574083f0463cb5f39d31dc6b95c7df25d24c7d78bec1a2c3510f54c50207f28f SHA512 f5e7e474252f2745adeec703ed101a6089f6e43c463d823b64430f4f32618db1f73647f0b1f7d1247e1750b49b18a300247aded29c780b0a615b0ac8d7373257 |
27 |
DIST haproxy-2.4.14.tar.gz 3613642 BLAKE2B b45af8f62cefead1f471b0b61e9bc262dc25e0ca99898469d7702fb6e509cf2b9a9c201f8c6ecae948ef40c8fc8aec0351d8e10479752fdd5ccd66758f632799 SHA512 a4a5d449782dc2f1348d1f53ec266eef4ea4e1b0586e81730a01d818481c3a3cfb018ba1da5968d17bb6668e86017beccf7abefc563993b88a5af8cbd1da1943 |
28 |
DIST haproxy-2.4.4.tar.gz 3587306 BLAKE2B 983f5919b738419d616b35c1cad6aa2400b0b857160ecfac3bcdfcc14c15280283ae3f33036652a3a9b5bfff0fbb6a54912807ea7c83c828d2b5ba72274fe1a8 SHA512 a8987e8342fdbec7e48de09a4391a67e77e05493260e0e561e8c185b6457b8e1086cc45ce04ebf3365699c008dff81667490e2fe99c33c0ac3c7513df8ae025c |
29 |
|
30 |
diff --git a/net-proxy/haproxy/haproxy-2.2.21.ebuild b/net-proxy/haproxy/haproxy-2.2.21.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000000..3f411c90b78f |
33 |
--- /dev/null |
34 |
+++ b/net-proxy/haproxy/haproxy-2.2.21.ebuild |
35 |
@@ -0,0 +1,186 @@ |
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 ~ppc ~x86" |
53 |
+else |
54 |
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/" |
55 |
+ EGIT_BRANCH=master |
56 |
+fi |
57 |
+ |
58 |
+LICENSE="GPL-2 LGPL-2.1" |
59 |
+SLOT="0/$(ver_cut 1-2)" |
60 |
+IUSE="+crypt doc examples slz +net_ns +pcre pcre-jit pcre2 pcre2-jit prometheus-exporter |
61 |
+ssl systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl" |
62 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
63 |
+ pcre2-jit? ( pcre2 ) |
64 |
+ pcre? ( !pcre2 ) |
65 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
66 |
+ device-atlas? ( pcre ) |
67 |
+ ?? ( slz zlib )" |
68 |
+ |
69 |
+BDEPEND="virtual/pkgconfig" |
70 |
+DEPEND=" |
71 |
+ crypt? ( virtual/libcrypt:= ) |
72 |
+ pcre? ( |
73 |
+ dev-libs/libpcre |
74 |
+ pcre-jit? ( dev-libs/libpcre[jit] ) |
75 |
+ ) |
76 |
+ pcre2? ( |
77 |
+ dev-libs/libpcre2:= |
78 |
+ pcre2-jit? ( dev-libs/libpcre2:=[jit] ) |
79 |
+ ) |
80 |
+ ssl? ( |
81 |
+ dev-libs/openssl:0= |
82 |
+ ) |
83 |
+ slz? ( dev-libs/libslz:= ) |
84 |
+ systemd? ( sys-apps/systemd ) |
85 |
+ zlib? ( sys-libs/zlib ) |
86 |
+ lua? ( ${LUA_DEPS} ) |
87 |
+ device-atlas? ( dev-libs/device-atlas-api-c )" |
88 |
+RDEPEND="${DEPEND} |
89 |
+ acct-group/haproxy |
90 |
+ acct-user/haproxy" |
91 |
+ |
92 |
+S="${WORKDIR}/${MY_P}" |
93 |
+ |
94 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
95 |
+CONTRIBS=( halog iprange ) |
96 |
+# ip6range is present in 1.6, but broken. |
97 |
+ver_test ${PV} -ge 1.7.0 && CONTRIBS+=( ip6range spoa_example tcploop ) |
98 |
+# TODO: mod_defender - requires apache / APR, modsecurity - the same |
99 |
+ver_test ${PV} -ge 1.8.0 && CONTRIBS+=( hpack ) |
100 |
+ |
101 |
+haproxy_use() { |
102 |
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
103 |
+ |
104 |
+ usex "${1}" "USE_${2}=1" "USE_${2}=" |
105 |
+} |
106 |
+ |
107 |
+pkg_setup() { |
108 |
+ use lua && lua-single_pkg_setup |
109 |
+ if use net_ns; then |
110 |
+ CONFIG_CHECK="~NET_NS" |
111 |
+ linux-info_pkg_setup |
112 |
+ fi |
113 |
+} |
114 |
+ |
115 |
+src_compile() { |
116 |
+ local -a args=( |
117 |
+ V=1 |
118 |
+ TARGET=linux-glibc |
119 |
+ ) |
120 |
+ |
121 |
+ # TODO: PCRE2_WIDTH? |
122 |
+ args+=( $(haproxy_use threads THREAD) ) |
123 |
+ args+=( $(haproxy_use crypt LIBCRYPT) ) |
124 |
+ args+=( $(haproxy_use net_ns NS) ) |
125 |
+ args+=( $(haproxy_use pcre PCRE) ) |
126 |
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
127 |
+ args+=( $(haproxy_use pcre2 PCRE2) ) |
128 |
+ args+=( $(haproxy_use pcre2-jit PCRE2_JIT) ) |
129 |
+ args+=( $(haproxy_use ssl OPENSSL) ) |
130 |
+ args+=( $(haproxy_use slz SLZ) ) |
131 |
+ args+=( $(haproxy_use zlib ZLIB) ) |
132 |
+ args+=( $(haproxy_use lua LUA) ) |
133 |
+ args+=( $(haproxy_use 51degrees 51DEGREES) ) |
134 |
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
135 |
+ args+=( $(haproxy_use wurfl WURFL) ) |
136 |
+ args+=( $(haproxy_use systemd SYSTEMD) ) |
137 |
+ |
138 |
+ # For now, until the strict-aliasing breakage will be fixed |
139 |
+ append-cflags -fno-strict-aliasing |
140 |
+ |
141 |
+ # Bug #668002 |
142 |
+ if use ppc || use arm || use hppa; then |
143 |
+ TARGET_LDFLAGS=-latomic |
144 |
+ fi |
145 |
+ |
146 |
+ if use prometheus-exporter; then |
147 |
+ EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" |
148 |
+ fi |
149 |
+ |
150 |
+ # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing |
151 |
+ emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" ${args[@]} |
152 |
+ emake -C contrib/systemd SBINDIR=/usr/sbin |
153 |
+ |
154 |
+ if use tools ; then |
155 |
+ for contrib in ${CONTRIBS[@]} ; do |
156 |
+ # Those two includes are a workaround for hpack Makefile missing those |
157 |
+ emake -C contrib/${contrib} \ |
158 |
+ CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
159 |
+ done |
160 |
+ fi |
161 |
+} |
162 |
+ |
163 |
+src_install() { |
164 |
+ dosbin haproxy |
165 |
+ dosym ../sbin/haproxy /usr/bin/haproxy |
166 |
+ |
167 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
168 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" ${PN} |
169 |
+ |
170 |
+ doman doc/haproxy.1 |
171 |
+ |
172 |
+ systemd_dounit contrib/systemd/haproxy.service |
173 |
+ |
174 |
+ einstalldocs |
175 |
+ |
176 |
+ # The errorfiles are used by upstream defaults. |
177 |
+ insinto /etc/haproxy/errors/ |
178 |
+ doins examples/errorfiles/* |
179 |
+ |
180 |
+ if use doc; then |
181 |
+ dodoc ROADMAP doc/*.txt |
182 |
+ #if use lua; then |
183 |
+ # TODO: doc/lua-api/ |
184 |
+ #fi |
185 |
+ fi |
186 |
+ |
187 |
+ if use tools ; then |
188 |
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog |
189 |
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange |
190 |
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range |
191 |
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example |
192 |
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example |
193 |
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop |
194 |
+ has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack |
195 |
+ fi |
196 |
+ |
197 |
+ if use examples ; then |
198 |
+ docinto examples |
199 |
+ dodoc examples/*.cfg |
200 |
+ dodoc doc/seamless_reload.txt |
201 |
+ fi |
202 |
+ |
203 |
+ if use vim-syntax ; then |
204 |
+ insinto /usr/share/vim/vimfiles/syntax |
205 |
+ doins contrib/syntax-highlight/haproxy.vim |
206 |
+ fi |
207 |
+} |
208 |
+ |
209 |
+pkg_postinst() { |
210 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
211 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
212 |
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
213 |
+ ewarn "Make use of them with the \"user\" and \"group\" directives." |
214 |
+ |
215 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
216 |
+ einfo "Please consult the installed documentation for learning the configuration file's syntax." |
217 |
+ einfo "The documentation and sample configuration files are installed here:" |
218 |
+ einfo " ${EROOT}/usr/share/doc/${PF}" |
219 |
+ fi |
220 |
+ fi |
221 |
+} |