[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9679: backported fix for race condition in rpm installer. (tor/branches/tor-0_1_1-patches)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r9679: backported fix for race condition in rpm installer. (tor/branches/tor-0_1_1-patches)
- From: phobos@xxxxxxxx
- Date: Wed, 28 Feb 2007 11:59:13 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Wed, 28 Feb 2007 11:59:24 -0500
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: phobos
Date: 2007-02-28 11:59:11 -0500 (Wed, 28 Feb 2007)
New Revision: 9679
Modified:
tor/branches/tor-0_1_1-patches/tor.spec.in
Log:
backported fix for race condition in rpm installer.
Modified: tor/branches/tor-0_1_1-patches/tor.spec.in
===================================================================
--- tor/branches/tor-0_1_1-patches/tor.spec.in 2007-02-28 16:56:28 UTC (rev 9678)
+++ tor/branches/tor-0_1_1-patches/tor.spec.in 2007-02-28 16:59:11 UTC (rev 9679)
@@ -84,9 +84,9 @@
# Using the build date ensures that every build really does get
# a different release number. We use this trick for CVS versions.
# For release versions, we don't want or need it.
-%define is_cvs_version %(echo %{native_version} | grep 'cvs' > /dev/null && echo 1 || echo 0)
+%define is_dev_version %(echo %{native_version} | grep 'dev' > /dev/null && echo 1 || echo 0)
-%if %{is_cvs_version}
+%if %{is_dev_version}
%define blddate %(date -u +"%Y%m%d%H%M")
%define release %{pkgspec}.%{specver}.%{ostag}.%{blddate}
%else
@@ -122,14 +122,14 @@
License: BSD-like
Vendor: R. Dingledine <arma@xxxxxxxx>
-Packager: Nick Mathewson <nickm@xxxxxxxx>
+Packager: Andrew Lewman <phobos@xxxxxxxxxxxxxx>
%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
+Requires: openssl >= 0.9.6, libevent >= 1.1
+BuildRequires: openssl-devel >= 0.9.6, libevent-devel >= 1.1
%endif
%if %{is_fc}
BuildRequires: rpm-build >= 4.0
@@ -201,6 +201,7 @@
%__mkdir_p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}
%__mkdir_p -m 755 ${RPM_BUILD_ROOT}%{_localstatedir}/run/%{name}
%__mkdir_p -m 755 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}
+%__mkdir_p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/%{name}
%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
@@ -212,10 +213,10 @@
# If tor is already installed and running (whether installed by RPM
# or not), then kill it, but remember that it was running.
-%__rm -f /tmp/${name}-was-running-%{version}-%{release}
+%__rm -f /%{_localstatedir}/tmp/${name}-was-running-%{version}-%{release}
if [ -f %{_initrddir}/%{name} ] && /sbin/service %{name} status ; then
/sbin/service %{name} stop
- touch /tmp/${name}-was-running-%{version}-%{release}
+ touch /%{_localstatedir}/tmp/${name}-was-running-%{version}-%{release}
fi
#
@@ -251,9 +252,9 @@
# Make sure the runtime data have the right ownership.
%__chown -R %{toruser}.%{torgroup} %{_localstatedir}/{lib,log,run}/%{name}
-if [ -f /tmp/${name}-was-running-%{version}-%{release} ]; then
+if [ -f /%{_localstatedir}/tmp/${name}-was-running-%{version}-%{release} ]; then
/sbin/service %{name} start
- %__rm -f /tmp/${name}-was-running-%{version}-%{release}
+ %__rm -f /%{_localstatedir}/tmp/${name}-was-running-%{version}-%{release}
fi
exit 0
@@ -296,13 +297,17 @@
%changelog
-* Fri May 26 2006 Andrew Lewman <phobos@xxxxxxxxxxxxxx>
+* Tue Feb 27 2007 Andrew Lewman <phobos@xxxxxxxxxx>
+- Fix a potential race condition in how we determine the running state of tor. Found by Stefan Nordhausen.
+- see OR-CVS for details
+
+* Fri May 26 2006 Andrew Lewman <phobos@xxxxxxxxxx>
- 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@xxxxxxxxxxxxxx>
+* Tue Mar 28 2006 Andrew Lewman <phobos@xxxxxxxxxx>
- converted to build the specified target cpu and arch
- override related rpm macros to build correctly
- see OR-CVS for details