summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-04-24 12:16:46 +0000
committerAnthony G. Basile <blueness@gentoo.org>2012-04-24 12:16:46 +0000
commitf42384b5e8d7fb59fabced543c906c5215457741 (patch)
tree461dbe34ce878bb12c4f3d00fb8c53c02ce6ed8a /net-misc
parentremove old (diff)
downloadgentoo-2-f42384b5e8d7fb59fabced543c906c5215457741.tar.gz
gentoo-2-f42384b5e8d7fb59fabced543c906c5215457741.tar.bz2
gentoo-2-f42384b5e8d7fb59fabced543c906c5215457741.zip
Version bump alpha, add tor2web support
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/tor/ChangeLog9
-rw-r--r--net-misc/tor/files/tor-0.2.3.14_alpha-torrc.sample.patch31
-rw-r--r--net-misc/tor/metadata.xml1
-rw-r--r--net-misc/tor/tor-0.2.3.14_alpha.ebuild88
4 files changed, 128 insertions, 1 deletions
diff --git a/net-misc/tor/ChangeLog b/net-misc/tor/ChangeLog
index 20ba06605009..046a9fb68dc1 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.324 2012/03/27 15:15:05 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.325 2012/04/24 12:16:46 blueness Exp $
+
+*tor-0.2.3.14_alpha (24 Apr 2012)
+
+ 24 Apr 2012; Anthony G. Basile <blueness@gentoo.org>
+ +tor-0.2.3.14_alpha.ebuild, +files/tor-0.2.3.14_alpha-torrc.sample.patch,
+ metadata.xml:
+ Version bump alpha, add tor2web support
*tor-0.2.3.13_alpha (27 Mar 2012)
diff --git a/net-misc/tor/files/tor-0.2.3.14_alpha-torrc.sample.patch b/net-misc/tor/files/tor-0.2.3.14_alpha-torrc.sample.patch
new file mode 100644
index 000000000000..82c2013b4334
--- /dev/null
+++ b/net-misc/tor/files/tor-0.2.3.14_alpha-torrc.sample.patch
@@ -0,0 +1,31 @@
+diff -Naur tor-0.2.3.14-alpha.orig//src/config/torrc.sample.in tor-0.2.3.14-alpha/src/config/torrc.sample.in
+--- tor-0.2.3.14-alpha.orig//src/config/torrc.sample.in 2012-04-23 03:10:14.000000000 -0400
++++ tor-0.2.3.14-alpha/src/config/torrc.sample.in 2012-04-24 06:30:21.000000000 -0400
+@@ -12,6 +12,11 @@
+ ## Tor will look for this file in various places based on your platform:
+ ## https://www.torproject.org/docs/faq#torrc
+
++## Default username and group the server will run as
++User tor
++
++PIDFile /var/run/tor/tor.pid
++
+ ## Tor opens a socks proxy on port 9050 by default -- even if you don't
+ ## configure one below. Set "SocksPort 0" if you plan to run Tor only
+ ## as a relay, and not make any local application connections yourself.
+@@ -41,6 +46,7 @@
+ #Log notice syslog
+ ## To send all messages to stderr:
+ #Log debug stderr
++Log notice syslog
+
+ ## Uncomment this to start the process in the background... or use
+ ## --runasdaemon 1 on the command line. This is ignored on Windows;
+@@ -50,6 +56,7 @@
+ ## The directory for keeping all the keys/etc. By default, we store
+ ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
+ #DataDirectory @LOCALSTATEDIR@/lib/tor
++DataDirectory /var/lib/tor/data
+
+ ## The port on which Tor will listen for local connections from Tor
+ ## controller applications, as documented in control-spec.txt.
diff --git a/net-misc/tor/metadata.xml b/net-misc/tor/metadata.xml
index 9424ade01a17..a464bcfe15aa 100644
--- a/net-misc/tor/metadata.xml
+++ b/net-misc/tor/metadata.xml
@@ -11,5 +11,6 @@
<flag name='bufferevents'>Use Libevent's buffered IO</flag>
<flag name='nat-pmp'>Enable NAT Port Mapping Protocol</flag>
<flag name='upnp'>Enable Universal Plug and Play</flag>
+ <flag name='web'>Enable tor2web support</flag>
</use>
</pkgmetadata>
diff --git a/net-misc/tor/tor-0.2.3.14_alpha.ebuild b/net-misc/tor/tor-0.2.3.14_alpha.ebuild
new file mode 100644
index 000000000000..2c70e50c4d76
--- /dev/null
+++ b/net-misc/tor/tor-0.2.3.14_alpha.ebuild
@@ -0,0 +1,88 @@
+# 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.14_alpha.ebuild,v 1.1 2012/04/24 12:16:46 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 web"
+
+DEPEND="dev-libs/openssl
+ sys-libs/zlib
+ >=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}"/${P}-torrc.sample.patch
+ epatch "${FILESDIR}"/${PN}-0.2.3.13_alpha-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) \
+ $(use_enable web tor2web-mode)
+}
+
+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
+}