2012-02-01 20:27:49 +04:00
|
|
|
%define runuser toruser
|
|
|
|
|
2016-04-07 15:12:34 +10:00
|
|
|
Summary: Anonymizing overlay network for TCP (The onion router)
|
2012-02-01 20:27:49 +04:00
|
|
|
Name: tor
|
2024-10-31 19:57:57 +00:00
|
|
|
Version: 0.4.8.13
|
2016-04-07 00:24:59 +04:00
|
|
|
Release: 1
|
2016-11-18 13:44:18 +03:00
|
|
|
License: BSD
|
2016-04-07 15:12:34 +10:00
|
|
|
Group: Networking/Other
|
2022-11-21 18:11:24 +03:00
|
|
|
URL: https://www.torproject.org
|
2016-08-06 18:38:51 +03:00
|
|
|
Source0: https://dist.torproject.org/%{name}-%{version}.tar.gz
|
2012-02-01 20:27:49 +04:00
|
|
|
Source1: %{name}.logrotate
|
2022-11-21 18:11:24 +03:00
|
|
|
Source3: %{name}.sysconfig
|
|
|
|
Source4: %{name}.service
|
|
|
|
Source5: %{name}-tmpfiles.conf
|
2017-01-20 12:51:31 +03:00
|
|
|
Source100: %{name}.rpmlintrc
|
2021-12-26 03:45:19 +03:00
|
|
|
# see https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/398
|
|
|
|
Patch0: %{name}-fix-build.patch
|
2016-04-07 15:12:34 +10:00
|
|
|
BuildRequires: autoconf2.5
|
|
|
|
BuildRequires: ghostscript
|
|
|
|
BuildRequires: pkgconfig(libevent)
|
2021-06-05 10:40:20 +03:00
|
|
|
#BuildRequires: pkgconfig(openssl)
|
|
|
|
BuildRequires: openssl-devel
|
2016-04-07 15:12:34 +10:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2016-11-18 13:44:18 +03:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2017-09-24 10:52:01 +03:00
|
|
|
#BuildRequires: pkgconfig(libsystemd-daemon)
|
2016-11-18 13:44:18 +03:00
|
|
|
BuildRequires: pkgconfig(libsystemd)
|
2021-12-26 03:45:19 +03:00
|
|
|
BuildRequires: pkgconfig(libzstd)
|
|
|
|
Buildrequires: pkgconfig(nss)
|
2016-04-07 15:12:34 +10:00
|
|
|
Requires: openssl
|
|
|
|
Requires: tsocks
|
|
|
|
Requires(pre,post,preun,postun): rpm-helper
|
|
|
|
Requires(post): systemd
|
2012-02-01 20:27:49 +04:00
|
|
|
|
|
|
|
%description
|
|
|
|
Tor is a connection-based low-latency anonymous communication system.
|
|
|
|
|
|
|
|
This package provides the "tor" program, which serves as both a client and
|
|
|
|
a relay node. Scripts will automatically create a "%{runuser}" user and
|
|
|
|
group, and set tor up to run as a daemon when the system is rebooted.
|
|
|
|
|
|
|
|
Applications connect to the local Tor proxy using the SOCKS
|
|
|
|
protocol. The local proxy chooses a path through a set of relays, in
|
|
|
|
which each relay knows its predecessor and successor, but no
|
|
|
|
others. Traffic flowing down the circuit is unwrapped by a symmetric
|
|
|
|
key at each relay, which reveals the downstream relay.
|
|
|
|
|
|
|
|
Warnings: Tor does no protocol cleaning. That means there is a danger
|
|
|
|
that application protocols and associated programs can be induced to
|
|
|
|
reveal information about the initiator. Tor depends on Privoxy and
|
|
|
|
similar protocol cleaners to solve this problem. This is alpha code,
|
|
|
|
and is even more likely than released code to have anonymity-spoiling
|
|
|
|
bugs. The present network is very small -- this further reduces the
|
|
|
|
strength of the anonymity provided. Tor is not presently suitable
|
|
|
|
for high-stakes anonymity.
|
|
|
|
|
2016-04-07 15:12:34 +10:00
|
|
|
%files
|
2022-11-21 18:11:24 +03:00
|
|
|
%doc ReleaseNotes INSTALL LICENSE README* ChangeLog doc/HACKING
|
2016-04-07 15:12:34 +10:00
|
|
|
%{_mandir}/man*/*
|
|
|
|
%{_bindir}/tor
|
|
|
|
%{_bindir}/torify
|
|
|
|
%{_bindir}/tor-resolve
|
2021-12-26 03:45:19 +03:00
|
|
|
#{_bindir}/tor-gencert
|
2019-12-01 21:23:11 +03:00
|
|
|
%{_bindir}/tor-print-ed-signing-cert
|
2016-04-07 15:12:34 +10:00
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
|
|
|
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
%dir %attr(0755,root,%{runuser}) %{_sysconfdir}/%{name}/
|
|
|
|
%config(noreplace) %attr(0644,root,%{runuser}) %{_sysconfdir}/%{name}/*
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
|
|
|
%attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name}
|
|
|
|
%attr(0750,%{runuser},%{runuser}) %dir %{_var}/%{name}
|
|
|
|
%attr(0750,%{runuser},%{runuser}) %dir %{_var}/log/%{name}
|
|
|
|
%{_sysconfdir}/bash_completion.d/%{name}
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%_pre_useradd %{runuser} / /bin/false
|
|
|
|
|
|
|
|
%post
|
|
|
|
%tmpfiles_create %{name}
|
|
|
|
%_post_service %{name}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%_preun_service %{name}
|
|
|
|
rm -f %{_localstatedir}/%{name}/cached-directory
|
|
|
|
rm -f %{_localstatedir}/%{name}/bw_accounting
|
|
|
|
rm -f %{_localstatedir}/%{name}/control_auth_cookie
|
|
|
|
rm -f %{_localstatedir}/%{name}/router.desc
|
|
|
|
rm -f %{_localstatedir}/%{name}/fingerprint
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%_postun_userdel %{runuser}
|
|
|
|
%_postun_groupdel %{runuser}
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
2014-04-06 17:37:25 +04:00
|
|
|
|
2012-02-01 20:27:49 +04:00
|
|
|
%prep
|
2014-04-06 17:37:25 +04:00
|
|
|
%setup -q
|
2022-05-02 22:12:50 +03:00
|
|
|
#patch0 -p0
|
2016-04-07 15:12:34 +10:00
|
|
|
|
2012-02-01 20:27:49 +04:00
|
|
|
%build
|
2021-12-26 03:45:19 +03:00
|
|
|
%configure2_5x --enable-systemd \
|
|
|
|
--enable-lzma \
|
|
|
|
--enable-zstd \
|
|
|
|
--enable-nss
|
2012-02-01 20:27:49 +04:00
|
|
|
%make
|
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
|
|
|
|
2012-09-11 05:04:47 +00:00
|
|
|
install -p -m 644 %{buildroot}%{_sysconfdir}/%{name}/torrc.sample %{buildroot}%{_sysconfdir}/%{name}/torrc
|
2012-02-01 20:27:49 +04:00
|
|
|
|
2012-09-11 05:04:47 +00:00
|
|
|
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
|
|
|
|
cat %{SOURCE1} > %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
2012-02-01 20:27:49 +04:00
|
|
|
|
2012-09-11 05:04:47 +00:00
|
|
|
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/sysconfig/
|
|
|
|
cat %{SOURCE3} > %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
2012-02-01 20:27:49 +04:00
|
|
|
|
2012-09-11 05:04:47 +00:00
|
|
|
mkdir -p -m 700 %{buildroot}%{_localstatedir}/lib/%{name}
|
2014-04-06 17:37:25 +04:00
|
|
|
mkdir -p -m 755 %{buildroot}%{_var}/%{name}
|
2016-04-07 15:12:34 +10:00
|
|
|
mkdir -p -m 755 %{buildroot}%{_var}/log/%{name}
|
2012-02-01 20:27:49 +04:00
|
|
|
|
|
|
|
# Bash completion
|
2012-09-11 05:04:47 +00:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
|
|
|
|
echo 'complete -F _command $filenames torify' > %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
|
2012-02-01 20:27:49 +04:00
|
|
|
|
2014-04-06 17:37:25 +04:00
|
|
|
# Systemd support
|
2016-04-07 15:12:34 +10:00
|
|
|
install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
|
2014-04-06 17:37:25 +04:00
|
|
|
install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|