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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 257305 - (hide annotations) (download)
Fri Jun 8 05:43:02 2012 UTC (9 years, 1 month ago) by fwang
File size: 4255 byte(s)
new version 0.2.2.36
1 boklm 73394 %define runuser toruser
2    
3     Name: tor
4 fwang 257305 Version: 0.2.2.36
5     Release: %mkrel 1
6 boklm 73394 Summary: Anonymizing overlay network for TCP (The onion router)
7     URL: http://www.torproject.org/
8     Group: Networking/Other
9     License: BSD-like
10 tmb 233880 Requires(post): rpm-helper >= 0.24.8-1
11     Requires(preun): rpm-helper >= 0.24.8-1
12 dmorgan 196574 Requires(post): sysvinit
13     Requires(preun): sysvinit
14     Requires(postun): sysvinit
15 boklm 73394 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 dmorgan 196574 Source4: tor.systemd.service
28 boklm 73394
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    
54     %build
55     %configure2_5x
56     %make
57    
58     %install
59     %makeinstall
60    
61     %define _logdir %{_var}/log
62    
63     mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}
64     cat %{SOURCE2} > ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
65     chmod 0755 ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
66    
67     install -p -m 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc.sample ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc
68    
69     mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
70     cat %{SOURCE1} > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}
71    
72     mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/
73     cat %{SOURCE3} > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
74    
75     mkdir -p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}
76     mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_var}/run/%{name}
77 dmorgan 200138 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_var}/%{name}
78 boklm 73394 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 dmorgan 196574 # Systemd support
85     install -D -p -m 0644 %SOURCE4 $RPM_BUILD_ROOT%_unitdir/%name.service
86    
87 boklm 73394 %pre
88     %_pre_useradd %{runuser} / /bin/false
89    
90     %post
91     %_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 boklm 147145 %doc ReleaseNotes INSTALL LICENSE README ChangeLog doc/HACKING doc/TODO
107 boklm 73394 %{_mandir}/man*/*
108     %{_bindir}/tor
109     %{_bindir}/torify
110     %{_bindir}/tor-resolve
111     %{_bindir}/tor-gencert
112     %config(noreplace) %attr(0755,%{runuser},%{runuser}) %{_initrddir}/%{name}
113 dmorgan 196574 %_unitdir/%name.service
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     %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
118     %attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name}
119     %attr(0750,%{runuser},%{runuser}) %dir %{_var}/run/%{name}
120 dmorgan 200138 %attr(0750,%{runuser},%{runuser}) %dir %{_var}/%{name}
121 boklm 73394 %attr(0750,%{runuser},%{runuser}) %dir %{_logdir}/%{name}
122     %{_sysconfdir}/bash_completion.d/%{name}
123     %{_datadir}/%{name}

  ViewVC Help
Powered by ViewVC 1.1.28