diff options
author | Remi Collet <remi@remirepo.net> | 2025-09-30 13:31:47 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-09-30 13:31:47 +0200 |
commit | 2cfee25d57105cd68a27efa7a3b40eb532badcec (patch) | |
tree | cffc688b953209b0cc5d32bacee5521271d1a1a5 | |
parent | 5fe0e06ed6d028165584eaada2e6cee61a13cec5 (diff) |
add sub-package for rdma module
-rw-r--r-- | valkey.spec | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/valkey.spec b/valkey.spec index e41fda6..235639c 100644 --- a/valkey.spec +++ b/valkey.spec @@ -4,12 +4,15 @@ # Tests fail in mock, not in local build. %bcond_with tests +# Enable RDMA module +%bcond_without rdma + # See https://github.com/valkey-io/valkey-doc/tags %global doc_version 8.1.1 Name: valkey Version: 8.1.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A persistent key-value database # valkey: BSD-3-Clause # hiredis: BSD-3-Clause @@ -42,6 +45,9 @@ BuildRequires: systemd-devel BuildRequires: epel-rpm-macros %endif BuildRequires: systemd-rpm-macros +%if %{with rdma} +BuildRequires: rdma-core-devel +%endif BuildRequires: openssl-devel %if %{with docs} # for docs/man pages @@ -113,7 +119,16 @@ BuildArch: noarch License: CC-BY-SA-4.0 %description doc -%summary +%summary. +%endif + +%if %{with rdma} +%package rdma +Summary: RDMA module for %{name} +Supplements: %{name} + +%description rdma +%summary. %endif @@ -154,7 +169,18 @@ cat << 'EOF' | tee macros.%{name} %%valkey_modules_cfg %valkey_modules_cfg EOF -%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes +%if %{with rdma} +%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes BUILD_RDMA=module + +: Configuration file +cat << EOF | tee rdma.conf +# RDMA module +loadmodule %{valkey_modules_dir}/rdma.so +EOF + +%else +%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes BUILD_RDMA=no +%endif %build @@ -228,6 +254,11 @@ install -pDm644 macros.%{name} %{buildroot}%{_rpmmacrodir}/macros.%{name} # Clean-up redis compatibility commands as redis package exists rm %{buildroot}%{_bindir}/redis-* +%if %{with rdma} +install -pm755 src/valkey-rdma.so %{buildroot}%{valkey_modules_dir}/rdma.so +install -pm640 rdma.conf %{buildroot}%{valkey_modules_cfg}/rdma.conf +%endif + %check %if %{with tests} @@ -295,6 +326,13 @@ exit 0 %endif +%if %{with rdma} +%files rdma +%attr(0640, valkey, root) %config(noreplace) %{valkey_modules_cfg}/rdma.conf +%{valkey_modules_dir}/rdma.so +%endif + + %files devel # main package is not required %license COPYING @@ -303,6 +341,9 @@ exit 0 %changelog +* Tue Sep 30 2025 Remi Collet <remi@fedoraproject.org> - 8.1.3-5 +- add sub-package for rdma module + * Wed Aug 27 2025 Remi Collet <remi@fedoraproject.org> - 8.1.3-4 - mising valkey user https://github.com/remicollet/remirepo/issues/315 |