From 607b178e5ffbac44767ecef63af61f87bf879b9c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 26 Jul 2012 22:08:05 +0100 Subject: [PATCH] Add upstream patches to fix use of 'run' script in tests. --- ...se-top_builddir-run-in-Makefile.am-s.patch | 102 +++++++++++++++ ...-use-of-top_builddir-run-test-when-b.patch | 118 ++++++++++++++++++ libguestfs.spec | 10 +- 3 files changed, 229 insertions(+), 1 deletion(-) create mode 100644 0001-build-Use-top_builddir-run-in-Makefile.am-s.patch create mode 100644 0002-tests-Consistent-use-of-top_builddir-run-test-when-b.patch diff --git a/0001-build-Use-top_builddir-run-in-Makefile.am-s.patch b/0001-build-Use-top_builddir-run-in-Makefile.am-s.patch new file mode 100644 index 0000000..feec963 --- /dev/null +++ b/0001-build-Use-top_builddir-run-in-Makefile.am-s.patch @@ -0,0 +1,102 @@ +From 590774ed9e005dc85ca6851939e76d02da6624c8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 26 Jul 2012 21:56:37 +0100 +Subject: [PATCH 1/2] build: Use $(top_builddir)/run in Makefile.am's. + +Not necessary, but this makes all invocations of 'run' consistent. +There is no functional change. +--- + Makefile.am | 2 +- + inspector/Makefile.am | 8 ++++---- + sysprep/Makefile.am | 4 ++-- + tests/guests/Makefile.am | 4 ++-- + 4 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index cc1e8c8..2954be1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -252,7 +252,7 @@ CLEANFILES = \ + # is NOT a substitute for proper testing! + + quickcheck: +- ./run test-tool/libguestfs-test-tool $(QUICKCHECK_TEST_TOOL_ARGS) ++ $(top_builddir)/run test-tool/libguestfs-test-tool $(QUICKCHECK_TEST_TOOL_ARGS) + + # Run extra-tests in tests/extra/ subdirectory. + +diff --git a/inspector/Makefile.am b/inspector/Makefile.am +index ce3aca9..3a1893d 100644 +--- a/inspector/Makefile.am ++++ b/inspector/Makefile.am +@@ -104,22 +104,22 @@ endif + + example-debian.xml: + rm -f $@ $@-t +- ../run --test \ ++ $(top_builddir)/run --test \ + $(builddir)/virt-inspector ../tests/guests/debian.img > $@-t + mv $@-t $@ + example-fedora.xml: + rm -f $@ $@-t +- ../run --test \ ++ $(top_builddir)/run --test \ + $(builddir)/virt-inspector ../tests/guests/fedora.img > $@-t + mv $@-t $@ + example-ubuntu.xml: + rm -f $@ $@-t +- ../run --test \ ++ $(top_builddir)/run --test \ + $(builddir)/virt-inspector ../tests/guests/ubuntu.img > $@-t + mv $@-t $@ + example-windows.xml: + rm -f $@ $@-t +- ../run --test \ ++ $(top_builddir)/run --test \ + $(builddir)/virt-inspector ../tests/guests/windows.img | \ + fgrep -v '' > $@-t + mv $@-t $@ +diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am +index e56a971..c52a65f 100644 +--- a/sysprep/Makefile.am ++++ b/sysprep/Makefile.am +@@ -108,12 +108,12 @@ stamp-virt-sysprep.pod: virt-sysprep.pod sysprep-extra-options.pod sysprep-opera + + sysprep-extra-options.pod: virt-sysprep + rm -f $@ $@-t +- ../run ./$< --dump-pod-options > $@-t ++ $(top_builddir)/run ./$< --dump-pod-options > $@-t + mv $@-t $@ + + sysprep-operations.pod: virt-sysprep + rm -f $@ $@-t +- ../run ./$< --dump-pod > $@-t ++ $(top_builddir)/run ./$< --dump-pod > $@-t + mv $@-t $@ + + # Tests. +diff --git a/tests/guests/Makefile.am b/tests/guests/Makefile.am +index ff983ff..21311de 100644 +--- a/tests/guests/Makefile.am ++++ b/tests/guests/Makefile.am +@@ -49,7 +49,7 @@ fedora.img: guest-aux/make-fedora-img.pl \ + TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ + LAYOUT=partitions \ +- ../../run --test $< ++ $(top_builddir)/run --test $< + + # Make a (dummy) Fedora image using md devices + fedora-md1.img fedora-md2.img: stamp-fedora-md.img +@@ -61,7 +61,7 @@ stamp-fedora-md.img: guest-aux/make-fedora-img.pl \ + TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ + LAYOUT=partitions-md \ +- ../../run --test $< ++ $(top_builddir)/run --test $< + touch $@ + + guest-aux/fedora-name.db: guest-aux/fedora-name.db.txt +-- +1.7.10.4 + diff --git a/0002-tests-Consistent-use-of-top_builddir-run-test-when-b.patch b/0002-tests-Consistent-use-of-top_builddir-run-test-when-b.patch new file mode 100644 index 0000000..31504e5 --- /dev/null +++ b/0002-tests-Consistent-use-of-top_builddir-run-test-when-b.patch @@ -0,0 +1,118 @@ +From dcc0ebc8e0c4a8abd505421a584573272a03f7aa Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 26 Jul 2012 22:00:07 +0100 +Subject: [PATCH 2/2] tests: Consistent use of $(top_builddir)/run --test when + building test guests. + +--- + tests/guests/Makefile.am | 22 +++++----------------- + tests/guests/guest-aux/make-debian-img.sh | 2 +- + tests/guests/guest-aux/make-ubuntu-img.sh | 2 +- + tests/guests/guest-aux/make-windows-img.sh | 4 ++-- + 4 files changed, 9 insertions(+), 21 deletions(-) + +diff --git a/tests/guests/Makefile.am b/tests/guests/Makefile.am +index 21311de..a05dceb 100644 +--- a/tests/guests/Makefile.am ++++ b/tests/guests/Makefile.am +@@ -46,10 +46,7 @@ CLEANFILES = $(check_DATA) stamp-fedora-md.img *.tmp.* + fedora.img: guest-aux/make-fedora-img.pl \ + guest-aux/fedora-name.db \ + guest-aux/fedora-packages.db +- TMPDIR=$(top_builddir) \ +- SRCDIR=$(srcdir) \ +- LAYOUT=partitions \ +- $(top_builddir)/run --test $< ++ SRCDIR=$(srcdir) LAYOUT=partitions $(top_builddir)/run --test $< + + # Make a (dummy) Fedora image using md devices + fedora-md1.img fedora-md2.img: stamp-fedora-md.img +@@ -58,10 +55,7 @@ stamp-fedora-md.img: guest-aux/make-fedora-img.pl \ + guest-aux/fedora-name.db \ + guest-aux/fedora-packages.db + rm -f $@ +- TMPDIR=$(top_builddir) \ +- SRCDIR=$(srcdir) \ +- LAYOUT=partitions-md \ +- $(top_builddir)/run --test $< ++ SRCDIR=$(srcdir) LAYOUT=partitions-md $(top_builddir)/run --test $< + touch $@ + + guest-aux/fedora-name.db: guest-aux/fedora-name.db.txt +@@ -78,22 +72,16 @@ guest-aux/fedora-packages.db: guest-aux/fedora-packages.db.txt + + # Make a (dummy) Debian image. + debian.img: guest-aux/make-debian-img.sh +- TMPDIR=$(top_builddir) \ +- SRCDIR=$(srcdir) \ +- bash $< ++ SRCDIR=$(srcdir) $(top_builddir)/run --test $< + + # Make a (dummy) Ubuntu image. + ubuntu.img: guest-aux/make-ubuntu-img.sh +- TMPDIR=$(top_builddir) \ +- SRCDIR=$(srcdir) \ +- bash $< ++ SRCDIR=$(srcdir) $(top_builddir)/run --test $< + + # Make a (dummy) Windows image. + windows.img: guest-aux/make-windows-img.sh \ + guest-aux/windows-software guest-aux/windows-system +- TMPDIR=$(top_builddir) \ +- SRCDIR=$(srcdir) \ +- bash $< ++ SRCDIR=$(srcdir) $(top_builddir)/run --test $< + + # Since users might not have the tools needed to create this, we + # also distribute these files. +diff --git a/tests/guests/guest-aux/make-debian-img.sh b/tests/guests/guest-aux/make-debian-img.sh +index 00a68d5..74e9f59 100755 +--- a/tests/guests/guest-aux/make-debian-img.sh ++++ b/tests/guests/guest-aux/make-debian-img.sh +@@ -31,7 +31,7 @@ LABEL=BOOT /boot ext2 default 0 0 + EOF + + # Create a disk image. +-../../run ../../fish/guestfish <= 7 ExclusiveArch: x86_64 %endif @@ -1017,6 +1021,10 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs %changelog +* Thu Jul 26 2012 Richard W.M. Jones - 1:1.19.26-2 +- Remove old RPM-isms like defattr. +- Add upstream patches to fix use of 'run' script in tests. + * Thu Jul 26 2012 Richard W.M. Jones - 1:1.19.26-1 - New upstream version 1.19.26.