RPMBINARGS="$RPMBINARGS --without crypto"
AC_SUBST(ENABLE_CRYPTO, no)
fi
+if test x$enable_multiple_lnds = xyes ; then
+ RPMBINARGS="$RPMBINARGS --with multiple_lnds"
+else
+ RPMBINARGS="$RPMBINARGS --without multiple_lnds"
+fi
+if test x$EXTERNAL_KO2IBLND = xyes ; then
+ RPMBINARGS="$RPMBINARGS --with mofed"
+else
+ RPMBINARGS="$RPMBINARGS --without mofed"
+fi
+if test x$BUILT_IN_KO2IBLND = xyes ; then
+ RPMBINARGS="$RPMBINARGS --with o2ib"
+else
+ RPMBINARGS="$RPMBINARGS --without o2ib"
+fi
+if test x$KFILND = xkfilnd ; then
+ RPMBINARGS="$RPMBINARGS --with kfi"
+else
+ RPMBINARGS="$RPMBINARGS --without kfi"
+fi
+if test x$ENABLE_GNI = xyes ; then
+ RPMBINARGS="$RPMBINARGS --with gni"
+else
+ RPMBINARGS="$RPMBINARGS --without gni"
+fi
if test x$enable_iokit != xyes ; then
RPMBINARGS="$RPMBINARGS --without lustre_iokit"
fi
%bcond_without manpages
%bcond_without shared
%bcond_without static
-%bcond_with systemd
-%bcond_with mofed
+%bcond_with systemd
%bcond_without mpi
%bcond_with kabi
+%bcond_with multiple_lnds
+%bcond_with mofed
+%bcond_without o2ib
+%bcond_with kfi
+%bcond_with gni
+
+%if %{with multiple_lnds}
+%global enable_multi_lnds 1
+%endif
# LUTF Turn off brp-python-precompile script as we don't want the python files
# to be compiled on installation
Source8: kmp-lustre-tests.files
Source9: find-provides
Source10: find-provides.ksyms
+Source11: kmp-lnet-socklnd.preamble
+Source12: kmp-lnet-socklnd.files
+Source13: kmp-lnet-o2iblnd.preamble
+Source14: kmp-lnet-o2iblnd.files
+Source15: kmp-lnet-gnilnd.preamble
+Source16: kmp-lnet-gnilnd.files
+Source17: kmp-lnet-kfilnd.preamble
+Source18: kmp-lnet-kfilnd.files
+Source19: kmp-lnet-in-kernel-o2iblnd.preamble
+Source20: kmp-lnet-in-kernel-o2iblnd.files
URL: https://wiki.whamcloud.com/
BuildRoot: %{_tmppath}/lustre-%{version}-root
%if %{with lustre_modules}
%endif
%endif
+%if %{with multiple_lnds}
+# begin multiple_lnds
+%kernel_module_package -n %{name}-lnet-socklnd -p %SOURCE11 -f %SOURCE12 %{_flavor}
+%if %{with o2ib}
+## re-write post/preun generated by kmodtool [ls -s and rm -f]
+%define inkernmod %{modules_fs_path}/%{lustre_name}/net/in-kernel-ko2iblnd.ko
+%define inkernsym %{modules_fs_path}/%{lustre_name}/net/ko2iblnd.ko
+%define ofed_module_package %{expand:%(
+TMPFILE=`mktemp`
+cat <<EOF > $TMPFILE
+%kernel_module_package -n %{name}-lnet-in-kernel-o2iblnd -p %SOURCE19 -f %SOURCE20 %{_flavor}
+EOF
+sed -i -e '/^%%post.*/a ln -sf %{inkernmod} %{inkernsym}' -e '/^%%preun.*/a rm -f %{inkernsym}' $TMPFILE
+echo $TMPFILE
+)}
+%{expand:%(cat '%{ofed_module_package}')}
+%endif
+%if %{with mofed}
+%kernel_module_package -n %{name}-lnet-o2iblnd -p %SOURCE13 -f %SOURCE14 %{_flavor}
+%endif
+%if %{with gni}
+%kernel_module_package -n %{name}-lnet-gnilnd -p %SOURCE15 -f %SOURCE16 %{_flavor}
+%endif
+%if %{with kfi}
+%kernel_module_package -n %{name}-lnet-kfilnd -p %SOURCE17 -f %SOURCE18 %{_flavor}
+%endif
+# end multiple_lnds
+%endif
+
%if %{with lustre_iokit}
%package -n lustre-iokit
Summary: Collection of benchmark tools for a cluster with the Lustre file system
# mpi
%endif
+WITH_O2IB=""
%if %{with mofed}
o2ib_path=$(find /usr/src/ofa_kernel/ -type d -name ofed_scripts | xargs dirname)
if [ -z "$o2ib_path" ]; then
echo "ERROR: multiple OFED versions installed"
exit 1
fi
+ WITH_O2IB="--with-o2ib=${o2ib_path}"
+%else
+%if %{without o2ib}
+ WITH_O2IB="--with-o2ib=no"
+%endif
%endif
%eval_configure $CONFIGURE_ARGS \
%{!?with_manpages:--disable-manpages} \
%{!?with_systemd:--with-systemdsystemunitdir=no} \
%{?with_systemd:--with-systemdsystemunitdir=%{_unitdir}} \
- %{?with_mofed:--with-o2ib=$o2ib_path} \
+ %{?with_multiple_lnds:--enable-multiple-lnds} \
+ %{?with_kfi:--with-kfi=/usr/src/cray-kfabric/default} \
+ %{?with_gni:--enable-gni} \
+ ${WITH_O2IB} \
--with-linux=%{kdir} \
--with-linux-obj=%{kobjdir} \
--with-kmp-moddir=%{kmoddir}/%{name}
--- /dev/null
+%defattr(-,root,root)
+%dir %{modules_fs_path}/%{lustre_name}/net
+%{modules_fs_path}/%{lustre_name}/net/kgnilnd.ko
--- /dev/null
+Summary: Lustre LNet gnilnd
+License: GPL-2.0-only
+%if 0%{?suse_version} > 1
+Requires: kernel-%1
+%endif
+Provides: %{name}-lnet-gnilnd = %{version}
+Obsoletes: %{name}-lnet-gnilnd < %{version}
--- /dev/null
+%defattr(-,root,root)
+%dir %{modules_fs_path}/%{lustre_name}/net
+%{modules_fs_path}/%{lustre_name}/net/in-kernel-ko2iblnd.ko
--- /dev/null
+Summary: Lustre LNet o2iblnd for in-kernel OFED
+License: GPL-2.0-only
+%if 0%{?suse_version} > 1
+Requires: kernel-%1
+%endif
+Provides: %{name}-lnet-in-kernel-o2iblnd = %{version}
+Obsoletes: %{name}-lnet-in-kernel-o2iblnd < %{version}
+# Common package name
+Provides: %{name}-lnet-o2iblnd = %{version}
+Obsoletes: %{name}-lnet-o2iblnd < %{version}
--- /dev/null
+%defattr(-,root,root)
+%dir %{modules_fs_path}/%{lustre_name}/net
+%{modules_fs_path}/%{lustre_name}/net/kkfilnd.ko
--- /dev/null
+Summary: Lustre LNet kfilnd
+License: GPL-2.0-only
+%if 0%{?suse_version} > 1
+Requires: kernel-%1
+%endif
+Provides: %{name}-lnet-kfilnd = %{version}
+Obsoletes: %{name}-lnet-kfilnd < %{version}
--- /dev/null
+%defattr(-,root,root)
+%dir %{modules_fs_path}/%{lustre_name}/net
+%{modules_fs_path}/%{lustre_name}/net/ko2iblnd.ko
--- /dev/null
+Summary: Lustre LNet o2iblnd for 3rd party OFED
+License: GPL-2.0-only
+%if 0%{?suse_version} > 1
+Requires: kernel-%1
+%endif
+Provides: %{name}-lnet-o2iblnd = %{version}
+Obsoletes: %{name}-lnet-o2iblnd < %{version}
+Conflicts: %{name}-lnet-in-kernel-o2iblnd
--- /dev/null
+%defattr(-,root,root)
+%dir %{modules_fs_path}/%{lustre_name}/net
+%{modules_fs_path}/%{lustre_name}/net/ksocklnd.ko
--- /dev/null
+Summary: Lustre LNet socklnd
+License: GPL-2.0-only
+%if 0%{?suse_version} > 1
+Requires: kernel-%1
+%endif
+Provides: %{name}-lnet-socklnd = %{version}
+Obsoletes: %{name}-lnet-socklnd < %{version}
%defattr(-,root,root)
%dir %{modules_fs_path}
%dir %{modules_fs_path}/%{lustre_name}
+%if 0%{?enable_multi_lnds} > 0
+%dir %{modules_fs_path}/%{lustre_name}/fs
+%dir %{modules_fs_path}/%{lustre_name}/net
+%{modules_fs_path}/%{lustre_name}/fs/*
+%{modules_fs_path}/%{lustre_name}/net/libcfs.ko
+%{modules_fs_path}/%{lustre_name}/net/lnet.ko
+%{modules_fs_path}/%{lustre_name}/net/lnet_selftest.ko
+%else
%{modules_fs_path}/%{lustre_name}/*
+%endif
%doc COPYING
%doc ChangeLog-lustre
%doc ChangeLog-lnet