From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Rywbu-00020Q-PU for garchives@archives.gentoo.org; Sun, 19 Feb 2012 02:34:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 499CEE0BED; Sun, 19 Feb 2012 02:34:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 01394E0BED for ; Sun, 19 Feb 2012 02:34:35 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3D77C1B4020 for ; Sun, 19 Feb 2012 02:34:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 5997FE5400 for ; Sun, 19 Feb 2012 02:34:33 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1329618862.651111ac72109701d4c7562a4db6b9337449e755.blueness@gentoo> Subject: [gentoo-commits] dev/blueness:master commit in: net-proxy/torsocks/, net-proxy/torsocks/files/ X-VCS-Repository: dev/blueness X-VCS-Files: net-proxy/torsocks/ChangeLog net-proxy/torsocks/Manifest net-proxy/torsocks/files/fix-docdir.patch net-proxy/torsocks/files/fix-error-message.patch net-proxy/torsocks/files/fix-symbol-notfound.patch net-proxy/torsocks/metadata.xml net-proxy/torsocks/torsocks-1.2-r3.ebuild X-VCS-Directories: net-proxy/torsocks/ net-proxy/torsocks/files/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 651111ac72109701d4c7562a4db6b9337449e755 X-VCS-Branch: master Date: Sun, 19 Feb 2012 02:34:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 7bc3f4d5-eceb-4399-9f7c-ef2922fddc64 X-Archives-Hash: dfbb44f085bf3b2d5f8bafc22ac124db commit: 651111ac72109701d4c7562a4db6b9337449e755 Author: Anthony G. Basile gentoo org> AuthorDate: Sun Feb 19 02:34:22 2012 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sun Feb 19 02:34:22 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/blueness.git;a= =3Dcommit;h=3D651111ac Testing debian patch for bug #395953 (Portage version: 2.1.10.44/git/Linux x86_64, signed Manifest commit with= key 0xD0455535) --- net-proxy/torsocks/ChangeLog | 12 +++ net-proxy/torsocks/Manifest | 17 ++++ net-proxy/torsocks/files/fix-docdir.patch | 24 +++++ net-proxy/torsocks/files/fix-error-message.patch | 65 +++++++++++++ net-proxy/torsocks/files/fix-symbol-notfound.patch | 102 ++++++++++++++= ++++++ net-proxy/torsocks/metadata.xml | 8 ++ net-proxy/torsocks/torsocks-1.2-r3.ebuild | 42 ++++++++ 7 files changed, 270 insertions(+), 0 deletions(-) diff --git a/net-proxy/torsocks/ChangeLog b/net-proxy/torsocks/ChangeLog new file mode 100644 index 0000000..436bfa7 --- /dev/null +++ b/net-proxy/torsocks/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for net-proxy/torsocks +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*torsocks-1.2-r3 (19 Feb 2012) + + 19 Feb 2012; Anthony G. Basile +torsocks-1.2-r3.= ebuild, + +files/fix-docdir.patch, +files/fix-error-message.patch, + +files/fix-symbol-notfound.patch, +metadata.xml: + Testing patch from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D= 636943 + to address https://bugs.gentoo.org/show_bug.cgi?id=3D395953 + diff --git a/net-proxy/torsocks/Manifest b/net-proxy/torsocks/Manifest new file mode 100644 index 0000000..a479d90 --- /dev/null +++ b/net-proxy/torsocks/Manifest @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX fix-docdir.patch 1245 RMD160 e2b79f7a841a31504e49c89306a957a586831fe= c SHA1 1cb59c1e7f60983de5279f3b8b56d6da0d115ddf SHA256 0f5e2a84b1c7789390= 2a35f2df5575087558822536bd64335c543f91d4bb70f0 +AUX fix-error-message.patch 1665 RMD160 e20d349b9c294901ef8b6b0b6b4d8e51= d14585dd SHA1 ee5c3b59cb5395e63a33b46a15578958f873f2b8 SHA256 b4e9e7c541f= 3eede2719d1b789db3702393372d9173b1f3b68c4083b5067b2d4 +AUX fix-symbol-notfound.patch 5178 RMD160 dc1d6a5216c3ccbe0d2c8576d75a50= 4461b79a77 SHA1 fb985537c893847f51dab152bf06f6392ed97794 SHA256 469b2d312= 9de3ab2e5e4f6ec9826191dd6767d1413e75dc282a5a227177f44aa +DIST torsocks-1.2.tar.gz 456453 RMD160 eb4b16833c5f7a09424d7acb9993c6dd0= 4f8a8d0 SHA1 b8afeb217db299892a628e28f2327a1d2697f9ad SHA256 bea57d3624d7= 23724fd1e260f0e6b2a354c0da742c023aa994c7692270d111d4 +EBUILD torsocks-1.2-r3.ebuild 1030 RMD160 f27054136b2ee29738bbed216a3518= ccd0085320 SHA1 2d1a19f85f4a9cfe02a56b42cd1331586e05d253 SHA256 6ef846f05= 372075ad47c8a0ac7b658afd4f30d919c2c9af7b5e2e85f16733cba +MISC ChangeLog 479 RMD160 cc0bc4331ce62d22ec920e5d5fabdfe85a5e798d SHA1 = 4b247ad727381ee26bebc2eeb410d7d92953c707 SHA256 a972d12e6694ca1b1dd198bdb= 6657e5a3c0b2dd64329e56c45e1a4512a10856c +MISC metadata.xml 238 RMD160 6401efde1642c40e91d5a41a966b9dbff0512eab SH= A1 9751c07b46aec3d4f96133758cdd23a3e2ca2835 SHA256 f13e6e7b65d20beb9ae945= d520160ef0dba80c1965754958945904d7e3c0a75f +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iEYEAREIAAYFAk9AX64ACgkQl5yvQNBFVTURkgCeKE1N6boL3Qp5wjEJzmE9qqfa +Hc4Anjj2FIPQlpDy6YZdP8Yay5QtLnHG +=3DFOlX +-----END PGP SIGNATURE----- diff --git a/net-proxy/torsocks/files/fix-docdir.patch b/net-proxy/torsoc= ks/files/fix-docdir.patch new file mode 100644 index 0000000..899c15b --- /dev/null +++ b/net-proxy/torsocks/files/fix-docdir.patch @@ -0,0 +1,24 @@ +diff -Naur torsocks-1.2.orig/doc/Makefile.am torsocks-1.2/doc/Makefile.a= m +--- torsocks-1.2.orig/doc/Makefile.am 2011-10-26 14:30:26.000000000 -040= 0 ++++ torsocks-1.2/doc/Makefile.am 2011-12-26 20:05:40.000000000 -0500 +@@ -7,8 +7,6 @@ + # Install man pages + dist_man_MANS =3D torsocks.1 torsocks.8 usewithtor.1 torsocks.conf.5 +=20 +-dist_data_DATA =3D socks/SOCKS5 socks/SOCKS4.protocol socks/socks-exten= sions.txt \ +- patches/compilewarnings.patch patches/conffile.patch p= atches/getaddrbyhost.patch \ +- patches/getpeername.patch patches/infiniteloop.patch p= atches/localaddresses.patch \ +- patches/README patches/README.TORDNS patches/tordns.pa= tch notes/DEBUG ++dist_doc_DATA =3D socks/SOCKS5 socks/SOCKS4.protocol socks/socks-exten= sions.txt \ ++ notes/DEBUG +=20 +diff -Naur torsocks-1.2.orig/test/Makefile.am torsocks-1.2/test/Makefile= .am +--- torsocks-1.2.orig/test/Makefile.am 2011-10-26 14:21:57.000000000 -04= 00 ++++ torsocks-1.2/test/Makefile.am 2011-12-26 20:04:34.000000000 -0500 +@@ -4,4 +4,4 @@ + test_torsocks_LDFLAGS=3D $(TESTLDFLAGS) + CLEANFILES=3D test_torsocks +=20 +-dist_data_DATA =3D run_tests.sh expectedresults.txt +\ No newline at end of file ++dist_doc_DATA =3D run_tests.sh expectedresults.txt diff --git a/net-proxy/torsocks/files/fix-error-message.patch b/net-proxy= /torsocks/files/fix-error-message.patch new file mode 100644 index 0000000..3458106 --- /dev/null +++ b/net-proxy/torsocks/files/fix-error-message.patch @@ -0,0 +1,65 @@ +From: intrigeri +Date: Mon, 30 Jan 2012 17:55:42 +0100 +Subject: Display correct error message when the wrapped program cannot b= e + found in $PATH. + +--- + src/torsocks.in | 9 ++++++++- + src/usewithtor.in | 9 ++++++++- + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/src/torsocks.in b/src/torsocks.in +index 53db2fc..678f854 100755 +--- a/src/torsocks.in ++++ b/src/torsocks.in +@@ -63,6 +63,11 @@ + # Tamas Szerb + # Modified by Robert Hogan April 16th 2006 +=20 ++not_found () { ++ echo "ERROR: $1 cannot be found in PATH." >&2 ++ exit 1 ++} ++ + set_id () { + echo "ERROR: $1 is set${2}id. torsocks will not work on a set${2}id= executable." >&2 + exit 1 +@@ -133,7 +138,9 @@ case "$1" in +=20 + if [ $# -gt 0 ] + then +- if [ -u `which "$1"` ]; then ++ if ! which "$1" >/dev/null 2>&1; then ++ not_found $1 ++ elif [ -u `which "$1"` ]; then + set_id $1 u + elif [ -g `which "$1"` ]; then + set_id $1 g +diff --git a/src/usewithtor.in b/src/usewithtor.in +index 0a1e42d..e606760 100644 +--- a/src/usewithtor.in ++++ b/src/usewithtor.in +@@ -42,6 +42,11 @@ usage () { + echo "Usage: $0 [-hv] [...]" + } +=20 ++not_found () { ++ echo "ERROR: $1 cannot be found in PATH." >&2 ++ exit 1 ++} ++ + set_id () { + echo "ERROR: $1 is set${2}id. usewithtor will not work on a set${2}id = executable." >&2 + exit 1 +@@ -68,7 +73,9 @@ while [ "$1" ]; do + esac + done +=20 +-if [ -u `which "$1"` ]; then ++if ! which "$1" >/dev/null 2>&1; then ++ not_found $1 ++elif [ -u `which "$1"` ]; then + set_id $1 u + elif [ -g `which "$1"` ]; then + set_id $1 g +--=20 diff --git a/net-proxy/torsocks/files/fix-symbol-notfound.patch b/net-pro= xy/torsocks/files/fix-symbol-notfound.patch new file mode 100644 index 0000000..18e6c43 --- /dev/null +++ b/net-proxy/torsocks/files/fix-symbol-notfound.patch @@ -0,0 +1,102 @@ +From: intrigeri +Date: Mon, 30 Jan 2012 18:29:47 +0100 +Subject: If a symbol cannot be found, also try by prefixing its name wit= h __. + +Rationale: libresolv is considered as a private interface of eglibc. +Private symbols in there see their names prefixed this way. +Like it or not, we have to go find them using the names they go by with. + +Trying both kind of names maximizes our support of various vendors of th= e libc +and various versions of the glibc (FTR, symbols in there where renamed b= etween +2.0 and 2.3). +--- + src/expansion_table.h | 5 ----- + src/torsocks.c | 20 +++++++++++++------- + 2 files changed, 13 insertions(+), 12 deletions(-) + +diff --git a/src/expansion_table.h b/src/expansion_table.h +index e981f5d..14fabe1 100644 +--- a/src/expansion_table.h ++++ b/src/expansion_table.h +@@ -76,12 +76,7 @@ + /*RES_FUNC (ERR, int, RES_INIT_, res_init, = res_init, "res_init") */ + RES_FUNC (ERR, int, RES_QUERY_, res_query,= res_query, "res_query") + RES_FUNC (ERR, int, RES_SEARCH_, res_search= , res_search, "res_search") +-#if defined(__APPLE__) || defined(__darwin__) + RES_FUNC (ERR, int, RES_SEND_, res_send, = res_send, "res_send") +-#else +-/* It is a bit of a mystery why this is required on Linux. See http://c= ode.google.com/p/torsocks/issues/detail?id=3D3 */ +-RES_FUNC (ERR, int, RES_SEND_, res_send, = res_send, "__res_send") +-#endif + RES_FUNC (ERR, int, RES_QUERYDOMAIN_, res_queryd= omain, res_querydomain, "res_querydomain") +=20 + DNS_FUNC (ERR, struct hostent *, GETHOSTBYNAME_, gethostbyn= ame, gethostbyname, "gethostbyname") +diff --git a/src/torsocks.c b/src/torsocks.c +index f559eec..fcd9d95 100644 +--- a/src/torsocks.c ++++ b/src/torsocks.c +@@ -150,10 +150,11 @@ void torsocks_init(void) + dlerror(); + #ifndef USE_OLD_DLSYM + #ifdef SUPPORT_RES_API +- if ((realres_init =3D dlsym(RTLD_NEXT, "res_init")) =3D=3D NULL) ++ if (((realres_init =3D dlsym(RTLD_NEXT, "res_init")) =3D=3D NULL) &= & ++ ((realres_init =3D dlsym(RTLD_NEXT, "__res_init")) =3D=3D NULL)= ) + LOAD_ERROR("res_init", MSGERR); + #endif +- #define PATCH_TABLE_EXPANSION(e,r,s,n,b,m) if ((real##n =3D dlsym(= RTLD_NEXT, m)) =3D=3D NULL) LOAD_ERROR(m, MSG##e); ++ #define PATCH_TABLE_EXPANSION(e,r,s,n,b,m) if (((real##n =3D dlsym= (RTLD_NEXT, m)) =3D=3D NULL) && ((real##n =3D dlsym(RTLD_NEXT, "__" m)) =3D= =3D NULL)) LOAD_ERROR(m, MSG##e); + #include "expansion_table.h" + #undef PATCH_TABLE_EXPANSION + #else +@@ -856,7 +857,8 @@ int res_init(void) + { + int rc; +=20 +- if (!realres_init && ((realres_init =3D dlsym(RTLD_NEXT, "res_init"= )) =3D=3D NULL)) ++ if (!realres_init && ((realres_init =3D dlsym(RTLD_NEXT, "res_init"= )) =3D=3D NULL) && ++ ((realres_init =3D dlsym(RTLD_NEXT, "__res_ini= t")) =3D=3D NULL)) + LOAD_ERROR("res_init", MSGERR); +=20 + show_msg(MSGTEST, "Got res_init request\n"); +@@ -877,7 +879,8 @@ int EXPAND_GUTS_NAME(res_query)(RES_QUERY_SIGNATURE,= int (*original_res_query)(R + { + int rc; +=20 +- if (!original_res_query && ((original_res_query =3D dlsym(RTLD_NEXT= , "res_query")) =3D=3D NULL)) ++ if (!original_res_query && ((original_res_query =3D dlsym(RTLD_NEXT= , "res_query")) =3D=3D NULL) && ++ ((original_res_query =3D dlsym(RTLD_NEXT= , "__res_query")) =3D=3D NULL)) + LOAD_ERROR("res_query", MSGERR); +=20 + show_msg(MSGTEST, "Got res_query request\n"); +@@ -903,7 +906,8 @@ int EXPAND_GUTS_NAME(res_querydomain)(RES_QUERYDOMAI= N_SIGNATURE, int (*original_ + int rc; +=20 + if (!original_res_querydomain && +- ((original_res_querydomain =3D dlsym(RTLD_NEXT, "res_querydomai= n")) =3D=3D NULL)) ++ ((original_res_querydomain =3D dlsym(RTLD_NEXT, "res_querydomai= n")) =3D=3D NULL) && ++ ((original_res_querydomain =3D dlsym(RTLD_NEXT, "__res_querydom= ain")) =3D=3D NULL)) + LOAD_ERROR("res_querydoimain", MSGERR); +=20 + show_msg(MSGDEBUG, "Got res_querydomain request\n"); +@@ -929,7 +933,8 @@ int EXPAND_GUTS_NAME(res_search)(RES_SEARCH_SIGNATUR= E, int (*original_res_search + int rc; +=20 + if (!original_res_search && +- ((original_res_search =3D dlsym(RTLD_NEXT, "res_search")) =3D=3D= NULL)) ++ ((original_res_search =3D dlsym(RTLD_NEXT, "res_search")) =3D=3D= NULL) && ++ ((original_res_search =3D dlsym(RTLD_NEXT, "__res_search")) =3D= =3D NULL)) + LOAD_ERROR("res_search", MSGERR); +=20 + show_msg(MSGTEST, "Got res_search request\n"); +@@ -954,7 +959,8 @@ int EXPAND_GUTS_NAME(res_send)(RES_SEND_SIGNATURE, i= nt (*original_res_send)(RES_ + { + int rc; +=20 +- if (!original_res_send && ((original_res_send =3D dlsym(RTLD_NEXT, = "res_send")) =3D=3D NULL)) ++ if (!original_res_send && ((original_res_send =3D dlsym(RTLD_NEXT, = "res_send")) =3D=3D NULL) ++ && ((original_res_send =3D dlsym(RTLD_NEXT, = "__res_send")) =3D=3D NULL)) + LOAD_ERROR("res_send", MSGERR); +=20 + show_msg(MSGTEST, "Got res_send request\n"); +--=20 diff --git a/net-proxy/torsocks/metadata.xml b/net-proxy/torsocks/metadat= a.xml new file mode 100644 index 0000000..1e75873 --- /dev/null +++ b/net-proxy/torsocks/metadata.xml @@ -0,0 +1,8 @@ + + + + + blueness@gentoo.org + Anthony G. Basile + + diff --git a/net-proxy/torsocks/torsocks-1.2-r3.ebuild b/net-proxy/torsoc= ks/torsocks-1.2-r3.ebuild new file mode 100644 index 0000000..d119957 --- /dev/null +++ b/net-proxy/torsocks/torsocks-1.2-r3.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/torsocks/torsocks-1.2-r1.eb= uild,v 1.2 2011/12/27 01:53:51 blueness Exp $ + +EAPI=3D"4" + +inherit autotools eutils multilib + +DESCRIPTION=3D"Use most socks-friendly applications with Tor." +HOMEPAGE=3D"http://code.google.com/p/torsocks" +SRC_URI=3D"http://${PN}.googlecode.com/files/${PN}-1.2.tar.gz" + +LICENSE=3D"GPL-2" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" +IUSE=3D"static-libs" + +# We do not depend on tor which might be running on a different box +DEPEND=3D"" +RDEPEND=3D"${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/fix-error-message.patch + epatch "${FILESDIR}"/fix-symbol-notfound.patch + epatch "${FILESDIR}"/fix-docdir.patch + eautoreconf +} + +src_configure() { + econf --docdir=3D/usr/share/doc/${PF} \ + $(use_enable static-libs static) +} + +src_install() { + emake DESTDIR=3D"${D}" install + + dodoc README TODO INSTALL ChangeLog + + #Remove libtool .la files + cd "${D}"/usr/$(get_libdir)/torsocks + rm -f *.la +}