[packages/xen] Fix xen scripts locking

jajcus jajcus at pld-linux.org
Fri Nov 9 14:57:52 CET 2012


commit 30059e8d17590c2eede5de112f2ad9e0c181a1cd
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Fri Nov 9 14:57:27 2012 +0100

    Fix xen scripts locking

 xen-scripts-locking.patch | 28 ++++++++++++++++++++++++++++
 xen.spec                  |  2 ++
 2 files changed, 30 insertions(+)
---
diff --git a/xen.spec b/xen.spec
index 108dd1f..c0cf753 100644
--- a/xen.spec
+++ b/xen.spec
@@ -85,6 +85,7 @@ Patch8:		xen-configure-xend.patch
 Patch9:		xen-initscript.patch
 Patch10:	xen-quemu-softloat-c99.patch
 Patch11:	xen-qemu.patch
+Patch12:	xen-scripts-locking.patch
 URL:		http://www.xen.org/products/xenhyp.html
 %{?with_opengl:BuildRequires:	OpenGL-devel}
 %{?with_sdl:BuildRequires:	SDL-devel >= 1.2.1}
@@ -369,6 +370,7 @@ Nadzorca Xen w postaci, która może być uruchomiona wprost z firmware
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 # stubdom sources
 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
diff --git a/xen-scripts-locking.patch b/xen-scripts-locking.patch
new file mode 100644
index 0000000..9dd0f4f
--- /dev/null
+++ b/xen-scripts-locking.patch
@@ -0,0 +1,28 @@
+commit a4ef9c9753467ae2eaeff858bcb63a5ba5337d18
+Author: Jacek Konieczny <jajcus at jajcus.net>
+Date:   Fri Nov 9 14:47:40 2012 +0100
+
+    Fix locking in tools/hotplug/Linux/locking.sh
+    
+    The claim_lock() function would fail in the perl code with:
+    
+      Invalid argument at -e line 2.
+    
+    because the Perl snippet opens for reading the file descriptor, which
+    was earlier opened for write (append).
+    
+    Signed-off-by: Jacek Konieczny <jajcus at jajcus.net>
+
+diff --git a/tools/hotplug/Linux/locking.sh b/tools/hotplug/Linux/locking.sh
+index 0e2a531..5c4f365 100644
+--- a/tools/hotplug/Linux/locking.sh
++++ b/tools/hotplug/Linux/locking.sh
+@@ -44,7 +44,7 @@ claim_lock()
+     # See below for a correctness proof.
+     local rightfile
+     while true; do
+-        eval "exec $_lockfd>>$_lockfile"
++        eval "exec $_lockfd<>$_lockfile"
+         flock -x $_lockfd || return $?
+         # We can't just stat /dev/stdin or /proc/self/fd/$_lockfd or
+         # use bash's test -ef because those all go through what is
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xen.git/commitdiff/30059e8d17590c2eede5de112f2ad9e0c181a1cd



More information about the pld-cvs-commit mailing list