From cd16bfdf42b85c0bfea0586ca1a4ddeb2bdba0d6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 22 Dec 2013 10:05:02 +0000 Subject: [PATCH] scripts/rebuild-rhel-kernel-rpm: Embed '.scst' in the generated kernel RPM names An example for RHEL 6.5: kernel-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm kernel-debuginfo-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm kernel-debuginfo-common-x86_64-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm kernel-devel-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm kernel-firmware-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm kernel-headers-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm perf-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm perf-debuginfo-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm python-perf-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm python-perf-debuginfo-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5173 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/rebuild-rhel-kernel-rpm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/rebuild-rhel-kernel-rpm b/scripts/rebuild-rhel-kernel-rpm index 9a55c9f69..b881fe4db 100755 --- a/scripts/rebuild-rhel-kernel-rpm +++ b/scripts/rebuild-rhel-kernel-rpm @@ -115,6 +115,13 @@ function copy_patch { ln -s "$p" "$2" } +function rpmbuild { + /usr/bin/rpmbuild \ + --define="%_topdir ${rpmbuild_dir}" \ + --define="%buildid .scst" \ + "$@" +} + if [ -e ${rpmbuild_dir} ]; then echo "You have to remove the ${rpmbuild_dir} directory before starting $0" exit 1 @@ -165,7 +172,7 @@ rpm --define="%_topdir ${rpmbuild_dir}" -i ${downloaddir}/${kernel_src_rpm} 2>&1 | grep -v ' does not exist' cd SPECS { - rpmbuild --define="%_topdir ${rpmbuild_dir}" -bp --target=${arch} kernel*.spec + rpmbuild -bp --target=${arch} kernel*.spec rc=$? if [ rc != 0 ]; then exit $rc @@ -320,7 +327,7 @@ log "Rebuilding kernel" cd ${rpmbuild_dir}/SPECS { - rpmbuild --define="%_topdir ${rpmbuild_dir}" -bb --target=${arch} --with baseonly --with firmware --without kabichk kernel*.spec + rpmbuild -bb --target=${arch} --with baseonly --with firmware --without kabichk kernel*.spec rc=$? if [ $rc != 0 ]; then exit $rc