From 4749091e0bbd01a0ecc56c94c5c4ae8ea5622089 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Mon, 25 May 2009 12:32:26 +0000 Subject: [PATCH] Branch b_release_1_8_1 b=18668 Add the lost file for previous patch. --- build/lbuild-sles | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 build/lbuild-sles diff --git a/build/lbuild-sles b/build/lbuild-sles new file mode 100644 index 0000000..5b97064 --- /dev/null +++ b/build/lbuild-sles @@ -0,0 +1,79 @@ +# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: + +DEVEL_KERNEL_TYPE="source" + +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/ + + # generate our buildid + local buildid="lustre${EXTRA_VERSION##*_lustre}" + + # do release specific spec editing + edit_specs + + # XXX - need to flesh this out per the rhel5 method + local targets + for arch in $BUILD_ARCHS; do + targets="--target $arch $targets" + mkdir -p config/$(basearch $arch) + cp $CONFIG_FILE config/$(basearch $arch)/$RPMSMPTYPE + done + + tar cjf SOURCES/config.tar.bz2 config + rm -rf config + + # do we need any special rpm build options + local rpmbuildopt="-bb" + if $DO_SRC; then + rpmbuildopt="-ba" + fi + + # XXX - ignore the kabi changes. need to figure out what this is really + # all about. + touch SOURCES/IGNORE-KABI-BADNESS + + +# XXX testing speedup hack - never let an inspection pass without this +# commented out! in fact it should be removed completely before a +# landing. +#if false; then + # now build it + if ! $RPMBUILD $rpmbuildopt $targets \ + --define "_topdir $TOPDIR" \ + $TOPDIR/SPECS/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 + fatal 1 "Failed to build kernel source RPM" + fi + +} + +devel_kernel_name() { + local lustre=${1:-false} + + if $lustre; then + echo "kernel-lustre-$DEVEL_KERNEL_TYPE" + else + echo "kernel-$DEVEL_KERNEL_TYPE" + fi + +} + +rpm_BUILD_kernel_dirname() { + local rpmsmptype="$1" + local lnxmaj="$2" + local lnxmin="$3" + local arch="$4" + + echo kernel-lustre-${rpmsmptype}-${lnxmaj}${lnxmin}/linux-${lnxmaj} +} -- 1.8.3.1