Add upstream patch to fix tests when guestfish not available.

(cherry picked from commit 322c5a6b36)
This commit is contained in:
Richard W.M. Jones 2018-06-09 14:58:58 +01:00
parent 451663e6ac
commit 2f7d85fd85
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,54 @@
From 07ecff1613b73f32b5954bd3a3d46bef6a39e396 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 9 Jun 2018 14:56:13 +0100
Subject: [PATCH] =?UTF-8?q?tests:=20If=20guestfish=20isn't=20available,=20?=
=?UTF-8?q?=E2=80=98disk=E2=80=99=20is=20not=20created=20so=20disable=20te?=
=?UTF-8?q?sts=20which=20need=20it.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes commit 02f27adc50ed5b83021df4edc84f4dbf8b03a0e3.
---
tests/Makefile.am | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 850240b..64a758e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -279,6 +279,7 @@ test_file_LDADD = libtest.la $(LIBGUESTFS_LIBS)
# gzip plugin test.
if HAVE_ZLIB
+if HAVE_GUESTFISH
LIBGUESTFS_TESTS += test-gzip
check_DATA += disk.gz
@@ -292,6 +293,7 @@ disk.gz: disk
rm -f $@
gzip -9 -c disk > $@
+endif HAVE_GUESTFISH
endif HAVE_ZLIB
# memory plugin test.
@@ -347,6 +349,7 @@ test_streaming_LDADD = libtest.la $(LIBGUESTFS_LIBS)
# xz plugin test.
if HAVE_LIBLZMA
+if HAVE_GUESTFISH
LIBGUESTFS_TESTS += test-xz
check_DATA += disk.xz
@@ -360,6 +363,7 @@ disk.xz: disk
rm -f $@
xz --best --block-size=16777216 -c disk > $@
+endif HAVE_GUESTFISH
endif HAVE_LIBLZMA
#----------------------------------------------------------------------
--
2.16.2

View File

@ -34,6 +34,11 @@ Source1: http://libguestfs.org/download/nbdkit/%{name}-%{version}.tar.gz.
Source2: libguestfs.keyring
%endif
# Upstream patch to fix tests. Touches tests/Makefile.am so we
# need autotools temporarily.
Patch1: 0001-tests-If-guestfish-isn-t-available-disk-is-not-creat.patch
BuildRequires: autoconf, automake, libtool
%if 0%{?rhel} == 7
# On RHEL 7, nothing in the virt stack is shipped on aarch64 and
# libguestfs was not shipped on POWER (fixed in 7.5). We could in
@ -381,6 +386,8 @@ gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%endif
%setup -q
%autopatch -p1
# Temporarily while patch1 touches autotools files.
autoreconf -i
%ifnarch %{complete_test_arches}
# Simplify the test suite so it doesn't require qemu.
@ -637,6 +644,7 @@ popd
- New stable version 1.2.4.
- Remove upstream patches.
- Enable tarball signatures.
- Add upstream patch to fix tests when guestfish not available.
* Wed Jun 6 2018 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-1
- New stable version 1.2.3.