From b5f8430a271f3849060819d19902f446d9d05c30 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Dec 2021 10:49:24 +0000 Subject: [PATCH] Rebase to new stable branch version 1.28.3 resolves: rhbz#2011709 Includes these important commits: plugins/python: Fix extents() count format string tests: Add configure --disable-libguestfs-tests flag tests: Use mke2fs -d to create ext4 test image Use new --disable-libguestfs-tests on non-guestfs arches. --- ...placement-pread-and-pwrite-functions.patch | 41 +++ ...gins-filters-that-use-utils-pread-pw.patch | 236 ++++++++++++++++++ ...e-mke2fs-d-to-create-ext4-test-image.patch | 80 ++++++ ...thon-Fix-extents-count-format-string.patch | 35 +++ ...ctor-how-D-vddk.stats-1-is-collected.patch | 2 +- ...dk.stats-1-to-show-number-of-calls-a.patch | 2 +- ...d-consolidate-VDDK_CALL_START-END-ma.patch | 2 +- ...troubleshooting-performance-problems.patch | 2 +- ...K-major-library-version-in-dump-plug.patch | 2 +- ...-and-physical-sector-size-to-D-vddk..patch | 2 +- ... 0011-vddk-Fix-typo-in-debug-message.patch | 2 +- ...vddk_library_version-when-we-managed.patch | 2 +- ...ine-in-dump-plugin-output-for-each-V.patch | 2 +- ...ddk-Move-minimum-version-to-VDDK-6.5.patch | 2 +- ...rite-and-wait-asynchronous-functions.patch | 2 +- ...art-to-split-VDDK-over-several-files.patch | 2 +- ...actor-D-vddk.stats-1-into-a-new-file.patch | 2 +- ...vddk-Implement-parallel-thread-model.patch | 2 +- ...e-that-VixDiskLib_Flush-is-available.patch | 2 +- ...tection-of-VDDK-symbols-and-baseline.patch | 2 +- ...-whitespace-from-a-couple-of-functio.patch | 2 +- ...-debug-error-and-utility-functions-a.patch | 2 +- ...-test-vector.c-Add-vector-benchmarks.patch | 6 +- ...rils-vector.c-Optimize-vector-append.patch | 2 +- ...mon-utils-vector-Rename-alloc-to-cap.patch | 2 +- ...mmon-utils-vector-Rename-size-to-len.patch | 2 +- ...dwrapper.pl.in-Use-short-commit-date.patch | 2 +- ...lace-noalloc-with-noalloc-annotation.patch | 2 +- ...te-documentation-related-to-thread-m.patch | 2 +- ...dwrapper.pl.in-Use-short-commit-date.patch | 2 +- ...dwrapper.pl.in-Use-short-commit-date.patch | 2 +- ...le-script-for-automating-VDDK-disk-c.patch | 6 +- ...lementation-of-cache-none-for-writes.patch | 2 +- ...figure-disable-libguestfs-tests-flag.patch | 95 +++++++ nbdkit.spec | 85 +++---- 35 files changed, 563 insertions(+), 75 deletions(-) create mode 100644 0001-windows-Use-replacement-pread-and-pwrite-functions.patch create mode 100644 0002-windows-Link-plugins-filters-that-use-utils-pread-pw.patch create mode 100644 0003-tests-Use-mke2fs-d-to-create-ext4-test-image.patch create mode 100644 0004-plugins-python-Fix-extents-count-format-string.patch rename 0001-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch => 0005-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch (98%) rename 0002-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch => 0006-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch (98%) rename 0003-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch => 0007-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch (99%) rename 0004-vddk-Document-troubleshooting-performance-problems.patch => 0008-vddk-Document-troubleshooting-performance-problems.patch (97%) rename 0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch => 0009-vddk-Include-VDDK-major-library-version-in-dump-plug.patch (98%) rename 0006-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch => 0010-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch (96%) rename 0007-vddk-Fix-typo-in-debug-message.patch => 0011-vddk-Fix-typo-in-debug-message.patch (93%) rename 0008-vddk-Only-print-vddk_library_version-when-we-managed.patch => 0012-vddk-Only-print-vddk_library_version-when-we-managed.patch (96%) rename 0009-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch => 0013-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch (97%) rename 0010-vddk-Move-minimum-version-to-VDDK-6.5.patch => 0014-vddk-Move-minimum-version-to-VDDK-6.5.patch (98%) rename 0011-vddk-Add-read-write-and-wait-asynchronous-functions.patch => 0015-vddk-Add-read-write-and-wait-asynchronous-functions.patch (97%) rename 0012-vddk-Start-to-split-VDDK-over-several-files.patch => 0016-vddk-Start-to-split-VDDK-over-several-files.patch (99%) rename 0013-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch => 0017-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch (99%) rename 0014-vddk-Implement-parallel-thread-model.patch => 0018-vddk-Implement-parallel-thread-model.patch (99%) rename 0015-vddk-Assume-that-VixDiskLib_Flush-is-available.patch => 0019-vddk-Assume-that-VixDiskLib_Flush-is-available.patch (96%) rename 0016-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch => 0020-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch (99%) rename 0017-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch => 0021-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch (94%) rename 0018-vddk-Move-config-debug-error-and-utility-functions-a.patch => 0022-vddk-Move-config-debug-error-and-utility-functions-a.patch (99%) rename 0019-common-utils-test-vector.c-Add-vector-benchmarks.patch => 0023-common-utils-test-vector.c-Add-vector-benchmarks.patch (97%) rename 0020-common-urils-vector.c-Optimize-vector-append.patch => 0024-common-urils-vector.c-Optimize-vector-append.patch (95%) rename 0021-common-utils-vector-Rename-alloc-to-cap.patch => 0025-common-utils-vector-Rename-alloc-to-cap.patch (99%) rename 0022-common-utils-vector-Rename-size-to-len.patch => 0026-common-utils-vector-Rename-size-to-len.patch (99%) rename 0023-podwrapper.pl.in-Use-short-commit-date.patch => 0027-podwrapper.pl.in-Use-short-commit-date.patch (94%) rename 0024-ocaml-Replace-noalloc-with-noalloc-annotation.patch => 0028-ocaml-Replace-noalloc-with-noalloc-annotation.patch (98%) rename 0025-vddk-Drop-obsolete-documentation-related-to-thread-m.patch => 0029-vddk-Drop-obsolete-documentation-related-to-thread-m.patch (95%) rename 0026-Revert-podwrapper.pl.in-Use-short-commit-date.patch => 0030-Revert-podwrapper.pl.in-Use-short-commit-date.patch (94%) rename 0027-Fix-podwrapper.pl.in-Use-short-commit-date.patch => 0031-Fix-podwrapper.pl.in-Use-short-commit-date.patch (94%) rename 0028-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch => 0032-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch (97%) rename 0029-file-Fix-implementation-of-cache-none-for-writes.patch => 0033-file-Fix-implementation-of-cache-none-for-writes.patch (98%) create mode 100644 0034-tests-Add-configure-disable-libguestfs-tests-flag.patch diff --git a/0001-windows-Use-replacement-pread-and-pwrite-functions.patch b/0001-windows-Use-replacement-pread-and-pwrite-functions.patch new file mode 100644 index 0000000..93ac36b --- /dev/null +++ b/0001-windows-Use-replacement-pread-and-pwrite-functions.patch @@ -0,0 +1,41 @@ +From 340bab208735d6c725045f043fcd1757d15dd6cc Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 9 Dec 2021 18:09:59 +0000 +Subject: [PATCH] windows: Use replacement pread and pwrite functions + +Fixes: commit ce0db9d7736dd28dd0f10951ce65853e50b35e41 +(cherry picked from commit aaca7cfaede90c681265f8a413e250accbf1d5f6) +--- + common/utils/Makefile.am | 1 + + common/utils/full-rw.c | 3 +++ + 2 files changed, 4 insertions(+) + +diff --git a/common/utils/Makefile.am b/common/utils/Makefile.am +index 14e9dfc4..c33811fc 100644 +--- a/common/utils/Makefile.am ++++ b/common/utils/Makefile.am +@@ -52,6 +52,7 @@ libutils_la_SOURCES = \ + $(NULL) + libutils_la_CPPFLAGS = \ + -I$(top_srcdir)/include \ ++ -I$(top_srcdir)/common/replacements \ + $(NULL) + libutils_la_CFLAGS = \ + $(WARNINGS_CFLAGS) \ +diff --git a/common/utils/full-rw.c b/common/utils/full-rw.c +index 55b32cdd..4b4d1b1a 100644 +--- a/common/utils/full-rw.c ++++ b/common/utils/full-rw.c +@@ -41,6 +41,9 @@ + #include + #include + ++#include "pread.h" ++#include "pwrite.h" ++ + ssize_t + full_pread (int fd, void *buf, size_t count, off_t offset) + { +-- +2.31.1 + diff --git a/0002-windows-Link-plugins-filters-that-use-utils-pread-pw.patch b/0002-windows-Link-plugins-filters-that-use-utils-pread-pw.patch new file mode 100644 index 0000000..18d58bc --- /dev/null +++ b/0002-windows-Link-plugins-filters-that-use-utils-pread-pw.patch @@ -0,0 +1,236 @@ +From f768c949fdd01722ba79da7a1b2c55de75ef450a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 9 Dec 2021 18:23:32 +0000 +Subject: [PATCH] windows: Link plugins/filters that use utils + pread/pwrite + with libcompat + +Fixes: commit ce0db9d7736dd28dd0f10951ce65853e50b35e41 +Fixes: commit aaca7cfaede90c681265f8a413e250accbf1d5f6 +(cherry picked from commit dd9ba851c18527f70036317c71672161517577ec) +--- + filters/blocksize/Makefile.am | 1 + + filters/cacheextents/Makefile.am | 1 + + filters/checkwrite/Makefile.am | 1 + + filters/error/Makefile.am | 1 + + filters/ip/Makefile.am | 1 + + filters/limit/Makefile.am | 1 + + filters/multi-conn/Makefile.am | 1 + + filters/offset/Makefile.am | 1 + + filters/partition/Makefile.am | 1 + + filters/readahead/Makefile.am | 1 + + filters/retry/Makefile.am | 1 + + filters/stats/Makefile.am | 1 + + filters/swab/Makefile.am | 1 + + filters/truncate/Makefile.am | 1 + + filters/xz/Makefile.am | 1 + + plugins/random/Makefile.am | 1 + + plugins/sparse-random/Makefile.am | 1 + + 17 files changed, 17 insertions(+) + +diff --git a/filters/blocksize/Makefile.am b/filters/blocksize/Makefile.am +index 5cda19bd..d09e595b 100644 +--- a/filters/blocksize/Makefile.am ++++ b/filters/blocksize/Makefile.am +@@ -52,6 +52,7 @@ nbdkit_blocksize_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_blocksize_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/cacheextents/Makefile.am b/filters/cacheextents/Makefile.am +index 5ddffe98..40498416 100644 +--- a/filters/cacheextents/Makefile.am ++++ b/filters/cacheextents/Makefile.am +@@ -52,6 +52,7 @@ nbdkit_cacheextents_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_cacheextents_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/checkwrite/Makefile.am b/filters/checkwrite/Makefile.am +index 2171b989..b53a5c0a 100644 +--- a/filters/checkwrite/Makefile.am ++++ b/filters/checkwrite/Makefile.am +@@ -52,6 +52,7 @@ nbdkit_checkwrite_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_checkwrite_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/error/Makefile.am b/filters/error/Makefile.am +index 8ce8dc32..3174c3f9 100644 +--- a/filters/error/Makefile.am ++++ b/filters/error/Makefile.am +@@ -52,6 +52,7 @@ nbdkit_error_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_error_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/ip/Makefile.am b/filters/ip/Makefile.am +index d09cd1e0..42fa6407 100644 +--- a/filters/ip/Makefile.am ++++ b/filters/ip/Makefile.am +@@ -52,6 +52,7 @@ nbdkit_ip_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_ip_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/limit/Makefile.am b/filters/limit/Makefile.am +index b4951ace..364965ff 100644 +--- a/filters/limit/Makefile.am ++++ b/filters/limit/Makefile.am +@@ -51,6 +51,7 @@ nbdkit_limit_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_limit_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/multi-conn/Makefile.am b/filters/multi-conn/Makefile.am +index 778b8947..2289e24e 100644 +--- a/filters/multi-conn/Makefile.am ++++ b/filters/multi-conn/Makefile.am +@@ -48,6 +48,7 @@ nbdkit_multi_conn_filter_la_CPPFLAGS = \ + nbdkit_multi_conn_filter_la_CFLAGS = $(WARNINGS_CFLAGS) + nbdkit_multi_conn_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + nbdkit_multi_conn_filter_la_LDFLAGS = \ +diff --git a/filters/offset/Makefile.am b/filters/offset/Makefile.am +index 5437e700..68986e37 100644 +--- a/filters/offset/Makefile.am ++++ b/filters/offset/Makefile.am +@@ -51,6 +51,7 @@ nbdkit_offset_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_offset_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/partition/Makefile.am b/filters/partition/Makefile.am +index e8a20c68..d9500794 100644 +--- a/filters/partition/Makefile.am ++++ b/filters/partition/Makefile.am +@@ -56,6 +56,7 @@ nbdkit_partition_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_partition_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/readahead/Makefile.am b/filters/readahead/Makefile.am +index 3d2c507d..65ad03b5 100644 +--- a/filters/readahead/Makefile.am ++++ b/filters/readahead/Makefile.am +@@ -52,6 +52,7 @@ nbdkit_readahead_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_readahead_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/retry/Makefile.am b/filters/retry/Makefile.am +index 14d83cf1..522c0816 100644 +--- a/filters/retry/Makefile.am ++++ b/filters/retry/Makefile.am +@@ -52,6 +52,7 @@ nbdkit_retry_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_retry_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/stats/Makefile.am b/filters/stats/Makefile.am +index ccfeb3e7..e81aa973 100644 +--- a/filters/stats/Makefile.am ++++ b/filters/stats/Makefile.am +@@ -52,6 +52,7 @@ nbdkit_stats_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_stats_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/swab/Makefile.am b/filters/swab/Makefile.am +index 07aefe88..3388b7da 100644 +--- a/filters/swab/Makefile.am ++++ b/filters/swab/Makefile.am +@@ -57,6 +57,7 @@ nbdkit_swab_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_swab_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(GNUTLS_LIBS) \ + $(NULL) +diff --git a/filters/truncate/Makefile.am b/filters/truncate/Makefile.am +index 3240e46d..0940b96f 100644 +--- a/filters/truncate/Makefile.am ++++ b/filters/truncate/Makefile.am +@@ -52,6 +52,7 @@ nbdkit_truncate_filter_la_LDFLAGS = \ + $(NULL) + nbdkit_truncate_filter_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + +diff --git a/filters/xz/Makefile.am b/filters/xz/Makefile.am +index ce6bc342..393ff142 100644 +--- a/filters/xz/Makefile.am ++++ b/filters/xz/Makefile.am +@@ -57,6 +57,7 @@ nbdkit_xz_filter_la_CFLAGS = \ + nbdkit_xz_filter_la_LIBADD = \ + $(LIBLZMA_LIBS) \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + nbdkit_xz_filter_la_LDFLAGS = \ +diff --git a/plugins/random/Makefile.am b/plugins/random/Makefile.am +index b29e06ad..4ad854f9 100644 +--- a/plugins/random/Makefile.am ++++ b/plugins/random/Makefile.am +@@ -48,6 +48,7 @@ nbdkit_random_plugin_la_CPPFLAGS = \ + nbdkit_random_plugin_la_CFLAGS = $(WARNINGS_CFLAGS) + nbdkit_random_plugin_la_LIBADD = \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + nbdkit_random_plugin_la_LDFLAGS = \ +diff --git a/plugins/sparse-random/Makefile.am b/plugins/sparse-random/Makefile.am +index d9d24fbe..b3ff0b86 100644 +--- a/plugins/sparse-random/Makefile.am ++++ b/plugins/sparse-random/Makefile.am +@@ -50,6 +50,7 @@ nbdkit_sparse_random_plugin_la_CFLAGS = $(WARNINGS_CFLAGS) + nbdkit_sparse_random_plugin_la_LIBADD = \ + $(top_builddir)/common/bitmap/libbitmap.la \ + $(top_builddir)/common/utils/libutils.la \ ++ $(top_builddir)/common/replacements/libcompat.la \ + $(IMPORT_LIBRARY_ON_WINDOWS) \ + $(NULL) + nbdkit_sparse_random_plugin_la_LDFLAGS = \ +-- +2.31.1 + diff --git a/0003-tests-Use-mke2fs-d-to-create-ext4-test-image.patch b/0003-tests-Use-mke2fs-d-to-create-ext4-test-image.patch new file mode 100644 index 0000000..50c0e35 --- /dev/null +++ b/0003-tests-Use-mke2fs-d-to-create-ext4-test-image.patch @@ -0,0 +1,80 @@ +From 771a8c9386893f3c908dae5a551121db02b1f96c Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 18 Dec 2021 20:21:26 +0000 +Subject: [PATCH] tests: Use mke2fs -d to create ext4 test image + +We used guestfish for this, but that was very slow (albeit working) on +armv7. Since this is a plain ext4 filesystem without wrapper, we can +use mke2fs -d. That was already a dependency so this doesn't change +anything. + +After this change, configure tests for GUESTFISH and HAVE_GUESTFISH +are no longer used so we can remove them. + +(cherry picked from commit 9b1476895a060c562e67b59a3d1aee16efafaff9) +--- + configure.ac | 4 ---- + tests/Makefile.am | 22 +++++++++------------- + 2 files changed, 9 insertions(+), 17 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 19514ef6..b194da61 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1173,10 +1173,6 @@ AS_IF([test "$with_libguestfs" != "no"],[ + ]) + AM_CONDITIONAL([HAVE_LIBGUESTFS],[test "x$LIBGUESTFS_LIBS" != "x"]) + +-dnl Check for guestfish (only needed for some of the tests). +-AC_CHECK_PROG([GUESTFISH], [guestfish], [guestfish], [no]) +-AM_CONDITIONAL([HAVE_GUESTFISH], [test "x$GUESTFISH" != "xno"]) +- + dnl Check for ext2fs and com_err, for the ext2 filter. + AC_ARG_WITH([ext2], + [AS_HELP_STRING([--without-ext2], +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 5ef90b6f..2b7ae9f3 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -1506,7 +1506,6 @@ EXTRA_DIST += test-exportname.sh + # ext2 filter test. + if HAVE_MKE2FS_WITH_D + if HAVE_EXT2 +-if HAVE_GUESTFISH + + LIBGUESTFS_TESTS += test-ext2 + +@@ -1520,21 +1519,18 @@ EXTRA_DIST += test-ext2-exportname.sh + check_DATA += ext2.img + CLEANFILES += ext2.img + ++# NB: truncate + explicit size is required because of a bug in mke2fs: ++# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1813759.html + ext2.img: disk test-ext2-exportname.sh +- rm -f $@ $@-t +- echo /disks/disk.img > manifest +- guestfish \ +- sparse $@-t 2G : \ +- run : \ +- mkfs ext4 /dev/sda : \ +- mount /dev/sda / : \ +- mkdir /disks : \ +- upload $< /disks/disk.img : \ +- upload manifest /manifest +- rm manifest ++ rm -rf $@ $@-t ext2.img.d ++ mkdir -p ext2.img.d/disks ++ cp $< ext2.img.d/disks/disk.img ++ echo /disks/disk.img > ext2.img.d/manifest ++ truncate -s 2147483648 $@-t ++ mke2fs -q -F -t ext4 -d ext2.img.d $@-t 2147483648 ++ rm -r ext2.img.d + mv $@-t $@ + +-endif HAVE_GUESTFISH + endif HAVE_EXT2 + endif HAVE_MKE2FS_WITH_D + +-- +2.31.1 + diff --git a/0004-plugins-python-Fix-extents-count-format-string.patch b/0004-plugins-python-Fix-extents-count-format-string.patch new file mode 100644 index 0000000..4f0d6d8 --- /dev/null +++ b/0004-plugins-python-Fix-extents-count-format-string.patch @@ -0,0 +1,35 @@ +From 79a8b12a1fea3803e09c0d6fc587a09f03023ac8 Mon Sep 17 00:00:00 2001 +From: Nir Soffer +Date: Sun, 19 Dec 2021 09:09:39 +0200 +Subject: [PATCH] plugins/python: Fix extents() count format string + +The plugin used "i" (int32) instead of "I" (uint32) for the count, so +when the client asks for 4294966784 bytes, the python plugin got -512. + + nbdkit: python.0: debug: python: extents count=4294966784 offset=0 req_one=0 + ... + nbdkit: python.0: debug: extents: count=-512 offset=0 flags=0 + +With this fix I can get extents from rhv-upload-plugin using nbdinfo. + +(cherry picked from commit 715e9c238650e5f60b50a7c87c76037c0a4d4bfe) +--- + plugins/python/plugin.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/python/plugin.c b/plugins/python/plugin.c +index f85512b4..366619f9 100644 +--- a/plugins/python/plugin.c ++++ b/plugins/python/plugin.c +@@ -964,7 +964,7 @@ py_extents (void *handle, uint32_t count, uint64_t offset, + if (callback_defined ("extents", &fn)) { + PyErr_Clear (); + +- r = PyObject_CallFunction (fn, "OiLI", h->py_h, count, offset, flags); ++ r = PyObject_CallFunction (fn, "OILI", h->py_h, count, offset, flags); + Py_DECREF (fn); + if (check_python_failure ("extents") == -1) + return -1; +-- +2.31.1 + diff --git a/0001-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch b/0005-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch similarity index 98% rename from 0001-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch rename to 0005-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch index 75f6622..33c640c 100644 --- a/0001-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch +++ b/0005-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch @@ -1,4 +1,4 @@ -From 40016b4cf27cd68c55fc505e97b658b4fc3643c9 Mon Sep 17 00:00:00 2001 +From 140943f47363e16373364864ab7cbff95cd5397e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 21 Oct 2021 14:49:52 +0100 Subject: [PATCH] vddk: Refactor how -D vddk.stats=1 is collected diff --git a/0002-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch b/0006-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch similarity index 98% rename from 0002-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch rename to 0006-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch index c1abb4e..74ef312 100644 --- a/0002-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch +++ b/0006-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch @@ -1,4 +1,4 @@ -From 262f7fcd22dd57ae30739703c94bc56f32a8ceec Mon Sep 17 00:00:00 2001 +From f90ad1745e44ef8ecc6b5ae87d1a3811697492e3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 21 Oct 2021 15:10:00 +0100 Subject: [PATCH] vddk: Extend -D vddk.stats=1 to show number of calls and diff --git a/0003-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch b/0007-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch similarity index 99% rename from 0003-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch rename to 0007-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch index fc35b4c..71c6672 100644 --- a/0003-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch +++ b/0007-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch @@ -1,4 +1,4 @@ -From ea29f00332300e5a5808931ae48920c715c59182 Mon Sep 17 00:00:00 2001 +From 06accfab1f9dde2f30e8fa5edce11f77b78e5d12 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 21 Oct 2021 22:55:17 +0100 Subject: [PATCH] vddk: Simplify and consolidate VDDK_CALL_START/END macros diff --git a/0004-vddk-Document-troubleshooting-performance-problems.patch b/0008-vddk-Document-troubleshooting-performance-problems.patch similarity index 97% rename from 0004-vddk-Document-troubleshooting-performance-problems.patch rename to 0008-vddk-Document-troubleshooting-performance-problems.patch index 0dfca05..d51723b 100644 --- a/0004-vddk-Document-troubleshooting-performance-problems.patch +++ b/0008-vddk-Document-troubleshooting-performance-problems.patch @@ -1,4 +1,4 @@ -From 7433c58a81d156fe078a8d5d39d75c8cfde458de Mon Sep 17 00:00:00 2001 +From a6f17fd4c7850384e523ead0b6754dc494533505 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 22 Oct 2021 18:00:27 +0100 Subject: [PATCH] vddk: Document troubleshooting performance problems diff --git a/0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch b/0009-vddk-Include-VDDK-major-library-version-in-dump-plug.patch similarity index 98% rename from 0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch rename to 0009-vddk-Include-VDDK-major-library-version-in-dump-plug.patch index 0e68cf3..95090a0 100644 --- a/0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch +++ b/0009-vddk-Include-VDDK-major-library-version-in-dump-plug.patch @@ -1,4 +1,4 @@ -From e1b498bef17d1be8a19a5d29f34bc99c21b54e12 Mon Sep 17 00:00:00 2001 +From 88a28a4fe04e17bfecce9909485334bf5962386e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 23 Oct 2021 16:16:39 +0100 Subject: [PATCH] vddk: Include VDDK major library version in --dump-plugin diff --git a/0006-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch b/0010-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch similarity index 96% rename from 0006-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch rename to 0010-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch index 1e91952..7f26286 100644 --- a/0006-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch +++ b/0010-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch @@ -1,4 +1,4 @@ -From 7cd9b2bbbdae01513baa215abfacecbf19af2b1d Mon Sep 17 00:00:00 2001 +From 320af82b1a46bf41b6a42fab63c070fa84cdee15 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 23 Oct 2021 16:24:27 +0100 Subject: [PATCH] vddk: Add logical and physical sector size to -D diff --git a/0007-vddk-Fix-typo-in-debug-message.patch b/0011-vddk-Fix-typo-in-debug-message.patch similarity index 93% rename from 0007-vddk-Fix-typo-in-debug-message.patch rename to 0011-vddk-Fix-typo-in-debug-message.patch index c849e80..8b321d0 100644 --- a/0007-vddk-Fix-typo-in-debug-message.patch +++ b/0011-vddk-Fix-typo-in-debug-message.patch @@ -1,4 +1,4 @@ -From f00a059f71372a38703a2393b791703dfcb4f143 Mon Sep 17 00:00:00 2001 +From b14e229d037fd229d63a0192941e6087168e8337 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 23 Oct 2021 19:41:07 +0100 Subject: [PATCH] vddk: Fix typo in debug message diff --git a/0008-vddk-Only-print-vddk_library_version-when-we-managed.patch b/0012-vddk-Only-print-vddk_library_version-when-we-managed.patch similarity index 96% rename from 0008-vddk-Only-print-vddk_library_version-when-we-managed.patch rename to 0012-vddk-Only-print-vddk_library_version-when-we-managed.patch index de5f980..84054f3 100644 --- a/0008-vddk-Only-print-vddk_library_version-when-we-managed.patch +++ b/0012-vddk-Only-print-vddk_library_version-when-we-managed.patch @@ -1,4 +1,4 @@ -From 27926a76f087cc81fc07f5a72da50384aab785c6 Mon Sep 17 00:00:00 2001 +From cb80e8224799f3b056917892c6a054c72b8bd2ed Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 23 Oct 2021 19:50:52 +0100 Subject: [PATCH] vddk: Only print vddk_library_version when we managed to load diff --git a/0009-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch b/0013-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch similarity index 97% rename from 0009-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch rename to 0013-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch index bb7be49..1c81dfd 100644 --- a/0009-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch +++ b/0013-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch @@ -1,4 +1,4 @@ -From 7b43137763287b3d79874e27146ea2fecc5f9a17 Mon Sep 17 00:00:00 2001 +From 6bed3c33da51acd829fe043874e5a1506a3a0ff8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 25 Oct 2021 08:36:53 +0100 Subject: [PATCH] vddk: Print one line in --dump-plugin output for each VDDK diff --git a/0010-vddk-Move-minimum-version-to-VDDK-6.5.patch b/0014-vddk-Move-minimum-version-to-VDDK-6.5.patch similarity index 98% rename from 0010-vddk-Move-minimum-version-to-VDDK-6.5.patch rename to 0014-vddk-Move-minimum-version-to-VDDK-6.5.patch index b09e5f7..d4a1c2f 100644 --- a/0010-vddk-Move-minimum-version-to-VDDK-6.5.patch +++ b/0014-vddk-Move-minimum-version-to-VDDK-6.5.patch @@ -1,4 +1,4 @@ -From d4e1acf2e9b607a05b08ceb49d2879db02016cfe Mon Sep 17 00:00:00 2001 +From 1acf8d122df2311610d81230fa5463ba41605cc9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 26 Oct 2021 19:46:32 +0100 Subject: [PATCH] vddk: Move minimum version to VDDK 6.5 diff --git a/0011-vddk-Add-read-write-and-wait-asynchronous-functions.patch b/0015-vddk-Add-read-write-and-wait-asynchronous-functions.patch similarity index 97% rename from 0011-vddk-Add-read-write-and-wait-asynchronous-functions.patch rename to 0015-vddk-Add-read-write-and-wait-asynchronous-functions.patch index 2c8be18..c68a3fe 100644 --- a/0011-vddk-Add-read-write-and-wait-asynchronous-functions.patch +++ b/0015-vddk-Add-read-write-and-wait-asynchronous-functions.patch @@ -1,4 +1,4 @@ -From 53622e928682d08acafb27ce973a654ef7814c4d Mon Sep 17 00:00:00 2001 +From 49a064299fa14d3433c57ac55bb8c377b6e0619f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 27 Oct 2021 11:57:35 +0100 Subject: [PATCH] vddk: Add read, write and wait asynchronous functions diff --git a/0012-vddk-Start-to-split-VDDK-over-several-files.patch b/0016-vddk-Start-to-split-VDDK-over-several-files.patch similarity index 99% rename from 0012-vddk-Start-to-split-VDDK-over-several-files.patch rename to 0016-vddk-Start-to-split-VDDK-over-several-files.patch index 85c5a8c..424bc72 100644 --- a/0012-vddk-Start-to-split-VDDK-over-several-files.patch +++ b/0016-vddk-Start-to-split-VDDK-over-several-files.patch @@ -1,4 +1,4 @@ -From 35436075eb0df59c6480b79adaa755a2c6138833 Mon Sep 17 00:00:00 2001 +From 2c9527d1247875c26c861ebf361f9352c7b3d9b6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 27 Oct 2021 12:20:31 +0100 Subject: [PATCH] vddk: Start to split VDDK over several files diff --git a/0013-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch b/0017-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch similarity index 99% rename from 0013-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch rename to 0017-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch index 7a2fd48..5b5ef18 100644 --- a/0013-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch +++ b/0017-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch @@ -1,4 +1,4 @@ -From 27b7a2b4b58a99eb79386412a2b3d5387d28f6bc Mon Sep 17 00:00:00 2001 +From 9e8e16af56e168affa1573aefa39fec5ac87106f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 27 Oct 2021 12:30:41 +0100 Subject: [PATCH] vddk: Refactor -D vddk.stats=1 into a new file diff --git a/0014-vddk-Implement-parallel-thread-model.patch b/0018-vddk-Implement-parallel-thread-model.patch similarity index 99% rename from 0014-vddk-Implement-parallel-thread-model.patch rename to 0018-vddk-Implement-parallel-thread-model.patch index 9b5073e..eb94e21 100644 --- a/0014-vddk-Implement-parallel-thread-model.patch +++ b/0018-vddk-Implement-parallel-thread-model.patch @@ -1,4 +1,4 @@ -From d12a244fa6b5b582a7790a525a621b4573133749 Mon Sep 17 00:00:00 2001 +From c9a1f167f1433b21e04c41415356592e4811e34f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 27 Oct 2021 10:17:22 +0100 Subject: [PATCH] vddk: Implement parallel thread model diff --git a/0015-vddk-Assume-that-VixDiskLib_Flush-is-available.patch b/0019-vddk-Assume-that-VixDiskLib_Flush-is-available.patch similarity index 96% rename from 0015-vddk-Assume-that-VixDiskLib_Flush-is-available.patch rename to 0019-vddk-Assume-that-VixDiskLib_Flush-is-available.patch index 813fa89..3d67ea0 100644 --- a/0015-vddk-Assume-that-VixDiskLib_Flush-is-available.patch +++ b/0019-vddk-Assume-that-VixDiskLib_Flush-is-available.patch @@ -1,4 +1,4 @@ -From dd2ae58503f3c17e8aee2f78f97e0f669ce464c6 Mon Sep 17 00:00:00 2001 +From 8556fa5388a0b809545d87c069b700281d129c1c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 29 Oct 2021 20:56:55 +0100 Subject: [PATCH] vddk: Assume that VixDiskLib_Flush is available diff --git a/0016-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch b/0020-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch similarity index 99% rename from 0016-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch rename to 0020-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch index 8571342..d39d249 100644 --- a/0016-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch +++ b/0020-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch @@ -1,4 +1,4 @@ -From 10bbf28ad230a887ec05a2b1d25d95fd0d742072 Mon Sep 17 00:00:00 2001 +From b154902bcf935def2ca8cee70b00b8da37835316 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 29 Oct 2021 21:02:54 +0100 Subject: [PATCH] vddk: Simplify detection of VDDK symbols and baseline 6.5 diff --git a/0017-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch b/0021-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch similarity index 94% rename from 0017-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch rename to 0021-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch index 2f91a3b..a368519 100644 --- a/0017-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch +++ b/0021-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch @@ -1,4 +1,4 @@ -From c0d6f863ecd47535fe55bae12ce5bf292e356dbd Mon Sep 17 00:00:00 2001 +From 1095c3255820efaad5f448ffbecf331134dd0b4d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 30 Oct 2021 08:34:28 +0100 Subject: [PATCH] vddk: Remove some whitespace from a couple of functions diff --git a/0018-vddk-Move-config-debug-error-and-utility-functions-a.patch b/0022-vddk-Move-config-debug-error-and-utility-functions-a.patch similarity index 99% rename from 0018-vddk-Move-config-debug-error-and-utility-functions-a.patch rename to 0022-vddk-Move-config-debug-error-and-utility-functions-a.patch index a8111d4..d5cf652 100644 --- a/0018-vddk-Move-config-debug-error-and-utility-functions-a.patch +++ b/0022-vddk-Move-config-debug-error-and-utility-functions-a.patch @@ -1,4 +1,4 @@ -From c55eb650440d9cd713db74622ddc2afa3c1ce740 Mon Sep 17 00:00:00 2001 +From 4aa2334a7c986cf062b1a2d792c056165e8e3b59 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 30 Oct 2021 08:27:39 +0100 Subject: [PATCH] vddk: Move config, debug/error and utility functions around diff --git a/0019-common-utils-test-vector.c-Add-vector-benchmarks.patch b/0023-common-utils-test-vector.c-Add-vector-benchmarks.patch similarity index 97% rename from 0019-common-utils-test-vector.c-Add-vector-benchmarks.patch rename to 0023-common-utils-test-vector.c-Add-vector-benchmarks.patch index 1850ee7..873c005 100644 --- a/0019-common-utils-test-vector.c-Add-vector-benchmarks.patch +++ b/0023-common-utils-test-vector.c-Add-vector-benchmarks.patch @@ -1,4 +1,4 @@ -From 4cc4e2cfc6202d522b3c4282bbaedf3d47de16bb Mon Sep 17 00:00:00 2001 +From 523c3d9e83202e49740e65bb5ae1593be6c24569 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Fri, 5 Nov 2021 20:36:42 +0200 Subject: [PATCH] common/utils/test-vector.c: Add vector benchmarks @@ -70,10 +70,10 @@ index a04325be..b001620c 100644 ================= diff --git a/common/utils/Makefile.am b/common/utils/Makefile.am -index 14e9dfc4..55415535 100644 +index c33811fc..b2f08cb4 100644 --- a/common/utils/Makefile.am +++ b/common/utils/Makefile.am -@@ -100,6 +100,9 @@ test_quotes_SOURCES = test-quotes.c quote.c utils.h +@@ -101,6 +101,9 @@ test_quotes_SOURCES = test-quotes.c quote.c utils.h test_quotes_CPPFLAGS = -I$(srcdir) test_quotes_CFLAGS = $(WARNINGS_CFLAGS) diff --git a/0020-common-urils-vector.c-Optimize-vector-append.patch b/0024-common-urils-vector.c-Optimize-vector-append.patch similarity index 95% rename from 0020-common-urils-vector.c-Optimize-vector-append.patch rename to 0024-common-urils-vector.c-Optimize-vector-append.patch index d697c52..feece55 100644 --- a/0020-common-urils-vector.c-Optimize-vector-append.patch +++ b/0024-common-urils-vector.c-Optimize-vector-append.patch @@ -1,4 +1,4 @@ -From 20029d23e2992f929a3d75b5dea64832f8684d20 Mon Sep 17 00:00:00 2001 +From 444362449c6fc6c109a98268275c6b4c42ae2afb Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Fri, 5 Nov 2021 22:16:26 +0200 Subject: [PATCH] common/urils/vector.c: Optimize vector append diff --git a/0021-common-utils-vector-Rename-alloc-to-cap.patch b/0025-common-utils-vector-Rename-alloc-to-cap.patch similarity index 99% rename from 0021-common-utils-vector-Rename-alloc-to-cap.patch rename to 0025-common-utils-vector-Rename-alloc-to-cap.patch index c043386..bdc4e39 100644 --- a/0021-common-utils-vector-Rename-alloc-to-cap.patch +++ b/0025-common-utils-vector-Rename-alloc-to-cap.patch @@ -1,4 +1,4 @@ -From a329cd90b350b17eac3227c0f30794015b710366 Mon Sep 17 00:00:00 2001 +From 73d69d2dd75952e79c8ccaba2212632e84f8e459 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Fri, 5 Nov 2021 22:59:38 +0200 Subject: [PATCH] common/utils/vector: Rename `alloc` to `cap` diff --git a/0022-common-utils-vector-Rename-size-to-len.patch b/0026-common-utils-vector-Rename-size-to-len.patch similarity index 99% rename from 0022-common-utils-vector-Rename-size-to-len.patch rename to 0026-common-utils-vector-Rename-size-to-len.patch index 6577f6d..bc73d8c 100644 --- a/0022-common-utils-vector-Rename-size-to-len.patch +++ b/0026-common-utils-vector-Rename-size-to-len.patch @@ -1,4 +1,4 @@ -From 932679668fc44839727ae350a1c2e94b26bcfc0a Mon Sep 17 00:00:00 2001 +From 62cae5465fe9b560ddd0b8d9f3fbcf738ab6daf3 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Sat, 6 Nov 2021 00:03:11 +0200 Subject: [PATCH] common/utils/vector: Rename `size` to `len` diff --git a/0023-podwrapper.pl.in-Use-short-commit-date.patch b/0027-podwrapper.pl.in-Use-short-commit-date.patch similarity index 94% rename from 0023-podwrapper.pl.in-Use-short-commit-date.patch rename to 0027-podwrapper.pl.in-Use-short-commit-date.patch index e9d3eb0..2f69bb8 100644 --- a/0023-podwrapper.pl.in-Use-short-commit-date.patch +++ b/0027-podwrapper.pl.in-Use-short-commit-date.patch @@ -1,4 +1,4 @@ -From 83f7325a317b4a3d670f1288715af8854627b0f6 Mon Sep 17 00:00:00 2001 +From 913158a00a906604a29d204f25b048625d272597 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Mon, 8 Nov 2021 19:47:57 +0200 Subject: [PATCH] podwrapper.pl.in: Use short commit date diff --git a/0024-ocaml-Replace-noalloc-with-noalloc-annotation.patch b/0028-ocaml-Replace-noalloc-with-noalloc-annotation.patch similarity index 98% rename from 0024-ocaml-Replace-noalloc-with-noalloc-annotation.patch rename to 0028-ocaml-Replace-noalloc-with-noalloc-annotation.patch index 355c596..769f01b 100644 --- a/0024-ocaml-Replace-noalloc-with-noalloc-annotation.patch +++ b/0028-ocaml-Replace-noalloc-with-noalloc-annotation.patch @@ -1,4 +1,4 @@ -From 8e5248fda608adbce5b86d938855294001276906 Mon Sep 17 00:00:00 2001 +From 6213bd05d6f017582915ea0f0e4f9018497694b8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Nov 2021 09:07:42 +0000 Subject: [PATCH] ocaml: Replace "noalloc" with [@@noalloc] annotation diff --git a/0025-vddk-Drop-obsolete-documentation-related-to-thread-m.patch b/0029-vddk-Drop-obsolete-documentation-related-to-thread-m.patch similarity index 95% rename from 0025-vddk-Drop-obsolete-documentation-related-to-thread-m.patch rename to 0029-vddk-Drop-obsolete-documentation-related-to-thread-m.patch index 6ba172c..4313e1c 100644 --- a/0025-vddk-Drop-obsolete-documentation-related-to-thread-m.patch +++ b/0029-vddk-Drop-obsolete-documentation-related-to-thread-m.patch @@ -1,4 +1,4 @@ -From 6e85906311377b845f299d3a570e23db2809529c Mon Sep 17 00:00:00 2001 +From 5ed87ffb4f59aafc4e636dd041e62050e457251e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 27 Nov 2021 16:44:41 +0000 Subject: [PATCH] vddk: Drop obsolete documentation related to thread model diff --git a/0026-Revert-podwrapper.pl.in-Use-short-commit-date.patch b/0030-Revert-podwrapper.pl.in-Use-short-commit-date.patch similarity index 94% rename from 0026-Revert-podwrapper.pl.in-Use-short-commit-date.patch rename to 0030-Revert-podwrapper.pl.in-Use-short-commit-date.patch index 1f56807..06c881d 100644 --- a/0026-Revert-podwrapper.pl.in-Use-short-commit-date.patch +++ b/0030-Revert-podwrapper.pl.in-Use-short-commit-date.patch @@ -1,4 +1,4 @@ -From b235076a7df96253aa41a7859c3ba54386bd3fef Mon Sep 17 00:00:00 2001 +From a93085886d44f4d667e69994827ee443607f9085 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 20 Nov 2021 17:50:25 +0000 Subject: [PATCH] Revert "podwrapper.pl.in: Use short commit date" diff --git a/0027-Fix-podwrapper.pl.in-Use-short-commit-date.patch b/0031-Fix-podwrapper.pl.in-Use-short-commit-date.patch similarity index 94% rename from 0027-Fix-podwrapper.pl.in-Use-short-commit-date.patch rename to 0031-Fix-podwrapper.pl.in-Use-short-commit-date.patch index c828fb8..ec57e5e 100644 --- a/0027-Fix-podwrapper.pl.in-Use-short-commit-date.patch +++ b/0031-Fix-podwrapper.pl.in-Use-short-commit-date.patch @@ -1,4 +1,4 @@ -From fb7749b3497a7aaf1b00e975af166af029209c01 Mon Sep 17 00:00:00 2001 +From 1bbaf3129a130e7d74a3c8a7045eb829bff1ccbe Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 30 Nov 2021 12:42:01 -0600 Subject: [PATCH] Fix "podwrapper.pl.in: Use short commit date" diff --git a/0028-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch b/0032-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch similarity index 97% rename from 0028-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch rename to 0032-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch index e953d6b..56e870c 100644 --- a/0028-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch +++ b/0032-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch @@ -1,4 +1,4 @@ -From 599f64f5885cf546f85e6c28d98b0444c18ad1fa Mon Sep 17 00:00:00 2001 +From 620f44faac50d25f60182a7beb11f43c8e944516 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Nov 2021 17:56:02 +0000 Subject: [PATCH] scripts: Add simple script for automating VDDK disk @@ -42,10 +42,10 @@ index 49f5d91c..6df5eba0 100644 if !ENABLE_LIBFUZZER # NB: This is not the real nbdkit binary. It's a wrapper that allows diff --git a/configure.ac b/configure.ac -index 19514ef6..8a86326e 100644 +index b194da61..88d3de68 100644 --- a/configure.ac +++ b/configure.ac -@@ -1253,6 +1253,8 @@ dnl Produce output files. +@@ -1249,6 +1249,8 @@ dnl Produce output files. AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([podwrapper.pl], [chmod +x,-w podwrapper.pl]) diff --git a/0029-file-Fix-implementation-of-cache-none-for-writes.patch b/0033-file-Fix-implementation-of-cache-none-for-writes.patch similarity index 98% rename from 0029-file-Fix-implementation-of-cache-none-for-writes.patch rename to 0033-file-Fix-implementation-of-cache-none-for-writes.patch index 7ed3e22..3bb21a2 100644 --- a/0029-file-Fix-implementation-of-cache-none-for-writes.patch +++ b/0033-file-Fix-implementation-of-cache-none-for-writes.patch @@ -1,4 +1,4 @@ -From 86b2baa7cd4a32246d447cbcedaaef3a15212ea4 Mon Sep 17 00:00:00 2001 +From 9337139bc51ad06756dee9d606a6b35cf42275b2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Dec 2021 21:08:26 +0000 Subject: [PATCH] file: Fix implementation of cache=none for writes diff --git a/0034-tests-Add-configure-disable-libguestfs-tests-flag.patch b/0034-tests-Add-configure-disable-libguestfs-tests-flag.patch new file mode 100644 index 0000000..4d7d7ab --- /dev/null +++ b/0034-tests-Add-configure-disable-libguestfs-tests-flag.patch @@ -0,0 +1,95 @@ +From 997a064534f14dcb57ce2ba039f5274d13abba8f Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 18 Dec 2021 20:31:10 +0000 +Subject: [PATCH] tests: Add configure --disable-libguestfs-tests flag + +This can be used to disable tests which need libguestfs*. We were +already doing that in a hackish way in the Fedora build on some +architectures. This makes it more supportable. + +Note that you can use + + ./configure --enable-libguestfs --disable-libguestfs-tests + +to enable the bindings but disable the tests. + +The difference between without and with the new flag on an otherwise +fully configured Fedora machine: + + # TOTAL: 286 + # PASS: 273 + # SKIP: 13 + + # TOTAL: 263 + # PASS: 251 + # SKIP: 12 + +* except for those which directly test for requirements using +expressions like: + + requires guestfish --version + +(cherry picked from commit c09ae98ff3b4b786565de4aa173274531a753d30) +--- + configure.ac | 17 ++++++++++++++++- + tests/Makefile.am | 2 ++ + 2 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 88d3de68..6f73a3b8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1146,7 +1146,8 @@ AS_IF([test "$with_libzstd" != "no"],[ + ]) + AM_CONDITIONAL([HAVE_LIBZSTD],[test "x$LIBZSTD_LIBS" != "x"]) + +-dnl Check for libguestfs (only for the guestfs plugin and the test suite). ++dnl Check for libguestfs (only for the guestfs plugin and parts of ++dnl the test suite). + AC_ARG_WITH([libguestfs], + [AS_HELP_STRING([--without-libguestfs], + [disable guestfs plugin and tests @<:@default=check@:>@])], +@@ -1173,6 +1174,17 @@ AS_IF([test "$with_libguestfs" != "no"],[ + ]) + AM_CONDITIONAL([HAVE_LIBGUESTFS],[test "x$LIBGUESTFS_LIBS" != "x"]) + ++dnl Disable tests which need libguestfs. ++AC_ARG_ENABLE([libguestfs-tests], ++ [AS_HELP_STRING([--disable-libguestfs-tests], ++ [disable tests which need libguestfs])], ++ [], ++ [enable_libguestfs_tests=check] ++) ++AM_CONDITIONAL([USE_LIBGUESTFS_FOR_TESTS], ++ [test "x$LIBGUESTFS_LIBS" != "x" && \ ++ test "x$enable_libguestfs_tests" != "xno"]) ++ + dnl Check for ext2fs and com_err, for the ext2 filter. + AC_ARG_WITH([ext2], + [AS_HELP_STRING([--without-ext2], +@@ -1447,6 +1459,9 @@ echo "Other optional features:" + echo + feature "allocator=zstd ......................... " \ + test "x$HAVE_LIBZSTD_TRUE" = "x" ++feature "tests using libguestfs ................. " \ ++ test "x$HAVE_LIBGUESTFS_TRUE" = "x" -a \ ++ "x$USE_LIBGUESTFS_FOR_TESTS_TRUE" = "x" + + echo + echo "If any optional component is configured ‘no’ when you expected ‘yes’" +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 2b7ae9f3..43b60943 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -1888,6 +1888,8 @@ TESTS += $(LIBNBD_TESTS) + endif HAVE_LIBNBD + + if HAVE_LIBGUESTFS ++if USE_LIBGUESTFS_FOR_TESTS + check_PROGRAMS += $(LIBGUESTFS_TESTS) + TESTS += $(LIBGUESTFS_TESTS) ++endif USE_LIBGUESTFS_FOR_TESTS + endif HAVE_LIBGUESTFS +-- +2.31.1 + diff --git a/nbdkit.spec b/nbdkit.spec index b1ade79..bdde0b3 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -19,7 +19,8 @@ %global have_ocaml 1 %endif -# Architectures where the complete test suite must pass. +# Architectures where we run the complete test suite including +# the libguestfs tests. # # On all other architectures, a simpler test suite must pass. This # omits any tests that run full qemu, since running qemu under TCG is @@ -51,7 +52,7 @@ ExclusiveArch: x86_64 Name: nbdkit Version: 1.28.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: NBD server License: BSD @@ -76,44 +77,46 @@ Source3: copy-patches.sh # https://gitlab.com/nbdkit/nbdkit/-/commits/rhel-9.0/ # Patches. -Patch0001: 0001-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch -Patch0002: 0002-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch -Patch0003: 0003-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch -Patch0004: 0004-vddk-Document-troubleshooting-performance-problems.patch -Patch0005: 0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch -Patch0006: 0006-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch -Patch0007: 0007-vddk-Fix-typo-in-debug-message.patch -Patch0008: 0008-vddk-Only-print-vddk_library_version-when-we-managed.patch -Patch0009: 0009-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch -Patch0010: 0010-vddk-Move-minimum-version-to-VDDK-6.5.patch -Patch0011: 0011-vddk-Add-read-write-and-wait-asynchronous-functions.patch -Patch0012: 0012-vddk-Start-to-split-VDDK-over-several-files.patch -Patch0013: 0013-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch -Patch0014: 0014-vddk-Implement-parallel-thread-model.patch -Patch0015: 0015-vddk-Assume-that-VixDiskLib_Flush-is-available.patch -Patch0016: 0016-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch -Patch0017: 0017-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch -Patch0018: 0018-vddk-Move-config-debug-error-and-utility-functions-a.patch -Patch0019: 0019-common-utils-test-vector.c-Add-vector-benchmarks.patch -Patch0020: 0020-common-urils-vector.c-Optimize-vector-append.patch -Patch0021: 0021-common-utils-vector-Rename-alloc-to-cap.patch -Patch0022: 0022-common-utils-vector-Rename-size-to-len.patch -Patch0023: 0023-podwrapper.pl.in-Use-short-commit-date.patch -Patch0024: 0024-ocaml-Replace-noalloc-with-noalloc-annotation.patch -Patch0025: 0025-vddk-Drop-obsolete-documentation-related-to-thread-m.patch -Patch0026: 0026-Revert-podwrapper.pl.in-Use-short-commit-date.patch -Patch0027: 0027-Fix-podwrapper.pl.in-Use-short-commit-date.patch -Patch0028: 0028-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch -Patch0029: 0029-file-Fix-implementation-of-cache-none-for-writes.patch +Patch0001: 0001-windows-Use-replacement-pread-and-pwrite-functions.patch +Patch0002: 0002-windows-Link-plugins-filters-that-use-utils-pread-pw.patch +Patch0003: 0003-tests-Use-mke2fs-d-to-create-ext4-test-image.patch +Patch0004: 0004-plugins-python-Fix-extents-count-format-string.patch +Patch0005: 0005-vddk-Refactor-how-D-vddk.stats-1-is-collected.patch +Patch0006: 0006-vddk-Extend-D-vddk.stats-1-to-show-number-of-calls-a.patch +Patch0007: 0007-vddk-Simplify-and-consolidate-VDDK_CALL_START-END-ma.patch +Patch0008: 0008-vddk-Document-troubleshooting-performance-problems.patch +Patch0009: 0009-vddk-Include-VDDK-major-library-version-in-dump-plug.patch +Patch0010: 0010-vddk-Add-logical-and-physical-sector-size-to-D-vddk..patch +Patch0011: 0011-vddk-Fix-typo-in-debug-message.patch +Patch0012: 0012-vddk-Only-print-vddk_library_version-when-we-managed.patch +Patch0013: 0013-vddk-Print-one-line-in-dump-plugin-output-for-each-V.patch +Patch0014: 0014-vddk-Move-minimum-version-to-VDDK-6.5.patch +Patch0015: 0015-vddk-Add-read-write-and-wait-asynchronous-functions.patch +Patch0016: 0016-vddk-Start-to-split-VDDK-over-several-files.patch +Patch0017: 0017-vddk-Refactor-D-vddk.stats-1-into-a-new-file.patch +Patch0018: 0018-vddk-Implement-parallel-thread-model.patch +Patch0019: 0019-vddk-Assume-that-VixDiskLib_Flush-is-available.patch +Patch0020: 0020-vddk-Simplify-detection-of-VDDK-symbols-and-baseline.patch +Patch0021: 0021-vddk-Remove-some-whitespace-from-a-couple-of-functio.patch +Patch0022: 0022-vddk-Move-config-debug-error-and-utility-functions-a.patch +Patch0023: 0023-common-utils-test-vector.c-Add-vector-benchmarks.patch +Patch0024: 0024-common-urils-vector.c-Optimize-vector-append.patch +Patch0025: 0025-common-utils-vector-Rename-alloc-to-cap.patch +Patch0026: 0026-common-utils-vector-Rename-size-to-len.patch +Patch0027: 0027-podwrapper.pl.in-Use-short-commit-date.patch +Patch0028: 0028-ocaml-Replace-noalloc-with-noalloc-annotation.patch +Patch0029: 0029-vddk-Drop-obsolete-documentation-related-to-thread-m.patch +Patch0030: 0030-Revert-podwrapper.pl.in-Use-short-commit-date.patch +Patch0031: 0031-Fix-podwrapper.pl.in-Use-short-commit-date.patch +Patch0032: 0032-scripts-Add-simple-script-for-automating-VDDK-disk-c.patch +Patch0033: 0033-file-Fix-implementation-of-cache-none-for-writes.patch +Patch0034: 0034-tests-Add-configure-disable-libguestfs-tests-flag.patch BuildRequires: make %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif -%ifnarch %{complete_test_arches} -BuildRequires: autoconf, automake, libtool -%endif BuildRequires: gcc, gcc-c++ BuildRequires: %{_bindir}/pod2man BuildRequires: gnutls-devel @@ -721,13 +724,6 @@ for %{name}. autoreconf -i %endif -%ifnarch %{complete_test_arches} -# Simplify the test suite so it doesn't require qemu. -sed -i -e 's/^LIBGUESTFS_TESTS/xLIBGUESTFS_TESTS/' tests/Makefile.am -sed -i -e '/^if HAVE_GUESTFISH/,/^endif HAVE_GUESTFISH/d' tests/Makefile.am -autoreconf -i -%endif - %build # Golang bindings are not enabled in the build since they don't @@ -757,6 +753,11 @@ export PYTHON=%{__python3} --with-libguestfs \ %else --without-libguestfs \ +%endif +%ifarch %{complete_test_arches} + --enable-libguestfs-tests \ +%else + --disable-libguestfs-tests \ %endif --with-tls-priority=@NBDKIT,SYSTEM @@ -1218,7 +1219,7 @@ export LIBGUESTFS_TRACE=1 %changelog -* Wed Dec 08 2021 Richard W.M. Jones - 1.28.3-2 +* Sun Dec 19 2021 Richard W.M. Jones - 1.28.3-3 - Rebase to new stable branch version 1.28.3 resolves: rhbz#2011709 - Move nbdkit-null-plugin to nbdkit-server package