mariadb11.8/mariadb-libfmt.patch
Pavol Sloboda 09cc0bf635 Rebase to 11.8.5
11.8.4:
Release notes: https://mariadb.com/docs/release-notes/community-server/11.8/11.8.4
Changelog: https://mariadb.com/docs/release-notes/community-server/changelogs/11.8/11.8.4

11.8.5:
Release notes: https://mariadb.com/docs/release-notes/community-server/11.8/11.8.5
Changelog: https://mariadb.com/docs/release-notes/community-server/changelogs/11.8/11.8.5

This update also added the auth_mysql_sha2.so which enables mariadb to
use the mysql_caching_sha2 plugin for authentication. This is meant to
be used when migrating from mysql or connecting using mysql connectors,
both without changing passwords or authentication methods.

Resolves: RHEL-133022
2025-12-03 13:18:14 +01: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.5/cmake/libfmt.cmake mariadb-11.8.5_patched/cmake/libfmt.cmake
--- mariadb-11.8.5/cmake/libfmt.cmake 2025-11-13 09:45:29.000000000 +0100
+++ mariadb-11.8.5_patched/cmake/libfmt.cmake 2025-12-01 15:30:54.285523685 +0100
@@ -15,7 +15,7 @@
ExternalProject_Add(
libfmt
PREFIX "${dir}"
- URL "https://github.com/fmtlib/fmt/releases/download/12.0.0/fmt-12.0.0.zip"
+ URL file:///${dir}/fmt-12.0.0.zip
URL_MD5 9bd04e6e8c5b1733e4eefb473604219d
INSTALL_COMMAND ""
CONFIGURE_COMMAND ""