Whamcloud - gitweb
b=19853
[fs/lustre-release.git] / build / lbuild-sles10
index 6af0643..d2296e0 100644 (file)
@@ -1,16 +1,12 @@
 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
 
-DEVEL_KERNEL_TYPE="source"
+# increment this if you have made a change that should force a new kernel
+# to build built
+BUILD_GEN=1
 
-prepare_and_build_srpm() {
+source ${0%/*}/lbuild-sles
 
-    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}"
+edit_specs() {
 
     # edit the SPECs with our changes
     local spec
@@ -18,6 +14,9 @@ prepare_and_build_srpm() {
         #cp $TOPDIR/SPECS/kernel-$spec.spec{,.orig}
         sed -i -e 's/^\(Name:.*kernel-\)\(.*\)/\1lustre-\2/' \
                -e "s/^Release:.*/&_${buildid}/" \
+               -e "/^Provides:  *kernel = /a\
+Provides:       kernel-$spec = %{version}-%{release}
+" \
                -e "s/^ExclusiveArch:.*/& ppc ppc64/" \
                -e '/^# Apply the patches needed for this architecture\./a\
 cp  %_sourcedir/linux-2.6.16-lustre.patch %_builddir/%{name}-%{version}/lustre.patch\
@@ -37,56 +36,5 @@ curl ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17
                -e 's/ -a 109//' \
           SPECS/kernel-${spec}.spec
      fi
-done
-
-    # 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 temp speedup hack
-#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 SLES10, 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
-
 }