Hello,

Here is an update to net/ocserv 1.4.0
Tested on amd64

I changed the SITES because infradead wasn't working when I updated the port. Besides notifications for new releases point at gitlab, which is probably more resilient than some personal sites.

Best Regards

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/ocserv/Makefile,v
diff -u -p -r1.62 Makefile
--- Makefile	22 Oct 2025 07:04:41 -0000	1.62
+++ Makefile	6 Jan 2026 09:15:07 -0000
@@ -1,8 +1,8 @@
 COMMENT=	server implementing the AnyConnect SSL VPN protocol
 
-DISTNAME=	ocserv-1.3.0
-EXTRACT_SUFX=	.tar.xz
-REVISION=	1
+VERSION = 	1.4.0
+DISTNAME=	ocserv-${VERSION}
+EXTRACT_SUFX=	.tar.gz
 
 CATEGORIES=	net
 
@@ -16,11 +16,12 @@ PERMIT_PACKAGE=	Yes
 WANTLIB+=	c curses ev gnutls llhttp lz4 m nettle oath pam protobuf-c
 WANTLIB+=	radcli readline talloc
 
-SITES=		https://www.infradead.org/ocserv/download/
+SITES=		https://gitlab.com/openconnect/ocserv/-/archive/${VERSION}/
 
 MODULES=	lang/ruby
 
-BUILD_DEPENDS=	textproc/groff \
+BUILD_DEPENDS=	devel/gperf \
+		textproc/groff \
 		textproc/gsed \
 		textproc/ruby-ronn
 LIB_DEPENDS=	archivers/lz4 \
@@ -37,7 +38,9 @@ TEST_DEPENDS=	net/openconnect \
 		sysutils/coreutils \
 		textproc/gsed
 
-CONFIGURE_STYLE=	autoconf
+USE_GMAKE=		Yes
+
+CONFIGURE_STYLE=	autoreconf
 CONFIGURE_ARGS=		--disable-namespaces \
 			--without-docker-tests \
 			--without-geoip \
@@ -54,6 +57,7 @@ CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/
 CONFIGURE_ENV+=	IPCALC=false
 
 AUTOCONF_VERSION=	2.71
+AUTOMAKE_VERSION=	1.16
 
 post-extract:
 	find ${WRKSRC}/tests -type f -perm -+x -exec \
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/ocserv/distinfo,v
diff -u -p -r1.37 distinfo
--- distinfo	22 Nov 2024 15:33:04 -0000	1.37
+++ distinfo	6 Jan 2026 09:15:07 -0000
@@ -1,2 +1,2 @@
-SHA256 (ocserv-1.3.0.tar.xz) = XFYsPqEDIGXvQ9YHXlci+Uzmp6eA1qK0xtVMHOOSGWU=
-SIZE (ocserv-1.3.0.tar.xz) = 770596
+SHA256 (ocserv-1.4.0.tar.gz) = aNMiF/MK9GC1M1i5naYrF0eQ2Lf/8uU+Fk3s7OkHeMI=
+SIZE (ocserv-1.4.0.tar.gz) = 613326
Index: patches/patch-src_main-ban_c
===================================================================
RCS file: /cvs/ports/net/ocserv/patches/patch-src_main-ban_c,v
diff -u -p -r1.3 patch-src_main-ban_c
--- patches/patch-src_main-ban_c	18 Mar 2024 04:15:45 -0000	1.3
+++ patches/patch-src_main-ban_c	6 Jan 2026 09:15:07 -0000
@@ -1,14 +1,18 @@
 Index: src/main-ban.c
 --- src/main-ban.c.orig
 +++ src/main-ban.c
-@@ -407,8 +407,8 @@ static bool test_local_ipv6(struct sockaddr_in6 * remo
- 	unsigned index = 0;
+@@ -422,8 +422,8 @@ static bool test_local_ipv6(struct sockaddr_in6 *remo
+ 
+ 	for (index = 0; index < 4; index++) {
+-		uint32_t l = local->sin6_addr.s6_addr32[index] &
+-			     network->sin6_addr.s6_addr32[index];
+-		uint32_t r = remote->sin6_addr.s6_addr32[index] &
+-			     network->sin6_addr.s6_addr32[index];
++		uint32_t l = local->sin6_addr.__u6_addr.__u6_addr32[index] &
++			     network->sin6_addr.__u6_addr.__u6_addr32[index];
++		uint32_t r = remote->sin6_addr.__u6_addr.__u6_addr32[index] &
++			     network->sin6_addr.__u6_addr.__u6_addr32[index];
  
- 	for (index = 0; index < 4; index ++) {
--		uint32_t l = local->sin6_addr.s6_addr32[index] & network->sin6_addr.s6_addr32[index];
--		uint32_t r = remote->sin6_addr.s6_addr32[index] & network->sin6_addr.s6_addr32[index];
-+		uint32_t l = local->sin6_addr.__u6_addr.__u6_addr32[index] & network->sin6_addr.__u6_addr.__u6_addr32[index];
-+		uint32_t r = remote->sin6_addr.__u6_addr.__u6_addr32[index] & network->sin6_addr.__u6_addr.__u6_addr32[index];
  		if (l != r)
  			return false;
  	}
Index: patches/patch-src_occtl_time_c
===================================================================
RCS file: /cvs/ports/net/ocserv/patches/patch-src_occtl_time_c,v
diff -u -p -r1.3 patch-src_occtl_time_c
--- patches/patch-src_occtl_time_c	18 Mar 2024 04:15:45 -0000	1.3
+++ patches/patch-src_occtl_time_c	6 Jan 2026 09:15:07 -0000
@@ -13,25 +13,29 @@ Index: src/occtl/time.c
  		/* system clock changed? */
  		snprintf(output, MAX_TMPSTR_SIZE, "   ?   ");
  		return;
-@@ -44,17 +44,17 @@ void print_time_ival7(char output[MAX_TMPSTR_SIZE], ti
+@@ -44,19 +44,19 @@ void print_time_ival7(char output[MAX_TMPSTR_SIZE], ti
  
  	if (t >= 48 * 60 * 60)
  		/* 2 days or more */
--		snprintf(output, MAX_TMPSTR_SIZE, _("%2ludays"), (long)t / (24 * 60 * 60));
-+		snprintf(output, MAX_TMPSTR_SIZE, _("%2lludays"), (long long)t / (24 * 60 * 60));
+-		snprintf(output, MAX_TMPSTR_SIZE, _("%2ludays"),
+-			 (long)t / (24 * 60 * 60));
++		snprintf(output, MAX_TMPSTR_SIZE, _("%2lludays"),
++			 (unsigned long long)t / (24 * 60 * 60));
  	else if (t >= 60 * 60)
  		/* 1 hour or more */
- 	        /* Translation Hint: Hours:Minutes */
--		snprintf(output, MAX_TMPSTR_SIZE, _("%2luh:%02um"), (long)t / (60 * 60),
-+		snprintf(output, MAX_TMPSTR_SIZE, _("%2lluh:%02um"), (long long)t / (60 * 60),
- 			(unsigned)((t / 60) % 60));
+ 		/* Translation Hint: Hours:Minutes */
+-		snprintf(output, MAX_TMPSTR_SIZE, _("%2luh:%02um"),
+-			 (long)t / (60 * 60), (unsigned int)((t / 60) % 60));
++		snprintf(output, MAX_TMPSTR_SIZE, _("%2lluh:%02um"),
++			 (unsigned long long)t / (60 * 60), (unsigned int)((t / 60) % 60));
  	else if (t > 60)
  		/* 1 minute or more */
- 	        /* Translation Hint: Minutes:Seconds */
--		snprintf(output, MAX_TMPSTR_SIZE, "%2lum:%02us", (long)t / 60, (unsigned)t % 60);
-+		snprintf(output, MAX_TMPSTR_SIZE, "%2llum:%02us", (long long)t / 60, (unsigned)t % 60);
+ 		/* Translation Hint: Minutes:Seconds */
+-		snprintf(output, MAX_TMPSTR_SIZE, "%2lum:%02us", (long)t / 60,
++		snprintf(output, MAX_TMPSTR_SIZE, "%2llum:%02us", (unsigned long long)t / 60,
+ 			 (unsigned int)t % 60);
  	else
- 	        /* Translation Hint: Seconds:Centiseconds */
+ 		/* Translation Hint: Seconds:Centiseconds */
 -		snprintf(output, MAX_TMPSTR_SIZE, _("%5lus"), (long)t);
-+		snprintf(output, MAX_TMPSTR_SIZE, _("%5llus"), (long long)t);
++		snprintf(output, MAX_TMPSTR_SIZE, _("%5llus"), (unsigned long long)t);
  }
Index: patches/patch-src_ocpasswd_ocpasswd_c
===================================================================
RCS file: /cvs/ports/net/ocserv/patches/patch-src_ocpasswd_ocpasswd_c,v
diff -u -p -r1.4 patch-src_ocpasswd_ocpasswd_c
--- patches/patch-src_ocpasswd_ocpasswd_c	18 Mar 2024 04:15:45 -0000	1.4
+++ patches/patch-src_ocpasswd_ocpasswd_c	6 Jan 2026 09:15:07 -0000
@@ -11,20 +11,29 @@ Index: src/ocpasswd/ocpasswd.c
 +#include <pwd.h>
  #include <unistd.h>
  #include <gnutls/gnutls.h>
- #include <gnutls/crypto.h>	/* for random */
-@@ -46,9 +47,8 @@ static void
- crypt_int(const char *fpasswd, const char *username, const char *groupname,
- 	  const char *passwd)
+ #include <gnutls/crypto.h> /* for random */
+@@ -38,18 +39,12 @@
+ 
+ #define DEFAULT_OCPASSWD "/etc/ocserv/ocpasswd"
+ 
+-static const char alphabet[] =
+-	"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ./";
+-
+-#define SALT_SIZE 16
+ static void crypt_int(const char *fpasswd, const char *username,
+ 		      const char *groupname, const char *passwd)
  {
 -	uint8_t _salt[SALT_SIZE];
--	char salt[SALT_SIZE+16];
+-	char salt[SALT_SIZE + 16];
 -	char *p, *cr_passwd;
 +	char cr_passwd[_PASSWORD_LEN];
 +	char *p;
  	char *tmp_passwd;
- 	unsigned i;
- 	unsigned fpasswd_len = strlen(fpasswd);
-@@ -64,36 +64,8 @@ crypt_int(const char *fpasswd, const char *username, c
+-	unsigned int i;
+ 	unsigned int fpasswd_len = strlen(fpasswd);
+ 	unsigned int tmp_passwd_len;
+ 	unsigned int username_len = strlen(username);
+@@ -63,36 +58,9 @@ crypt_int(const char *fpasswd, const char *username, c
  	setlocale(LC_CTYPE, "C");
  	setlocale(LC_COLLATE, "C");
  
@@ -58,7 +67,8 @@ Index: src/ocpasswd/ocpasswd.c
 -	}
 -	if (cr_passwd == NULL) {
 -		fprintf(stderr, "Error in crypt().\n");
-+	if (crypt_newhash(passwd, "blowfish,a", cr_passwd, sizeof(cr_passwd)) != 0) {
++	if (crypt_newhash(passwd, "blowfish,a", cr_passwd,
++			  sizeof(cr_passwd)) != 0) {
 +		fprintf(stderr, "Error in crypt_newhash().\n");
  		exit(EXIT_FAILURE);
  	}

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to