Add upstream patches to fix use of 'run' script in tests.
This commit is contained in:
parent
ac329aec74
commit
607b178e5f
102
0001-build-Use-top_builddir-run-in-Makefile.am-s.patch
Normal file
102
0001-build-Use-top_builddir-run-in-Makefile.am-s.patch
Normal file
@ -0,0 +1,102 @@
|
||||
From 590774ed9e005dc85ca6851939e76d02da6624c8 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
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 '<uuid>' > $@-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
|
||||
|
118
0002-tests-Consistent-use-of-top_builddir-run-test-when-b.patch
Normal file
118
0002-tests-Consistent-use-of-top_builddir-run-test-when-b.patch
Normal file
@ -0,0 +1,118 @@
|
||||
From dcc0ebc8e0c4a8abd505421a584573272a03f7aa Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
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 <<EOF
|
||||
+../../fish/guestfish <<EOF
|
||||
sparse debian.img.tmp.$$ 512M
|
||||
run
|
||||
|
||||
diff --git a/tests/guests/guest-aux/make-ubuntu-img.sh b/tests/guests/guest-aux/make-ubuntu-img.sh
|
||||
index 7a58319..50bae43 100755
|
||||
--- a/tests/guests/guest-aux/make-ubuntu-img.sh
|
||||
+++ b/tests/guests/guest-aux/make-ubuntu-img.sh
|
||||
@@ -39,7 +39,7 @@ DISTRIB_DESCRIPTION="Ubuntu 10.10 (Phony Pharaoh)"
|
||||
EOF
|
||||
|
||||
# Create a disk image.
|
||||
-../../run ../../fish/guestfish <<EOF
|
||||
+../../fish/guestfish <<EOF
|
||||
sparse ubuntu.img.tmp.$$ 512M
|
||||
run
|
||||
|
||||
diff --git a/tests/guests/guest-aux/make-windows-img.sh b/tests/guests/guest-aux/make-windows-img.sh
|
||||
index 89a305c..521fde2 100755
|
||||
--- a/tests/guests/guest-aux/make-windows-img.sh
|
||||
+++ b/tests/guests/guest-aux/make-windows-img.sh
|
||||
@@ -25,7 +25,7 @@ set -e
|
||||
# ntfs-3g/ntfsprogs then we cannot create a Windows phony image.
|
||||
# Nothing actually uses windows.img in the standard build so we can
|
||||
# just 'touch' it and emit a warning.
|
||||
-if ! ../../run ../../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; then
|
||||
+if ! ../../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; then
|
||||
echo "***"
|
||||
echo "Warning: cannot create windows.img because there is no NTFS"
|
||||
echo "support in this build of libguestfs. Just touching the output"
|
||||
@@ -36,7 +36,7 @@ if ! ../../run ../../fish/guestfish -a /dev/null run : available "ntfs3g ntfspro
|
||||
fi
|
||||
|
||||
# Create a disk image.
|
||||
-../../run ../../fish/guestfish <<EOF
|
||||
+../../fish/guestfish <<EOF
|
||||
sparse windows.img.tmp.$$ 512M
|
||||
run
|
||||
|
||||
--
|
||||
1.7.10.4
|
||||
|
@ -22,7 +22,7 @@ Summary: Access and modify virtual machine disk images
|
||||
Name: libguestfs
|
||||
Epoch: 1
|
||||
Version: 1.19.26
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: Development/Libraries
|
||||
URL: http://libguestfs.org/
|
||||
@ -39,6 +39,10 @@ BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||
# patch.
|
||||
Patch4: libguestfs-1.19.2-remove-udev-from-packagelist.patch
|
||||
|
||||
# Upstream patches to fix use of 'run' in builds.
|
||||
Patch11: 0001-build-Use-top_builddir-run-in-Makefile.am-s.patch
|
||||
Patch12: 0002-tests-Consistent-use-of-top_builddir-run-test-when-b.patch
|
||||
|
||||
%if 0%{?rhel} >= 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 <rjones@redhat.com> - 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 <rjones@redhat.com> - 1:1.19.26-1
|
||||
- New upstream version 1.19.26.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user