From 0ce0cd11ac12b9b43b3e0f8a75c180f3e5f48dca Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 28 Apr 2022 14:14:56 +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 --- As for today, this issue is still not yet fully resolved. - The CMake maintainers in Fedora haven't rebased the package to 3.23-1 release, so it is still broken - Affected packages in Fedora should find a way to stop using this unsupported behavior - The double '-S' argument passing should be marked as problematic too, in the exact same way https://gitlab.kitware.com/cmake/cmake/-/issues/23334#note_1159258 - A change to the %cmake Fedora RPM macro might be in play, so it won't force a source path https://gitlab.kitware.com/cmake/cmake/-/issues/23334#note_1159258 I opened a BZ #2079833 to track the progress of the solution by CMake maintainers -- Related: #2092370 --- mariadb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index ff424c2..39cc7a6 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -810,7 +810,7 @@ fi # The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX # so we can't use %%{_datadir} and so forth here. -%cmake . \ +%cmake \ -DBUILD_CONFIG=mysql_release \ -DFEATURE_SET="community" \ -DINSTALL_LAYOUT=RPM \