Index | Thread | Search

From:
Klemens Nanni <kn@openbsd.org>
Subject:
net/torsocks: update to 2.4.0
To:
ports@openbsd.org
Cc:
Pascal Stumpf <pascal@stumpf.co>
Date:
Thu, 18 Jan 2024 22:57:58 +0000

Download raw body.

Thread
Upstream changed sites, release is from may 2022, that one fclose(3) is
effectively merged, others remain.

https://gitlab.torproject.org/tpo/core/torsocks/-/releases

While here, bump AUTO*_VERSION, sync DESCR and capitalise COMMENT.

No shared lib, WANTLIB or PLIST change.
100% amd64 tests pass, works for me.
Feedback? OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/torsocks/Makefile,v
diff -u -p -r1.18 Makefile
--- Makefile	11 Nov 2023 11:51:22 -0000	1.18
+++ Makefile	18 Jan 2024 22:47:05 -0000
@@ -1,13 +1,14 @@
-COMMENT =		socks proxy for use with tor
+COMMENT =		SOCKS proxy for use with Tor
 
-DISTNAME =		torsocks-2.3.0
-REVISION =		0
+V =			2.4.0
+DISTNAME =		torsocks-v${V}
+PKGNAME =		${DISTNAME:S/v//}
 
 SHARED_LIBS =		torsocks	2.0 # 0.0
 
 CATEGORIES =		net
 
-HOMEPAGE =		https://gitweb.torproject.org/torsocks.git/
+HOMEPAGE =		https://gitlab.torproject.org/tpo/core/torsocks
 
 MAINTAINER =		Pascal Stumpf <pascal@stumpf.co>
 
@@ -16,10 +17,10 @@ PERMIT_PACKAGE =	Yes
 
 WANTLIB += pthread
 
-SITES=			https://gitweb.torproject.org/torsocks.git/snapshot/
+SITES=			https://gitlab.torproject.org/tpo/core/torsocks/-/archive/v${V}/
 
-AUTOCONF_VERSION=	2.69
-AUTOMAKE_VERSION=	1.15
+AUTOCONF_VERSION=	2.71
+AUTOMAKE_VERSION=	1.16
 
 USE_LIBTOOL =		gnu
 
@@ -31,6 +32,5 @@ CONFIGURE_STYLE =	autoreconf autoheader
 
 pre-configure:
 	${SUBST_CMD} ${WRKSRC}/src/bin/torsocks.in
-
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/torsocks/distinfo,v
diff -u -p -r1.4 distinfo
--- distinfo	1 Jun 2022 12:35:11 -0000	1.4
+++ distinfo	18 Jan 2024 22:35:05 -0000
@@ -1,2 +1,2 @@
-SHA256 (torsocks-2.3.0.tar.gz) = gXwUPoqdIX9BoiOoUTnGyijhuZVWxUf820xy28Fwtsk=
-SIZE (torsocks-2.3.0.tar.gz) = 118033
+SHA256 (torsocks-v2.4.0.tar.gz) = wBtHHYntqfPI3LhaRI6AZmktBwf5/4sqx+ZlpgIpG4c=
+SIZE (torsocks-v2.4.0.tar.gz) = 118991
Index: patches/patch-src_common_compat_h
===================================================================
RCS file: /cvs/ports/net/torsocks/patches/patch-src_common_compat_h,v
diff -u -p -r1.3 patch-src_common_compat_h
--- patches/patch-src_common_compat_h	1 Jun 2022 12:35:11 -0000	1.3
+++ patches/patch-src_common_compat_h	18 Jan 2024 22:38:40 -0000
@@ -20,7 +20,7 @@ Index: src/common/compat.h
  
  #if defined(__linux__)
  #include <unistd.h>
-@@ -196,7 +197,8 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine
+@@ -204,7 +205,8 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine
  
  #endif /* __linux__ */
  
@@ -30,7 +30,7 @@ Index: src/common/compat.h
  
  #include <sys/syscall.h>
  #include <unistd.h>
-@@ -215,7 +217,7 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine
+@@ -223,7 +225,7 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine
  #define TSOCKS_NR_LISTEN    SYS_listen
  #define TSOCKS_NR_RECVMSG   SYS_recvmsg
  
Index: patches/patch-src_lib_fclose_c
===================================================================
RCS file: patches/patch-src_lib_fclose_c
diff -N patches/patch-src_lib_fclose_c
--- patches/patch-src_lib_fclose_c	11 Mar 2022 19:47:53 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-Unbreak funopen usage with libtorsocks - always call the libc fclose
-function, even when fd < 0.
-
-Index: src/lib/fclose.c
---- src/lib/fclose.c.orig
-+++ src/lib/fclose.c
-@@ -64,11 +64,9 @@ LIBC_FCLOSE_RET_TYPE tsocks_fclose(LIBC_FCLOSE_SIG)
- 		connection_put_ref(conn);
- 	}
- 
-+error:
- 	/* Return the original libc fclose. */
- 	return tsocks_libc_fclose(fp);
--
--error:
--	return -1;
- }
- 
- /*
Index: patches/patch-src_lib_syscall_c
===================================================================
RCS file: /cvs/ports/net/torsocks/patches/patch-src_lib_syscall_c,v
diff -u -p -r1.4 patch-src_lib_syscall_c
--- patches/patch-src_lib_syscall_c	11 Nov 2023 11:51:22 -0000	1.4
+++ patches/patch-src_lib_syscall_c	18 Jan 2024 22:38:40 -0000
@@ -3,7 +3,7 @@ Don't attempt to intercept syscall(2) if
 Index: src/lib/syscall.c
 --- src/lib/syscall.c.orig
 +++ src/lib/syscall.c
-@@ -442,6 +442,7 @@ static LIBC_SYSCALL_RET_TYPE handle_memfd_create(va_li
+@@ -483,6 +483,7 @@ static LIBC_SYSCALL_RET_TYPE handle_passthrough(long n
  /*
   * Torsocks call for syscall(2)
   */
@@ -11,7 +11,7 @@ Index: src/lib/syscall.c
  LIBC_SYSCALL_RET_TYPE tsocks_syscall(long int number, va_list args)
  {
  	LIBC_SYSCALL_RET_TYPE ret;
-@@ -594,7 +595,9 @@ LIBC_SYSCALL_DECL
+@@ -636,7 +637,9 @@ LIBC_SYSCALL_DECL
  
  	return ret;
  }
@@ -21,7 +21,7 @@ Index: src/lib/syscall.c
  /* Only used for *BSD systems. */
  #if (defined(__NetBSD__) || defined(__FreeBSD__))
  
-@@ -661,3 +664,4 @@ LIBC___SYSCALL_DECL
+@@ -703,3 +706,4 @@ LIBC___SYSCALL_DECL
  }
  
  #endif /* __NetBSD__, __FreeBSD__ */
Index: patches/patch-src_lib_torsocks_c
===================================================================
RCS file: /cvs/ports/net/torsocks/patches/patch-src_lib_torsocks_c,v
diff -u -p -r1.2 patch-src_lib_torsocks_c
--- patches/patch-src_lib_torsocks_c	11 Nov 2023 11:51:22 -0000	1.2
+++ patches/patch-src_lib_torsocks_c	18 Jan 2024 22:38:40 -0000
@@ -3,7 +3,7 @@ Don't attempt to intercept syscall(2) if
 Index: src/lib/torsocks.c
 --- src/lib/torsocks.c.orig
 +++ src/lib/torsocks.c
-@@ -232,11 +232,15 @@ static void init_libc_symbols(void)
+@@ -240,11 +240,15 @@ static void init_libc_symbols(void)
  	tsocks_libc_connect = dlsym(libc_ptr, LIBC_CONNECT_NAME_STR);
  	tsocks_libc_close = dlsym(libc_ptr, LIBC_CLOSE_NAME_STR);
  	tsocks_libc_socket = dlsym(libc_ptr, LIBC_SOCKET_NAME_STR);
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/net/torsocks/pkg/DESCR,v
diff -u -p -r1.1.1.1 DESCR
--- pkg/DESCR	1 Dec 2011 11:49:27 -0000	1.1.1.1
+++ pkg/DESCR	18 Jan 2024 22:36:30 -0000
@@ -1,3 +1,3 @@
-Torsocks allows you to use most socks-friendly applications in a safe
-way with Tor. It ensures that DNS requests are handled safely and
-explicitly rejects UDP traffic from the application you're using.
+Torsocks allows you to use most applications in a safe way with Tor.
+It ensures that DNS requests are handled safely and explicitly rejects
+any traffic other than TCP from the application you're using.