Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/blueness:master commit in: net-misc/tor/files/, net-misc/tor/
Date: Mon, 30 May 2011 20:49:48
Message-Id: 16a2d2bc66ab160c5aaefec1a46ec1cca31a4210.blueness@gentoo
1 commit: 16a2d2bc66ab160c5aaefec1a46ec1cca31a4210
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 30 20:48:35 2011 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Mon May 30 20:49:16 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=16a2d2bc
7
8 net-misc/tor: added missing FILESDIR
9
10 (Portage version: 2.1.9.42/git/Linux x86_64, signed Manifest commit with key 0xD0455535)
11
12 ---
13 net-misc/tor/Manifest | 13 ++++-
14 net-misc/tor/files/tor-0.2.1.19-logrotate.patch | 28 ++++++++++
15 .../tor/files/tor-0.2.1.30-respect-CFLAGS.patch | 38 +++++++++++++
16 .../files/tor-0.2.2.24_alpha-respect-CFLAGS.patch | 24 ++++++++
17 net-misc/tor/files/tor.conf | 3 +
18 net-misc/tor/files/tor.initd-r4 | 57 ++++++++++++++++++++
19 net-misc/tor/files/torrc | 8 +++
20 net-misc/tor/files/torrc.sample-0.1.2.6.patch | 30 ++++++++++
21 8 files changed, 198 insertions(+), 3 deletions(-)
22
23 diff --git a/net-misc/tor/Manifest b/net-misc/tor/Manifest
24 index f838e38..cea9d3c 100644
25 --- a/net-misc/tor/Manifest
26 +++ b/net-misc/tor/Manifest
27 @@ -1,6 +1,13 @@
28 -----BEGIN PGP SIGNED MESSAGE-----
29 Hash: SHA256
30
31 +AUX tor-0.2.1.19-logrotate.patch 746 RMD160 34ae926877e1b388c5e1c3cf0a16feba8b3f010b SHA1 3df06da077694b2312cc33a76db4a9e27a602d78 SHA256 60370cb70e089f4e675f39610c651537d0df5e5d1066c36417f479738549bec3
32 +AUX tor-0.2.1.30-respect-CFLAGS.patch 1626 RMD160 6cf173c52d0db4b2ca8eca724e484f53bd93431c SHA1 a702160c6cf577ead6da53f24875b324e02e8821 SHA256 91952c032232577c3a8a3e9e00b1f46623d0cfe1b05f28285e27fd1d1106e776
33 +AUX tor-0.2.2.24_alpha-respect-CFLAGS.patch 1001 RMD160 f623fd1f40cd2175c0c5b6bea3441fc87f7e8d0a SHA1 c8634481cd8273f98945f17f297f2506331d3b8d SHA256 2107434c7e7243d24043cf87eeccf60643e0cf94e8a883ebd725c23e13e667e8
34 +AUX tor.conf 89 RMD160 3ed95351d715ed05db3baa3dd8802832cb06989f SHA1 ec2a2cb216c35e37803b29a508d0914639a7f82b SHA256 3ed15ecce5c312fb4d50e0e8f3a645d67c660e2930a9dbadf010803b8fd095a0
35 +AUX tor.initd-r4 1566 RMD160 95692924474ad8e76dfdd60c44a9b4a618356d75 SHA1 cefe786a37b042edde03c00cb0500d6aade6cdd9 SHA256 aa5733badb87ebfe5efd0c3750a24f4589a480555f7c6ed579aa1c621ad09efc
36 +AUX torrc 169 RMD160 f3fe077f017af465013e34f7b50f95f65d063cf0 SHA1 48061474d7176fc2dbf9be1e4595190877ba8a66 SHA256 7bddc22f07f41d7c5deeafb9cf010b4bf79bb6324a4c7ab86eeb81cdaec86a97
37 +AUX torrc.sample-0.1.2.6.patch 1145 RMD160 3656774f05abe54ec22a121954a1d437fe1da520 SHA1 a0c658eafc8feb134e4ce8c7a5cdf94074ad79f5 SHA256 5b94e1d8c097626402b0b388fefb15f11b95db112b23d358e04cfe55331911f1
38 DIST tor-0.2.2.27-beta.tar.gz 2633715 RMD160 5a475497b035e676b953e1c0b531bead45ecbccb SHA1 c49d0970ecd5d418128d068a4db87cc25349f366 SHA256 61e184846ec38f4301ccfc7445567e89168e1d3e6c2e4bfed2d4ba5517ff4d68
39 EBUILD tor-0.2.2.27_beta.ebuild 2375 RMD160 53f8494ce98a86e56638d152ceeeac4185a6c1f0 SHA1 d56bf448cfea86d44f90875308795cf40c58c693 SHA256 4351c3cfcd94fb1919b399d20854a895cfb3792706fecdeff2d1e0c1c0b86c9c
40 MISC ChangeLog 37254 RMD160 e55d254e19c644b7484fbcc1c107369ddbedc1a6 SHA1 65e00c523c451883f19ebeee70b0cdde33ab0c3d SHA256 ea5451b27103a030a5c28d5c123ade113c2bf15b68242f176e687d5b53d766eb
41 @@ -8,7 +15,7 @@ MISC metadata.xml 363 RMD160 b21bb38c95a109d36b252b8e48b9c6724f75721c SHA1 6354a
42 -----BEGIN PGP SIGNATURE-----
43 Version: GnuPG v2.0.17 (GNU/Linux)
44
45 -iEYEAREIAAYFAk3jyuIACgkQl5yvQNBFVTX2CwCdEig3SPfewvh518wpxQISH9JM
46 -e50AmgMXeWS/53IZnI5JK0BSP+owrpyt
47 -=oKJT
48 +iEYEAREIAAYFAk3kAqMACgkQl5yvQNBFVTXWHgCdF/l645/1OvHSRv54ISj+O61V
49 +9WUAnRVIsKMiJMMEpeurd7XJxDqAswwo
50 +=Mco9
51 -----END PGP SIGNATURE-----
52
53 diff --git a/net-misc/tor/files/tor-0.2.1.19-logrotate.patch b/net-misc/tor/files/tor-0.2.1.19-logrotate.patch
54 new file mode 100644
55 index 0000000..3eadcaa
56 --- /dev/null
57 +++ b/net-misc/tor/files/tor-0.2.1.19-logrotate.patch
58 @@ -0,0 +1,28 @@
59 +* Change log dir from /var/lib/log to /var/log (#281439, Martin von Gagern)
60 +* Change user and group name from _tor to tor (#281439, Martin von Gagern)
61 +* Avoid error if tor is not running (#178975, Gustavo Felisberto)
62 +
63 +References:
64 +http://bugs.gentoo.org/281439
65 +http://bugs.gentoo.org/178975
66 +
67 +--- tor-0.2.1.19/contrib/tor.logrotate.in
68 ++++ tor-0.2.1.19/contrib/tor.logrotate.in
69 +@@ -1,4 +1,4 @@
70 +-@LOCALSTATEDIR@/log/tor/*log {
71 ++/var/log/tor/*.log {
72 + daily
73 + rotate 5
74 + compress
75 +@@ -6,9 +6,9 @@
76 + missingok
77 + notifempty
78 + # you may need to change the username/groupname below
79 +- create 0640 _tor _tor
80 ++ create 0640 tor tor
81 + sharedscripts
82 + postrotate
83 +- /etc/init.d/tor reload > /dev/null
84 ++ /etc/init.d/tor reload > /dev/null || true
85 + endscript
86 + }
87
88 diff --git a/net-misc/tor/files/tor-0.2.1.30-respect-CFLAGS.patch b/net-misc/tor/files/tor-0.2.1.30-respect-CFLAGS.patch
89 new file mode 100644
90 index 0000000..3776756
91 --- /dev/null
92 +++ b/net-misc/tor/files/tor-0.2.1.30-respect-CFLAGS.patch
93 @@ -0,0 +1,38 @@
94 +diff -Naur tor-0.2.1.30.orig/configure.in tor-0.2.1.30/configure.in
95 +--- tor-0.2.1.30.orig/configure.in 2011-02-23 03:25:39.000000000 -0500
96 ++++ tor-0.2.1.30/configure.in 2011-04-09 13:25:40.000000000 -0400
97 +@@ -10,6 +10,11 @@
98 +
99 + AC_CANONICAL_HOST
100 +
101 ++GENTOO_CFLAGS="$CFLAGS"
102 ++GENTOO_LDFLAGS="$LDFLAGS"
103 ++CFLAGS=
104 ++LDFLAGS=
105 ++
106 + if test -f /etc/redhat-release ; then
107 + if test -f /usr/kerberos/include ; then
108 + CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
109 +@@ -784,12 +789,11 @@
110 + # Set CFLAGS _after_ all the above checks, since our warnings are stricter
111 + # than autoconf's macros like.
112 + if test "$GCC" = yes; then
113 +- CFLAGS="$CFLAGS -Wall -g -O2"
114 ++ CFLAGS="$CFLAGS -Wall"
115 + # Disable GCC's strict aliasing checks. They are an hours-to-debug
116 + # accident waiting to happen.
117 + CFLAGS="$CFLAGS -fno-strict-aliasing"
118 + else
119 +- CFLAGS="$CFLAGS -g -O"
120 + enable_gcc_warnings=no
121 + enable_gcc_warnings_advisory=no
122 + fi
123 +@@ -865,6 +869,8 @@
124 +
125 +
126 + CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR_CPPFLAGS_zlib"
127 ++CFLAGS="$CFLAGS $GENTOO_CFLAGS"
128 ++LDFLAGS="$LDFLAGS $GENTOO_LDFLAGS"
129 +
130 + AC_CONFIG_FILES([Makefile tor.spec Doxyfile contrib/tor.sh contrib/torctl contrib/torify contrib/tor.logrotate contrib/Makefile contrib/osx/Makefile contrib/osx/TorBundleDesc.plist contrib/osx/TorBundleInfo.plist contrib/osx/TorDesc.plist contrib/osx/TorInfo.plist contrib/osx/TorStartupDesc.plist src/config/torrc.sample doc/tor.1 src/Makefile doc/Makefile doc/design-paper/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/win32/Makefile src/tools/Makefile contrib/suse/Makefile contrib/suse/tor.sh])
131 + AC_OUTPUT
132
133 diff --git a/net-misc/tor/files/tor-0.2.2.24_alpha-respect-CFLAGS.patch b/net-misc/tor/files/tor-0.2.2.24_alpha-respect-CFLAGS.patch
134 new file mode 100644
135 index 0000000..86b797b
136 --- /dev/null
137 +++ b/net-misc/tor/files/tor-0.2.2.24_alpha-respect-CFLAGS.patch
138 @@ -0,0 +1,24 @@
139 +diff -Naur tor-0.2.2.24-alpha.orig/configure.in tor-0.2.2.24-alpha/configure.in
140 +--- tor-0.2.2.24-alpha.orig/configure.in 2011-04-08 16:32:17.000000000 -0400
141 ++++ tor-0.2.2.24-alpha/configure.in 2011-04-18 07:10:57.000000000 -0400
142 +@@ -9,6 +9,11 @@
143 +
144 + AC_CANONICAL_HOST
145 +
146 ++GENTOO_CFLAGS="$CFLAGS"
147 ++GENTOO_LDFLAGS="$LDFLAGS"
148 ++CFLAGS=
149 ++LDFLAGS=
150 ++
151 + if test -f /etc/redhat-release ; then
152 + if test -f /usr/kerberos/include ; then
153 + CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
154 +@@ -971,6 +976,8 @@
155 +
156 +
157 + CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR_CPPFLAGS_zlib"
158 ++CFLAGS="$CFLAGS $GENTOO_CFLAGS"
159 ++LDFLAGS="$LDFLAGS $GENTOO_LDFLAGS"
160 +
161 + AC_CONFIG_FILES([Makefile tor.spec Doxyfile contrib/tor.sh contrib/torctl contrib/torify contrib/tor.logrotate contrib/Makefile src/config/torrc.sample src/Makefile doc/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/test/Makefile src/win32/Makefile src/tools/Makefile contrib/suse/Makefile contrib/suse/tor.sh])
162 + AC_OUTPUT
163
164 diff --git a/net-misc/tor/files/tor.conf b/net-misc/tor/files/tor.conf
165 new file mode 100644
166 index 0000000..4e4c639
167 --- /dev/null
168 +++ b/net-misc/tor/files/tor.conf
169 @@ -0,0 +1,3 @@
170 +tor hard nofile 30000
171 +tor soft nofile 30000
172 +
173
174 diff --git a/net-misc/tor/files/tor.initd-r4 b/net-misc/tor/files/tor.initd-r4
175 new file mode 100644
176 index 0000000..24d8a9a
177 --- /dev/null
178 +++ b/net-misc/tor/files/tor.initd-r4
179 @@ -0,0 +1,57 @@
180 +#!/sbin/runscript
181 +# Copyright 1999-2005 Gentoo Foundation
182 +# Distributed under the terms of the GNU General Public License v2
183 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/files/tor.initd-r4,v 1.5 2009/09/07 11:23:31 fauli Exp $
184 +
185 +opts="${opts} checkconfig reload"
186 +PIDFILE=/var/run/tor/tor.pid
187 +CONFFILE=/etc/tor/torrc
188 +
189 +depend() {
190 + need net
191 +}
192 +
193 +checkconfig() {
194 + # first check that it exists
195 + if [ ! -f ${CONFFILE} ] ; then
196 + eerror "You need to setup ${CONFFILE} first"
197 + eerror "Example is in ${CONFFILE}.sample"
198 + return 1
199 + fi
200 +
201 + # now verify whether the configuration is valid
202 + /usr/bin/tor --verify-config -f ${CONFFILE} > /dev/null 2>&1
203 + if [ $? -eq 0 ] ; then
204 + einfo "Tor configuration (${CONFFILE}) is valid."
205 + return 0
206 + else
207 + eerror "Tor configuration (${CONFFILE}) not valid."
208 + /usr/bin/tor --verify-config -f ${CONFFILE}
209 + return 1
210 + fi
211 +}
212 +
213 +start() {
214 + checkconfig || return 1
215 + ebegin "Starting Tor"
216 + HOME=/var/lib/tor
217 + start-stop-daemon --start --pidfile "${PIDFILE}" --quiet --exec /usr/bin/tor -- -f "${CONFFILE}" --runasdaemon 1 --PidFile "${PIDFILE}" > /dev/null 2>&1
218 + eend $?
219 +}
220 +
221 +stop() {
222 + ebegin "Stopping Tor"
223 + start-stop-daemon --stop --pidfile "${PIDFILE}" --exec /usr/bin/tor -- --PidFile "${PIDFILE}"
224 + eend $?
225 +}
226 +
227 +reload() {
228 + if [ ! -f ${PIDFILE} ]; then
229 + eerror "${SVCNAME} isn't running"
230 + return 1
231 + fi
232 + checkconfig || return 1
233 + ebegin "Reloading Tor configuration"
234 + start-stop-daemon --stop --oknodo --signal HUP --pidfile ${PIDFILE}
235 + eend $?
236 +}
237
238 diff --git a/net-misc/tor/files/torrc b/net-misc/tor/files/torrc
239 new file mode 100644
240 index 0000000..dc2dea3
241 --- /dev/null
242 +++ b/net-misc/tor/files/torrc
243 @@ -0,0 +1,8 @@
244 +#
245 +# Minimal torrc so tor will work out of the box
246 +#
247 +User tor
248 +Group tor
249 +PIDFile /var/run/tor/tor.pid
250 +Log notice file /var/log/tor/tor.log
251 +DataDirectory /var/lib/tor/data
252
253 diff --git a/net-misc/tor/files/torrc.sample-0.1.2.6.patch b/net-misc/tor/files/torrc.sample-0.1.2.6.patch
254 new file mode 100644
255 index 0000000..7317552
256 --- /dev/null
257 +++ b/net-misc/tor/files/torrc.sample-0.1.2.6.patch
258 @@ -0,0 +1,30 @@
259 +--- src/config/torrc.sample.in.orig 2007-01-27 23:41:23.000000000 +0000
260 ++++ src/config/torrc.sample.in 2007-01-27 23:43:47.000000000 +0000
261 +@@ -18,6 +18,11 @@
262 + ## With the default Mac OS X installer, Tor will look in ~/.tor/torrc or
263 + ## /Library/Tor/torrc
264 +
265 ++## Default username and group the server will run as
266 ++User tor
267 ++Group tor
268 ++
269 ++PIDFile /var/run/tor/tor.pid
270 +
271 + ## Replace this with "SocksPort 0" if you plan to run Tor only as a
272 + ## server, and not make any local application connections yourself.
273 +@@ -46,6 +51,7 @@
274 + #Log notice syslog
275 + ## To send all messages to stderr:
276 + #Log debug stderr
277 ++Log notice file /var/log/tor/tor.log
278 +
279 + ## Uncomment this to start the process in the background... or use
280 + ## --runasdaemon 1 on the command line. This is ignored on Windows;
281 +@@ -55,6 +61,7 @@
282 + ## The directory for keeping all the keys/etc. By default, we store
283 + ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
284 + #DataDirectory @LOCALSTATEDIR@/lib/tor
285 ++DataDirectory /var/lib/tor/data
286 +
287 + ## The port on which Tor will listen for local connections from Tor
288 + ## controller applications, as documented in control-spec.txt.