# not in the target file any more
CONFIG=
+# build the lustre-tests rpm?
+LUSTRE_TESTS=true
+
DATE=$(date)
USE_DATESTAMP=1
daily=${OFED_VERSION##$Mmv-}
location="http://www.openfabrics.org/downloads/OFED/ofed-${Mmv}-daily/"
# find the filename for the version for the date specified
- OFED_VERSION=$(curl -s "$location" | sed -nre "/${daily}-/s/.*href=\"OFED-([0-9]+\.[0-9]+-${daily}-[0-9]{4,4}).tgz.*$/\1/p" | tail -1)
+ OFED_VERSION=$(curl -s "$location" | sed -nre "/${daily}-/s/.*href=\"OFED-(${Mmv//./\\.}-${daily}-[0-9]{4,4}).tgz.*$/\1/p" | tail -1)
if [ -z "$OFED_VERSION" ]; then
fatal 1 "Could not determine the filename of the OFED snapshot for ${daily}"
fi
echo NORPM mode. Only compiling.
fi
- # convert the $PATCHLESS boolean to an empty/no-empty boolean
+ # convert the $PATCHLESS boolean to an empty/not-empty boolean
# as silly as this seems, it makes the syntax of the rpmbuild command
# simpler and not need an eval to deal with the quotes in the quotes
local is_patchless=""
if $PATCHLESS; then
is_patchless="yes"
fi
+
+ # ditto for the lustre-tests boolean
+ local lustre_tests=""
+ if ! $LUSTRE_TESTS; then
+ lustre_tests="no"
+ fi
+
$RPMBUILD $targets $rpmbuildopt ../lustre.spec \
${is_patchless:+--define "lustre_name lustre-client"} \
+ ${lustre_tests:+--define "build_lustre_tests 0"} \
+ --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \
--define "_tmppath $TMPDIR" \
--define "_topdir $TOPDIR" 2>&1 || \
fatal 1 "Error building rpms for $BUILD_ARCHS."
for arch in $TARGET_ARCHS_ALL; do
local found_rpm="" rpm
for rpm in ${pathtorpms}/${arch}/*.rpm; do
- if rpm -q --provides -p "$rpm" | grep -q "kernel${prefix} = $wanted_kernel"; then
+ if rpm -q --provides -p "$rpm" 2>&3 | grep -q "kernel${prefix} = $wanted_kernel" 2>&3; then
+
found_rpm="$rpm"
ret=0
break
case "$match_type" in
provides)
# match is any valid ERE (i.e. given to egrep) match
- if rpm -q --provides -p "$file" | egrep -q "$match"; then
+ if rpm -q --provides -p "$file" 2>&3 | egrep -q "$match"; then
echo "$file"
popd >/dev/null
return 0
--define "_tmppath /var/tmp" \
--define "_topdir ${TOPDIR}" \
--define "kernel_obj $linux" \
- ${TOPDIR}/SPECS/mptlinux.spec; then
+ ${TOPDIR}/SPECS/mptlinux.spec 2>&1; then
return 1
fi
if $DO_SRC; then
--define "_tmppath /var/tmp" \
--define "_topdir ${TOPDIR}" \
--define "kernel_obj $linux" \
- ${TOPDIR}/SPECS/mptlinux.spec; then
+ ${TOPDIR}/SPECS/mptlinux.spec 2>&1; then
return 1
fi
fi
--define "_tmppath /var/tmp" \
--define "_topdir ${TOPDIR}" \
--define "kernel_obj $linux" \
- ${TOPDIR}/SPECS/rdac.spec; then
+ ${TOPDIR}/SPECS/rdac.spec 2>&1; then
return 1
fi
if $DO_SRC; then
--define "_tmppath /var/tmp" \
--define "_topdir ${TOPDIR}" \
--define "kernel_obj $linux" \
- ${TOPDIR}/SPECS/rdac.spec; then
+ ${TOPDIR}/SPECS/rdac.spec 2>&1; then
return 1
fi
fi
;;
--)
shift
+ # there are actually some lustre configure flags that we need to
+ # handle ourselves (but we still give them to configure)
+ if [[ \ $@\ == *\ --disable-tests\ * ]]; then
+ LUSTRE_TESTS=false
+ fi
CONFIGURE_FLAGS=$@
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-liblustre --enable-liblustre-tests"
break