Whamcloud - gitweb
LU-12634 build: Recognize ELRepo -ml mainline kernel 42/35742/5
authorShaun Tancheff <stancheff@cray.com>
Fri, 25 Oct 2019 16:15:00 +0000 (11:15 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:06:52 +0000 (01:06 +0000)
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 <stancheff@cray.com>
Change-Id: If4ae7441d4d023d31b1fb42f3fe90ff9c747c0f8
Reviewed-on: https://review.whamcloud.com/35742
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
config/lustre-build-linux.m4

index 42a9339..2f3db74 100644 (file)
@@ -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)