/[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 793870 - (show annotations) (download)
Mon Oct 27 14:45:39 2014 UTC (9 years, 5 months ago) by wally
File size: 3587 byte(s)
- simplify logrotate config parts in .spec (SILENT)
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 install -D -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
71
72 # needed directories
73 mkdir -p -m 700 %{buildroot}%{_localstatedir}/lib/%{name}
74 mkdir -p -m 755 %{buildroot}%{_logdir}/%{name}
75
76 # Bash completion
77 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
78 echo 'complete -F _command $filenames torify' > %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
79
80 # Systemd support
81 install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
82 install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
83
84 %pre
85 %_pre_useradd %{runuser} %{_localstatedir}/lib/%{name} /bin/false
86
87 %post
88 %_tmpfilescreate %{name}
89 %_post_service %{name}
90
91 %preun
92 %_preun_service %{name}
93
94 %postun
95 %_postun_userdel %{runuser}
96 %_postun_groupdel %{runuser}
97
98 %files
99 %doc ReleaseNotes INSTALL LICENSE README ChangeLog doc/HACKING
100 %{_mandir}/man*/*
101 %{_bindir}/tor
102 %{_bindir}/torify
103 %{_bindir}/tor-resolve
104 %{_bindir}/tor-gencert
105 %{_unitdir}/%{name}.service
106 %{_tmpfilesdir}/%{name}.conf
107 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
108 %dir %attr(0755,root,%{runuser}) %{_sysconfdir}/%{name}/
109 %config(noreplace) %attr(0644,root,%{runuser}) %{_sysconfdir}/%{name}/*
110 %attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name}
111 %attr(0750,%{runuser},%{runuser}) %dir %{_logdir}/%{name}
112 %{_sysconfdir}/bash_completion.d/%{name}
113 %{_datadir}/%{name}

  ViewVC Help
Powered by ViewVC 1.1.30