From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/blueness:master commit in: net-proxy/torsocks/, net-proxy/torsocks/files/
Date: Tue, 21 Feb 2012 16:15:55 +0000 (UTC) [thread overview]
Message-ID: <1329840948.cd89804b0360fac77ddeeafcb7325c40ce163506.blueness@gentoo> (raw)
commit: cd89804b0360fac77ddeeafcb7325c40ce163506
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 21 16:15:48 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 16:15:48 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=cd89804b
net-proxy/torsocks: new approach to bug #395953
---
net-proxy/torsocks/Manifest | 15 +--
net-proxy/torsocks/files/fix-error-message.patch | 65 -----------
net-proxy/torsocks/files/fix-symbol-notfound.patch | 118 +++-----------------
net-proxy/torsocks/torsocks-1.2-r3.ebuild | 2 +-
4 files changed, 19 insertions(+), 181 deletions(-)
diff --git a/net-proxy/torsocks/Manifest b/net-proxy/torsocks/Manifest
index a479d90..473a7ff 100644
--- a/net-proxy/torsocks/Manifest
+++ b/net-proxy/torsocks/Manifest
@@ -1,17 +1,6 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
AUX fix-docdir.patch 1245 RMD160 e2b79f7a841a31504e49c89306a957a586831fec SHA1 1cb59c1e7f60983de5279f3b8b56d6da0d115ddf SHA256 0f5e2a84b1c77893902a35f2df5575087558822536bd64335c543f91d4bb70f0
-AUX fix-error-message.patch 1665 RMD160 e20d349b9c294901ef8b6b0b6b4d8e51d14585dd SHA1 ee5c3b59cb5395e63a33b46a15578958f873f2b8 SHA256 b4e9e7c541f3eede2719d1b789db3702393372d9173b1f3b68c4083b5067b2d4
-AUX fix-symbol-notfound.patch 5178 RMD160 dc1d6a5216c3ccbe0d2c8576d75a504461b79a77 SHA1 fb985537c893847f51dab152bf06f6392ed97794 SHA256 469b2d3129de3ab2e5e4f6ec9826191dd6767d1413e75dc282a5a227177f44aa
+AUX fix-symbol-notfound.patch 729 RMD160 afb7e8eb36318081d7696ff37cd3021b54580676 SHA1 421f3b3cb9f44df9918772536238a6d688da73ff SHA256 a5c7646858d2d234d13dab49bbfa8e167db2c3357521e131991fd9771f619ddc
DIST torsocks-1.2.tar.gz 456453 RMD160 eb4b16833c5f7a09424d7acb9993c6dd04f8a8d0 SHA1 b8afeb217db299892a628e28f2327a1d2697f9ad SHA256 bea57d3624d723724fd1e260f0e6b2a354c0da742c023aa994c7692270d111d4
-EBUILD torsocks-1.2-r3.ebuild 1030 RMD160 f27054136b2ee29738bbed216a3518ccd0085320 SHA1 2d1a19f85f4a9cfe02a56b42cd1331586e05d253 SHA256 6ef846f05372075ad47c8a0ac7b658afd4f30d919c2c9af7b5e2e85f16733cba
+EBUILD torsocks-1.2-r3.ebuild 1008 RMD160 10f42dc930cc014fdccb44ee8ce3524959a9bfb3 SHA1 9dce5d9dd40887b7fa7291f5f4fed2c89e2ef3f8 SHA256 79a0331980e75846782eadaed44a6c58af78f7e6b3a489e27f3d1234a6719c8c
MISC ChangeLog 479 RMD160 cc0bc4331ce62d22ec920e5d5fabdfe85a5e798d SHA1 4b247ad727381ee26bebc2eeb410d7d92953c707 SHA256 a972d12e6694ca1b1dd198bdb6657e5a3c0b2dd64329e56c45e1a4512a10856c
MISC metadata.xml 238 RMD160 6401efde1642c40e91d5a41a966b9dbff0512eab SHA1 9751c07b46aec3d4f96133758cdd23a3e2ca2835 SHA256 f13e6e7b65d20beb9ae945d520160ef0dba80c1965754958945904d7e3c0a75f
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
-
-iEYEAREIAAYFAk9AX64ACgkQl5yvQNBFVTURkgCeKE1N6boL3Qp5wjEJzmE9qqfa
-Hc4Anjj2FIPQlpDy6YZdP8Yay5QtLnHG
-=FOlX
------END PGP SIGNATURE-----
diff --git a/net-proxy/torsocks/files/fix-error-message.patch b/net-proxy/torsocks/files/fix-error-message.patch
deleted file mode 100644
index 3458106..0000000
--- a/net-proxy/torsocks/files/fix-error-message.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From: intrigeri <intrigeri@boum.org>
-Date: Mon, 30 Jan 2012 17:55:42 +0100
-Subject: Display correct error message when the wrapped program cannot be
- 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 <toma@rulez.org>
- # Modified by Robert Hogan <robert@roberthogan.net> April 16th 2006
-
-+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
-
- 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] <command> [<options>...]"
- }
-
-+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
-
--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/net-proxy/torsocks/files/fix-symbol-notfound.patch b/net-proxy/torsocks/files/fix-symbol-notfound.patch
index 18e6c43..123adc5 100644
--- a/net-proxy/torsocks/files/fix-symbol-notfound.patch
+++ b/net-proxy/torsocks/files/fix-symbol-notfound.patch
@@ -1,102 +1,16 @@
-From: intrigeri <intrigeri@boum.org>
-Date: Mon, 30 Jan 2012 18:29:47 +0100
-Subject: If a symbol cannot be found, also try by prefixing its name with __.
-
-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 the libc
-and various versions of the glibc (FTR, symbols in there where renamed between
-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://code.google.com/p/torsocks/issues/detail?id=3 */
--RES_FUNC (ERR, int, RES_SEND_, res_send, res_send, "__res_send")
--#endif
- RES_FUNC (ERR, int, RES_QUERYDOMAIN_, res_querydomain, res_querydomain, "res_querydomain")
-
- DNS_FUNC (ERR, struct hostent *, GETHOSTBYNAME_, gethostbyname, 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 = dlsym(RTLD_NEXT, "res_init")) == NULL)
-+ if (((realres_init = dlsym(RTLD_NEXT, "res_init")) == NULL) &&
-+ ((realres_init = dlsym(RTLD_NEXT, "__res_init")) == NULL))
- LOAD_ERROR("res_init", MSGERR);
- #endif
-- #define PATCH_TABLE_EXPANSION(e,r,s,n,b,m) if ((real##n = dlsym(RTLD_NEXT, m)) == NULL) LOAD_ERROR(m, MSG##e);
-+ #define PATCH_TABLE_EXPANSION(e,r,s,n,b,m) if (((real##n = dlsym(RTLD_NEXT, m)) == NULL) && ((real##n = dlsym(RTLD_NEXT, "__" m)) == 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;
-
-- if (!realres_init && ((realres_init = dlsym(RTLD_NEXT, "res_init")) == NULL))
-+ if (!realres_init && ((realres_init = dlsym(RTLD_NEXT, "res_init")) == NULL) &&
-+ ((realres_init = dlsym(RTLD_NEXT, "__res_init")) == NULL))
- LOAD_ERROR("res_init", MSGERR);
-
- 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;
-
-- if (!original_res_query && ((original_res_query = dlsym(RTLD_NEXT, "res_query")) == NULL))
-+ if (!original_res_query && ((original_res_query = dlsym(RTLD_NEXT, "res_query")) == NULL) &&
-+ ((original_res_query = dlsym(RTLD_NEXT, "__res_query")) == NULL))
- LOAD_ERROR("res_query", MSGERR);
-
- show_msg(MSGTEST, "Got res_query request\n");
-@@ -903,7 +906,8 @@ int EXPAND_GUTS_NAME(res_querydomain)(RES_QUERYDOMAIN_SIGNATURE, int (*original_
- int rc;
-
- if (!original_res_querydomain &&
-- ((original_res_querydomain = dlsym(RTLD_NEXT, "res_querydomain")) == NULL))
-+ ((original_res_querydomain = dlsym(RTLD_NEXT, "res_querydomain")) == NULL) &&
-+ ((original_res_querydomain = dlsym(RTLD_NEXT, "__res_querydomain")) == NULL))
- LOAD_ERROR("res_querydoimain", MSGERR);
-
- show_msg(MSGDEBUG, "Got res_querydomain request\n");
-@@ -929,7 +933,8 @@ int EXPAND_GUTS_NAME(res_search)(RES_SEARCH_SIGNATURE, int (*original_res_search
- int rc;
-
- if (!original_res_search &&
-- ((original_res_search = dlsym(RTLD_NEXT, "res_search")) == NULL))
-+ ((original_res_search = dlsym(RTLD_NEXT, "res_search")) == NULL) &&
-+ ((original_res_search = dlsym(RTLD_NEXT, "__res_search")) == NULL))
- LOAD_ERROR("res_search", MSGERR);
-
- show_msg(MSGTEST, "Got res_search request\n");
-@@ -954,7 +959,8 @@ int EXPAND_GUTS_NAME(res_send)(RES_SEND_SIGNATURE, int (*original_res_send)(RES_
- {
- int rc;
-
-- if (!original_res_send && ((original_res_send = dlsym(RTLD_NEXT, "res_send")) == NULL))
-+ if (!original_res_send && ((original_res_send = dlsym(RTLD_NEXT, "res_send")) == NULL)
-+ && ((original_res_send = dlsym(RTLD_NEXT, "__res_send")) == NULL))
- LOAD_ERROR("res_send", MSGERR);
-
- show_msg(MSGTEST, "Got res_send request\n");
---
+diff -Naur torsocks-1.2.orig//src/torsocks.c torsocks-1.2/src/torsocks.c
+--- torsocks-1.2.orig//src/torsocks.c 2011-10-25 17:49:50.000000000 -0400
++++ torsocks-1.2/src/torsocks.c 2012-02-21 11:09:20.000000000 -0500
+@@ -124,9 +124,9 @@
+ #define LOAD_ERROR(s,l) { \
+ const char *error; \
+ error = dlerror(); \
+- show_msg(l, "The symbol %s() was not found in any shared " \
+- "library. The error reported was: %s!\n", s, \
+- (error)?error:"not found"); \
++ if (error)
++ show_msg(l, "The symbol %s() was not found in any shared " \
++ "library. The error reported was: %s!\n", s, error); \
+ dlerror(); \
+ }
+ pthread_mutex_lock(&torsocks_init_mutex);
diff --git a/net-proxy/torsocks/torsocks-1.2-r3.ebuild b/net-proxy/torsocks/torsocks-1.2-r3.ebuild
index d119957..524a66f 100644
--- a/net-proxy/torsocks/torsocks-1.2-r3.ebuild
+++ b/net-proxy/torsocks/torsocks-1.2-r3.ebuild
@@ -20,7 +20,6 @@ DEPEND=""
RDEPEND="${DEPEND}"
src_prepare() {
- epatch "${FILESDIR}"/fix-error-message.patch
epatch "${FILESDIR}"/fix-symbol-notfound.patch
epatch "${FILESDIR}"/fix-docdir.patch
eautoreconf
@@ -28,6 +27,7 @@ src_prepare() {
src_configure() {
econf --docdir=/usr/share/doc/${PF} \
+ --disable-oldmethod \
$(use_enable static-libs static)
}
next reply other threads:[~2012-02-21 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 16:15 Anthony G. Basile [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-08 23:32 [gentoo-commits] dev/blueness:master commit in: net-proxy/torsocks/, net-proxy/torsocks/files/ Anthony G. Basile
2012-02-21 16:26 Anthony G. Basile
2012-02-19 2:34 Anthony G. Basile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1329840948.cd89804b0360fac77ddeeafcb7325c40ce163506.blueness@gentoo \
--to=blueness@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox