commit: 3ef78a2117239813f7af00ddb2efb65b39ec3e6c
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 12 14:19:47 2026 +0000
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Thu Feb 12 14:19:47 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ef78a21
net-proxy/haproxy: Bumps to 3.3.3, 3.2.12 and 3.0.16
Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org>
net-proxy/haproxy/Manifest | 3 +
net-proxy/haproxy/haproxy-3.0.16.ebuild | 217 +++++++++++++++++++++++++++++++
net-proxy/haproxy/haproxy-3.2.12.ebuild | 220 +++++++++++++++++++++++++++++++
net-proxy/haproxy/haproxy-3.3.3.ebuild | 223 ++++++++++++++++++++++++++++++++
4 files changed, 663 insertions(+)
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
index 7973eadececd..4011ed2e1b00 100644
--- a/net-proxy/haproxy/Manifest
+++ b/net-proxy/haproxy/Manifest
@@ -3,7 +3,10 @@ DIST haproxy-2.8.11.tar.gz 4400628 BLAKE2B
0daccc4dbae5cecae3ad0bc1d164ea78a9584
DIST haproxy-2.8.18.tar.gz 4436269 BLAKE2B
707539cbc021c0e781f7a1e8369ba5cb0159ad3c2bfaa0b7f84902faee4e685227755456419c165c6ac47f52cd52f6fb6d7efb193240a1888cccc1db949814dd
SHA512
9bb4598b4197927ac46285c4dffe54d90177b0929e0ff8db1966f294f5e6b300bf33044b0b4925bbba565068bc722ea19f984e1b6b4850f02897691343bd841c
DIST haproxy-3.0.14.tar.gz 4755441 BLAKE2B
c58f1ad55ba5765fa79045be0fbdaa20dc3893a6827a49f3e43ad59042afaa6957d4d7335803ac0a12ec5cb512c19f07ab3475fdcb25f8ef4e78fef3605c5eda
SHA512
96b033b7ad80f59a6c744217f81a14e738beedb9b723216711294cef5770df8ef29cc1cb4dca82769ca479dbc91c6307e2c88e29efeede56fb5775ca29b650f6
DIST haproxy-3.0.15.tar.gz 4759227 BLAKE2B
d1190799342c602c001fe189031e2f8b94c95e623f780978fef60ea8a695b68c70be0deb4326c817d66675666f4e1f0b5fc110f4ce535b52b3c1479d2b1bd166
SHA512
8d029351faa2c1af8b844034e3f932adc1232a8c938da5123c01d0d5fc90ef58fc32f1f4d3e3c41b8e24c46c59a0eb8fa4668d65a91d33c84cc13e2112aa9737
+DIST haproxy-3.0.16.tar.gz 4761067 BLAKE2B
f68d1c2ef66635f5f4ed69c5ac9e3a5aba92545a618f7055459a02ed370f2ef073733333347722fd7cac47f9eea390cf3afc6d43fb3cb0d410e6e3bf8064285e
SHA512
67ed0804bc55735ca39ed5fadb6ccddbf5d01d83797d511abc3d165eff0b75907092ae7daf7f3a8dede84da867cabff93adc143c637f378773c9c5c0af347247
DIST haproxy-3.0.5.tar.gz 4698022 BLAKE2B
c64d8799755fddaf5b45a9e2b67c5f03b25af98fbddde68ab1206c288d9a65f91938810b150c4398ee138d9154c90f1af9fb05c3d0bbc80394e71430e1cc4396
SHA512
8c16b026d5e26fc030178ecd354c68e8ea32c2b971f143cb2aa2f1b2d16fbfc0a27e3975f78873a0cefe3f904b5f1999f8d75622a04234b9cf88f90161d9ea91
DIST haproxy-3.2.11.tar.gz 5129152 BLAKE2B
64be7f03a95da340aea232432993d7214f813eb9d4f183da7281470091e0607056b9eaa2d00bd188b72e7661714eab3aab63d7619b1749f526cc6f0b1d7d27ec
SHA512
9e00824e6a199e8f8e61499f5cf26e9026efb7085035bd6eb270159962c68f2d5b6ad6e0f3216eb2c03d341d1abc47794ecbcedb91be941be01664154f7be723
+DIST haproxy-3.2.12.tar.gz 5130947 BLAKE2B
bfc5ca5aec154a46048aafec76b528e8201ad80d0108b1122c8165ab047aaee61461964956cd1a56ee7397b052e2e6bd1338196846bd86a7506501ebb09ff13d
SHA512
4cf53f7ee307586517509225a180b47108a33374454fa93fe102140c1dbb7a29832f8b12542df520386961bd8c8b264fabc92f1d3f9299bf554a01e329563168
DIST haproxy-3.2.9.tar.gz 5123457 BLAKE2B
37b50abe8f8260453c4b40f6f52186cee276a3a4577d7b6da6a14ea94f43cea6e5a3ab3cb8ec9d6642a5d4d9dc90e94c4757a2306e2a363e0b710db735bc0972
SHA512
fd694adcdccbba54121e686f32cfb2281abfc97c6716835aa35013f05b85033c4967a056f02ecbc6ed613dda44d55373d2577e452079ba4e2bfa7b2fe0fff172
DIST haproxy-3.3.2.tar.gz 5245813 BLAKE2B
33a6caee0a22955e86788b10f27cab188c87afd9d783f889af308f2357bae490e8990c32b30ac9c41f5fb9986d816f282d9688e3f39b65287ce70de965a6041b
SHA512
008980eaeed0caf9317f6bc0f8fd44eaf1466d8603cbea577341dfbfc2b4a03c323c3f3b071f7a15109624f8417205a300c39afa7732d43fc0513fded3a495ae
+DIST haproxy-3.3.3.tar.gz 5249264 BLAKE2B
5443186f5a95091e1754563bf4235b1214745e383f76d946073a7910553661f9c6edc207c865592158f970a6ca60db28ca801b59b5f3b5d5afe52df72aff88c7
SHA512
f440597d610d6f87c905714aaf08db1ef40e658958329de480583ef143bcdd0ea931cb0731a76e6a03863f3dfe1bc65551ecf534c1e5f9a0631be35f2da34400
diff --git a/net-proxy/haproxy/haproxy-3.0.16.ebuild
b/net-proxy/haproxy/haproxy-3.0.16.ebuild
new file mode 100644
index 000000000000..0b5d07b15a9d
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-3.0.16.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2026 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
+
+S="${WORKDIR}/${MY_P}"
+
+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? ( virtual/zlib:= )
+ lua? ( ${LUA_DEPS} )
+ test? (
+ dev-libs/libpcre2
+ virtual/zlib:=
+ )"
+RDEPEND="${DEPEND}
+ acct-group/haproxy
+ acct-user/haproxy"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+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 systemd SYSTEMD) )
+ 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-r9" ${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.2.12.ebuild
b/net-proxy/haproxy/haproxy-3.2.12.ebuild
new file mode 100644
index 000000000000..bc0768c44cf5
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-3.2.12.ebuild
@@ -0,0 +1,220 @@
+# Copyright 1999-2026 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
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit prometheus-exporter quic
+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=
+ )
+ quic? (
+ >=dev-libs/openssl-3.5.0:0=
+ )
+ systemd? ( sys-apps/systemd )
+ zlib? ( virtual/zlib:= )
+ lua? ( ${LUA_DEPS} )
+ test? (
+ dev-libs/libpcre2
+ virtual/zlib:=
+ )"
+RDEPEND="${DEPEND}
+ acct-group/haproxy
+ acct-user/haproxy"
+
+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) )
+ args+=( $(haproxy_use quic QUIC) )
+
+ # 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-r9" ${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.3.3.ebuild
b/net-proxy/haproxy/haproxy-3.3.3.ebuild
new file mode 100644
index 000000000000..d5a863b52da2
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-3.3.3.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2026 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
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit prometheus-exporter quic
+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=
+ )
+ quic? (
+ >=dev-libs/openssl-3.5.0:0=
+ )
+ systemd? ( sys-apps/systemd )
+ zlib? ( virtual/zlib:= )
+ lua? ( ${LUA_DEPS} )
+ test? (
+ dev-libs/libpcre2
+ virtual/zlib:=
+ )"
+RDEPEND="${DEPEND}
+ acct-group/haproxy
+ acct-user/haproxy"
+
+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) )
+ args+=( $(haproxy_use quic QUIC) )
+
+ # 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-r9" ${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
+ }
+
+ dosbin admin/cli/haproxy-dump-certs
+ dosbin admin/cli/haproxy-reload
+ 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
+}