Date: Fri, 19 Aug 2016 16:15:17 +0000 (UTC) From: Emanuel Haupt <ehaupt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r420478 - in head/net/tsocks: . files Message-ID: <201608191615.u7JGFH1F091339@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ehaupt Date: Fri Aug 19 16:15:17 2016 New Revision: 420478 URL: https://svnweb.freebsd.org/changeset/ports/420478 Log: - Install inspectsocks and validateconf which are mentioned in the manpage - Add license - Use SUB_FILES for pkg-message - Use DISTVERSION instead of PORTVERSION - Recreate patch files to satisfy portlint - Reformat pkg-message to what the PHB (section 8.5) defines as a good format - Bump PORTREVISION - Take maintainership Added: head/net/tsocks/files/patch-INSTALL (contents, props changed) head/net/tsocks/files/pkg-message.in - copied, changed from r420477, head/net/tsocks/pkg-message Deleted: head/net/tsocks/files/patch-readme head/net/tsocks/pkg-message Modified: head/net/tsocks/Makefile head/net/tsocks/files/patch-Makefile.in head/net/tsocks/files/patch-configure head/net/tsocks/files/patch-parser.c head/net/tsocks/files/patch-tsocks.1 head/net/tsocks/files/patch-tsocks.8 head/net/tsocks/files/patch-tsocks.c head/net/tsocks/pkg-plist Modified: head/net/tsocks/Makefile ============================================================================== --- head/net/tsocks/Makefile Fri Aug 19 16:04:00 2016 (r420477) +++ head/net/tsocks/Makefile Fri Aug 19 16:15:17 2016 (r420478) @@ -2,28 +2,30 @@ # $FreeBSD$ PORTNAME= tsocks -PORTVERSION= 1.8.b5 -PORTREVISION= 6 +DISTVERSION= 1.8.b5 +PORTREVISION= 7 CATEGORIES= net security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/1.8%20beta%205 \ http://ftp1.sourceforge.net/tsocks/ \ http://www.yazzy.org/ports/tsocks/ DISTNAME= ${PORTNAME}-${PORTVERSION:C/.b/beta/} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= ehaupt@FreeBSD.org COMMENT= Allow non SOCKS aware applications to use SOCKS without modification +LICENSE= GPLv2 + GNU_CONFIGURE= yes USES= gmake USE_LDCONFIG= yes -WRKSRC=${WRKDIR}/${PORTNAME}-${PORTVERSION:C/.b.*//} +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/.b.*//} CONFIGURE_ARGS= --with-conf=${PREFIX}/etc/tsocks.conf \ --libdir=${PREFIX}/lib OPTIONS_DEFINE= DOCS EXAMPLES HOSTNAMES MUTE OLDMETHOD SOCKSDNS -OPTIONS_DEFAULT= HOSTNAMES +OPTIONS_DEFAULT=HOSTNAMES HOSTNAMES_DESC= Enable DNS lookups OLDMETHOD_DESC= Do not use RTLD_NEXT parameter to dlsym @@ -35,12 +37,17 @@ MUTE_CONFIGURE_ON= --disable-debug OLDMETHOD_CONFIGURE_ON= --enable-oldmethod SOCKSDNS_CONFIGURE_ON= --enable-socksdns +SUB_FILES= pkg-message + post-patch: @${REINPLACE_CMD} -e 's|ufds|fds|g' ${WRKSRC}/tsocks.c @${REINPLACE_CMD} -e 's|/usr|${PREFIX}|' ${WRKSRC}/tsocks post-install: - ${INSTALL_DATA} ${WRKSRC}/tsocks.conf.simple.example ${STAGEDIR}${PREFIX}/etc/tsocks.conf.sample + ${INSTALL_PROGRAM} ${WRKSRC}/inspectsocks ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/validateconf ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/tsocks.conf.simple.example \ + ${STAGEDIR}${PREFIX}/etc/tsocks.conf.sample @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/*.example ${STAGEDIR}${EXAMPLESDIR} @${MKDIR} ${STAGEDIR}${DOCSDIR} Added: head/net/tsocks/files/patch-INSTALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/tsocks/files/patch-INSTALL Fri Aug 19 16:15:17 2016 (r420478) @@ -0,0 +1,113 @@ +--- INSTALL.orig 2002-05-18 02:12:30 UTC ++++ INSTALL +@@ -1,12 +1,7 @@ +-Quick Installation Instructions ++Quick Instructions + ------------------------------- + +-1. Unpack the archive (though if you're reading this you've already +-achieved that) +- +- tar -zxvf tsocks-<version>.tar.gx +- +-2. Run ./configure, options which might be of interest (and that are ++1. Explenations of the ./configure options which might be of interest (and that are + specific to tsocks include): + --enable-socksdns This option causes tsocks to intercept + DNS lookups and attempt to force them +@@ -39,55 +34,31 @@ achieved that) + Other standard autoconf options are provided by typing './configure + --help' + +-NOTE: The install path for the library is _NOT_ prefixed with --prefix, +-this is because it is strongly recommended that tsocks is installed into +-/lib (and not /usr/lib). This is important if tsocks is put into +-/etc/ld.so.preload since /usr is not mounted on many systems at boot +-time, meaning that programs running before /usr is mounted will try to +-preload tsocks, fail to find it and die, making the machine unusable. If +-you really wish to install the library into some other path use --libdir. +- +-3. Compile the code by typing: +- +- make ++2. Created files: + +-This should result in the creation of the following: + - libtsocks.so - the libtsocks library + - validateconf - a utility to verify the tsocks configuration file + - inspectsocks - a utility to determine the version of a socks server + - saveme - a statically linked utility to remove /etc/ld.so.preload + if it becomes corrupt ++ - man pages - tsocks(8), tsocks(1) and tsocks.conf(5) + +-4. If you experience any errors at this step and don't know how to fix +-them, seek help using the contacts listed on +-http://tsocks.sourceforge.net/contact.php +- +-5. Install the compiled library. You can skip this step if you only plan +-to use the library for personal use. If you want all users on the machine +-to be able to use it however, su to root then type +- +- make install +- +-This will install the library, the tsocks script and its man pages +-(tsocks(8), tsocks(1) and tsocks.conf(5)) to the paths specified to +-configure. +- +-Note that by default the library is installed to /lib and that the +-configure --prefix is IGNORED. See above for more detail. ++3. Configuration + +-6. At this point you'll need to create the tsocks configuration file. +-There are two samples provided in the build directory called ++You'll need to create the tsocks configuration file. ++There are two samples provided in the build directory and ++/usr/local/share/examples/tsocks called + tsocks.conf.simple.example and tsocks.conf.complex.example. + Documentation on the configuration file format is provided in the + tsocks.conf man page ('man tsocks.conf'). + +-7. Having created the tsocks.conf file you should verify it using ++4. Having created the tsocks.conf file you should verify it using + validateconf (some detail on validateconf can be found in the tsocks.conf + man page). Normally validateconf is run without arguments + ('./validateconf'). Any errors which are displayed by validateconf need + to be rectified before tsocks will function correctly. + +-8. You can now choose to make the library affect all users or just those ++5. You can now choose to make the library affect all users or just those + who choose to use it. If you want users to use it themselves, they can + simply use the tsocks(1) shell script to run programs (see 'man tsocks') + or do the following in their shell before running applications that need +@@ -97,25 +68,15 @@ to be transparently proxied: + + (in CSH) setenv LD_PRELOAD <path to library> + +- <path to library> = e.g /lib/libtsocks.so.1.8 +- +-If you want all users to pick up the library, place the full path to the +-full library in the file /etc/ld.so.preload (e.g "/lib/libtsocks.so"). Be +-EXTREMELY careful if you do this, if you mistype it or in some way get it +-wrong this will make your machine UNUSABLE. Also, if you do this, make +-sure the directory you put the library in is in the root of the +-filesystem, if the library is not available at boot time, again, your +-machine will be UNUSABLE. ++ <path to library> = e.g /usr/local/lib/tsocks/libtsocks.so.1.8 + +-9. Go ahead and use it! At this point everything should work. Again, if ++6. Go ahead and use it! At this point everything should work. Again, if + you experience any problems, use the contact points listed at +-http://tsocks.sourceforge.net/contact.php. If you do happen to break your +-machine with /etc/ld.so.preload, the build process creates a statically +-linked executable called saveme in the build directory. This executable +-simply unlinks /etc/ld.so.preload, this may or may not save you so give +-it a try. If it fails, you'll need to switch off the machine and get a +-rescue disk (e.g tomsrtbt) mount the disk and remove the file manually. ++http://tsocks.sourceforge.net/contact.php. + + Thats it, + + Thanks, Shaun Clowes (delius@progsoc.org) ++ ++ ++Adapted for FreeBSD by Marcin Jessa (yazzy@yazzy.org) Modified: head/net/tsocks/files/patch-Makefile.in ============================================================================== --- head/net/tsocks/files/patch-Makefile.in Fri Aug 19 16:04:00 2016 (r420477) +++ head/net/tsocks/files/patch-Makefile.in Fri Aug 19 16:15:17 2016 (r420478) @@ -1,6 +1,6 @@ ---- Makefile.in.orig Tue Oct 7 18:13:47 2003 -+++ Makefile.in Tue Oct 7 18:14:24 2003 -@@ -67,8 +67,7 @@ +--- Makefile.in.orig 2002-03-16 10:12:40 UTC ++++ Makefile.in +@@ -67,8 +67,7 @@ installscript: installlib: ${MKINSTALLDIRS} "${DESTDIR}${libdir}" Modified: head/net/tsocks/files/patch-configure ============================================================================== --- head/net/tsocks/files/patch-configure Fri Aug 19 16:04:00 2016 (r420477) +++ head/net/tsocks/files/patch-configure Fri Aug 19 16:15:17 2016 (r420478) @@ -1,6 +1,6 @@ ---- configure.orig Mon Jul 15 15:51:08 2002 -+++ configure Wed Oct 8 01:42:17 2003 -@@ -1836,14 +1836,14 @@ +--- configure.orig 2002-07-15 22:51:08 UTC ++++ configure +@@ -1836,14 +1836,14 @@ fi SIMPLELIBS=${LIBS} LIBS= @@ -18,7 +18,7 @@ cat > conftest.$ac_ext <<EOF #line 1849 "configure" #include "confdefs.h" -@@ -1877,7 +1877,7 @@ +@@ -1877,7 +1877,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l #define $ac_tr_lib 1 EOF @@ -27,7 +27,7 @@ else echo "$ac_t""no" 1>&6 -@@ -2151,6 +2151,7 @@ +@@ -2151,6 +2151,7 @@ do #line 2152 "configure" #include "confdefs.h" @@ -35,7 +35,7 @@ #include <sys/socket.h> int connect($testproto); -@@ -2227,14 +2228,16 @@ +@@ -2227,14 +2228,16 @@ EOF echo $ac_n "checking for correct poll prototype""... $ac_c" 1>&6 echo "configure:2230: checking for correct poll prototype" >&5 Modified: head/net/tsocks/files/patch-parser.c ============================================================================== --- head/net/tsocks/files/patch-parser.c Fri Aug 19 16:04:00 2016 (r420477) +++ head/net/tsocks/files/patch-parser.c Fri Aug 19 16:15:17 2016 (r420478) @@ -1,5 +1,5 @@ ---- parser.c.orig Wed Oct 8 01:43:48 2003 -+++ parser.c Wed Oct 8 01:43:58 2003 +--- parser.c.orig 2002-03-13 12:34:22 UTC ++++ parser.c @@ -4,6 +4,7 @@ */ Modified: head/net/tsocks/files/patch-tsocks.1 ============================================================================== --- head/net/tsocks/files/patch-tsocks.1 Fri Aug 19 16:04:00 2016 (r420477) +++ head/net/tsocks/files/patch-tsocks.1 Fri Aug 19 16:15:17 2016 (r420478) @@ -1,5 +1,5 @@ ---- tsocks.1.orig Sat Mar 16 11:34:44 2002 -+++ tsocks.1 Sat Sep 6 17:54:49 2003 +--- tsocks.1.orig 2002-03-16 10:34:44 UTC ++++ tsocks.1 @@ -1,24 +1,24 @@ -.TH TSOCKS 1 "" "TSOCKS" - @@ -33,7 +33,7 @@ .IP \fB[application\ \fB[application's\ arguments]] run the application as specified with the environment (LD_PRELOAD) set such that tsocks(8) will transparently proxy SOCKS connections in -@@ -28,19 +28,19 @@ +@@ -28,19 +28,19 @@ this option adds or removes tsocks(8) fr variable. When tsocks(8) is in this variable all executed applications are automatically socksified. If you want to use this function, you HAVE to source the shell script from yours, Modified: head/net/tsocks/files/patch-tsocks.8 ============================================================================== --- head/net/tsocks/files/patch-tsocks.8 Fri Aug 19 16:04:00 2016 (r420477) +++ head/net/tsocks/files/patch-tsocks.8 Fri Aug 19 16:15:17 2016 (r420478) @@ -1,5 +1,5 @@ ---- tsocks.8.orig Sat Mar 16 11:20:51 2002 -+++ tsocks.8 Sat Sep 6 18:15:08 2003 +--- tsocks.8.orig 2002-03-16 10:20:51 UTC ++++ tsocks.8 @@ -1,25 +1,24 @@ -.TH TSOCKS 8 "" "Shaun Clowes" \" -*- - \" nroff -* @@ -35,7 +35,7 @@ This process can be automated (for Bash, Bourne and Korn shell users) for a single command or for all commands in a shell session -@@ -30,13 +29,12 @@ +@@ -30,13 +29,12 @@ automatically use it, a very useful conf information on this configuration see the CAVEATS section of this manual page. @@ -51,7 +51,7 @@ it is not, the library redirects the connection to a SOCKS server specified in the configuration file. It then negotiates that connection with the SOCKS server and passes the connection back to the calling -@@ -52,42 +50,42 @@ +@@ -52,42 +50,42 @@ the SOCKSified TCP/IP stacks seen on oth Most arguments to .BR tsocks are provided in the configuration file (the location of which is defined @@ -104,7 +104,7 @@ .I TSOCKS_USERNAME This environment variable can be used to specify the username to be used when version 5 SOCKS servers request username/password authentication. This -@@ -95,7 +93,7 @@ +@@ -95,7 +93,7 @@ overrides the default username that can file using 'default_user', see tsocks.conf(8) for more information. This variable is ignored for version 4 SOCKS servers. @@ -113,7 +113,7 @@ .I TSOCKS_PASSWORD This environment variable can be used to specify the password to be used when version 5 SOCKS servers request username/password authentication. This -@@ -115,11 +113,12 @@ +@@ -115,11 +113,12 @@ consult the INSTALL file for more inform .BR tsocks will generate error messages and print them to stderr when there are problems with the configuration file or the SOCKS negotiation with the @@ -128,7 +128,7 @@ .BR tsocks will not in the above configuration be able to provide SOCKS proxying to setuid applications or applications that are not run from a shell. You can -@@ -132,8 +131,7 @@ +@@ -132,8 +131,7 @@ the INSTALL file for more info). THIS I careful. Also be sure the library is in the root filesystem as all hell will break loose if the directory it is in is not available at boot time. @@ -138,7 +138,7 @@ .BR tsocks can only proxy outgoing TCP connections -@@ -157,21 +155,21 @@ +@@ -157,21 +155,21 @@ not. This introduces overhead and should .BR tsocks uses ELF dynamic loader features to intercept dynamic function calls from programs in which it is embedded. As a result, it cannot trace the Modified: head/net/tsocks/files/patch-tsocks.c ============================================================================== --- head/net/tsocks/files/patch-tsocks.c Fri Aug 19 16:04:00 2016 (r420477) +++ head/net/tsocks/files/patch-tsocks.c Fri Aug 19 16:15:17 2016 (r420478) @@ -1,4 +1,4 @@ ---- tsocks.c.orig 2014-12-19 02:01:24 UTC +--- tsocks.c.orig 2002-07-15 22:50:52 UTC +++ tsocks.c @@ -852,7 +852,7 @@ static int connect_server(struct connreq sizeof(conn->serveraddr)); Copied and modified: head/net/tsocks/files/pkg-message.in (from r420477, head/net/tsocks/pkg-message) ============================================================================== --- head/net/tsocks/pkg-message Fri Aug 19 16:04:00 2016 (r420477, copy source) +++ head/net/tsocks/files/pkg-message.in Fri Aug 19 16:15:17 2016 (r420478) @@ -1,9 +1,4 @@ - -### - -Simple setup file was copied to ${PREFIX}/etc/tsocks.conf.sample +Simple setup file was copied to %%PREFIX%%/etc/tsocks.conf.sample An example of a more complex setup file can be found in -${PREFIX}/share/examples/tsocks/ -Some more details avaliable in ${PREFIX}/share/examples/tsocks/README - -### +%%PREFIX%%/share/examples/tsocks/ +Some more details avaliable in %%PREFIX%%/share/examples/tsocks/README Modified: head/net/tsocks/pkg-plist ============================================================================== --- head/net/tsocks/pkg-plist Fri Aug 19 16:04:00 2016 (r420477) +++ head/net/tsocks/pkg-plist Fri Aug 19 16:15:17 2016 (r420478) @@ -1,10 +1,12 @@ +bin/inspectsocks bin/tsocks +bin/validateconf etc/tsocks.conf.sample -lib/libtsocks.so.1 lib/libtsocks.so +lib/libtsocks.so.1 man/man1/tsocks.1.gz man/man5/tsocks.conf.5.gz man/man8/tsocks.8.gz +%%PORTDOCS%%%%DOCSDIR%%/README %%PORTEXAMPLES%%%%EXAMPLESDIR%%/tsocks.conf.complex.example %%PORTEXAMPLES%%%%EXAMPLESDIR%%/tsocks.conf.simple.example -%%PORTDOCS%%%%DOCSDIR%%/README
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608191615.u7JGFH1F091339>