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