diff --git a/0001-tests-Accommodate-qemu-img-4.1-output-change.patch b/0001-tests-Accommodate-qemu-img-4.1-output-change.patch deleted file mode 100644 index 7b02f79..0000000 --- a/0001-tests-Accommodate-qemu-img-4.1-output-change.patch +++ /dev/null @@ -1,146 +0,0 @@ -From 902f2203f0bc38de25dffd885ca837fe59e4a3fb Mon Sep 17 00:00:00 2001 -From: Eric Blake -Date: Tue, 30 Jul 2019 15:58:06 -0500 -Subject: [PATCH] tests: Accommodate qemu-img 4.1 output change - -Where qemu-img 4.0 used to say 'virtual size: 100M', the 4.1 release -now says 'virtual size: 100 MiB'. Similarly, '5.0G' turned into '5 -GiB'. But rather than worry about potential future changes to the -human-readable output, we can just use --output=json (at which point -we no longer even have to force qemu-img to the C locale, which we -were not even doing consistently). It might be slightly more robust -to find our specific information using jq, but for now a grep of the -output json is still reliable enough for our needs. - -If the '\b' is a problem on BSD, we could use '([, ]|$)' instead. Or -that's where jq would make it easier to parse off a given number -without worrying about what comes after the number. - -Signed-off-by: Eric Blake ---- - tests/test-ip.sh | 10 ++++++---- - tests/test-nbd-tls-psk.sh | 6 +++--- - tests/test-nbd-tls.sh | 6 +++--- - tests/test-tls-psk.sh | 7 +++---- - tests/test-tls.sh | 7 +++---- - tests/test-truncate3.sh | 4 ++-- - 6 files changed, 20 insertions(+), 20 deletions(-) - -diff --git a/tests/test-ip.sh b/tests/test-ip.sh -index 636d3d3..a0f1862 100755 ---- a/tests/test-ip.sh -+++ b/tests/test-ip.sh -@@ -57,15 +57,17 @@ kill -s 0 $pid - # Check we can connect over the IPv4 loopback interface. - ipv4_lo="$(ip -o -4 addr show scope host)" - if test -n "$ipv4_lo"; then -- qemu-img info --image-opts "file.driver=nbd,file.host=127.0.0.1,file.port=$port" > ipv4.out -+ qemu-img info --output=json \ -+ --image-opts "file.driver=nbd,file.host=127.0.0.1,file.port=$port" > ipv4.out - cat ipv4.out -- grep -sq "^virtual size: 100M" ipv4.out -+ grep -sq '"virtual-size": *104857600\b' ipv4.out - fi - - # Check we can connect over the IPv6 loopback interface. - ipv6_lo="$(ip -o -6 addr show scope host)" - if test -n "$ipv6_lo"; then -- qemu-img info --image-opts "file.driver=nbd,file.host=::1,file.port=$port" > ipv6.out -+ qemu-img info --output=json \ -+ --image-opts "file.driver=nbd,file.host=::1,file.port=$port" > ipv6.out - cat ipv6.out -- grep -sq "^virtual size: 100M" ipv6.out -+ grep -sq '"virtual-size": *104857600\b' ipv6.out - fi -diff --git a/tests/test-nbd-tls-psk.sh b/tests/test-nbd-tls-psk.sh -index d0bbc46..82822d1 100755 ---- a/tests/test-nbd-tls-psk.sh -+++ b/tests/test-nbd-tls-psk.sh -@@ -73,9 +73,9 @@ LIBNBD_DEBUG=1 start_nbdkit -P "$pid2" -U "$sock2" --tls=off \ - nbd tls=require tls-psk=keys.psk tls-username=qemu socket="$sock1" - - # Run unencrypted client --LANG=C qemu-img info -f raw "nbd+unix:///?socket=$sock2" > nbd-tls-psk.out -+qemu-img info --output=json -f raw "nbd+unix:///?socket=$sock2" > nbd-tls-psk.out - - cat nbd-tls-psk.out - --grep -sq "^file format: raw" nbd-tls-psk.out --grep -sq "^virtual size: 100M" nbd-tls-psk.out -+grep -sq '"format": *"raw"' nbd-tls-psk.out -+grep -sq '"virtual-size": *104857600\b' nbd-tls-psk.out -diff --git a/tests/test-nbd-tls.sh b/tests/test-nbd-tls.sh -index af824d2..c4f4fac 100755 ---- a/tests/test-nbd-tls.sh -+++ b/tests/test-nbd-tls.sh -@@ -74,9 +74,9 @@ LIBNBD_DEBUG=1 start_nbdkit -P "$pid2" -U "$sock2" --tls=off \ - nbd tls=require tls-certificates="$pkidir" socket="$sock1" - - # Run unencrypted client --LANG=C qemu-img info -f raw "nbd+unix:///?socket=$sock2" > nbd-tls.out -+qemu-img info --output=json -f raw "nbd+unix:///?socket=$sock2" > nbd-tls.out - - cat nbd-tls.out - --grep -sq "^file format: raw" nbd-tls.out --grep -sq "^virtual size: 100M" nbd-tls.out -+grep -sq '"format": *"raw"' nbd-tls.out -+grep -sq '"virtual-size": *104857600\b' nbd-tls.out -diff --git a/tests/test-tls-psk.sh b/tests/test-tls-psk.sh -index 393f589..a4ecb60 100755 ---- a/tests/test-tls-psk.sh -+++ b/tests/test-tls-psk.sh -@@ -72,12 +72,11 @@ start_nbdkit -P tls-psk.pid -p $port -n \ - --tls=require --tls-psk=keys.psk example1 - - # Run qemu-img against the server. --LANG=C \ --qemu-img info \ -+qemu-img info --output=json \ - --object "tls-creds-psk,id=tls0,endpoint=client,dir=$PWD" \ - --image-opts "file.driver=nbd,file.host=localhost,file.port=$port,file.tls-creds=tls0" > tls-psk.out - - cat tls-psk.out - --grep -sq "^file format: raw" tls-psk.out --grep -sq "^virtual size: 100M" tls-psk.out -+grep -sq '"format": *"raw"' tls-psk.out -+grep -sq '"virtual-size": *104857600\b' tls-psk.out -diff --git a/tests/test-tls.sh b/tests/test-tls.sh -index 70d40ae..2718e55 100755 ---- a/tests/test-tls.sh -+++ b/tests/test-tls.sh -@@ -65,12 +65,11 @@ start_nbdkit -P tls.pid -p $port -n --tls=require \ - --tls-certificates="$pkidir" example1 - - # Run qemu-img against the server. --LANG=C \ --qemu-img info \ -+qemu-img info --output=json \ - --object "tls-creds-x509,id=tls0,endpoint=client,dir=$pkidir" \ - --image-opts "file.driver=nbd,file.host=localhost,file.port=$port,file.tls-creds=tls0" > tls.out - - cat tls.out - --grep -sq "^file format: raw" tls.out --grep -sq "^virtual size: 100M" tls.out -+grep -sq '"format": *"raw"' tls.out -+grep -sq '"virtual-size": *104857600\b' tls.out -diff --git a/tests/test-truncate3.sh b/tests/test-truncate3.sh -index 0a7fba8..885d58f 100755 ---- a/tests/test-truncate3.sh -+++ b/tests/test-truncate3.sh -@@ -50,8 +50,8 @@ start_nbdkit -P truncate3.pid -U $sock \ - pattern 5G \ - round-up=512 - --LANG=C qemu-img info nbd:unix:$sock > truncate3.out --if ! grep "virtual size: 5.0G" truncate3.out; then -+qemu-img info --output=json nbd:unix:$sock > truncate3.out -+if ! grep '"virtual-size": *5368709120' truncate3.out; then - echo "$0: unexpected output from truncate3 regression test:" - cat truncate3.out - exit 1 --- -2.22.0 - diff --git a/nbdkit.spec b/nbdkit.spec index 407f46a..2ea0fcf 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -27,8 +27,8 @@ %global source_directory 1.13-development Name: nbdkit -Version: 1.13.7 -Release: 2%{?dist} +Version: 1.13.8 +Release: 1%{?dist} Summary: NBD server License: BSD @@ -41,9 +41,6 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name Source2: libguestfs.keyring %endif -# Upstream patch to deal with qemu-img 4.1 output change. -Patch1: 0001-tests-Accommodate-qemu-img-4.1-output-change.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -842,6 +839,9 @@ make %{?_smp_mflags} check || { %changelog +* Fri Aug 2 2019 Richard W.M. Jones - 1.13.8-1 +- New upstream version 1.13.8. + * Wed Jul 31 2019 Richard W.M. Jones - 1.13.7-2 - Add upstream patch to deal with qemu-img 4.1 output change. diff --git a/sources b/sources index ab42c4d..8eb9ba9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.13.7.tar.gz) = f750617cbc016d6cc4adc52e6f2fbf1ce48fa669cf08fe9cc96bf171111907ba2af57deaf9d1edf6e62882e7d8812a1d1595290fda07401221978b445e72966d -SHA512 (nbdkit-1.13.7.tar.gz.sig) = f199cc75d67f850222205a3aa57e601d68c58065e7445ff7427e594a8c7bf2f5544827f0627a4c7b39ac9c1952863af6f2dcec7d97563586d856920652cf8d2d +SHA512 (nbdkit-1.13.8.tar.gz) = 51dbe6852f7539a2e07a1435499272a4a3e68163e3e9c90cc460e3d18b9aab26bbd37c6f15c780908d3335b414386aff69943d759a4a2ce3fc09024b7aa8438e +SHA512 (nbdkit-1.13.8.tar.gz.sig) = 34ff83f6bf345fa03081b985abbbf2a93bef6583cd7a67126d9b11c03bab226573a414e69624fb2bde1ca0654a5614d3915a81898d66ebbc05480116f12a3e8c