diff options
author | drochner <drochner> | 2005-08-04 10:22:21 +0000 |
---|---|---|
committer | drochner <drochner> | 2005-08-04 10:22:21 +0000 |
commit | 848f0618d7eac74d1723ccb1cd193389683019e0 (patch) | |
tree | 33a0e56d38fae45a1369ab32b98505b91c771a50 | |
parent | 456d4499d1474a088f5cca46679ee0a2a69f7799 (diff) | |
download | pkgsrc-848f0618d7eac74d1723ccb1cd193389683019e0.tar.gz |
-update to 1.8beta5 (the last release existing, from 2002)
this is a major rewrite
changes:
-much more flexible debug logging
-support for non blocking sockets
-addition of the tsocks shell script
-TSOCKS_CONF_FILE environment variable
-pkg changes:
-libtoolized
-changed redefinition of the crt0 _init into a __constructor__ attribute,
to avoid link errors
with jmmv's blessing
-rw-r--r-- | net/tsocks/Makefile | 6 | ||||
-rw-r--r-- | net/tsocks/PLIST | 7 | ||||
-rw-r--r-- | net/tsocks/distinfo | 13 | ||||
-rw-r--r-- | net/tsocks/patches/patch-aa | 100 | ||||
-rw-r--r-- | net/tsocks/patches/patch-ab | 98 | ||||
-rw-r--r-- | net/tsocks/patches/patch-ac | 22 |
6 files changed, 128 insertions, 118 deletions
diff --git a/net/tsocks/Makefile b/net/tsocks/Makefile index 226e1261dd1..90a1a2d76ea 100644 --- a/net/tsocks/Makefile +++ b/net/tsocks/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2005/05/22 20:08:26 jlam Exp $ +# $NetBSD: Makefile,v 1.6 2005/08/04 10:22:21 drochner Exp $ # -DISTNAME= tsocks-1.7 +DISTNAME= tsocks-1.8beta5 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tsocks/} @@ -9,8 +9,10 @@ MAINTAINER= jmmv@NetBSD.org HOMEPAGE= http://tsocks.sourceforge.net/ COMMENT= Transparent SOCKS proxying library +WRKSRC= ${WRKDIR}/tsocks-1.8 GNU_CONFIGURE= YES USE_TOOLS+= gmake +USE_LIBTOOL= yes CONFIGURE_ARGS+= --with-conf=${PKG_SYSCONFDIR}/tsocks.conf diff --git a/net/tsocks/PLIST b/net/tsocks/PLIST index 93486241a8f..0003ddf5e45 100644 --- a/net/tsocks/PLIST +++ b/net/tsocks/PLIST @@ -1,8 +1,7 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2003/12/03 12:57:20 jmmv Exp $ +@comment $NetBSD: PLIST,v 1.2 2005/08/04 10:22:21 drochner Exp $ bin/tsocks -lib/libtsocks.so -lib/libtsocks.so.1 -lib/libtsocks.so.${PKGVERSION} +lib/libtsocks.la +man/man1/tsocks.1 man/man5/tsocks.conf.5 man/man8/tsocks.8 share/examples/tsocks/tsocks.conf.complex diff --git a/net/tsocks/distinfo b/net/tsocks/distinfo index 5762c211f75..c83738a8b32 100644 --- a/net/tsocks/distinfo +++ b/net/tsocks/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.3 2005/02/27 22:06:10 jschauma Exp $ +$NetBSD: distinfo,v 1.4 2005/08/04 10:22:21 drochner Exp $ -SHA1 (tsocks-1.7.tar.gz) = b375215b63d93f4f317973f21cbcf4f9bd34720e -RMD160 (tsocks-1.7.tar.gz) = e174c002ab2aa231b7c3a1aa98c5e6b7cdce34e6 -Size (tsocks-1.7.tar.gz) = 70992 bytes -SHA1 (patch-aa) = c520bff0b0fad4629c5d1cc295f68fa0b4c29096 -SHA1 (patch-ab) = 17e169a25f5a8d53870251463e14538cccbd1473 +SHA1 (tsocks-1.8beta5.tar.gz) = 489f88c5df999ba21b27cdaa7836d9426d062aec +RMD160 (tsocks-1.8beta5.tar.gz) = 12e3eeeafaf7f3be21dd8901da38d5890659b09e +Size (tsocks-1.8beta5.tar.gz) = 83928 bytes +SHA1 (patch-aa) = a789618746a8666d2dc476f8b8ac975209892723 +SHA1 (patch-ab) = f99624c5bde722ba588dfb1b2ff12f6f276bd263 +SHA1 (patch-ac) = 3e5c38ca7ea7c0a499e1ed42dca406b8d5769333 diff --git a/net/tsocks/patches/patch-aa b/net/tsocks/patches/patch-aa index 559b60a0960..b8d98a411c4 100644 --- a/net/tsocks/patches/patch-aa +++ b/net/tsocks/patches/patch-aa @@ -1,58 +1,76 @@ -$NetBSD: patch-aa,v 1.2 2005/02/27 22:06:10 jschauma Exp $ +$NetBSD: patch-aa,v 1.3 2005/08/04 10:22:21 drochner Exp $ ---- Makefile.in.orig Tue Mar 13 17:59:42 2001 -+++ Makefile.in Sun Feb 27 16:18:25 2005 -@@ -38,22 +38,22 @@ - all: ${TARGETS} +--- Makefile.in.orig 2002-03-16 11:12:40.000000000 +0100 ++++ Makefile.in +@@ -13,7 +13,7 @@ includedir = @includedir@ + + SHELL = /bin/sh + MKINSTALLDIRS = ${SHELL} mkinstalldirs +-SHCC = ${CC} -fPIC ++SHCC = ${LIBTOOL} --mode=compile ${CC} + INSPECT = inspectsocks + SAVE = saveme + LIB_NAME = libtsocks +@@ -23,7 +23,7 @@ VALIDATECONF = validateconf + SCRIPT = tsocks + SHLIB_MAJOR = 1 + SHLIB_MINOR = 8 +-SHLIB = ${LIB_NAME}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ++SHLIB = ${LIB_NAME}.la + + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ +@@ -34,26 +34,25 @@ SPECIALLIBS = @SPECIALLIBS@ + + SHOBJS = ${OBJS:.o=.so} - ${COMMON}.o: ${COMMON}.c -- ${SHCC} ${CFFLAGS} ${INCLUDES} -c -o ${COMMON}.o ${COMMON}.c -+ ${SHCC} ${CFLAGS} ${INCLUDES} -c -o ${COMMON}.o ${COMMON}.c +-OBJS= tsocks.o ++OBJS= tsocks.lo - ${PARSER}.o: ${PARSER}.c -- ${SHCC} ${CFFLAGS} ${INCLUDES} -c -o ${PARSER}.o ${PARSER}.c -+ ${SHCC} ${CFLAGS} ${INCLUDES} -c -o ${PARSER}.o ${PARSER}.c + TARGETS= ${SHLIB} ${UTIL_LIB} ${SAVE} ${INSPECT} ${VALIDATECONF} + + all: ${TARGETS} ${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 +- ${SHCC} ${CFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS} ++ ${CC} ${CFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS} ${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 +- ${SHCC} ${CFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} ++ ${CC} ${CFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} ${SAVE}: ${SAVE}.c -- ${SHCC} ${CFFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c -+ ${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c +- ${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c ++ ${CC} ${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} -+ ${LD} ${LDFLAGS} ${SPECIALLIBS} ${LIBS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${SHOBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} - ln -sf ${SHLIB} ${LIB_NAME}.so +-${SHLIB}: ${OBJS} ${COMMON}.o ${PARSER}.o +- ${SHCC} ${CFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS} +- ln -sf ${SHLIB} ${LIB_NAME}.so ++${SHLIB}: ${OBJS} ${COMMON}.lo ${PARSER}.lo ++ ${LIBTOOL} --mode=link ${CC} -rpath ${PREFIX}/lib -version-info ${SHLIB_MAJOR}:${SHLIB_MINOR} ${LDFLAGS} -o ${SHLIB} ${OBJS} ${COMMON}.lo ${PARSER}.lo ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS} - %.so: %.c -@@ -65,19 +65,19 @@ - install: ${TARGETS} installlib installman +-%.so: %.c ++%.lo: %.c + ${SHCC} ${CFLAGS} ${INCLUDES} -c ${CC_SWITCHES} $< -o $@ + + %.o: %.c +@@ -67,9 +66,7 @@ installscript: 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 + ${MKINSTALLDIRS} "${DESTDIR}${libdir}" +- ${INSTALL} ${SHLIB} ${DESTDIR}${libdir} +- ln -sf ${SHLIB} ${DESTDIR}${libdir}/${LIB_NAME}.so.${SHLIB_MAJOR} +- ln -sf ${LIB_NAME}.so.${SHLIB_MAJOR} ${DESTDIR}${libdir}/${LIB_NAME}.so ++ ${LIBTOOL} --mode=install ${INSTALL} ${SHLIB} ${DESTDIR}${libdir} 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/ - + ${MKINSTALLDIRS} "${DESTDIR}${mandir}/man1" +@@ -78,7 +75,7 @@ installman: + ${INSTALL_DATA} tsocks.8 ${DESTDIR}${mandir}/man8/ + ${MKINSTALLDIRS} "${DESTDIR}${mandir}/man5" + ${INSTALL_DATA} tsocks.conf.5 ${DESTDIR}${mandir}/man5/ +- ++ clean: -rm -f *.so *.so.* *.o *~ ${TARGETS} + diff --git a/net/tsocks/patches/patch-ab b/net/tsocks/patches/patch-ab index 01c0912a947..a6622212f2e 100644 --- a/net/tsocks/patches/patch-ab +++ b/net/tsocks/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.2 2005/02/27 22:06:10 jschauma Exp $ +$NetBSD: patch-ab,v 1.3 2005/08/04 10:22:21 drochner Exp $ ---- configure.orig Mon Mar 12 07:47:41 2001 -+++ configure Sun Feb 27 16:08:19 2005 -@@ -536,7 +536,6 @@ +--- configure.orig 2002-07-16 00:51:08.000000000 +0200 ++++ configure +@@ -538,7 +538,6 @@ fi @@ -10,7 +10,7 @@ $NetBSD: patch-ab,v 1.2 2005/02/27 22:06:10 jschauma Exp $ # Check whether --enable-socksdns or --disable-socksdns was given. if test "${enable_socksdns+set}" = set; then -@@ -1272,7 +1271,7 @@ +@@ -1375,7 +1374,7 @@ fi done @@ -18,8 +18,8 @@ $NetBSD: patch-ab,v 1.2 2005/02/27 22:06:10 jschauma Exp $ +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 @@ + echo "configure:1382: checking for $ac_func" >&5 +@@ -1426,9 +1425,11 @@ if eval "test \"`echo '$ac_cv_func_'$ac_ EOF else @@ -31,77 +31,45 @@ $NetBSD: patch-ab,v 1.2 2005/02/27 22:06:10 jschauma Exp $ done -@@ -1733,6 +1734,7 @@ +@@ -1836,6 +1837,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 + echo "configure:1841: checking for dlsym in -ldl" >&5 ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'` -@@ -1780,6 +1782,7 @@ +@@ -1883,6 +1885,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 -@@ -1977,7 +1980,11 @@ + echo $ac_n "checking "for RTLD_NEXT from dlfcn.h"""... $ac_c" 1>&6 +@@ -2078,12 +2081,16 @@ EOF - echo $ac_n "checking location of libc""... $ac_c" 1>&6 - echo "configure:1980: checking location of libc" >&5 -+ if test "$OPSYS" != "IRIX"; then - LIBC=`$LDD /bin/ls | $GREP "libc" | $AWK ' { print $3 } '` -+ else -+ LIBC=/usr/lib$ABI/libc.so -+ fi + echo $ac_n "checking "location of libc.so"""... $ac_c" 1>&6 + echo "configure:2081: checking "location of libc.so"" >&5 ++ if test "$OPSYS" != "IRIX"; then + LIBC= + for DIR in '/lib' '/usr/lib'; do + if test "${LIBC}" = ""; then + LIBC=`$FIND $DIR -name "libc.so.?" 2>/dev/null | $TAIL -1` + fi + done ++ else ++ LIBC=/usr/lib$ABI/libc.so ++ fi cat >> confdefs.h <<EOF #define LIBC "${LIBC}" -@@ -1992,6 +1999,8 @@ - imp2='(int __fd, struct sockaddr * __addr, int __len) {' - proto3='(int, const struct sockaddr *, socklen_t);' - imp3='(int __fd, const struct sockaddr * __addr, socklen_t __len) {' -+proto4='(int, const void *, socklen_t);' -+imp4='(int __fd, const void * __addr, socklen_t __len) {' - echo $ac_n "checking for correct connect prototype""... $ac_c" 1>&6 - echo "configure:1997: checking for correct connect prototype" >&5 - if test "$cross_compiling" = yes; then -@@ -2056,6 +2065,26 @@ - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* -+ -+ if test "$cross_compiling" = yes; then -+ PROTO="" -+else -+ cat > conftest.$ac_ext <<EOF -+#line 2045 "configure" -+#include "confdefs.h" -+ -+ #include <sys/socket.h> -+ int connect$proto4 -+ int main() {return(0);} -+ -+EOF -+if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+then -+ PROTO="$proto4"; IMP="$imp4" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -fr conftest* - PROTO="" - fi - rm -fr conftest* -@@ -2066,6 +2095,9 @@ - rm -fr conftest* - fi - -+fi -+rm -fr conftest* -+fi - - fi - rm -fr conftest* +@@ -2228,7 +2235,7 @@ EOF + echo $ac_n "checking for correct poll prototype""... $ac_c" 1>&6 + echo "configure:2230: checking for correct poll prototype" >&5 + PROTO= +-for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout' ++for testproto in 'struct pollfd *ufds, nfds_t nfds, int timeout' + do + if test "${PROTO}" = ""; then + cat > conftest.$ac_ext <<EOF diff --git a/net/tsocks/patches/patch-ac b/net/tsocks/patches/patch-ac new file mode 100644 index 00000000000..40696e1381e --- /dev/null +++ b/net/tsocks/patches/patch-ac @@ -0,0 +1,22 @@ +$NetBSD: patch-ac,v 1.1 2005/08/04 10:22:21 drochner Exp $ + +--- tsocks.c.orig 2005-08-04 11:46:19.000000000 +0200 ++++ tsocks.c +@@ -68,7 +68,7 @@ static int suid = 0; + static char *conffile = NULL; + + /* Exported Function Prototypes */ +-void _init(void); ++void __tsocks_init(void) __attribute__ ((__constructor__)); + int connect(CONNECT_SIGNATURE); + int select(SELECT_SIGNATURE); + int poll(POLL_SIGNATURE); +@@ -100,7 +100,7 @@ static int read_socksv4_req(struct connr + static int read_socksv5_connect(struct connreq *conn); + static int read_socksv5_auth(struct connreq *conn); + +-void _init(void) { ++void __tsocks_init(void) { + #ifdef USE_OLD_DLSYM + void *lib; + #endif |