From 9cb436ec7c468089a5212675345940be4e25615c Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Thu, 5 Mar 2026 13:14:21 +0100 Subject: [PATCH] Enable RDMA module Resolves: RHEL-153641 Fedora commit: https://src.fedoraproject.org/rpms/valkey/c/dca0ff1ce16e0e0a1a776ae93d87a4bf101c751e?branch=f43 https://src.fedoraproject.org/rpms/valkey/c/3fc3880de4c245ba215e21dd103cedd8563c5151?branch=f43 --- valkey.spec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/valkey.spec b/valkey.spec index ec882de..3b3e1e8 100644 --- a/valkey.spec +++ b/valkey.spec @@ -34,6 +34,7 @@ BuildRequires: tcl BuildRequires: pkgconfig(libsystemd) BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros +BuildRequires: rdma-core-devel BuildRequires: openssl-devel Requires: logrotate # from deps/hiredis/hiredis.h @@ -85,10 +86,20 @@ You can use Valkey from most programming languages also. Summary: Development header for Valkey module development # Header-Only Library (https://fedoraproject.org/wiki/Packaging:Guidelines) Provides: %{name}-static = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header file required for building loadable Valkey modules. +%package rdma +Summary: RDMA module for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Supplements: %{name} + +%description rdma +%summary. + +See https://valkey.io/topics/RDMA/ %package compat-redis Summary: Conversion script and compatibility symlinks for Redis @@ -151,8 +162,13 @@ echo '# valkey_rpm_conf' >> valkey.conf echo '# valkey-sentinel_rpm_conf' >> sentinel.conf %endif -%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes +%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes BUILD_RDMA=module +: RDMA configuration file +cat << EOF | tee rdma.conf +# RDMA module +loadmodule %{valkey_modules_dir}/rdma.so +EOF %build %make_build %{make_flags} @@ -201,6 +217,10 @@ install -pDm644 %{S:8} %{buildroot}%{_rpmmacrodir}/macros.%{name} # compat script install -Dpm 755 %{S:9} %{buildroot}%{_libexecdir}/migrate_redis_to_valkey.sh +# RDMA module +install -pm755 src/valkey-rdma.so %{buildroot}%{valkey_modules_dir}/rdma.so +install -pm640 rdma.conf %{buildroot}%{valkey_modules_cfg}/rdma.conf + %check %if %{with tests} @@ -257,6 +277,9 @@ taskset -c 1 ./runtest --clients 50 --skiptest "Active defrag - AOF loading" %{_sysusersdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf +%files rdma +%attr(0640, valkey, root) %config(noreplace) %{valkey_modules_cfg}/rdma.conf +%{valkey_modules_dir}/rdma.so %files devel # main package is not required