From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QTd4h-0007PM-0A for garchives@archives.gentoo.org; Mon, 06 Jun 2011 16:54:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4ADFF1C17D; Mon, 6 Jun 2011 16:54:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EDFB71C17D for ; Mon, 6 Jun 2011 16:54:18 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6A0551B402A for ; Mon, 6 Jun 2011 16:54:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 8F9288003C for ; Mon, 6 Jun 2011 16:54:17 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: Subject: [gentoo-commits] dev/blueness:master commit in: net-misc/tor/files/, net-misc/tor/ X-VCS-Repository: dev/blueness X-VCS-Files: net-misc/tor/ChangeLog net-misc/tor/Manifest net-misc/tor/files/tor-0.2.1.19-logrotate.patch net-misc/tor/files/tor-0.2.1.30-respect-CFLAGS.patch net-misc/tor/files/tor.conf net-misc/tor/files/tor.initd-r6 net-misc/tor/files/torrc.1 net-misc/tor/files/torrc.sample-0.2.1.30.patch net-misc/tor/tor-0.2.1.30-r2.ebuild X-VCS-Directories: net-misc/tor/files/ net-misc/tor/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: e29c917a9368415a1f8e04cc6f0fbd6833c5579e Date: Mon, 6 Jun 2011 16:54:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: ca128cc17f1067f54497e5b4ee517f6e commit: e29c917a9368415a1f8e04cc6f0fbd6833c5579e Author: Anthony G. Basile gentoo org> AuthorDate: Mon Jun 6 16:54:10 2011 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Mon Jun 6 16:54:10 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/blueness.git;a= =3Dcommit;h=3De29c917a net-misc/tor: testing bug #268396 --- net-misc/tor/ChangeLog | 8 ++ net-misc/tor/Manifest | 10 ++- net-misc/tor/files/tor-0.2.1.19-logrotate.patch | 28 ++++++ .../tor/files/tor-0.2.1.30-respect-CFLAGS.patch | 38 ++++++++ net-misc/tor/files/tor.conf | 3 + net-misc/tor/files/tor.initd-r6 | 57 ++++++++++++ net-misc/tor/files/torrc.1 | 6 ++ net-misc/tor/files/torrc.sample-0.2.1.30.patch | 26 ++++++ net-misc/tor/tor-0.2.1.30-r2.ebuild | 95 ++++++++++++++= ++++++ 9 files changed, 270 insertions(+), 1 deletions(-) diff --git a/net-misc/tor/ChangeLog b/net-misc/tor/ChangeLog index f5b38f3..06e7f0f 100644 --- a/net-misc/tor/ChangeLog +++ b/net-misc/tor/ChangeLog @@ -2,6 +2,14 @@ # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.253 2011/0= 4/29 20:15:56 blueness Exp $ =20 +*tor-0.2.1.30-r2 (06 Jun 2011) + + 06 Jun 2011; Anthony G. Basile + +files/tor-0.2.1.19-logrotate.patch, +tor-0.2.1.30-r2.ebuild, + +files/tor-0.2.1.30-respect-CFLAGS.patch, +files/torrc.sample-0.2.1.30= .patch, + +files/tor.conf, +files/tor.initd-r6, +files/torrc.1: + Testing bug #268396 + *tor-0.2.2.27_beta (30 May 2011) =20 30 May 2011; Anthony G. Basile diff --git a/net-misc/tor/Manifest b/net-misc/tor/Manifest index d451a6f..eee6875 100644 --- a/net-misc/tor/Manifest +++ b/net-misc/tor/Manifest @@ -1,2 +1,10 @@ -MISC ChangeLog 37254 RMD160 e55d254e19c644b7484fbcc1c107369ddbedc1a6 SHA= 1 65e00c523c451883f19ebeee70b0cdde33ab0c3d SHA256 ea5451b27103a030a5c28d5= c123ade113c2bf15b68242f176e687d5b53d766eb +AUX tor-0.2.1.19-logrotate.patch 746 RMD160 34ae926877e1b388c5e1c3cf0a16= feba8b3f010b SHA1 3df06da077694b2312cc33a76db4a9e27a602d78 SHA256 60370cb= 70e089f4e675f39610c651537d0df5e5d1066c36417f479738549bec3 +AUX tor-0.2.1.30-respect-CFLAGS.patch 1626 RMD160 6cf173c52d0db4b2ca8eca= 724e484f53bd93431c SHA1 a702160c6cf577ead6da53f24875b324e02e8821 SHA256 9= 1952c032232577c3a8a3e9e00b1f46623d0cfe1b05f28285e27fd1d1106e776 +AUX tor.conf 89 RMD160 3ed95351d715ed05db3baa3dd8802832cb06989f SHA1 ec2= a2cb216c35e37803b29a508d0914639a7f82b SHA256 3ed15ecce5c312fb4d50e0e8f3a6= 45d67c660e2930a9dbadf010803b8fd095a0 +AUX tor.initd-r6 1616 RMD160 3dd1daee3e7038d04dcb168bda24c4d9c4c04f34 SH= A1 ee6de8777afc29ce3c71bde1f1499c58982a3380 SHA256 1f3d7c7ec5877eecf47dc7= 6734c6dc706dd2d1a69e57f9c231f9dcf544fa4bc6 +AUX torrc.1 150 RMD160 17a70e9790b415c51639a5f08e47a0cb54323f20 SHA1 a21= 7f018d1b2a15ca7ead718dc42f60109bb005d SHA256 e03ba21c23e9798075b2fcdafab1= 43eaf58ffdae9198bcf40de22424a64a90f6 +AUX torrc.sample-0.2.1.30.patch 1067 RMD160 77ac6827513cc1fc48a72bf35291= 5887e22c4284 SHA1 6194000ee38cbaf095954bd0f9adebb001ccaf05 SHA256 5e65720= 9f85b52d2c4c8434a1c65d652828be5f58f672f5829db6524a80e9998 +DIST tor-0.2.1.30.tar.gz 2447447 RMD160 05e4a1443a5494982ef78dc61a088da2= 6a09e9cf SHA1 f25b89d8c677c83ee0559036d5b13d49b272b3b0 SHA256 f352a1a8ffa= 469ae251324f89386074074bcffef1a7c6a72caa7e4c2d12ce109 +EBUILD tor-0.2.1.30-r2.ebuild 3043 RMD160 71f1535be018f503e0a254b1f1736d= eabad00e86 SHA1 3cc05596abb3f5322a9562857c405ff2bab6ebc4 SHA256 2ecc7978b= 6dbfd009611081f5d3f1024156f005f0c65bf14b19a85207a0db1f0 +MISC ChangeLog 37564 RMD160 15dea18a2fadc2182ac444ff2e492800f10aa75e SHA= 1 740a779c4f797b49bef43ffd42127a520b47b072 SHA256 a3131f4c083859c99cc32ff= b356d8763fd5fb6490c9c386dc524c64ad39ab230 MISC metadata.xml 363 RMD160 b21bb38c95a109d36b252b8e48b9c6724f75721c SH= A1 6354a0d53fa168ddcd650f87872124f1edb345ef SHA256 650857d8f3d615ee0d0bcd= b3d600d98eb58bae0d98c021dc6ff5ec774d77a142 diff --git a/net-misc/tor/files/tor-0.2.1.19-logrotate.patch b/net-misc/t= or/files/tor-0.2.1.19-logrotate.patch new file mode 100644 index 0000000..3eadcaa --- /dev/null +++ b/net-misc/tor/files/tor-0.2.1.19-logrotate.patch @@ -0,0 +1,28 @@ +* Change log dir from /var/lib/log to /var/log (#281439, Martin von Gage= rn) +* Change user and group name from _tor to tor (#281439, Martin von Gager= n) +* Avoid error if tor is not running (#178975, Gustavo Felisberto) + +References: +http://bugs.gentoo.org/281439 +http://bugs.gentoo.org/178975 + +--- tor-0.2.1.19/contrib/tor.logrotate.in ++++ tor-0.2.1.19/contrib/tor.logrotate.in +@@ -1,4 +1,4 @@ +-@LOCALSTATEDIR@/log/tor/*log { ++/var/log/tor/*.log { + daily + rotate 5 + compress +@@ -6,9 +6,9 @@ + missingok + notifempty + # you may need to change the username/groupname below +- create 0640 _tor _tor ++ create 0640 tor tor + sharedscripts + postrotate +- /etc/init.d/tor reload > /dev/null ++ /etc/init.d/tor reload > /dev/null || true + endscript + } diff --git a/net-misc/tor/files/tor-0.2.1.30-respect-CFLAGS.patch b/net-m= isc/tor/files/tor-0.2.1.30-respect-CFLAGS.patch new file mode 100644 index 0000000..3776756 --- /dev/null +++ b/net-misc/tor/files/tor-0.2.1.30-respect-CFLAGS.patch @@ -0,0 +1,38 @@ +diff -Naur tor-0.2.1.30.orig/configure.in tor-0.2.1.30/configure.in +--- tor-0.2.1.30.orig/configure.in 2011-02-23 03:25:39.000000000 -0500 ++++ tor-0.2.1.30/configure.in 2011-04-09 13:25:40.000000000 -0400 +@@ -10,6 +10,11 @@ +=20 + AC_CANONICAL_HOST +=20 ++GENTOO_CFLAGS=3D"$CFLAGS" ++GENTOO_LDFLAGS=3D"$LDFLAGS" ++CFLAGS=3D ++LDFLAGS=3D ++ + if test -f /etc/redhat-release ; then + if test -f /usr/kerberos/include ; then + CPPFLAGS=3D"$CPPFLAGS -I/usr/kerberos/include" +@@ -784,12 +789,11 @@ + # Set CFLAGS _after_ all the above checks, since our warnings are stric= ter + # than autoconf's macros like. + if test "$GCC" =3D yes; then +- CFLAGS=3D"$CFLAGS -Wall -g -O2" ++ CFLAGS=3D"$CFLAGS -Wall" + # Disable GCC's strict aliasing checks. They are an hours-to-debug + # accident waiting to happen. + CFLAGS=3D"$CFLAGS -fno-strict-aliasing" + else +- CFLAGS=3D"$CFLAGS -g -O" + enable_gcc_warnings=3Dno + enable_gcc_warnings_advisory=3Dno + fi +@@ -865,6 +869,8 @@ +=20 +=20 + CPPFLAGS=3D"$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR= _CPPFLAGS_zlib" ++CFLAGS=3D"$CFLAGS $GENTOO_CFLAGS" ++LDFLAGS=3D"$LDFLAGS $GENTOO_LDFLAGS" +=20 + AC_CONFIG_FILES([Makefile tor.spec Doxyfile contrib/tor.sh contrib/torc= tl contrib/torify contrib/tor.logrotate contrib/Makefile contrib/osx/Make= file contrib/osx/TorBundleDesc.plist contrib/osx/TorBundleInfo.plist cont= rib/osx/TorDesc.plist contrib/osx/TorInfo.plist contrib/osx/TorStartupDes= c.plist src/config/torrc.sample doc/tor.1 src/Makefile doc/Makefile doc/d= esign-paper/Makefile src/config/Makefile src/common/Makefile src/or/Makef= ile src/win32/Makefile src/tools/Makefile contrib/suse/Makefile contrib/s= use/tor.sh]) + AC_OUTPUT diff --git a/net-misc/tor/files/tor.conf b/net-misc/tor/files/tor.conf new file mode 100644 index 0000000..4e4c639 --- /dev/null +++ b/net-misc/tor/files/tor.conf @@ -0,0 +1,3 @@ +tor hard nofile 30000 +tor soft nofile 30000 + diff --git a/net-misc/tor/files/tor.initd-r6 b/net-misc/tor/files/tor.ini= td-r6 new file mode 100644 index 0000000..211a40d --- /dev/null +++ b/net-misc/tor/files/tor.initd-r6 @@ -0,0 +1,57 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-misc/tor/f= iles/tor.initd-r6,v 1.1 2009/06/03 13:02:24 fauli Exp $ + +opts=3D"${opts} checkconfig reload" +PIDFILE=3D/var/run/tor/tor.pid +CONFFILE=3D/etc/tor/torrc + +depend() { + need net +} + +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 --User tor -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 --User tor -f ${CONFFILE} + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting Tor" + HOME=3D/var/lib/tor + start-stop-daemon --start --user tor --pidfile "${PIDFILE}" --quiet --e= xec /usr/bin/tor -- --runasdaemon 1 --PidFile "${PIDFILE}" > /dev/null 2= >&1 + eend $? +} + +stop() { + ebegin "Stopping Tor" + start-stop-daemon --stop --user tor --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 --stop --oknodo --signal HUP --pidfile ${PIDFILE} + eend $? +} diff --git a/net-misc/tor/files/torrc.1 b/net-misc/tor/files/torrc.1 new file mode 100644 index 0000000..eb1a856 --- /dev/null +++ b/net-misc/tor/files/torrc.1 @@ -0,0 +1,6 @@ +# +# Minimal torrc so tor will work out of the box +# +PIDFile /var/run/tor/tor.pid +Log notice file /var/log/tor/tor.log +DataDirectory /var/lib/tor/data diff --git a/net-misc/tor/files/torrc.sample-0.2.1.30.patch b/net-misc/to= r/files/torrc.sample-0.2.1.30.patch new file mode 100644 index 0000000..99959f4 --- /dev/null +++ b/net-misc/tor/files/torrc.sample-0.2.1.30.patch @@ -0,0 +1,26 @@ +--- src/config/torrc.sample.in.orig 2007-01-27 23:41:23.000000000 +0000 ++++ src/config/torrc.sample.in 2007-01-27 23:43:47.000000000 +0000 +@@ -18,6 +18,7 @@ + ## With the default Mac OS X installer, Tor will look in ~/.tor/torrc o= r + ## /Library/Tor/torrc +=20 ++PIDFile /var/run/tor/tor.pid +=20 + ## Replace this with "SocksPort 0" if you plan to run Tor only as a + ## server, and not make any local application connections yourself. +@@ -46,6 +51,7 @@ + #Log notice syslog + ## To send all messages to stderr: + #Log debug stderr ++Log notice file /var/log/tor/tor.log +=20 + ## Uncomment this to start the process in the background... or use + ## --runasdaemon 1 on the command line. This is ignored on Windows; +@@ -55,6 +61,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 +=20 + ## 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.1.30-r2.ebuild b/net-misc/tor/tor-0.2.1= .30-r2.ebuild new file mode 100644 index 0000000..9bf572e --- /dev/null +++ b/net-misc/tor/tor-0.2.1.30-r2.ebuild @@ -0,0 +1,95 @@ +# 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.1.30-r1.ebuild,v= 1.1 2011/04/10 17:42:03 blueness Exp $ + +EAPI=3D2 + +inherit autotools eutils flag-o-matic + +DESCRIPTION=3D"Anonymizing overlay network for TCP" +HOMEPAGE=3D"http://www.torproject.org/" +MY_PV=3D${PV/_/-} +SRC_URI=3D"http://www.torproject.org/dist/${PN}-${MY_PV}.tar.gz" +S=3D"${WORKDIR}/${PN}-${MY_PV}" + +LICENSE=3D"BSD" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE=3D"debug" + +DEPEND=3D"dev-libs/openssl + >=3Ddev-libs/libevent-1.2" +# The tordns patch for tsocks avoids some leakage of information thus ra= ising anonymity +RDEPEND=3D"${DEPEND} + net-proxy/tsocks[tordns]" + +pkg_setup() { + enewgroup tor + enewuser tor -1 -1 /var/lib/tor tor +} + +src_prepare() { + epatch "${FILESDIR}"/torrc.sample-0.2.1.30.patch + epatch "${FILESDIR}"/${PN}-0.2.1.19-logrotate.patch + + einfo "Regenerating autotools files ..." + epatch "${FILESDIR}"/${PN}-0.2.1.30-respect-CFLAGS.patch + eautoreconf || die "eautoreconf failed" + + # Normally tor uses a bundled libevent fragment to provide + # asynchronous DNS requests. This is generally a bad idea, but at + # the moment the official libevent does not have the 0x20 hack, so + # anonymity is higher with the bundled variant. Remove patch as + # soon as upstream has installed the autoconf option to use + # system's libevent. This hasn't happened, so we + # have to live with the bundled libevent for this release, as the + # current version in tree won't suffice for tor to build + # See http://bugs.noreply.org/flyspray/index.php?do=3Ddetails&id=3D920 + # for upstream's report + # Let's revisit this when libevent-2* is unmasked + # use bundledlibevent || epatch "${FILESDIR}"/${PN}-0.2.1.5-no-internal= -libevent.patch +} + +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 $(use_enable debug) +} + +src_install() { + newinitd "${FILESDIR}"/tor.initd-r6 tor + emake DESTDIR=3D"${D}" install || die + keepdir /var/{lib,log,run}/tor + + dodoc README ChangeLog AUTHORS ReleaseNotes \ + doc/{HACKING,TODO} + + fperms 750 /var/lib/tor /var/log/tor + fperms 755 /var/run/tor + fowners tor:tor /var/lib/tor /var/log/tor /var/run/tor + + insinto /etc/tor/ + newins "${FILESDIR}"/torrc.1 torrc + + insinto /etc/logrotate.d + newins contrib/tor.logrotate tor + + # allow the tor user more open files to avoid errors, see bug 251171 + insinto /etc/security/limits.d/ + doins "${FILESDIR}"/tor.conf +} + +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 +}