prepare_and_build_srpm() {
pushd $TOPDIR >/dev/null
- # seems there is a bug (on Ubuntu at least) where all of the .specs
- # are not put into SPECS
- mv SOURCES/*.spec SPECS/
+ # all of the specs but one are put into SOURCES, so let's just move
+ # the one lone one in SPECS into SOURCES and just reference them from
+ # there
+ mv SPECS/*.spec SOURCES/
# generate our buildid
local buildid="lustre${EXTRA_VERSION##*_lustre}"
# now build it
if ! $RPMBUILD $rpmbuildopt $targets \
--define "_topdir $TOPDIR" \
- $TOPDIR/SPECS/kernel-$RPMSMPTYPE.spec >&2; then
+ $TOPDIR/SOURCES/kernel-$RPMSMPTYPE.spec >&2; then
fatal 1 "Failed to build kernel RPM"
fi
#fi
# for SLES, we also need to build the kernel-source rpm
if ! $RPMBUILD $rpmbuildopt $targets \
--define "_topdir $TOPDIR" \
- $TOPDIR/SPECS/kernel-source.spec >&2; then
+ $TOPDIR/SOURCES/kernel-source.spec >&2; then
fatal 1 "Failed to build kernel source RPM"
fi
local lnxmin="$3"
local arch="$4"
- echo kernel-lustre-${rpmsmptype}-${lnxmaj}${lnxmin}/linux-${lnxmaj}
+ local lustre=""
+ if $KERNEL_LUSTRE_NAMING; then
+ $lustre="-lustre"
+ fi
+ echo kernel${lustre}-${rpmsmptype}-${lnxmaj}${lnxmin}/linux-${lnxmaj}
}