From 73fa57764d1f78aa9fad33688ffdd8711a1bb7ae Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 10 Jan 2024 17:32:35 +0100 Subject: [PATCH] [2/2] FMT - Use pre-downloaded bundle of FMT sources --- .gitignore | 1 + mariadb-fmt_bundle.patch | 16 ++++++++++++++++ mariadb.spec | 7 +++++++ sources | 1 + 4 files changed, 25 insertions(+) create mode 100644 mariadb-fmt_bundle.patch diff --git a/.gitignore b/.gitignore index 20870bb..6ab2590 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /*/ /*.rpm /*.tar.gz +/*.zip diff --git a/mariadb-fmt_bundle.patch b/mariadb-fmt_bundle.patch new file mode 100644 index 0000000..a988598 --- /dev/null +++ b/mariadb-fmt_bundle.patch @@ -0,0 +1,16 @@ +Currently, the CMAKE script is able to aither use the system library, or download a bundle. +We don't have FMT as a system library in RHEL, and we can't *download* a bundle during build time. +So we download the bundle ourselves, add it as additional package sources, and redirect the CMAKE +so it would search for it on the correct - local - location. + +--- mariadb-10.11.6/cmake/libfmt.cmake 2023-11-08 16:51:39.000000000 +0100 ++++ mariadb-10.11.6/cmake/libfmt.cmake_patched 2024-01-10 17:29:18.004421343 +0100 +@@ -15,7 +15,7 @@ MACRO(BUNDLE_LIBFMT) + ExternalProject_Add( + libfmt + PREFIX "${dir}" +- URL "https://github.com/fmtlib/fmt/archive/refs/tags/8.0.1.zip" ++ URL "${CMAKE_BINARY_DIR}/bundles/8.0.1.zip" + URL_MD5 e77873199e897ca9f780479ad68e25b1 + INSTALL_COMMAND "" + CONFIGURE_COMMAND "" diff --git a/mariadb.spec b/mariadb.spec index 228ba0f..99f43f2 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -163,6 +163,7 @@ URL: http://mariadb.org License: GPLv2 and LGPLv2 Source0: https://downloads.mariadb.org/interstitial/mariadb-%{version}/source/mariadb-%{version}.tar.gz +Source1: https://github.com/fmtlib/fmt/archive/refs/tags/8.0.1.zip Source2: mysql_config_multilib.sh Source3: my.cnf.in Source6: README.mariadb-docs @@ -215,6 +216,8 @@ Patch9: %{pkgnamepatch}-ownsetup.patch # Patch10: Fix cipher name in the SSL Cipher name test Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch +Patch11: %{pkgnamepatch}-fmt_bundle.patch + BuildRequires: make BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config @@ -741,6 +744,7 @@ rm -r storage/rocksdb/ %patch4 -p1 %patch7 -p1 %patch9 -p1 +%patch11 -p1 # The test in Patch 10 has been recently updated by upstream # and the test was disabled in the testuite run # main.ssl_cipher [ disabled ] MDEV-17184 - Failures with OpenSSL 1.1.1 @@ -764,6 +768,9 @@ cat %{SOURCE52} | tee -a mysql-test/unstable-tests cat %{SOURCE53} | tee -a mysql-test/unstable-tests %endif +mkdir -p %{_vpath_builddir}/bundles +cp %{SOURCE1} %{_vpath_builddir}/bundles/ + cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} \ %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE18} %{SOURCE70} %{SOURCE73} scripts diff --git a/sources b/sources index e41e012..e06df4d 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (mariadb-10.11.6.tar.gz) = 3d77f7be4a26d5a36af56150a5f8ed5e21adeed9bc8ea1bd694e47a25a571bd73468eada7c96e0dfe5a6c81bef625abf71a56d228cf43a738e555e3c0d824a6a +SHA512 (8.0.1.zip) = 53f781e33ffb3bc38d743b81c5755a7d71dce95dcf5cdf23d5b4cf880a8f29189ca1b790272ee8586cbcd552648bae040247e572b2a97cd8b3631c284873f57d