Whamcloud - gitweb
EX-8779 build: enable build kernel_abi_stablelists
authorMinh Diep <mdiep@whamcloud.com>
Tue, 9 Apr 2024 15:49:23 +0000 (08:49 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 27 Apr 2024 22:32:32 +0000 (22:32 +0000)
To build kernel_abi_stablelists, we need to rebuild with noarch

Test-Parameters: trivial

Change-Id: I0f8abfa9a4a20539ffd0faa9ad70037fd4ef1685
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54711
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Alex Deiter
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
contrib/lbuild/lbuild-rhel

index b7e8e9c..e8cfe13 100644 (file)
@@ -4,10 +4,7 @@
 # to build built for all releases of this distribution (only -- if you want
 # to force a kernel build on all distributions, update the BUILD_GEN variable
 # in build/lbuild)
-#BUILD_GEN+=".0"
-#BUILD_GEN+=".1"       # refactor both rhel5 and rhel6
-#BUILD_GEN+=".0"       # TT-107: don't cache the BUILD dir (reset major to 5)
-BUILD_GEN+=".2"        # LU-9850
+BUILD_GEN+=".2"
 
 DEVEL_KERNEL_TYPE="devel"
 RPM_HELPERS_DIR="/usr/lib/rpm/redhat"
@@ -98,16 +95,27 @@ prepare_and_build_srpm() {
                return 1
        fi
 
-    # for informative purposes, display a diff between the .config that
-    # was actually built and what we proposed as a .config
-    echo "Diffs between $(basename $CONFIG_FILE) and the built kernel's .config:"
-    local rpmname="$TOPDIR/RPMS/${TARGET_ARCH}/kernel-${lnxmaj}-${lnxrel}${buildid}.${TARGET_ARCH}.rpm"
-    rpmcfg=$(rpm -qpl $rpmname | grep '/boot/config-')
-    rpm2cpio $rpmname | cpio -id .$rpmcfg
-    diff -u $CONFIG_FILE .$rpmcfg
-    rm -rf .$rpmcfg
+       # for informative purposes, display a diff between the .config that
+       # was actually built and what we proposed as a .config
+       echo "Diffs between $(basename $CONFIG_FILE) and the built kernel's .config:"
+       local rpmname="$TOPDIR/RPMS/${TARGET_ARCH}/kernel-${lnxmaj}-${lnxrel//_*}${buildid}.${TARGET_ARCH}.rpm"
+       local srcrpmname="$TOPDIR/SRPMS/kernel-${lnxmaj}-${lnxrel//_*}${buildid}.src.rpm"
+       rpmcfg=$(rpm -qpl $rpmname | grep '/boot/config-')
 
-    return 0
+       rpm2cpio $rpmname | cpio -id .$rpmcfg
+       diff -u $CONFIG_FILE .$rpmcfg
+       rm -rf .$rpmcfg
+
+       # now build kernel-abi-stablelists
+       if ! eval rpmbuild --rebuild --target noarch --without doc \
+               --define \"_topdir $TOPDIR\" \
+               ${buildid:+--define \"buildid $buildid\"} \
+               --define \"_tmppath $TMPDIR\" \
+               $srcrpmname 2>&1; then
+               return 1
+       fi
+
+       return 0
 
 }