]> git.pld-linux.org Git - packages/tor.git/blame - tor.spec
- new, NFY
[packages/tor.git] / tor.spec
CommitLineData
86ae6c7b 1Summary: Anonymizing overlay network for TCP (The onion router)
2Name: tor
3Version: 0.1.0.14
4Release: 0.1
5Source0: http://tor.eff.org/dist/%{name}-%{version}.tar.gz
6# Source0-md5: f210023a97b5b97d1517a47f587876b9
7Source1: %{name}.logrotate
8URL: http://tor.eff.org/
9Group: Networking/Daemons
10License: BSD-like
11BuildRequires: libevent-devel
12BuildRequires: openssl-devel >= 0.9.6
13BuildRequires: rpm-build >= 4.0
14Requires(pre): shadow-utils, /usr/bin/id, /bin/date, /bin/sh
15BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17%description
18Tor is a connection-based low-latency anonymous communication system.
19
20This package provides the "tor" program, which serves as both a client
21and a relay node. Scripts will automatically create a "tor"
22user and group, and set tor up to run as a daemon when the system is
23rebooted.
24
25Applications connect to the local Tor proxy using the SOCKS protocol.
26The local proxy chooses a path through a set of relays, in which each
27relay knows its predecessor and successor, but no others. Traffic
28flowing down the circuit is unwrapped by a symmetric key at each
29relay, which reveals the downstream relay.
30
31Warnings: Tor does no protocol cleaning. That means there is a danger
32that application protocols and associated programs can be induced to
33reveal information about the initiator. Tor depends on Privoxy and
34similar protocol cleaners to solve this problem. This is alpha code,
35and is even more likely than released code to have anonymity-spoiling
36bugs. The present network is very small -- this further reduces the
37strength of the anonymity provided. Tor is not presently suitable for
38high-stakes anonymity.
39
40%prep
41%setup -q -n %{name}-%{version}
42
43%build
44%configure
45%{__make}
46
47%install
48rm -rf $RPM_BUILD_ROOT
49
50%{__make} install \
51 DESTDIR=$RPM_BUILD_ROOT
52
53mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/torrc{.sample,}
54install -D contrib/tor.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
55install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
56
57%{__mkdir_p} $RPM_BUILD_ROOT/var/lib/%{name}
58%{__mkdir_p} $RPM_BUILD_ROOT/var/run/%{name}
59%{__mkdir_p} $RPM_BUILD_ROOT/var/log/{,archiv/}%{name}
60
61%clean
62rm -rf $RPM_BUILD_ROOT
63
64%pre
65%groupadd -g 156 tor
66%useradd -u 156 -r -d /var/lib/tor -s /bin/false -c "Tor" -g tor tor
67[ -f %{_initrddir}/%{name} ] && /sbin/service %{name} stop
68
69%post
70/sbin/chkconfig --add %{name}
71%service %{name} restart
72
73%preun
74if [ "$1" = "0" ]; then
75 %service -q %{name} stop
76 /sbin/chkconfig --del %{name}
77 #%{__rm} -f ${_localstatedir}/lib/%{name}/cached-directory
78 #%{__rm} -f ${_localstatedir}/lib/%{name}/bw_accounting
79 #%{__rm} -f ${_localstatedir}/lib/%{name}/control_auth_cookie
80 #%{__rm} -f ${_localstatedir}/lib/%{name}/router.desc
81 #%{__rm} -f ${_localstatedir}/lib/%{name}/fingerprint
82fi
83
84%files
85%defattr(644,root,root,755)
86%doc AUTHORS INSTALL LICENSE README ChangeLog doc/HACKING doc/TODO doc/FAQ
87%attr(755,root,root) %{_bindir}/*
88%{_mandir}/man?/*
89%config %{_initrddir}/%{name}
90%dir %attr(755,root,tor) %{_sysconfdir}/%{name}/
91%attr(644,root,tor) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*
92%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
93%dir %attr(750,root,tor) /var/lib/%{name}
94%dir %attr(750,root,tor) /var/run/%{name}
95%dir %attr(750,root,tor) /var/log/{,archiv/}%{name}
This page took 0.059584 seconds and 4 git commands to generate.