rebuild-rhel-kernel-rpm: Pass %_topdir to all rpm commands, just to be sure.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4115 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2012-02-05 20:28:38 +00:00
parent 3f2b4e531c
commit 25ccc656d9

View File

@@ -147,14 +147,16 @@ sudo yum-builddep -q -y ${downloaddir}/${kernel_src_rpm}
log "Installing kernel sources in ${rpmbuild_dir}"
cd ${rpmbuild_dir}
{ rpm -i ${downloaddir}/${kernel_src_rpm} 2>&1 \
| grep -v ' does not exist'; }
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
rc=$?; if [ rc != 0 ]; then exit $rc; fi
} 2>&1 \
| tee prep-err.log
rc=$?
if [ rc != 0 ]; then
exit $rc
fi
} 2>&1 | tee prep-err.log
log "Copying SCST patches to the SOURCES directory"
@@ -295,8 +297,13 @@ fi
log "Rebuilding kernel"
cd ${rpmbuild_dir}/SPECS
{ rpmbuild -bb --target=${arch} --with baseonly --with firmware --without kabichk kernel*.spec; rc=$?; if [ $rc != 0 ]; then exit $rc; fi; } 2>&1 \
| tee build.log
{
rpmbuild --define="%_topdir ${rpmbuild_dir}" -bb --target=${arch} --with baseonly --with firmware --without kabichk kernel*.spec
rc=$?
if [ $rc != 0 ]; then
exit $rc
fi
} 2>&1 | tee build.log
log "Ready. You can now install the freshly built kernel RPM as follows:\n"\