From 3bdae99cca597708b38364366fa42582abd62ae6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 10 Mar 2025 15:29:45 +0000 Subject: [PATCH] Rebase to nbdkit 1.42.1 resolves: RHEL-78830 --- ...ease-notes-1.42.pod-Add-release-date.patch | 25 ----- ...ppy-warnings-unless-enable-gcc-warni.patch | 92 +++++++++++++++++++ ...nused-command-line-argument-on-FreeB.patch | 67 -------------- ...ew-location-for-Wine-AF_UNIX-patches.patch | 31 ------- nbdkit.spec | 10 +- sources | 4 +- 6 files changed, 98 insertions(+), 131 deletions(-) delete mode 100644 0001-docs-nbdkit-release-notes-1.42.pod-Add-release-date.patch create mode 100644 0001-rust-Disable-clippy-warnings-unless-enable-gcc-warni.patch delete mode 100644 0002-build-Disable-Wunused-command-line-argument-on-FreeB.patch delete mode 100644 0003-README-New-location-for-Wine-AF_UNIX-patches.patch diff --git a/0001-docs-nbdkit-release-notes-1.42.pod-Add-release-date.patch b/0001-docs-nbdkit-release-notes-1.42.pod-Add-release-date.patch deleted file mode 100644 index 4d40151..0000000 --- a/0001-docs-nbdkit-release-notes-1.42.pod-Add-release-date.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6cdc9d4a858cb9a80ad87961a6647452f9498d83 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 11 Feb 2025 13:59:45 +0000 -Subject: [PATCH] docs/nbdkit-release-notes-1.42.pod: Add release date - ---- - docs/nbdkit-release-notes-1.42.pod | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/nbdkit-release-notes-1.42.pod b/docs/nbdkit-release-notes-1.42.pod -index 712c6027..dc4f05bc 100644 ---- a/docs/nbdkit-release-notes-1.42.pod -+++ b/docs/nbdkit-release-notes-1.42.pod -@@ -7,7 +7,7 @@ nbdkit-release-notes-1.42 - release notes for nbdkit 1.42 - These are the release notes for nbdkit stable release 1.42. - This describes the major changes since 1.40. - --nbdkit 1.42.0 was released on B. -+nbdkit 1.42.0 was released on B<11 February 2025>. - - =head2 Security - --- -2.47.1 - diff --git a/0001-rust-Disable-clippy-warnings-unless-enable-gcc-warni.patch b/0001-rust-Disable-clippy-warnings-unless-enable-gcc-warni.patch new file mode 100644 index 0000000..a8092e1 --- /dev/null +++ b/0001-rust-Disable-clippy-warnings-unless-enable-gcc-warni.patch @@ -0,0 +1,92 @@ +From 19c46bafab94716141a8e2ec9ade2f7dd47a6384 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 5 Mar 2025 11:31:10 +0000 +Subject: [PATCH] rust: Disable clippy warnings unless --enable-gcc-warnings is + used +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Turn ./configure --enable-gcc-warnings into a general "enable compiler +warnings" option (we'll probably need to change the name of it later). +Then use this option to control whether Rust clippy warnings are +enabled or not. + +Note that CI generally enables this option so we should still see Rust +errors in CI. + +Reported-by: Thomas Weißschuh +(cherry picked from commit aa6b3a9954418659c5d27aae3ef3fe9005961510) +--- + configure.ac | 14 +++++++++----- + plugins/rust/Makefile.am | 5 ++++- + 2 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c3ef3aff..ff4a4049 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -225,17 +225,20 @@ AS_IF([$CXX --version >&AS_MESSAGE_LOG_FD 2>&1],[have_cxx=yes],[have_cxx=no]) + AC_MSG_RESULT([$have_cxx]) + AM_CONDITIONAL([HAVE_CXX], [test "$have_cxx" = "yes"]) + ++dnl If --enable-gcc-warnings is used, then compiler warnings are ++dnl turned on. Despite the name this applies to GCC, Clang and ++dnl Rust (clippy) warnings. + AC_ARG_ENABLE([gcc-warnings], + [AS_HELP_STRING([--enable-gcc-warnings], +- [turn on lots of GCC warnings (for developers)])], ++ [turn on compiler warnings (for developers)])], + [case $enableval in + yes|no) ;; + *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;; + esac +- gcc_warnings=$enableval], +- [gcc_warnings=no] ++ compiler_warnings=$enableval], ++ [compiler_warnings=no] + ) +-if test "x$gcc_warnings" = "xyes"; then ++if test "x$compiler_warnings" = "xyes"; then + WARNINGS_CFLAGS="-Wall -Wshadow -Wvla -Werror" + AC_SUBST([WARNINGS_CFLAGS]) + +@@ -251,8 +254,8 @@ if test "x$gcc_warnings" = "xyes"; then + [AC_MSG_RESULT([no])] + ) + AC_SUBST([WARNINGS_MODULE_CXXFLAGS]) +- + fi ++AM_CONDITIONAL([COMPILER_WARNINGS], [test "$compiler_warnings" = "yes"]) + + dnl Check if the compiler supports -std=c90 flag. This is only used + dnl during a test. OpenBSD GCC does not support this flag so we skip +@@ -1818,6 +1821,7 @@ echo + echo "Other optional features:" + echo + feature "allocator=zstd" test "x$HAVE_LIBZSTD_TRUE" = "x" ++feature "compiler warnings" test "x$COMPILER_WARNINGS_TRUE" = "x" + feature "tests using libguestfs" \ + test "x$HAVE_LIBGUESTFS_TRUE" = "x" && \ + test "x$USE_LIBGUESTFS_FOR_TESTS_TRUE" = "x" +diff --git a/plugins/rust/Makefile.am b/plugins/rust/Makefile.am +index dc774e11..33f13107 100644 +--- a/plugins/rust/Makefile.am ++++ b/plugins/rust/Makefile.am +@@ -81,9 +81,12 @@ endif + TESTS = \ + cargo-tests.sh \ + test-ramdisk.sh \ +- clippy.sh \ + $(NULL) + ++if COMPILER_WARNINGS ++TESTS += clippy.sh ++endif ++ + if HAVE_POD + + man_MANS = nbdkit-rust-plugin.3 +-- +2.47.1 + diff --git a/0002-build-Disable-Wunused-command-line-argument-on-FreeB.patch b/0002-build-Disable-Wunused-command-line-argument-on-FreeB.patch deleted file mode 100644 index de657cf..0000000 --- a/0002-build-Disable-Wunused-command-line-argument-on-FreeB.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 55bee3cc5797274d2e1ea925acc6e27572c7b5c8 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 7 Feb 2025 09:09:04 +0000 -Subject: [PATCH] build: Disable -Wunused-command-line-argument on FreeBSD -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When compiling filters/stats, FreeBSD clang++ (only) complains about: - -c++: error: argument unused during compilation: '-pthread' [-Werror,-Wunused-command-line-argument] - -This is because clang will ignore the -pthread argument on FreeBSD -if code is being linked with -nostdlib. This is the case when building -modules with libtool. - -The warning flag must be preceeded by "-Xcompiler", otherwise libtool -will discard the warning flag. - -Derived-from: 433a77d06e57fd5894ada102cd21689e61f47f57 -Signed-off-by: Daniel P. Berrangé ---- - configure.ac | 14 ++++++++++++++ - filters/stats/Makefile.am | 2 +- - 2 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 407b28db..fe917df3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -238,6 +238,20 @@ AC_ARG_ENABLE([gcc-warnings], - if test "x$gcc_warnings" = "xyes"; then - WARNINGS_CFLAGS="-Wall -Wshadow -Wvla -Werror" - AC_SUBST([WARNINGS_CFLAGS]) -+ -+ dnl Hack (temporary?) for FreeBSD which complains about: -+ dnl c++: error: argument unused during compilation: '-pthread' [-Werror,-Wunused-command-line-argument] -+ WARNINGS_MODULE_CXXFLAGS="$WARNINGS_CFLAGS" -+ AC_MSG_CHECKING([if we should disable unused-command-line-argument warning]) -+ AS_CASE([$host_os], -+ [freebsd*], [ -+ WARNINGS_MODULE_CXXFLAGS="$WARNINGS_MODULE_CXXFLAGS -Xcompiler -Wno-unused-command-line-argument" -+ AC_MSG_RESULT([yes]) -+ ], -+ [AC_MSG_RESULT([no])] -+ ) -+ AC_SUBST([WARNINGS_MODULE_CXXFLAGS]) -+ - fi - - dnl Check if the compiler supports -std=c90 flag. This is only used -diff --git a/filters/stats/Makefile.am b/filters/stats/Makefile.am -index 840805fb..c992566e 100644 ---- a/filters/stats/Makefile.am -+++ b/filters/stats/Makefile.am -@@ -48,7 +48,7 @@ nbdkit_stats_filter_la_CPPFLAGS = \ - -I$(top_srcdir)/common/include \ - -I$(top_srcdir)/common/utils \ - $(NULL) --nbdkit_stats_filter_la_CXXFLAGS = $(WARNINGS_CFLAGS) -std=c++11 -+nbdkit_stats_filter_la_CXXFLAGS = $(WARNINGS_MODULE_CXXFLAGS) -std=c++11 - nbdkit_stats_filter_la_LDFLAGS = \ - -module -avoid-version -shared $(NO_UNDEFINED_ON_WINDOWS) \ - $(NULL) --- -2.47.1 - diff --git a/0003-README-New-location-for-Wine-AF_UNIX-patches.patch b/0003-README-New-location-for-Wine-AF_UNIX-patches.patch deleted file mode 100644 index a79e1f4..0000000 --- a/0003-README-New-location-for-Wine-AF_UNIX-patches.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b55904b5e7d84358cef2ad9eb7637ee569eb52f6 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 14 Feb 2025 09:35:38 +0000 -Subject: [PATCH] README: New location for Wine AF_UNIX patches - ---- - README.md | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/README.md b/README.md -index fb4d7d28..5d61e786 100644 ---- a/README.md -+++ b/README.md -@@ -412,10 +412,10 @@ using Linux and mingw-w64. At a minimum you will need: - * mingw-w64 gnutls (optional, but highly recommended) - * wine (if you want to run it on Linux) - --You may want to patch Wine with this patch which adds support for --AF_UNIX sockets. It is needed to get most of the test suite to work, --but if you don't care about the -U option then it is not needed. --https://www.winehq.org/pipermail/wine-devel/2021-May/187049.html -+You may want to patch Wine with support for `AF_UNIX` sockets. It is -+needed to get most of the test suite to work, but if you don't care -+about the -U option then it is not needed. -+https://bugs.winehq.org/show_bug.cgi?id=52568 - - Other mingw-w64 libraries may be installed which will add - functionality (see full list of requirements above), but you may end --- -2.47.1 - diff --git a/nbdkit.spec b/nbdkit.spec index d476169..8e2487e 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -54,7 +54,7 @@ %global source_directory 1.42-stable Name: nbdkit -Version: 1.42.0 +Version: 1.42.1 Release: 1%{?dist} Summary: NBD server @@ -80,9 +80,7 @@ Source3: copy-patches.sh # https://gitlab.com/nbdkit/nbdkit/-/commits/rhel-10.1/ # Patches. -Patch0001: 0001-docs-nbdkit-release-notes-1.42.pod-Add-release-date.patch -Patch0002: 0002-build-Disable-Wunused-command-line-argument-on-FreeB.patch -Patch0003: 0003-README-New-location-for-Wine-AF_UNIX-patches.patch +Patch0001: 0001-rust-Disable-clippy-warnings-unless-enable-gcc-warni.patch # For automatic RPM Provides generation. # See: https://rpm-software-management.github.io/rpm/manual/dependency_generators.html @@ -1525,8 +1523,8 @@ fi %changelog -* Mon Feb 24 2025 Richard W.M. Jones - 1.42.0-1 -- Rebase to nbdkit 1.42.0 +* Mon Mar 10 2025 Richard W.M. Jones - 1.42.1-1 +- Rebase to nbdkit 1.42.1 - Synch the spec file with Fedora Rawhide. - nbdkit-ondemand-plugin moves into a new subpackage. - New nbdkit-time-limit-filter. diff --git a/sources b/sources index 77b7677..84f3c10 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.42.0.tar.gz) = c8360fc2d9e6806ab241dcd61da82f52a881dd394d2e6c8c5372d4920f0751fe20dfe9bf45ff35c34cd1e12fd35d2b7dcf17374387805ff6cdec599c543c6bdc -SHA512 (nbdkit-1.42.0.tar.gz.sig) = df2e05eb46c78c2ecdc16b6b1ba37cbcbf001cfd5f7c3b9206da7100e4499ddb7f35ed75786d109767f2e9bf4a2baf02994ce5684910fd9cfc8bfccc9dd6dce7 +SHA512 (nbdkit-1.42.1.tar.gz) = ff6b171c6e73eb9bec70ef0f565dc16add72dfbef29db147fa639fd0b443a9fe0f72d5f832b1eb8f397d62d66660fb825e29b0314ec9d6670aa1a7aa9c1dbc3d +SHA512 (nbdkit-1.42.1.tar.gz.sig) = 20e1059cdb0d53aeac066e81ee92c49c58cec65dce928f3e11c0213c4e7a9700fa73f2b990efa974be5afc877d2082f85e40e511001ba5e971faa51c9247ec2b