diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2015-01-09 16:59:58 +0000 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2015-01-09 16:59:58 +0000 |
commit | 554bbabb0caa61ae38a26cc69075a240ff9fd3a0 (patch) | |
tree | cbc8c0bcddb68bf5e91d480f4819961c458a1a74 /net-proxy | |
parent | Fix ECHANGELOG_USER. (diff) | |
download | gentoo-2-554bbabb0caa61ae38a26cc69075a240ff9fd3a0.tar.gz gentoo-2-554bbabb0caa61ae38a26cc69075a240ff9fd3a0.tar.bz2 gentoo-2-554bbabb0caa61ae38a26cc69075a240ff9fd3a0.zip |
Fix bugs 316345, 383969, 387001, 430782, 456924. Add new USE flags.
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
(Portage version: 2.2.15/cvs/Linux i686, signed Manifest commit with key 565953B95372756C)
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/tsocks/ChangeLog | 20 | ||||
-rw-r--r-- | net-proxy/tsocks/files/tsocks-1.8_beta5-flags.patch | 31 | ||||
-rw-r--r-- | net-proxy/tsocks/files/tsocks-1.8_beta5-ld_preload.patch | 35 | ||||
-rw-r--r-- | net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch | 16 | ||||
-rw-r--r-- | net-proxy/tsocks/files/tsocks-1.8_beta5-rename.patch | 62 | ||||
-rw-r--r-- | net-proxy/tsocks/metadata.xml | 7 | ||||
-rw-r--r-- | net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild | 74 |
7 files changed, 241 insertions, 4 deletions
diff --git a/net-proxy/tsocks/ChangeLog b/net-proxy/tsocks/ChangeLog index ebfcc846f1c2..58527923594c 100644 --- a/net-proxy/tsocks/ChangeLog +++ b/net-proxy/tsocks/ChangeLog @@ -1,6 +1,24 @@ # ChangeLog for net-proxy/tsocks # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/ChangeLog,v 1.42 2015/01/08 14:58:40 bircoph Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/ChangeLog,v 1.43 2015/01/09 16:59:58 bircoph Exp $ + +*tsocks-1.8_beta5-r7 (09 Jan 2015) + + 09 Jan 2015; Andrew Savchenko <bircoph@gentoo.org> + +tsocks-1.8_beta5-r7.ebuild, +files/tsocks-1.8_beta5-flags.patch, + +files/tsocks-1.8_beta5-ld_preload.patch, +files/tsocks-1.8_beta5-poll.patch, + +files/tsocks-1.8_beta5-rename.patch, metadata.xml: + Fix bug 316345: patch taken from Debian bug 576301, message 15. + Fix bug 383969: sed tsocks.8 as proposed by Denilson Sá. + Fix bug 387001: segfault happend only if tordns was enabled and no + config file (or proper server configuration there) provided. + tordns requires deadpool to be initialized early, thus disable + tordns if server is not configured properly (new tordns patch + provided). + Fix bug 430782: respect CFLAGS during linking too. + Fix bug 456924: remove dirs from LD_PRELOAD as proposed by Marien Zwart. + Add new USE flags for built-in dns support (alternative to tordns), + envconf control and DNS lookups for SOCKS servers. 08 Jan 2015; Andrew Savchenko <bircoph@gentoo.org> metadata.xml: Add myself to maintainers. Update to EAPI=5. diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-flags.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-flags.patch new file mode 100644 index 000000000000..70d8786c196b --- /dev/null +++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-flags.patch @@ -0,0 +1,31 @@ +--- tsocks-1.8.orig/Makefile.in 2002-03-16 11:12:40.000000000 +0100 ++++ tsocks-1.8/Makefile.in 2009-06-20 13:56:56.000000000 +0200 +@@ -28,6 +28,7 @@ + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + CFLAGS = @CFLAGS@ ++LDFLAGS = @LDFLAGS@ + INCLUDES = -I. + LIBS = @LIBS@ + SPECIALLIBS = @SPECIALLIBS@ +@@ -41,16 +42,16 @@ + all: ${TARGETS} + + ${VALIDATECONF}: ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o +- ${SHCC} ${CFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS} ++ ${SHCC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS} + + ${INSPECT}: ${INSPECT}.c ${COMMON}.o +- ${SHCC} ${CFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} ++ ${SHCC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} + + ${SAVE}: ${SAVE}.c +- ${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c ++ ${SHCC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -o ${SAVE} ${SAVE}.c + + ${SHLIB}: ${OBJS} ${COMMON}.o ${PARSER}.o +- ${SHCC} ${CFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS} ++ ${SHCC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS} + ln -sf ${SHLIB} ${LIB_NAME}.so + + %.so: %.c diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-ld_preload.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-ld_preload.patch new file mode 100644 index 000000000000..360e5b297fb6 --- /dev/null +++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-ld_preload.patch @@ -0,0 +1,35 @@ +--- tsocks-1.8.orig/tsocks 2002-03-16 11:27:18.000000000 +0100 ++++ tsocks-1.8/tsocks 2009-06-20 13:56:38.000000000 +0200 +@@ -46,14 +46,14 @@ + on) + if [ -z "$LD_PRELOAD" ] + then +- export LD_PRELOAD="/usr/lib/libtsocks.so" ++ export LD_PRELOAD="libtsocks.so" + else +- echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \ +- export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD" ++ echo $LD_PRELOAD | grep -q "libtsocks\.so" || \ ++ export LD_PRELOAD="libtsocks.so $LD_PRELOAD" + fi + ;; + off) +- export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/\/usr\/lib\/libtsocks.so \?//'` ++ export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/libtsocks.so \?//'` + if [ -z "$LD_PRELOAD" ] + then + unset LD_PRELOAD +@@ -68,10 +68,10 @@ + *) + if [ -z "$LD_PRELOAD" ] + then +- export LD_PRELOAD="/usr/lib/libtsocks.so" ++ export LD_PRELOAD="libtsocks.so" + else +- echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \ +- export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD" ++ echo $LD_PRELOAD | grep -q "libtsocks\.so" || \ ++ export LD_PRELOAD="libtsocks.so $LD_PRELOAD" + fi + + if [ $# = 0 ] diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch new file mode 100644 index 000000000000..233539564c61 --- /dev/null +++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch @@ -0,0 +1,16 @@ +--- a/tsocks.c ++++ b/tsocks.c +@@ -659,10 +659,11 @@ + * be ready for writing), otherwise we'll just let the select loop + * come around again (since we can't flag it for read, we don't know + * if there is any data to be read and can't be bothered checking) */ +- if (conn->selectevents & WRITE) { +- setevents |= POLLOUT; ++ if (conn->selectevents & POLLOUT) { ++ ufds[i].revents |= POLLOUT; + nevents++; + } ++ ufds[i].events = conn->selectevents; + } + } + } while (nevents == 0); diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-rename.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-rename.patch new file mode 100644 index 000000000000..4962aacd6801 --- /dev/null +++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-rename.patch @@ -0,0 +1,62 @@ +--- tsocks-1.8.orig/validateconf.c 2002-02-07 11:49:59.000000000 +0100 ++++ tsocks-1.8/validateconf.c 2009-06-20 13:56:38.000000000 +0200 +@@ -23,7 +23,7 @@ + */ + + /* Global configuration variables */ +-char *progname = "validateconf"; /* Name for error msgs */ ++char *progname = "tsocks-validateconf"; /* Name for error msgs */ + + /* Header Files */ + #include <config.h> +--- tsocks-1.8.orig/tsocks.8 2002-03-16 11:20:51.000000000 +0100 ++++ tsocks-1.8/tsocks.8 2009-06-20 13:56:38.000000000 +0200 +@@ -127,8 +127,8 @@ + libtsocks in /etc/ld.so.preload. Please make sure you correctly enter the + full path to the library in this file if you do this. If you get it wrong, + you will be UNABLE TO DO ANYTHING with the machine and will have to boot +-it with a rescue disk and remove the file (or try the saveme program, see +-the INSTALL file for more info). THIS IS A ***WARNING***, please be ++it with a rescue disk and remove the file (or try the tsocks-saveme program, ++simply unlinks /etc/ld.so.preload ). THIS IS A ***WARNING***, please be + 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. + +--- tsocks-1.8.orig/tsocks.conf.5 2002-05-18 04:13:08.000000000 +0200 ++++ tsocks-1.8/tsocks.conf.5 2009-06-20 13:56:38.000000000 +0200 +@@ -139,21 +139,20 @@ + the version that server supports. + + .TP +-validateconf +-validateconf can be used to verify the configuration file. It checks the format +-of the file and also the contents for errors. Having read the file it dumps +-the configuration to the screen in a formatted, readable manner. This can be +-extremely useful in debugging problems. +- +-validateconf can read a configuration file from a location other than the +-location specified at compile time with the -f <filename> command line +-option. +- +-Normally validateconf simply dumps the configuration read to the screen (in +-a nicely readable format), however it also has a useful 'test' mode. When +-passed a hostname/ip on the command line like -t <hostname/ip>, validateconf +-determines which of the SOCKS servers specified in the configuration file +-would be used by tsocks to access the specified host. ++tsocks-validateconf ++tsocks-validateconf can be used to verify the configuration file. It checks ++the format of the file and also the contents for errors. Having read the file ++it dumps the configuration to the screen in a formatted, readable manner. ++This can be extremely useful in debugging problems. ++ ++tsocks-validateconf can read a configuration file from a location other than the ++location specified at compile time with the -f <filename> command line option. ++ ++Normally tsocks-validateconf simply dumps the configuration read to the screen ++(in a nicely readable format), however it also has a useful 'test' mode. When ++passed a hostname/ip on the command line like -t <hostname/ip>, ++tsocks-validateconf determines which of the SOCKS servers specified in the ++configuration file would be used by tsocks to access the specified host. + + .SH SEE ALSO + tsocks(8) diff --git a/net-proxy/tsocks/metadata.xml b/net-proxy/tsocks/metadata.xml index 0865cab7f424..ff7c93760d69 100644 --- a/net-proxy/tsocks/metadata.xml +++ b/net-proxy/tsocks/metadata.xml @@ -8,8 +8,9 @@ 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.</longdescription> <use> - <flag name='tordns'> - Apply tordns patch which allows transparent TORification of the DNS queries - </flag> + <flag name='dns'>Force DNS queries to use SOCKS server via tcp</flag> + <flag name='envconf'>Allow TSOCKS_CONF_FILE to specify configuration file</flag> + <flag name='server-lookups'>Allow hostname resolution _for_ SOCKS servers</flag> + <flag name='tordns'>Apply tordns patch which allows transparent TORification of the DNS queries</flag> </use> </pkgmetadata> diff --git a/net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild b/net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild new file mode 100644 index 000000000000..898c0c8f9711 --- /dev/null +++ b/net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/tsocks-1.8_beta5-r7.ebuild,v 1.1 2015/01/09 16:59:58 bircoph Exp $ + +EAPI="5" + +inherit autotools eutils multilib toolchain-funcs + +DESCRIPTION="Transparent SOCKS v4 proxying library" +HOMEPAGE="http://tsocks.sourceforge.net/" +SRC_URI="mirror://sourceforge/tsocks/${PN}-${PV/_}.tar.gz + tordns? ( http://dev.gentoo.org/~bircoph/patches/${PN}-${PV/_beta/b}-tordns1-gentoo-r3.patch.xz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="dns envconf tordns server-lookups" + +REQUIRED_USE=" + dns? ( !tordns !server-lookups ) + tordns? ( !dns !server-lookups ) +" + +S="${WORKDIR}/${P%%_*}" + +src_prepare() { + epatch \ + "${FILESDIR}/${P}-flags.patch" \ + "${FILESDIR}/${P}-ld_preload.patch" \ + "${FILESDIR}/${P}-rename.patch" \ + "${FILESDIR}/${P}-bsd.patch" \ + "${FILESDIR}/${P}-poll.patch" + use tordns && epatch "../${PN}-${PV/_beta/b}-tordns1-gentoo-r3.patch" + + sed -i 's/TSOCKS_CONFFILE/TSOCKS_CONF_FILE/' tsocks.8 || die "sed tsocks.8 failed" + eautoreconf +} + +src_configure() { + tc-export CC + + # NOTE: the docs say to install it into /lib. If you put it into + # /usr/lib and add it to /etc/ld.so.preload on many systems /usr isn't + # mounted in time :-( (Ben Lutgens) <lamer@gentoo.org> + econf \ + $(use_enable dns socksdns) \ + $(use_enable envconf) \ + $(use_enable server-lookups hostnames) \ + --with-conf=/etc/socks/tsocks.conf \ + --libdir=/$(get_libdir) +} + +src_compile() { + # Fix QA notice lack of SONAME + emake DYNLIB_FLAGS=-Wl,--soname,libtsocks.so.${PV/_beta*} +} + +src_install() { + emake DESTDIR="${D}" install + newbin validateconf tsocks-validateconf + newbin saveme tsocks-saveme + dobin inspectsocks + insinto /etc/socks + doins tsocks.conf.*.example + dodoc FAQ + use tordns && dodoc README* +} + +pkg_postinst() { + einfo "Make sure you create /etc/socks/tsocks.conf from one of the examples in that directory" + einfo "The following executables have been renamed:" + einfo " /usr/bin/saveme renamed to tsocks-saveme" + einfo " /usr/bin/validateconf renamed to tsocks-validateconf" +} |