diff options
Diffstat (limited to 'net/haproxy29/files')
-rw-r--r-- | net/haproxy29/files/haproxy.in | 130 | ||||
-rw-r--r-- | net/haproxy29/files/patch-src_cpuset.c | 14 | ||||
-rw-r--r-- | net/haproxy29/files/patch-src_tools.c | 62 |
3 files changed, 0 insertions, 206 deletions
diff --git a/net/haproxy29/files/haproxy.in b/net/haproxy29/files/haproxy.in deleted file mode 100644 index e9eb2147c412..000000000000 --- a/net/haproxy29/files/haproxy.in +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh - -# PROVIDE: haproxy -# REQUIRE: DAEMON LOGIN -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable haproxy: -# -# haproxy_enable (bool): default: "NO" -# Set to "YES" to enable haproxy -# haproxy_pidfile (str): default: /var/run/haproxy.pid -# Set to the full path of the pid file -# haproxy_config (str): default: %%PREFIX%%/etc/haproxy.conf -# Set to the full path of the config file -# haproxy_flags (str): default: Autogenerated using pidfile and config options -# Set to override with your own options -# haproxy_profiles (str): default: empty -# Set to space-separated list of profiles: for each profile separate haproxy -# process will be spawned, with haproxy-${profile}.conf config file. -# You can override default pidfile and config file for each profile with -# haproxy_${profile}_config and haproxy_${profile}_pidfile. - -. /etc/rc.subr - -name="haproxy" -rcvar=haproxy_enable -command="%%PREFIX%%/sbin/haproxy" -extra_commands="reload configtest hardstop hardreload softreload" -reload_cmd="haproxy_reload" -hardreload_cmd="haproxy_reload" -hardreload_precmd="def_hardreload_option" -softreload_cmd="haproxy_reload" -softreload_precmd="def_softreload_option" -stop_cmd="haproxy_stop" -hardstop_cmd="haproxy_stop" -hardstop_precmd="def_hardstop_signal" - -: ${haproxy_enable:="NO"} -: ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"} -: ${haproxy_socket:="/var/run/${name}/socket"} -pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"} - -def_hardreload_option() -{ - reload_opt="-st" -} - -def_softreload_option() -{ - reload_opt="-x ${haproxy_socket} -sf" -} - -def_hardstop_signal() -{ - sig_stop="TERM" -} - -load_rc_config $name - -is_valid_profile() { - local profile - for profile in $haproxy_profiles; do - if [ "$profile" = "$1" ]; then - return 0 - fi - done - return 1 -} - -if [ -n "$2" ]; then - profile=$2 - if ! is_valid_profile $profile; then - echo "$0: no such profile ($profile) defined in ${name}_profiles." - exit 1 - fi - eval haproxy_config="\${haproxy_${profile}_config:-%%PREFIX%%/etc/haproxy-${profile}.conf}" - eval pidfile="\${haproxy_${profile}_pidfile:-/var/run/haproxy-${profile}.pid}" -else - if [ "x${haproxy_profiles}" != "x" -a "x$1" != "x" ]; then - for profile in ${haproxy_profiles}; do - echo "===> ${name} profile: ${profile}" - %%PREFIX%%/etc/rc.d/haproxy $1 ${profile} - retcode="$?" - if [ ${retcode} -ne 0 ]; then - failed="${profile} (${retcode}) ${failed:-}" - else - success="${profile} ${success:-}" - fi - done - exit 0 - fi -fi - -: ${haproxy_flags:="-q -f ${haproxy_config} -p ${pidfile}"} -configtest_cmd="$command -c -f $haproxy_config" -start_precmd="$command -q -c -f $haproxy_config" -required_files=$haproxy_config -sig_stop=SIGUSR1 -reload_opt="-sf" - -haproxy_reload() -{ - ${command} -q -c -f ${haproxy_config} - if [ $? -ne 0 ]; then - err 1 "Error found in ${haproxy_config} - not reloading current process!" - fi - rc_pid=$(check_pidfile ${pidfile} ${command}) - if [ $rc_pid ]; then - ${command} ${haproxy_flags} $reload_opt $(cat ${pidfile}) - else - _run_rc_notrunning - return 1 - fi -} - -haproxy_stop() -{ - rc_pid=$(check_pidfile ${pidfile} ${command}) - if [ $rc_pid ]; then - rc_pid=$(cat ${pidfile}) - kill -$sig_stop $rc_pid - wait_for_pids $rc_pid - else - _run_rc_notrunning - return 1 - fi -} - -run_rc_command "$1" diff --git a/net/haproxy29/files/patch-src_cpuset.c b/net/haproxy29/files/patch-src_cpuset.c deleted file mode 100644 index 42f04b37e6f6..000000000000 --- a/net/haproxy29/files/patch-src_cpuset.c +++ /dev/null @@ -1,14 +0,0 @@ ---- src/cpuset.c.orig 2021-12-23 16:47:51 UTC -+++ src/cpuset.c -@@ -53,7 +53,11 @@ void ha_cpuset_and(struct hap_cpuset *dst, const struc - CPU_AND(&dst->cpuset, &dst->cpuset, &src->cpuset); - - #elif defined(CPUSET_USE_FREEBSD_CPUSET) -+#if defined(CPU_ALLOC) -+ CPU_AND(&dst->cpuset, &dst->cpuset, &src->cpuset); -+#else - CPU_AND(&dst->cpuset, &src->cpuset); -+#endif - - #elif defined(CPUSET_USE_ULONG) - dst->cpuset &= src->cpuset; diff --git a/net/haproxy29/files/patch-src_tools.c b/net/haproxy29/files/patch-src_tools.c deleted file mode 100644 index ebdf24de0fc0..000000000000 --- a/net/haproxy29/files/patch-src_tools.c +++ /dev/null @@ -1,62 +0,0 @@ -From c03a02388257e21810c534d50a93658e61a83494 Mon Sep 17 00:00:00 2001 -From: Brooks Davis <brooks@one-eyed-alien.net> -Date: Wed, 28 Feb 2024 18:12:40 +0000 -Subject: [PATCH] MINOR: tools: use public interface for FreeBSD - get_exec_path() - -Where possible (FreeBSD 13+), use the public, documented interface to -the ELF auxiliary argument vector: elf_aux_info(). - -__elf_aux_vector is a private interface exported so that the runtime -linker can set its value during process startup and not intended for -public consumption. In FreeBSD 15 it has been removed from libc and -moved to libsys. ---- - src/tools.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/src/tools.c b/src/tools.c -index e1ba241..4759222 100644 ---- src/tools.c -+++ src/tools.c -@@ -17,9 +17,14 @@ - #endif - - #if defined(__FreeBSD__) -+#include <sys/param.h> -+#if __FreeBSD_version < 1300058 - #include <elf.h> - #include <dlfcn.h> - extern void *__elf_aux_vector; -+#else -+#include <sys/auxv.h> -+#endif - #endif - - #if defined(__NetBSD__) -@@ -5018,6 +5023,7 @@ const char *get_exec_path() - if (execfn && execfn != ENOENT) - ret = (const char *)execfn; - #elif defined(__FreeBSD__) -+#if __FreeBSD_version < 1300058 - Elf_Auxinfo *auxv; - for (auxv = __elf_aux_vector; auxv->a_type != AT_NULL; ++auxv) { - if (auxv->a_type == AT_EXECPATH) { -@@ -5025,6 +5031,14 @@ const char *get_exec_path() - break; - } - } -+#else -+ static char execpath[MAXPATHLEN]; -+ -+ if (execpath[0] == '\0') -+ elf_aux_info(AT_EXECPATH, execpath, MAXPATHLEN); -+ if (execpath[0] != '\0') -+ ret = execpath; -+#endif - #elif defined(__NetBSD__) - AuxInfo *auxv; - for (auxv = _dlauxinfo(); auxv->a_type != AT_NULL; ++auxv) { --- -1.7.10.4 - |