/[packages]/cauldron/tor/current/SPECS/tor.spec
ViewVC logotype

Contents of /cauldron/tor/current/SPECS/tor.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 274221 - (show annotations) (download)
Wed Jul 25 12:23:32 2012 UTC (9 years ago) by colin
File size: 4332 byte(s)
- Fix tor systemd unit (mga#6843)
- Use tmpfiles for pid dir
1 %define runuser toruser
2
3 Name: tor
4 Version: 0.2.2.37
5 Release: %mkrel 2
6 Summary: Anonymizing overlay network for TCP (The onion router)
7 URL: http://www.torproject.org/
8 Group: Networking/Other
9 License: BSD-like
10 Requires(post): rpm-helper >= 0.24.8-1
11 Requires(preun): rpm-helper >= 0.24.8-1
12 Requires(post): sysvinit
13 Requires(preun): sysvinit
14 Requires(postun): sysvinit
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 Source4: %{name}.service
28 Source5: %{name}-tmpfiles.conf
29
30 %description
31 Tor is a connection-based low-latency anonymous communication system.
32
33 This package provides the "tor" program, which serves as both a client and
34 a relay node. Scripts will automatically create a "%{runuser}" user and
35 group, and set tor up to run as a daemon when the system is rebooted.
36
37 Applications connect to the local Tor proxy using the SOCKS
38 protocol. The local proxy chooses a path through a set of relays, in
39 which each relay knows its predecessor and successor, but no
40 others. Traffic flowing down the circuit is unwrapped by a symmetric
41 key at each relay, which reveals the downstream relay.
42
43 Warnings: Tor does no protocol cleaning. That means there is a danger
44 that application protocols and associated programs can be induced to
45 reveal information about the initiator. Tor depends on Privoxy and
46 similar protocol cleaners to solve this problem. This is alpha code,
47 and is even more likely than released code to have anonymity-spoiling
48 bugs. The present network is very small -- this further reduces the
49 strength of the anonymity provided. Tor is not presently suitable
50 for high-stakes anonymity.
51
52 %prep
53 %setup -q
54
55 %build
56 %configure2_5x
57 %make
58
59 %install
60 %makeinstall
61
62 %define _logdir %{_var}/log
63
64 mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}
65 cat %{SOURCE2} > ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
66 chmod 0755 ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
67
68 install -p -m 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc.sample ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc
69
70 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
71 cat %{SOURCE1} > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}
72
73 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/
74 cat %{SOURCE3} > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
75
76 mkdir -p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}
77 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_var}/%{name}
78 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_logdir}/%{name}
79
80 # Bash completion
81 mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d
82 echo 'complete -F _command $filenames torify' > ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d/%{name}
83
84 # Systemd support
85 install -D -p -m 0644 %SOURCE4 $RPM_BUILD_ROOT%_unitdir/%name.service
86 install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
87
88 %pre
89 %_pre_useradd %{runuser} / /bin/false
90
91 %post
92 systemd-tmpfiles --create %{name}.conf
93 %_post_service %{name}
94
95 %preun
96 %_preun_service %{name}
97 rm -f %{_localstatedir}/%{name}/cached-directory
98 rm -f %{_localstatedir}/%{name}/bw_accounting
99 rm -f %{_localstatedir}/%{name}/control_auth_cookie
100 rm -f %{_localstatedir}/%{name}/router.desc
101 rm -f %{_localstatedir}/%{name}/fingerprint
102
103 %postun
104 %_postun_userdel %{runuser}
105 %_postun_groupdel %{runuser}
106
107 %files
108 %doc ReleaseNotes 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 %_unitdir/%name.service
116 %{_prefix}/lib/tmpfiles.d/%{name}.conf
117 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}
118 %dir %attr(0755,root,%{runuser}) %{_sysconfdir}/%{name}/
119 %config(noreplace) %attr(0644,root,%{runuser}) %{_sysconfdir}/%{name}/*
120 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
121 %attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name}
122 %attr(0750,%{runuser},%{runuser}) %dir %{_var}/%{name}
123 %attr(0750,%{runuser},%{runuser}) %dir %{_logdir}/%{name}
124 %{_sysconfdir}/bash_completion.d/%{name}
125 %{_datadir}/%{name}

  ViewVC Help
Powered by ViewVC 1.1.28