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