Whamcloud - gitweb
LU-12214 build: fix build with mofed 26/36426/7
authorAlexey Lyashkov <c17817@cray.com>
Fri, 8 Nov 2019 07:58:29 +0000 (10:58 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 5 Mar 2020 22:36:06 +0000 (22:36 +0000)
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 <c17817@cray.com>
Reviewed-on: https://review.whamcloud.com/36426
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre.spec.in

index 3777f6c..515fe2d 100644 (file)
@@ -15,6 +15,7 @@
 %bcond_without shared
 %bcond_without static
 %bcond_with    systemd
 %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
 
 # 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}
 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
 %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_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}
        --with-linux=%{kdir} \
        --with-linux-obj=%{kobjdir} \
        --with-kmp-moddir=%{kmoddir}/%{name}