Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:linux4humans:cryptocurrencies
tor
tor.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tor.spec of Package tor
# # spec file for package tor # # Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{!?make_build: %define make_build make %{?_smp_mflags}} %define with_bufferevents 0%{?suse_version} > 1220 %define toruser %{name} %define torgroup %{name} %define home_dir %{_localstatedir}/lib/empty Name: tor Version: 0.4.6.8 Release: 0 Summary: Anonymizing overlay network for TCP (The onion router) License: BSD-3-Clause Group: Productivity/Networking/Security URL: https://www.torproject.org/ Source0: https://www.torproject.org/dist/%{name}-%{version}.tar.gz Source1: https://www.torproject.org/dist/%{name}-%{version}.tar.gz.asc # https://www.torproject.org/docs/signing-keys.html.en Source2: tor.keyring Source3: tor.service Source4: tor.tmpfiles Source5: defaults-torrc Source6: tor-master.service Source7: tor.firewall Patch0: tor-0.2.5.x-logrotate.patch Patch1: fix-test.patch Patch2: tor-0.4.1-remove-obsolete-suse-script.patch Patch3: tor-0.4.2-remove-torctl.patch %if %{?sles_version} == 11 BuildRequires: gcc48 %endif BuildRequires: automake BuildRequires: autoconf BuildRequires: libtool BuildRequires: openssl-devel >= 1.0.1 BuildRequires: pkgconfig >= 0.9.0 BuildRequires: pwdutils %if 0%{?suse_version} < 1230 BuildRequires: python-base %else BuildRequires: python3-base %endif BuildRequires: libcap-devel %if %with_bufferevents BuildRequires: libevent-devel >= 2.0.10 %else BuildRequires: libevent-devel %endif BuildRequires: xz-devel #BuildRequires: libseccomp-devel %if 0%{?suse_version} >= 1230 BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(systemd) %systemd_ordering %endif %if 0%{?suse_version} >= 1315 BuildRequires: libzstd-devel %endif BuildRequires: zlib-devel Requires: logrotate Requires(post): %fillup_prereq Recommends: torsocks BuildRoot: %{_tmppath}/%{name}-%{version}-build %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 "%{toruser}" user and a "%{torgroup}" 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 tor client 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 or 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 small -- this further reduces the strength of the anonymity provided. Tor is not presently suitable for high-stakes anonymity. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 -R %patch3 -p1 -R %build %if %{?sles_version} == 11 export CC=gcc-4.8 %endif autoreconf -vfi %configure \ --disable-silent-rules \ --with-tor-user=%{toruser} \ --with-tor-group=%{torgroup} \ %if 0%{?suse_version} >= 1230 --enable-systemd \ %else --disable-systemd \ %endif --enable-lzma \ %if 0%{?suse_version} >= 1315 --enable-zstd \ %endif --disable-seccomp \ --disable-unittests \ --disable-gcc-warnings-advisory \ --docdir=%{_docdir}/%{name} %make_build %install %make_install # missing dirs install -d -m 700 \ %{buildroot}%{_localstatedir}/lib/%{name} \ %{buildroot}%{_localstatedir}/tmp/%{name} install -d -m 755 \ %{buildroot}%{_localstatedir}/log/%{name} \ %{buildroot}/%{_sbindir} %if 0%{?suse_version} >= 1230 install -m 644 -D %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service install -m 644 -D %{SOURCE6} %{buildroot}/%{_unitdir}/%{name}-master.service install -d -m 0755 %{buildroot}%{_tmpfilesdir}/ install -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf ln -s -f service %{buildroot}%{_sbindir}/rc%{name} ln -s -f service %{buildroot}%{_sbindir}/rc%{name}-master %else # init script install -D -m 755 contrib/dist/suse/tor.sh %{buildroot}/%{_initddir}/%{name} ln -s -f ../..%{_initddir}/%{name} %{buildroot}%{_sbindir}/rc%{name} %endif install -m 644 %{SOURCE5} %{buildroot}%{_datadir}/tor/defaults-torrc # firewall config install -m 644 -D %{SOURCE7} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} # control script install -p -m 755 contrib/dist/torctl %{buildroot}/%{_bindir} # sample config files install -p -m 644 -D src/config/torrc.{sample,minimal} %{buildroot}/%{_sysconfdir}/%{name} install -p -m 644 src/config/torrc.minimal %{buildroot}/%{_sysconfdir}/%{name}/torrc # logrotate conf sed -i -e "s|_tor|tor|g" contrib/operator-tools/tor.logrotate install -D -m 644 contrib/operator-tools/tor.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} #%check #%ifnarch ppc ppc64 ppc64le aarch64 armv7l i586 #%make_build check || ( # find -type f -name test-suite.log -print -exec cat {} + # exit 42 #) #%endif %pre getent group %{torgroup} >/dev/null || groupadd -r %{torgroup} getent passwd %{toruser} >/dev/null || useradd -r -g %{torgroup} -d %{home_dir} -s /sbin/nologin -c "User for %{name}" %{toruser} %if 0%{?suse_version} >= 1230 %service_add_pre tor.service tor-master.service %endif %post %fillup_only %if 0%{?suse_version} >= 1230 %service_add_post tor.service tor-master.service systemd-tmpfiles --create %{_tmpfilesdir}/tor.conf || : %else %fillup_and_insserv tor %endif %preun %if 0%{?suse_version} >= 1230 %service_del_preun tor.service tor-master.service %else %stop_on_removal tor %endif %postun %if 0%{?suse_version} >= 1230 %service_del_postun tor.service tor-master.service %else %insserv_cleanup %restart_on_update tor %endif %files %defattr(-,root,root) %doc LICENSE %doc README ChangeLog doc/HACKING doc/man/*.html %{_mandir}/man*/* %{_bindir}/* %{_sbindir}/* %dir %{_datadir}/%{name} %{_datadir}/%{name}/geoip* %{_datadir}/%{name}/defaults-torrc %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name} %dir %attr(0755,root,%{torgroup}) %{_sysconfdir}/%{name} %config(noreplace) %attr(0644,root,%{torgroup}) %{_sysconfdir}/%{name}/torrc %config %attr(0644,root,%{torgroup}) %{_sysconfdir}/%{name}/torrc.* %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} %attr(0700,%{toruser},%{torgroup}) %dir %{_localstatedir}/lib/%{name} %attr(0750,%{toruser},%{torgroup}) %dir %{_localstatedir}/log/%{name} %if 0%{?suse_version} >= 1230 %{_unitdir}/%{name}.service %{_unitdir}/%{name}-master.service %{_tmpfilesdir}/%{name}.conf %{_sbindir}/rc%{name} %{_sbindir}/rc%{name}-master %else %config %{_initddir}/%{name} %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor