]>
Commit | Line | Data |
---|---|---|
86ae6c7b | 1 | Summary: Anonymizing overlay network for TCP (The onion router) |
2 | Name: tor | |
3 | Version: 0.1.0.14 | |
4 | Release: 0.1 | |
5 | Source0: http://tor.eff.org/dist/%{name}-%{version}.tar.gz | |
6 | # Source0-md5: f210023a97b5b97d1517a47f587876b9 | |
7 | Source1: %{name}.logrotate | |
8 | URL: http://tor.eff.org/ | |
9 | Group: Networking/Daemons | |
10 | License: BSD-like | |
11 | BuildRequires: libevent-devel | |
12 | BuildRequires: openssl-devel >= 0.9.6 | |
13 | BuildRequires: rpm-build >= 4.0 | |
14 | Requires(pre): shadow-utils, /usr/bin/id, /bin/date, /bin/sh | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %description | |
18 | Tor is a connection-based low-latency anonymous communication system. | |
19 | ||
20 | This package provides the "tor" program, which serves as both a client | |
21 | and a relay node. Scripts will automatically create a "tor" | |
22 | user and group, and set tor up to run as a daemon when the system is | |
23 | rebooted. | |
24 | ||
25 | Applications connect to the local Tor proxy using the SOCKS protocol. | |
26 | The local proxy chooses a path through a set of relays, in which each | |
27 | relay knows its predecessor and successor, but no others. Traffic | |
28 | flowing down the circuit is unwrapped by a symmetric key at each | |
29 | relay, which reveals the downstream relay. | |
30 | ||
31 | Warnings: Tor does no protocol cleaning. That means there is a danger | |
32 | that application protocols and associated programs can be induced to | |
33 | reveal information about the initiator. Tor depends on Privoxy and | |
34 | similar protocol cleaners to solve this problem. This is alpha code, | |
35 | and is even more likely than released code to have anonymity-spoiling | |
36 | bugs. The present network is very small -- this further reduces the | |
37 | strength of the anonymity provided. Tor is not presently suitable for | |
38 | high-stakes anonymity. | |
39 | ||
40 | %prep | |
41 | %setup -q -n %{name}-%{version} | |
42 | ||
43 | %build | |
44 | %configure | |
45 | %{__make} | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | %{__make} install \ | |
51 | DESTDIR=$RPM_BUILD_ROOT | |
52 | ||
53 | mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/torrc{.sample,} | |
54 | install -D contrib/tor.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
55 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
56 | ||
57 | %{__mkdir_p} $RPM_BUILD_ROOT/var/lib/%{name} | |
58 | %{__mkdir_p} $RPM_BUILD_ROOT/var/run/%{name} | |
59 | %{__mkdir_p} $RPM_BUILD_ROOT/var/log/{,archiv/}%{name} | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %pre | |
65 | %groupadd -g 156 tor | |
66 | %useradd -u 156 -r -d /var/lib/tor -s /bin/false -c "Tor" -g tor tor | |
67 | [ -f %{_initrddir}/%{name} ] && /sbin/service %{name} stop | |
68 | ||
69 | %post | |
70 | /sbin/chkconfig --add %{name} | |
71 | %service %{name} restart | |
72 | ||
73 | %preun | |
74 | if [ "$1" = "0" ]; then | |
75 | %service -q %{name} stop | |
76 | /sbin/chkconfig --del %{name} | |
77 | #%{__rm} -f ${_localstatedir}/lib/%{name}/cached-directory | |
78 | #%{__rm} -f ${_localstatedir}/lib/%{name}/bw_accounting | |
79 | #%{__rm} -f ${_localstatedir}/lib/%{name}/control_auth_cookie | |
80 | #%{__rm} -f ${_localstatedir}/lib/%{name}/router.desc | |
81 | #%{__rm} -f ${_localstatedir}/lib/%{name}/fingerprint | |
82 | fi | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc AUTHORS INSTALL LICENSE README ChangeLog doc/HACKING doc/TODO doc/FAQ | |
87 | %attr(755,root,root) %{_bindir}/* | |
88 | %{_mandir}/man?/* | |
89 | %config %{_initrddir}/%{name} | |
90 | %dir %attr(755,root,tor) %{_sysconfdir}/%{name}/ | |
91 | %attr(644,root,tor) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/* | |
92 | %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} | |
93 | %dir %attr(750,root,tor) /var/lib/%{name} | |
94 | %dir %attr(750,root,tor) /var/run/%{name} | |
95 | %dir %attr(750,root,tor) /var/log/{,archiv/}%{name} |