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: Sat, 07 May 2011 19:29:42
Message-Id: 1094c6ee41bc70b41a64ca79ddf5d49e6ee19e16.blueness@gentoo
1 commit: 1094c6ee41bc70b41a64ca79ddf5d49e6ee19e16
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 7 19:29:23 2011 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sat May 7 19:29:23 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=1094c6ee
7
8 net-misc/tor: bump alpha to 0.2.3.1
9
10 ---
11 net-misc/tor/ChangeLog | 154 ++++++++++++++------
12 net-misc/tor/Manifest | 20 +--
13 net-misc/tor/files/tor-0.2.1.19-logrotate.patch | 28 ++++
14 .../files/tor-0.2.2.24_alpha-respect-CFLAGS.patch | 24 +++
15 net-misc/tor/files/tor.conf | 3 +
16 net-misc/tor/files/tor.initd-r4 | 57 +++++++
17 net-misc/tor/files/torrc | 8 +
18 net-misc/tor/files/torrc.sample-0.1.2.6.patch | 30 ++++
19 net-misc/tor/tor-0.2.3.1_alpha.ebuild | 84 +++++++++++
20 9 files changed, 353 insertions(+), 55 deletions(-)
21
22 diff --git a/net-misc/tor/ChangeLog b/net-misc/tor/ChangeLog
23 index 7cf4914..4f37d99 100644
24 --- a/net-misc/tor/ChangeLog
25 +++ b/net-misc/tor/ChangeLog
26 @@ -1,75 +1,141 @@
27 # ChangeLog for net-misc/tor
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.225 2011/01/07 23:54:09 fauli Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.253 2011/04/29 20:15:56 blueness Exp $
31 +
32 +*tor-0.2.3.1_alpha (07 May 2011)
33 +
34 + 07 May 2011; Anthony G. Basile <blueness@g.o>
35 + +files/torrc.sample-0.1.2.6.patch, +files/tor-0.2.1.19-logrotate.patch,
36 + +files/tor-0.2.2.24_alpha-respect-CFLAGS.patch, +tor-0.2.3.1_alpha.ebuild,
37 + +files/tor.conf, +files/tor.initd-r4, +files/torrc:
38 + Bump alpha
39 +
40 + 29 Apr 2011; Anthony G. Basile <blueness@g.o>
41 + -tor-0.2.2.23_alpha.ebuild, -tor-0.2.2.23_alpha-r1.ebuild,
42 + -files/tor-0.2.2.23_alpha-respect-CFLAGS.patch:
43 + Removed deprecated alpha
44 +
45 +*tor-0.2.2.25_alpha (29 Apr 2011)
46 +
47 + 29 Apr 2011; Anthony G. Basile <blueness@g.o>
48 + +tor-0.2.2.25_alpha.ebuild:
49 + Version bump
50
51 *tor-0.2.2.24_alpha (18 Apr 2011)
52
53 18 Apr 2011; Anthony G. Basile <blueness@g.o>
54 - +files/torrc.sample-0.1.2.6.patch, +files/tor-0.2.1.19-logrotate.patch,
55 - +files/tor-0.2.1.30-respect-CFLAGS.patch, +tor-0.2.2.24_alpha.ebuild,
56 - +files/tor-0.2.2.24_alpha-respect-CFLAGS.patch, +files/CVS/Entries,
57 - +files/CVS/Repository, +files/CVS/Root, +files/tor.conf,
58 - +files/tor.initd-r4, +files/torrc:
59 + +tor-0.2.2.24_alpha.ebuild,
60 + +files/tor-0.2.2.24_alpha-respect-CFLAGS.patch:
61 Version bump
62
63 +*tor-0.2.1.30-r1 (10 Apr 2011)
64 +
65 10 Apr 2011; Anthony G. Basile <blueness@g.o>
66 - -files/torrc.sample-0.1.2.6.patch, -files/tor-0.2.1.19-logrotate.patch,
67 - -tor-0.2.1.30-r1.ebuild, -files/tor-0.2.1.30-respect-CFLAGS.patch,
68 - -files/tor-0.2.2.23_alpha-respect-CFLAGS.patch, -files/tor.conf,
69 - -files/tor.initd-r4, -files/torrc:
70 - moved to tree
71 + +tor-0.2.1.30-r1.ebuild, +files/tor-0.2.1.30-respect-CFLAGS.patch,
72 + files/torrc:
73 + Backport of improved build system, see bug #360765
74 +
75 + 02 Apr 2011; Anthony G. Basile <blueness@g.o> -tor-0.2.1.29.ebuild,
76 + -tor-0.2.1.29-r1.ebuild:
77 + Removed vulnerable versions, bug #359789
78
79 - 09 Apr 2011; Anthony G. Basile <blueness@g.o>
80 - tor-0.2.1.30-r1.ebuild, +files/tor-0.2.1.30-respect-CFLAGS.patch:
81 - backport of tor-0.2.2.23_alpha-respect-CFLAGS.patch
82 + 02 Apr 2011; Raúl Porcel <armin76@g.o> tor-0.2.1.30.ebuild:
83 + arm/sparc stable wrt #359789
84 +
85 + 28 Mar 2011; Anthony G. Basile <blueness@g.o>
86 + files/tor-0.2.2.23_alpha-respect-CFLAGS.patch:
87 + Improved fix to build system, see bug #360765
88
89 *tor-0.2.2.23_alpha-r1 (25 Mar 2011)
90
91 25 Mar 2011; Anthony G. Basile <blueness@g.o>
92 - +files/torrc.sample-0.1.2.6.patch, +files/tor-0.2.1.19-logrotate.patch,
93 +tor-0.2.2.23_alpha-r1.ebuild,
94 - +files/tor-0.2.2.23_alpha-respect-CFLAGS.patch, +files/tor.conf,
95 - +files/tor.initd-r4, +files/torrc:
96 - Added patch against configure.in to completely respect CFLAGS
97 + +files/tor-0.2.2.23_alpha-respect-CFLAGS.patch:
98 + Fixed build system to fully respect CFLAGS
99
100 - 10 Feb 2011; Anthony G. Basile <blueness@g.o>
101 - -files/torrc.sample-0.1.2.6.patch, -files/tor-0.2.1.19-logrotate.patch,
102 - -tor-0.2.1.29-r1.ebuild, -files/tor.conf, -files/tor.initd-r4,
103 - -files/torrc:
104 - Moved to the tree.
105 + 25 Mar 2011; Anthony G. Basile <blueness@g.o>
106 + tor-0.2.2.23_alpha.ebuild:
107 + Removed superfluous USE flag
108
109 - 09 Feb 2011; Anthony G. Basile <blueness@g.o>
110 - tor-0.2.1.29-r1.ebuild:
111 - Fixed pkg_postinst() message.
112 + 25 Mar 2011; Anthony G. Basile <blueness@g.o>
113 + -tor-0.2.2.22_alpha-r1.ebuild:
114 + Removed outdated alpha
115 +
116 + 22 Mar 2011; Thomas Kahle <tomka@g.o> tor-0.2.1.30.ebuild:
117 + x86 stable per bug 359789
118 +
119 + 21 Mar 2011; Christoph Mende <angelos@g.o> tor-0.2.1.30.ebuild:
120 + Stable on amd64 wrt bug #359789
121 +
122 + 21 Mar 2011; Kacper Kowalik <xarthisius@g.o> tor-0.2.1.30.ebuild:
123 + ppc/ppc64 stable wrt #359789
124 +
125 +*tor-0.2.2.23_alpha (11 Mar 2011)
126 +
127 + 11 Mar 2011; Anthony G. Basile <blueness@g.o>
128 + +tor-0.2.2.23_alpha.ebuild:
129 + Version bump on alpha and removal of deprecated vesion.
130 +
131 + 27 Feb 2011; Anthony G. Basile <blueness@g.o> +tor-0.2.1.29.ebuild:
132 + Reverted removal of only stable ebuild on most arches.
133 +
134 +*tor-0.2.1.30 (27 Feb 2011)
135 +
136 + 27 Feb 2011; Tomas Touceda <chiiph@g.o> -tor-0.2.1.29.ebuild,
137 + +tor-0.2.1.30.ebuild:
138 + Version bump and clean up.
139 +
140 + 12 Feb 2011; Raúl Porcel <armin76@g.o> tor-0.2.1.29-r1.ebuild:
141 + sparc stable wrt #351920
142 +
143 +*tor-0.2.2.22_alpha-r1 (10 Feb 2011)
144 +
145 + 10 Feb 2011; Anthony G. Basile <blueness@g.o>
146 + -tor-0.2.2.22_alpha.ebuild, +tor-0.2.2.22_alpha-r1.ebuild:
147 + Added /etc/tor/torrc for alpha.
148
149 *tor-0.2.1.29-r1 (09 Feb 2011)
150
151 09 Feb 2011; Anthony G. Basile <blueness@g.o>
152 - +files/torrc.sample-0.1.2.6.patch, +files/tor-0.2.1.19-logrotate.patch,
153 - +tor-0.2.1.29-r1.ebuild, +files/tor.conf, +files/tor.initd-r4,
154 - +files/torrc:
155 - Added /etc/torrc so that tor starts out of the box.
156 - See: http://bugs.sabayon.org/show_bug.cgi?id=2135
157 + +tor-0.2.1.29-r1.ebuild, +files/torrc:
158 + Added /etc/tor/torrc so tor works out of the box.
159
160 - 17 Jan 2011; Anthony G. Basile <blueness@g.o>
161 - -files/torrc.sample-0.1.2.6.patch, -files/tor-0.2.1.19-logrotate.patch,
162 - -tor-0.2.2.21_alpha.ebuild, -files/tor.conf, -files/tor.initd-r4:
163 - net-mis/tor: in the tree
164 +*tor-0.2.2.22_alpha (01 Feb 2011)
165 +
166 + 01 Feb 2011; Tomas Touceda <chiiph@g.o> -tor-0.2.2.21_alpha.ebuild,
167 + +tor-0.2.2.22_alpha.ebuild:
168 + Version bump on alpha and cleanup.
169 +
170 + 24 Jan 2011; Anthony G. Basile <blueness@g.o> -tor-0.2.1.28.ebuild:
171 + Removed vulnerable version, see bug #351920
172 +
173 + 24 Jan 2011; Raúl Porcel <armin76@g.o> tor-0.2.1.29.ebuild:
174 + sparc stable
175 +
176 + 23 Jan 2011; Markus Meier <maekke@g.o> tor-0.2.1.29.ebuild:
177 + arm stable, bug #351920
178 +
179 + 18 Jan 2011; Christian Faulhammer <fauli@g.o> tor-0.2.1.29.ebuild:
180 + stable x86, security bug 351920
181 +
182 + 17 Jan 2011; Markos Chandras <hwoarang@g.o> tor-0.2.1.29.ebuild:
183 + Stable on amd64 wrt bug #351920
184 +
185 + 17 Jan 2011; <xarth@g.o> tor-0.2.1.29.ebuild:
186 + ppc/ppc64 stable wrt #351920
187
188 *tor-0.2.2.21_alpha (17 Jan 2011)
189 +*tor-0.2.1.29 (17 Jan 2011)
190
191 - 17 Jan 2011; Anthony G. Basile <blueness@g.o>
192 - +files/torrc.sample-0.1.2.6.patch, +files/tor-0.2.1.19-logrotate.patch,
193 - +tor-0.2.2.21_alpha.ebuild, +files/tor.conf, +files/tor.initd-r4:
194 - version bump for alpha, address remote exploit via heap overflow
195 + 17 Jan 2011; Tomas Touceda <chiiph@g.o> +tor-0.2.1.29.ebuild,
196 + -tor-0.2.2.20_alpha.ebuild, +tor-0.2.2.21_alpha.ebuild:
197 + Versiom bump. Clean old alpha.
198
199 - 10 Jan 2011; Anthony G. Basile <blueness@g.o>
200 - -tor-0.2.2.20_alpha.ebuild:
201 - net-misc/tor: moved to tree
202 +*tor-0.2.2.20_alpha (10 Jan 2011)
203
204 10 Jan 2011; Anthony G. Basile <blueness@g.o>
205 - tor-0.2.2.20_alpha.ebuild:
206 - net-misc/tor: updated DEPEND to depend on masked >=dev-libs/libevent-2.0
207 + +tor-0.2.2.20_alpha.ebuild:
208 + added alpha branch
209
210 07 Jan 2011; Christian Faulhammer <fauli@g.o> -tor-0.2.1.25.ebuild,
211 -tor-0.2.1.26.ebuild, -tor-0.2.1.27.ebuild:
212
213 diff --git a/net-misc/tor/Manifest b/net-misc/tor/Manifest
214 index 4037652..733bdbd 100644
215 --- a/net-misc/tor/Manifest
216 +++ b/net-misc/tor/Manifest
217 @@ -1,12 +1,10 @@
218 ------BEGIN PGP SIGNED MESSAGE-----
219 -Hash: SHA256
220 -
221 -MISC ChangeLog 35287 RMD160 cdfd38e07bc0ca7c719e9ea74866af3a21bf3cb4 SHA1 34ad96236fc11b6a538891eebf2e1f7a01adaac0 SHA256 7f7e8ba8341bf46a401ef4ba51dffeaaae586397b233e47a4e4fc425b392195c
222 +AUX tor-0.2.1.19-logrotate.patch 746 RMD160 34ae926877e1b388c5e1c3cf0a16feba8b3f010b SHA1 3df06da077694b2312cc33a76db4a9e27a602d78 SHA256 60370cb70e089f4e675f39610c651537d0df5e5d1066c36417f479738549bec3
223 +AUX tor-0.2.2.24_alpha-respect-CFLAGS.patch 1001 RMD160 f623fd1f40cd2175c0c5b6bea3441fc87f7e8d0a SHA1 c8634481cd8273f98945f17f297f2506331d3b8d SHA256 2107434c7e7243d24043cf87eeccf60643e0cf94e8a883ebd725c23e13e667e8
224 +AUX tor.conf 89 RMD160 3ed95351d715ed05db3baa3dd8802832cb06989f SHA1 ec2a2cb216c35e37803b29a508d0914639a7f82b SHA256 3ed15ecce5c312fb4d50e0e8f3a645d67c660e2930a9dbadf010803b8fd095a0
225 +AUX tor.initd-r4 1566 RMD160 410611175c20425f48d340216ef680650bf6fa3d SHA1 dbdfd68db76871be8606d1196c0c2a7ba257aac0 SHA256 095334e62ee28d3346f84831015dc9c45f7224d8a6f3588974de7b26352e2824
226 +AUX torrc 169 RMD160 f3fe077f017af465013e34f7b50f95f65d063cf0 SHA1 48061474d7176fc2dbf9be1e4595190877ba8a66 SHA256 7bddc22f07f41d7c5deeafb9cf010b4bf79bb6324a4c7ab86eeb81cdaec86a97
227 +AUX torrc.sample-0.1.2.6.patch 1145 RMD160 3656774f05abe54ec22a121954a1d437fe1da520 SHA1 a0c658eafc8feb134e4ce8c7a5cdf94074ad79f5 SHA256 5b94e1d8c097626402b0b388fefb15f11b95db112b23d358e04cfe55331911f1
228 +DIST tor-0.2.3.1-alpha.tar.gz 2686119 RMD160 9f6f69db3541395bb34d3f4b3db30577a4cd5f6e SHA1 577d34efa66e5f6ba72d010b38fb48ff5b9796e3 SHA256 8906e80068952a4d3d9f65dfea2f4b0fd76b6b301fd1e62adac6c1b3bebe360e
229 +EBUILD tor-0.2.3.1_alpha.ebuild 2375 RMD160 53f8494ce98a86e56638d152ceeeac4185a6c1f0 SHA1 d56bf448cfea86d44f90875308795cf40c58c693 SHA256 4351c3cfcd94fb1919b399d20854a895cfb3792706fecdeff2d1e0c1c0b86c9c
230 +MISC ChangeLog 36826 RMD160 820857019bfb7be1ffa5254582a02048f5338c61 SHA1 023e041327fe5224f0a597b6a43e86085f34c166 SHA256 15bcef1e5b066aecb8fe2df650ba55a675371e00063557f5ba437715411748f6
231 MISC metadata.xml 363 RMD160 b21bb38c95a109d36b252b8e48b9c6724f75721c SHA1 6354a0d53fa168ddcd650f87872124f1edb345ef SHA256 650857d8f3d615ee0d0bcdb3d600d98eb58bae0d98c021dc6ff5ec774d77a142
232 ------BEGIN PGP SIGNATURE-----
233 -Version: GnuPG v2.0.17 (GNU/Linux)
234 -
235 -iEYEAREIAAYFAk2sIXEACgkQl5yvQNBFVTUL3gCdHvVl1G05wzIzCSMgdrmr06oE
236 -HWsAniaTIpTP9LEosqw6jXUrLwVmBVdS
237 -=lL1b
238 ------END PGP SIGNATURE-----
239
240 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
241 new file mode 100644
242 index 0000000..3eadcaa
243 --- /dev/null
244 +++ b/net-misc/tor/files/tor-0.2.1.19-logrotate.patch
245 @@ -0,0 +1,28 @@
246 +* Change log dir from /var/lib/log to /var/log (#281439, Martin von Gagern)
247 +* Change user and group name from _tor to tor (#281439, Martin von Gagern)
248 +* Avoid error if tor is not running (#178975, Gustavo Felisberto)
249 +
250 +References:
251 +http://bugs.gentoo.org/281439
252 +http://bugs.gentoo.org/178975
253 +
254 +--- tor-0.2.1.19/contrib/tor.logrotate.in
255 ++++ tor-0.2.1.19/contrib/tor.logrotate.in
256 +@@ -1,4 +1,4 @@
257 +-@LOCALSTATEDIR@/log/tor/*log {
258 ++/var/log/tor/*.log {
259 + daily
260 + rotate 5
261 + compress
262 +@@ -6,9 +6,9 @@
263 + missingok
264 + notifempty
265 + # you may need to change the username/groupname below
266 +- create 0640 _tor _tor
267 ++ create 0640 tor tor
268 + sharedscripts
269 + postrotate
270 +- /etc/init.d/tor reload > /dev/null
271 ++ /etc/init.d/tor reload > /dev/null || true
272 + endscript
273 + }
274
275 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
276 new file mode 100644
277 index 0000000..86b797b
278 --- /dev/null
279 +++ b/net-misc/tor/files/tor-0.2.2.24_alpha-respect-CFLAGS.patch
280 @@ -0,0 +1,24 @@
281 +diff -Naur tor-0.2.2.24-alpha.orig/configure.in tor-0.2.2.24-alpha/configure.in
282 +--- tor-0.2.2.24-alpha.orig/configure.in 2011-04-08 16:32:17.000000000 -0400
283 ++++ tor-0.2.2.24-alpha/configure.in 2011-04-18 07:10:57.000000000 -0400
284 +@@ -9,6 +9,11 @@
285 +
286 + AC_CANONICAL_HOST
287 +
288 ++GENTOO_CFLAGS="$CFLAGS"
289 ++GENTOO_LDFLAGS="$LDFLAGS"
290 ++CFLAGS=
291 ++LDFLAGS=
292 ++
293 + if test -f /etc/redhat-release ; then
294 + if test -f /usr/kerberos/include ; then
295 + CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
296 +@@ -971,6 +976,8 @@
297 +
298 +
299 + CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR_CPPFLAGS_zlib"
300 ++CFLAGS="$CFLAGS $GENTOO_CFLAGS"
301 ++LDFLAGS="$LDFLAGS $GENTOO_LDFLAGS"
302 +
303 + 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])
304 + AC_OUTPUT
305
306 diff --git a/net-misc/tor/files/tor.conf b/net-misc/tor/files/tor.conf
307 new file mode 100644
308 index 0000000..4e4c639
309 --- /dev/null
310 +++ b/net-misc/tor/files/tor.conf
311 @@ -0,0 +1,3 @@
312 +tor hard nofile 30000
313 +tor soft nofile 30000
314 +
315
316 diff --git a/net-misc/tor/files/tor.initd-r4 b/net-misc/tor/files/tor.initd-r4
317 new file mode 100644
318 index 0000000..c95ef19
319 --- /dev/null
320 +++ b/net-misc/tor/files/tor.initd-r4
321 @@ -0,0 +1,57 @@
322 +#!/sbin/runscript
323 +# Copyright 1999-2011 Gentoo Foundation
324 +# Distributed under the terms of the GNU General Public License v2
325 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/files/tor.initd-r4,v 1.5 2009/09/07 11:23:31 fauli Exp $
326 +
327 +opts="${opts} checkconfig reload"
328 +PIDFILE=/var/run/tor/tor.pid
329 +CONFFILE=/etc/tor/torrc
330 +
331 +depend() {
332 + need net
333 +}
334 +
335 +checkconfig() {
336 + # first check that it exists
337 + if [ ! -f ${CONFFILE} ] ; then
338 + eerror "You need to setup ${CONFFILE} first"
339 + eerror "Example is in ${CONFFILE}.sample"
340 + return 1
341 + fi
342 +
343 + # now verify whether the configuration is valid
344 + /usr/bin/tor --verify-config -f ${CONFFILE} > /dev/null 2>&1
345 + if [ $? -eq 0 ] ; then
346 + einfo "Tor configuration (${CONFFILE}) is valid."
347 + return 0
348 + else
349 + eerror "Tor configuration (${CONFFILE}) not valid."
350 + /usr/bin/tor --verify-config -f ${CONFFILE}
351 + return 1
352 + fi
353 +}
354 +
355 +start() {
356 + checkconfig || return 1
357 + ebegin "Starting Tor"
358 + HOME=/var/lib/tor
359 + start-stop-daemon --start --pidfile "${PIDFILE}" --quiet --exec /usr/bin/tor -- -f "${CONFFILE}" --runasdaemon 1 --PidFile "${PIDFILE}" > /dev/null 2>&1
360 + eend $?
361 +}
362 +
363 +stop() {
364 + ebegin "Stopping Tor"
365 + start-stop-daemon --stop --pidfile "${PIDFILE}" --exec /usr/bin/tor -- --PidFile "${PIDFILE}"
366 + eend $?
367 +}
368 +
369 +reload() {
370 + if [ ! -f ${PIDFILE} ]; then
371 + eerror "${SVCNAME} isn't running"
372 + return 1
373 + fi
374 + checkconfig || return 1
375 + ebegin "Reloading Tor configuration"
376 + start-stop-daemon --stop --oknodo --signal HUP --pidfile ${PIDFILE}
377 + eend $?
378 +}
379
380 diff --git a/net-misc/tor/files/torrc b/net-misc/tor/files/torrc
381 new file mode 100644
382 index 0000000..dc2dea3
383 --- /dev/null
384 +++ b/net-misc/tor/files/torrc
385 @@ -0,0 +1,8 @@
386 +#
387 +# Minimal torrc so tor will work out of the box
388 +#
389 +User tor
390 +Group tor
391 +PIDFile /var/run/tor/tor.pid
392 +Log notice file /var/log/tor/tor.log
393 +DataDirectory /var/lib/tor/data
394
395 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
396 new file mode 100644
397 index 0000000..7317552
398 --- /dev/null
399 +++ b/net-misc/tor/files/torrc.sample-0.1.2.6.patch
400 @@ -0,0 +1,30 @@
401 +--- src/config/torrc.sample.in.orig 2007-01-27 23:41:23.000000000 +0000
402 ++++ src/config/torrc.sample.in 2007-01-27 23:43:47.000000000 +0000
403 +@@ -18,6 +18,11 @@
404 + ## With the default Mac OS X installer, Tor will look in ~/.tor/torrc or
405 + ## /Library/Tor/torrc
406 +
407 ++## Default username and group the server will run as
408 ++User tor
409 ++Group tor
410 ++
411 ++PIDFile /var/run/tor/tor.pid
412 +
413 + ## Replace this with "SocksPort 0" if you plan to run Tor only as a
414 + ## server, and not make any local application connections yourself.
415 +@@ -46,6 +51,7 @@
416 + #Log notice syslog
417 + ## To send all messages to stderr:
418 + #Log debug stderr
419 ++Log notice file /var/log/tor/tor.log
420 +
421 + ## Uncomment this to start the process in the background... or use
422 + ## --runasdaemon 1 on the command line. This is ignored on Windows;
423 +@@ -55,6 +61,7 @@
424 + ## The directory for keeping all the keys/etc. By default, we store
425 + ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
426 + #DataDirectory @LOCALSTATEDIR@/lib/tor
427 ++DataDirectory /var/lib/tor/data
428 +
429 + ## The port on which Tor will listen for local connections from Tor
430 + ## controller applications, as documented in control-spec.txt.
431
432 diff --git a/net-misc/tor/tor-0.2.3.1_alpha.ebuild b/net-misc/tor/tor-0.2.3.1_alpha.ebuild
433 new file mode 100644
434 index 0000000..77b7ee7
435 --- /dev/null
436 +++ b/net-misc/tor/tor-0.2.3.1_alpha.ebuild
437 @@ -0,0 +1,84 @@
438 +# Copyright 1999-2011 Gentoo Foundation
439 +# Distributed under the terms of the GNU General Public License v2
440 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/tor-0.2.2.25_alpha.ebuild,v 1.1 2011/04/29 20:11:45 blueness Exp $
441 +
442 +EAPI=3
443 +
444 +inherit autotools eutils flag-o-matic versionator
445 +
446 +MY_PV="$(replace_version_separator 4 -)"
447 +MY_PF="${PN}-${MY_PV}"
448 +DESCRIPTION="Anonymizing overlay network for TCP"
449 +HOMEPAGE="http://www.torproject.org/"
450 +SRC_URI="http://www.torproject.org/dist/${MY_PF}.tar.gz"
451 +S="${WORKDIR}/${MY_PF}"
452 +
453 +LICENSE="BSD"
454 +SLOT="0"
455 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
456 +IUSE=""
457 +
458 +DEPEND="dev-libs/openssl
459 + >=dev-libs/libevent-2.0"
460 +# The tordns patch for tsocks avoids some leakage of information thus raising anonymity
461 +RDEPEND="${DEPEND}
462 + net-proxy/tsocks[tordns]"
463 +
464 +pkg_setup() {
465 + enewgroup tor
466 + enewuser tor -1 -1 /var/lib/tor tor
467 +}
468 +
469 +src_prepare() {
470 + epatch "${FILESDIR}"/torrc.sample-0.1.2.6.patch
471 + epatch "${FILESDIR}"/${PN}-0.2.1.19-logrotate.patch
472 +
473 + einfo "Regenerating autotools files ..."
474 + epatch "${FILESDIR}"/${PN}-0.2.2.24_alpha-respect-CFLAGS.patch
475 + eautoreconf || die "eautoreconf failed"
476 +}
477 +
478 +src_configure() {
479 + # Upstream isn't sure of all the user provided CFLAGS that
480 + # will break tor, but does recommend against -fstrict-aliasing.
481 + # We'll filter-flags them here as we encounter them.
482 + filter-flags -fstrict-aliasing
483 + econf --docdir=/usr/share/doc/${PF}
484 +}
485 +
486 +src_install() {
487 + newinitd "${FILESDIR}"/tor.initd-r4 tor
488 + emake DESTDIR="${D}" install || die
489 + keepdir /var/{lib,log,run}/tor
490 +
491 + dodoc README ChangeLog ReleaseNotes \
492 + doc/{HACKING,TODO} \
493 + doc/spec/README
494 +
495 + fperms 750 /var/lib/tor /var/log/tor
496 + fperms 755 /var/run/tor
497 + fowners tor:tor /var/lib/tor /var/log/tor /var/run/tor
498 +
499 + insinto /etc/tor/
500 + doins "${FILESDIR}"/torrc
501 +
502 + insinto /etc/logrotate.d
503 + newins contrib/tor.logrotate tor
504 +
505 + # allow the tor user more open files to avoid errors, see bug 251171
506 + insinto /etc/security/limits.d/
507 + doins "${FILESDIR}"/tor.conf
508 +}
509 +
510 +pkg_postinst() {
511 + elog
512 + elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
513 + elog "change it according to your needs. Use the torrc.sample that is in"
514 + elog "that directory as a guide. Also, to have privoxy work with tor"
515 + elog "just add the following line"
516 + elog
517 + elog "forward-socks4a / localhost:9050 ."
518 + elog
519 + elog "to /etc/privoxy/config. Notice the . at the end!"
520 + elog
521 +}