1 |
commit: 14499ff52c27844e256f715b36ee1dad7eaef141 |
2 |
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 31 15:32:38 2021 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 31 15:32:54 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14499ff5 |
7 |
|
8 |
net-proxy/haproxy: Version bump to 2.2.12 |
9 |
|
10 |
Package-Manager: Portage-3.0.17, Repoman-3.0.2 |
11 |
Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org> |
12 |
|
13 |
net-proxy/haproxy/Manifest | 1 + |
14 |
net-proxy/haproxy/haproxy-2.2.12.ebuild | 180 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 181 insertions(+) |
16 |
|
17 |
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest |
18 |
index e19c24f9df6..8d7661b2c12 100644 |
19 |
--- a/net-proxy/haproxy/Manifest |
20 |
+++ b/net-proxy/haproxy/Manifest |
21 |
@@ -5,6 +5,7 @@ DIST haproxy-2.0.21.tar.gz 2696549 BLAKE2B 97f211a768006370d85c0b2bda539440ac260 |
22 |
DIST haproxy-2.1.12.tar.gz 2731180 BLAKE2B fe1d586c5f6a7844606d4b8cd8cb810464f0d7d5615d53e7d53e8d45eb383021952e419e2f00a9277dd9b92d2c62dad60db9dd7ea9a87e21a04c960287c05cba SHA512 e33735311b0c7f349d5f6aa88fd69e1e9838c08fdf793f6e0d27779cd0c165d9a85022c778be880a8284f62c3c511c2b2d16374bf466268c902045631a4fbff1 |
23 |
DIST haproxy-2.1.4.tar.gz 2684568 BLAKE2B 0618e069e6cf6fd20eb9fad0cfcb5ca1714d4001a794e20ce60d812741f4f65d44088c46599e4181cb79536566a940d748030552d0bd010ba14d1552cf7156f4 SHA512 fd029ac1ec877fa89a9410944439b66795b1392b6c8416aaa7978943170530c3826ba50ea706366f3f7785b7cffed58497cb362fc2480dd6920a99af4f920d98 |
24 |
DIST haproxy-2.2.11.tar.gz 2907128 BLAKE2B 76ce4d75e6be1b3e169fe1f2a3ca4dc104f7b0a7af308e1713ce7c235e45525d094bcff71853de9d78e9b6d32115b96616d3d86fb72397d8fdf7d70f375f2547 SHA512 bf05666a712710a1b99e6014a97aceb0a3e9a3184afdaaf2ae4454e8f444f6b85fd855c41c211882e8158d5939f81f1da2dc8468a6a778914e6caa4a9246a5d3 |
25 |
+DIST haproxy-2.2.12.tar.gz 2913160 BLAKE2B 0a9bc637e2d70a23ca33f3711569c0a3dbd0922f332cffc024ba523271bf8086871595a9cd9636d2ce71811f6f8c8190d1d58179458f2cf1d64562f826392471 SHA512 fc4d8725d85aaecc8cacd9177a81dea1b09d5b000ff27bb5217847779e89d67cabd35db6175acc898b674dc1c5aadfa20b015d54095a5ea2f2176444c858d90d |
26 |
DIST haproxy-2.2.5.tar.gz 2876429 BLAKE2B 1da993769302186ab0d7e1b0c8651c7e9a151295176da44bc854461f6b27831cadaa01a71b153046a23b43de91b2ba17b11ee52ecea12f744ae7af5b9f66ee98 SHA512 74e3c8b2b786f1fb5fcb8b8071751450f45a58ff847b336a8e4413727dea87b7d5a140853e3a445603ae5c4079f371ce9aa31a9f06c18ff4eea7462661775dca |
27 |
DIST haproxy-2.3.7.tar.gz 2924802 BLAKE2B c2f82a49e7422b36f5af5568790002f2e5761adb971f4692406b8573035245782b155f6f05cd388400476f1af3734284dccf9922ba8a04ee3497dbf03d926bab SHA512 ba567294c61dbd19c178acace8804979fdb26384115e77a4eb88444fa9d45b1c62f22a171efafeeba027ae65f3a70fb67b7a3f84042eada025b6cce3b9ad62ec |
28 |
DIST haproxy-2.3.8.tar.gz 2928770 BLAKE2B 198529d7b2ff359b9586b0e67a73682cad084276a009a99ce7fe798c2c62c3d1a6854f5c6c6d22f5969fb19443f5b1a6f33a3986ac9da1c11e10a1bb18948ae4 SHA512 edc211f9328af3ceb323b2f232585c08b3a592d53286b4b2af79797dc3036dbef25dceff93f3344cf8d02d3e6f235151777710d0e4c4368bb737e7171903c966 |
29 |
|
30 |
diff --git a/net-proxy/haproxy/haproxy-2.2.12.ebuild b/net-proxy/haproxy/haproxy-2.2.12.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..09bca46c32f |
33 |
--- /dev/null |
34 |
+++ b/net-proxy/haproxy/haproxy-2.2.12.ebuild |
35 |
@@ -0,0 +1,180 @@ |
36 |
+# Copyright 1999-2021 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI="7" |
40 |
+ |
41 |
+[[ ${PV} == *9999 ]] && SCM="git-r3" |
42 |
+inherit toolchain-funcs flag-o-matic 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 libressl 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 |
+ device-atlas? ( pcre ) |
64 |
+ ?? ( slz zlib )" |
65 |
+ |
66 |
+DEPEND=" |
67 |
+ pcre? ( |
68 |
+ dev-libs/libpcre |
69 |
+ pcre-jit? ( dev-libs/libpcre[jit] ) |
70 |
+ ) |
71 |
+ pcre2? ( |
72 |
+ dev-libs/libpcre |
73 |
+ pcre2-jit? ( dev-libs/libpcre2[jit] ) |
74 |
+ ) |
75 |
+ ssl? ( |
76 |
+ !libressl? ( dev-libs/openssl:0=[zlib?] ) |
77 |
+ libressl? ( dev-libs/libressl:0= ) |
78 |
+ ) |
79 |
+ slz? ( dev-libs/libslz:= ) |
80 |
+ zlib? ( sys-libs/zlib ) |
81 |
+ lua? ( dev-lang/lua:5.3 ) |
82 |
+ device-atlas? ( dev-libs/device-atlas-api-c )" |
83 |
+RDEPEND="${DEPEND} |
84 |
+ acct-group/haproxy |
85 |
+ acct-user/haproxy" |
86 |
+ |
87 |
+S="${WORKDIR}/${MY_P}" |
88 |
+ |
89 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
90 |
+CONTRIBS=( halog iprange ) |
91 |
+# ip6range is present in 1.6, but broken. |
92 |
+ver_test $PV -ge 1.7.0 && CONTRIBS+=( ip6range spoa_example tcploop ) |
93 |
+# TODO: mod_defender - requires apache / APR, modsecurity - the same |
94 |
+ver_test $PV -ge 1.8.0 && CONTRIBS+=( hpack ) |
95 |
+ |
96 |
+haproxy_use() { |
97 |
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
98 |
+ |
99 |
+ usex "${1}" "USE_${2}=1" "USE_${2}=" |
100 |
+} |
101 |
+ |
102 |
+pkg_setup() { |
103 |
+ if use net_ns; then |
104 |
+ CONFIG_CHECK="~NET_NS" |
105 |
+ linux-info_pkg_setup |
106 |
+ fi |
107 |
+} |
108 |
+ |
109 |
+src_compile() { |
110 |
+ local -a args=( |
111 |
+ V=1 |
112 |
+ TARGET=linux-glibc |
113 |
+ ) |
114 |
+ |
115 |
+ # TODO: PCRE2_WIDTH? |
116 |
+ args+=( $(haproxy_use threads THREAD) ) |
117 |
+ args+=( $(haproxy_use crypt LIBCRYPT) ) |
118 |
+ args+=( $(haproxy_use net_ns NS) ) |
119 |
+ args+=( $(haproxy_use pcre PCRE) ) |
120 |
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
121 |
+ args+=( $(haproxy_use pcre2 PCRE2) ) |
122 |
+ args+=( $(haproxy_use pcre2-jit PCRE2_JIT) ) |
123 |
+ args+=( $(haproxy_use ssl OPENSSL) ) |
124 |
+ args+=( $(haproxy_use slz SLZ) ) |
125 |
+ args+=( $(haproxy_use zlib ZLIB) ) |
126 |
+ args+=( $(haproxy_use lua LUA) ) |
127 |
+ args+=( $(haproxy_use 51degrees 51DEGREES) ) |
128 |
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
129 |
+ args+=( $(haproxy_use wurfl WURFL) ) |
130 |
+ args+=( $(haproxy_use systemd SYSTEMD) ) |
131 |
+ |
132 |
+ # For now, until the strict-aliasing breakage will be fixed |
133 |
+ append-cflags -fno-strict-aliasing |
134 |
+ |
135 |
+ # Bug #668002 |
136 |
+ if use ppc || use arm || use hppa; then |
137 |
+ TARGET_LDFLAGS=-latomic |
138 |
+ fi |
139 |
+ |
140 |
+ if use prometheus-exporter; then |
141 |
+ EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" |
142 |
+ fi |
143 |
+ |
144 |
+ # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing |
145 |
+ emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" ${args[@]} |
146 |
+ emake -C contrib/systemd SBINDIR=/usr/sbin |
147 |
+ |
148 |
+ if use tools ; then |
149 |
+ for contrib in ${CONTRIBS[@]} ; do |
150 |
+ # Those two includes are a workaround for hpack Makefile missing those |
151 |
+ emake -C contrib/${contrib} \ |
152 |
+ CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
153 |
+ done |
154 |
+ fi |
155 |
+} |
156 |
+ |
157 |
+src_install() { |
158 |
+ dosbin haproxy |
159 |
+ dosym ../sbin/haproxy /usr/bin/haproxy |
160 |
+ |
161 |
+ newconfd "${FILESDIR}/${PN}.confd" $PN |
162 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" $PN |
163 |
+ |
164 |
+ doman doc/haproxy.1 |
165 |
+ |
166 |
+ systemd_dounit contrib/systemd/haproxy.service |
167 |
+ |
168 |
+ einstalldocs |
169 |
+ |
170 |
+ # The errorfiles are used by upstream defaults. |
171 |
+ insinto /etc/haproxy/errors/ |
172 |
+ doins examples/errorfiles/* |
173 |
+ |
174 |
+ if use doc; then |
175 |
+ dodoc ROADMAP doc/*.txt |
176 |
+ #if use lua; then |
177 |
+ # TODO: doc/lua-api/ |
178 |
+ #fi |
179 |
+ fi |
180 |
+ |
181 |
+ if use tools ; then |
182 |
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog |
183 |
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange |
184 |
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range |
185 |
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example |
186 |
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example |
187 |
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop |
188 |
+ has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack |
189 |
+ fi |
190 |
+ |
191 |
+ if use examples ; then |
192 |
+ docinto examples |
193 |
+ dodoc examples/*.cfg |
194 |
+ dodoc doc/seamless_reload.txt |
195 |
+ fi |
196 |
+ |
197 |
+ if use vim-syntax ; then |
198 |
+ insinto /usr/share/vim/vimfiles/syntax |
199 |
+ doins contrib/syntax-highlight/haproxy.vim |
200 |
+ fi |
201 |
+} |
202 |
+ |
203 |
+pkg_postinst() { |
204 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
205 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
206 |
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
207 |
+ ewarn "Make use of them with the \"user\" and \"group\" directives." |
208 |
+ |
209 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
210 |
+ einfo "Please consult the installed documentation for learning the configuration file's syntax." |
211 |
+ einfo "The documentation and sample configuration files are installed here:" |
212 |
+ einfo " ${EROOT}/usr/share/doc/${PF}" |
213 |
+ fi |
214 |
+ fi |
215 |
+} |