diff options
Diffstat (limited to 'net-proxy/tsocks')
-rw-r--r-- | net-proxy/tsocks/Manifest | 11 | ||||
-rw-r--r-- | net-proxy/tsocks/files/tsocks-1.8_beta5-bsd.patch | 22 | ||||
-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 | 19 | ||||
-rw-r--r-- | net-proxy/tsocks/tsocks-1.8_beta5-r8.ebuild | 78 |
8 files changed, 274 insertions, 0 deletions
diff --git a/net-proxy/tsocks/Manifest b/net-proxy/tsocks/Manifest new file mode 100644 index 000000000000..9dec6dde0c6c --- /dev/null +++ b/net-proxy/tsocks/Manifest @@ -0,0 +1,11 @@ +AUX tsocks-1.8_beta5-bsd.patch 932 SHA256 c49851ca7581684788945f0c5cca17536459975b966b65bccb4f0588fc85a42d SHA512 15e126ccc183f4217b4862bb0cb0d5da49c7895b1a51e00ff43fadb3e66cc9f9dc70208672f92c10da438fa4af17506a8dade9517b5eeae29fea171d04b90093 WHIRLPOOL e13fdc6fb62e8ae2b0d55f9869391a8a8127b78f26649e9c99e82b79b5f41328aa62319e738c7c3c0f4d3ee85a320d6e733f34d156ced9ebf26b61163ab0b3a2 +AUX tsocks-1.8_beta5-flags.patch 1339 SHA256 eecc072bad2d620d756b07bf4a22cb82b7afe2b8ddf1bdb691e31525ffb6b9b0 SHA512 a25acc848a7fa29479109a49147d3a1e6332fa90ed00ab5fc0c99ca546e7f7c4d9b45662ba4ece9c03cc970438d86ead79ed64c6d244d76d98d7fc8dde4060bf WHIRLPOOL ab161f58c0086ec7b22c0063f52e479f55515b959fa49578ba716b6361a8e29d508eb5bd870af773a321cec95cb5044ce081a5ff51a70e177e69661458078135 +AUX tsocks-1.8_beta5-ld_preload.patch 1127 SHA256 8b6a28d3b647790464579e416694903acdcf777fbb02ac205114f73084785f15 SHA512 a202c7a2db1f0b98f6fc6bf36ab56906be7b3516726a4ae002916a91b6fc67e6630876eadfb970a91465b3526dc00249f5b9222dd90f96a1b9cdf4f2aff13e22 WHIRLPOOL 621cd32bdfb1315448ae2b021648f2ef55cbf33ba2442f8738a6533f8269587c6b8f569bd12acee352d03be9b72f650213b7ca83e6bb7f41b20a8e7bb6c12643 +AUX tsocks-1.8_beta5-poll.patch 617 SHA256 d203f3199b84749b9149f4a445cba780596c85d4f4d0452f940dd950845c147a SHA512 931a50b2c62c6fead52073dbe8287bfeda807f1c2e6ef3f9a3798cd79754e2fcd06e4d88c49bc0d748ee7a42eca3727503b2c1f261bd994b1a63e5eefac73956 WHIRLPOOL 12b2b4b5f0a2ae81bd1722168a6e589a1f868f919cb9611cdb951988a24a2ff8104e067539b7a765f2df917f9b157573ddcd94598ca85455dc0276d8a962c67b +AUX tsocks-1.8_beta5-rename.patch 3104 SHA256 27f01ad46bb28831b3f1ba9020e61c43da175596b1bc86e7f6de40d82717dc70 SHA512 d9c4b015c9408a455b357718fd40cf07f40430aef45acb1680a939b414e75ccdef43bac6e3d046268990c228aa402e9917dcf08a13d605264925c5766e9f0758 WHIRLPOOL 06cabf563446871f3e10ca4e36e71f2a15c7902dbe007bbf53dd8aaf067debac4493ee23ed738e12ca5733c0b0a0809e09388c6936664593dec90ece69a38f46 +DIST tsocks-1.8b5-tordns1-gentoo-r3.patch.xz 18468 SHA256 4b25f473ef08ce698bd12a92d65b3e6dffb706ec76289db8d5b75fac0bca16f8 SHA512 86cbc7a8733e9f9e19e0924d2a2b8481a66eb67a8d548b90c7bd02cc6ae42064a295ee6a002cf19a7b3d7d811388db2a34b641d9dbe239f4c0bc8a1f78c90682 WHIRLPOOL 5a4228be84b4797121b8deaf52c1030ea2d6716694f14602a473deca4919753abe5df9608e28056dcaecb8e57bbb0b5a290b7bcdacbda17fdc12df08a0f29fcb +DIST tsocks-1.8beta5.tar.gz 83928 SHA256 849d7ef5af80d03e76cc05ed9fb8fa2bcc2b724b51ebfd1b6be11c7863f5b347 SHA512 b41636ea6b77abf0d1e3cda7bbca4e7ee96f3cdb1843f3a2c530650931e5567f67921de67b28ba9bab0f51df39770a3f7fb458cf7ac78aad7aa861923df2c4a9 WHIRLPOOL 9b50f66d63c870a37111450d76ea027fab79ecc4f62be8d6fab380f9fbfa6d1573f8bad5afe284571de3ee557460454826967449518d7665a80f563a2cfe5151 +EBUILD tsocks-1.8_beta5-r8.ebuild 2231 SHA256 9344536f086ce3208c837bbac1194bf5843a8cc844373b9e65902c3ec7670a73 SHA512 8805ced695c03c23bd908e0ad427596804461ca32f1a4183748d968c517b1d56ffd0e4b9fa0d985425943bdbdedd3b03f2c5af99e8f6ef050200447d446f19c6 WHIRLPOOL 5b612da49efe06405af0981f41971b83ea59f80dd4072f0d2367c100fdfa5e3adb243c7a28d12031cb6cf06d586e25b33fb9c667397a8b6103589cb115b28ed2 +MISC ChangeLog 2519 SHA256 bbac6965a694afcf863ee141235da0a810f99da3cc90d201a4f44ff946dfc7b3 SHA512 5fa6c72ec3f375931ec99712dde304c0dcb88c6794bb1eb4dd251d281c23b6dba3ea511fe8df200d9b11e06ae7cfd23be5f37509156a468b7ce0dd43356b6e7a WHIRLPOOL 698ba0fd3838a9b2b1905488e9143ba63b62233d09659df799c9d202f98c1dd29abdc17569e556e7da4c478a7b09a7e97eda6ea65ef86b2bc49b18dedf027484 +MISC ChangeLog-2015 8298 SHA256 5452df0f4d861215039a7750333541fb27b2d87bf7952eb889cb196cc5205345 SHA512 7dc91c97550c53572b7e6e7134dd27c977ed11b3bbe4e308047083a84cce9c176486f7845c6873126093de0fe37a268c875c73c2c1b0b1d600b6027364b16fa2 WHIRLPOOL c0ab9af28b6b1a95add9f475709a400da056ad3b5fed1be3ee62c2d92656df8a092d1878657e55d93cc57e8cfec1a97123981eb57fd6184ebd5afb2b33b9202f +MISC metadata.xml 981 SHA256 e90c0f342c391e516ee75fb1bae7cdecb1dbf6151b81bb956462adf838a5da8c SHA512 483a93183cdedf77df2dbefff201c35d36f755969e28c6fefc6a44cfb56b0464ed78dfa7100ccbb3519a8ae30322c1346fb0d4cf2b1cbfa79dded237aff22d73 WHIRLPOOL 69be4cc07cea707401821f18f724c08976cb870ea8c51f78af8f08f29655255a7b46ca78afcd46240daede1669aeb55a9938f397eedeb2d59f61fe8cbc0ab6ef diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-bsd.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-bsd.patch new file mode 100644 index 000000000000..e003475da5a3 --- /dev/null +++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-bsd.patch @@ -0,0 +1,22 @@ +Index: tsocks-1.8/configure.in +=================================================================== +--- tsocks-1.8.orig/configure.in ++++ tsocks-1.8/configure.in +@@ -122,7 +122,7 @@ LIBS= + + dnl Checks for libraries. + dnl Replace `main' with a function in -ldl: +-AC_CHECK_LIB(dl, dlsym,,AC_MSG_ERROR("libdl is required")) ++AC_CHECK_FUNC([dlsym], [], [AC_CHECK_LIB(dl, dlsym,,AC_MSG_ERROR("libdl is required"))]) + + dnl If we're using gcc here define _GNU_SOURCE + AC_MSG_CHECKING("for RTLD_NEXT from dlfcn.h") +@@ -312,7 +312,7 @@ AC_DEFINE_UNQUOTED(CLOSE_SIGNATURE, [${P + dnl Find the correct poll prototype on this machine + AC_MSG_CHECKING(for correct poll prototype) + PROTO= +-for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout' ++for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout' 'struct pollfd ufds[[]], nfds_t nfds, int timeout' + do + if test "${PROTO}" = ""; then + AC_TRY_COMPILE([ 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 new file mode 100644 index 000000000000..09598a26d525 --- /dev/null +++ b/net-proxy/tsocks/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bircoph@gentoo.org</email> + </maintainer> + <longdescription>tsocks' role is to allow 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.</longdescription> + <use> + <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> + <upstream> + <remote-id type="sourceforge">tsocks</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-proxy/tsocks/tsocks-1.8_beta5-r8.ebuild b/net-proxy/tsocks/tsocks-1.8_beta5-r8.ebuild new file mode 100644 index 000000000000..e6d4d3170977 --- /dev/null +++ b/net-proxy/tsocks/tsocks-1.8_beta5-r8.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit autotools eutils multilib multilib-minimal toolchain-funcs + +DESCRIPTION="Transparent SOCKS v4 proxying library" +HOMEPAGE="http://tsocks.sourceforge.net/" +SRC_URI="mirror://sourceforge/tsocks/${PN}-${PV/_}.tar.gz + tordns? ( https://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" + + mv configure.in configure.ac || die + eautoreconf + multilib_copy_sources +} + +multilib_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="${EPREFIX}"/etc/socks/tsocks.conf \ + --libdir="${EPREFIX}"/$(get_libdir) +} + +multilib_src_compile() { + # Fix QA notice lack of SONAME + emake DYNLIB_FLAGS=-Wl,--soname,libtsocks.so.${PV/_beta*} +} + +multilib_src_install() { + emake DESTDIR="${D}" install + if multilib_is_native_abi; then + newbin validateconf tsocks-validateconf + newbin saveme tsocks-saveme + dobin inspectsocks + insinto /etc/socks + doins tsocks.conf.*.example + dodoc FAQ + use tordns && dodoc README* + fi +} + +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" +} |