[or-cvs] Backport SUSE rpm changes.

phobos at seul.org phobos at seul.org
Sat Jun 10 01:01:15 UTC 2006


Update of /home/or/cvsroot/tor
In directory moria:/tmp/cvs-serv29732

Modified Files:
      Tag: tor-0_1_1-patches
	configure.in tor.spec.in 
Log Message:
Backport SUSE rpm changes.


Index: configure.in
===================================================================
RCS file: /home/or/cvsroot/tor/configure.in,v
retrieving revision 1.284.2.4
retrieving revision 1.284.2.5
diff -u -p -d -r1.284.2.4 -r1.284.2.5
--- configure.in	4 Jun 2006 06:57:41 -0000	1.284.2.4
+++ configure.in	10 Jun 2006 01:01:12 -0000	1.284.2.5
@@ -608,7 +608,7 @@ fi
 
 echo "confdir: $CONFDIR"
 
-AC_OUTPUT(Makefile tor.spec contrib/tor.sh contrib/torctl contrib/torify contrib/tor.logrotate contrib/Makefile contrib/osx/Makefile contrib/osx/TorBundleDesc.plist contrib/osx/TorBundleInfo.plist contrib/osx/TorDesc.plist contrib/osx/TorInfo.plist contrib/osx/TorStartupDesc.plist src/config/torrc.sample doc/tor.1 src/Makefile doc/Makefile doc/design-paper/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/win32/Makefile src/tools/Makefile)
+AC_OUTPUT(Makefile tor.spec contrib/tor.sh contrib/torctl contrib/torify contrib/tor.logrotate contrib/Makefile contrib/osx/Makefile contrib/osx/TorBundleDesc.plist contrib/osx/TorBundleInfo.plist contrib/osx/TorDesc.plist contrib/osx/TorInfo.plist contrib/osx/TorStartupDesc.plist src/config/torrc.sample doc/tor.1 src/Makefile doc/Makefile doc/design-paper/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/win32/Makefile src/tools/Makefile contrib/suse/Makefile contrib/suse/tor.sh)
 
 if test -x /usr/bin/perl && test -x ./contrib/updateVersions.pl ; then
   ./contrib/updateVersions.pl

Index: tor.spec.in
===================================================================
RCS file: /home/or/cvsroot/tor/tor.spec.in,v
retrieving revision 1.31.2.2
retrieving revision 1.31.2.3
diff -u -p -d -r1.31.2.2 -r1.31.2.3
--- tor.spec.in	3 May 2006 19:59:58 -0000	1.31.2.2
+++ tor.spec.in	10 Jun 2006 01:01:12 -0000	1.31.2.3
@@ -30,7 +30,7 @@
 %define _host %{target_cpu}-pc-%{target_os}-%{target}
 %define _host_cpu %{target_cpu}
 %define _host_vendor %{target_os}
-%define optflags -march=%{target_cpu} -mcpu=%{target_cpu} -O
+%define optflags -march=%{target_cpu} -mtune=%{target_cpu} -O2
 
 ## Version song and dance
 #
@@ -124,14 +124,16 @@ License: BSD-like
 Vendor: R. Dingledine <arma at seul.org>
 Packager: Nick Mathewson <nickm at seul.org>
 
+%if %{is_suse}
+Requires: openssl >= 0.9.6
+BuildRequires: openssl-devel >= 0.9.6, rpm >= 4.0, zlib-devel
+%else 
 Requires: openssl >= 0.9.6, libevent >= 1.1a
 BuildRequires: openssl-devel >= 0.9.6, libevent-devel >= 1.1a
+%endif
 %if %{is_fc}
 BuildRequires: rpm-build >= 4.0
 %endif
-%if %{is_suse}
-BuildRequires: rpm >= 4.0, zlib-devel
-%endif
 Requires(pre): /usr/bin/id, /bin/date, /bin/sh
 Requires(pre): %{_sbindir}/useradd, %{_sbindir}/groupadd
 
@@ -166,8 +168,14 @@ for high-stakes anonymity.
 %setup -q -n %{name}-%{native_version}
 
 %build
+%if %{is_suse}
 %configure --with-tor-user=%{toruser} --with-tor-group=%{torgroup} \
-	--build=%{_host} --host=%{_host} --target=%{_host}
+	--build=%{_host} --host=%{_host} --target=%{_host} \
+	--enable-static --disable-shared
+%else
+%configure --with-tor-user=%{toruser} --with-tor-group=%{torgroup} \
+	--build=%{_host} --host=%{_host} --target=%{_host} 
+%endif
 %make
 
 %install
@@ -175,7 +183,11 @@ for high-stakes anonymity.
 
 # Install init script and control script
 %__mkdir_p ${RPM_BUILD_ROOT}%{_initrddir}
+%if %{is_suse}
+%__install -p -m 755 contrib/suse/tor.sh ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
+%else
 %__install -p -m 755 contrib/tor.sh ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
+%endif
 %__install -p -m 755 contrib/torctl ${RPM_BUILD_ROOT}%{_bindir}
 
 # Set up config file; "sample" file implements a basic user node.
@@ -232,6 +244,7 @@ exit 0
 # configuration alone.
 if [ $1 -eq 1 ]; then
     /sbin/chkconfig --add %{name}
+    /sbin/chkconfig %{name} on
 fi
 
 # Older tor RPMS used a different username for the tor daemon.
@@ -283,6 +296,12 @@ exit 0
 
 %changelog
 
+* Fri May 26 2006 Andrew Lewman <phobos at interloper.org>
+- Add in a few "SUSEisms" to make dist-rpm actually work on suse
+- Turn Tor "on" via chkconfig
+- Update -mcpu to -mtune to make GCC happy
+- see OR-CVS for details
+
 * Tue Mar 28 2006 Andrew Lewman <phobos at interloper.org>
 - converted to build the specified target cpu and arch
 - override related rpm macros to build correctly



More information about the tor-commits mailing list