pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/tsocks Initial import of tsocks, version 1.7:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ef63afa914fb
branches:  trunk
changeset: 463999:ef63afa914fb
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Wed Dec 03 12:57:20 2003 +0000

description:
Initial import of tsocks, version 1.7:

tsocks allows non SOCKS aware applications (e.g telnet, ssh, ftp etc) to use
SOCKS without any modification.  It does this by intercepting the calls that
applications make to establish network connections and negotating them through
a SOCKS server as necessary.

tsocks is based on the 'shared library interceptor' concept.  Through use of
the LD_PRELOAD environment variable, tsocks is automatically loaded into the
process space of every executed program.

diffstat:

 net/tsocks/DESCR            |   8 ++++++
 net/tsocks/Makefile         |  40 +++++++++++++++++++++++++++++++++
 net/tsocks/PLIST            |  10 ++++++++
 net/tsocks/distinfo         |   6 +++++
 net/tsocks/files/tsocks.sh  |   9 +++++++
 net/tsocks/patches/patch-aa |  54 +++++++++++++++++++++++++++++++++++++++++++++
 net/tsocks/patches/patch-ab |  49 ++++++++++++++++++++++++++++++++++++++++
 7 files changed, 176 insertions(+), 0 deletions(-)

diffs (204 lines):

diff -r d8643bc92c31 -r ef63afa914fb net/tsocks/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tsocks/DESCR  Wed Dec 03 12:57:20 2003 +0000
@@ -0,0 +1,8 @@
+tsocks allows non SOCKS aware applications (e.g telnet, ssh, ftp etc) to use
+SOCKS without any modification.  It does this by intercepting the calls that
+applications make to establish network connections and negotating them through
+a SOCKS server as necessary.
+
+tsocks is based on the 'shared library interceptor' concept.  Through use of
+the LD_PRELOAD environment variable, tsocks is automatically loaded into the
+process space of every executed program.
diff -r d8643bc92c31 -r ef63afa914fb net/tsocks/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tsocks/Makefile       Wed Dec 03 12:57:20 2003 +0000
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/12/03 12:57:20 jmmv Exp $
+#
+
+DISTNAME=      tsocks-1.7
+CATEGORIES=    net
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=tsocks/}
+
+MAINTAINER=    jmmv%NetBSD.org@localhost
+HOMEPAGE=      http://tsocks.sourceforge.net/
+COMMENT=       Transparent SOCKS proxying library
+
+GNU_CONFIGURE=         YES
+USE_BUILDLINK2=                YES
+USE_GMAKE=             YES
+
+CONFIGURE_ARGS+=       --with-conf=${PKG_SYSCONFDIR}/tsocks.conf
+
+EGDIR=                 ${PREFIX}/share/examples/tsocks
+
+SUBST_CLASSES+=                tsocks
+SUBST_STAGE.tsocks=    post-configure
+SUBST_MESSAGE.tsocks=  "Generating tsocks wrapper script."
+SUBST_FILES.tsocks=    tsocks
+SUBST_SED.tsocks=      -e "s|@SH@|${SH}|g" -e "s|@PREFIX@|${PREFIX}|g"
+
+post-extract:
+       ${RM} -f ${WRKSRC}/config.cache
+       ${CP} ${FILESDIR}/tsocks.sh ${WRKSRC}/tsocks
+
+post-configure: subst-tsocks
+
+post-install:
+       ${INSTALL_SCRIPT} ${WRKSRC}/tsocks ${PREFIX}/bin
+       ${INSTALL_DATA_DIR} ${EGDIR}
+       ${INSTALL_DATA} ${WRKSRC}/tsocks.conf.complex.example \
+               ${EGDIR}/tsocks.conf.complex
+       ${INSTALL_DATA} ${WRKSRC}/tsocks.conf.simple.example \
+               ${EGDIR}/tsocks.conf.simple
+
+.include "../../mk/bsd.pkg.mk"
diff -r d8643bc92c31 -r ef63afa914fb net/tsocks/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tsocks/PLIST  Wed Dec 03 12:57:20 2003 +0000
@@ -0,0 +1,10 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/12/03 12:57:20 jmmv Exp $
+bin/tsocks
+lib/libtsocks.so
+lib/libtsocks.so.1
+lib/libtsocks.so.${PKGVERSION}
+man/man5/tsocks.conf.5
+man/man8/tsocks.8
+share/examples/tsocks/tsocks.conf.complex
+share/examples/tsocks/tsocks.conf.simple
+@dirrm share/examples/tsocks
diff -r d8643bc92c31 -r ef63afa914fb net/tsocks/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tsocks/distinfo       Wed Dec 03 12:57:20 2003 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/12/03 12:57:20 jmmv Exp $
+
+SHA1 (tsocks-1.7.tar.gz) = b375215b63d93f4f317973f21cbcf4f9bd34720e
+Size (tsocks-1.7.tar.gz) = 70992 bytes
+SHA1 (patch-aa) = 3037e70481db197831f85fde0095629d5cfcc538
+SHA1 (patch-ab) = dbb8df3763f3176af0f58d7d63644183b33f51eb
diff -r d8643bc92c31 -r ef63afa914fb net/tsocks/files/tsocks.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tsocks/files/tsocks.sh        Wed Dec 03 12:57:20 2003 +0000
@@ -0,0 +1,9 @@
+#!@SH@
+
+if [ $# -eq 0 ]; then
+       echo "usage: `basename $0` command" 1>&2
+       exit 1
+fi
+
+LD_PRELOAD="@PREFIX@/lib/libtsocks.so"; export LD_PRELOAD
+exec $*
diff -r d8643bc92c31 -r ef63afa914fb net/tsocks/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tsocks/patches/patch-aa       Wed Dec 03 12:57:20 2003 +0000
@@ -0,0 +1,54 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/12/03 12:57:20 jmmv Exp $
+
+--- Makefile.in.orig   2001-03-13 23:59:42.000000000 +0100
++++ Makefile.in
+@@ -38,19 +38,19 @@ TARGETS= ${SHLIB} ${UTIL_LIB} ${SAVE} ${
+ all: ${TARGETS}
+ 
+ ${COMMON}.o: ${COMMON}.c
+-      ${SHCC} ${CFFLAGS} ${INCLUDES} -c -o ${COMMON}.o ${COMMON}.c
++      ${SHCC} ${CFLAGS} ${INCLUDES} -c -o ${COMMON}.o ${COMMON}.c
+ 
+ ${PARSER}.o: ${PARSER}.c
+-      ${SHCC} ${CFFLAGS} ${INCLUDES} -c -o ${PARSER}.o ${PARSER}.c
++      ${SHCC} ${CFLAGS} ${INCLUDES} -c -o ${PARSER}.o ${PARSER}.c
+ 
+ ${VALIDATECONF}: ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o
+-      ${SHCC} ${CFFLAGS} ${LIBS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o
++      ${SHCC} ${CFLAGS} ${LIBS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o
+ 
+ ${INSPECT}: ${INSPECT}.c ${COMMON}.o
+-      ${SHCC} ${CFFLAGS} ${LIBS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o
++      ${SHCC} ${CFLAGS} ${LIBS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o
+ 
+ ${SAVE}: ${SAVE}.c
+-      ${SHCC} ${CFFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c
++      ${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c
+ 
+ ${SHLIB}: ${SHOBJS} ${COMMON}.o ${PARSER}.o
+       ${SHCC} ${CFLAGS} ${SPECIALLIBS} ${LIBS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${SHOBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS}
+@@ -65,19 +65,19 @@ ${SHLIB}: ${SHOBJS} ${COMMON}.o ${PARSER
+ install: ${TARGETS} installlib installman
+ 
+ installlib:
+-      ${INSTALL} ${STATICLIB} ${SHLIB} ${libdir}
++      ${BSD_INSTALL_DATA} ${STATICLIB} ${SHLIB} ${libdir}
+       ln -sf ${SHLIB} ${libdir}/${LIB_NAME}.so.${SHLIB_MAJOR}
+       ln -sf ${LIB_NAME}.so.${SHLIB_MAJOR} ${libdir}/${LIB_NAME}.so
+ 
+ installman:
+       if [ ! -d "${mandir}/man8" ] ; then \
+-              ${INSTALL} -o root -g root -d ${mandir}/man8; \
++              ${BSD_INSTALL_MAN_DIR} ${mandir}/man8; \
+       fi;
+-      ${INSTALL_DATA} -o root -g root tsocks.8 ${mandir}/man8/
++      ${BSD_INSTALL_MAN} tsocks.8 ${mandir}/man8/
+       if [ ! -d "${mandir}/man5" ] ; then \
+-              ${INSTALL} -o root -g root -d ${mandir}/man5; \
++              ${BSD_INSTALL_MAN_DIR} -d ${mandir}/man5; \
+       fi;
+-      ${INSTALL_DATA} -o root -g root tsocks.conf.5 ${mandir}/man5/
++      ${BSD_INSTALL_MAN} tsocks.conf.5 ${mandir}/man5/
+       
+ clean:
+       -rm -f *.so *.so.* *.o *~ ${TARGETS}
diff -r d8643bc92c31 -r ef63afa914fb net/tsocks/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tsocks/patches/patch-ab       Wed Dec 03 12:57:20 2003 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-ab,v 1.1.1.1 2003/12/03 12:57:20 jmmv Exp $
+
+--- configure.orig     2001-03-12 13:47:41.000000000 +0100
++++ configure
+@@ -536,7 +536,6 @@ fi
+ 
+ 
+ 
+-test "$libdir" = "\${exec_prefix}/lib" && libdir="/lib"
+ 
+ # Check whether --enable-socksdns or --disable-socksdns was given.
+ if test "${enable_socksdns+set}" = set; then
+@@ -1272,7 +1271,7 @@ fi
+ done
+ 
+ 
+-for ac_func in strcspn strdup strerror strspn strtol
++for ac_func in strcspn strdup strerror strspn strtol dlopen
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:1279: checking for $ac_func" >&5
+@@ -1323,9 +1322,11 @@ if eval "test \"`echo '$ac_cv_func_'$ac_
+ EOF
+  
+ else
++if [ ${ac_func} != "dlopen" ]; then
+   echo "$ac_t""no" 1>&6
+ { echo "configure: error: "Required function not found"" 1>&2; exit 1; }
+ fi
++fi
+ done
+ 
+ 
+@@ -1733,6 +1734,7 @@ fi
+ SIMPLELIBS=${LIBS}
+ LIBS=
+ 
++if [ $ac_cv_func_dlopen != "yes" ]; then
+ echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
+ echo "configure:1738: checking for dlsym in -ldl" >&5
+ ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
+@@ -1780,6 +1782,7 @@ else
+   echo "$ac_t""no" 1>&6
+ { echo "configure: error: "libdl is required"" 1>&2; exit 1; }
+ fi
++fi
+ 
+ 
+ echo $ac_n "checking for RTLD_NEXT from dlfcn.h""... $ac_c" 1>&6



Home | Main Index | Thread Index | Old Index