From 64680cf3405ede44b0fb4f5f4014884e8d3b997a Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 28 Apr 2022 11:01:59 +0200 Subject: [PATCH] Remove the second source path definition from the CMake command The '%cmake' RPM macro in Fedora actually expands to: | ... | /usr/bin/cmake \ | -S "." \ | -B "redhat-linux-build" \ | ... So in this case the source patch was specified twice. First in the macro with the '-S' option and second time outside of the macro, in the SPECfile, without the '-S' option. CMake upstream declares that: | This has never been officially documented or supported, | but older versions accidentally accepted multiple source paths | and used the last path specified. Update scripts to avoid | passing multiple source path arguments. https://cmake.org/cmake/help/v3.23/release/3.23.html#deprecated-and-removed-features This was discovered as CMake upstream implemented a change to the 3.23.0-rc2 release that changed this behavior and it broke many Fedora packages that used this double source path definition. See rhbz#2057738 to see how build behaved After the CMake upstream got aware of what problems it caused in Fedora, they opened a merge request to restore the behavior to the old one, but kept the warnings that that is an unsupported and problematic behavior: https://gitlab.kitware.com/cmake/cmake/-/issues/23334 --- galera.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index 900f3bf..e17a6da 100644 --- a/galera.spec +++ b/galera.spec @@ -40,7 +40,7 @@ replication engine see http://www.codership.com. %{set_build_flags} -%cmake . \ +%cmake \ -DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \ -DINSTALL_LAYOUT=RPM \ -DCMAKE_RULE_MESSAGES:BOOL=OFF \