/[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 389213 - (hide annotations) (download)
Thu Jan 17 21:29:26 2013 UTC (8 years, 6 months ago) by pterjan
Original Path: obsolete/cauldron/tor/current/SPECS/tor.spec
File size: 4357 byte(s)
Drop 
1 boklm 73394 %define runuser toruser
2    
3     Name: tor
4 kamil 325285 Version: 0.2.3.25
5 umeabot 384656 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 colin 274222 Requires(post): systemd
11 tmb 233880 Requires(post): rpm-helper >= 0.24.8-1
12     Requires(preun): rpm-helper >= 0.24.8-1
13 dmorgan 196574 Requires(post): sysvinit
14     Requires(preun): sysvinit
15     Requires(postun): sysvinit
16 boklm 73394 Requires: openssl >= 0.9.6
17     Requires: tsocks
18     BuildRequires: openssl-devel >= 0.9.6
19     BuildRequires: libevent-devel
20     BuildRequires: zlib-devel
21     BuildRequires: autoconf2.5
22     BuildRequires: transfig, tetex-latex
23     BuildRequires: ghostscript
24     Source0: http://www.torproject.org/dist/%{name}-%{version}.tar.gz
25     Source1: %{name}.logrotate
26     Source2: %{name}.init
27     Source3: %{name}.sysconfig
28 colin 274221 Source4: %{name}.service
29     Source5: %{name}-tmpfiles.conf
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 kamil 325285
54 boklm 73394 %prep
55 kamil 325285 %setup -q
56 boklm 73394
57     %build
58     %configure2_5x
59     %make
60    
61     %install
62     %makeinstall
63    
64     %define _logdir %{_var}/log
65    
66     mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}
67     cat %{SOURCE2} > ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
68     chmod 0755 ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
69    
70     install -p -m 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc.sample ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc
71    
72     mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
73     cat %{SOURCE1} > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}
74    
75     mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/
76     cat %{SOURCE3} > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
77    
78     mkdir -p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}
79 dmorgan 200138 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_var}/%{name}
80 boklm 73394 mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_logdir}/%{name}
81    
82     # Bash completion
83     mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d
84     echo 'complete -F _command $filenames torify' > ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d/%{name}
85    
86 dmorgan 196574 # Systemd support
87     install -D -p -m 0644 %SOURCE4 $RPM_BUILD_ROOT%_unitdir/%name.service
88 colin 274221 install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
89 dmorgan 196574
90 boklm 73394 %pre
91     %_pre_useradd %{runuser} / /bin/false
92    
93     %post
94 colin 274221 systemd-tmpfiles --create %{name}.conf
95 boklm 73394 %_post_service %{name}
96    
97     %preun
98     %_preun_service %{name}
99     rm -f %{_localstatedir}/%{name}/cached-directory
100     rm -f %{_localstatedir}/%{name}/bw_accounting
101     rm -f %{_localstatedir}/%{name}/control_auth_cookie
102     rm -f %{_localstatedir}/%{name}/router.desc
103     rm -f %{_localstatedir}/%{name}/fingerprint
104    
105     %postun
106     %_postun_userdel %{runuser}
107     %_postun_groupdel %{runuser}
108    
109     %files
110 boklm 147145 %doc ReleaseNotes INSTALL LICENSE README ChangeLog doc/HACKING doc/TODO
111 boklm 73394 %{_mandir}/man*/*
112     %{_bindir}/tor
113     %{_bindir}/torify
114     %{_bindir}/tor-resolve
115     %{_bindir}/tor-gencert
116     %config(noreplace) %attr(0755,%{runuser},%{runuser}) %{_initrddir}/%{name}
117 dmorgan 196574 %_unitdir/%name.service
118 colin 274221 %{_prefix}/lib/tmpfiles.d/%{name}.conf
119 boklm 73394 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}
120     %dir %attr(0755,root,%{runuser}) %{_sysconfdir}/%{name}/
121     %config(noreplace) %attr(0644,root,%{runuser}) %{_sysconfdir}/%{name}/*
122     %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
123     %attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name}
124 dmorgan 200138 %attr(0750,%{runuser},%{runuser}) %dir %{_var}/%{name}
125 boklm 73394 %attr(0750,%{runuser},%{runuser}) %dir %{_logdir}/%{name}
126     %{_sysconfdir}/bash_completion.d/%{name}
127     %{_datadir}/%{name}

  ViewVC Help
Powered by ViewVC 1.1.28