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 +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 a01a677..382af3c 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 @@ -743,11 +747,12 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Tue Nov 2 2010 Richard Jones - 1:1.6.0-1 +* Tue Nov 2 2010 Richard Jones - 1:1.6.0-1.fc14.1 - New upstream stable branch 1.6, version 1.6.0. - virt-inspector now requires db_dump from db4-utils package. - Can use febootstrap 2.9 for now, but add a note that we should depend on febootstrap 2.10 as soon as that is in F14 stable. +- Backport blockdev --rereadpt test fix. * Sat Oct 23 2010 Richard Jones - 1:1.5.23-1 - Fix for libguestfs: missing disk format specifier when adding a disk