diff --git a/SOURCES/0001-cache-cow-Fix-data-corruption-in-zero-and-trim-on-un.patch b/SOURCES/0001-cache-cow-Fix-data-corruption-in-zero-and-trim-on-un.patch index ad8500b..151fc17 100644 --- a/SOURCES/0001-cache-cow-Fix-data-corruption-in-zero-and-trim-on-un.patch +++ b/SOURCES/0001-cache-cow-Fix-data-corruption-in-zero-and-trim-on-un.patch @@ -78,5 +78,5 @@ index 51ca64a4..1cfcc4e7 100644 } if (r == -1) -- -2.18.4 +2.31.1 diff --git a/SOURCES/0002-server-CVE-2021-3716-reset-structured-replies-on-sta.patch b/SOURCES/0002-server-CVE-2021-3716-reset-structured-replies-on-sta.patch index df33105..ce6938e 100644 --- a/SOURCES/0002-server-CVE-2021-3716-reset-structured-replies-on-sta.patch +++ b/SOURCES/0002-server-CVE-2021-3716-reset-structured-replies-on-sta.patch @@ -90,5 +90,5 @@ index 0a76a814..b94950e2 100644 struct handle *h = get_handle (conn, b->i); free (h->default_exportname); -- -2.18.4 +2.31.1 diff --git a/SOURCES/0003-server-reset-meta-context-replies-on-starttls.patch b/SOURCES/0003-server-reset-meta-context-replies-on-starttls.patch index 18213dc..4ab0de0 100644 --- a/SOURCES/0003-server-reset-meta-context-replies-on-starttls.patch +++ b/SOURCES/0003-server-reset-meta-context-replies-on-starttls.patch @@ -36,5 +36,5 @@ index b94950e2..eb0f3961 100644 struct handle *h = get_handle (conn, b->i); free (h->default_exportname); -- -2.18.4 +2.31.1 diff --git a/SOURCES/0004-cow-Fix-for-qemu-6.1-which-requires-backing-format.patch b/SOURCES/0004-cow-Fix-for-qemu-6.1-which-requires-backing-format.patch new file mode 100644 index 0000000..eb7e88e --- /dev/null +++ b/SOURCES/0004-cow-Fix-for-qemu-6.1-which-requires-backing-format.patch @@ -0,0 +1,59 @@ +From 3c2879a38c299b725091cea45329879e3f46fc99 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 31 Aug 2021 11:23:27 +0100 +Subject: [PATCH] cow: Fix for qemu 6.1 which requires backing format + +The diffing example in the manual created a qcow2 file with a backing +file but did not specify the backing format. However qemu 6.1 now +requires this and fails with: + + qemu-img: cow-diff.qcow2: Backing file specified without backing format + +or: + + qemu-img: Could not change the backing file to 'cow-base.img': backing format must be specified + +Fix the example by adding the -F option to the command line. + +Also there was a test of this rebasing sequence which failed, so this +commit updates the test too. + +(cherry picked from commit 618290ef33ce13b75c1a79fea1f1ffb327b5ba07) +--- + filters/cow/nbdkit-cow-filter.pod | 4 ++-- + tests/test-cow.sh | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/filters/cow/nbdkit-cow-filter.pod b/filters/cow/nbdkit-cow-filter.pod +index 4d5ae856..510bdd40 100644 +--- a/filters/cow/nbdkit-cow-filter.pod ++++ b/filters/cow/nbdkit-cow-filter.pod +@@ -101,8 +101,8 @@ At the end, disconnect the client. + Run these C commands to construct a qcow2 file containing + the differences: + +- qemu-img create -f qcow2 -b nbd:localhost diff.qcow2 +- qemu-img rebase -b disk.img diff.qcow2 ++ qemu-img create -F raw -b nbd:localhost -f qcow2 diff.qcow2 ++ qemu-img rebase -F raw -b disk.img -f qcow2 diff.qcow2 + + F now contains the differences between the base + (F) and the changes stored in nbdkit-cow-filter. C +diff --git a/tests/test-cow.sh b/tests/test-cow.sh +index 8772afd7..edc4c223 100755 +--- a/tests/test-cow.sh ++++ b/tests/test-cow.sh +@@ -72,8 +72,8 @@ fi + # If we have qemu-img, try the hairy rebase operation documented + # in the nbdkit-cow-filter manual. + if qemu-img --version >/dev/null 2>&1; then +- qemu-img create -f qcow2 -b nbd:unix:$sock cow-diff.qcow2 +- time qemu-img rebase -b cow-base.img cow-diff.qcow2 ++ qemu-img create -F raw -b nbd:unix:$sock -f qcow2 cow-diff.qcow2 ++ time qemu-img rebase -F raw -b cow-base.img -f qcow2 cow-diff.qcow2 + qemu-img info cow-diff.qcow2 + + # This checks the file we created exists. +-- +2.31.1 + diff --git a/SPECS/nbdkit.spec b/SPECS/nbdkit.spec index 8dc63fc..a62641b 100644 --- a/SPECS/nbdkit.spec +++ b/SPECS/nbdkit.spec @@ -40,7 +40,7 @@ ExclusiveArch: x86_64 Name: nbdkit Version: 1.24.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: NBD server License: BSD @@ -68,7 +68,7 @@ Source3: copy-patches.sh Patch0001: 0001-cache-cow-Fix-data-corruption-in-zero-and-trim-on-un.patch Patch0002: 0002-server-CVE-2021-3716-reset-structured-replies-on-sta.patch Patch0003: 0003-server-reset-meta-context-replies-on-starttls.patch - +Patch0004: 0004-cow-Fix-for-qemu-6.1-which-requires-backing-format.patch %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool @@ -1238,6 +1238,10 @@ export LIBGUESTFS_TRACE=1 %changelog +* Wed Jan 26 2022 Richard W.M. Jones - 1.24.0-4 +- Fix build on RHEL 8.6 with qemu >= 6.1 + resolves: rhbz#2045945 + * Mon Sep 06 2021 Richard W.M. Jones - 1.24.0-3 - Fix CVE-2021-3716 NBD_OPT_STRUCTURED_REPLY injection on STARTTLS resolves: rhbz#1994915