diff --git a/0001-tests-Use-a-more-robust-method-to-create-the-test-di.patch b/0001-tests-Use-a-more-robust-method-to-create-the-test-di.patch new file mode 100644 index 0000000..71ecdc6 --- /dev/null +++ b/0001-tests-Use-a-more-robust-method-to-create-the-test-di.patch @@ -0,0 +1,31 @@ +From 183d81fa792fd024f62d068ead9cad0cc53d3c8e Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 12 Mar 2019 22:13:24 +0000 +Subject: [PATCH] tests: Use a more robust method to create the test disk + atomically. + +--- + tests/Makefile.am | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 1712565..f50a35e 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -334,9 +334,10 @@ check_DATA += disk + CLEANFILES += disk + + disk: +- rm -f $@ test1.img +- guestfish -N fs:ext4:100M -m /dev/sda1 write /hello.txt "hello,world" +- mv test1.img disk ++ rm -f $@ $@-t ++ guestfish -N $@-t=fs:ext4:100M -m /dev/sda1 \ ++ write /hello.txt "hello,world" ++ mv $@-t $@ + + endif HAVE_GUESTFISH + +-- +2.20.1 + diff --git a/nbdkit.spec b/nbdkit.spec index 0d0bb26..eb43be7 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -20,7 +20,8 @@ %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 %{nil} +%global patches_touch_autotools 1 # The source directory. %global source_directory 1.11-development @@ -40,6 +41,9 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name Source2: libguestfs.keyring %endif +# Upstream patch for tests. +Patch1: 0001-tests-Use-a-more-robust-method-to-create-the-test-di.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif