From 2fd0615d12091053ed596b604bc93f2b649adf96 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Jan 2024 18:12:47 +0000 Subject: [PATCH] Potential fix for parallel builds failure of mingw subpackage --- ...tmaps-Fix-tests-when-srcdir-builddir.patch | 2 +- ...x-tests-to-work-with-srcdir-builddir.patch | 2 +- ...nts-win32-Only-build-nbdkit-cat.mc-d.patch | 48 +++++++++++++++++++ nbdkit.spec | 1 + 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 0003-common-replacements-win32-Only-build-nbdkit-cat.mc-d.patch diff --git a/0001-common-bitmaps-Fix-tests-when-srcdir-builddir.patch b/0001-common-bitmaps-Fix-tests-when-srcdir-builddir.patch index 0263951..ea7acc2 100644 --- a/0001-common-bitmaps-Fix-tests-when-srcdir-builddir.patch +++ b/0001-common-bitmaps-Fix-tests-when-srcdir-builddir.patch @@ -1,7 +1,7 @@ From 93a1538808ac7f9788336a7e35168d851e8b2c72 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Jan 2024 13:24:48 +0000 -Subject: [PATCH 1/2] common/bitmaps: Fix tests when srcdir != builddir +Subject: [PATCH 1/3] common/bitmaps: Fix tests when srcdir != builddir --- common/bitmap/Makefile.am | 1 + diff --git a/0002-tests-Fix-tests-to-work-with-srcdir-builddir.patch b/0002-tests-Fix-tests-to-work-with-srcdir-builddir.patch index feb49e8..93d28f8 100644 --- a/0002-tests-Fix-tests-to-work-with-srcdir-builddir.patch +++ b/0002-tests-Fix-tests-to-work-with-srcdir-builddir.patch @@ -1,7 +1,7 @@ From ac60163ceba1b951e1d2f0625552e6a45d85f666 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Jan 2024 13:35:02 +0000 -Subject: [PATCH 2/2] tests: Fix tests to work with srcdir != builddir +Subject: [PATCH 2/3] tests: Fix tests to work with srcdir != builddir --- tests/test-cc-cpp.sh | 2 +- diff --git a/0003-common-replacements-win32-Only-build-nbdkit-cat.mc-d.patch b/0003-common-replacements-win32-Only-build-nbdkit-cat.mc-d.patch new file mode 100644 index 0000000..b9f8ae0 --- /dev/null +++ b/0003-common-replacements-win32-Only-build-nbdkit-cat.mc-d.patch @@ -0,0 +1,48 @@ +From 774465bb9e3444f23709deabeb39cc91490001a5 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 23 Jan 2024 18:08:12 +0000 +Subject: [PATCH 3/3] common/replacements/win32: Only build nbdkit-cat.mc + derived files once + +Previously parallel builds caused multiple instances of windmc to run. +Use a stamp file to avoid this. +--- + common/replacements/win32/Makefile.am | 9 +++++++-- + .gitignore | 1 + + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/common/replacements/win32/Makefile.am b/common/replacements/win32/Makefile.am +index 9b5a68db0..b8c7c639e 100644 +--- a/common/replacements/win32/Makefile.am ++++ b/common/replacements/win32/Makefile.am +@@ -38,8 +38,13 @@ if IS_WINDOWS + # Build the message catalog. + noinst_DATA = MSG00001.bin nbdkit-cat.h nbdkit-cat.rc + +-$(noinst_DATA): nbdkit-cat.mc +- rm -f $@ ++CLEANFILES += stamp-data ++ ++$(noinst_DATA): stamp-data ++ ++stamp-data: nbdkit-cat.mc ++ rm -f $@ $(noinst_DATA) + $(MC) $< ++ touch $@ + + endif +diff --git a/.gitignore b/.gitignore +index 04fdcd723..14f816c93 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -55,6 +55,7 @@ plugins/*/*.3 + /common/replacements/win32/MSG00001.bin + /common/replacements/win32/nbdkit-cat.h + /common/replacements/win32/nbdkit-cat.rc ++/common/replacements/win32/stamp-data + /common/utils/test-quotes + /common/utils/test-vector + /common/utils/windows-errors.c +-- +2.43.0 + diff --git a/nbdkit.spec b/nbdkit.spec index 72eb510..019f681 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -92,6 +92,7 @@ Source8: %{modulename}.fc # Upstream patches to fix srcdir != builddir Patch: 0001-common-bitmaps-Fix-tests-when-srcdir-builddir.patch Patch: 0002-tests-Fix-tests-to-work-with-srcdir-builddir.patch +Patch: 0003-common-replacements-win32-Only-build-nbdkit-cat.mc-d.patch BuildRequires: make %if 0%{patches_touch_autotools}