/[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 196574 - (hide annotations) (download)
Sun Jan 15 22:28:56 2012 UTC (9 years, 6 months ago) by dmorgan
File size: 4182 byte(s)
Add systemd support ( from fedora)
1 boklm 73394 %define runuser toruser
2    
3     Name: tor
4 kharec 183206 Version: 0.2.2.35
5 dmorgan 196574 Release: %mkrel 2
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     Requires(pre): rpm-helper
11     Requires(post): rpm-helper
12     Requires(preun): rpm-helper
13     Requires(postun): rpm-helper
14 dmorgan 196574 Requires(post): sysvinit
15     Requires(preun): sysvinit
16     Requires(postun): sysvinit
17 boklm 73394 Requires: openssl >= 0.9.6
18     Requires: tsocks
19     BuildRequires: openssl-devel >= 0.9.6
20     BuildRequires: libevent-devel
21     BuildRequires: zlib-devel
22     BuildRequires: autoconf2.5
23     BuildRequires: transfig, tetex-latex
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 dmorgan 196574 Source4: tor.systemd.service
30 boklm 73394
31     %description
32     Tor is a connection-based low-latency anonymous communication system.
33    
34     This package provides the "tor" program, which serves as both a client and
35     a relay node. Scripts will automatically create a "%{runuser}" user and
36     group, and set tor up to run as a daemon when the system is rebooted.
37    
38     Applications connect to the local Tor proxy using the SOCKS
39     protocol. The local proxy chooses a path through a set of relays, in
40     which each relay knows its predecessor and successor, but no
41     others. Traffic flowing down the circuit is unwrapped by a symmetric
42     key at each relay, which reveals the downstream relay.
43    
44     Warnings: Tor does no protocol cleaning. That means there is a danger
45     that application protocols and associated programs can be induced to
46     reveal information about the initiator. Tor depends on Privoxy and
47     similar protocol cleaners to solve this problem. This is alpha code,
48     and is even more likely than released code to have anonymity-spoiling
49     bugs. The present network is very small -- this further reduces the
50     strength of the anonymity provided. Tor is not presently suitable
51     for high-stakes anonymity.
52    
53     %prep
54     %setup -q
55    
56     %build
57     %configure2_5x
58     %make
59    
60     %install
61     %makeinstall
62    
63     %define _logdir %{_var}/log
64    
65     mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}
66     cat %{SOURCE2} > ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
67     chmod 0755 ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
68    
69     install -p -m 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc.sample ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc
70    
71     mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
72     cat %{SOURCE1} > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}
73    
74     mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/
75     cat %{SOURCE3} > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
76    
77     mkdir -p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}
78     mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_var}/run/%{name}
79     mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_logdir}/%{name}
80    
81     # Bash completion
82     mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d
83     echo 'complete -F _command $filenames torify' > ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d/%{name}
84    
85 dmorgan 196574 # Systemd support
86     install -D -p -m 0644 %SOURCE4 $RPM_BUILD_ROOT%_unitdir/%name.service
87    
88 boklm 73394 %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 boklm 147145 %doc ReleaseNotes INSTALL LICENSE README ChangeLog doc/HACKING doc/TODO
108 boklm 73394 %{_mandir}/man*/*
109     %{_bindir}/tor
110     %{_bindir}/torify
111     %{_bindir}/tor-resolve
112     %{_bindir}/tor-gencert
113     %config(noreplace) %attr(0755,%{runuser},%{runuser}) %{_initrddir}/%{name}
114 dmorgan 196574 %_unitdir/%name.service
115 boklm 73394 %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    

  ViewVC Help
Powered by ViewVC 1.1.28