DATE=$(date)
+USE_DATESTAMP=1
+RPMBUILD=
+
cleanup()
{
true
Also note that by using a non-"base" arch (eg, i386) only kernels
will be built - there will be no lustre-lite-utils package.
+ --disable-datestamp
+ Prevents the datestamp flag (-D) from being passed to cvs for
+ checkouts. This is a workaround for a problem encountered when
+ using lbuild with tinderbox.
+
EOF
# list_targets
# TARGET_FILE="$TOPDIR/kernel_patches/targets/$TARGET.target"
# [ -r "$TARGET_FILE" ] || \
# usage 1 "Target '$TARGET' was not found."
+
+ RPMBUILD=$(which rpmbuild 2>/dev/null | head -1)
+ if [ ! "$RPMBUILD" -o "$RPMBUILD" == "" ]; then
+ RPMBUILD=$(which rpm 2>/dev/null | head -1)
+ if [ ! "$RPMBUILD" -o "$RPMBUILD" == "" ]; then
+ usage 1 "Could not find binary for making rpms (tried rpmbuild and rpm)."
+ fi
+ fi
}
uniqify()
untar "$LUSTRE"
[ -d lustre ] || ln -sf lustre* lustre
else
- cvs -d "$CVSROOT" -qz3 co -D "$DATE" "-r$TAG" -d "$DIRNAME" lustre || \
+ if [ "$USE_DATESTAMP" ]; then
+ DATESTAMP="-D '$DATE'"
+ else
+ DATESTAMP=""
+ fi
+
+ cvs -d "$CVSROOT" -qz3 co $DATESTAMP -r "$TAG" -d "$DIRNAME" lustre || \
fatal 1 "There was an error checking out Lustre from CVS."
echo "Creating lustre tarball..."
tar zcf "$DIRNAME.tar.gz" "$DIRNAME" \
targets="--target $arch $targets"
done
- rpmbuild $targets -bb lustre-kernel-2.4.spec \
+ $RPMBUILD $targets -bb lustre-kernel-2.4.spec \
--define "_topdir $TOPDIR" || \
fatal 1 "Error building rpms for $arch."
- (( $DO_SRC )) && rpmbuild -bs lustre-kernel-2.4.spec \
+ (( $DO_SRC )) && $RPMBUILD -bs lustre-kernel-2.4.spec \
--define "_topdir $TOPDIR" || \
fatal 1 "Error building .src.rpm."
}
[ -r ~/.lbuildrc ] && . ~/.lbuildrc
-options=$(getopt -o d:D:h -l extraversion:,kerneldir:,lustre:,nosrc,publish,release,tag:,target:,target-archs: -- "$@")
+options=$(getopt -o d:D:h -l extraversion:,kerneldir:,lustre:,nosrc,publish,release,tag:,target:,target-archs:,disable-datestamp -- "$@")
eval set -- "$options"
TARGET_ARCHS=$2
shift 2
;;
+ --disable-datestamp)
+ USE_DATESTAMP=
+ shift
+ ;;
--)
shift
CONFIGURE_FLAGS=$@