From 7831572b3ff9fe3255a97a044f974926bf1c4039 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 10 Jun 2024 13:24:22 +0200 Subject: [PATCH] Enable building FIDO plugin The FIDO authentication plugin is set to OFF by default, for some reason, even when the library is correctly found during the build process. --- mysql8.0.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mysql8.0.spec b/mysql8.0.spec index 9633615..dc835cc 100644 --- a/mysql8.0.spec +++ b/mysql8.0.spec @@ -45,6 +45,13 @@ # those files may create issues %bcond config 0 +# Various plugins +%if 0%{?fedora} +%bcond fido 1 +%else +%bcond fido 0 +%endif + # For deep debugging we need to build binaries with extra debug info %bcond debug 0 @@ -211,7 +218,7 @@ BuildRequires: perl(warnings) BuildRequires: systemd # Since MySQL 8.0.28 -BuildRequires: libfido2-devel +%{?with_fido:BuildRequires: libfido2-devel} Requires: bash coreutils grep Requires: %{pkgname}-common = %{sameevr} @@ -571,7 +578,8 @@ cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} \ -DWITH_ZLIB=system \ -DWITH_RAPIDJSON=bundled \ -DWITH_MECAB=system \ - -DWITH_FIDO=system \ + -DWITH_FIDO=%{?with_fido:system}%{!?with_fido:none} \ + -DWITH_AUTHENTICATION_FIDO=%{?with_fido:ON}%{!?with_fido:OFF} \ -DWITH_BOOST=boost \ -DREPRODUCIBLE_BUILD=OFF \ -DCMAKE_C_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable}" \ @@ -893,6 +901,8 @@ fi %dir %{_libdir}/mysql/plugin %{_libdir}/mysql/plugin/adt_null.so %{_libdir}/mysql/plugin/auth_socket.so +%{?with_fido:%{_libdir}/mysql/plugin/authentication_fido_client.so} +%{?with_fido:%{_libdir}/mysql/plugin/authentication_oci_client.so} %{_libdir}/mysql/plugin/component_audit_api_message_emit.so %{_libdir}/mysql/plugin/component_keyring_file.so %{_libdir}/mysql/plugin/component_log_filter_dragnet.so