Add upstream patches since 1.5.9 was released.

This commit is contained in:
Richard W.M. Jones 2018-08-26 20:49:31 +01:00
parent 0d7a614562
commit f123f78660
3 changed files with 86 additions and 2 deletions

View File

@ -0,0 +1,42 @@
From 5fe11d518d97a22668b5a42e6865b5b5a06958fb Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 26 Aug 2018 20:31:04 +0100
Subject: [PATCH 1/2] tests: Fix comment describing largest size supported by
qemu.
Fixes commit ce1aed4ee811c234795d3c1f272a03b4105bf7ec
and commit 99136752e5de4d526df49051667311d87ff1e9a2.
---
tests/test-memory-largest-for-qemu.sh | 2 +-
tests/test-pattern-largest-for-qemu.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test-memory-largest-for-qemu.sh b/tests/test-memory-largest-for-qemu.sh
index e85abad..9bc498d 100755
--- a/tests/test-memory-largest-for-qemu.sh
+++ b/tests/test-memory-largest-for-qemu.sh
@@ -46,7 +46,7 @@ if ! qemu-io --help >/dev/null; then
fi
# Run nbdkit with memory plugin.
-# size = (2^63-1) & 511 which is the largest supported by qemu.
+# size = (2^63-1) & ~511 which is the largest supported by qemu.
nbdkit -f -v -D memory.dir=1 \
-P memory-largest-for-qemu.pid -U memory-largest-for-qemu.sock \
memory size=9223372036854775296 &
diff --git a/tests/test-pattern-largest-for-qemu.sh b/tests/test-pattern-largest-for-qemu.sh
index ae1ba71..cf70354 100755
--- a/tests/test-pattern-largest-for-qemu.sh
+++ b/tests/test-pattern-largest-for-qemu.sh
@@ -46,7 +46,7 @@ if ! qemu-io --help >/dev/null; then
fi
# Run nbdkit with pattern plugin.
-# size = (2^63-1) & 511 which is the largest supported by qemu.
+# size = (2^63-1) & ~511 which is the largest supported by qemu.
nbdkit -P pattern-largest-for-qemu.pid -U pattern-largest-for-qemu.sock \
pattern size=9223372036854775296
--
2.18.0

View File

@ -0,0 +1,37 @@
From 5de18b3764e86414325bbfdb6dc297462598072f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 26 Aug 2018 20:46:52 +0100
Subject: [PATCH 2/2] memory: Fix parsing of size= parameter on 32 bit
platforms.
---
plugins/memory/memory.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/plugins/memory/memory.c b/plugins/memory/memory.c
index 0b7fced..f175792 100644
--- a/plugins/memory/memory.c
+++ b/plugins/memory/memory.c
@@ -272,17 +272,10 @@ memory_unload (void)
static int
memory_config (const char *key, const char *value)
{
- int64_t r;
-
if (strcmp (key, "size") == 0) {
- r = nbdkit_parse_size (value);
- if (r == -1)
+ size = nbdkit_parse_size (value);
+ if (size == -1)
return -1;
- if (r > SIZE_MAX) {
- nbdkit_error ("size > SIZE_MAX");
- return -1;
- }
- size = (ssize_t) r;
}
else {
nbdkit_error ("unknown parameter '%s'", key);
--
2.18.0

View File

@ -32,7 +32,7 @@
Name: nbdkit
Version: 1.5.9
Release: 1%{?dist}
Release: 2%{?dist}
Summary: NBD server
License: BSD
@ -45,6 +45,10 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name
Source2: libguestfs.keyring
%endif
# All upstream patches since 1.5.9 was released.
Patch1: 0001-tests-Fix-comment-describing-largest-size-supported-.patch
Patch2: 0002-memory-Fix-parsing-of-size-parameter-on-32-bit-platf.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool
%endif
@ -950,8 +954,9 @@ popd
%changelog
* Sun Aug 26 2018 Richard W.M. Jones <rjones@redhat.com> - 1.5.9-1
* Sun Aug 26 2018 Richard W.M. Jones <rjones@redhat.com> - 1.5.9-2
- New upstream version 1.5.9.
- Add upstream patches since 1.5.9 was released.
* Tue Aug 21 2018 Richard W.M. Jones <rjones@redhat.com> - 1.5.8-1
- New upstream version 1.5.8.