From 67cb874897be7092594e08ef8c1f63be365b0948 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 15 Oct 2011 17:51:52 +0100 Subject: [PATCH] Add upstream patch to fix virt-sysprep test. --- ...-test-to-use-guestmount-and-virt-ins.patch | 58 +++++++++++++++++++ libguestfs.spec | 10 +++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 0001-virt-sysprep-Fix-test-to-use-guestmount-and-virt-ins.patch diff --git a/0001-virt-sysprep-Fix-test-to-use-guestmount-and-virt-ins.patch b/0001-virt-sysprep-Fix-test-to-use-guestmount-and-virt-ins.patch new file mode 100644 index 0000000..da00758 --- /dev/null +++ b/0001-virt-sysprep-Fix-test-to-use-guestmount-and-virt-ins.patch @@ -0,0 +1,58 @@ +From 8cf06ddcddf1fda3a189667dbaaa4560ba49df3c Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 15 Oct 2011 17:51:16 +0100 +Subject: [PATCH] virt-sysprep: Fix test to use guestmount and virt-inspector + binaries that have been built. + +--- + Makefile.am | 2 +- + clone/test-virt-sysprep.sh | 17 +++++++++++++---- + 2 files changed, 14 insertions(+), 5 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 5170ec8..388cdeb 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -85,7 +85,7 @@ if HAVE_FUSE + SUBDIRS += fuse + endif + +-# virt-tools in shell. This uses guestmount. ++# virt-tools in shell. This uses guestmount and virt-inspector. + if HAVE_FUSE + SUBDIRS += clone + endif +diff --git a/clone/test-virt-sysprep.sh b/clone/test-virt-sysprep.sh +index 897afb7..632d366 100755 +--- a/clone/test-virt-sysprep.sh ++++ b/clone/test-virt-sysprep.sh +@@ -23,13 +23,22 @@ rm -f test.img guestfish + + qemu-img create -f qcow2 -o backing_file=../images/fedora.img test.img + +-cat <<'EOF' > guestfish ++# Provide alternate 'virt-inspector' and 'guestmount' binaries ++# that run the just-built programs. ++ ++cat <<'EOF' > virt-inspector ++#!/bin/sh - ++../run ../inspector/virt-inspector "$@" ++EOF ++chmod +x virt-inspector ++cat <<'EOF' > guestmount + #!/bin/sh - +-../run ../fish/guestfish "$@" ++../run ../fuse/guestmount "$@" + EOF +-chmod +x guestfish ++chmod +x guestmount ++ + PATH=.:$PATH + + ./virt-sysprep -a test.img + +-rm -f test.img guestfish ++rm -f test.img virt-inspector guestmount +-- +1.7.6 + diff --git a/libguestfs.spec b/libguestfs.spec index e196468..a3b494c 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -30,7 +30,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.13.21 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libguestfs.org/ @@ -52,6 +52,9 @@ Patch3: 0001-Fix-qemu-machine-option-for-latest-qemu-thanks-Marku.patch # Upstream patch to rename cryptsetup-luks to cryptsetup. Patch4: 0001-appliance-Fedora-cryptsetup-luks-renamed-to-cryptset.patch +# Upstream patch to fix virt-sysprep test. +Patch5: 0001-virt-sysprep-Fix-test-to-use-guestmount-and-virt-ins.patch + # Basic build requirements: BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2text @@ -78,6 +81,7 @@ BuildRequires: ocaml BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-pcre-devel BuildRequires: systemd-units +BuildRequires: xmlstarlet # This is only needed for RHEL 5 because readline-devel doesn't # properly depend on it, but doesn't do any harm on other platforms: @@ -528,6 +532,7 @@ for %{name}. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 mkdir -p daemon/m4 @@ -904,6 +909,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Oct 15 2011 Richard W.M. Jones - 1:1.13.21-3 +- Add upstream patch to fix virt-sysprep test. + * Fri Oct 14 2011 Richard W.M. Jones - 1:1.13.21-2 - New upstream version 1.13.21. - Move virt-sysprep to libguestfs-tools, to avoid pulling in extra