diff options
-rw-r--r-- | net-misc/tor/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/tor/Manifest | 13 | ||||
-rw-r--r-- | net-misc/tor/files/tor.initd-r5 | 81 | ||||
-rw-r--r-- | net-misc/tor/files/torrc-r1 | 7 | ||||
-rw-r--r-- | net-misc/tor/files/torrc.sample.patch | 30 | ||||
-rw-r--r-- | net-misc/tor/tor-0.2.2.32-r1.ebuild | 82 | ||||
-rw-r--r-- | net-misc/tor/tor-0.2.3.2_alpha-r3.ebuild | 88 |
7 files changed, 306 insertions, 5 deletions
diff --git a/net-misc/tor/ChangeLog b/net-misc/tor/ChangeLog index d2bcb8f2c302..6098f372a36a 100644 --- a/net-misc/tor/ChangeLog +++ b/net-misc/tor/ChangeLog @@ -1,6 +1,14 @@ # 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.269 2011/08/28 11:15:42 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.270 2011/08/30 13:57:42 blueness Exp $ + +*tor-0.2.3.2_alpha-r3 (30 Aug 2011) +*tor-0.2.2.32-r1 (30 Aug 2011) + + 30 Aug 2011; Anthony G. Basile <blueness@gentoo.org> +tor-0.2.2.32-r1.ebuild, + +tor-0.2.3.2_alpha-r3.ebuild, +files/tor.initd-r5, +files/torrc-r1, + +files/torrc.sample.patch: + Change logging to syslog, add sanity check for /var/run/tor, bug #380117 28 Aug 2011; Anthony G. Basile <blueness@gentoo.org> -tor-0.2.2.31_rc.ebuild: Removed old release candidate diff --git a/net-misc/tor/Manifest b/net-misc/tor/Manifest index ecb4f7f1de09..b26519de07c8 100644 --- a/net-misc/tor/Manifest +++ b/net-misc/tor/Manifest @@ -8,21 +8,26 @@ AUX tor-0.2.3.2_alpha-fix-asneeded.patch 654 RMD160 faf9cc37942dfa7f52dbe849c181 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 +AUX tor.initd-r5 2299 RMD160 d05f3aefc10d9adb5c7d860425054c3e714e16c2 SHA1 d1a2cfd7b8e0098f901c59d4ee778254f393c10f SHA256 3fff84925016cd05349977b219199783674681e285ef2689ab200d37bbafc747 AUX torrc 169 RMD160 f3fe077f017af465013e34f7b50f95f65d063cf0 SHA1 48061474d7176fc2dbf9be1e4595190877ba8a66 SHA256 7bddc22f07f41d7c5deeafb9cf010b4bf79bb6324a4c7ab86eeb81cdaec86a97 +AUX torrc-r1 140 RMD160 4949b9c875ee65d876381015eb7f00a2c611494c SHA1 52e5bc3cfb19f8c912697e5489cc1b7527f8059e SHA256 6766943a69e4784d02f173b5d74b8eb9345f878ef4eb36edab34bbf649ef2738 AUX torrc.sample-0.1.2.6.patch 1145 RMD160 3656774f05abe54ec22a121954a1d437fe1da520 SHA1 a0c658eafc8feb134e4ce8c7a5cdf94074ad79f5 SHA256 5b94e1d8c097626402b0b388fefb15f11b95db112b23d358e04cfe55331911f1 +AUX torrc.sample.patch 1281 RMD160 dfc56376c636acbf965ae80237873489659d46a2 SHA1 01ebc6c28b4d1753266bf34ef72de92937865c4f SHA256 b60b3f454eb0d475c6746ee18b70f1681f8653a4b2e032889135f8939dd13e14 DIST tor-0.2.1.30.tar.gz 2447447 RMD160 05e4a1443a5494982ef78dc61a088da26a09e9cf SHA1 f25b89d8c677c83ee0559036d5b13d49b272b3b0 SHA256 f352a1a8ffa469ae251324f89386074074bcffef1a7c6a72caa7e4c2d12ce109 DIST tor-0.2.2.32.tar.gz 2701371 RMD160 649c21f7ec89e34774c79db6544b612f0895bb61 SHA1 4baddc836931b3e915974c261e405e111636b716 SHA256 8744328c10b54950e08ee404a75a0e76865be0615cad6f7ffc8c75af7151ef4d DIST tor-0.2.3.2-alpha.tar.gz 2755750 RMD160 d34ac6b45360af873202a6884ce12ccf0420adee SHA1 020eb00aaaafa1e7102ae8fd95d3d6a719a61289 SHA256 8f423af73c8d8477752858cfcc0c15860f487a0f9a390e791eaea22f4b467edd EBUILD tor-0.2.1.30-r2.ebuild 3008 RMD160 bce113cab2f227bf7437adb2b9723425845eca3c SHA1 75b4f871d4936576c7645042a226b814f7be2c86 SHA256 53f7482a36cc6a8009f813cd4754756c224daaa787ed666eff2dc7be640caacc EBUILD tor-0.2.1.30.ebuild 2646 RMD160 507a8939e024a5c9829e4ad5b598945fb8f26014 SHA1 5b2246b1f1b7db206558157801fe58b72cf6165a SHA256 e3e386af1fb917b2da75f45e110176b4fc2cfc776df98fac45719f9827f028ff +EBUILD tor-0.2.2.32-r1.ebuild 2384 RMD160 e2629335d480b2a8ff620d08fdfefaa9393c946f SHA1 bc72a91ccd08715a13040d06bc52a5c53d6b8100 SHA256 149ac20a49d3307449249653c76fbeb9e8e88d677687d2119c7f19fe50a16460 EBUILD tor-0.2.2.32.ebuild 2523 RMD160 d59c6589453dc077d404b9707f4b991ed63d8841 SHA1 d0179d5192beee04215652b4b2dd2793b6f4b352 SHA256 81f8184da9a9a369ab9310974d377003b918bc2dc99666e0ef1184087dc4bdd8 EBUILD tor-0.2.3.2_alpha-r2.ebuild 2780 RMD160 60864e8594af4ca28877e0a9b208ac0564228545 SHA1 ec4772246ec7f51716480b853d85f3e95d01a2e4 SHA256 54057e7021db126865a71d8634d751d2b8c88de57f61dafd277320a01077d913 -MISC ChangeLog 39573 RMD160 15a4ca795fea96b30c1d2344499433779e610fb9 SHA1 82b354b7bb89e528be14aa7935d018514d84a94a SHA256 b44e83c4987aba602502b04c7090ece744a8666b14480888f86143f15addff27 +EBUILD tor-0.2.3.2_alpha-r3.ebuild 2638 RMD160 e3e68d23b0c7b23b569bda973da698d94d683a0e SHA1 9c5f4ebaa56ce803b7da6400afc8d21343a045ca SHA256 d000aa9aa507452b02b8342ab286fd59c3314f9f6e1da5197979b74dc35c8dde +MISC ChangeLog 39896 RMD160 aaf4df6b1f7659a4c2f25844c3de950373453fcb SHA1 4d3e60bc84be620c62cfc4bdf5f8982112dc71ee SHA256 647d8309063e334981bab2c8730afb9eaf5e8cfb7e48ab003f16b6983961f06e MISC metadata.xml 712 RMD160 d8585c57fead7661b72e383528b6450a2ace05eb SHA1 d97b0d9479c817d5a2207fbfc0fa5b567943c8a5 SHA256 53402fd0dc16696d9504c66ffeb85f3d8583c8621151d2faced9b1ffedbb2dbc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEAREIAAYFAk5aI2gACgkQl5yvQNBFVTVH0wCfdES+l+WHxVjwL+QV1DAD4fNT -bzEAn3jKnuxnf0gwxIJKytH16VSYRiNf -=A3Z8 +iEYEAREIAAYFAk5c7GEACgkQl5yvQNBFVTVtNQCfeqx6DDu/JmARjstPVKaPY1Z2 +5vQAnj3PtdFkWY7TITeUOZJbi6MdkdS1 +=+yE9 -----END PGP SIGNATURE----- diff --git a/net-misc/tor/files/tor.initd-r5 b/net-misc/tor/files/tor.initd-r5 new file mode 100644 index 000000000000..9f102ed4ba25 --- /dev/null +++ b/net-misc/tor/files/tor.initd-r5 @@ -0,0 +1,81 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/files/tor.initd-r5,v 1.3 2011/08/30 13:57:42 blueness Exp $ + +opts="${opts} checkconfig checkvarrun reload" +PIDDIR="/var/run/tor" +PIDFILE="${PIDDIR}/tor.pid" +CONFFILE="/etc/tor/torrc" + +depend() { + need net +} + +checkvarrun() +{ + # Check if /var/run/tor exists, create it if it doesn't + [ ! -d /var/run/tor ] && mkdir -p ${PIDDIR} + [ ! -d /var/run/tor ] && return 1 + + # The directory definitly exists now, but does it belong to tor:tor? + local dir=$(find ${PIDDIR} -maxdepth 0 -a -user tor -a -group tor) + [ -z "$dir" ] && chown tor:tor ${PIDDIR} + dir=$(find ${PIDDIR} -maxdepth 0 -a -user tor -a -group tor) + [ -z "$dir" ] && return 1 + + # And does it have the right perms? + dir=$(find ${PIDDIR} -maxdepth 0 -perm 0755) + [ -z "$dir" ] && chmod 0755 ${PIDDIR} + dir=$(find ${PIDDIR} -maxdepth 0 -perm 0755) + [ -z "$dir" ] && return 1 + + # If any of the above failed, we would not be here + return 0 +} + +checkconfig() { + # first check that it exists + if [ ! -f ${CONFFILE} ] ; then + eerror "You need to setup ${CONFFILE} first" + eerror "Example is in ${CONFFILE}.sample" + return 1 + fi + + # now verify whether the configuration is valid + /usr/bin/tor --verify-config -f ${CONFFILE} > /dev/null 2>&1 + if [ $? -eq 0 ] ; then + einfo "Tor configuration (${CONFFILE}) is valid." + return 0 + else + eerror "Tor configuration (${CONFFILE}) not valid." + /usr/bin/tor --verify-config -f ${CONFFILE} + return 1 + fi +} + +start() { + checkconfig || return 1 + checkvarrun || return 1 + ebegin "Starting Tor" + HOME=/var/lib/tor + start-stop-daemon --start --pidfile "${PIDFILE}" --quiet --exec /usr/bin/tor -- -f "${CONFFILE}" --runasdaemon 1 --PidFile "${PIDFILE}" > /dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping Tor" + start-stop-daemon --stop --pidfile "${PIDFILE}" --exec /usr/bin/tor -- --PidFile "${PIDFILE}" + eend $? +} + +reload() { + if [ ! -f ${PIDFILE} ]; then + eerror "${SVCNAME} isn't running" + return 1 + fi + checkconfig || return 1 + ebegin "Reloading Tor configuration" + start-stop-daemon --signal HUP --pidfile ${PIDFILE} + eend $? +} diff --git a/net-misc/tor/files/torrc-r1 b/net-misc/tor/files/torrc-r1 new file mode 100644 index 000000000000..322a794aa1d5 --- /dev/null +++ b/net-misc/tor/files/torrc-r1 @@ -0,0 +1,7 @@ +# +# Minimal torrc so tor will work out of the box +# +User tor +PIDFile /var/run/tor/tor.pid +Log notice syslog +DataDirectory /var/lib/tor/data diff --git a/net-misc/tor/files/torrc.sample.patch b/net-misc/tor/files/torrc.sample.patch new file mode 100644 index 000000000000..4a1592a552f9 --- /dev/null +++ b/net-misc/tor/files/torrc.sample.patch @@ -0,0 +1,30 @@ +diff -Nuar tor-0.2.2.32.orig/src/config/torrc.sample.in tor-0.2.2.32/src/config/torrc.sample.in +--- tor-0.2.2.32.orig/src/config/torrc.sample.in 2011-08-29 23:13:09.000000000 -0400 ++++ tor-0.2.2.32/src/config/torrc.sample.in 2011-08-29 23:14:19.000000000 -0400 +@@ -12,6 +12,10 @@ + ## Tor will look for this file in various places based on your platform: + ## https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#torrc + ++## Default username and group the server will run as ++User tor ++ ++PIDFile /var/run/tor/tor.pid + + ## Replace this with "SocksPort 0" if you plan to run Tor only as a + ## relay, and not make any local application connections yourself. +@@ -40,6 +44,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; +@@ -49,6 +54,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/tor-0.2.2.32-r1.ebuild b/net-misc/tor/tor-0.2.2.32-r1.ebuild new file mode 100644 index 000000000000..b17b77ebae80 --- /dev/null +++ b/net-misc/tor/tor-0.2.2.32-r1.ebuild @@ -0,0 +1,82 @@ +# 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.32-r1.ebuild,v 1.1 2011/08/30 13:57:42 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" +# The tordns patch for tsocks avoids some leakage of information thus raising anonymity +RDEPEND="${DEPEND} + net-proxy/tsocks[tordns]" + +pkg_setup() { + enewgroup tor + enewuser tor -1 -1 /var/lib/tor tor +} + +src_prepare() { + epatch "${FILESDIR}"/torrc.sample.patch + + einfo "Regenerating autotools files ..." + epatch "${FILESDIR}"/${PN}-0.2.2.24_alpha-respect-CFLAGS.patch + eautoreconf || die "eautoreconf failed" +} + +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-r5 tor + emake DESTDIR="${D}" install || die + keepdir /var/{lib,run}/tor + + dodoc README ChangeLog ReleaseNotes \ + doc/{HACKING,TODO} \ + doc/spec/README + + fperms 750 /var/lib/tor + fperms 755 /var/run/tor + fowners tor:tor /var/lib/tor /var/run/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 +} diff --git a/net-misc/tor/tor-0.2.3.2_alpha-r3.ebuild b/net-misc/tor/tor-0.2.3.2_alpha-r3.ebuild new file mode 100644 index 000000000000..ef8818c18acd --- /dev/null +++ b/net-misc/tor/tor-0.2.3.2_alpha-r3.ebuild @@ -0,0 +1,88 @@ +# 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.3.2_alpha-r3.ebuild,v 1.1 2011/08/30 13:57:42 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="+bufferevents doc nat-pmp tor-hardening transparent-proxy threads upnp" +DEPEND="dev-libs/openssl + >=dev-libs/libevent-2.0 + nat-pmp? ( net-libs/libnatpmp ) + upnp? ( <net-libs/miniupnpc-1.6 )" + +# The tordns patch for tsocks avoids some leakage of information thus raising anonymity +RDEPEND="${DEPEND} + net-proxy/tsocks[tordns]" + +pkg_setup() { + enewgroup tor + enewuser tor -1 -1 /var/lib/tor tor +} + +src_prepare() { + epatch "${FILESDIR}"/torrc.sample.patch + epatch "${FILESDIR}"/${PN}-0.2.3.2_alpha-fix-asneeded.patch + + einfo "Regenerating autotools files ..." + epatch "${FILESDIR}"/${PN}-0.2.2.24_alpha-respect-CFLAGS.patch + eautoreconf || die "eautoreconf failed" +} + +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 bufferevents) \ + $(use_enable doc asciidoc) \ + $(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-r5 tor + emake DESTDIR="${D}" install || die + keepdir /var/{lib,run}/tor + + dodoc README ChangeLog ReleaseNotes \ + doc/{HACKING,TODO} \ + doc/spec/README + + fperms 750 /var/lib/tor + fperms 755 /var/run/tor + fowners tor:tor /var/lib/tor /var/run/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 +} |