# 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+=".1" # refactor both rhel5 and rhel6
+BUILD_GEN+=".0" # TT-107: don't cache the BUILD dir (reset major to 5)
DEVEL_KERNEL_TYPE="devel"
RPM_HELPERS_DIR="/usr/lib/rpm/redhat"
fi
# XXX - need to figure this kabichk crap out -- it fails the build
- rpmbuildopt="$rpmbuildopt --without kabichk"
+ if ! $USE_KABI; then
+ rpmbuildopt="$rpmbuildopt --without kabichk"
+ fi
# get any release specific build options
rpmbuildopt="$rpmbuildopt $(get_rpmbuildopts)"
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/${BUILD_ARCHS# }/kernel-${lnxmaj}-${lnxrel}${buildid}.${BUILD_ARCHS# }.rpm"
+ rpmcfg=$(rpm -qpl $rpmname | grep '/boot/config-')
+ rpm2cpio $rpmname | cpio -id .$rpmcfg
+ diff -u $CONFIG_FILE .$rpmcfg
+ rm -rf .$rpmcfg
+
return 0
}
return 0
}
+
+# this of course requires a sudo rule on the builder for real RHEL:
+# hudson ALL= NOPASSWD: /usr/bin/yumdownloader
+# also must disable the requiretty attribute in the sudoers file
+find_linux_rpm-rhel() {
+ local prefix="$1"
+ local wanted_kernel="$2"
+ local pathtorpms=${3:-"${KERNELRPMSBASE}/${lnxmaj}/${DISTRO}/${TARGET_ARCH}"}
+
+ local tmpdir=$(mktemp -d $pathtorpms/yumXXXXXX)
+ local sudo=""
+ if [ "$(lsb_release -s -i)" = "RedHatEnterpriseServer" ]; then
+ sudo="sudo"
+ fi
+ $sudo yumdownloader --destdir "$tmpdir" kernel-devel-"$wanted_kernel" > /dev/null
+ local rpm=$(cd $tmpdir; echo *)
+ mv "$tmpdir/$rpm" "$pathtorpms"
+ rmdir $tmpdir
+ echo "$rpm"
+
+ return 0
+
+}