From f05d9b6243d4197ef9c35f080e55c0e448cba511 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Thu, 3 Nov 2011 21:44:47 +0000 Subject: [PATCH] Patch to fix crash of directory servers if geoip data is not present Package-Manager: portage-2.1.10.11/cvs/Linux x86_64 --- net-misc/tor/ChangeLog | 8 +- net-misc/tor/Manifest | 12 +-- ...2.2.34_disable-stats-requiring-geoip.patch | 33 ++++++++ net-misc/tor/tor-0.2.2.34-r1.ebuild | 80 +++++++++++++++++++ 4 files changed, 127 insertions(+), 6 deletions(-) create mode 100644 net-misc/tor/files/tor-0.2.2.34_disable-stats-requiring-geoip.patch create mode 100644 net-misc/tor/tor-0.2.2.34-r1.ebuild diff --git a/net-misc/tor/ChangeLog b/net-misc/tor/ChangeLog index 6df2afc37387..fcdccd3b0033 100644 --- a/net-misc/tor/ChangeLog +++ b/net-misc/tor/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/tor # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.289 2011/11/02 14:50:01 phajdan.jr Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.290 2011/11/03 21:44:47 blueness Exp $ + +*tor-0.2.2.34-r1 (03 Nov 2011) + + 03 Nov 2011; Anthony G. Basile +tor-0.2.2.34-r1.ebuild, + +files/tor-0.2.2.34_disable-stats-requiring-geoip.patch: + Patch to fix crash of directory servers if geoip data is not present 02 Nov 2011; Pawel Hajdan jr tor-0.2.2.34.ebuild: x86 stable wrt bug #388769 diff --git a/net-misc/tor/Manifest b/net-misc/tor/Manifest index bfe5006c85c3..4c4e499129da 100644 --- a/net-misc/tor/Manifest +++ b/net-misc/tor/Manifest @@ -1,9 +1,10 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 +Hash: SHA256 AUX tor-0.2.1.19-logrotate.patch 746 RMD160 34ae926877e1b388c5e1c3cf0a16feba8b3f010b SHA1 3df06da077694b2312cc33a76db4a9e27a602d78 SHA256 60370cb70e089f4e675f39610c651537d0df5e5d1066c36417f479738549bec3 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.2.34_disable-stats-requiring-geoip.patch 1346 RMD160 6743fe26f480426ee74eb4255e35b2df1e594803 SHA1 9c1fb464e8ef974add26f9f68e2bd58a3af3d78c SHA256 9042eeada2837de284463225e8d2a471c7fac1b26b0ba8fac125d2556a7e561a AUX tor.conf 89 RMD160 3ed95351d715ed05db3baa3dd8802832cb06989f SHA1 ec2a2cb216c35e37803b29a508d0914639a7f82b SHA256 3ed15ecce5c312fb4d50e0e8f3a645d67c660e2930a9dbadf010803b8fd095a0 AUX tor.confd 44 RMD160 d19946be72538d0826667730e9e9a1736b0385ff SHA1 f9a40fadd018794e537282344f01c609e4dbeac7 SHA256 41d780f291847e19f632428bbf27c3f289414afd237546d2974da1b75384c25c AUX tor.initd-r4 1553 RMD160 df0fc912c2e36797059de07d15a384d9ffe7d393 SHA1 82323d97b6d790b41027eec01e263d226c5b83e9 SHA256 4bf3c0906b0406564394eb51d47c1b5566904ed459e31ec1b1c1162c3b4aee92 @@ -19,15 +20,16 @@ DIST tor-0.2.3.6-alpha.tar.gz 2901597 RMD160 0121f76d6c9d0b55ec39d7d182f4dc4a34a DIST tor-0.2.3.7-alpha.tar.gz 2902591 RMD160 fe37e44f7af19b16ad0a983491fd631746d481d3 SHA1 7ac27fc0a991b5042bbd89d342a9f67908ce132d SHA256 c736e3de356b78fd47c96c6c64bdceb9dec9ef2457475a0601d261cf1854b695 EBUILD tor-0.2.1.30.ebuild 2646 RMD160 507a8939e024a5c9829e4ad5b598945fb8f26014 SHA1 5b2246b1f1b7db206558157801fe58b72cf6165a SHA256 e3e386af1fb917b2da75f45e110176b4fc2cfc776df98fac45719f9827f028ff EBUILD tor-0.2.1.31.ebuild 2856 RMD160 d0f4d326b7e761a546e3da04f8513ab95b715514 SHA1 6af834b213fa70f26ba9d14ad59a18b9af444d60 SHA256 0e7586cca58c9baa4af672aa1a8e00a7747e292514bfe27f92dafd4092c029a5 +EBUILD tor-0.2.2.34-r1.ebuild 2264 RMD160 cfb388ba36e7f7cc78b793090d0d4b785387f4ea SHA1 7a5af2c851672196ce408426d2b159b0f4d390bf SHA256 eced7473565fb8c1b929411e72b17506fee114671f4b69ece02ff2e38c61ef84 EBUILD tor-0.2.2.34.ebuild 2188 RMD160 d29d86876bdf06785716c6fbda158426ebf44210 SHA1 019f4161ea26f7c1bee396b75d9743e4d5d03399 SHA256 136c8fde066b0343f46eecd89c24f60d7b268f119371d873237bdb376d8625f5 EBUILD tor-0.2.3.6_alpha.ebuild 2364 RMD160 6e4828233cc4afd81bf94bedcc8f5ff88232f73e SHA1 c3458c392c70004bb924180c16fbdedff2558a10 SHA256 7472fc8d0487799a841e62a0ced705352955ec8fd7bacda263f9758873718035 EBUILD tor-0.2.3.7_alpha.ebuild 2364 RMD160 ffb1a886a8f3afd50448da52899ab29e4a3a8150 SHA1 010227d454fe0ff6691447ebbddf25fee097a9a4 SHA256 43cfd7470c48c1232556b1fcac24f029356643a66e930c7948bb45aacabab923 -MISC ChangeLog 42924 RMD160 3dceac537f693def27645441b67ec73584bfbb03 SHA1 9336477e9c8add619024c6aa98af67b1ff2e909b SHA256 9eda7dbe02144881dc97b9c074e8e7d38cd8fcda817c861a23e21310ad0e5d3d +MISC ChangeLog 43165 RMD160 19d9214c51ad252a6cbe0b348ee4be6da693472d SHA1 b1c0c62d5ac697dc3f28d58aad6289bf811adcf2 SHA256 db1032107b128da2d0cbea6c77be5671dff4327e8ed9552e737c1b05cd650c58 MISC metadata.xml 690 RMD160 1ae6238c81555b6b4bf2f11479e18a5acdb7b418 SHA1 920cafba2dacb7a034e32f782467c96532465434 SHA256 117ed70261e343abf65a93351f6ba7a5bca941c183bf79168953a3efc5afb0b5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEAREKAAYFAk6xWJkACgkQuUQtlDBCeQKbKACdHOzgdHVMbF2gDbRlP7VciGTz -D3MAnj5bQ/BeoF/l2kfs+WSRjKB820CO -=hD8y +iEYEAREIAAYFAk6zC1kACgkQl5yvQNBFVTXTEgCdGCgeI674VUqxVsY7LY4J4QUm +RMMAn3gJCTwSA1Z/2bNKeicyOF7FuIrC +=glJY -----END PGP SIGNATURE----- diff --git a/net-misc/tor/files/tor-0.2.2.34_disable-stats-requiring-geoip.patch b/net-misc/tor/files/tor-0.2.2.34_disable-stats-requiring-geoip.patch new file mode 100644 index 000000000000..cef31be37598 --- /dev/null +++ b/net-misc/tor/files/tor-0.2.2.34_disable-stats-requiring-geoip.patch @@ -0,0 +1,33 @@ +cbec20b5dedd91005dcf64c730c411 Mon Sep 17 00:00:00 2001 +From: Sebastian Hahn +Date: Wed, 22 Dec 2010 08:34:41 +0100 +Subject: [PATCH] Disable stats requiring geoip info if we have none + +In other parts of the code we will otherwise attempt to collect these +statistics, and that will lead to crashes. +--- + src/or/config.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/src/or/config.c b/src/or/config.c +index 78e4336..ca4e71c 100644 +--- a/src/or/config.c ++++ b/src/or/config.c +@@ -1425,6 +1425,7 @@ options_act(or_options_t *old_options) + geoip_dirreq_stats_init(now); + print_notice = 1; + } else { ++ options->DirReqStatistics = 0; + log_notice(LD_CONFIG, "Configured to measure directory request " + "statistics, but no GeoIP database found! " + "Please specify a GeoIP database using the " +@@ -1437,6 +1438,7 @@ options_act(or_options_t *old_options) + geoip_entry_stats_init(now); + print_notice = 1; + } else { ++ options->EntryStatistics = 0; + log_notice(LD_CONFIG, "Configured to measure entry node " + "statistics, but no GeoIP database found! " + "Please specify a GeoIP database using the " +-- +1.7.2.5 diff --git a/net-misc/tor/tor-0.2.2.34-r1.ebuild b/net-misc/tor/tor-0.2.2.34-r1.ebuild new file mode 100644 index 000000000000..f1f93a20bede --- /dev/null +++ b/net-misc/tor/tor-0.2.2.34-r1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/tor-0.2.2.34-r1.ebuild,v 1.1 2011/11/03 21:44:47 blueness Exp $ + +EAPI=4 + +inherit autotools eutils flag-o-matic versionator + +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="doc tor-hardening +transparent-proxy threads" + +DEPEND="dev-libs/openssl + >=dev-libs/libevent-2.0" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup tor + enewuser tor -1 -1 /var/lib/tor tor +} + +src_prepare() { + epatch "${FILESDIR}"/torrc.sample.patch + epatch "${FILESDIR}"/${PN}-0.2.2.34_disable-stats-requiring-geoip.patch + + einfo "Regenerating autotools files ..." + epatch "${FILESDIR}"/${PN}-0.2.2.24_alpha-respect-CFLAGS.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 --docdir=/usr/share/doc/${PF} \ + $(use_enable doc asciidoc) \ + $(use_enable tor-hardening gcc-hardening) \ + $(use_enable tor-hardening linker-hardening)\ + $(use_enable transparent-proxy transparent) \ + $(use_enable threads) +} + +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 +} -- 2.26.2