mariadb/SOURCES/mariadb-libfmt.patch
2026-05-21 03:17:43 -04:00

38 lines
2.0 KiB
Diff

MariaDB upstream uses an old version (8.0) of the FMT library, unlike Fedora which packs a current one (10.2)
https://src.fedoraproject.org/rpms/fmt
https://github.com/MariaDB/server/blob/10.11/cmake/libfmt.cmake#L18
There is a breaking change between the FMT library version 8 and 10.
Sergei Golubchik from MariaDB upstream noticed that and decided to not rebase to the newer version for now. In the same commit:
https://github.com/MariaDB/server/commit/b5c367cd88e37091ab5f8dab0396c01c97d037e2
He also fixed the CMake file controlling the FMT library.
It now correctly detects, whether the system version is able to compile a given code in an expected way.
The incompatibility between FMT library version has been reported both agains Fedora and FMT upstream
https://bugzilla.redhat.com/show_bug.cgi?id=2266807
The upstream created a patch and Fedora backported it
https://src.fedoraproject.org/rpms/fmt/c/7d6d6e2c33e845b3cbf3fcaf83f14dfeddfa8a70?branch=rawhide
but only in F40 and later.
To avoid potential issues on systems with FMT library between 8.0 and the one with the fix backported,
introduce a bundling mechanism for use on such distributions.
We pre-download the sources archive and supply the CMake with it, instead of the web URL.
This patch is not used at the moment as the current version of the fmt package available in f40-f43 is sufficient
therefore we are using it instead of the bundled fmt.
We are still keeping this patch in case it may be needed in the future and because it is needed in rhel
diff -Naur mariadb-11.8.6/cmake/libfmt.cmake mariadb-11.8.6_patched/cmake/libfmt.cmake
--- mariadb-11.8.6/cmake/libfmt.cmake 2026-01-31 14:27:46.000000000 +0100
+++ mariadb-11.8.6_patched/cmake/libfmt.cmake 2026-03-24 15:12:55.190229788 +0100
@@ -15,7 +15,7 @@
ExternalProject_Add(
libfmt
PREFIX "${dir}"
- URL "https://github.com/fmtlib/fmt/releases/download/12.1.0/fmt-12.1.0.zip"
+ URL file:///${dir}/fmt-12.1.0.zip
URL_MD5 028c6979cad96a4260154f091885171a
INSTALL_COMMAND ""
CONFIGURE_COMMAND ""