/[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 670543 - (show annotations) (download)
Mon Sep 1 15:21:40 2014 UTC (5 years, 5 months ago) by wally
File size: 3847 byte(s)
- add some comments to .spec (SILENT)
1 %define runuser toruser
2
3 Name: tor
4 Version: 0.2.4.23
5 Release: %mkrel 1
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): systemd >= %{systemd_required_version}
11 Requires(post): rpm-helper >= 0.24.8-1
12 Requires(preun): rpm-helper >= 0.24.8-1
13 Requires(post): sysvinit
14 Requires(preun): sysvinit
15 Requires(postun): sysvinit
16 Requires: openssl >= 0.9.8
17 Requires: tsocks
18 BuildRequires: openssl-devel >= 0.9.8
19 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 Source4: %{name}.service
25 Source5: %{name}-tmpfiles.conf
26
27 %description
28 Tor is a connection-based low-latency anonymous communication system.
29
30 This package provides the "tor" program, which serves as both a client and
31 a relay node. Scripts will automatically create a "%{runuser}" user and
32 group, and set tor up to run as a daemon when the system is rebooted.
33
34 Applications connect to the local Tor proxy using the SOCKS
35 protocol. The local proxy chooses a path through a set of relays, in
36 which each relay knows its predecessor and successor, but no
37 others. Traffic flowing down the circuit is unwrapped by a symmetric
38 key at each relay, which reveals the downstream relay.
39
40 Warnings: Tor does no protocol cleaning. That means there is a danger
41 that application protocols and associated programs can be induced to
42 reveal information about the initiator. Tor depends on Privoxy and
43 similar protocol cleaners to solve this problem. This is alpha code,
44 and is even more likely than released code to have anonymity-spoiling
45 bugs. The present network is very small -- this further reduces the
46 strength of the anonymity provided. Tor is not presently suitable
47 for high-stakes anonymity.
48
49
50 %prep
51 %setup -q
52
53 %build
54 %configure2_5x
55 %make
56
57 %install
58 %makeinstall
59
60 # config file
61 install -p -m 644 %{buildroot}%{_sysconfdir}/%{name}/torrc.sample \
62 %{buildroot}%{_sysconfdir}/%{name}/torrc
63
64 # logrotate config
65 mkdir -p -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
66 cat %{SOURCE1} > %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
67
68 # needed directories
69 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
73 # Bash completion
74 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
75 echo 'complete -F _command $filenames torify' > %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
76
77 # Systemd support
78 install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
79 install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
80
81 %pre
82 %_pre_useradd %{runuser} %{_localstatedir}/lib/%{name} /bin/false
83
84 %post
85 %_tmpfilescreate %{name}
86 %_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 %doc ReleaseNotes INSTALL LICENSE README ChangeLog doc/HACKING
102 %{_mandir}/man*/*
103 %{_bindir}/tor
104 %{_bindir}/torify
105 %{_bindir}/tor-resolve
106 %{_bindir}/tor-gencert
107 %{_unitdir}/%{name}.service
108 %{_tmpfilesdir}/%{name}.conf
109 %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 %attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name}
113 %attr(0750,%{runuser},%{runuser}) %dir %{_var}/%{name}
114 %attr(0750,%{runuser},%{runuser}) %dir %{_logdir}/%{name}
115 %{_sysconfdir}/bash_completion.d/%{name}
116 %{_datadir}/%{name}

  ViewVC Help
Powered by ViewVC 1.1.26