diff --git a/0001-tests-test-nozero.sh-Add-set-x.patch b/0001-tests-test-nozero.sh-Add-set-x.patch deleted file mode 100644 index 882e652..0000000 --- a/0001-tests-test-nozero.sh-Add-set-x.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5dc844e5b481b32915d38a9e5dd32bef3e698957 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 31 Jul 2020 08:51:37 +0100 -Subject: [PATCH 1/4] tests/test-nozero.sh: Add set -x. - -Used to track down a failure in this test which only happens in Koji. ---- - tests/test-nozero.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/test-nozero.sh b/tests/test-nozero.sh -index 444c1b70..9a815814 100755 ---- a/tests/test-nozero.sh -+++ b/tests/test-nozero.sh -@@ -32,6 +32,7 @@ - - source ./functions.sh - set -e -+set -x - - sock2=`mktemp -u` - sock3=`mktemp -u` --- -2.27.0 - diff --git a/0002-tests-test-nozero.sh-Create-test-file-as-single-exte.patch b/0002-tests-test-nozero.sh-Create-test-file-as-single-exte.patch deleted file mode 100644 index 66248c9..0000000 --- a/0002-tests-test-nozero.sh-Create-test-file-as-single-exte.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 89a36b1fab8302ddc370695d386a28a03a74eae7 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 1 Aug 2020 08:46:53 +0100 -Subject: [PATCH 2/4] tests/test-nozero.sh: Create test file as single extent, - add debugging. - -Previously the test file was created by repeatedly appending, ie: - -$ rm file; for f in {0..1023}; do printf '%1024s' . >> file; done ; stat -c "%b %B" file -3968 512 - -This seems to create files which have more than one extent. I have -changed it to the simpler form: - -$ rm file; for f in {0..1023}; do printf '%1024s' .; done > file; stat -c "%b %B" file -2048 512 - -Also this commit adds debugging. ---- - tests/test-nozero.sh | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/tests/test-nozero.sh b/tests/test-nozero.sh -index 9a815814..f1bb8a38 100755 ---- a/tests/test-nozero.sh -+++ b/tests/test-nozero.sh -@@ -71,13 +71,21 @@ cleanup () - } - cleanup_fn cleanup - --# Prep images, and check that zero with trim results in a sparse image. --for f in {0..1023}; do printf '%1024s' . >> nozero1.img; done -+# Prep images. -+for f in {0..1023}; do printf '%1024s' . ; done > nozero1.img - cp nozero1.img nozero2.img - cp nozero1.img nozero3.img - cp nozero1.img nozero4.img - cp nozero1.img nozero5.img - cp nozero1.img nozero6.img -+ -+# Debug number of blocks and block size in the images. -+for f in {1..6}; do -+ stat -c "%n: %b allocated blocks of size %B bytes, total size %s" \ -+ nozero$f.img -+done -+ -+# Check that zero with trim results in a sparse image. - requires nbdkit -U - --filter=log file logfile=nozero1.log nozero1.img \ - --run 'nbdsh -u "$uri" -c "h.zero (1024*1024, 0)"' - if test "$(stat -c %b nozero1.img)" = "$(stat -c %b nozero2.img)"; then --- -2.27.0 - diff --git a/0003-tests-Another-robustness-tweak-to-test-nozero.patch b/0003-tests-Another-robustness-tweak-to-test-nozero.patch deleted file mode 100644 index dda1dd4..0000000 --- a/0003-tests-Another-robustness-tweak-to-test-nozero.patch +++ /dev/null @@ -1,102 +0,0 @@ -From efb27061f0b4ed15b6dab595a8601bdf1926181e Mon Sep 17 00:00:00 2001 -From: Eric Blake -Date: Mon, 3 Aug 2020 16:44:15 -0500 -Subject: [PATCH 3/4] tests: Another robustness tweak to test-nozero - -Instead of looping to create the file, we can change our printf -argument to do it in one shot. Since we can't control when the -filesystem might overallocate, it's easier to just compare a file to -its former size, rather than to try to compare between two files that -might have started with different allocated sizes even though they -have the same content; this in turn is made easy with a bash array. -In a few places, try to run more of the test rather than giving up at -the first error. - -Signed-off-by: Eric Blake ---- - tests/test-nozero.sh | 29 +++++++++++++++-------------- - 1 file changed, 15 insertions(+), 14 deletions(-) - -diff --git a/tests/test-nozero.sh b/tests/test-nozero.sh -index f1bb8a38..9406e63c 100755 ---- a/tests/test-nozero.sh -+++ b/tests/test-nozero.sh -@@ -48,6 +48,7 @@ files="nozero1.img nozero1.log - nozero5a.pid nozero5b.pid - nozero6.img nozero6.log $sock6 nozero6.pid" - rm -f $files -+fail=0 - - # For easier debugging, dump the final log files before removing them - # on exit. -@@ -72,7 +73,8 @@ cleanup () - cleanup_fn cleanup - - # Prep images. --for f in {0..1023}; do printf '%1024s' . ; done > nozero1.img -+declare -a sizes -+printf %$((1024*1024))s . > nozero1.img - cp nozero1.img nozero2.img - cp nozero1.img nozero3.img - cp nozero1.img nozero4.img -@@ -83,12 +85,13 @@ cp nozero1.img nozero6.img - for f in {1..6}; do - stat -c "%n: %b allocated blocks of size %B bytes, total size %s" \ - nozero$f.img -+ sizes[$f]=$(stat -c %b nozero$f.img) - done - - # Check that zero with trim results in a sparse image. - requires nbdkit -U - --filter=log file logfile=nozero1.log nozero1.img \ - --run 'nbdsh -u "$uri" -c "h.zero (1024*1024, 0)"' --if test "$(stat -c %b nozero1.img)" = "$(stat -c %b nozero2.img)"; then -+if test "$(stat -c %b nozero1.img)" = "${sizes[1]}"; then - echo "$0: can't trim file by writing zeroes" - exit 77 - fi -@@ -129,17 +132,17 @@ nbdsh -u "nbd+unix://?socket=$sock6" -c 'h.zero (1024*1024, 0)' - grep 'connection=1 Zero' nozero1.log - if grep 'connection=1 Zero' nozero2.log; then - echo "filter should have prevented zero" -- exit 1 -+ fail=1 - fi - grep 'connection=1 Zero' nozero3.log - if grep 'connection=1 Zero' nozero4.log; then - echo "filter should have converted zero into write" -- exit 1 -+ fail=1 - fi - grep 'connection=1 Zero' nozero5b.log - if grep 'connection=1 Zero' nozero5a.log; then - echo "nbdkit should have converted zero into write before nbd plugin" -- exit 1 -+ fail=1 - fi - grep 'connection=1 Zero' nozero6.log - -@@ -150,14 +153,12 @@ cmp nozero3.img nozero4.img - cmp nozero4.img nozero5.img - cmp nozero5.img nozero6.img - --# Sanity check on sparseness; only image 1 should be sparse --if test "$(stat -c %b nozero1.img)" = "$(stat -c %b nozero2.img)"; then -- echo "nozero2.img was trimmed by mistake" -- exit 1 --fi --for i in 3 4 5 6; do -- if test "$(stat -c %b nozero2.img)" != "$(stat -c %b nozero$i.img)"; then -- echo "nozero$i.img was trimmed by mistake" -- exit 1 -+# Sanity check on sparseness: images 2-6 should not be sparse -+for i in {2..6}; do -+ if test "$(stat -c %b nozero$i.img)" != "${sizes[$i]}"; then -+ echo "nozero$i.img was trimmed by mistake" -+ fail=1 - fi - done -+ -+exit $fail --- -2.27.0 - diff --git a/0004-tests-Yet-another-test-nozero-tweak.patch b/0004-tests-Yet-another-test-nozero-tweak.patch deleted file mode 100644 index 157e86f..0000000 --- a/0004-tests-Yet-another-test-nozero-tweak.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 12a7de7810f8e81551e58b8717e0845e6e86445d Mon Sep 17 00:00:00 2001 -From: Eric Blake -Date: Mon, 3 Aug 2020 16:44:15 -0500 -Subject: [PATCH 4/4] tests: Yet another test-nozero tweak - -We discovered [1] that on xfs, even though the size of nozero2.img did -not change, the allocation increased when we wrote literal zeroes all -the way to end-of-file (that is, the filesystem presumed that we were -likely to write more data soon). Try a couple more tricks to help -this test pass on koji: double the file size to 2M but keep the -write-zero operation at 1M (so that we are no longer writing all the -way to EOF), and relax the comparison to use -lt rather than != -(although a growing file is odd, it is not fatal becuase we really -only care that the write zero did not become sparse). - -[1] https://www.redhat.com/archives/libguestfs/2020-August/msg00017.html - -Signed-off-by: Eric Blake ---- - tests/test-nozero.sh | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/tests/test-nozero.sh b/tests/test-nozero.sh -index 9406e63c..1d725bc8 100755 ---- a/tests/test-nozero.sh -+++ b/tests/test-nozero.sh -@@ -74,7 +74,7 @@ cleanup_fn cleanup - - # Prep images. - declare -a sizes --printf %$((1024*1024))s . > nozero1.img -+printf %$((2*1024*1024))s . > nozero1.img - cp nozero1.img nozero2.img - cp nozero1.img nozero3.img - cp nozero1.img nozero4.img -@@ -153,9 +153,10 @@ cmp nozero3.img nozero4.img - cmp nozero4.img nozero5.img - cmp nozero5.img nozero6.img - --# Sanity check on sparseness: images 2-6 should not be sparse -+# Sanity check on sparseness: images 2-6 should not be sparse (although the -+# filesystem may have reserved additional space due to our writes) - for i in {2..6}; do -- if test "$(stat -c %b nozero$i.img)" != "${sizes[$i]}"; then -+ if test "$(stat -c %b nozero$i.img)" -lt "${sizes[$i]}"; then - echo "nozero$i.img was trimmed by mistake" - fail=1 - fi --- -2.27.0 - diff --git a/nbdkit.spec b/nbdkit.spec index 9dd42f5..fdce6eb 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -44,8 +44,8 @@ ExclusiveArch: x86_64 %global source_directory 1.21-development Name: nbdkit -Version: 1.21.20 -Release: 6%{?dist} +Version: 1.21.21 +Release: 1%{?dist} Summary: NBD server License: BSD @@ -58,12 +58,6 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name Source2: libguestfs.keyring %endif -# Upstream patches to try to fix test failure. -Patch1: 0001-tests-test-nozero.sh-Add-set-x.patch -Patch2: 0002-tests-test-nozero.sh-Create-test-file-as-single-exte.patch -Patch3: 0003-tests-Another-robustness-tweak-to-test-nozero.patch -Patch4: 0004-tests-Yet-another-test-nozero-tweak.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -1074,6 +1068,10 @@ export LIBGUESTFS_TRACE=1 %changelog +* Tue Aug 4 2020 Richard W.M. Jones - 1.21.21-1 +- New upstream version 1.21.21. +- Remove patches, all upstream. + * Sat Aug 1 2020 Richard W.M. Jones - 1.21.20-6 - Add upstream patches to try to track down test failure in Koji. diff --git a/sources b/sources index 2dbf9f5..e4b4e8b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.21.20.tar.gz) = ce09dcdaf2017f044d2aabfd76c40896e94a1e5faddbc73d1ab4e8133bf279f5c1ef481bc9d6e8961bf4836fc6cb50c297b0f44d22fb474c19bf6cdfca42597f -SHA512 (nbdkit-1.21.20.tar.gz.sig) = 295ce3b95da660146cf4e254c14409f41d87f6ab25fe38c6c0e944f8d000256befb0bffaeee98d1731f589946644d005602ee7e6083f3d5b6a49393ef3358d4f +SHA512 (nbdkit-1.21.21.tar.gz) = 7ee32f2b2b7a75b442207a0d7564b6ff8c0d130766bee594dcb8ff7294e5752c5af1f6716aa967d1f43e6d93cd2038313172a8c304cd7ed216451a6e14e9b7ed +SHA512 (nbdkit-1.21.21.tar.gz.sig) = 7c3afa709cfcd4a2c52e0f71b09f6b6571c2d50c92ef548b56a01c29150a433dad17dd0af63f8a12466354ed51d8cadb81718bb8e4e40f20b158dbf0e6afad1b