Skip to content
Snippets Groups Projects
Commit 7971dec1 authored by Brian J. Murrell's avatar Brian J. Murrell
Browse files

Try to avoid a race where two rpmbuilds on the same node are trying to stage

the same rpm -- which ends up happening in the same directory. In order for
this race avoidance to work, the caller has to supply a unique TMPDIR which
rpmbuild will use at it's _tmpdir. Default to /var/tmp if not supplied.
parent e0c78749
No related merge requests found
......@@ -18,6 +18,7 @@ CONFIGURE_FLAGS=
EXTERNAL_PATCHES=
EXTRA_VERSION=
STAGEDIR=
TMPDIR=${TMPDIR:-"/var/tmp"}
# from target file
KERNEL=
......@@ -545,11 +546,13 @@ build_kernel()
done
$RPMBUILD $targets -bb lustre-kernel-2.4.spec \
--define "_tmpdir $TMPDIR" \
--define "_topdir $TOPDIR" || \
fatal 1 "Error building rpms for $BUILD_ARCHS."
if (( $DO_SRC )) ; then
$RPMBUILD -bs lustre-kernel-2.4.spec \
--define "_tmpdir $TMPDIR" \
--define "_topdir $TOPDIR" || \
fatal 1 "Error building .src.rpm."
fi
......@@ -575,6 +578,7 @@ build_lustre()
./configure "--with-linux=${LINUX}" ${CONFIGURE_FLAGS}
$RPMBUILD $targets -bb build/lustre.spec \
--define "_tmpdir $TMPDIR" \
--define "_topdir $TOPDIR" || \
fatal 1 "Error building rpms for $BUILD_ARCHS."
......
......@@ -10,6 +10,7 @@ TARGET_ARCH=
TARGET_CONFIG=
JOBS=1
CONFIGURE_FLAGS=
TMPDIR=${TMPDIR:-"/var/tmp"}
# commands to run
BUILD_LUSTRE=0
......@@ -492,6 +493,7 @@ build_lustre()
< build/lustre.spec.in \
> build/lustre.spec
$RPMBUILD --target ${TARGET_ARCH} -bb build/lustre.spec \
--define "_tmpdir $TMPDIR" \
--define "_topdir $(lbuild_topdir)" || \
fatal 1 "Error building Lustre rpms."
# $MAKE_J "$MAKE_CC" || fatal 1 "Error building Lustre."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment