backport the maint-0.2.1 rpm spec file to maint-0.2.0

This commit is contained in:
Andrew Lewman 2009-06-18 20:42:35 -04:00
parent da34729532
commit 025f526e63
1 changed files with 31 additions and 39 deletions

View File

@ -15,23 +15,6 @@
%define toruser @TORUSER@
%define torgroup @TORGROUP@
## Target a specific arch and OS
#
# default is i386 linux
%define target gnu
%define target_cpu i386
%define target_os linux
## Override any system rpm macros
#
%define _arch %{target_cpu}
%define _build_arch %{target_cpu}
%define _vendor %{target_os}
%define _host %{target_cpu}-pc-%{target_os}-%{target}
%define _host_cpu %{target_cpu}
%define _host_vendor %{target_os}
%define optflags -march=%{target_cpu} -mtune=%{target_cpu} -O2
## Version song and dance
#
# This should be the Tor version number, as it appears on the tarball,
@ -45,7 +28,6 @@
## Define output filename
#
# This creates filenames based upon the value of target_cpu defined above
%define _build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%{target_cpu}.rpm
## Release and OS identification song and dance
#
@ -61,24 +43,26 @@
%define is_fc %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_mdk %(test -e /etc/mandrake-release && echo 1 || echo 0)
%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
%define is_rfl %(test -e /etc/redflag-release && echo 1 || echo 0)
%if %{is_fc}
%define ostag %(sed -e 's/^.*release /fc/' -e 's/ .*$//' -e 's/\\./_/g' < /etc/fedora-release)
%else
%endif
%if %{is_rh}
%define ostag %(sed -e 's/^.*release /rh/' -e 's/ .*$//' -e 's/\\./_/g' < /etc/redhat-release)
%endif
%endif
# These are probably wrong... just placeholders should we actually
# end up supporting these distributions
%if %{is_mdk}
%define ostag mdk
%endif
%if %{is_suse}
%define ostag suse
%define ostag suse%(grep openSUSE /etc/SuSE-release | awk '{print $2}' | sed -e 's/\\./_/')
%endif
%if %{is_rfl}
%define ostag %(sed -e 's/^.*Desktop /redflag/' -e 's/ .*$//' -e 's/\\./_/g' < /etc/redflag-release)
%endif
# Using the build date ensures that every build really does get
@ -120,16 +104,16 @@ Summary: Anonymizing overlay network for TCP (The onion router)
URL: https://www.torproject.org/
Group: System Environment/Daemons
License: BSD-like
Vendor: R. Dingledine <arma@seul.org>
Packager: Andrew Lewman <phobos@rootme.org>
License: 3-clause BSD
Vendor: The Tor Project (https://torproject.org)
Packager: Andrew Lewman <andrew@torproject.org>
%if %{is_suse}
Requires: openssl >= 0.9.6
BuildRequires: openssl-devel >= 0.9.6, rpm >= 4.0, zlib-devel
Requires: openssl >= 0.9.7
BuildRequires: openssl-devel >= 0.9.7, rpm >= 4.0, zlib-devel
%else
Requires: openssl >= 0.9.6
BuildRequires: openssl-devel >= 0.9.6, libevent-devel >= 1.1a
Requires: openssl >= 0.9.7
BuildRequires: openssl-devel >= 0.9.7
%endif
%if %{is_fc}
BuildRequires: rpm-build >= 4.0
@ -150,17 +134,17 @@ 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 local proxy chooses a path through a set of relays, in
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 and
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 very small -- this further reduces the
bugs. The present network is small -- this further reduces the
strength of the anonymity provided. Tor is not presently suitable
for high-stakes anonymity.
@ -169,11 +153,9 @@ for high-stakes anonymity.
%build
%if %{is_suse}
%configure --with-tor-user=%{toruser} --with-tor-group=%{torgroup} \
--build=%{_host} --host=%{_host} --target=%{_host}
%configure --with-tor-user=%{toruser} --with-tor-group=%{torgroup}
%else
%configure --with-tor-user=%{toruser} --with-tor-group=%{torgroup} \
--build=%{_host} --host=%{_host} --target=%{_host}
%configure --with-tor-user=%{toruser} --with-tor-group=%{torgroup}
%endif
%make
@ -190,7 +172,7 @@ for high-stakes anonymity.
%__install -p -m 755 contrib/torctl ${RPM_BUILD_ROOT}%{_bindir}
# Set up config file; "sample" file implements a basic user node.
%__install -p -m 644 src/config/torrc.sample ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc.sample
%__install -p -m 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc.sample ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc
# Install the logrotate control file.
%__mkdir_p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
@ -298,6 +280,16 @@ exit 0
%changelog
* Fri May 01 2009 Andrew Lewman <andrew@torproject.org>
- clean up distro detection and remove dead comment blocks
* Sun Feb 22 2009 Andrew Lewman <andrew@torproject.org>
- update the description, vendor, and packager
* Thu Sep 11 2008 Andrew Lewman <phobos@rootme.org>
- See r16867
- http://archives.seul.org/or/cvs/Sep-2008/msg00156.html
* Tue Feb 27 2007 Andrew Lewman <phobos@rootme.org>
- Fix a potential race condition in how we determine the running state of tor. Found by Stefan Nordhausen.
- see OR-CVS for details