pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/torsocks torsocks: Update net/torsocks to 2.3.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bee2dbf67d9a
branches:  trunk
changeset: 387574:bee2dbf67d9a
user:      leot <leot%pkgsrc.org@localhost>
date:      Tue Nov 20 23:42:59 2018 +0000

description:
torsocks: Update net/torsocks to 2.3.0

pkgsrc changes:
 - Update MASTER_SITES to avoid MASTER_SITE_DEBIAN

Changes:
2018-11-19 torsocks 2.3.0
 * Fix a bunch of stuff in the wrapper script, #24967
 * gethostbyaddr_r: always assign result
 * log: Remove log line when logging is stopped
 * gethostbyaddr_r: Don't put garbage in data->hostname
 * gethostbyaddr_r: Populate h_addrtype field
 * log: Avoid crash or file corruption when closing logs
 * connect: Always pass .onion IP cookie to connection object
 * Merge remote-tracking branch 'yawning/bug23715'
 * Make torsocks always connect to the configured Tor port
 * test: Make getpeername test connect to moria1
 * socks5: Always use ATYP 0x03 for CONNECT command
 * Merge remote-tracking branch 'upstream/master'
 * doc: Clarify the libc limitation in README
 * accept4: Initialize libc symbol early
 * Bug 23715: Support memfd_create(2).
 * test: Detect if tor is running in test_fd_passing
 * No tab in the README
 * Merge remote-tracking branch 'debian/bugfix/typo-subsytem'
 * Merge remote-tracking branch 'debian/bugfix/typo-catched'
 * Merge remote-tracking branch 'debian/bugfix/typo-conect'
 * doc: Add autogen.sh step to README
 * Add a -q/--quiet to torsocks
 * tests: Add a check for a running Tor
 * Make cpp conditional for definition of handle_mmap match use
 * utils: Add useful function for later use
 * man: Some words were missing
 * Remove clang warnings
 * Add missing quotes to variable in torsocks.in
 * Fix check_addr() to return either 0 or 1
 * Ignore stderr for getcap command
 * syscall: Add seccomp, gettimeofday, clock_gettime, fork
 * Fix typo: conect -> connect.
 * Fix typo: subsytem -> subsystem.
 * Fix typo: catched -> caught.

diffstat:

 net/torsocks/Makefile                          |    9 +-
 net/torsocks/distinfo                          |   12 +-
 net/torsocks/patches/patch-src_bin_torsocks.in |  133 -------------------------
 net/torsocks/patches/patch-src_lib_torsocks.c  |   23 ++++
 4 files changed, 32 insertions(+), 145 deletions(-)

diffs (206 lines):

diff -r 05549f566723 -r bee2dbf67d9a net/torsocks/Makefile
--- a/net/torsocks/Makefile     Tue Nov 20 21:26:44 2018 +0000
+++ b/net/torsocks/Makefile     Tue Nov 20 23:42:59 2018 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2018/02/26 13:19:55 leot Exp $
+# $NetBSD: Makefile,v 1.2 2018/11/20 23:42:59 leot Exp $
 
-DISTNAME=      torsocks_2.2.0.orig
-PKGNAME=       ${DISTNAME:S/_/-/:S/.orig//}
+DISTNAME=      torsocks-2.3.0
 CATEGORIES=    net
-MASTER_SITES=  ${MASTER_SITE_DEBIAN:=pool/main/t/torsocks/}
+MASTER_SITES=  https://people.torproject.org/~dgoulet/torsocks/
 EXTRACT_SUFX=  .tar.xz
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -11,8 +10,6 @@
 COMMENT=       Library to torify applications
 LICENSE=       gnu-gpl-v2
 
-WRKSRC=                ${WRKDIR}/${PKGNAME_NOREV}
-
 GNU_CONFIGURE= yes
 USE_LIBTOOL=   yes
 
diff -r 05549f566723 -r bee2dbf67d9a net/torsocks/distinfo
--- a/net/torsocks/distinfo     Tue Nov 20 21:26:44 2018 +0000
+++ b/net/torsocks/distinfo     Tue Nov 20 23:42:59 2018 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.1 2018/02/26 13:19:55 leot Exp $
+$NetBSD: distinfo,v 1.2 2018/11/20 23:42:59 leot Exp $
 
-SHA1 (torsocks_2.2.0.orig.tar.xz) = 53d8cb45b487571d39ab226e25cb538976a195a1
-RMD160 (torsocks_2.2.0.orig.tar.xz) = a16adc2120da9c846d4801ece60a43758a25f2e6
-SHA512 (torsocks_2.2.0.orig.tar.xz) = 89eb1263bfb0079ca5cb7fcc3a6fa1ecde1327df9ea98de48babfff1f8947b1e9db8407ead747fef0190671e7fff502025dcfcd9b6cba97abbaf25b5a575c62a
-Size (torsocks_2.2.0.orig.tar.xz) = 309916 bytes
-SHA1 (patch-src_bin_torsocks.in) = 724a4a3f1e72347907c887d4a00a9308beeb2803
+SHA1 (torsocks-2.3.0.tar.xz) = 18dcef8b7f0a9b63f9c7b5f8159d96ca122f1377
+RMD160 (torsocks-2.3.0.tar.xz) = f8ca8158424b0befd272a136cd3f97416dff76dd
+SHA512 (torsocks-2.3.0.tar.xz) = 4888caaffdcfebf3673e14f3491eae6aa84ca0a4a2a812ba7bdac2abb471307e89a3c5cffe7691fb6f190c7bd9ea455ee9a223d909a39152be8524f590be2031
+Size (torsocks-2.3.0.tar.xz) = 313072 bytes
+SHA1 (patch-src_lib_torsocks.c) = 18b7aa88c0d455a7a53e1d1db1ec19a7f1324290
diff -r 05549f566723 -r bee2dbf67d9a net/torsocks/patches/patch-src_bin_torsocks.in
--- a/net/torsocks/patches/patch-src_bin_torsocks.in    Tue Nov 20 21:26:44 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-$NetBSD: patch-src_bin_torsocks.in,v 1.1 2018/02/26 13:19:56 leot Exp $
-
-- Add missing quotes to variables in torsocks.in.
-  From upstream commit 5a5b72fa0aef2315c369cedc5f448ee473be5e4f.
-- Discard stderr when invoking getcap(1).
-  Not all platforms support it.
-  Also present in upstream commit 6228eabd72eda576403bf6f199881a6d39c1148e.
-
---- src/bin/torsocks.in.orig   2018-01-30 12:14:16.600824876 +0000
-+++ src/bin/torsocks.in
-@@ -73,7 +73,7 @@ set_ld_preload ()
-       if [ -z "$@LDPRELOAD@" ]; then
-               export @LDPRELOAD@="${SHLIB}"
-       else
--              echo $@LDPRELOAD@ | grep -q "${SHLIB}" || \
-+              echo "$@LDPRELOAD@" | grep -q "${SHLIB}" || \
-                       export @LDPRELOAD@="${SHLIB} $@LDPRELOAD@"
-       fi
- 
-@@ -130,13 +130,13 @@ tor_shell ()
- 
- torify_app ()
- {
--      local app_path=`which $1`
--      local getcap=`PATH="$PATH:/usr/sbin:/sbin" which getcap`
-+      local app_path="`which $1`"
-+      local getcap="`PATH="$PATH:/usr/sbin:/sbin" which getcap`"
-       local caps=
- 
--      if [ -z $1 ]; then
-+      if [ -z "$1" ]; then
-               echo "Please provide an application to torify." >&2
--      elif [ -z $app_path ]; then
-+      elif [ -z "$app_path" ]; then
-               echo "ERROR: $1 cannot be found." >&2
-               exit 1
-       fi
-@@ -144,20 +144,20 @@ torify_app ()
-       # This must be before torifying because getcap uses cap_get_file(3)
-       # via syscall(2) which breaks torsocks.
-       if [ -n "$getcap" ]; then
--              caps=`$getcap $app_path`
-+              caps="`$getcap $app_path 2>/dev/null`"
-       fi
- 
-       # Check if Apple's System Integrity Protection is enabled if the user is
-       # running on macOS.
--      macos_sip_check $app_path
-+      macos_sip_check "$app_path"
- 
-       # NEVER remove that line or else nothing it torified.
-       set_ld_preload
- 
--      if [ -u $app_path ]; then
-+      if [ -u "$app_path" ]; then
-               echo "ERROR: $1 is setuid. torsocks will not work on a setuid executable." >&2
-               exit 1
--      elif [ -g $app_path ]; then
-+      elif [ -g "$app_path" ]; then
-               echo "ERROR: $1 is setgid. torsocks will not work on a setgid executable." >&2
-               exit 1
-       elif [ -n "$caps" ]; then
-@@ -219,7 +219,7 @@ if [ $# -eq 0 ] ; then
- fi
- 
- # Ensure libtorsocks exists,
--if [ ! -f $SHLIB ]; then
-+if [ ! -f "$SHLIB" ]; then
-    echo "$0: $SHLIB does not exist! Try re-installing torsocks."
-    exit
- fi
-@@ -228,14 +228,14 @@ while true;
- do
-       case "$1" in
-               on)
--                      check_script_sourced $1
-+                      check_script_sourced "$1"
-                       set_ld_preload
-                       echo "Tor mode activated. Every command will be torified for this shell."
-                       break
-                       ;;
-               off)
--                      check_script_sourced $1
--                      export @LDPRELOAD@=`echo -n $@LDPRELOAD@ | sed "s#$SHLIB *##"`
-+                      check_script_sourced "$1"
-+                      export @LDPRELOAD@="`echo -n $@LDPRELOAD@ | sed "s#$SHLIB *##"`"
-                       if [ -z "$@LDPRELOAD@" ]; then
-                               unset @LDPRELOAD@
-                               case "$OSTYPE" in
-@@ -256,35 +256,35 @@ do
-                       break
-                       ;;
-               -u|--user)
--                      if [ -z $2 ]; then
-+                      if [ -z "$2" ]; then
-                               echo "Missing username to -u" >&2
-                               exit 1
-                       fi
--                      export TORSOCKS_USERNAME=$2
-+                      export TORSOCKS_USERNAME="$2"
-                       shift
-                       ;;
-               -p|--pass)
--                      if [ -z $2 ]; then
-+                      if [ -z "$2" ]; then
-                               echo "Missing password to -p" >&2
-                               exit 1
-                       fi
--                      export TORSOCKS_PASSWORD=$2
-+                      export TORSOCKS_PASSWORD="$2"
-                       shift
-                       ;;
-               -a|--address)
--                      if [ -z $2 ]; then
-+                      if [ -z "$2" ]; then
-                               echo "Missing address to -a" >&2
-                               exit 1
-                       fi
--                      export TORSOCKS_TOR_ADDRESS=$2
-+                      export TORSOCKS_TOR_ADDRESS="$2"
-                       shift
-                       ;;
-               -P|--port)
--                      if [ -z $2 ]; then
-+                      if [ -z "$2" ]; then
-                               echo "Missing port to -P" >&2
-                               exit 1
-                       fi
--                      export TORSOCKS_TOR_PORT=$2
-+                      export TORSOCKS_TOR_PORT="$2"
-                       shift
-                       ;;
-               -i|--isolate)
diff -r 05549f566723 -r bee2dbf67d9a net/torsocks/patches/patch-src_lib_torsocks.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/torsocks/patches/patch-src_lib_torsocks.c     Tue Nov 20 23:42:59 2018 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_lib_torsocks.c,v 1.1 2018/11/20 23:42:59 leot Exp $
+
+LIBC_ACCEPT4_* is defined only on Linux.
+
+--- src/lib/torsocks.c.orig    2018-04-20 15:41:42.000000000 +0000
++++ src/lib/torsocks.c
+@@ -234,9 +234,15 @@ static void init_libc_symbols(void)
+       tsocks_libc_socket = dlsym(libc_ptr, LIBC_SOCKET_NAME_STR);
+       tsocks_libc_syscall = dlsym(libc_ptr, LIBC_SYSCALL_NAME_STR);
+       tsocks_libc_execve = dlsym(libc_ptr, LIBC_EXECVE_NAME_STR);
++#ifdef LIBC_ACCEPT4_NAME_STR
+       tsocks_libc_accept4 = dlsym(libc_ptr, LIBC_ACCEPT4_NAME_STR);
++#endif
+       if (!tsocks_libc_connect || !tsocks_libc_close || !tsocks_libc_socket ||
+-                      !tsocks_libc_syscall || !tsocks_libc_execve || ! tsocks_libc_accept4) {
++                      !tsocks_libc_syscall || !tsocks_libc_execve
++#ifdef LIBC_ACCEPT4_NAME_STR
++                      || !tsocks_libc_accept4
++#endif
++                      ) {
+               ERR("Unable to lookup symbols in " LIBC_NAME "(%s)", dlerror());
+               goto error;
+       }



Home | Main Index | Thread Index | Old Index