net-proxy/haproxy: Bumps to 3.0.11 and 3.1.8

Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
This commit is contained in:
Christian Ruppert 2025-06-03 09:03:11 +02:00
parent fd65a131e8
commit 0d82c1a9c0
No known key found for this signature in database
GPG Key ID: 24F9CE06428B07BC
3 changed files with 435 additions and 0 deletions

View File

@ -3,6 +3,8 @@ DIST haproxy-2.8.11.tar.gz 4400628 BLAKE2B 0daccc4dbae5cecae3ad0bc1d164ea78a9584
DIST haproxy-2.8.15.tar.gz 4418838 BLAKE2B f2f0ac46400ddcccbf01319d62be7df34ec16be047f33c795b1d944eacf82fa919c93201d79a468746c4580d89a1f45fe81ff3a5fb5510c438de4b37efe0c2e7 SHA512 ac116667a6bce4f77789b9e5cdfb703864c96b18f20025cf6a00f81d0caf0829e1a7fc3f325c181b3509c64feed8711b67db2e88ac24f85611d68ee592282ad3
DIST haproxy-2.8.7.tar.gz 4376705 BLAKE2B ae145fe6b642f860af814c2c43e84452a0bbc1b545b1b11eb07c65d903b97e42576b94e1774838b32b29ce32778941b79222669fc7615779c49f2ced85bf3fdc SHA512 dd2fe2ccd5d8805da3f7544451507b182377c34a9951747643c04cb9ee178b7be0978d56a0586c59771c2bb955765d3e961f6f06187afb768dc1fd27f08da464
DIST haproxy-3.0.10.tar.gz 4734325 BLAKE2B 878c512f346e51404c7aeaa333ab193735a590d84114a4a68d61e166331a455706fd20500ac0f083a8c6cf17081933083be6b4410852535162804a7a41a11998 SHA512 fe75c1cc2362dac46cf262c0e4a05cecf583e7eef6ca20313f04ba152f8baa96a11030296c3d8cc6dda7a408ae62530ba3f5df94517f46588292f16b1a7a551e
DIST haproxy-3.0.11.tar.gz 4738655 BLAKE2B df5f6ee9f29df007ad2be38b91fb6b99d7d0cfb6de4fc4144caaba1ce9b94b8234132df507ea022d124409f1887536ddb428161972bd724988323d324c0bfe68 SHA512 3dc9f2367a3601480b302fad47e8cb8172d7a50443970284f4253f0b605dcd7b0e8d4ce825e9c6f4c66f24a65b6e28cf5891cfb659eeab21f8446dbb3c3bf25b
DIST haproxy-3.0.5.tar.gz 4698022 BLAKE2B c64d8799755fddaf5b45a9e2b67c5f03b25af98fbddde68ab1206c288d9a65f91938810b150c4398ee138d9154c90f1af9fb05c3d0bbc80394e71430e1cc4396 SHA512 8c16b026d5e26fc030178ecd354c68e8ea32c2b971f143cb2aa2f1b2d16fbfc0a27e3975f78873a0cefe3f904b5f1999f8d75622a04234b9cf88f90161d9ea91
DIST haproxy-3.1.7.tar.gz 4917146 BLAKE2B 07c99ab5dfbafecb46fd6cfb62e6e82e6feab9be2a12b28ddaf72bcd62a47ab8cd4faf8f148ad44f80d4d95c098ceedb8c4eb8c4c4d010e85d734f22ec75a1ab SHA512 4cf13b96fcc0c7748ebf2a9bd512474d8aa5f760dd9e40961ba6c0ce72324450b556657b129114c3ca150826fff2b161d062366419fac7bd9c4d44a68e8b6a73
DIST haproxy-3.1.8.tar.gz 4923696 BLAKE2B a863bf3944a871329b22c65e13a7e4759d1baa8d5d3b5b7ad54f7eb9d286a3fa49022d7f93f044b210fb60a7649927625f1408c190627b65e69e09c7fc6c2136 SHA512 4708d6f1611ad8e87c1ff51350d2c339be1d268b9961e9d55d026aee8e45b4feeb1aa0528e7877770b45471794a0f05c48c5371d420bde8f5c78a6f7290742e2
DIST haproxy-3.2.0.tar.gz 5090982 BLAKE2B b0269dde2361c4032b7eb1e681ed4158ef30600e2263099b283cc26f912e65ac41585e9eed2abab76485fa76603fd024355f2c0036c809ca43487cc233c4747b SHA512 bba758f5541f79bbff1be43222c93146c785e64efeef53977c5a07c44de2d3830096323d5d5ce4d1572fec6f9aa5f1bc9452d0d06df864f67474f9adee0c169b

View File

@ -0,0 +1,217 @@
# Copyright 1999-2025 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 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
}

View File

@ -0,0 +1,216 @@
# Copyright 1999-2025 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-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
}