Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
www/pound update
To:
ports <ports@openbsd.org>
Date:
Mon, 15 Sep 2025 21:34:23 +0100

Download raw body.

Thread
lightly tested, but does anyone make proper use of this who can do a
better test?

patch-src_poundctl_c works around no BIO_vprintf in libressl; I think
it's sane (and doesn't appear to leak ram) but another pair of eyes
wouldn't hurt.

the fsevmon stuff which is disabled only used to be built on OS with
inotify; upstream added some support for kqueue, but not for OpenBSD.
possibly just #ifdef'ing the missing macros would be enough but
disabling felt a better approach for now.

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/pound/Makefile,v
diff -u -p -r1.22 Makefile
--- Makefile	24 Jan 2024 10:01:30 -0000	1.22
+++ Makefile	15 Sep 2025 20:28:04 -0000
@@ -1,6 +1,6 @@
 COMMENT =		HTTP reverse proxy/load balancer/SSL offload
 
-V =			4.11
+V =			4.17
 DISTNAME =		pound-$V
 PKGNAME =		${DISTNAME:L}
 
@@ -18,12 +18,20 @@ WANTLIB +=		c crypto pcre2-8 pcre2-posix
 SITES =			https://github.com/graygnuorg/pound/releases/download/v$V/
 
 LIB_DEPENDS =		devel/pcre2
+BUILD_DEPENDS =		print/texinfo
 
 CONFIGURE_STYLE =	gnu
 CONFIGURE_ARGS +=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
 			LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
+			MAKEINFO=gmakeinfo \
 			--with-owner=root \
 			--with-group=bin
+
+# we don't have NOTE_CLOSE_WRITE or NOTE_CLOSE
+CONFIGURE_ARGS +=	--without-fsevmon
+
+# tests run, but most fail because they use perl threads
+NO_TEST =		Yes
 
 post-install:
 	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pound
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/pound/distinfo,v
diff -u -p -r1.7 distinfo
--- distinfo	24 Jan 2024 10:01:30 -0000	1.7
+++ distinfo	15 Sep 2025 20:28:04 -0000
@@ -1,2 +1,2 @@
-SHA256 (pound-4.11.tar.gz) = U2tZSPehfRegoe4DOBhDrTygIKqx6bJPXFzIPP0gF+M=
-SIZE (pound-4.11.tar.gz) = 565278
+SHA256 (pound-4.17.tar.gz) = uHWdlFRgJ/AJDbtRRV4v8SrS+V/jTtxFWaWh3Adjmi4=
+SIZE (pound-4.17.tar.gz) = 1028579
Index: patches/patch-src_ht_h
===================================================================
RCS file: /cvs/ports/www/pound/patches/patch-src_ht_h,v
diff -u -p -r1.1 patch-src_ht_h
--- patches/patch-src_ht_h	24 Jan 2024 10:01:30 -0000	1.1
+++ patches/patch-src_ht_h	15 Sep 2025 20:28:04 -0000
@@ -1,7 +1,7 @@
 Index: src/ht.h
 --- src/ht.h.orig
 +++ src/ht.h
-@@ -74,7 +74,7 @@
+@@ -80,7 +80,7 @@
  #define cat2(a,b) __cat2__(a,b)
  #define cat3(a,b,c) cat2(a, cat2(b,c))
  
@@ -10,7 +10,7 @@ Index: src/ht.h
  # define HT_DECLARE(type) DEFINE_LHASH_OF (type)
  #else
  # define HT_DECLARE(type) DECLARE_LHASH_OF (type)
-@@ -110,7 +110,7 @@ HT_TYPE_CMP_FN (const HT_TYPE *a, const HT_TYPE *b)
+@@ -116,7 +116,7 @@ HT_TYPE_CMP_FN (const HT_TYPE *a, const HT_TYPE *b)
  }
  #endif
  
@@ -19,7 +19,7 @@ Index: src/ht.h
  #define HT_IMPL_FN(type) \
    static IMPLEMENT_LHASH_HASH_FN (type, type) \
    static IMPLEMENT_LHASH_COMP_FN (type, type)
-@@ -121,7 +121,7 @@ HT_IMPL_FN(HT_TYPE)
+@@ -127,7 +127,7 @@ HT_IMPL_FN(HT_TYPE)
  static inline HT_TYPE_HASH_T *
  cat2(HT_TYPE,_HASH_NEW) (void)
  {
@@ -28,16 +28,16 @@ Index: src/ht.h
    return cat3(lh_, HT_TYPE, _new) (HT_TYPE_HASH_FN, HT_TYPE_CMP_FN);
  #else
    return LHM_lh_new (HT_TYPE, HT_TYPE);
-@@ -132,7 +132,7 @@ cat2(HT_TYPE,_HASH_NEW) (void)
+@@ -138,7 +138,7 @@ cat2(HT_TYPE,_HASH_NEW) (void)
  static inline void
  cat2(HT_TYPE,_HASH_FREE) (HT_TYPE_HASH_T *tab)
  {
 -#if OPENSSL_VERSION_NUMBER >= 0x10100000L
 +#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
-   return cat3(lh_, HT_TYPE, _free) (tab);
+   cat3(lh_, HT_TYPE, _free) (tab);
  #else
-   return LHM_lh_free (HT_TYPE, tab);
-@@ -143,7 +143,7 @@ cat2(HT_TYPE,_HASH_FREE) (HT_TYPE_HASH_T *tab)
+   LHM_lh_free (HT_TYPE, tab);
+@@ -149,7 +149,7 @@ cat2(HT_TYPE,_HASH_FREE) (HT_TYPE_HASH_T *tab)
  static inline HT_TYPE *
  cat2(HT_TYPE, _INSERT) (HT_TYPE_HASH_T *tab, HT_TYPE *node)
  {
@@ -46,7 +46,7 @@ Index: src/ht.h
    return cat3(lh_, HT_TYPE, _insert) (tab, node);
  #else
    return LHM_lh_insert (HT_TYPE, tab, node);
-@@ -154,7 +154,7 @@ cat2(HT_TYPE, _INSERT) (HT_TYPE_HASH_T *tab, HT_TYPE *
+@@ -160,7 +160,7 @@ cat2(HT_TYPE, _INSERT) (HT_TYPE_HASH_T *tab, HT_TYPE *
  static inline HT_TYPE *
  cat2(HT_TYPE, _RETRIEVE) (HT_TYPE_HASH_T *tab, HT_TYPE *node)
  {
@@ -55,7 +55,7 @@ Index: src/ht.h
    return cat3(lh_, HT_TYPE, _retrieve) (tab, node);
  #else
    return LHM_lh_retrieve (HT_TYPE, tab, node);
-@@ -166,7 +166,7 @@ cat2(HT_TYPE, _RETRIEVE) (HT_TYPE_HASH_T *tab, HT_TYPE
+@@ -172,7 +172,7 @@ cat2(HT_TYPE, _RETRIEVE) (HT_TYPE_HASH_T *tab, HT_TYPE
  static inline HT_TYPE *
  cat2(HT_TYPE, _DELETE) (HT_TYPE_HASH_T *tab, HT_TYPE *node)
  {
@@ -64,7 +64,7 @@ Index: src/ht.h
    return cat3(lh_, HT_TYPE, _delete) (tab, node);
  #else
    return LHM_lh_delete (HT_TYPE, tab, node);
-@@ -175,7 +175,7 @@ cat2(HT_TYPE, _DELETE) (HT_TYPE_HASH_T *tab, HT_TYPE *
+@@ -181,7 +181,7 @@ cat2(HT_TYPE, _DELETE) (HT_TYPE_HASH_T *tab, HT_TYPE *
  #endif /* HT_NO_DELETE */
  
  #ifndef HT_NO_FOREACH
@@ -73,9 +73,9 @@ Index: src/ht.h
  IMPLEMENT_LHASH_DOALL_ARG (HT_TYPE, void);
  #endif
  
-@@ -183,7 +183,7 @@ static inline void
- cat2(HT_TYPE, _FOREACH) (HT_TYPE_HASH_T *tab, void (*fun) (HT_TYPE *, void *),
- 			 void *data)
+@@ -189,7 +189,7 @@ static inline void
+ cat2(HT_TYPE, _FOREACH) (HT_TYPE_HASH_T *tab,
+ 			 void (*fun) (HT_TYPE *, void *), void *data)
  {
 -#if OPENSSL_VERSION_NUMBER >= 0x10100000L
 +#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
Index: patches/patch-src_http_c
===================================================================
RCS file: /cvs/ports/www/pound/patches/patch-src_http_c,v
diff -u -p -r1.1 patch-src_http_c
--- patches/patch-src_http_c	24 Jan 2024 10:01:30 -0000	1.1
+++ patches/patch-src_http_c	15 Sep 2025 20:28:04 -0000
@@ -1,7 +1,7 @@
 Index: src/http.c
 --- src/http.c.orig
 +++ src/http.c
-@@ -3013,7 +3013,7 @@ log_duration (char *buf, size_t size, struct timespec 
+@@ -3449,7 +3449,7 @@ log_duration (char *buf, size_t size, struct timespec 
    struct timespec end, diff;
    clock_gettime (CLOCK_REALTIME, &end);
    diff = timespec_sub (&end, start);
Index: patches/patch-src_pound_c
===================================================================
RCS file: /cvs/ports/www/pound/patches/patch-src_pound_c,v
diff -u -p -r1.1 patch-src_pound_c
--- patches/patch-src_pound_c	24 Jan 2024 10:01:30 -0000	1.1
+++ patches/patch-src_pound_c	15 Sep 2025 20:28:04 -0000
@@ -1,16 +1,16 @@
 Index: src/pound.c
 --- src/pound.c.orig
 +++ src/pound.c
-@@ -21,6 +21,8 @@
- #include "json.h"
+@@ -22,6 +22,8 @@
  #include "extern.h"
+ #include "watcher.h"
  
 +#include <openssl/rand.h>
 +
  /* common variables */
  char *user;			/* user to run as */
  char *group;			/* group to run as */
-@@ -141,7 +143,7 @@ abend (char const *fmt, ...)
+@@ -164,7 +166,7 @@ abend (struct locus_range const *range, char const *fm
  /*
   * OpenSSL thread support stuff
   */
Index: patches/patch-src_poundctl_c
===================================================================
RCS file: patches/patch-src_poundctl_c
diff -N patches/patch-src_poundctl_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_poundctl_c	15 Sep 2025 20:28:04 -0000
@@ -0,0 +1,19 @@
+Index: src/poundctl.c
+--- src/poundctl.c.orig
++++ src/poundctl.c
+@@ -840,11 +840,14 @@ static void
+ send_request (BIO *bio, char const *method, char const *fmt, ...)
+ {
+   va_list ap;
++  char *tempstr;
+ 
+   BIO_printf (bio, "%s %s/", method, url->path);
+   va_start (ap, fmt);
+-  BIO_vprintf (bio, fmt, ap);
++  vasprintf (&tempstr, fmt, ap);
+   va_end (ap);
++  BIO_printf (bio, tempstr);
++  free(tempstr);
+   BIO_printf (bio, " HTTP/1.1\r\n"
+ 		   "Host: %s\r\n",
+ 	      url->host);
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/pound/pkg/PLIST,v
diff -u -p -r1.8 PLIST
--- pkg/PLIST	24 Jan 2024 10:01:30 -0000	1.8
+++ pkg/PLIST	15 Sep 2025 20:28:04 -0000
@@ -2,6 +2,7 @@
 @newuser _pound:626:_pound::pound user:/nonexistent:/sbin/nologin
 @rcscript ${RCDIR}/pound
 @bin bin/poundctl
+@info info/pound.info
 @man man/man5/poundctl.tmpl.5
 @man man/man8/pound.8
 @man man/man8/poundctl.8