/[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 793869 - (show annotations) (download)
Mon Oct 27 14:44:19 2014 UTC (9 years, 5 months ago) by wally
File size: 3649 byte(s)
- drop unneeded /var/tor dir
1 %define runuser toruser
2
3 #comment out if not rc
4 #define prel rc
5
6 %define rel 1
7
8 Name: tor
9 Version: 0.2.5.10
10 Release: %mkrel %{?prel:0.%prel.}%{rel}
11 Summary: Anonymizing overlay network for TCP (The onion router)
12 URL: http://www.torproject.org/
13 Group: Networking/Other
14 License: BSD-like
15 Requires(post): systemd >= %{systemd_required_version}
16 Requires(post): rpm-helper >= 0.24.8-1
17 Requires(preun): rpm-helper >= 0.24.8-1
18 Requires(post): sysvinit
19 Requires(preun): sysvinit
20 Requires(postun): sysvinit
21 Requires: openssl >= 0.9.8
22 Requires: tsocks
23 BuildRequires: openssl-devel >= 0.9.8
24 BuildRequires: libevent-devel
25 BuildRequires: zlib-devel
26 BuildRequires: autoconf2.5
27 Source0: http://www.torproject.org/dist/%{name}-%{version}%{?prel:-%prel}.tar.gz
28 Source1: %{name}.logrotate
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 -n %{name}-%{version}%{?prel:-%prel}
57
58 %build
59 %configure2_5x
60 %make V=1
61
62 %install
63 %makeinstall_std
64
65 # config file
66 install -p -m 644 %{buildroot}%{_sysconfdir}/%{name}/torrc.sample \
67 %{buildroot}%{_sysconfdir}/%{name}/torrc
68
69 # logrotate config
70 mkdir -p -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
71 cat %{SOURCE1} > %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
72
73 # needed directories
74 mkdir -p -m 700 %{buildroot}%{_localstatedir}/lib/%{name}
75 mkdir -p -m 755 %{buildroot}%{_logdir}/%{name}
76
77 # Bash completion
78 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
79 echo 'complete -F _command $filenames torify' > %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
80
81 # Systemd support
82 install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
83 install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
84
85 %pre
86 %_pre_useradd %{runuser} %{_localstatedir}/lib/%{name} /bin/false
87
88 %post
89 %_tmpfilescreate %{name}
90 %_post_service %{name}
91
92 %preun
93 %_preun_service %{name}
94
95 %postun
96 %_postun_userdel %{runuser}
97 %_postun_groupdel %{runuser}
98
99 %files
100 %doc ReleaseNotes INSTALL LICENSE README ChangeLog doc/HACKING
101 %{_mandir}/man*/*
102 %{_bindir}/tor
103 %{_bindir}/torify
104 %{_bindir}/tor-resolve
105 %{_bindir}/tor-gencert
106 %{_unitdir}/%{name}.service
107 %{_tmpfilesdir}/%{name}.conf
108 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}
109 %dir %attr(0755,root,%{runuser}) %{_sysconfdir}/%{name}/
110 %config(noreplace) %attr(0644,root,%{runuser}) %{_sysconfdir}/%{name}/*
111 %attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name}
112 %attr(0750,%{runuser},%{runuser}) %dir %{_logdir}/%{name}
113 %{_sysconfdir}/bash_completion.d/%{name}
114 %{_datadir}/%{name}

  ViewVC Help
Powered by ViewVC 1.1.30