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 <shaun.tancheff@hpe.com>
Change-Id: I33133c112066f9dc07fa568594b93ccb7fccf746
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56446
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Caleb Carlson <caleb.carlson@hpe.com>
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
%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