From d3e400b086379e46635b0e0057b86b3be0828431 Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Sat, 21 Sep 2024 13:13:08 +0700 Subject: [PATCH] LU-18249 o2iblnd: external mofed driver requires Only the o2iblnd, when built for MOFED, should have an external requires for the external kernel module package. Remove the requires from lustre-* and apply it only to the package that includes the o2ib module when built with MOFED. HPE-bug-id: LUS-12355 Test-Parameters: trivial Signed-off-by: Shaun Tancheff Change-Id: I33133c112066f9dc07fa568594b93ccb7fccf746 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56446 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Petros Koutoupis Reviewed-by: Oleg Drokin Reviewed-by: Jian Yu Reviewed-by: Caleb Carlson --- lustre.spec.in | 12 ------------ rpm/kmp-lustre.preamble | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lustre.spec.in b/lustre.spec.in index fdfef7f..637a1fd 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -303,18 +303,6 @@ BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(libselinux) openssl-devel %endif %if %{with lustre_modules} -%if %{with mofed} -%if 0%{?mofed_source} > 0 -BuildRequires: mlnx-ofa_kernel-devel -%endif -%if %{with multiple_lnds} -%if "%{_vendor}" == "redhat" || 0%{?openEuler} -Requires: kmod-mlnx-ofa_kernel -%else -Requires: mlnx-ofa_kernel-kmp -%endif -%endif -%endif %if %{defined kernel_module_package_buildreqs} BuildRequires: %kernel_module_package_buildreqs %else diff --git a/rpm/kmp-lustre.preamble b/rpm/kmp-lustre.preamble index edb68f0..e5f7cb6 100644 --- a/rpm/kmp-lustre.preamble +++ b/rpm/kmp-lustre.preamble @@ -3,3 +3,18 @@ Requires: kernel-%1 %endif Obsoletes: %{name}-modules < %{version} License: GPL-2.0-only +# When using multiple lnd the requires are in the external ko2iblnd +%if 0%{?enable_multi_lnds} == 0 +%if %{with mofed} +# If not a mofed source install require the devel package +%if 0%{?mofed_source} > 0 +BuildRequires: mlnx-ofa_kernel-devel +%endif +# For dist, require the mofed kernel modules package regardless +%if "%{_vendor}" == "redhat" || "%{_vendor}" == "fedora" || 0%{?openEuler} +Requires: kmod-mlnx-ofa_kernel +%else +Requires: mlnx-ofa_kernel-kmp +%endif +%endif +%endif -- 1.8.3.1