1 |
boklm |
73394 |
%define runuser toruser |
2 |
|
|
|
3 |
|
|
Name: tor |
4 |
luigiwalser |
658347 |
Version: 0.2.4.23 |
5 |
luigiwalser |
587859 |
Release: %mkrel 1 |
6 |
boklm |
73394 |
Summary: Anonymizing overlay network for TCP (The onion router) |
7 |
|
|
URL: http://www.torproject.org/ |
8 |
|
|
Group: Networking/Other |
9 |
|
|
License: BSD-like |
10 |
colin |
405136 |
Requires(post): systemd >= %{systemd_required_version} |
11 |
tmb |
233880 |
Requires(post): rpm-helper >= 0.24.8-1 |
12 |
|
|
Requires(preun): rpm-helper >= 0.24.8-1 |
13 |
dmorgan |
196574 |
Requires(post): sysvinit |
14 |
|
|
Requires(preun): sysvinit |
15 |
|
|
Requires(postun): sysvinit |
16 |
luigiwalser |
587859 |
Requires: openssl >= 0.9.8 |
17 |
boklm |
73394 |
Requires: tsocks |
18 |
luigiwalser |
587859 |
BuildRequires: openssl-devel >= 0.9.8 |
19 |
boklm |
73394 |
BuildRequires: libevent-devel |
20 |
|
|
BuildRequires: zlib-devel |
21 |
|
|
BuildRequires: autoconf2.5 |
22 |
|
|
Source0: http://www.torproject.org/dist/%{name}-%{version}.tar.gz |
23 |
|
|
Source1: %{name}.logrotate |
24 |
|
|
Source3: %{name}.sysconfig |
25 |
colin |
274221 |
Source4: %{name}.service |
26 |
|
|
Source5: %{name}-tmpfiles.conf |
27 |
boklm |
73394 |
|
28 |
|
|
%description |
29 |
|
|
Tor is a connection-based low-latency anonymous communication system. |
30 |
|
|
|
31 |
|
|
This package provides the "tor" program, which serves as both a client and |
32 |
|
|
a relay node. Scripts will automatically create a "%{runuser}" user and |
33 |
|
|
group, and set tor up to run as a daemon when the system is rebooted. |
34 |
|
|
|
35 |
|
|
Applications connect to the local Tor proxy using the SOCKS |
36 |
|
|
protocol. The local proxy chooses a path through a set of relays, in |
37 |
|
|
which each relay knows its predecessor and successor, but no |
38 |
|
|
others. Traffic flowing down the circuit is unwrapped by a symmetric |
39 |
|
|
key at each relay, which reveals the downstream relay. |
40 |
|
|
|
41 |
|
|
Warnings: Tor does no protocol cleaning. That means there is a danger |
42 |
|
|
that application protocols and associated programs can be induced to |
43 |
|
|
reveal information about the initiator. Tor depends on Privoxy and |
44 |
|
|
similar protocol cleaners to solve this problem. This is alpha code, |
45 |
|
|
and is even more likely than released code to have anonymity-spoiling |
46 |
|
|
bugs. The present network is very small -- this further reduces the |
47 |
|
|
strength of the anonymity provided. Tor is not presently suitable |
48 |
|
|
for high-stakes anonymity. |
49 |
|
|
|
50 |
kamil |
325285 |
|
51 |
boklm |
73394 |
%prep |
52 |
kamil |
325285 |
%setup -q |
53 |
boklm |
73394 |
|
54 |
|
|
%build |
55 |
|
|
%configure2_5x |
56 |
|
|
%make |
57 |
|
|
|
58 |
|
|
%install |
59 |
|
|
%makeinstall |
60 |
|
|
|
61 |
wally |
670530 |
install -p -m 644 %{buildroot}%{_sysconfdir}/%{name}/torrc.sample %{buildroot}%{_sysconfdir}/%{name}/torrc |
62 |
boklm |
73394 |
|
63 |
wally |
670530 |
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/logrotate.d |
64 |
|
|
cat %{SOURCE1} > %{buildroot}%{_sysconfdir}/logrotate.d/%{name} |
65 |
boklm |
73394 |
|
66 |
wally |
670530 |
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/sysconfig/ |
67 |
|
|
cat %{SOURCE3} > %{buildroot}%{_sysconfdir}/sysconfig/%{name} |
68 |
boklm |
73394 |
|
69 |
wally |
670530 |
mkdir -p -m 700 %{buildroot}%{_localstatedir}/lib/%{name} |
70 |
|
|
mkdir -p -m 755 %{buildroot}%{_var}/%{name} |
71 |
|
|
mkdir -p -m 755 %{buildroot}%{_logdir}/%{name} |
72 |
boklm |
73394 |
|
73 |
|
|
# Bash completion |
74 |
wally |
670530 |
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d |
75 |
|
|
echo 'complete -F _command $filenames torify' > %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} |
76 |
boklm |
73394 |
|
77 |
dmorgan |
196574 |
# Systemd support |
78 |
wally |
670530 |
install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service |
79 |
colin |
405136 |
install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf |
80 |
dmorgan |
196574 |
|
81 |
boklm |
73394 |
%pre |
82 |
wally |
670529 |
%_pre_useradd %{runuser} %{_localstatedir}/lib/%{name} /bin/false |
83 |
boklm |
73394 |
|
84 |
|
|
%post |
85 |
colin |
405136 |
%_tmpfilescreate %{name} |
86 |
boklm |
73394 |
%_post_service %{name} |
87 |
|
|
|
88 |
|
|
%preun |
89 |
|
|
%_preun_service %{name} |
90 |
|
|
rm -f %{_localstatedir}/%{name}/cached-directory |
91 |
|
|
rm -f %{_localstatedir}/%{name}/bw_accounting |
92 |
|
|
rm -f %{_localstatedir}/%{name}/control_auth_cookie |
93 |
|
|
rm -f %{_localstatedir}/%{name}/router.desc |
94 |
|
|
rm -f %{_localstatedir}/%{name}/fingerprint |
95 |
|
|
|
96 |
|
|
%postun |
97 |
|
|
%_postun_userdel %{runuser} |
98 |
|
|
%_postun_groupdel %{runuser} |
99 |
|
|
|
100 |
|
|
%files |
101 |
luigiwalser |
587873 |
%doc ReleaseNotes INSTALL LICENSE README ChangeLog doc/HACKING |
102 |
boklm |
73394 |
%{_mandir}/man*/* |
103 |
|
|
%{_bindir}/tor |
104 |
|
|
%{_bindir}/torify |
105 |
|
|
%{_bindir}/tor-resolve |
106 |
|
|
%{_bindir}/tor-gencert |
107 |
luigiwalser |
587859 |
%{_unitdir}/%{name}.service |
108 |
colin |
405136 |
%{_tmpfilesdir}/%{name}.conf |
109 |
boklm |
73394 |
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name} |
110 |
|
|
%dir %attr(0755,root,%{runuser}) %{_sysconfdir}/%{name}/ |
111 |
|
|
%config(noreplace) %attr(0644,root,%{runuser}) %{_sysconfdir}/%{name}/* |
112 |
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name} |
113 |
|
|
%attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name} |
114 |
dmorgan |
200138 |
%attr(0750,%{runuser},%{runuser}) %dir %{_var}/%{name} |
115 |
boklm |
73394 |
%attr(0750,%{runuser},%{runuser}) %dir %{_logdir}/%{name} |
116 |
|
|
%{_sysconfdir}/bash_completion.d/%{name} |
117 |
|
|
%{_datadir}/%{name} |