diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2012-03-23 01:00:32 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2012-03-23 01:00:32 +0000 |
commit | c72d97a4ca1a981805bdebf78d0b99b32786a62c (patch) | |
tree | fb88a2e15c34a859ad851a24d8f507eee5d72f60 /net-misc | |
parent | Version bump fixes bug #408377 (diff) | |
download | historical-c72d97a4ca1a981805bdebf78d0b99b32786a62c.tar.gz historical-c72d97a4ca1a981805bdebf78d0b99b32786a62c.tar.bz2 historical-c72d97a4ca1a981805bdebf78d0b99b32786a62c.zip |
Add patch to fix bug #376621
Package-Manager: portage-2.1.10.49/cvs/Linux x86_64
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/tor/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/tor/Manifest | 10 | ||||
-rw-r--r-- | net-misc/tor/files/tor-0.2.3.12_alpha-fix-miniupnpc-1.6.patch | 99 | ||||
-rw-r--r-- | net-misc/tor/tor-0.2.3.12_alpha-r2.ebuild | 87 |
4 files changed, 200 insertions, 5 deletions
diff --git a/net-misc/tor/ChangeLog b/net-misc/tor/ChangeLog index 5f919d2f1a40..a1cc2359932e 100644 --- a/net-misc/tor/ChangeLog +++ b/net-misc/tor/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/tor # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.322 2012/03/08 16:14:22 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.323 2012/03/23 01:00:31 blueness Exp $ + +*tor-0.2.3.12_alpha-r2 (23 Mar 2012) + + 23 Mar 2012; Anthony G. Basile <blueness@gentoo.org> + +tor-0.2.3.12_alpha-r2.ebuild, + +files/tor-0.2.3.12_alpha-fix-miniupnpc-1.6.patch: + Add patch to fix bug #376621 08 Mar 2012; Anthony G. Basile <blueness@gentoo.org> tor-0.2.2.35-r1.ebuild, tor-0.2.3.12_alpha-r1.ebuild: diff --git a/net-misc/tor/Manifest b/net-misc/tor/Manifest index 5dec9f87e44d..b8442aa086b4 100644 --- a/net-misc/tor/Manifest +++ b/net-misc/tor/Manifest @@ -4,6 +4,7 @@ Hash: SHA256 AUX tor-0.2.1.30-respect-CFLAGS.patch 1626 RMD160 6cf173c52d0db4b2ca8eca724e484f53bd93431c SHA1 a702160c6cf577ead6da53f24875b324e02e8821 SHA256 91952c032232577c3a8a3e9e00b1f46623d0cfe1b05f28285e27fd1d1106e776 AUX tor-0.2.2.24_alpha-respect-CFLAGS.patch 1001 RMD160 f623fd1f40cd2175c0c5b6bea3441fc87f7e8d0a SHA1 c8634481cd8273f98945f17f297f2506331d3b8d SHA256 2107434c7e7243d24043cf87eeccf60643e0cf94e8a883ebd725c23e13e667e8 AUX tor-0.2.3.11_alpha-fix-tor-fw-helper-natpmp.patch 772 RMD160 74d92ed8018367b9a1b054c47eb8ddd07effc0ac SHA1 d271d6a3f8d0fa290c304cf0af4c9760cab4b232 SHA256 d96d6c3bcf3e8457ba6f1f5f9533b4f9f4ac14576530c5e87588dbb3d416ea2b +AUX tor-0.2.3.12_alpha-fix-miniupnpc-1.6.patch 4361 RMD160 d0f75a53155bf2efb3252c111fee3e7a59811fc6 SHA1 82071da7a643b3e0e8f454f13900cebb50b13639 SHA256 02c78146f6140c24b86c1bbe3ebbd74cb8624ce7bcc638e3d9c34345140d595f AUX tor-0.2.3.12_alpha-fix-tor-fw-helper-natpmp.patch 414 RMD160 03a9a68b76ae280197f2ba65d0cde665c4cbd518 SHA1 1789623619698512fef9a5fd8d3169111cce7772 SHA256 7db246ed6374a5051518ffba3d29853619358ebf5ad87005e7a6ba4417d40e37 AUX tor.confd 44 RMD160 d19946be72538d0826667730e9e9a1736b0385ff SHA1 f9a40fadd018794e537282344f01c609e4dbeac7 SHA256 41d780f291847e19f632428bbf27c3f289414afd237546d2974da1b75384c25c AUX tor.initd-r6 1627 RMD160 2af137e60ce41bdca06bb254768808f468bbafc4 SHA1 20f2f3af059a98ba0c0880b3eb7c94c77f09d922 SHA256 49da1b5f267927023bc092adcf89d406ec294584039d6bca6b7aea0a9e7c4c4f @@ -16,12 +17,13 @@ EBUILD tor-0.2.1.32.ebuild 1871 RMD160 daca848537e3250c73f0040b8285ff7e6197dce5 EBUILD tor-0.2.2.35-r1.ebuild 2125 RMD160 532bdc4fa348c24addac51c91547eb3ac90180da SHA1 b73b0bc09b3ecfaf429ee30eb26bf9a03009001c SHA256 cf5daaa2db12c5ec32f837412725919fb398e1c8bbef0788c98eed35de365ec4 EBUILD tor-0.2.2.35.ebuild 2084 RMD160 320d0efbc050065e19f1e5f6538ae50bed45caec SHA1 45a7ee02a309f55edd46c346ec45ca8f90efdb3c SHA256 2048e4950cbf4c5e3a72bb0ba3838b48824ed8cb78073fd91e2ef210882625dc EBUILD tor-0.2.3.12_alpha-r1.ebuild 2336 RMD160 dfb8fef2c9173e21550dcbaa25fc944548134fed SHA1 faaf308c51c65607fc14cf785ec6e1b2f147ee6b SHA256 18e54791ec4993e28cb8b563e8e8a79bd31f7f806da86dfbe54f99bd59bc26e1 -MISC ChangeLog 47850 RMD160 be427c2b51120cb9790cf6bf248d8eed8f93b877 SHA1 defd75e61cf539098e2f4cb1b0bba4a081428164 SHA256 6d2bd57c5043dc6dac82959c4748dade37d3621d836f0d5ebd806b3c3e8cd5df +EBUILD tor-0.2.3.12_alpha-r2.ebuild 2405 RMD160 cb0e6cc62deeafb6ad9f7b83d3c488c420f1c770 SHA1 0021da3d88374ff592ad2509c51ba4e8c76271ed SHA256 f223aca912a6f8ed69b6801b3cacd6eb1e1c89fd85edc2ed01f6ed76e1620f73 +MISC ChangeLog 48061 RMD160 a94387b8543836aabd2556a2f3c6f1f392ea9daa SHA1 4ba49700af7f362f2f92c1aae9e526ca63a5c410 SHA256 a392d73c337474bb5078212b9ab1d313b154f6bafeca67e62de404fa87127907 MISC metadata.xml 596 RMD160 2527172185bb74e5ea6167d56b2e3476c48eb078 SHA1 93be4ae496f77aa63bb77d720f51bf3510798daa SHA256 c7622b255363171fd1b351e14e592beb901d332f976a2e77c409e14ef5ed20bc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEAREIAAYFAk9Y2usACgkQl5yvQNBFVTX4FQCfbzWGufs/+OndgMQLMlLMISej -8W4AnjLAx6IYwoOlYDZ+xeDtLwCxQH6+ -=xgH4 +iEYEAREIAAYFAk9ryzoACgkQl5yvQNBFVTXADgCfbZhMzMWlY1U/ybrBYLOCzaAF +CKAAn1p6Hs/KLQH96PIeyQo0pOIQlI6+ +=xLkA -----END PGP SIGNATURE----- diff --git a/net-misc/tor/files/tor-0.2.3.12_alpha-fix-miniupnpc-1.6.patch b/net-misc/tor/files/tor-0.2.3.12_alpha-fix-miniupnpc-1.6.patch new file mode 100644 index 000000000000..b3b1be263c19 --- /dev/null +++ b/net-misc/tor/files/tor-0.2.3.12_alpha-fix-miniupnpc-1.6.patch @@ -0,0 +1,99 @@ +From cc6282b77e6f1284d1381e02511720ae2adc7c96 Mon Sep 17 00:00:00 2001 +From: Anthony G. Basile <blueness@gentoo.org> +Date: Thu, 22 Mar 2012 12:09:40 -0400 +Subject: [PATCH] Fix compile error against miniupnpc-1.6 when --enable-upnp + +The bump from miniupnpc-1.5 to 1.6 changes the definition of +two functions used by tor-fw-helper-upnp.c, upnpDiscover() and +UPNP_AddPortMapping(). This patch addresses this and adds a +check in configure.in for backwards compatibility. + +Thanks to Nickolay Kolchin-Semyonov for some hints. + +X-Tor-Bug-URL: https://trac.torproject.org/projects/tor/ticket/5434 +X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=376621 +Signed-off-by: Anthony G. Basile <blueness@gentoo.org> +--- + configure.in | 37 +++++++++++++++++++------ + src/tools/tor-fw-helper/tor-fw-helper-upnp.c | 8 +++++ + 2 files changed, 36 insertions(+), 9 deletions(-) + +diff --git a/configure.in b/configure.in +index 7415ce8..946f780 100644 +--- a/configure.in ++++ b/configure.in +@@ -592,15 +592,34 @@ dnl There are no packages for Debian or Redhat as of this patch + + if test "$upnp" = "true"; then + AC_DEFINE(MINIUPNPC, 1, [Define to 1 if we are building with UPnP.]) +- TOR_SEARCH_LIBRARY(libminiupnpc, $trylibminiupnpcdir, [-lminiupnpc $TOR_LIB_WS32 $TOR_LIB_IPHLPAPI], +- [#include <miniupnpc/miniwget.h> +- #include <miniupnpc/miniupnpc.h> +- #include <miniupnpc/upnpcommands.h>], +- [void upnpDiscover(int delay, const char * multicastif, +- const char * minissdpdsock, int sameport);], +- [upnpDiscover(1, 0, 0, 0); exit(0);], +- [--with-libminiupnpc-dir], +- [/usr/lib/]) ++ ++ dnl Before we call TOR_SEARCH_LIBRARY we'll do a quick compile test ++ dnl to see if we have miniupnpc-1.5 or -1.6 ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <miniupnpc/miniupnpc.h>], ++ [upnpDiscover(1, 0, 0, 0);exit(0);])],[miniupnpc15="true"],[miniupnpc15="false"]) ++ ++ if test "$miniupnpc15" = "true" ; then ++ AC_DEFINE([MINIUPNPC15],[1],[libminiupnpc version 1.5 found]) ++ TOR_SEARCH_LIBRARY(libminiupnpc, $trylibminiupnpcdir, [-lminiupnpc $TOR_LIB_WS32 $TOR_LIB_IPHLPAPI], ++ [#include <miniupnpc/miniwget.h> ++ #include <miniupnpc/miniupnpc.h> ++ #include <miniupnpc/upnpcommands.h>], ++ [void upnpDiscover(int delay, const char * multicastif, ++ const char * minissdpdsock, int sameport);], ++ [upnpDiscover(1, 0, 0, 0); exit(0);], ++ [--with-libminiupnpc-dir], ++ [/usr/lib/]) ++ else ++ TOR_SEARCH_LIBRARY(libminiupnpc, $trylibminiupnpcdir, [-lminiupnpc $TOR_LIB_WS32 $TOR_LIB_IPHLPAPI], ++ [#include <miniupnpc/miniwget.h> ++ #include <miniupnpc/miniupnpc.h> ++ #include <miniupnpc/upnpcommands.h>], ++ [void upnpDiscover(int delay, const char * multicastif, ++ const char * minissdpdsock, int sameport, int ipv6, int * error);], ++ [upnpDiscover(1, 0, 0, 0, 0, 0); exit(0);], ++ [--with-libminiupnpc-dir], ++ [/usr/lib/]) ++ fi + fi + + AC_SYS_LARGEFILE +diff --git a/src/tools/tor-fw-helper/tor-fw-helper-upnp.c b/src/tools/tor-fw-helper/tor-fw-helper-upnp.c +index 442eae5..ee56f71 100644 +--- a/src/tools/tor-fw-helper/tor-fw-helper-upnp.c ++++ b/src/tools/tor-fw-helper/tor-fw-helper-upnp.c +@@ -78,7 +78,11 @@ tor_upnp_init(tor_fw_options_t *options, void *backend_state) + memset(&(state->data), 0, sizeof(struct IGDdatas)); + state->init = 0; + ++#ifdef MINIUPNPC15 + devlist = upnpDiscover(UPNP_DISCOVER_TIMEOUT, NULL, NULL, 0); ++#else ++ devlist = upnpDiscover(UPNP_DISCOVER_TIMEOUT, NULL, NULL, 0, 0, NULL); ++#endif + if (NULL == devlist) { + fprintf(stderr, "E: upnpDiscover returned: NULL\n"); + return UPNP_ERR_NODEVICESFOUND; +@@ -178,7 +182,11 @@ tor_upnp_add_tcp_mapping(tor_fw_options_t *options, void *backend_state) + r = UPNP_AddPortMapping(state->urls.controlURL, + state->data.first.servicetype, + external_port_str, internal_port_str, ++#ifdef MINIUPNPC15 + state->lanaddr, UPNP_DESC, "TCP", 0); ++#else ++ state->lanaddr, UPNP_DESC, "TCP", 0, 0); ++#endif + if (r != UPNPCOMMAND_SUCCESS) + return UPNP_ERR_ADDPORTMAPPING; + +-- +1.7.3.4 + diff --git a/net-misc/tor/tor-0.2.3.12_alpha-r2.ebuild b/net-misc/tor/tor-0.2.3.12_alpha-r2.ebuild new file mode 100644 index 000000000000..4fe4c4d84eb3 --- /dev/null +++ b/net-misc/tor/tor-0.2.3.12_alpha-r2.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/tor-0.2.3.12_alpha-r2.ebuild,v 1.1 2012/03/23 01:00:31 blueness Exp $ + +EAPI="4" + +inherit eutils flag-o-matic versionator autotools + +MY_PV="$(replace_version_separator 4 -)" +MY_PF="${PN}-${MY_PV}" +DESCRIPTION="Anonymizing overlay network for TCP" +HOMEPAGE="http://www.torproject.org/" +SRC_URI="http://www.torproject.org/dist/${MY_PF}.tar.gz" +S="${WORKDIR}/${MY_PF}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="+bufferevents nat-pmp tor-hardening transparent-proxy threads upnp selinux" + +DEPEND="dev-libs/openssl + >=dev-libs/libevent-2.0.14 + nat-pmp? ( net-libs/libnatpmp ) + upnp? ( net-libs/miniupnpc ) + selinux? ( sec-policy/selinux-tor )" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup tor + enewuser tor -1 -1 /var/lib/tor tor +} + +src_prepare() { + epatch "${FILESDIR}"/torrc.sample.patch + epatch "${FILESDIR}"/${P}-fix-tor-fw-helper-natpmp.patch + epatch "${FILESDIR}"/${P}-fix-miniupnpc-1.6.patch + eautoreconf +} + +src_configure() { + # Upstream isn't sure of all the user provided CFLAGS that + # will break tor, but does recommend against -fstrict-aliasing. + # We'll filter-flags them here as we encounter them. + filter-flags -fstrict-aliasing + econf \ + --enable-asciidoc \ + --docdir=/usr/share/doc/${PF} \ + $(use_enable bufferevents) \ + $(use_enable nat-pmp) \ + $(use_enable tor-hardening gcc-hardening) \ + $(use_enable tor-hardening linker-hardening) \ + $(use_enable transparent-proxy transparent) \ + $(use_enable threads) \ + $(use_enable upnp) +} + +src_install() { + newconfd "${FILESDIR}"/tor.confd tor + newinitd "${FILESDIR}"/tor.initd-r6 tor + + emake DESTDIR="${D}" install + + keepdir /var/lib/tor + + dodoc README ChangeLog ReleaseNotes \ + doc/{HACKING,TODO} \ + doc/spec/README + + fperms 750 /var/lib/tor + fowners tor:tor /var/lib/tor + + insinto /etc/tor/ + newins "${FILESDIR}"/torrc-r1 torrc +} + +pkg_postinst() { + elog + elog "We created a configuration file for tor, /etc/tor/torrc, but you can" + elog "change it according to your needs. Use the torrc.sample that is in" + elog "that directory as a guide. Also, to have privoxy work with tor" + elog "just add the following line" + elog + elog "forward-socks4a / localhost:9050 ." + elog + elog "to /etc/privoxy/config. Notice the . at the end!" + elog +} |