From ffa90870595cf1da2caedd2a4878305d85b9b9cb Mon Sep 17 00:00:00 2001 From: ii8 Date: Wed, 5 Aug 2026 18:36:16 +0100 Subject: [PATCH] haproxy: update to 3.4.3. * honor conf file in service directory if it exists * home dir should not be writable by anyone, see: https://docs.haproxy.org/3.4/configuration.html#3.1-chroot * add sensible default timeouts and maxconn values to haproxy.cfg haproxy will complain and warn if these are absent * make the default config work with ipv6 --- srcpkgs/haproxy/files/haproxy.cfg | 6 +++++- srcpkgs/haproxy/files/haproxy/run | 4 ++-- srcpkgs/haproxy/template | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/srcpkgs/haproxy/files/haproxy.cfg b/srcpkgs/haproxy/files/haproxy.cfg index a8631a77905114..2480d3d0f7b670 100644 --- a/srcpkgs/haproxy/files/haproxy.cfg +++ b/srcpkgs/haproxy/files/haproxy.cfg @@ -3,12 +3,16 @@ global user haproxy group haproxy stats socket /var/run/haproxy.sock mode 0600 level admin expose-fd listeners thread 1 + maxconn 256 defaults mode http + timeout connect 5s + timeout client 50s + timeout server 50s frontend proxy - bind *:80 + bind [::]:80 default_backend servers backend servers diff --git a/srcpkgs/haproxy/files/haproxy/run b/srcpkgs/haproxy/files/haproxy/run index 822c75dba8dbe6..3567c9c1426d64 100644 --- a/srcpkgs/haproxy/files/haproxy/run +++ b/srcpkgs/haproxy/files/haproxy/run @@ -1,4 +1,4 @@ #!/bin/sh exec 2>&1 - -exec haproxy -W -f /etc/haproxy/haproxy.cfg +[ -r conf ] && . ./conf +exec haproxy ${OPTS--W} -f /etc/haproxy/haproxy.cfg diff --git a/srcpkgs/haproxy/template b/srcpkgs/haproxy/template index 3fe6d5428b34ad..d471d83c8f647e 100644 --- a/srcpkgs/haproxy/template +++ b/srcpkgs/haproxy/template @@ -1,7 +1,7 @@ # Template file for 'haproxy' pkgname=haproxy # XXX: the version should be a LTS release -version=3.4.2 +version=3.4.3 revision=1 build_style=gnu-makefile make_build_args="TARGET=linux-${XBPS_TARGET_LIBC} cmd_LD=\${CC} EXTRA=admin/halog/halog @@ -18,14 +18,14 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://www.haproxy.org" changelog="https://www.haproxy.org/download/${version%.*}/src/CHANGELOG" distfiles="https://www.haproxy.org/download/${version%.*}/src/haproxy-${version}.tar.gz" -checksum=b1330dbb0d6e6bc4a72c4708a6a9e585579cd1156dfe5763c26305105bc12907 +checksum=7fa666d36d198275999e2a68dda44d3d37960f2f7aed3a595fb811f4fd0515b5 if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then makedepends+=" libxcrypt-devel" fi haproxy_homedir="/var/lib/${pkgname}" -make_dirs="$haproxy_homedir 0750 ${pkgname} ${pkgname}" +make_dirs="$haproxy_homedir 0550 ${pkgname} ${pkgname}" conf_files="/etc/${pkgname}/${pkgname}.cfg" system_accounts="haproxy"