- pushd $TOPDIR >/dev/null
-
- # create the buildid
- local buildid="_lustre${EXTRA_VERSION##*_lustre}"
-
- # edit the SPEC with our changes
- patch_spec
-
- popd >/dev/null
-
- # this concept of being able to build a list of targets with a single
- # lbuild is a fine idea, but in reality I think it's (very) broken. I
- # don't even think the lustre.spec can handle being called with "--target
- # <multiple arches>". It certainly can't handle the issue where each
- # arch has it's own kernel location.
- # but we will do the best we can and put the plumbing in place so that
- # this could work when the other broken bits are fixed.
- # in reality, our current use of lbuild only ever has a single arch in
- # $BUILD_ARCHS
- local arch
- local targets=""
- for arch in $BUILD_ARCHS; do
- # XXX - ok. so here's a hack that needs to be fixed properly
- # ppc64 was merged to ppc some time ago pre 2.6.18
- if [ $arch = ppc64 ]; then
- arch=ppc
- fi
- targets="--target $arch $targets"
- # copy our .config into the RPM build tree
- (echo "# $(basearch $arch)"; cat $CONFIG_FILE) > \
- SOURCES/kernel-$lnxmaj-$arch.config
-
- # XXX - hackity hack -- until we get (or generate from the base
- # config) configs for xen and debug
- local f=""
- for f in SOURCES/kernel-${lnxmaj}-*.config; do
- grep -q "^CONFIG_SD_IOSTATS=y" $f || \
- echo "CONFIG_SD_IOSTATS=y" >> $f
- done
- done
+ pushd $TOPDIR >/dev/null
+ # create the buildid
+ if $ENABLE_KERNEL_DEBUG; then
+ local buildid="_lustre_debug${EXTRA_VERSION##*_lustre}"
+ else
+ local buildid="_lustre${EXTRA_VERSION##*_lustre}"
+ fi
+
+ # edit the SPEC with our changes
+ patch_spec
+ popd >/dev/null
+
+ # copy our .config into the RPM build tree
+ (echo "# $(basearch ${TARGET_ARCH})"; cat $CONFIG_FILE) > \
+ SOURCES/kernel-$lnxmaj-${TARGET_ARCH}.config
+
+ # XXX - hackity hack -- until we get (or generate from the base
+ # config) configs for xen and debug
+ local f=""
+ for f in SOURCES/kernel-${lnxmaj}-*.config; do
+ grep -q "^CONFIG_SD_IOSTATS=y" $f || \
+ echo "CONFIG_SD_IOSTATS=y" >> $f
+ done