diff --git a/0001-tests-Tests-which-need-ext2.img-are-conditional-on-H.patch b/0001-tests-Tests-which-need-ext2.img-are-conditional-on-H.patch new file mode 100644 index 0000000..4ebc7fb --- /dev/null +++ b/0001-tests-Tests-which-need-ext2.img-are-conditional-on-H.patch @@ -0,0 +1,52 @@ +From 093e37a13d8b9241ad1e9b093b5e56abbbf2872e Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 22 Sep 2020 18:29:08 +0100 +Subject: [PATCH] tests: Tests which need ext2.img are conditional on + HAVE_GUESTFISH. + +When compiling on Fedora, on platforms which don't have a kernel like +i686 we don't have guestfish, so the tests fail with: + + make[2]: guestfish: No such file or directory + +Fixes: commit cecf51f50ba7d22ca8cbbb56543b95f716524fcb +--- + tests/Makefile.am | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 390df711..b5b06810 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -1389,6 +1389,13 @@ EXTRA_DIST += test-exportname.sh + # ext2 filter test. + if HAVE_MKE2FS_WITH_D + if HAVE_EXT2 ++if HAVE_GUESTFISH ++ ++LIBGUESTFS_TESTS += test-ext2 ++ ++test_ext2_SOURCES = test-ext2.c test.h ++test_ext2_CFLAGS = $(WARNINGS_CFLAGS) $(LIBGUESTFS_CFLAGS) ++test_ext2_LDADD = libtest.la $(LIBGUESTFS_LIBS) + + TESTS += test-ext2-exportname.sh + EXTRA_DIST += test-ext2-exportname.sh +@@ -1410,14 +1417,6 @@ ext2.img: disk test-ext2-exportname.sh + rm manifest + mv $@-t $@ + +-if HAVE_GUESTFISH +- +-LIBGUESTFS_TESTS += test-ext2 +- +-test_ext2_SOURCES = test-ext2.c test.h +-test_ext2_CFLAGS = $(WARNINGS_CFLAGS) $(LIBGUESTFS_CFLAGS) +-test_ext2_LDADD = libtest.la $(LIBGUESTFS_LIBS) +- + endif HAVE_GUESTFISH + endif HAVE_EXT2 + endif HAVE_MKE2FS_WITH_D +-- +2.27.0 + diff --git a/nbdkit.spec b/nbdkit.spec index cd53d8c..d253ff0 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -39,7 +39,7 @@ ExclusiveArch: x86_64 %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 # The source directory. %global source_directory 1.23-development @@ -64,6 +64,9 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name Source2: libguestfs.keyring %endif +# Upstream patch which fixes the tests on armv7. +Patch1: 0001-tests-Tests-which-need-ext2.img-are-conditional-on-H.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -1208,6 +1211,7 @@ export LIBGUESTFS_TRACE=1 * Tue Sep 22 2020 Richard W.M. Jones - 1.23.6-1 - New upstream development version 1.23.6. - New exportname filter. +- Add patch to fix tests. * Wed Sep 16 2020 Richard W.M. Jones - 1.23.5-1 - New upstream development version 1.23.5.