New upstream development version 1.27.9.

Remove patches which are upstream.
This commit is contained in:
Richard W.M. Jones 2021-09-04 17:05:14 +01:00
parent 8652782c79
commit 3c10afbea2
4 changed files with 8 additions and 128 deletions

View File

@ -1,57 +0,0 @@
From 618290ef33ce13b75c1a79fea1f1ffb327b5ba07 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
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.
---
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 791d1d36..b69544f6 100644
--- a/filters/cow/nbdkit-cow-filter.pod
+++ b/filters/cow/nbdkit-cow-filter.pod
@@ -116,8 +116,8 @@ At the end, disconnect the client.
Run these C<qemu-img> 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<diff.qcow2> now contains the differences between the base
(F<disk.img>) and the changes stored in nbdkit-cow-filter. C<nbdkit>
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.32.0

View File

@ -1,62 +0,0 @@
From fe6538aafe5f8d6fc6b90ae8f6d3686c711288fd Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 23 Aug 2021 10:34:53 +0100
Subject: [PATCH] data: Fix issues on 32 bit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit 9352ad00e3 ("data: New functions new_node/get_node with simpler
usage") added a new expr() function to let you construct expressions.
However it uses varargs so callers have to be strict about the types
of the parameters, and the compiler cannot verify this.
When creating EXPR_FILL the parameters are uint8_t, uint64_t, where
varargs always promotes uint8_t to int. We called it in a few places
with incorrect types. The error showed up when compiling on i686, but
actually we were very lucky this did not manifest on 64 bit platforms
too. It only worked because of how x86-64 ABI passes some arguments
in registers so that int is passed in a 64 bit register. On a 64 bit
platform that uses the stack it could have failed.
Use casts as appropriate. Strongly typed qualified unions à la OCaml
would help here!
Fixes: commit 9352ad00e3e1fff679f4eabb2208bfa1e1443a29
---
plugins/data/format.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/data/format.c b/plugins/data/format.c
index f1b4219e..60b73ef9 100644
--- a/plugins/data/format.c
+++ b/plugins/data/format.c
@@ -1358,14 +1358,14 @@ optimize_ast (node_id root, node_id *root_rtn)
*/
if (get_node (root).string.size > 1) {
const string s = get_node (root).string;
- uint64_t b = s.ptr[0];
+ uint8_t b = s.ptr[0];
for (i = 1; i < s.size; ++i)
if (s.ptr[i] != b)
break;
if (i == s.size) {
- *root_rtn = new_node (expr (EXPR_FILL, b, s.size));
+ *root_rtn = new_node (expr (EXPR_FILL, b, (uint64_t) s.size));
return 0;
}
}
@@ -1485,7 +1485,7 @@ exprs_can_combine (expr_t e0, expr_t e1, node_id *id_rtn)
switch (e1.t) {
case EXPR_BYTE: /* byte byte => fill | string */
if (e0.b == e1.b) {
- *id_rtn = new_node (expr (EXPR_FILL, e0.b, 2));
+ *id_rtn = new_node (expr (EXPR_FILL, e0.b, UINT64_C(2)));
}
else {
if (string_append (&s, e0.b) == -1 ||
--
2.32.0

View File

@ -48,8 +48,8 @@ ExclusiveArch: x86_64
%global source_directory 1.27-development
Name: nbdkit
Version: 1.27.8
Release: 3%{?dist}
Version: 1.27.9
Release: 1%{?dist}
Summary: NBD server
License: BSD
@ -70,11 +70,6 @@ Source2: libguestfs.keyring
# Maintainer script which helps with handling patches.
Source3: copy-patches.sh
# Fix issues in nbdkit-data-plugin on 32 bit platforms.
Patch1: 0001-data-Fix-issues-on-32-bit.patch
# Fix for qemu 6.1.
Patch2: 0001-cow-Fix-for-qemu-6.1-which-requires-backing-format.patch
BuildRequires: make
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool
@ -1244,6 +1239,10 @@ export LIBGUESTFS_TRACE=1
%changelog
* Sat Sep 4 2021 Richard W.M. Jones <rjones@redhat.com> - 1.27.9-1
- New upstream development version 1.27.9.
- Remove patches which are upstream.
* Wed Sep 1 2021 Richard W.M. Jones <rjones@redhat.com> - 1.27.8-3
- Re-enable tests on armv7.

View File

@ -1,2 +1,2 @@
SHA512 (nbdkit-1.27.8.tar.gz) = 0cc03ca57c3732d5f1b34805070b7d9b805253e5fc1cd55dc89638537e1b52465128e27a59c9d46d8de0177cb24f25b4cdd9954a036cf72fc75d5c80c8a603cd
SHA512 (nbdkit-1.27.8.tar.gz.sig) = 72f2aba33dd95531cac60c7ce34513e9a12725c7546926c8ec663505e80c3a18fef7555da2b6b55bbd2d5e799c850c30b473fc270a6d8c5f211ff875b13bf1a4
SHA512 (nbdkit-1.27.9.tar.gz) = bddfe61ef41c0bada014da0b06fa47900aa1cf29c69654c7c70dae4528163582cc86e9db9a8257fe124d7a0dbadbc41c88d9b86cd8e62692f40b17be05ba4417
SHA512 (nbdkit-1.27.9.tar.gz.sig) = 338f4151173231d51a436f43880718ef8ede12adbe7c1908a0b1df6de24d6f38d10bc5f2c4b39770696d1e075fddd80838a47537eba4c798d9c303b93a74288a