From 71297fe48a22e806b77d9f44c858d522ca949e03 Mon Sep 17 00:00:00 2001 From: Alexey Lyashkov Date: Fri, 8 Nov 2019 10:58:29 +0300 Subject: [PATCH] LU-12214 build: fix build with mofed add a MOFED / OPA modules dependency to produce a right package. Test-parameters: trivial Cray-bug-id: LUS-6033, LUS-7204 Change-Id: I843762945c5dbb59d53e1913b7382813bfba86ad Signed-off-by: Alexey Lyashkov Reviewed-on: https://review.whamcloud.com/36426 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Serguei Smirnov Reviewed-by: Alexander Boyko Reviewed-by: Oleg Drokin --- lustre.spec.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lustre.spec.in b/lustre.spec.in index 3777f6c..515fe2d 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -15,6 +15,7 @@ %bcond_without shared %bcond_without static %bcond_with systemd +%bcond_with mofed # By default both gss and gss keyring are disabled. # gss keyring requires the gss core. If the builder @@ -167,7 +168,14 @@ BuildRequires: libselinux-devel Requires: libselinux %endif %if %{with lustre_modules} - +%if %{with mofed} +BuildRequires: mlnx-ofa_kernel-devel +%if %{_vendor} == "redhat" +Requires: kmod-mlnx-ofa_kernel +%else +Requires: mlnx-ofa_kernel-kmp +%endif +%endif %if 0%{?rhel} >= 8 && %{undefined kernel_module_package_buildreqs} BuildRequires: redhat-rpm-config kernel-rpm-macros elfutils-libelf-devel kmod %else @@ -384,6 +392,7 @@ fi %{!?with_manpages:--disable-manpages} \ %{!?with_systemd:--with-systemdsystemunitdir=no} \ %{?with_systemd:--with-systemdsystemunitdir=%{_unitdir}} \ + %{?with_mofed:--with-o2ib=/usr/src/ofa_kernel/default} \ --with-linux=%{kdir} \ --with-linux-obj=%{kobjdir} \ --with-kmp-moddir=%{kmoddir}/%{name} -- 1.8.3.1