From 65e9951b9e96574883d957a0896de9e3f90a3575 Mon Sep 17 00:00:00 2001 From: Minh Diep Date: Tue, 9 Apr 2024 08:49:23 -0700 Subject: [PATCH] EX-8779 build: enable build kernel_abi_stablelists To build kernel_abi_stablelists, we need to rebuild with noarch Test-Parameters: trivial Change-Id: I0f8abfa9a4a20539ffd0faa9ad70037fd4ef1685 Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54711 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Alex Deiter Reviewed-by: Andreas Dilger --- contrib/lbuild/lbuild-rhel | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/contrib/lbuild/lbuild-rhel b/contrib/lbuild/lbuild-rhel index b7e8e9c..e8cfe13 100644 --- a/contrib/lbuild/lbuild-rhel +++ b/contrib/lbuild/lbuild-rhel @@ -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 } -- 1.8.3.1