/[packages]/updates/1/tor/current/SPECS/tor.spec
ViewVC logotype

Contents of /updates/1/tor/current/SPECS/tor.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30