update to torsocks 2.3.0; OK pascal

upstream changed sites, fclose(3) patch got merged, others remain.
https://gitlab.torproject.org/tpo/core/torsocks/-/releases
This commit is contained in:
kn
2024-01-31 22:46:19 +00:00
parent 046be0035b
commit 730c2df189
7 changed files with 19 additions and 38 deletions
+8 -8
View File
@@ -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
@@ -32,5 +33,4 @@ CONFIGURE_STYLE = autoreconf autoheader
pre-configure:
${SUBST_CMD} ${WRKSRC}/src/bin/torsocks.in
.include <bsd.port.mk>
+2 -2
View File
@@ -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
@@ -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
@@ -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;
}
/*
+3 -3
View File
@@ -3,7 +3,7 @@ Don't attempt to intercept syscall(2) if not available.
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__ */
@@ -3,7 +3,7 @@ Don't attempt to intercept syscall(2) if not available.
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);
+3 -3
View File
@@ -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.