mkdir $RPMTOPDIR/BUILD/
rpm -ivh $KERNELDIR/$SRPM --define "_topdir $RPMTOPDIR" || \
{ rm -rf $RPMTOPDIR; fatal 1 "Error installing kernel SRPM."; }
- $RPMBUILD -bp --nodeps --target i686 $RPMTOPDIR/SPECS/$SPEC --define "_topdir $RPMTOPDIR"
+ $RPMBUILD -bp --nodeps --target i686 $RPMTOPDIR/SPECS/$SPEC --define "_topdir $RPMTOPDIR" 2>&1
pushd $RPMTOPDIR/BUILD/kernel-${lnxmaj}/linux-${lnxmaj} && {
make mrproper
cp configs/kernel-${lnxmaj}-i686-smp.config .config
pack_linux() {
TARBALL="$(readlink linux)-$EXTRA_VERSION.tar.gz"
echo "Creating patched linux tarball $TARBALL..."
- tar zcf "$TARBALL" "$(readlink linux)" \
- --exclude "CVS" --exclude ".cvsignore" || \
+ tar -zcf "$TARBALL" "$(readlink linux)" \
+ --exclude "CVS" --exclude ".cvsignore" \
--exclude "*.orig" --exclude "*~" --exclude "*.rej" || \
fatal 1 "Error creating patched Linux tarball."
}
$RPMBUILD $targets $rpmbuildopt lustre-kernel-2.4.spec \
--define "_tmppath $TMPDIR" \
- --define "_topdir $TOPDIR" || \
+ --define "_topdir $TOPDIR" 2>&1 || \
fatal 1 "Error building rpms for $BUILD_ARCHS."
if $DO_SRC; then
$RPMBUILD -bs lustre-kernel-2.4.spec \
--define "_tmppath $TMPDIR" \
- --define "_topdir $TOPDIR" || \
+ --define "_topdir $TOPDIR" 2>&1 || \
fatal 1 "Error building .src.rpm."
fi
< $ldiskfs_spec \
> ../lustre-ldiskfs.spec
- $RPMBUILD $targets $rpmbuildopt ../lustre-ldiskfs.spec \
- --define "_tmppath /var/tmp" \
- --define "_topdir $TOPDIR"
- if [ "$?" != "0" ] ; then
+ if ! $RPMBUILD $targets $rpmbuildopt ../lustre-ldiskfs.spec \
+ --define "_tmppath /var/tmp" \
+ --define "_topdir $TOPDIR" 2>&1; then
popd
return 255
fi
if $DO_SRC; then
- $RPMBUILD -bs ../lustre-ldiskfs.spec \
- --define "_tmppath /var/tmp" \
- --define "_topdir $TOPDIR"
- if [ "$?" != "0" ] ; then
+ if ! $RPMBUILD -bs ../lustre-ldiskfs.spec \
+ --define "_tmppath /var/tmp" \
+ --define "_topdir $TOPDIR" 2>&1; then
popd
return 255
fi
# default to source type -source and special case below
local type=-source
case "$DISTRO" in
- rhel* | fc*)
+ rhel*)
type=-devel
;;
esac
if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then
$rpmfound && build_kernel_ib
fi
- ( $rpmfound ) && build_lustre "$LINUX" && buildsuccess=true && find_linux_source_rpm
+ ( $rpmfound ) && build_lustre && buildsuccess=true && find_linux_source_rpm
fi
if $buildsuccess; then