diff --git a/0001-tests-wipefs-Don-t-try-to-wipe-mounted-filesystem.patch b/0001-tests-wipefs-Don-t-try-to-wipe-mounted-filesystem.patch new file mode 100644 index 0000000..12dd3e0 --- /dev/null +++ b/0001-tests-wipefs-Don-t-try-to-wipe-mounted-filesystem.patch @@ -0,0 +1,30 @@ +From 6ac943fbef4fa8386da456048f856a387f941fc2 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 3 Nov 2012 10:10:12 +0000 +Subject: [PATCH] tests: wipefs: Don't try to wipe mounted filesystem. + +Previously wipefs (the utility) allowed this, but it's obviously a bad +thing to do and the new wipefs gives an error if you try it: + +wipefs: error: /dev/VG/LV: probing initialization failed: Device or resource busy +--- + generator/actions.ml | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/generator/actions.ml b/generator/actions.ml +index 5c3de52..65d2785 100644 +--- a/generator/actions.ml ++++ b/generator/actions.ml +@@ -8967,7 +8967,8 @@ is I intended that you try to parse the output string." }; + optional = Some "wipefs"; + tests = [ + InitBasicFSonLVM, Always, TestRun ( +- [["wipefs"; "/dev/VG/LV"]]) ++ [["umount"; "/dev/VG/LV"; ""; ""]; ++ ["wipefs"; "/dev/VG/LV"]]) + ]; + shortdesc = "wipe a filesystem signature from a device"; + longdesc = "\ +-- +1.7.11.4 + diff --git a/libguestfs.spec b/libguestfs.spec index b4a57d6..a0d9cef 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -22,7 +22,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.19.56 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libguestfs.org/ @@ -43,6 +43,9 @@ Patch2: libguestfs-1.19.2-remove-udev-from-packagelist.patch # on i386 only. This works around a bug in 32-bit qemu (RHBZ#857026). Patch3: 0001-i386-Add-noapic-flag-to-work-around-a-qemu-or-kernel.patch +# Upstream patch to fix wipefs test. +Patch4: 0001-tests-wipefs-Don-t-try-to-wipe-mounted-filesystem.patch + %if 0%{?rhel} >= 7 ExclusiveArch: x86_64 %endif @@ -695,6 +698,7 @@ autoreconf -i %endif %patch2 -p1 %patch3 -p1 +%patch4 -p1 mkdir -p daemon/m4 @@ -1023,6 +1027,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs %changelog +* Sat Nov 03 2012 Richard W.M. Jones - 1:1.19.56-2 +- Add upstream patch to fix wipefs test. + * Fri Nov 02 2012 Richard W.M. Jones - 1:1.19.56-1 - New upstream version 1.19.56.