From 0feddf862e37af165f668f5a76f3aa75250f0dfa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 Sep 2019 18:46:31 +0100 Subject: [PATCH 01/25] New upstream version 1.14.1. Fixes Denial of Service / Amplication Attack: https://www.redhat.com/archives/libguestfs/2019-September/msg00084.html --- nbdkit.spec | 9 +++++++-- sources | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 7a7d5ae..57dc3ed 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -27,8 +27,8 @@ %global source_directory 1.14-stable Name: nbdkit -Version: 1.14.0 -Release: 2%{?dist} +Version: 1.14.1 +Release: 1%{?dist} Summary: NBD server License: BSD @@ -895,6 +895,11 @@ make %{?_smp_mflags} check || { %changelog +* Thu Sep 12 2019 Richard W.M. Jones - 1.14.1-1 +- New upstream version 1.14.1. +- Fixes Denial of Service / Amplication Attack: + https://www.redhat.com/archives/libguestfs/2019-September/msg00084.html + * Thu Aug 29 2019 Richard W.M. Jones - 1.14.0-2 - Split out nbdkit-nbd-plugin subpackage. diff --git a/sources b/sources index 877e83a..9d21158 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.14.0.tar.gz) = 7f76ffabf01e1458a9a99527756e4d73f3acdb4193f8169b4e60604645d1fc01a96bd16ea76564d587e7773f9c86a40740d4e15863f0b2c051860cdf1f27c942 -SHA512 (nbdkit-1.14.0.tar.gz.sig) = 6f8215537c6bd780875eac154dbb7b8cf2fa95de58ac80eaa8fe44ddcb3e6d2cdef5991f87f888b63f528d6501172f84caafcf1dcb0400c22cde0ebb421524c8 +SHA512 (nbdkit-1.14.1.tar.gz) = fb91519e70c6e5a83004211e58de3b709a68bf1ba308f0ad10bf9a4b1ba19e7fb1792f31653309cbc7fd215d4f0b14cafa97f5d7cab5d7f46689c9091ca4a223 +SHA512 (nbdkit-1.14.1.tar.gz.sig) = ebcb72aa1b0290f1f2c01032b57bd3a2c5d92fbc1423b5c1b48c05ed8945fd4a4caa05cb9ae280e7681642eb15006c72422812c745e8e3784f5e7ce67bd9a9e2 From 1d3e09709b582d6f7002672d0f36e3bca13305b2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 20 Sep 2019 15:23:57 +0100 Subject: [PATCH 02/25] New upstream version 1.14.2. Fixes second Denial of Service attack: https://www.redhat.com/archives/libguestfs/2019-September/msg00272.html --- nbdkit.spec | 7 ++++++- sources | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 57dc3ed..1a91803 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -27,7 +27,7 @@ %global source_directory 1.14-stable Name: nbdkit -Version: 1.14.1 +Version: 1.14.2 Release: 1%{?dist} Summary: NBD server @@ -895,6 +895,11 @@ make %{?_smp_mflags} check || { %changelog +* Fri Sep 20 2019 Richard W.M. Jones - 1.14.2-1 +- New upstream version 1.14.2. +- Fixes second Denial of Service attack: + https://www.redhat.com/archives/libguestfs/2019-September/msg00272.html + * Thu Sep 12 2019 Richard W.M. Jones - 1.14.1-1 - New upstream version 1.14.1. - Fixes Denial of Service / Amplication Attack: diff --git a/sources b/sources index 9d21158..f07ccc5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.14.1.tar.gz) = fb91519e70c6e5a83004211e58de3b709a68bf1ba308f0ad10bf9a4b1ba19e7fb1792f31653309cbc7fd215d4f0b14cafa97f5d7cab5d7f46689c9091ca4a223 -SHA512 (nbdkit-1.14.1.tar.gz.sig) = ebcb72aa1b0290f1f2c01032b57bd3a2c5d92fbc1423b5c1b48c05ed8945fd4a4caa05cb9ae280e7681642eb15006c72422812c745e8e3784f5e7ce67bd9a9e2 +SHA512 (nbdkit-1.14.2.tar.gz) = cb90cdcc2733897bcf08ad271f59ea741bc21438e4c67e7d3d41cfbf660d8d339186cc5ce75e4e885f57ce45f6b75ac2fc79283d53ec1fba5b16c0f2a1c58efa +SHA512 (nbdkit-1.14.2.tar.gz.sig) = ce144ae2dec52302d3099432e551b6c46df2fdaf2144ebe57044027da859aa50bd9d0f4f691ae06ef3742610d711d5456c00be67fad7474f6041a22b4ed22d0b From f74dd67565a5255d7c205b053a30a760055b2b61 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 27 Nov 2019 11:05:38 +0000 Subject: [PATCH 03/25] Use gpgverify macro instead of explicit gpgv2 command. (cherry picked from commit f269e46c70e2f9d7cd89fdc9a5cae71f9d2edfa8) --- nbdkit.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 25f4d41..fbe4934 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -550,8 +550,7 @@ for %{name}. %prep %if 0%{verify_tarball_signature} -tmphome="$(mktemp -d)" -gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %endif %autosetup -p1 %if 0%{patches_touch_autotools} @@ -903,6 +902,8 @@ make %{?_smp_mflags} check || { %changelog +- Use gpgverify macro instead of explicit gpgv2 command. + * Thu Nov 14 2019 Richard W.M. Jones - 1.16.0-1 - New stable release 1.16.0. From 0a511aee2e12c628cad77b0a843ae8dffe2fb2b5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 3 Dec 2019 13:21:15 +0000 Subject: [PATCH 04/25] New stable release 1.16.1. Use gpgverify macro instead of explicit gpgv2 command. --- nbdkit.spec | 4 +++- sources | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index fbe4934..e75ac7f 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -27,7 +27,7 @@ %global source_directory 1.16-stable Name: nbdkit -Version: 1.16.0 +Version: 1.16.1 Release: 1%{?dist} Summary: NBD server @@ -902,6 +902,8 @@ make %{?_smp_mflags} check || { %changelog +* Tue Dec 3 2019 Richard W.M. Jones - 1.16.1-1 +- New stable release 1.16.1. - Use gpgverify macro instead of explicit gpgv2 command. * Thu Nov 14 2019 Richard W.M. Jones - 1.16.0-1 diff --git a/sources b/sources index 2e8a5d5..b6d0780 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.16.0.tar.gz) = 71f38d0290f6ae9bb765d728857b7eaee12d3960d46ad760f9ebe76c747a26fa72a770982af94d43cda5631f90a3c24002ca671aba599e674e929dcafa533e6e -SHA512 (nbdkit-1.16.0.tar.gz.sig) = bedc654fc3dd5b08415f482678fb7eba4a4c590d139176b0a08833642ee1503af36e868d80dbbeb3ad1e869b2ba001d6f997f8b516988963787e2c00ca4eabb3 +SHA512 (nbdkit-1.16.1.tar.gz) = cf908575ee341257dd7c89a317ca6912e135314992f5e60f6c33260a3e5bd3c21c959c9183d4c5f90738f2c7af5a600f8df166416c6c44c74acd83c42e6dfe1d +SHA512 (nbdkit-1.16.1.tar.gz.sig) = 6bd79cbafaba086e534a631686017122b21d83bfa6bf26f45b41b90fcc882da1209a75cd0915416c226bf891c15e80e1974bc3203dad1c545e248f04453f33c0 From 7a05d161dcfb5ca13464ea885db5724238ee9dd1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 1 Dec 2019 20:39:55 +0000 Subject: [PATCH 05/25] Fix complete_test_arches. (cherry picked from commit 41f790f919f0659cdec4112afe1606c3bcf3716d) --- nbdkit.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index e75ac7f..f5dd73e 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -9,8 +9,7 @@ # On all other architectures, a simpler test suite must pass. This # omits any tests that run full qemu, since running qemu under TCG is # often broken on non-x86_64 arches. -# x86_64 is currently broken in F31 by https://bugzilla.redhat.com/1692047 -%global complete_test_arches NONE +%global complete_test_arches x86_64 # Disable libvirt on riscv64 for now. %ifnarch riscv64 @@ -559,8 +558,7 @@ autoreconf -i %ifnarch %{complete_test_arches} # Simplify the test suite so it doesn't require qemu. -sed -i -e '/^if HAVE_LIBGUESTFS/,/^endif HAVE_LIBGUESTFS/d' tests/Makefile.am -sed -i -e '/^if HAVE_GUESTFISH/,/^endif HAVE_GUESTFISH/d' tests/Makefile.am +sed -i -e '/^LIBGUESTFS_TESTS/d' tests/Makefile.am autoreconf -i %endif From f0c7a95a1f0457aaddc104a35ee4939e7e70af69 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 1 Dec 2019 20:39:55 +0000 Subject: [PATCH 06/25] Fix complete_test_arches again. (cherry picked from commit 33d5db8c05aa1e9ade7c1ec04b07dc810c1c1d8f) --- nbdkit.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/nbdkit.spec b/nbdkit.spec index f5dd73e..427de38 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -559,6 +559,7 @@ autoreconf -i %ifnarch %{complete_test_arches} # Simplify the test suite so it doesn't require qemu. sed -i -e '/^LIBGUESTFS_TESTS/d' tests/Makefile.am +sed -i -e '/^if HAVE_GUESTFISH/,/^endif HAVE_GUESTFISH/d' tests/Makefile.am autoreconf -i %endif From f3e43d71a90f6b8156e465e759d709cdb6780fcf Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 1 Dec 2019 21:15:40 +0000 Subject: [PATCH 07/25] Disable libguestfs on ppc64le because of https://bugzilla.redhat.com/show_bug.cgi?id=1778520 (cherry picked from commit 4ccc35c84d1aa38291ab40832825586643bf984e) --- nbdkit.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nbdkit.spec b/nbdkit.spec index 427de38..d866d47 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -1,6 +1,8 @@ %global _hardened_build 1 -%ifarch aarch64 %{arm} x86_64 ppc %{power64} +# Broken on {power64} because of +# https://bugzilla.redhat.com/show_bug.cgi?id=1778520 +%ifarch aarch64 %{arm} x86_64 ppc %global have_libguestfs 1 %endif From 4c9af19e9795ea66cd5137211df1e82a6bf99e8e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 28 Jan 2020 11:16:00 +0000 Subject: [PATCH 08/25] New stable release 1.16.2. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index d866d47..fd18937 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -28,7 +28,7 @@ %global source_directory 1.16-stable Name: nbdkit -Version: 1.16.1 +Version: 1.16.2 Release: 1%{?dist} Summary: NBD server @@ -903,6 +903,9 @@ make %{?_smp_mflags} check || { %changelog +* Tue Jan 28 2020 Richard W.M. Jones - 1.16.2-1 +- New stable release 1.16.2. + * Tue Dec 3 2019 Richard W.M. Jones - 1.16.1-1 - New stable release 1.16.1. - Use gpgverify macro instead of explicit gpgv2 command. diff --git a/sources b/sources index b6d0780..1562891 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.16.1.tar.gz) = cf908575ee341257dd7c89a317ca6912e135314992f5e60f6c33260a3e5bd3c21c959c9183d4c5f90738f2c7af5a600f8df166416c6c44c74acd83c42e6dfe1d -SHA512 (nbdkit-1.16.1.tar.gz.sig) = 6bd79cbafaba086e534a631686017122b21d83bfa6bf26f45b41b90fcc882da1209a75cd0915416c226bf891c15e80e1974bc3203dad1c545e248f04453f33c0 +SHA512 (nbdkit-1.16.2.tar.gz) = 3b3fe72373a4094e5c26dc9ea3e10d9f859524c0cacea33dbae0ee127a9e8bfadc277dc909c5240a7b918effcf67a790810adf6b2ebcd0a87dc4995d78c14a86 +SHA512 (nbdkit-1.16.2.tar.gz.sig) = 73feb233fe74e1e303fdca8441b9321b78d77fdb9a61de43037ffdbab0262376ad7e9b4c0d4f2182668f9aceec64886ca4b1cef90609d70306ce4cbe3a34e216 From 8684a7247c31a69483e523df432cf8fb711efc1e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 28 Jan 2020 11:52:29 +0000 Subject: [PATCH 09/25] Disable tests/test-captive.sh. (cherry picked from commit d628f9060363f5ddd8b36e8b0c7aca33628f40ed) --- nbdkit.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nbdkit.spec b/nbdkit.spec index fd18937..68b2f86 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -604,6 +604,10 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man3/nbdkit-rust-plugin.3* # Workaround for broken libvirt (RHBZ#1138604). mkdir -p $HOME/.cache/libvirt +# tests/test-captive.sh is racy especially on s390x. We need to +# rethink this test upstream. +truncate -s 0 tests/test-captive.sh + # Temporarily kill tests/test-shutdown.sh because this test is racy on # slow hardware. truncate -s 0 tests/test-shutdown.sh From 8295c3fff62bdb350def1a73842c34cdd3d3f358 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 6 Mar 2020 09:29:29 +0000 Subject: [PATCH 10/25] New upstream version 1.18.1. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 983b737..093fcbc 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.18-stable Name: nbdkit -Version: 1.18.0 +Version: 1.18.1 Release: 1%{?dist} Summary: NBD server @@ -932,6 +932,9 @@ make %{?_smp_mflags} check || { %changelog +* Fri Mar 06 2020 Richard W.M. Jones - 1.18.1-1 +- New upstream version 1.18.1. + * Thu Feb 27 2020 Richard W.M. Jones - 1.18.0-1 - New upstream stable branch version 1.18.0. diff --git a/sources b/sources index 4216e06..7e09716 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.18.0.tar.gz) = b81d34a8ee9e2d2d84714828caafd2f7728e4c312994cfa6dd1a662b043d0649ba343efd30e634c125f249e9d88fecf60ad56cfd99dd8ab7669cf4565f2c242f -SHA512 (nbdkit-1.18.0.tar.gz.sig) = a16b914c1ab0c7ef83a7da5b200f8e1c83cb45a783744f8a3b7dc69e9f8803075813d65d5c85ba108473b029ba9862b89c709ab5a45b9c22e992fa0e40bc37c1 +SHA512 (nbdkit-1.18.1.tar.gz) = 39d689dc93a9837cb5228fa19a93e58a0c64d5785af2d0e2f016eee1317da608840952858b4e8b4e1eccdb755cafb356a324b6ca0bbab4f3dfcf1ce5eca281d3 +SHA512 (nbdkit-1.18.1.tar.gz.sig) = 53990323bedd81a888cfafd988abe47f9c425305ac6de5aa5d4131308f016a68950b29fbd1cee9a6c6f99662737ca2a08e487521193c5372cdda47c167477d08 From 7976157356cef01b028d92f5175f91d4d1ac995a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 6 Mar 2020 09:29:33 +0000 Subject: [PATCH 11/25] New stable release 1.16.3. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 68b2f86..d176a14 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -28,7 +28,7 @@ %global source_directory 1.16-stable Name: nbdkit -Version: 1.16.2 +Version: 1.16.3 Release: 1%{?dist} Summary: NBD server @@ -907,6 +907,9 @@ make %{?_smp_mflags} check || { %changelog +* Fri Mar 06 2020 Richard W.M. Jones - 1.16.3-1 +- New stable release 1.16.3. + * Tue Jan 28 2020 Richard W.M. Jones - 1.16.2-1 - New stable release 1.16.2. diff --git a/sources b/sources index 1562891..f58c28b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.16.2.tar.gz) = 3b3fe72373a4094e5c26dc9ea3e10d9f859524c0cacea33dbae0ee127a9e8bfadc277dc909c5240a7b918effcf67a790810adf6b2ebcd0a87dc4995d78c14a86 -SHA512 (nbdkit-1.16.2.tar.gz.sig) = 73feb233fe74e1e303fdca8441b9321b78d77fdb9a61de43037ffdbab0262376ad7e9b4c0d4f2182668f9aceec64886ca4b1cef90609d70306ce4cbe3a34e216 +SHA512 (nbdkit-1.16.3.tar.gz) = ed74adbf40d91d5b6c55f14dd084283ece50aade967c947dc6bcab8f122761fb422b62e64524f8fa9283fb9898182f7abb39f12f4f02a58c449eaf9b565a71c1 +SHA512 (nbdkit-1.16.3.tar.gz.sig) = 42a3841773fcf51c14489fbfb214f7b55ca4d16c3db3f6bb73a13c68238cd6693c0872f32aec4e321b22c37fb8ca45d1e29c7c3718f146c264f909f2bd262315 From 534944912b8728f2cab5c4228ec8a49cdabde64f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Mar 2020 13:41:45 +0000 Subject: [PATCH 12/25] New upstream version 1.18.2. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 093fcbc..1f0d585 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.18-stable Name: nbdkit -Version: 1.18.1 +Version: 1.18.2 Release: 1%{?dist} Summary: NBD server @@ -932,6 +932,9 @@ make %{?_smp_mflags} check || { %changelog +* Tue Mar 17 2020 Richard W.M. Jones - 1.18.2-1 +- New upstream version 1.18.2. + * Fri Mar 06 2020 Richard W.M. Jones - 1.18.1-1 - New upstream version 1.18.1. diff --git a/sources b/sources index 7e09716..eee4d2a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.18.1.tar.gz) = 39d689dc93a9837cb5228fa19a93e58a0c64d5785af2d0e2f016eee1317da608840952858b4e8b4e1eccdb755cafb356a324b6ca0bbab4f3dfcf1ce5eca281d3 -SHA512 (nbdkit-1.18.1.tar.gz.sig) = 53990323bedd81a888cfafd988abe47f9c425305ac6de5aa5d4131308f016a68950b29fbd1cee9a6c6f99662737ca2a08e487521193c5372cdda47c167477d08 +SHA512 (nbdkit-1.18.2.tar.gz) = 5934d4b825e546310732ecefd6f227688532cf703bd5d93dd3f0b422d95b07a3b55baef5bac4b306e65853299bfbbb121894b8fc95b3b4ab9e557dfce398d33c +SHA512 (nbdkit-1.18.2.tar.gz.sig) = c9aa43a9f58438d87013da2f159b6a5b81cff5aff2805c97ed892156d9bdb902ae4ae098503f46a9059c23d64151be4de98ed88da25514aa2436f5d828225a02 From 54bf62f06d7b4292a949d55e124e8cbe697a3412 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Mar 2020 13:42:42 +0000 Subject: [PATCH 13/25] New stable release 1.16.4. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index d176a14..e960e02 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -28,7 +28,7 @@ %global source_directory 1.16-stable Name: nbdkit -Version: 1.16.3 +Version: 1.16.4 Release: 1%{?dist} Summary: NBD server @@ -907,6 +907,9 @@ make %{?_smp_mflags} check || { %changelog +* Tue Mar 17 2020 Richard W.M. Jones - 1.16.4-1 +- New stable release 1.16.4. + * Fri Mar 06 2020 Richard W.M. Jones - 1.16.3-1 - New stable release 1.16.3. diff --git a/sources b/sources index f58c28b..f59b807 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.16.3.tar.gz) = ed74adbf40d91d5b6c55f14dd084283ece50aade967c947dc6bcab8f122761fb422b62e64524f8fa9283fb9898182f7abb39f12f4f02a58c449eaf9b565a71c1 -SHA512 (nbdkit-1.16.3.tar.gz.sig) = 42a3841773fcf51c14489fbfb214f7b55ca4d16c3db3f6bb73a13c68238cd6693c0872f32aec4e321b22c37fb8ca45d1e29c7c3718f146c264f909f2bd262315 +SHA512 (nbdkit-1.16.4.tar.gz) = de5cbf49be6815844122b0703af773e853239f4e8d40aaf9ea86f54620372aa62760564f133fc2c3359337ebbf58c3e23aa9dc930146630dc498c4181be072b5 +SHA512 (nbdkit-1.16.4.tar.gz.sig) = 37db61432087da711937ed394911d83324753f06a7e9f72805848feb651aa4471cec6a23777e0b8a063e7604992338771cbc7170e3247ecc34ef5b079421cb0d From aa6d763ce501e6f8e67a6ae70cc51c35c718d9f5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 28 Mar 2020 21:31:27 +0000 Subject: [PATCH 14/25] New upstream version 1.18.3. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 1f0d585..ebb68d9 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.18-stable Name: nbdkit -Version: 1.18.2 +Version: 1.18.3 Release: 1%{?dist} Summary: NBD server @@ -932,6 +932,9 @@ make %{?_smp_mflags} check || { %changelog +* Sat Mar 28 2020 Richard W.M. Jones - 1.18.3-1 +- New upstream version 1.18.3. + * Tue Mar 17 2020 Richard W.M. Jones - 1.18.2-1 - New upstream version 1.18.2. diff --git a/sources b/sources index eee4d2a..9c15eb8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.18.2.tar.gz) = 5934d4b825e546310732ecefd6f227688532cf703bd5d93dd3f0b422d95b07a3b55baef5bac4b306e65853299bfbbb121894b8fc95b3b4ab9e557dfce398d33c -SHA512 (nbdkit-1.18.2.tar.gz.sig) = c9aa43a9f58438d87013da2f159b6a5b81cff5aff2805c97ed892156d9bdb902ae4ae098503f46a9059c23d64151be4de98ed88da25514aa2436f5d828225a02 +SHA512 (nbdkit-1.18.3.tar.gz) = de7b7c9e236dc9335bc05c6649825bb0e72161510dd73989e17fc98743c5b66dfcf59a089759cf5c92e5c7eb48b9379aff34d3b12d0cd7421c8bb63cb6b90910 +SHA512 (nbdkit-1.18.3.tar.gz.sig) = 5da9223a6ec3052c3d53e1117f26a88601d69898495c1b44cbfb25a8b0e1d59055caf1d52631fee2b3e8352c24ba1f2bd7ddcb7e179684b39ee2e36377a2226d From 3887f933512ff38862c5b6cc5f30ef5c6d8789c5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 28 Mar 2020 21:31:30 +0000 Subject: [PATCH 15/25] New stable release 1.16.5. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index e960e02..9898874 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -28,7 +28,7 @@ %global source_directory 1.16-stable Name: nbdkit -Version: 1.16.4 +Version: 1.16.5 Release: 1%{?dist} Summary: NBD server @@ -907,6 +907,9 @@ make %{?_smp_mflags} check || { %changelog +* Sat Mar 28 2020 Richard W.M. Jones - 1.16.5-1 +- New stable release 1.16.5. + * Tue Mar 17 2020 Richard W.M. Jones - 1.16.4-1 - New stable release 1.16.4. diff --git a/sources b/sources index f59b807..07b1dab 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.16.4.tar.gz) = de5cbf49be6815844122b0703af773e853239f4e8d40aaf9ea86f54620372aa62760564f133fc2c3359337ebbf58c3e23aa9dc930146630dc498c4181be072b5 -SHA512 (nbdkit-1.16.4.tar.gz.sig) = 37db61432087da711937ed394911d83324753f06a7e9f72805848feb651aa4471cec6a23777e0b8a063e7604992338771cbc7170e3247ecc34ef5b079421cb0d +SHA512 (nbdkit-1.16.5.tar.gz) = 2be1a1068a645fd7179d68a3ef27720b3d177f7302ba41f3d22590d3ee90a6f70035a58f559ddf417e1f208b4ee3df72b578acb053d418fe70914ea6332881a3 +SHA512 (nbdkit-1.16.5.tar.gz.sig) = cdccea24fc64d29c127eb0e4348c39cb84a6a215969435951b89053e5eeb3276e5a6839e37f47479d7d271eccc10d2c6173fe9ceb36f09913b1003f9fe908f51 From a781f281a7488e41f490b9bd4888aa46a547f1bd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Apr 2020 13:22:51 +0100 Subject: [PATCH 16/25] New upstream version 1.18.4. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index ebb68d9..099cb7b 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.18-stable Name: nbdkit -Version: 1.18.3 +Version: 1.18.4 Release: 1%{?dist} Summary: NBD server @@ -932,6 +932,9 @@ make %{?_smp_mflags} check || { %changelog +* Thu Apr 16 2020 Richard W.M. Jones - 1.18.4-1 +- New upstream version 1.18.4. + * Sat Mar 28 2020 Richard W.M. Jones - 1.18.3-1 - New upstream version 1.18.3. diff --git a/sources b/sources index 9c15eb8..bdcabdd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.18.3.tar.gz) = de7b7c9e236dc9335bc05c6649825bb0e72161510dd73989e17fc98743c5b66dfcf59a089759cf5c92e5c7eb48b9379aff34d3b12d0cd7421c8bb63cb6b90910 -SHA512 (nbdkit-1.18.3.tar.gz.sig) = 5da9223a6ec3052c3d53e1117f26a88601d69898495c1b44cbfb25a8b0e1d59055caf1d52631fee2b3e8352c24ba1f2bd7ddcb7e179684b39ee2e36377a2226d +SHA512 (nbdkit-1.18.4.tar.gz) = 701de0f0f83b9960b8ec40f2e31c2d65d656bcc20941efa8fdf4b367840c859acfde2f60a6bcd96ad158de6466197fd1441dbf301ca27cbc7a27ef9d315752e5 +SHA512 (nbdkit-1.18.4.tar.gz.sig) = a46af4006155270b981d90c3fe2a974f1514cb158d29c89447331ac3a6abf58544b1c064e592ed8e0f6dbc1cb3899efe336dc8f740bdf428dc54a799878471d3 From 9c551dcb7fa69a3e3f9f192861c2d8d2f70119d9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 4 May 2020 19:08:25 +0100 Subject: [PATCH 17/25] New stable release 1.16.6. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 9898874..ae41a04 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -28,7 +28,7 @@ %global source_directory 1.16-stable Name: nbdkit -Version: 1.16.5 +Version: 1.16.6 Release: 1%{?dist} Summary: NBD server @@ -907,6 +907,9 @@ make %{?_smp_mflags} check || { %changelog +* Mon May 4 2020 Richard W.M. Jones - 1.16.6-1 +- New stable release 1.16.6. + * Sat Mar 28 2020 Richard W.M. Jones - 1.16.5-1 - New stable release 1.16.5. diff --git a/sources b/sources index 07b1dab..26d1bbd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.16.5.tar.gz) = 2be1a1068a645fd7179d68a3ef27720b3d177f7302ba41f3d22590d3ee90a6f70035a58f559ddf417e1f208b4ee3df72b578acb053d418fe70914ea6332881a3 -SHA512 (nbdkit-1.16.5.tar.gz.sig) = cdccea24fc64d29c127eb0e4348c39cb84a6a215969435951b89053e5eeb3276e5a6839e37f47479d7d271eccc10d2c6173fe9ceb36f09913b1003f9fe908f51 +SHA512 (nbdkit-1.16.6.tar.gz) = bded72bf16a2455671b03d403dba03c465dc43035b20ce75fdc6f55cf6703e53874260b6450df8fe19edc11f1698746567f900272a1e00daf1ca4b728bd8e2f8 +SHA512 (nbdkit-1.16.6.tar.gz.sig) = 5fcc2c5cbcf9198329cf73377a5892cdd45451228abb7cd585c5916cd2664bc1a0b3f4d81eda5f17563c2310da998532e73eb3697746ba9bfe290777e0adc3cf From 50b7c3304976daf7efe9ca5bebcada89c1d4ae43 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 4 May 2020 19:08:30 +0100 Subject: [PATCH 18/25] New upstream version 1.18.5. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 099cb7b..334814f 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.18-stable Name: nbdkit -Version: 1.18.4 +Version: 1.18.5 Release: 1%{?dist} Summary: NBD server @@ -932,6 +932,9 @@ make %{?_smp_mflags} check || { %changelog +* Mon May 4 2020 Richard W.M. Jones - 1.18.5-1 +- New upstream version 1.18.5. + * Thu Apr 16 2020 Richard W.M. Jones - 1.18.4-1 - New upstream version 1.18.4. diff --git a/sources b/sources index bdcabdd..70a847b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.18.4.tar.gz) = 701de0f0f83b9960b8ec40f2e31c2d65d656bcc20941efa8fdf4b367840c859acfde2f60a6bcd96ad158de6466197fd1441dbf301ca27cbc7a27ef9d315752e5 -SHA512 (nbdkit-1.18.4.tar.gz.sig) = a46af4006155270b981d90c3fe2a974f1514cb158d29c89447331ac3a6abf58544b1c064e592ed8e0f6dbc1cb3899efe336dc8f740bdf428dc54a799878471d3 +SHA512 (nbdkit-1.18.5.tar.gz) = 3099db070d1418ba9f6ab96b296c10e7bff99e72c2ab1cec1ee7978257b1f1a147289a002a20b217fbf58be4b4df667b7bada52090f7b9f3fefe06c9c927c667 +SHA512 (nbdkit-1.18.5.tar.gz.sig) = 529205fc4b1fe7290a54f7269676b15797c39f1683eee5ef7cbc23936c73a82e4d7de0898c3fac74d0c6e64d278b4f4877f8ff55e8f552f6cfaa88fcda76ec7e From c9f10573208157a825872c0bf2d70e10f5c17538 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 19 May 2020 21:50:40 +0100 Subject: [PATCH 19/25] New upstream version 1.20.2. --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index babdc3a..ccfe535 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.20-stable Name: nbdkit -Version: 1.20.1 +Version: 1.20.2 Release: 1%{?dist} Summary: NBD server @@ -972,6 +972,9 @@ make %{?_smp_mflags} check || { %changelog +* Tue May 19 2020 Richard W.M. Jones - 1.20.2-1 +- New upstream version 1.20.2. + * Mon May 4 2020 Richard W.M. Jones - 1.20.1-2 - New upstream version 1.20.1. diff --git a/sources b/sources index 09ada51..2aad156 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.20.1.tar.gz) = d3c1d8bb3c739899303ee20c7375fb2b7126569bf071e4185536aaf776915c69434fbcda09964c9b38b43315a33e11ebd02ac68c7dacfbca676f7431c4d6ca2d -SHA512 (nbdkit-1.20.1.tar.gz.sig) = 9bc993c42b48669ef554a74ca85f36d357432eba8df43d62aa2cee980d6c51c0e69c392aa246c009c0d14d5b89d8fa0b3b0242030363b7e9d94ccb48aae5d47e +SHA512 (nbdkit-1.20.2.tar.gz) = 4a03c6e8007d60a98feb829a228188d6a0712343c2131e815a5cc0bf1650dfbfa262d7dcba7ecb20163fee98d3dfd9d8384c8023f831b0b890d4bc267952ea59 +SHA512 (nbdkit-1.20.2.tar.gz.sig) = cd2f4bd14f17ce83e165285470e75ab475cf55abd51ac803b18df28c62b14347974c8da6485789458eac48e9e5ab587573dace95b01df1fef88439d4cce583fb From 0a9c3f00a71206c5fe678227c3b18f86cd16f3c2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 20 May 2020 16:06:27 +0100 Subject: [PATCH 20/25] Add upstream patch to make tests/test-truncate4.sh more stable on s390x. (cherry picked from commit 1da65fc037b049cb56c1343eea38510ff068f844) (cherry picked from commit 8224035505b63924332142b66ff231e9435c5fcd) --- ...st-truncate4.sh-Rewrite-to-use-nbdsh.patch | 167 ++++++++++++++++++ nbdkit.spec | 8 +- 2 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch diff --git a/0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch b/0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch new file mode 100644 index 0000000..cd6bf8f --- /dev/null +++ b/0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch @@ -0,0 +1,167 @@ +From 0632acc76bfeb7d70d3eefa42fc842ce6b7be4f8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 20 May 2020 13:27:27 +0100 +Subject: [PATCH] tests/test-truncate4.sh: Rewrite to use nbdsh. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The old test relied on issuing an asynchronous command to a qemu-io +subprocess, requiring a sleep to ensure that the command had been +carried out. ‘sleep 1’ was not long enough on s390x as you can see +from this partial trace: + + + exec + + qemu-io -f raw nbd:unix:/tmp/tmp.jqOZGj6dnX + + exec + + echo 'Reading from connection A, try 1' + Reading from connection A, try 1 + + echo 'r -P 1 0 1024' + + sleep 1 + +Above we issue the command and sleep while it executes. However: + + nbdkit: debug: accepted connection + nbdkit: file[1]: debug: truncate: preconnect + nbdkit: file[1]: debug: file: preconnect + nbdkit: file[1]: debug: newstyle negotiation: flags: global 0x3 + + echo 'Resizing down' + Resizing down + + truncate -s 512 truncate4.data + nbdkit: file[1]: debug: newstyle negotiation: client flags: 0x3 + nbdkit: file[1]: debug: newstyle negotiation: NBD_OPT_STRUCTURED_REPLY: client requested structured replies + +Here are still connecting to nbdkit from "connection A", long after +the sleep has finished and the truncate has been done. + +Instead of increasing the sleep and hoping for the best, I chose to +rewrite the test to use nbdsh. This allows us to control both +connections from a single process, making the test predicatable and +easier to understand. +--- + tests/test-truncate4.sh | 85 +++++++++++++++++++++++++---------------- + 1 file changed, 53 insertions(+), 32 deletions(-) + +diff --git a/tests/test-truncate4.sh b/tests/test-truncate4.sh +index e4be626b..36b2743c 100755 +--- a/tests/test-truncate4.sh ++++ b/tests/test-truncate4.sh +@@ -1,6 +1,6 @@ + #!/usr/bin/env bash + # nbdkit +-# Copyright (C) 2019 Red Hat Inc. ++# Copyright (C) 2019-2020 Red Hat Inc. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are +@@ -31,55 +31,76 @@ + # SUCH DAMAGE. + + # Regression test when next_ops->get_size changes between connections. ++# + # For now, NBD does not support dynamic resize; but the file plugin + # reads size from the file system for each new connection, at which + # point the client remembers that size for the life of the connection. ++# + # We are testing that connection A can still see the tail of a file, + # even when connection B is opened while the file was temporarily +-# shorter (if the actions of connection B affect the size visible +-# through connection A, we didn't isolate per-connection state). ++# shorter. If the actions of connection B affect the size visible ++# through connection A, we didn't isolate per-connection state. + + source ./functions.sh + set -e + set -x + +-requires qemu-io --version ++requires nbdsh --version + + sock=`mktemp -u` +-files="truncate4.out truncate4.pid $sock truncate4.data" ++data=truncate4.data ++files="truncate4.pid $sock $data" + rm -f $files + cleanup_fn rm -f $files + +-# Initial file contents: 1k of pattern 1 +-truncate -s 1024 truncate4.data +-qemu-io -c 'w -P 1 0 1024' -f raw truncate4.data ++# Create and truncate the file. ++: > $data + + # Run nbdkit with file plugin and truncate filter in front. + start_nbdkit -P truncate4.pid -U $sock \ + --filter=truncate \ +- file truncate4.data \ ++ file $data \ + round-up=1024 + +-fail=0 +-exec 4>&1 # Save original stdout +-{ +- exec 5>&1 >&4 # Save connection A, set stdout back to original +- echo 'Reading from connection A, try 1' +- echo 'r -P 1 0 1024' >&5 +- sleep 1 +- echo 'Resizing down' +- truncate -s 512 truncate4.data +- echo 'Reading from connection B' +- echo 'r -P 1 0 512' | qemu-io -f raw nbd:unix:$sock >> truncate4.out +- echo 'Restoring size' +- truncate -s 1024 truncate4.data +- qemu-io -c 'w -P 2 0 1024' -f raw truncate4.data +- echo 'Reading from connection A, try 2' +- echo 'r -P 2 512 512' >&5 +- echo 'quit' >&5 +-} | qemu-io -f raw nbd:unix:$sock >> truncate4.out || fail=1 +-exec 4>&- +- +-cat truncate4.out +-grep 'Pattern verification failed' truncate4.out && fail=1 +-exit $fail ++export data sock ++nbdsh -c ' ++import os ++ ++data = os.environ["data"] ++sock = os.environ["sock"] ++ ++def restore_file(): ++ # Original test data, 1024 bytes of "TEST" repeated. ++ with open (data, "w") as file: ++ file.write ("TEST"*256) ++ ++restore_file () ++ ++print ("Connection A.", flush=True) ++connA = nbd.NBD () ++connA.set_handle_name ("A") ++connA.connect_unix (sock) ++print ("Check the size.", flush=True) ++assert connA.get_size () == 1024 ++ ++print ("Truncate %s to 512 bytes." % data, flush=True) ++os.truncate (data, 512) ++ ++print ("Connection B.", flush=True) ++connB = nbd.NBD () ++connB.set_handle_name ("B") ++connB.connect_unix (sock) ++print ("Check the size.", flush=True) ++assert connB.get_size () == 1024 # because of the round-up parameter ++print ("Read data from connection B.", flush=True) ++buf = connB.pread (1024, 0) ++assert buf == b"TEST"*128 + b"\0"*512 ++ ++print ("Restore the file size and original data.", flush=True) ++restore_file () ++ ++print ("Read data from connection A.", flush=True) ++buf = connA.pread (1024, 0) ++assert 1024 == len (buf) ++assert buf == b"TEST"*256 ++' +-- +2.25.0 + diff --git a/nbdkit.spec b/nbdkit.spec index 2fa34e3..3d3a4cc 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -38,7 +38,7 @@ ExclusiveArch: x86_64 Name: nbdkit Version: 1.20.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: NBD server License: BSD @@ -51,6 +51,9 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name Source2: libguestfs.keyring %endif +# Upstream patch to make tests/test-truncate4.sh more stable on s390x. +Patch1: 0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -972,6 +975,9 @@ make %{?_smp_mflags} check || { %changelog +* Wed May 20 2020 Richard W.M. Jones - 1.21.4-2 +- Add upstream patch to make tests/test-truncate4.sh more stable on s390x. + * Tue May 19 2020 Richard W.M. Jones - 1.20.2-1 - New upstream version 1.20.2. From 58b45eaa0efc86a12f3a6d373f8ae8075192a70d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Jun 2020 14:20:26 +0100 Subject: [PATCH 21/25] New upstream version 1.20.3. (cherry picked from commit 726fd0a7c7c64b86aaa26b2b557218a4232f3ff7) --- ...st-truncate4.sh-Rewrite-to-use-nbdsh.patch | 167 ------------------ nbdkit.spec | 12 +- sources | 4 +- 3 files changed, 8 insertions(+), 175 deletions(-) delete mode 100644 0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch diff --git a/0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch b/0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch deleted file mode 100644 index cd6bf8f..0000000 --- a/0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 0632acc76bfeb7d70d3eefa42fc842ce6b7be4f8 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 20 May 2020 13:27:27 +0100 -Subject: [PATCH] tests/test-truncate4.sh: Rewrite to use nbdsh. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The old test relied on issuing an asynchronous command to a qemu-io -subprocess, requiring a sleep to ensure that the command had been -carried out. ‘sleep 1’ was not long enough on s390x as you can see -from this partial trace: - - + exec - + qemu-io -f raw nbd:unix:/tmp/tmp.jqOZGj6dnX - + exec - + echo 'Reading from connection A, try 1' - Reading from connection A, try 1 - + echo 'r -P 1 0 1024' - + sleep 1 - -Above we issue the command and sleep while it executes. However: - - nbdkit: debug: accepted connection - nbdkit: file[1]: debug: truncate: preconnect - nbdkit: file[1]: debug: file: preconnect - nbdkit: file[1]: debug: newstyle negotiation: flags: global 0x3 - + echo 'Resizing down' - Resizing down - + truncate -s 512 truncate4.data - nbdkit: file[1]: debug: newstyle negotiation: client flags: 0x3 - nbdkit: file[1]: debug: newstyle negotiation: NBD_OPT_STRUCTURED_REPLY: client requested structured replies - -Here are still connecting to nbdkit from "connection A", long after -the sleep has finished and the truncate has been done. - -Instead of increasing the sleep and hoping for the best, I chose to -rewrite the test to use nbdsh. This allows us to control both -connections from a single process, making the test predicatable and -easier to understand. ---- - tests/test-truncate4.sh | 85 +++++++++++++++++++++++++---------------- - 1 file changed, 53 insertions(+), 32 deletions(-) - -diff --git a/tests/test-truncate4.sh b/tests/test-truncate4.sh -index e4be626b..36b2743c 100755 ---- a/tests/test-truncate4.sh -+++ b/tests/test-truncate4.sh -@@ -1,6 +1,6 @@ - #!/usr/bin/env bash - # nbdkit --# Copyright (C) 2019 Red Hat Inc. -+# Copyright (C) 2019-2020 Red Hat Inc. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are -@@ -31,55 +31,76 @@ - # SUCH DAMAGE. - - # Regression test when next_ops->get_size changes between connections. -+# - # For now, NBD does not support dynamic resize; but the file plugin - # reads size from the file system for each new connection, at which - # point the client remembers that size for the life of the connection. -+# - # We are testing that connection A can still see the tail of a file, - # even when connection B is opened while the file was temporarily --# shorter (if the actions of connection B affect the size visible --# through connection A, we didn't isolate per-connection state). -+# shorter. If the actions of connection B affect the size visible -+# through connection A, we didn't isolate per-connection state. - - source ./functions.sh - set -e - set -x - --requires qemu-io --version -+requires nbdsh --version - - sock=`mktemp -u` --files="truncate4.out truncate4.pid $sock truncate4.data" -+data=truncate4.data -+files="truncate4.pid $sock $data" - rm -f $files - cleanup_fn rm -f $files - --# Initial file contents: 1k of pattern 1 --truncate -s 1024 truncate4.data --qemu-io -c 'w -P 1 0 1024' -f raw truncate4.data -+# Create and truncate the file. -+: > $data - - # Run nbdkit with file plugin and truncate filter in front. - start_nbdkit -P truncate4.pid -U $sock \ - --filter=truncate \ -- file truncate4.data \ -+ file $data \ - round-up=1024 - --fail=0 --exec 4>&1 # Save original stdout --{ -- exec 5>&1 >&4 # Save connection A, set stdout back to original -- echo 'Reading from connection A, try 1' -- echo 'r -P 1 0 1024' >&5 -- sleep 1 -- echo 'Resizing down' -- truncate -s 512 truncate4.data -- echo 'Reading from connection B' -- echo 'r -P 1 0 512' | qemu-io -f raw nbd:unix:$sock >> truncate4.out -- echo 'Restoring size' -- truncate -s 1024 truncate4.data -- qemu-io -c 'w -P 2 0 1024' -f raw truncate4.data -- echo 'Reading from connection A, try 2' -- echo 'r -P 2 512 512' >&5 -- echo 'quit' >&5 --} | qemu-io -f raw nbd:unix:$sock >> truncate4.out || fail=1 --exec 4>&- -- --cat truncate4.out --grep 'Pattern verification failed' truncate4.out && fail=1 --exit $fail -+export data sock -+nbdsh -c ' -+import os -+ -+data = os.environ["data"] -+sock = os.environ["sock"] -+ -+def restore_file(): -+ # Original test data, 1024 bytes of "TEST" repeated. -+ with open (data, "w") as file: -+ file.write ("TEST"*256) -+ -+restore_file () -+ -+print ("Connection A.", flush=True) -+connA = nbd.NBD () -+connA.set_handle_name ("A") -+connA.connect_unix (sock) -+print ("Check the size.", flush=True) -+assert connA.get_size () == 1024 -+ -+print ("Truncate %s to 512 bytes." % data, flush=True) -+os.truncate (data, 512) -+ -+print ("Connection B.", flush=True) -+connB = nbd.NBD () -+connB.set_handle_name ("B") -+connB.connect_unix (sock) -+print ("Check the size.", flush=True) -+assert connB.get_size () == 1024 # because of the round-up parameter -+print ("Read data from connection B.", flush=True) -+buf = connB.pread (1024, 0) -+assert buf == b"TEST"*128 + b"\0"*512 -+ -+print ("Restore the file size and original data.", flush=True) -+restore_file () -+ -+print ("Read data from connection A.", flush=True) -+buf = connA.pread (1024, 0) -+assert 1024 == len (buf) -+assert buf == b"TEST"*256 -+' --- -2.25.0 - diff --git a/nbdkit.spec b/nbdkit.spec index 3d3a4cc..0c7864e 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,8 +37,8 @@ ExclusiveArch: x86_64 %global source_directory 1.20-stable Name: nbdkit -Version: 1.20.2 -Release: 2%{?dist} +Version: 1.20.3 +Release: 1%{?dist} Summary: NBD server License: BSD @@ -51,9 +51,6 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name Source2: libguestfs.keyring %endif -# Upstream patch to make tests/test-truncate4.sh more stable on s390x. -Patch1: 0001-tests-test-truncate4.sh-Rewrite-to-use-nbdsh.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -975,7 +972,10 @@ make %{?_smp_mflags} check || { %changelog -* Wed May 20 2020 Richard W.M. Jones - 1.21.4-2 +* Tue Jun 9 2020 Richard W.M. Jones - 1.20.3-1 +- New upstream version 1.20.3. + +* Wed May 20 2020 Richard W.M. Jones - 1.20.2-2 - Add upstream patch to make tests/test-truncate4.sh more stable on s390x. * Tue May 19 2020 Richard W.M. Jones - 1.20.2-1 diff --git a/sources b/sources index 2aad156..d1719bd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.20.2.tar.gz) = 4a03c6e8007d60a98feb829a228188d6a0712343c2131e815a5cc0bf1650dfbfa262d7dcba7ecb20163fee98d3dfd9d8384c8023f831b0b890d4bc267952ea59 -SHA512 (nbdkit-1.20.2.tar.gz.sig) = cd2f4bd14f17ce83e165285470e75ab475cf55abd51ac803b18df28c62b14347974c8da6485789458eac48e9e5ab587573dace95b01df1fef88439d4cce583fb +SHA512 (nbdkit-1.20.3.tar.gz) = 362e5ca9caccbf820ab55dfc80c49bf754ec6a02427198c75f76dfdd2198e3aaaf2b077b39deb22a15b3d1a6bb77647551c3a640dba503bdfe80b394da6aa5c0 +SHA512 (nbdkit-1.20.3.tar.gz.sig) = a2d9294f2ff647c7ae437e42594146902f38717cf9d6e654629521966c6b464829a7fb37b6e37f91db1320a8c926880f95f92edc8266b62733c6dbb5c4c6fa4e From 7d47bb2fb3ca7efc403db275af53afb350f4ff7e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 19 Jun 2020 16:17:27 +0100 Subject: [PATCH 22/25] New upstream version 1.20.4. (cherry picked from commit 7dc23d75fafd44763da28a908d374689ceb6cd13) --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 0c7864e..231be20 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.20-stable Name: nbdkit -Version: 1.20.3 +Version: 1.20.4 Release: 1%{?dist} Summary: NBD server @@ -972,6 +972,9 @@ make %{?_smp_mflags} check || { %changelog +* Fri Jun 19 2020 Richard W.M. Jones - 1.20.4-1 +- New upstream version 1.20.4. + * Tue Jun 9 2020 Richard W.M. Jones - 1.20.3-1 - New upstream version 1.20.3. diff --git a/sources b/sources index d1719bd..9ebe23c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.20.3.tar.gz) = 362e5ca9caccbf820ab55dfc80c49bf754ec6a02427198c75f76dfdd2198e3aaaf2b077b39deb22a15b3d1a6bb77647551c3a640dba503bdfe80b394da6aa5c0 -SHA512 (nbdkit-1.20.3.tar.gz.sig) = a2d9294f2ff647c7ae437e42594146902f38717cf9d6e654629521966c6b464829a7fb37b6e37f91db1320a8c926880f95f92edc8266b62733c6dbb5c4c6fa4e +SHA512 (nbdkit-1.20.4.tar.gz) = ff573c73dafc5c271cdb64f43c1139c71e9fd056a9555949b381ebeb3931e1c471c7b3d29409ffee1521ce186b6197fdca4735bf31b67fc58417e4948e5c80e0 +SHA512 (nbdkit-1.20.4.tar.gz.sig) = 269a0460895bf2f010df337d9fe10a8a174b5b10cdf7330d713c8466ee5e2abe86fdb8f2c4787b1774054851322987196825d83a112b855e884b9d56ca544b2a From 4df7a136a27cd2e6aa1a2de5f5723494967e2a2c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 Jul 2020 09:15:04 +0100 Subject: [PATCH 23/25] New upstream version 1.20.5. (cherry picked from commit cff35d9a8d5245d7d4581959c0d3bf1ed45a43e9) --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 231be20..1a0a72d 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.20-stable Name: nbdkit -Version: 1.20.4 +Version: 1.20.5 Release: 1%{?dist} Summary: NBD server @@ -972,6 +972,9 @@ make %{?_smp_mflags} check || { %changelog +* Mon Jul 13 2020 Richard W.M. Jones - 1.20.5-1 +- New upstream version 1.20.5. + * Fri Jun 19 2020 Richard W.M. Jones - 1.20.4-1 - New upstream version 1.20.4. diff --git a/sources b/sources index 9ebe23c..d47e065 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.20.4.tar.gz) = ff573c73dafc5c271cdb64f43c1139c71e9fd056a9555949b381ebeb3931e1c471c7b3d29409ffee1521ce186b6197fdca4735bf31b67fc58417e4948e5c80e0 -SHA512 (nbdkit-1.20.4.tar.gz.sig) = 269a0460895bf2f010df337d9fe10a8a174b5b10cdf7330d713c8466ee5e2abe86fdb8f2c4787b1774054851322987196825d83a112b855e884b9d56ca544b2a +SHA512 (nbdkit-1.20.5.tar.gz) = 5b343ffe1cc0f74460a01e69942a343abdcd842642f4105b234bc18938104d63ff17039ad4e5c34ef77d6e09ca7c4bae68c5897135f4980b4a5708f280bfeb04 +SHA512 (nbdkit-1.20.5.tar.gz.sig) = cd4985fe55181e6e294f4e11ec067d182e42e5fa206159bbc5fd06c2e91d75eabf1bc3411ee10159fe4e88002f069a080064b384b313aaa6de1ea371cdb290fc From 6c7ab8a52218c5b456cc200450cdde2e4ad19846 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 10 Aug 2020 17:48:33 +0100 Subject: [PATCH 24/25] New upstream version 1.20.6. (cherry picked from commit 2baf65dafde16e296e56ff6da1602933ec9905ce) --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 1a0a72d..972f1be 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.20-stable Name: nbdkit -Version: 1.20.5 +Version: 1.20.6 Release: 1%{?dist} Summary: NBD server @@ -972,6 +972,9 @@ make %{?_smp_mflags} check || { %changelog +* Mon Aug 10 2020 Richard W.M. Jones - 1.20.6-1 +- New upstream version 1.20.6. + * Mon Jul 13 2020 Richard W.M. Jones - 1.20.5-1 - New upstream version 1.20.5. diff --git a/sources b/sources index d47e065..ac976e5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.20.5.tar.gz) = 5b343ffe1cc0f74460a01e69942a343abdcd842642f4105b234bc18938104d63ff17039ad4e5c34ef77d6e09ca7c4bae68c5897135f4980b4a5708f280bfeb04 -SHA512 (nbdkit-1.20.5.tar.gz.sig) = cd4985fe55181e6e294f4e11ec067d182e42e5fa206159bbc5fd06c2e91d75eabf1bc3411ee10159fe4e88002f069a080064b384b313aaa6de1ea371cdb290fc +SHA512 (nbdkit-1.20.6.tar.gz) = 118ff134cc11e2af45234c8ef5bf5220e1bd57c1a1c4b58970d8555260111c54a9328529bd805b3f9a2be68cc0410a2fe33fe538716f41b2d82894b7cfc86c33 +SHA512 (nbdkit-1.20.6.tar.gz.sig) = dab3dcdcc72bb9db952f1cef03e02215fea4e851335421b5a9c555bdc31738ff17bdc60ba7549b7bbca1c021fde23c0952c7c02807f65fff05cc345686bfc3ea From 8495f81be1f04dae6b06c6dfa50cc12273144e8b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Sep 2020 21:21:55 +0100 Subject: [PATCH 25/25] New upstream version 1.20.7. (cherry picked from commit 366b1848332d87c271f8321afe2a9a9701ff189e) --- nbdkit.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index 972f1be..3410a3a 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -37,7 +37,7 @@ ExclusiveArch: x86_64 %global source_directory 1.20-stable Name: nbdkit -Version: 1.20.6 +Version: 1.20.7 Release: 1%{?dist} Summary: NBD server @@ -972,6 +972,9 @@ make %{?_smp_mflags} check || { %changelog +* Thu Sep 03 2020 Richard W.M. Jones - 1.20.7-1 +- New upstream version 1.20.7. + * Mon Aug 10 2020 Richard W.M. Jones - 1.20.6-1 - New upstream version 1.20.6. diff --git a/sources b/sources index ac976e5..95d32be 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.20.6.tar.gz) = 118ff134cc11e2af45234c8ef5bf5220e1bd57c1a1c4b58970d8555260111c54a9328529bd805b3f9a2be68cc0410a2fe33fe538716f41b2d82894b7cfc86c33 -SHA512 (nbdkit-1.20.6.tar.gz.sig) = dab3dcdcc72bb9db952f1cef03e02215fea4e851335421b5a9c555bdc31738ff17bdc60ba7549b7bbca1c021fde23c0952c7c02807f65fff05cc345686bfc3ea +SHA512 (nbdkit-1.20.7.tar.gz) = 0f6449a83fa6c8ec3fbf50376686e6189a61ee4066f1d819a6a0a9c6f99cfadee6689647e40152090689596edfe0bec4307c6260fda4477999957ce47c03f93c +SHA512 (nbdkit-1.20.7.tar.gz.sig) = c73234ea154a461eeca78addfe6c0655d7ff3115c57163b192d32eed4c25698075a3c375833a7700247715aef4a8d0fd78f464b08a482f8ddf293b880516b687