From acd5f520af904aa0e7763ca7f6a05c9d087c22ef Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Fri, 25 Oct 2019 11:15:00 -0500 Subject: [PATCH] LU-12634 build: Recognize ELRepo -ml mainline kernel Add support for identifying ELRepo kernel-ml style builds on CentOS 7 and 8 based distributions Test-Parameters: trivial Cray-bug-id: LUS-7689 Signed-off-by: Shaun Tancheff Change-Id: If4ae7441d4d023d31b1fb42f3fe90ff9c747c0f8 Reviewed-on: https://review.whamcloud.com/35742 Reviewed-by: Andrew Perepechko Tested-by: jenkins Reviewed-by: Petros Koutoupis Tested-by: Maloo Reviewed-by: Oleg Drokin --- config/lustre-build-linux.m4 | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/config/lustre-build-linux.m4 b/config/lustre-build-linux.m4 index 42a9339..2f3db74 100644 --- a/config/lustre-build-linux.m4 +++ b/config/lustre-build-linux.m4 @@ -135,6 +135,24 @@ AC_DEFUN([LB_LINUX_RELEASE], [ ]) ]) + # Check for a ELRepo -ml kernel on RHEL 7/8 + AS_IF([test "x$KERNEL_FOUND" = "xno"], [ + AC_CACHE_CHECK([for ELRepo -ml kernel signature on CentOS], + lb_cv_mainline_kernel_sig, [ + lb_cv_mainline_kernel_sig="no" + AS_IF([fgrep -q '.el7.' $LINUX_OBJ/include/generated/utsrelease.h], [ + lb_cv_mainline_kernel_sig="yes" + ]) + AS_IF([fgrep -q '.el8.' $LINUX_OBJ/include/generated/utsrelease.h], [ + lb_cv_mainline_kernel_sig="yes" + ]) + ]) + AS_IF([test "x$lb_cv_mainline_kernel_sig" = "xyes"], [ + MAINLINE_KERNEL="yes" + KERNEL_FOUND="yes" + ]) + ]) + # If still no kernel was found, a warning is issued AS_IF([test "x$KERNEL_FOUND" = "xno"], [ AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE, Ubuntu nor Debian]) @@ -147,10 +165,11 @@ AC_DEFUN([LB_LINUX_RELEASE], [ [KMP_MODDIR=$withval IN_KERNEL=''],[ AS_IF([test x$RHEL_KERNEL = xyes], [KMP_MODDIR="extra/kernel"], - [test x$SUSE_KERNEL = xyes], [KMP_MODDIR="updates/kernel"], - [test x$UBUNTU_KERNEL = xyes], [KMP_MODDIR="updates/kernel"], - [test x$DEBIAN_KERNEL = xyes], [KMP_MODDIR="updates/kernel"], - [AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE, Ubuntu nor Debian])] + [test x$MAINLINE_KERNEL = xyes], [KMP_MODDIR="extra/kernel"], + [test x$SUSE_KERNEL = xyes], [KMP_MODDIR="updates/kernel"], + [test x$UBUNTU_KERNEL = xyes], [KMP_MODDIR="updates/kernel"], + [test x$DEBIAN_KERNEL = xyes], [KMP_MODDIR="updates/kernel"], + [AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE, Ubuntu nor Debian])] ) IN_KERNEL="${PACKAGE}"]) AC_MSG_RESULT($KMP_MODDIR) -- 1.8.3.1