FreeBSD Bugzilla – Attachment 154970 Details for
Bug 195715
[patch] net/torsocks - upgrade to 2.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to update to 2.0.0
torsocks-2.0.0-1.patch (text/plain), 15.50 KB, created by
Yuri Victorovich
on 2015-03-29 19:21:13 UTC
(
hide
)
Description:
Patch to update to 2.0.0
Filename:
MIME Type:
Creator:
Yuri Victorovich
Created:
2015-03-29 19:21:13 UTC
Size:
15.50 KB
patch
obsolete
>diff -urN net/torsocks/Makefile net/torsocks/Makefile >--- net/torsocks/Makefile 2015-03-24 16:18:13.343804000 -0700 >+++ net/torsocks/Makefile 2015-03-29 11:54:33.485545000 -0700 >@@ -1,112 +1,54 @@ > # Created by: Andrei Lavreniyuk <andy.lavr@gmail.com> >-# $FreeBSD: head/net/torsocks/Makefile 375156 2014-12-21 11:44:15Z antoine $ >+# $FreeBSD$ > > PORTNAME= torsocks >-PORTVERSION= 1.2 >-PORTREVISION= 3 >+PORTVERSION= 2.0.0 > CATEGORIES= net security >-MASTER_SITES= GOOGLE_CODE \ >- http://tor.reactor-xg.kiev.ua/files/ >+MASTER_SITES= GHL > >-MAINTAINER= andy.lavr@gmail.com >-COMMENT= Most SOCKS-friendly applications way with Tor >+MAINTAINER= yuri@rawbw.com >+COMMENT= Easy way to make any app work through Tor > > LICENSE= GPLv2 > >+USE_GITHUB= yes >+GH_ACCOUNT= dgoulet >+GH_PROJECT= torsocks >+GH_COMMIT= 96f7a0d >+GH_TAGNAME= v${PORTVERSION} >+ > USE_AUTOTOOLS= aclocal autoconf libtoolize > ACLOCAL_ARGS= -I ${LOCALBASE}/share/aclocal > >-USES= gmake libtool >+USES= autoreconf gmake libtool > USE_LDCONFIG= yes > INSTALL_TARGET= install-strip > > SUB_FILES= pkg-message > >-OPTIONS_DEFINE= OLDMETHOD NODEBUG DOCS >- >-OPTIONS_SINGLE= DNS >-OPTIONS_SINGLE_DNS= DEFAULT SOCKSDNS HOSTNAMES >- >-SOCKSDNS_DESC= Use socks server for DNS lookups >-OLDMETHOD_DESC= Do not use RTLD_NEXT parameter to dlsym >-NODEBUG_DESC= Disable output of error messages >-HOSTNAMES_DESC= Enable DNS lookups of socks server >-DOCS_DESC= Install examples and docs >-DEFAULT_DESC= DNS lookups default >- >-OPTIONS_DEFAULT= DOCS DEFAULT >- >-PORTDOCS= INSTALL README TODO ChangeLog >+OPTIONS_DEFINE= DOCS >+OPTIONS_DEFAULT= DOCS > > .include <bsd.port.options.mk> > >-.if ${PORT_OPTIONS:MSOCKSDNS} >-CONFIGURE_ARGS+= --enable-socksdns >- >-pre-everything:: >- @${ECHO_MSG} >- @${ECHO_MSG} "You can use the SOCKSDNS option." >- @${ECHO_MSG} "This option causes torsocks to intercept" >- @${ECHO_MSG} "DNS lookups and attempt to force them" >- @${ECHO_MSG} "to use TCP instead of UDP and thus" >- @${ECHO_MSG} "be proxied through the socks server." >- @${ECHO_MSG} >-.endif >- >-.if ${PORT_OPTIONS:MOLDMETHOD} >-CONFIGURE_ARGS+= --enable-oldmethod >- >-pre-everything:: >- @${ECHO_MSG} >- @${ECHO_MSG} "You can use the OLDMETHOD option." >- @${ECHO_MSG} "This forces torsocks not to use the" >- @${ECHO_MSG} "RTLD_NEXT parameter to dlsym to get the" >- @${ECHO_MSG} "address of the connect() method torsocks" >- @${ECHO_MSG} "overrides, instead it loads a reference" >- @${ECHO_MSG} "to the libc shared library and then uses dlsym()." >- @${ECHO_MSG} >-.endif >- >-.if ${PORT_OPTIONS:MNODEBUG} >-CONFIGURE_ARGS+= --disable-debug >- >-pre-everything:: >- @${ECHO_MSG} >- @${ECHO_MSG} "You can use the NODEBUG option." >- @${ECHO_MSG} "This configuration option tells torsocks" >- @${ECHO_MSG} "to never output error messages to stderr." >- @${ECHO_MSG} >-.endif >- >-.if ${PORT_OPTIONS:MHOSTNAMES} >-CONFIGURE_ARGS+= --enable-hostnames >- >-pre-everything:: >- @${ECHO_MSG} >- @${ECHO_MSG} "You can use the HOSTNAMES option." >- @${ECHO_MSG} "This enables DNS lookups on names" >- @${ECHO_MSG} "provided as socks servers in the config" >- @${ECHO_MSG} "file. This option is not allowed" >- @${ECHO_MSG} "if socks dns is enabled since torsocks" >- @${ECHO_MSG} "can't send a socks dns request to resolve" >- @${ECHO_MSG} "the location of the socks server." >- @${ECHO_MSG} >+.if ${PORT_OPTIONS:MDOCS} >+PORTDOCS= ChangeLog DEBUG SOCKS5 socks-extensions.txt > .endif > > post-patch: >- @${REINPLACE_CMD} -e 's|@prefix@|${PREFIX}|' ${WRKSRC}/src/torsocks.in >- @${REINPLACE_CMD} -e 's|MAP_ANONYMOUS|MAP_ANON|' ${WRKSRC}/src/dead_pool.c >- @${MV} ${WRKSRC}/doc/torsocks.conf ${WRKSRC}/doc/torsocks.conf.sample >- @${MV} ${WRKSRC}/configure.in ${WRKSRC}/configure.ac >- @${MKDIR} ${WRKSRC}/m4 >+ @${REINPLACE_CMD} -e 's,(defined(__linux__) || defined(__darwin__) || (defined(__FreeBSD_kernel__) && defined(__i386__))),defined(__FreeBSD__),' ${WRKSRC}/src/lib/syscall.c >+ @${REINPLACE_CMD} -e 's,(defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && defined(__x86_64),defined(badbadbad),' ${WRKSRC}/src/lib/syscall.c >+ >+post-build: >+ @${ECHO} >+ @${ECHO} "Please run 'make check' (requires bash)." >+ @${ECHO} "One testcase is known to fail." >+ @${ECHO} > > post-install: >-.if ${PORT_OPTIONS:MDOCS} >- ${INSTALL_DATA} ${WRKSRC}/doc/*.sample ${STAGEDIR}${PREFIX}/etc >- @${MKDIR} ${STAGEDIR}${DOCSDIR} >-.for f in ${PORTDOCS} >- ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} >-.endfor >-.endif >+ @${MV} ${STAGEDIR}${PREFIX}/etc/tor/torsocks.conf ${STAGEDIR}${PREFIX}/etc/tor/torsocks.conf.sample >+ >+check: build >+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check > > .include <bsd.port.mk> >diff -urN net/torsocks/distinfo net/torsocks/distinfo >--- net/torsocks/distinfo 2015-03-24 16:18:13.344570000 -0700 >+++ net/torsocks/distinfo 2015-03-24 16:17:15.095108000 -0700 >@@ -1,2 +1,2 @@ >-SHA256 (torsocks-1.2.tar.gz) = bea57d3624d723724fd1e260f0e6b2a354c0da742c023aa994c7692270d111d4 >-SIZE (torsocks-1.2.tar.gz) = 456453 >+SHA256 (torsocks-2.0.0.tar.gz) = 6bb690924d5b37a7004007aa8fcf8d37e5fbda1709d56d7f40cb41bbf716e9f8 >+SIZE (torsocks-2.0.0.tar.gz) = 96307 >diff -urN net/torsocks/files/patch-Makefile.am net/torsocks/files/patch-Makefile.am >--- net/torsocks/files/patch-Makefile.am 2015-03-24 16:18:13.345288000 -0700 >+++ net/torsocks/files/patch-Makefile.am 1969-12-31 16:00:00.000000000 -0800 >@@ -1,9 +0,0 @@ >---- Makefile.am.orig 2011-03-05 18:38:11.000000000 +0200 >-+++ Makefile.am 2013-03-20 10:13:28.517831100 +0200 >-@@ -2,4 +2,6 @@ >- # have all needed files, that a GNU package needs >- AUTOMAKE_OPTIONS = foreign 1.4 >- >-+ACLOCAL_AMFLAGS= -I m4 >-+ >- SUBDIRS = src doc test >diff -urN net/torsocks/files/patch-Makefile.in net/torsocks/files/patch-Makefile.in >--- net/torsocks/files/patch-Makefile.in 2015-03-24 16:18:13.383318000 -0700 >+++ net/torsocks/files/patch-Makefile.in 1969-12-31 16:00:00.000000000 -0800 >@@ -1,9 +0,0 @@ >---- Makefile.in.orig 2011-10-24 20:23:39.000000000 +0000 >-+++ Makefile.in 2013-07-23 21:02:35.000000000 +0000 >-@@ -238,4 +238,4 @@ >- *$$dep*) \ >-- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ >-- $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ >-+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign --add-missing'; \ >-+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign --add-missing \ >- && exit 0; \ >diff -urN net/torsocks/files/patch-compatibility-2.0.0 net/torsocks/files/patch-compatibility-2.0.0 >--- net/torsocks/files/patch-compatibility-2.0.0 1969-12-31 16:00:00.000000000 -0800 >+++ net/torsocks/files/patch-compatibility-2.0.0 2015-03-24 16:17:15.095003000 -0700 >@@ -0,0 +1,43 @@ >+--- configure.ac >++++ configure.ac >+@@ -126,6 +126,10 @@ AS_CASE([$host_os], >+ libc_name="libc.so.6" >+ fi >+ ], >++ [freebsd*], >++ [ >++ libc_name=`ldd /usr/bin/yes | grep 'libc\.' | cut -d ' ' -f 3 | tr -d '\t'` >++ ], >+ [libc_name="libc.so"] >+ ) >+ AC_DEFINE_UNQUOTED([LIBC_NAME],["${libc_name}"], [Description]) >+--- src/common/compat.h.orig 2014-08-11 09:44:46.000000000 -0700 >++++ src/common/compat.h 2015-03-24 15:19:54.396135000 -0700 >+@@ -95,6 +95,10 @@ >+ #define TSOCKS_NR_CLOSE SYS_close >+ #define TSOCKS_NR_MMAP SYS_mmap >+ #define TSOCKS_NR_MUNMAP SYS_munmap >++#if defined(__FreeBSD__) >++#define TSOCKS_NR_GETPID SYS_getpid >++#define TSOCKS_NR_FORK SYS_fork >++#endif >+ >+ #endif /* __FreeBSD__, __FreeBSD_kernel__, __darwin__, __NetBSD__ */ >+ >+--- src/lib/syscall.c 2014-08-11 09:44:46.000000000 -0700 >++++ src/lib/syscall.c 2015-03-24 15:24:10.695024000 -0700 >+@@ -156,6 +156,14 @@ >+ case TSOCKS_NR_MUNMAP: >+ ret = handle_munmap(args); >+ break; >++#if defined(__FreeBSD__) >++ case TSOCKS_NR_FORK: >++ ret = tsocks_libc_syscall(TSOCKS_NR_FORK); >++ break; >++ case TSOCKS_NR_GETPID: >++ ret = tsocks_libc_syscall(TSOCKS_NR_GETPID); >++ break; >++#endif >+ default: >+ /* >+ * Deny call since we have no idea if this call can leak or not data >diff -urN net/torsocks/files/patch-configure.in net/torsocks/files/patch-configure.in >--- net/torsocks/files/patch-configure.in 2015-03-24 16:18:13.413447000 -0700 >+++ net/torsocks/files/patch-configure.in 1969-12-31 16:00:00.000000000 -0800 >@@ -1,20 +0,0 @@ >---- configure.in.orig 2011-10-24 22:30:58.000000000 +0300 >-+++ configure.in 2013-03-20 10:10:59.362840661 +0200 >-@@ -3,13 +3,14 @@ >- ############################################################################## >- >- # Process this file with autoconf to produce a configure script. >--AC_INIT() >-+AC_INIT([torsocks], [1.2]) >-+AC_CONFIG_MACRO_DIR([m4]) >- >- # Create a config.g file to store defines generated by configure >--AC_CONFIG_HEADER(config.h) >-+AC_CONFIG_HEADER([config.h]) >- >- # Automake initialization >--AM_INIT_AUTOMAKE(torsocks, 1.2) >-+AM_INIT_AUTOMAKE() >- >- # Get hostname and other information. >- AC_CANONICAL_HOST >diff -urN net/torsocks/files/patch-doc_Makefile.am net/torsocks/files/patch-doc_Makefile.am >--- net/torsocks/files/patch-doc_Makefile.am 2015-03-24 16:18:13.363939000 -0700 >+++ net/torsocks/files/patch-doc_Makefile.am 1969-12-31 16:00:00.000000000 -0800 >@@ -1,13 +0,0 @@ >---- doc/Makefile.am.orig 2011-10-26 21:30:26.000000000 +0300 >-+++ doc/Makefile.am 2011-11-13 09:08:17.999745756 +0200 >-@@ -2,7 +2,9 @@ >- >- # Install configuration file >- confdir = $(CONFDIR)/ >--dist_conf_DATA = torsocks.conf >-+dist_conf_DATA = torsocks.conf.sample >-+datarootdir = ${prefix}/share/torsocks >-+ >- >- # Install man pages >- dist_man_MANS = torsocks.1 torsocks.8 usewithtor.1 torsocks.conf.5 >diff -urN net/torsocks/files/patch-src_Makefile.am net/torsocks/files/patch-src_Makefile.am >--- net/torsocks/files/patch-src_Makefile.am 2015-03-24 16:18:13.373321000 -0700 >+++ net/torsocks/files/patch-src_Makefile.am 1969-12-31 16:00:00.000000000 -0800 >@@ -1,10 +0,0 @@ >---- src/Makefile.am.orig 2011-10-24 22:26:34.000000000 +0300 >-+++ src/Makefile.am 2011-11-09 12:36:55.697224889 +0200 >-@@ -1,6 +1,6 @@ >- # Makefile used by configure to create real Makefile >- >--libdir = @libdir@/torsocks >-+libdir = @prefix@/lib >- >- # Install invocation scripts >- bin_SCRIPTS = torsocks usewithtor >diff -urN net/torsocks/files/patch-src_Makefile.in net/torsocks/files/patch-src_Makefile.in >--- net/torsocks/files/patch-src_Makefile.in 2015-03-24 16:18:13.345893000 -0700 >+++ net/torsocks/files/patch-src_Makefile.in 1969-12-31 16:00:00.000000000 -0800 >@@ -1,11 +0,0 @@ >---- src/Makefile.in.orig 2011-10-24 23:23:39.000000000 +0300 >-+++ src/Makefile.in 2011-11-09 12:41:22.805940562 +0200 >-@@ -196,7 +196,7 @@ >- includedir = @includedir@ >- infodir = @infodir@ >- install_sh = @install_sh@ >--libdir = @libdir@/torsocks >-+libdir = @prefix@/lib >- libexecdir = @libexecdir@ >- localedir = @localedir@ >- localstatedir = @localstatedir@ >diff -urN net/torsocks/files/patch-src_torsocks.in net/torsocks/files/patch-src_torsocks.in >--- net/torsocks/files/patch-src_torsocks.in 2015-03-24 16:18:13.393500000 -0700 >+++ net/torsocks/files/patch-src_torsocks.in 1969-12-31 16:00:00.000000000 -0800 >@@ -1,11 +0,0 @@ >---- src/torsocks.in.orig 2010-12-11 18:28:08.000000000 +0200 >-+++ src/torsocks.in 2011-01-12 17:01:34.460490482 +0200 >-@@ -68,7 +68,7 @@ >- exit >- fi >- >--LIBDIR="@prefix@/lib/torsocks" >-+LIBDIR="@prefix@/lib" >- LIB_NAME="libtorsocks" >- SHLIB_EXT="@SHLIB_EXT@" >- SHLIB="${LIBDIR}/${LIB_NAME}.${SHLIB_EXT}" >diff -urN net/torsocks/files/patch-src_usewithtor.in net/torsocks/files/patch-src_usewithtor.in >--- net/torsocks/files/patch-src_usewithtor.in 2015-03-24 16:18:13.353425000 -0700 >+++ net/torsocks/files/patch-src_usewithtor.in 1969-12-31 16:00:00.000000000 -0800 >@@ -1,28 +0,0 @@ >---- src/usewithtor.in.orig 2009-11-08 14:35:11.000000000 +0200 >-+++ src/usewithtor.in 2009-11-13 17:10:26.726475549 +0200 >-@@ -1,4 +1,4 @@ >--#! /bin/sh >-+#!/bin/sh >- # *************************************************************************** >- # * * >- # * $Id: usewithtor.in,v 1.3 2008-07-06 15:17:35 hoganrobert Exp $* >-@@ -26,8 +26,8 @@ >- # * Original copyright notice from tsocks source file follows: * >- # *************************************************************************** >- >--# Wrapper script for use of the tsocks(8) transparent socksification library >--# See the tsocks(1) and torify(1) manpages. >-+# Wrapper script for use of the torsocks(8) transparent socksification library >-+# See the torsocks(1) and torify(1) manpages. >- >- # Copyright (c) 2004, 2006 Peter Palfrader >- # Modified by Jacob Appelbaum <jacob@appelbaum.net> April 16th 2006 >-@@ -35,7 +35,7 @@ >- # May be distributed under the same terms as Tor itself >- >- >--# Define and ensure we have tsocks >-+# Define and ensure we have torsocks >- # XXX: what if we don't have which? >- TORSOCKS="`which torsocks`" >- PROG= >diff -urN net/torsocks/files/patch-tests_Makefile.am net/torsocks/files/patch-tests_Makefile.am >--- net/torsocks/files/patch-tests_Makefile.am 2015-03-24 16:18:13.363317000 -0700 >+++ net/torsocks/files/patch-tests_Makefile.am 1969-12-31 16:00:00.000000000 -0800 >@@ -1,8 +0,0 @@ >---- test/Makefile.am.orig 2011-11-13 09:40:52.593544321 +0200 >-+++ test/Makefile.am 2011-11-13 09:41:18.074140449 +0200 >-@@ -5,3 +5,5 @@ >- CLEANFILES= test_torsocks >- >- dist_data_DATA = run_tests.sh expectedresults.txt >-+ >-+datarootdir = ${prefix}/share/torsocks/test >diff -urN net/torsocks/files/pkg-message.in net/torsocks/files/pkg-message.in >--- net/torsocks/files/pkg-message.in 2015-03-24 16:18:35.627869000 -0700 >+++ net/torsocks/files/pkg-message.in 2015-03-24 16:17:15.094966000 -0700 >@@ -1,10 +1,21 @@ >-Simple setup file was copied to %%PREFIX%%/etc/torsocks.conf.sample >+====================================================================== >+You installed torsocks, which is part of the Tor Project. >+If you have non-local or non-standard Tor SOCKS server location, >+please edit %%PREFIX%%/etc/tor/torsocks.conf > >-Once you have installed torsocks, just launch it like so: >- usewithtor [application] >+To run most programs through Tor launch them like this: >+ torsocks [any executable] >+For example you can use ssh to a some.host.com by doing: >+ torsocks ssh username@some.host.com -l <user> >+or launch pidgin by doing: >+ torsocks pidgin > >-So, for example you can use ssh to a some.ssh.com by doing: >- usewithtor ssh username@some.ssh.com -l <user> >- >-or launch pidgin by doing: >- usewithtor pidgin >+==SECURITY WARNING== >+Please note that torsocks does not in general guarantee that all >+network connections made using torsocks will always go through >+Tor, and not directly through the unsecured network. There are many >+ways how general programs can purposefully or inadvertently defeat >+torsocks. One way is to reset the environment variable for the child >+process. You can use ex. wireshark to see where network packets are >+actually sent by the program in question. >+====================================================================== >diff -urN net/torsocks/pkg-plist net/torsocks/pkg-plist >--- net/torsocks/pkg-plist 2015-03-24 16:18:26.556109000 -0700 >+++ net/torsocks/pkg-plist 2015-03-24 16:30:00.465648000 -0700 >@@ -1,26 +1,9 @@ > bin/torsocks >-bin/usewithtor >-etc/torsocks.conf.sample >-lib/libtorsocks.a >-lib/libtorsocks.so >-lib/libtorsocks.so.1 >-lib/libtorsocks.so.1.0.0 >+@sample etc/tor/torsocks.conf.sample >+lib/torsocks/libtorsocks.a >+lib/torsocks/libtorsocks.so >+lib/torsocks/libtorsocks.so.0 >+lib/torsocks/libtorsocks.so.0.0.0 > man/man1/torsocks.1.gz >-man/man1/usewithtor.1.gz > man/man5/torsocks.conf.5.gz > man/man8/torsocks.8.gz >-%%DATADIR%%/DEBUG >-%%DATADIR%%/README >-%%DATADIR%%/README.TORDNS >-%%DATADIR%%/SOCKS4.protocol >-%%DATADIR%%/SOCKS5 >-%%DATADIR%%/compilewarnings.patch >-%%DATADIR%%/conffile.patch >-%%DATADIR%%/getaddrbyhost.patch >-%%DATADIR%%/getpeername.patch >-%%DATADIR%%/infiniteloop.patch >-%%DATADIR%%/localaddresses.patch >-%%DATADIR%%/socks-extensions.txt >-%%DATADIR%%/tordns.patch >-%%DATADIR%%/test/expectedresults.txt >-%%DATADIR%%/test/run_tests.sh
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 195715
:
154781
|
154782
| 154970