diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-27 02:00:01 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-27 02:00:01 +0000 |
commit | ead7697a01fd631b56240b2d58aedd98ba7f92d3 (patch) | |
tree | c73ecbedbb9db967a7dff614f5e8b79eacb79f5d /net-proxy | |
parent | 403335d7014372971e9e9267493a808d08bab48e (diff) |
gentoo auto-resync : 27:11:2024 - 02:00:00
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/Manifest.gz | bin | 5374 -> 5374 bytes | |||
-rw-r--r-- | net-proxy/haproxy-dataplaneapi/Manifest | 9 | ||||
-rw-r--r-- | net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-3.0.1.ebuild | 27 | ||||
-rw-r--r-- | net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-3.0.3.ebuild (renamed from net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-2.9.ebuild) | 0 | ||||
-rw-r--r-- | net-proxy/haproxy/Manifest | 5 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-3.1.0.ebuild | 216 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-3.1.9999.ebuild | 216 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-9999.ebuild | 3 |
8 files changed, 440 insertions, 36 deletions
diff --git a/net-proxy/Manifest.gz b/net-proxy/Manifest.gz Binary files differindex 3a00df5cba55..27e87488dd27 100644 --- a/net-proxy/Manifest.gz +++ b/net-proxy/Manifest.gz diff --git a/net-proxy/haproxy-dataplaneapi/Manifest b/net-proxy/haproxy-dataplaneapi/Manifest index d125200a93bd..9515a2074e73 100644 --- a/net-proxy/haproxy-dataplaneapi/Manifest +++ b/net-proxy/haproxy-dataplaneapi/Manifest @@ -1,7 +1,4 @@ -DIST haproxy-dataplaneapi-2.9-vendor.tar.xz 2385844 BLAKE2B 9e4dbaabb6c53eb331b5b8a589bd8910bf4eac7dcb4ceee3392c83f45337c7b6d66e8c41c4286b955f502994ac6f40b05eb80865a69bdf96b21b5bd26ea636e3 SHA512 0c0e1df60b1339ed568ad6531fb0ec701ab8d971c2e310bb216afc7c3859dd5687029cab9e62bfb4368a751bc1fd40be29f9cf1ee8de4d52c77e98f60e82c7fd -DIST haproxy-dataplaneapi-2.9.tar.gz 759654 BLAKE2B 0666668902ffa4e806d86d8079819504bd79b60cf4c254c3eef72618e15734b5f3d0dde410fcc3e26d1965bb6af62f1ffee91fab8c491d59d28cf1e264630611 SHA512 8a709f94ea67d15dc55bdd262d4b423398cc6a82136ce3af7b4d052963f51eeb9d364949639c2d46a227aa6b1cdb2aee6a9f307b0975634aacbfa0e9988adf86 -DIST haproxy-dataplaneapi-3.0.1-vendor.tar.xz 2892440 BLAKE2B 88a5487c01f8001e5af7b554f2ef781213c0f11962007b170a221495deeabb413aa1d3f508c111dbba0f402a5a7dc9d679989e9137f7cafab95703503088b6e0 SHA512 a5136c6fe2761a70dc2e1496a9b91c73f2179fe8b55f81289b7629d1ba1b72f498404142c15d99dfb78aa2561dae20dbf0965caa7d4a798753a53e424d86c93e -DIST haproxy-dataplaneapi-3.0.1.tar.gz 919178 BLAKE2B e1deebc80b227ef39c1355fe6bdf6137a89f32ab29afe95d9921bbbba3ceeddf8e9ca6613198343d7fc16d54e907c32eb7ddf9592eb2aa3812645e73d5398202 SHA512 5a6d142d88c352108dcdf106006f98b42ed90a17c114fda3e4f8831f77b4496acf7c5e47ffe7680ae101ff5811020cde9c596bf48283abd457bdcd6591ca0e47 -EBUILD haproxy-dataplaneapi-2.9.ebuild 663 BLAKE2B c2c8309eabf63a18391d1bb14591e4fa4469880d6557656835d0d9f60db164baeab42afe5f674821f8fb03a9fb679f052cd7bc28492fbba8e9404f3276fb2446 SHA512 7fbb3eaff332c966b2d5e1a16f32f4f724de941ecfd62674d84e7c4af23a777fbed0d3dff2a49ab6107d78d0e7a57a22e9357259e1877c75e1fd97e82c9636ac -EBUILD haproxy-dataplaneapi-3.0.1.ebuild 663 BLAKE2B c2c8309eabf63a18391d1bb14591e4fa4469880d6557656835d0d9f60db164baeab42afe5f674821f8fb03a9fb679f052cd7bc28492fbba8e9404f3276fb2446 SHA512 7fbb3eaff332c966b2d5e1a16f32f4f724de941ecfd62674d84e7c4af23a777fbed0d3dff2a49ab6107d78d0e7a57a22e9357259e1877c75e1fd97e82c9636ac +DIST haproxy-dataplaneapi-3.0.3-vendor.tar.xz 2921660 BLAKE2B 9a23c19c93aa349770d10dafc13d3c4cd49e32b3e32be42efa93caec290341d538dab481959489f055193221e830f3c9259dd8579a49615b2c61676173d82c7e SHA512 4cda2790f6af14e3cade41ff84d2b61a31c88ef3a873dff01042c5f25b4a2e0947e49c402e60473b3fee555db4bee9f004a007e316c3dc38a940159081360562 +DIST haproxy-dataplaneapi-3.0.3.tar.gz 922986 BLAKE2B 4e313ad60a4754a41719be370c71826729e44ea2d01220f9710810ef558402e4ee5c7efa881c0cd3919abeee4830ccafda40874a2ee37ac7727851cefa8ec9e6 SHA512 dec30d8bd5c92ec4bae88090b8f22d3aedbd14db14f87cade64e79887faf3b50e7ca6f7fbbaf506ac393a09947479ca1acdd985661cf9384940a8f8ecfdb387a +EBUILD haproxy-dataplaneapi-3.0.3.ebuild 663 BLAKE2B c2c8309eabf63a18391d1bb14591e4fa4469880d6557656835d0d9f60db164baeab42afe5f674821f8fb03a9fb679f052cd7bc28492fbba8e9404f3276fb2446 SHA512 7fbb3eaff332c966b2d5e1a16f32f4f724de941ecfd62674d84e7c4af23a777fbed0d3dff2a49ab6107d78d0e7a57a22e9357259e1877c75e1fd97e82c9636ac MISC metadata.xml 337 BLAKE2B a5451437f791b1398ad4c3f6415e4bd36cdb5e6b33ab04138b1c02049ae77a23beef15f70db7dd51868824662c2f5486a670a3509d6f20c8a591e4245af49f16 SHA512 44e8a3b96308ab2247acf4173f55d88b7efee5c0315eecca2a026aef58733e257cc3e0ac2862efc46a4c4e360b93414171e7c5afc2dffcb2b84dd69b5c02b653 diff --git a/net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-3.0.1.ebuild b/net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-3.0.1.ebuild deleted file mode 100644 index 10b3b3affc66..000000000000 --- a/net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-3.0.1.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module - -DESCRIPTION="haproxy dataplane api / sidecar" -HOMEPAGE="https://github.com/haproxytech/dataplaneapi https://www.haproxy.com/documentation/dataplaneapi/latest/" - -SRC_URI="https://github.com/haproxytech/dataplaneapi/archive/v${PV}.tar.gz -> ${P}.tar.gz - http://gentooexperimental.org/~patrick/${P}-vendor.tar.xz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64" -IUSE="" - -S="${WORKDIR}/dataplaneapi-${PV}" - -src_compile() { - ego build -o ./build/dataplaneapi ./cmd/dataplaneapi/ -} - -src_install() { - dobin build/dataplaneapi - dodoc README.md -} diff --git a/net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-2.9.ebuild b/net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-3.0.3.ebuild index 10b3b3affc66..10b3b3affc66 100644 --- a/net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-2.9.ebuild +++ b/net-proxy/haproxy-dataplaneapi/haproxy-dataplaneapi-3.0.3.ebuild diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest index 7eca5101c247..d5de739dc858 100644 --- a/net-proxy/haproxy/Manifest +++ b/net-proxy/haproxy/Manifest @@ -12,6 +12,7 @@ DIST haproxy-2.9.12.tar.gz 4551877 BLAKE2B 884df1c1cff3abfe96f92b9756f5ec6662c8f DIST haproxy-2.9.6.tar.gz 4507680 BLAKE2B 5666624d340cba70bc21f53efbe0a7b37897a616e55aa865ffa80471b6b5c03b3eae10bf86078245ec87cc2681b1fd2777148e0fa7f0d4a0a6bc65733f0e8692 SHA512 4e00069356083c8d428bf056e2a26ccfb3e18029cc96769189010d59d0b4f1c7af58986f1653067db83838dcbc2c138798663d3fbb9aac1d3c49c30cfc579c2a DIST haproxy-3.0.5.tar.gz 4698022 BLAKE2B c64d8799755fddaf5b45a9e2b67c5f03b25af98fbddde68ab1206c288d9a65f91938810b150c4398ee138d9154c90f1af9fb05c3d0bbc80394e71430e1cc4396 SHA512 8c16b026d5e26fc030178ecd354c68e8ea32c2b971f143cb2aa2f1b2d16fbfc0a27e3975f78873a0cefe3f904b5f1999f8d75622a04234b9cf88f90161d9ea91 DIST haproxy-3.0.6.tar.gz 4710169 BLAKE2B 51d459756523b073c43ef052a76fe331aba08dc2877cdbe2a97a7025874cbd795220ca133978e5ff4f9f2536c7a47e2f7458a27ef6786af9b626ec550fc95c5a SHA512 a072ad27fc7478d6082b2f92ce869a8d31d80b9d0cca70e9d256c53e54615accdb34d680fe092e72d534647ab3c82394537f55f74e3e7561419eb2c4e249daf9 +DIST haproxy-3.1.0.tar.gz 4892185 BLAKE2B 32f2fc10b8168289d01f6879443a996d58d2d55e3bca6788f5776637bc97b18f6f45ae76ff5815fec0a77f334cfafc8cc2a0f43e01eb5bd4066260ef16236580 SHA512 b3006dc90d51b44589371ab107eeb8abd04d65f015163569fd602035dee4bc95a516e5fbf786e9f42a6744134cbf4b9478399277f6fa501429b1a9c4044a07b6 EBUILD haproxy-2.6.16.ebuild 6633 BLAKE2B 19be9b673125e5065bd26f05a74a17cc69b1241ad5c60163ba018ab2c98b08bc5b8292eee6e4409168101946a113fa4499613eaaf45e512c4bf34863d2a01b7a SHA512 774e6c1bf3ffcc1a11f4dcbb0cef1dfb264ec331b1635abe8d145c19343ecdac38232dfb04448b1a84c45f129463c986edfca2b67c47ffbc2327d358bf0c3630 EBUILD haproxy-2.6.19.ebuild 6635 BLAKE2B e2589caadfcacbe0f5a4242b996ec786098367a1f41216b473f48b1bd42cd2f450c0ad35e80ce8d0a883bf037884a10e89b51c68324dd1ee80a865daf792942d SHA512 b6bc9eb2a374f981547f112469ac2022a02e71d6d65270943efa5afe418ccc7bbe4d4c178ea987589ae346d28f8c43aad3d6aab0a2713ac567f252324ca4ca08 EBUILD haproxy-2.6.20.ebuild 6637 BLAKE2B fe6c095b954243d47f4a64539177c2aad4a60d214606d5748ac7682866d46a071ef22b578edc628ad9ae0ed69aad9b8730c1a56575875cdd93145e4f879cae37 SHA512 91d0c3d9445c53a8b421936e21c223e5057f6c0e8700eb5547b8e5779697044596ba01f8481acbca7ffd19c2e0e821b0c36240a45900091ca432003437249557 @@ -27,5 +28,7 @@ EBUILD haproxy-2.9.9999.ebuild 6637 BLAKE2B fe6c095b954243d47f4a64539177c2aad4a6 EBUILD haproxy-3.0.5.ebuild 6492 BLAKE2B ed12e6f6eb8aac5bd755161c0939edad308d53f4707fa8c061a1ab4fde52f62818b3345e4b376a77e736b42302dbd82324cf30e7b1a6dd6156125f7dc86805ac SHA512 759a5f01aa06fc63151b26c3d6bc138e28f1ef3e1babe3b40e63e05572078d6a62323e0a7f6abf5102adf0ac97ff9860bc32d41972a821355449a2a89646c377 EBUILD haproxy-3.0.6.ebuild 6494 BLAKE2B c09f2732b205f44c2b4467b5cee231a6502e1825ef81dc077137f8161b5110441e2a69c3ad7fdb7122acd35103e6e3484d4e68ed557adb3e32df2f8c7348aa00 SHA512 a9eb7923952d9c08b4f6ebc774325dcf6319e093ceb217d78ab74fb0454b5722f15ee27a33edf1102321ab42af0846bf5e6702b15828c2be676bd0448166d130 EBUILD haproxy-3.0.9999.ebuild 6494 BLAKE2B c09f2732b205f44c2b4467b5cee231a6502e1825ef81dc077137f8161b5110441e2a69c3ad7fdb7122acd35103e6e3484d4e68ed557adb3e32df2f8c7348aa00 SHA512 a9eb7923952d9c08b4f6ebc774325dcf6319e093ceb217d78ab74fb0454b5722f15ee27a33edf1102321ab42af0846bf5e6702b15828c2be676bd0448166d130 -EBUILD haproxy-9999.ebuild 6494 BLAKE2B c09f2732b205f44c2b4467b5cee231a6502e1825ef81dc077137f8161b5110441e2a69c3ad7fdb7122acd35103e6e3484d4e68ed557adb3e32df2f8c7348aa00 SHA512 a9eb7923952d9c08b4f6ebc774325dcf6319e093ceb217d78ab74fb0454b5722f15ee27a33edf1102321ab42af0846bf5e6702b15828c2be676bd0448166d130 +EBUILD haproxy-3.1.0.ebuild 6445 BLAKE2B 4da01b7dd748aad9d1b99e4f8f950a12231c800d48528de14628d884d203ddac6866b3d41d787bbbffd85c236da437430cb5a4920fa39e9bbaea43e5def11f7b SHA512 faefd0aed3fee36304dd6b4de9873d8de5db5f9de62863599a21eea09b2adcb58c10ed19df821fe8ba728149d3031e84b8fa91c0d7b2c4731f8af8e9c8ee821e +EBUILD haproxy-3.1.9999.ebuild 6445 BLAKE2B 4da01b7dd748aad9d1b99e4f8f950a12231c800d48528de14628d884d203ddac6866b3d41d787bbbffd85c236da437430cb5a4920fa39e9bbaea43e5def11f7b SHA512 faefd0aed3fee36304dd6b4de9873d8de5db5f9de62863599a21eea09b2adcb58c10ed19df821fe8ba728149d3031e84b8fa91c0d7b2c4731f8af8e9c8ee821e +EBUILD haproxy-9999.ebuild 6445 BLAKE2B 4da01b7dd748aad9d1b99e4f8f950a12231c800d48528de14628d884d203ddac6866b3d41d787bbbffd85c236da437430cb5a4920fa39e9bbaea43e5def11f7b SHA512 faefd0aed3fee36304dd6b4de9873d8de5db5f9de62863599a21eea09b2adcb58c10ed19df821fe8ba728149d3031e84b8fa91c0d7b2c4731f8af8e9c8ee821e MISC metadata.xml 1950 BLAKE2B ac55c0bbf5c5d26f92eb2e7cf4c7bf9ab6a432e45c192c6d591a3ba8c5457f3e17ecee6ad3fcbf13108d1893e3c8e582a4c6a5a3d842f0376b32869a59373526 SHA512 bbd3bc13f40649db82489e2f50acec08ec2cc7b401b81c071eabf3508bccda789da6d0bd50267d81b5d08c2eadee4cf3ce7fe8a2b57a04841cab38623025f121 diff --git a/net-proxy/haproxy/haproxy-3.1.0.ebuild b/net-proxy/haproxy/haproxy-3.1.0.ebuild new file mode 100644 index 000000000000..c0bde0ca349c --- /dev/null +++ b/net-proxy/haproxy/haproxy-3.1.0.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LUA_COMPAT=( lua5-4 lua5-3 ) + +[[ ${PV} == *9999 ]] && SCM="git-r3" +inherit toolchain-funcs lua-single systemd linux-info ${SCM} multiprocessing + +MY_P="${PN}-${PV/_beta/-dev}" + +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" +HOMEPAGE="http://www.haproxy.org" +if [[ ${PV} != *9999 ]]; then + # This is arbitrary; upstream uses master. Try to update when possible + VTEST_COMMIT="af198470d7ce482d3d26eb9ca3f246a438739366" + VTEST_DIR="${WORKDIR}/VTest-${VTEST_COMMIT}" + SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz + test? ( https://github.com/vtest/VTest/archive/${VTEST_COMMIT}.tar.gz -> VTest-${VTEST_COMMIT}.tar.gz )" + KEYWORDS="~amd64 ~arm64 ~ppc ~x86" +elif [[ ${PV} == 9999 ]]; then + VTEST_DIR="${WORKDIR}/VTest" + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy.git/" + EGIT_BRANCH=master +else + VTEST_DIR="${WORKDIR}/VTest" + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/" + EGIT_BRANCH=master +fi + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0/$(ver_cut 1-2)" +IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit prometheus-exporter +ssl systemd test +threads tools zlib lua 51degrees wurfl" +REQUIRED_USE="pcre-jit? ( pcre ) + lua? ( ${LUA_REQUIRED_USE} ) + ?? ( slz zlib )" +RESTRICT="!test? ( test )" + +BDEPEND="virtual/pkgconfig" +DEPEND=" + crypt? ( virtual/libcrypt:= ) + pcre? ( + dev-libs/libpcre2:= + pcre-jit? ( dev-libs/libpcre2:=[jit] ) + ) + ssl? ( + dev-libs/openssl:0= + ) + systemd? ( sys-apps/systemd ) + zlib? ( sys-libs/zlib ) + lua? ( ${LUA_DEPS} ) + test? ( + dev-libs/libpcre2 + sys-libs/zlib + )" +RDEPEND="${DEPEND} + acct-group/haproxy + acct-user/haproxy" + +S="${WORKDIR}/${MY_P}" + +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS ) +EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) + +haproxy_use() { + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" + + usex "${1}" "USE_${2}=1" "USE_${2}=" +} + +pkg_setup() { + use lua && lua-single_pkg_setup + if use net_ns; then + CONFIG_CHECK="~NET_NS" + linux-info_pkg_setup + fi +} + +src_unpack() { + if [[ ${PV} != *9999 ]]; then + default + else + git-r3_src_unpack + EGIT_REPO_URI="https://github.com/vtest/VTest" EGIT_CHECKOUT_DIR="${VTEST_DIR}" git-r3_src_unpack + fi +} + +src_compile() { + local -a args=( + V=1 + # Switching to PCRE2 by default, bug 838013 + PCRE= + PCRE_JIT= + ) + + if use elibc_musl; then + args+=( TARGET=linux-musl ) + else + args+=( TARGET=linux-glibc ) + fi + + # TODO: PCRE2_WIDTH? + args+=( $(haproxy_use threads THREAD) ) + args+=( $(haproxy_use crypt LIBCRYPT) ) + args+=( $(haproxy_use net_ns NS) ) + args+=( $(haproxy_use pcre PCRE2) ) + args+=( $(haproxy_use pcre-jit PCRE2_JIT) ) + args+=( $(haproxy_use ssl OPENSSL) ) + args+=( $(haproxy_use slz SLZ) ) + args+=( $(haproxy_use zlib ZLIB) ) + args+=( $(haproxy_use lua LUA) ) + args+=( $(haproxy_use 51degrees 51DEGREES) ) + args+=( $(haproxy_use wurfl WURFL) ) + args+=( $(haproxy_use prometheus-exporter PROMEX) ) + + # Bug #668002 + if use ppc || use arm || use hppa; then + TARGET_LDFLAGS=-latomic + fi + + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" \ + TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) ${args[@]} + emake -C admin/systemd CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \ + EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) \ + SBINDIR=/usr/sbin + + if use tools ; then + for extra in ${EXTRAS[@]} ; do + if [ "${extra}" = "admin/halog" ]; then + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \ + EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" \ + PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) ${args[@]} admin/halog/halog + elif [ "${extra}" = "dev/hpack" ]; then + emake CFLAGS="${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} + else + # Those two includes are a workaround for hpack Makefile missing those + emake -C ${extra} \ + CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ + CC="$(tc-getCC)" ${args[@]} + fi + done + fi +} + +src_test() { + # https://github.com/vtest/VTest/issues/12 + emake -C "${VTEST_DIR}" CC="$(tc-getCC)" FLAGS="${CFLAGS} -Wno-error=unused-result" + ulimit -n 65536 || die "${PN} requires ulimit -n set to at least 65536 for tests" + env -u A -u D TMPDIR="/tmp" emake reg-tests -- --v --j "$(makeopts_jobs)" \ + HAPROXY_PROGRAM="${S}/haproxy" VTEST_PROGRAM="${VTEST_DIR}/vtest" REGTESTS_TYPE="default,bug,devel" +} + +src_install() { + dosbin haproxy + + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} + + doman doc/haproxy.1 + + systemd_dounit admin/systemd/haproxy.service + + einstalldocs + + # The errorfiles are used by upstream defaults. + insinto /etc/haproxy/errors/ + doins examples/errorfiles/* + + if use doc; then + dodoc doc/*.txt + #if use lua; then + # TODO: doc/lua-api/ + #fi + fi + + if use tools ; then + has admin/halog "${EXTRAS[@]}" && dobin admin/halog/halog + has admin/iprange "${EXTRAS[@]}" && { + newbin admin/iprange/iprange haproxy_iprange + newbin admin/iprange/ip6range haproxy_ip6range + } + has dev/tcploop "${EXTRAS[@]}" && newbin dev/tcploop/tcploop haproxy_tcploop + has dev/hpack "${EXTRAS[@]}" && { + newbin dev/hpack/gen-rht haproxy_gen-rht + newbin dev/hpack/gen-enc haproxy_gen-enc + newbin dev/hpack/decode haproxy_decode + } + fi + + if use examples ; then + docinto examples + dodoc examples/*.cfg + dodoc doc/seamless_reload.txt + fi + + insinto /usr/share/vim/vimfiles/syntax + doins admin/syntax-highlight/haproxy.vim +} + +pkg_postinst() { + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." + ewarn "Make use of them with the \"user\" and \"group\" directives." + + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then + einfo "Please consult the installed documentation for learning the configuration file's syntax." + einfo "The documentation and sample configuration files are installed here:" + einfo " ${EROOT}/usr/share/doc/${PF}" + fi + fi +} diff --git a/net-proxy/haproxy/haproxy-3.1.9999.ebuild b/net-proxy/haproxy/haproxy-3.1.9999.ebuild new file mode 100644 index 000000000000..c0bde0ca349c --- /dev/null +++ b/net-proxy/haproxy/haproxy-3.1.9999.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LUA_COMPAT=( lua5-4 lua5-3 ) + +[[ ${PV} == *9999 ]] && SCM="git-r3" +inherit toolchain-funcs lua-single systemd linux-info ${SCM} multiprocessing + +MY_P="${PN}-${PV/_beta/-dev}" + +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" +HOMEPAGE="http://www.haproxy.org" +if [[ ${PV} != *9999 ]]; then + # This is arbitrary; upstream uses master. Try to update when possible + VTEST_COMMIT="af198470d7ce482d3d26eb9ca3f246a438739366" + VTEST_DIR="${WORKDIR}/VTest-${VTEST_COMMIT}" + SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz + test? ( https://github.com/vtest/VTest/archive/${VTEST_COMMIT}.tar.gz -> VTest-${VTEST_COMMIT}.tar.gz )" + KEYWORDS="~amd64 ~arm64 ~ppc ~x86" +elif [[ ${PV} == 9999 ]]; then + VTEST_DIR="${WORKDIR}/VTest" + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy.git/" + EGIT_BRANCH=master +else + VTEST_DIR="${WORKDIR}/VTest" + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/" + EGIT_BRANCH=master +fi + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0/$(ver_cut 1-2)" +IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit prometheus-exporter +ssl systemd test +threads tools zlib lua 51degrees wurfl" +REQUIRED_USE="pcre-jit? ( pcre ) + lua? ( ${LUA_REQUIRED_USE} ) + ?? ( slz zlib )" +RESTRICT="!test? ( test )" + +BDEPEND="virtual/pkgconfig" +DEPEND=" + crypt? ( virtual/libcrypt:= ) + pcre? ( + dev-libs/libpcre2:= + pcre-jit? ( dev-libs/libpcre2:=[jit] ) + ) + ssl? ( + dev-libs/openssl:0= + ) + systemd? ( sys-apps/systemd ) + zlib? ( sys-libs/zlib ) + lua? ( ${LUA_DEPS} ) + test? ( + dev-libs/libpcre2 + sys-libs/zlib + )" +RDEPEND="${DEPEND} + acct-group/haproxy + acct-user/haproxy" + +S="${WORKDIR}/${MY_P}" + +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS ) +EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) + +haproxy_use() { + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" + + usex "${1}" "USE_${2}=1" "USE_${2}=" +} + +pkg_setup() { + use lua && lua-single_pkg_setup + if use net_ns; then + CONFIG_CHECK="~NET_NS" + linux-info_pkg_setup + fi +} + +src_unpack() { + if [[ ${PV} != *9999 ]]; then + default + else + git-r3_src_unpack + EGIT_REPO_URI="https://github.com/vtest/VTest" EGIT_CHECKOUT_DIR="${VTEST_DIR}" git-r3_src_unpack + fi +} + +src_compile() { + local -a args=( + V=1 + # Switching to PCRE2 by default, bug 838013 + PCRE= + PCRE_JIT= + ) + + if use elibc_musl; then + args+=( TARGET=linux-musl ) + else + args+=( TARGET=linux-glibc ) + fi + + # TODO: PCRE2_WIDTH? + args+=( $(haproxy_use threads THREAD) ) + args+=( $(haproxy_use crypt LIBCRYPT) ) + args+=( $(haproxy_use net_ns NS) ) + args+=( $(haproxy_use pcre PCRE2) ) + args+=( $(haproxy_use pcre-jit PCRE2_JIT) ) + args+=( $(haproxy_use ssl OPENSSL) ) + args+=( $(haproxy_use slz SLZ) ) + args+=( $(haproxy_use zlib ZLIB) ) + args+=( $(haproxy_use lua LUA) ) + args+=( $(haproxy_use 51degrees 51DEGREES) ) + args+=( $(haproxy_use wurfl WURFL) ) + args+=( $(haproxy_use prometheus-exporter PROMEX) ) + + # Bug #668002 + if use ppc || use arm || use hppa; then + TARGET_LDFLAGS=-latomic + fi + + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" \ + TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) ${args[@]} + emake -C admin/systemd CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \ + EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) \ + SBINDIR=/usr/sbin + + if use tools ; then + for extra in ${EXTRAS[@]} ; do + if [ "${extra}" = "admin/halog" ]; then + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \ + EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" \ + PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) ${args[@]} admin/halog/halog + elif [ "${extra}" = "dev/hpack" ]; then + emake CFLAGS="${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} + else + # Those two includes are a workaround for hpack Makefile missing those + emake -C ${extra} \ + CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ + CC="$(tc-getCC)" ${args[@]} + fi + done + fi +} + +src_test() { + # https://github.com/vtest/VTest/issues/12 + emake -C "${VTEST_DIR}" CC="$(tc-getCC)" FLAGS="${CFLAGS} -Wno-error=unused-result" + ulimit -n 65536 || die "${PN} requires ulimit -n set to at least 65536 for tests" + env -u A -u D TMPDIR="/tmp" emake reg-tests -- --v --j "$(makeopts_jobs)" \ + HAPROXY_PROGRAM="${S}/haproxy" VTEST_PROGRAM="${VTEST_DIR}/vtest" REGTESTS_TYPE="default,bug,devel" +} + +src_install() { + dosbin haproxy + + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} + + doman doc/haproxy.1 + + systemd_dounit admin/systemd/haproxy.service + + einstalldocs + + # The errorfiles are used by upstream defaults. + insinto /etc/haproxy/errors/ + doins examples/errorfiles/* + + if use doc; then + dodoc doc/*.txt + #if use lua; then + # TODO: doc/lua-api/ + #fi + fi + + if use tools ; then + has admin/halog "${EXTRAS[@]}" && dobin admin/halog/halog + has admin/iprange "${EXTRAS[@]}" && { + newbin admin/iprange/iprange haproxy_iprange + newbin admin/iprange/ip6range haproxy_ip6range + } + has dev/tcploop "${EXTRAS[@]}" && newbin dev/tcploop/tcploop haproxy_tcploop + has dev/hpack "${EXTRAS[@]}" && { + newbin dev/hpack/gen-rht haproxy_gen-rht + newbin dev/hpack/gen-enc haproxy_gen-enc + newbin dev/hpack/decode haproxy_decode + } + fi + + if use examples ; then + docinto examples + dodoc examples/*.cfg + dodoc doc/seamless_reload.txt + fi + + insinto /usr/share/vim/vimfiles/syntax + doins admin/syntax-highlight/haproxy.vim +} + +pkg_postinst() { + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." + ewarn "Make use of them with the \"user\" and \"group\" directives." + + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then + einfo "Please consult the installed documentation for learning the configuration file's syntax." + einfo "The documentation and sample configuration files are installed here:" + einfo " ${EROOT}/usr/share/doc/${PF}" + fi + fi +} diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild index 019b7ed1219f..c0bde0ca349c 100644 --- a/net-proxy/haproxy/haproxy-9999.ebuild +++ b/net-proxy/haproxy/haproxy-9999.ebuild @@ -61,7 +61,7 @@ RDEPEND="${DEPEND} S="${WORKDIR}/${MY_P}" -DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS ) EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) haproxy_use() { @@ -113,7 +113,6 @@ src_compile() { args+=( $(haproxy_use lua LUA) ) args+=( $(haproxy_use 51degrees 51DEGREES) ) args+=( $(haproxy_use wurfl WURFL) ) - args+=( $(haproxy_use systemd SYSTEMD) ) args+=( $(haproxy_use prometheus-exporter PROMEX) ) # Bug #668002 |