Whamcloud - gitweb
LU-9731 kmods need to be limited to EL minor release kernel 66/28066/4
authorBrian J. Murrell <brian.murrell@intel.com>
Mon, 17 Jul 2017 16:19:04 +0000 (12:19 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 24 Jul 2017 15:47:38 +0000 (15:47 +0000)
Due to upstream RHBZ#1467319 kmods are not being populated with the full
kabi information needed to find a matching kernel for the kmod.

Until this is fixed, we need to apply a workaround to achieve the same
result.

Test-Parameters: trivial

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: Ib2eab09719c75be8928eaf607efaa2d814baf5f2
Reviewed-on: https://review.whamcloud.com/28066
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
contrib/lbuild/lbuild

index 395265e..0cf39ba 100755 (executable)
@@ -933,6 +933,16 @@ build_lustre() {
 
     ./configure $configure_args $CONFIGURE_FLAGS 2>&1 ||
         fatal 1 "Error in configure."
+    # until we have achieved full kABI compatibility we need to
+    # restrict the kernel range that can be used to the kernel
+    # version from the RHEL minor release
+    # this is supposed to be done for kmods automatically but
+    # RHBZ#1467319 seems to be getting in the way
+    local kver=$(find_linux_release)
+    local linuxversion=${kver%%-*}
+    local linuxrelease=${kver##*-}
+    local kabiminor=${linuxrelease%%.*}
+    echo "Requires:       kernel < $linuxversion-$((kabiminor+1)), kernel >= $linuxversion-$((kabiminor))" >> rpm/kmp-lustre.preamble
     make rpms 2>&1 ||
         fatal 1 "Error building rpms for $BUILD_ARCHS."