[libguestfs/f13/master] Backport blockdev --rereadpt test fix.

Richard W.M. Jones rjones at fedoraproject.org
Tue Nov 2 20:37:58 UTC 2010


commit becbe217d2ad1b3e7251c20c52f2b47da1810791
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue Nov 2 20:37:21 2010 +0000

    Backport blockdev --rereadpt test fix.

 ...rate-failure-of-blockdev-rereadpt-after-s.patch |   28 ++++++++++++++++++++
 libguestfs.spec                                    |    9 +++++-
 2 files changed, 35 insertions(+), 2 deletions(-)
---
diff --git a/0001-daemon-Tolerate-failure-of-blockdev-rereadpt-after-s.patch b/0001-daemon-Tolerate-failure-of-blockdev-rereadpt-after-s.patch
new file mode 100644
index 0000000..f410efc
--- /dev/null
+++ b/0001-daemon-Tolerate-failure-of-blockdev-rereadpt-after-s.patch
@@ -0,0 +1,28 @@
+From 1937698c25fb9f066dba7b48ad4731927e3e74da Mon Sep 17 00:00:00 2001
+From: Richard W.M. Jones <rjones at redhat.com>
+Date: Tue, 2 Nov 2010 20:33:06 +0000
+Subject: [PATCH] daemon: Tolerate failure of blockdev --rereadpt after sfdisk.
+
+See commit 840536ea5a0568296dfd3e483442c76b93c5a949
+and commit 956fc5a3feacc970ea763697bf28fb686c875408.
+---
+ daemon/sfdisk.c |    3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+diff --git a/daemon/sfdisk.c b/daemon/sfdisk.c
+index bf62c1d..ec77465 100644
+--- a/daemon/sfdisk.c
++++ b/daemon/sfdisk.c
+@@ -101,8 +101,7 @@ sfdisk (const char *device, int n, int cyls, int heads, int sectors,
+    * other component.  In any case, reread the partition table
+    * unconditionally here.
+    */
+-  if (do_blockdev_rereadpt (device) == -1)
+-    return -1;
++  (void) command (NULL, NULL, "blockdev", "--rereadpt", NULL);
+ 
+   udev_settle ();
+ 
+-- 
+1.7.3.1
+
diff --git a/libguestfs.spec b/libguestfs.spec
index ccd4c70..ad1249f 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -42,7 +42,7 @@ Summary:       Access and modify virtual machine disk images
 Name:          libguestfs
 Epoch:         1
 Version:       1.6.0
-Release:       1%{?dist}
+Release:       1%{?dist}.1
 License:       LGPLv2+
 Group:         Development/Libraries
 URL:           http://libguestfs.org/
@@ -52,6 +52,9 @@ BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root
 # Disable FUSE tests, not supported in Koji at the moment.
 Patch0:        libguestfs-1.0.79-no-fuse-test.patch
 
+# Backport upstream patch to tolerate blockdev --rereadpt failure.
+Patch1:        0001-daemon-Tolerate-failure-of-blockdev-rereadpt-after-s.patch
+
 # Basic build requirements:
 BuildRequires: /usr/bin/pod2man
 BuildRequires: /usr/bin/pod2text
@@ -413,6 +416,7 @@ php-%{name} contains PHP bindings for %{name}.
 %setup -q
 
 %patch0 -p1
+%patch1 -p1
 
 mkdir -p daemon/m4
 
@@ -746,12 +750,13 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Tue Nov  2 2010 Richard Jones <rjones at redhat.com> - 1:1.6.0-1
+* Tue Nov  2 2010 Richard Jones <rjones at redhat.com> - 1:1.6.0-1.fc13.1
 - Move to the new upstream stable branch, version 1.6.0.  Despite the
   apparent version number jump, this is similar to the heavily patched
   version that we were shipping before, but with many bugs fixed.
 - Includes fix for libguestfs: missing disk format specifier when adding a disk
   (RHBZ#642934, CVE-2010-3851).
+- Backport blockdev --rereadpt test fix.
 
 * Thu Oct 28 2010 Marek Goldmann <mgoldman at redhat.com> - 1:1.4.3-5
 - Fix networking in the appliance.


More information about the scm-commits mailing list