/[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 599293 - (show annotations) (download)
Tue Mar 4 03:43:03 2014 UTC (6 years, 1 month ago) by fwang
File size: 4366 byte(s)
0.2.4.21
1 %define runuser toruser
2
3 Name: tor
4 Version: 0.2.4.21
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 BuildRequires: transfig
23 BuildRequires: texlive
24 BuildRequires: ghostscript
25 Source0: http://www.torproject.org/dist/%{name}-%{version}.tar.gz
26 Source1: %{name}.logrotate
27 Source2: %{name}.init
28 Source3: %{name}.sysconfig
29 Source4: %{name}.service
30 Source5: %{name}-tmpfiles.conf
31
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
55 %prep
56 %setup -q
57
58 %build
59 %configure2_5x
60 %make
61
62 %install
63 %makeinstall
64
65 %define _logdir %{_var}/log
66
67 mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}
68 cat %{SOURCE2} > ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
69 chmod 0755 ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
70
71 install -p -m 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc.sample ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc
72
73 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
74 cat %{SOURCE1} > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}
75
76 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/
77 cat %{SOURCE3} > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
78
79 mkdir -p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}
80 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_var}/%{name}
81 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_logdir}/%{name}
82
83 # Bash completion
84 mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d
85 echo 'complete -F _command $filenames torify' > ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d/%{name}
86
87 # Systemd support
88 install -D -p -m 0644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service
89 install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
90
91 %pre
92 %_pre_useradd %{runuser} / /bin/false
93
94 %post
95 %_tmpfilescreate %{name}
96 %_post_service %{name}
97
98 %preun
99 %_preun_service %{name}
100 rm -f %{_localstatedir}/%{name}/cached-directory
101 rm -f %{_localstatedir}/%{name}/bw_accounting
102 rm -f %{_localstatedir}/%{name}/control_auth_cookie
103 rm -f %{_localstatedir}/%{name}/router.desc
104 rm -f %{_localstatedir}/%{name}/fingerprint
105
106 %postun
107 %_postun_userdel %{runuser}
108 %_postun_groupdel %{runuser}
109
110 %files
111 %doc ReleaseNotes INSTALL LICENSE README ChangeLog doc/HACKING
112 %{_mandir}/man*/*
113 %{_bindir}/tor
114 %{_bindir}/torify
115 %{_bindir}/tor-resolve
116 %{_bindir}/tor-gencert
117 %config(noreplace) %attr(0755,%{runuser},%{runuser}) %{_initrddir}/%{name}
118 %{_unitdir}/%{name}.service
119 %{_tmpfilesdir}/%{name}.conf
120 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}
121 %dir %attr(0755,root,%{runuser}) %{_sysconfdir}/%{name}/
122 %config(noreplace) %attr(0644,root,%{runuser}) %{_sysconfdir}/%{name}/*
123 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
124 %attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name}
125 %attr(0750,%{runuser},%{runuser}) %dir %{_var}/%{name}
126 %attr(0750,%{runuser},%{runuser}) %dir %{_logdir}/%{name}
127 %{_sysconfdir}/bash_completion.d/%{name}
128 %{_datadir}/%{name}

  ViewVC Help
Powered by ViewVC 1.1.26