From: Brian J. Murrell Date: Mon, 17 Jul 2017 16:19:04 +0000 (-0400) Subject: LU-9731 kmods need to be limited to EL minor release kernel X-Git-Tag: 2.10.51~38 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=527b2cd8e593b52326519d13418daf34b6b53b0e LU-9731 kmods need to be limited to EL minor release kernel 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 Change-Id: Ib2eab09719c75be8928eaf607efaa2d814baf5f2 Reviewed-on: https://review.whamcloud.com/28066 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Minh Diep Reviewed-by: Oleg Drokin --- diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild index 395265e..0cf39ba 100755 --- a/contrib/lbuild/lbuild +++ b/contrib/lbuild/lbuild @@ -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."