pkgsrc-WIP-changes archive

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

torsocks: Remove, imported in pkgsrc as net/torsocks



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Mon Feb 26 14:21:56 2018 +0100
Changeset:	4629c6de5c3309c759dbaada67dc280bb37d3068

Modified Files:
	Makefile
Removed Files:
	torsocks/DESCR
	torsocks/Makefile
	torsocks/PLIST
	torsocks/distinfo
	torsocks/patches/patch-src_bin_torsocks.in

Log Message:
torsocks: Remove, imported in pkgsrc as net/torsocks

Thanks to <wiz> and Ben Gergely!

XXX: torsocks-git probably needs similar adjustments/fixes done in torsocks

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4629c6de5c3309c759dbaada67dc280bb37d3068

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                   |   1 -
 torsocks/DESCR                             |  15 ----
 torsocks/Makefile                          |  58 -------------
 torsocks/PLIST                             |   7 --
 torsocks/distinfo                          |   7 --
 torsocks/patches/patch-src_bin_torsocks.in | 133 -----------------------------
 6 files changed, 221 deletions(-)

diffs:
diff --git a/Makefile b/Makefile
index e859eaa131..0dcefca9e4 100644
--- a/Makefile
+++ b/Makefile
@@ -4404,7 +4404,6 @@ SUBDIR+=	tor-dev
 SUBDIR+=	torcs
 SUBDIR+=	torque2d
 SUBDIR+=	torque3d
-SUBDIR+=	torsocks
 SUBDIR+=	torsocks-git
 SUBDIR+=	tortunnel
 SUBDIR+=	totem
diff --git a/torsocks/DESCR b/torsocks/DESCR
deleted file mode 100644
index 4043c286d1..0000000000
--- a/torsocks/DESCR
+++ /dev/null
@@ -1,15 +0,0 @@
-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 then TCP from the application you're
-using.
-
-Torsocks is an ELF shared library that is loaded before all others.
-The library overrides every needed Internet communication libc
-function calls such as connect(2) or gethostbyname(3).
-
-This process is transparent to the user and if torsocks detects
-any communication that can't go through the Tor network such as
-UDP traffic for instance, the connection is denied. If, in some
-way, there is no way for torsocks to provide the Tor anonymity
-guarantee with your application, torsocks will force the application
-to quit and stop everything.
diff --git a/torsocks/Makefile b/torsocks/Makefile
deleted file mode 100644
index 4fb5131438..0000000000
--- a/torsocks/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# $NetBSD: Makefile,v 1.4 2015/05/24 13:55:43 i3enedek Exp $
-
-DISTNAME=	torsocks_2.2.0.orig
-PKGNAME=	${DISTNAME:S/_/-/:S/.orig//}
-CATEGORIES=	net
-MASTER_SITES=	${MASTER_SITE_DEBIAN:=pool/main/t/torsocks/}
-EXTRACT_SUFX=	.tar.xz
-
-MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	https://gitweb.torproject.org/torsocks.git
-COMMENT=	Library to torify applications
-LICENSE=	gnu-gpl-v2
-
-WRKSRC=		${WRKDIR}/${PKGNAME_NOREV}
-
-GNU_CONFIGURE=	yes
-USE_LIBTOOL=	yes
-
-CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+=	--with-conf=${PKG_SYSCONFDIR}/torsocks.conf
-
-EGDIR=		${PREFIX}/share/examples/torsocks
-CONF_FILES=	${EGDIR}/torsocks.conf \
-		${PKG_SYSCONFDIR}/torsocks.conf
-
-SUBST_CLASSES+=			configure
-SUBST_STAGE.configure=		pre-configure
-SUBST_MESSAGE.configure=	Fixing non-standard test(1) == operator
-SUBST_FILES.configure=		configure
-SUBST_SED.configure=		-e '/test/ s/ == / = /g'
-
-SUBST_CLASSES+=			confdir
-SUBST_STAGE.confdir=		pre-configure
-SUBST_MESSAGE.confdir=		Adjusting confdir
-SUBST_FILES.confdir=		doc/Makefile.in
-SUBST_SED.confdir=		-e '/^confdir/ s;/tor;;'
-
-SUBST_CLASSES+=			conffile
-SUBST_STAGE.conffile=		pre-configure
-SUBST_MESSAGE.conffile=		Adjusting DEFAULT_CONF_FILE
-SUBST_FILES.conffile=		src/common/defaults.h
-SUBST_SED.conffile=		-e '/DEFAULT_CONF_FILE/ s;"/tor/";"/";'
-
-SUBST_CLASSES+=		man
-SUBST_STAGE.man=	pre-configure
-SUBST_MESSAGE.man=	Fix hardcoded paths in man pages
-SUBST_FILES.man=	doc/torsocks.1 doc/torsocks.8 doc/torsocks.conf.5
-SUBST_SED.man=		-e 's;/etc/tor;${PKG_SYSCONFDIR};g'
-
-TEST_TARGET=	check
-
-post-install:
-	${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
-	cd ${DESTDIR}${PREFIX} && ${RM} -fr share/doc
-	${MV} ${DESTDIR}${PKG_SYSCONFDIR}/torsocks.conf \
-	    ${DESTDIR}${EGDIR}/torsocks.conf
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/torsocks/PLIST b/torsocks/PLIST
deleted file mode 100644
index 97d3fc65c2..0000000000
--- a/torsocks/PLIST
+++ /dev/null
@@ -1,7 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2014/08/15 20:59:39 leot1990 Exp $
-bin/torsocks
-lib/torsocks/libtorsocks.la
-man/man1/torsocks.1
-man/man5/torsocks.conf.5
-man/man8/torsocks.8
-share/examples/torsocks/torsocks.conf
diff --git a/torsocks/distinfo b/torsocks/distinfo
deleted file mode 100644
index 3c04b1a144..0000000000
--- a/torsocks/distinfo
+++ /dev/null
@@ -1,7 +0,0 @@
-$NetBSD$
-
-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
diff --git a/torsocks/patches/patch-src_bin_torsocks.in b/torsocks/patches/patch-src_bin_torsocks.in
deleted file mode 100644
index eed11e046c..0000000000
--- a/torsocks/patches/patch-src_bin_torsocks.in
+++ /dev/null
@@ -1,133 +0,0 @@
-$NetBSD$
-
-- 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)


Home | Main Index | Thread Index | Old Index