Whamcloud - gitweb
LU-9731 Limit work-around to EL7 only 38/28438/2
authorBrian J. Murrell <brian.murrell@intel.com>
Tue, 25 Jul 2017 12:02:24 +0000 (08:02 -0400)
committerJohn L. Hammond <john.hammond@intel.com>
Wed, 16 Aug 2017 20:43:38 +0000 (20:43 +0000)
Since the workaround previously landed for LU-9731 only applies to
EL7, only apply it for EL7 builds.

Lustre-change: https://review.whamcloud.com/28202
Lustre-commit: 950c511276866efb6af8defe49213fd69b8883d2

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: Id74f03f3af74f324320e094e32f7b7480259145c
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28438
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
contrib/lbuild/lbuild
contrib/lbuild/lbuild-rhel7

index 0cf39ba..8be0cfa 100755 (executable)
@@ -933,16 +933,11 @@ 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
+
+    if type -p apply_kmod_requires; then
+        apply_kmod_requires
+    fi
+
     make rpms 2>&1 ||
         fatal 1 "Error building rpms for $BUILD_ARCHS."
 
index 68c2400..d824b5b 100644 (file)
@@ -108,3 +108,16 @@ kernel_srpm_location() {
 cleanup_rpmmacros() {
        sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC
 }
+
+apply_kmod_requires() {
+    # 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
+}