Whamcloud - gitweb
Remove files that moved to lustre-build
authorjacob <jacob>
Mon, 20 Dec 2004 00:51:35 +0000 (00:51 +0000)
committerjacob <jacob>
Mon, 20 Dec 2004 00:51:35 +0000 (00:51 +0000)
lustre/scripts/branch.sh [deleted file]
lustre/scripts/land1.sh [deleted file]
lustre/scripts/land2.sh [deleted file]
lustre/scripts/lbuild [deleted file]
lustre/scripts/lmake [deleted file]
lustre/scripts/lustre-kernel-2.4.spec.in [deleted file]
lustre/scripts/lustre.spec.in [deleted file]
lustre/scripts/merge1.sh [deleted file]
lustre/scripts/merge2.sh [deleted file]

diff --git a/lustre/scripts/branch.sh b/lustre/scripts/branch.sh
deleted file mode 100755 (executable)
index 5240fa9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh -e 
-CVS=${CVS:-cvs}
-
-if [ $# != 2 ]; then
-    echo "This creates a new branch in CVS. Usage: $0 parent child"
-    exit
-fi
-
-parent=$1
-child=$2
-CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
-date=`date +%Y%m%d_%H%M`
-module=lustre
-
-case $parent in
-  HEAD) : ;;
-  b_*|b1*) : ;;
-  *) parent="b_$parent" ;;
-esac
-case $child in
-  HEAD) : ;;
-  b_*|b1*) : ;;
-  *) child="b_$child"
-esac
-
-if [ "$parent" != "HEAD" -a "`cat CVS/Tag`" != "T$parent" ]; then
-       echo "This script must be run within the $parent branch"
-       exit 1
-fi
-
-echo parent: $parent CHILD: $CHILD child: $child date: $date
-
-echo -n "tagging $parent as '${CHILD}_BASE_$date' ..."
-$CVS rtag -r $parent ${CHILD}_BASE_$date $module
-echo "done"
-echo -n "tagging ${CHILD}_BASE_$date as '${CHILD}_BASE' ...."
-$CVS rtag -r ${CHILD}_BASE_$date ${CHILD}_BASE $module
-echo "done"
-echo -n "branching $child at ${CHILD}_BASE' ...."
-$CVS rtag -b -r ${CHILD}_BASE $child $module
-echo "done"
-echo -n "updating to $child ...."
-$CVS update -r $child
-echo "done"
diff --git a/lustre/scripts/land1.sh b/lustre/scripts/land1.sh
deleted file mode 100755 (executable)
index 98fd721..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/bin/sh -e 
-
-CONFLICTS=cvs-merge-conflicts
-CVS=cvs
-
-if [ -f .mergeinfo ] ; then
-    echo ".mergeinfo exists - clean up first"
-    exit 
-fi
-
-if [ -f $CONFLICTS ] ; then
-    echo "$CONFLICTS exists - clean up first"
-    exit 
-fi
-
-if [ $# -lt 2 -o $# -gt 3 ]; then
-    echo "This is phase 1 of merging branches. Usage: $0 parent child [dir]"
-    exit
-fi
-
-parent=$1
-PARENT=`echo $parent | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
-child=$2
-CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
-date=`date +%Y%m%d_%H%M`
-module=lustre
-
-case $parent in
-  HEAD) : ;;
-  b_*|b[1-4]*) : ;;
-  *) parent="b_$parent" ;;
-esac
-case $child in
-  HEAD) : ;;
-  b_*|b[1-4]*) : ;;
-  *) child="b_$child"
-esac
-
-if [ "$parent" != "HEAD" -a "`cat CVS/Tag 2> /dev/null`" != "T$parent" ]; then
-        echo "$0: this script must be run within the $parent branch"
-       exit 1
-fi
-
-TEST_FILE=${TEST_FILE:-ChangeLog} # does this need to be smarter?
-check_tag() {
-       [ -z "$1" ] && echo "check_tag() missing arg" && exit3
-       [ "$1" = "HEAD" ] && return
-       $CVS log $TEST_FILE 2> /dev/null | grep -q "    $1: " && return
-       echo "$0: tag $1 not found in $TEST_FILE"
-       exit 2
-}
-
-check_tag $child
-check_tag ${CHILD}_BASE
-
-dir=$3
-
-cat << EOF > .mergeinfo
-parent=$parent
-PARENT=$PARENT
-child=$child
-CHILD=$CHILD
-date=$date
-module=$module
-dir=$dir
-CONFLICTS=$CONFLICTS
-OPERATION=Land
-OPERWHERE=onto
-EOF
-
-echo PARENT $PARENT parent $parent CHILD $CHILD child $child date $date
-
-# Update your tree to the PARENT branch; HEAD is not really a branch, so you
-# need to update -A instead of update -r HEAD, or the commit will fail. -p
-echo -n "Updating to $parent ...."
-if [ $parent == "HEAD" ]; then
-  $CVS update -AdP $dir
-else
-  $CVS update -r $parent -dP $dir
-fi
-echo "done"
-
-echo -n "Tagging as ${PARENT}_${CHILD}_LAND_PARENT_$date ..."
-$CVS tag ${PARENT}_${CHILD}_LAND_PARENT_$date $dir
-echo "done"
-
-echo -n "Create land point on ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date ..."
-$CVS rtag -r ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date $module $dir
-echo "done"
-
-echo -n "Preserve old base tag ${CHILD}_BASE as ${CHILD}_BASE_PREV ..."
-$CVS tag -F -r ${CHILD}_BASE ${CHILD}_BASE_PREV $dir
-echo "done"
-
-# Apply all of the changes to your local tree:
-echo -n "Updating as -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_LAND_CHILD_$date ..."
-$CVS update -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_LAND_CHILD_$date $dir
-echo "done"
-
-echo -n "Recording conflicts in $CONFLICTS ..."
-if $CVS update | grep '^C' > $CONFLICTS; then
-    echo "Conflicts found, fix before committing."
-    cat $CONFLICTS
-else 
-    echo "No conflicts found"
-    rm -f $CONFLICTS
-fi
-echo "done"
-
-echo "Build, test, commit and then run land2.sh (no arguments)"
diff --git a/lustre/scripts/land2.sh b/lustre/scripts/land2.sh
deleted file mode 100755 (executable)
index 2bb9fad..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh -e 
-
-CVS=cvs
-
-if [ ! -f .mergeinfo ] ; then
-    echo ".mergeinfo doesn't exist - exit"
-    exit 
-fi
-
-. .mergeinfo
-
-if [ -f "$CONFLICTS" ] ; then
-    echo "$CONFLICTS exists - clean up first"
-    cat $CONFLICTS
-    exit 
-fi
-
-#cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1
-
-echo -n "Tagging as ${CHILD}_BASE_$date ..."
-$CVS tag -F ${CHILD}_BASE_$date $dir
-echo "done"
-echo -n "Tagging as ${CHILD}_BASE ..."
-$CVS tag -F ${CHILD}_BASE $dir
-
-echo "saving .mergeinfo as .mergeinfo-$date"
-mv .mergeinfo .mergeinfo-$date
-echo "done"
diff --git a/lustre/scripts/lbuild b/lustre/scripts/lbuild
deleted file mode 100755 (executable)
index 136279a..0000000
+++ /dev/null
@@ -1,463 +0,0 @@
-#!/bin/sh
-
-TOPDIR=$PWD
-
-# CVSROOT is inherited from the environment
-KERNELDIR=
-LUSTRE=
-PUBLISH=0
-RELEASE=0
-DO_SRC=1
-TAG=
-TARGET=
-TARGET_ARCHS=
-CONFIGURE_FLAGS=
-EXTRA_VERSION=
-
-# from target file
-KERNEL=
-SERIES=
-CONFIG=
-VERSION=
-
-RHBUILD=0
-SUSEBUILD=0
-LINUX26=0
-SUSEBUILD=0
-
-BASE_ARCHS=
-BIGMEM_ARCHS=
-BOOT_ARCHS=
-JENSEN_ARCHS=
-SMP_ARCHS=
-BIGSMP_ARCHS=
-UP_ARCHS=
-
-DATE=$(date)
-
-cleanup()
-{
-    true
-}
-
-fatal()
-{
-    cleanup
-    [ "$2" ] && echo
-    [ "$2" ] && echo "${0##*/}: $2"
-    exit $1
-}
-
-publishing()
-{
-    (( $PUBLISH )) || return 0
-}
-
-is_release()
-{
-    (( $RELEASE )) || return 0
-}
-
-list_targets()
-{
-    echo -n "Available targets:"
-    for target in $TOPDIR/lustre/kernel_patches/targets/*.target ; do
-       target_file=${target##*/}
-       echo -n " ${target_file%%.target}"
-    done
-    echo
-}
-
-usage()
-{
-    cat <<EOF
-Usage: ${0##*/} [OPTION]... [-- <lustre configure options>]
-
-  -d CVSROOT
-    Specifies the CVS Root to use when pulling files from CVS.  The
-    environment variable \$CVSROOT is used if this option is not
-    present.
-
-  --extraversion=EXTRAVERSION
-    Text to use for the rpm release and kernel extraversion.
-
-  --kerneldir=KERNELDIR
-    Directory containing Linux source tarballs referenced by target
-    files.
-
-  --lustre=LUSTRE
-    Path to an existing lustre source tarball to use instead of
-    pulling from CVS.
-
-  --nosrc
-    Do not build a .src.rpm, a full kernel patch, or a patched kernel
-    tarball.
-
-  --publish
-    Publish the packages, patches, and tarballs on the ftp server.
-
-  --release
-    Specifies that the files generated do not include timestamps, and
-    that this is an official release.
-
-  --tag=TAG
-    A CVS branch/tag name to build from when pulling from CVS.
-
-  --target=TARGET
-    The name of the target to build.  The available targets are listed
-    below.
-
-  --target-archs=TARGET_ARCHS
-    A (space delimited) list of architectures to build.  By default,
-    all of the archs supported by the TARGET will be built, in
-    addition to a .src.rpm.  This option can limit those, for machines
-    that can only build certain archs or if you only want a certain
-    arch built (for testing, or a one-off kernel).
-
-    Also note that by using a non-"base" arch (eg, i386) only kernels
-    will be built - there will be no lustre-lite-utils package.
-
-EOF
-
-#   list_targets
-
-    fatal "$1" "$2"
-}
-
-check_options()
-{
-    if [ "$LUSTRE" ] ; then
-       [ -r "$LUSTRE" ] || \
-           usage 1 "Could not find Lustre source tarball '$LUSTRE'."
-    else
-       [ "$CVSROOT" ] || \
-           usage 1 "Either specify a CVS Root with -d, or a Lustre source tarball with --lustre."
-       [ "$TAG" ] || \
-           usage 1 "A branch/tag name must be specified with --tag when not building from a tarball."
-    fi
-
-    [ "$KERNELDIR" ] || \
-       usage 1 "A kernel directory must be specified with --kerneldir."
-
-    [ -d "$KERNELDIR" ] || \
-       usage 1 "$KERNELDIR is not a directory."
-
-    if ! (( $RELEASE )) ; then
-       [ "$TAG" ] || \
-           usage 1 "When building a snapshot, a tag name must be used."
-    fi
-
-    TIMESTAMP=$(date -d "$DATE" "+%Y%m%d%H%M")
-
-    [ "$TARGET" ] || usage 1 "A target must be specified with --target."
-#    TARGET_FILE="$TOPDIR/kernel_patches/targets/$TARGET.target"
-#    [ -r "$TARGET_FILE" ] || \
-#      usage 1 "Target '$TARGET' was not found."
-}
-
-uniqify()
-{
-    echo $(echo "$*" | xargs -n 1 | sort -u)
-}
-
-load_target()
-{
-    EXTRA_VERSION_save="$EXTRA_VERSION"
-    TARGET_FILE="$TOPDIR/lustre/kernel_patches/targets/$TARGET.target"
-    [ -r "$TARGET_FILE" ] || \
-       fatal 1 "Target $TARGET was not found."
-
-    echo "Loading target config file $TARGET.target..."        
-
-    . "$TARGET_FILE"
-
-    [ "$KERNEL"  ] || fatal 1 "Target $TARGET did not specify a kernel."
-#    [ "$SERIES"  ] || fatal 1 "Target $TARGET did not specify a kernel patch series."
-#    [ "$CONFIG"  ] || fatal 1 "Target $TARGET did not specify a kernel config."
-    [ "$VERSION" ] || fatal 1 "Target $TARGET did not specify a kernel version."
-
-    if [ "$KERNELDIR" ] ; then
-       KERNEL_FILE="$KERNELDIR/$KERNEL"
-       [ -r "$KERNELDIR/$KERNEL" ] || \
-           fatal 1 "Target $TARGET's kernel file $KERNEL not found in kernel directory $KERNELDIR."
-    fi
-
-    if [ "$SERIES" ] ; then
-        SERIES_FILE="$TOPDIR/lustre/kernel_patches/series/$SERIES"
-        [ -r "$SERIES_FILE" ] || \
-           fatal 1 "Target $TARGET's series $SERIES missing from $TOPDIR/lustre/kernel_patches/series."
-    fi
-
-    CONFIG_FILE="$TOPDIR/lustre/kernel_patches/kernel_configs/$CONFIG"
-    [ -r "$CONFIG_FILE" ] || \
-       fatal 1 "Target $TARGET's config file $CONFIG missing from $TOPDIR/lustre/kernel_patches/kernel_configs/."
-
-    if [ "$EXTRA_VERSION_save" ] ; then
-       EXTRA_VERSION="$EXTRA_VERSION_save"
-    elif ! (( $RELEASE )) ; then
-       EXTRA_VERSION="${EXTRA_VERSION}-${TAG}.${TIMESTAMP}"
-    fi
-    # EXTRA_VERSION=${EXTRA_VERSION//-/_}
-
-    ALL_ARCHS="$BASE_ARCHS $BIGMEM_ARCHS $BOOT_ARCHS $JENSEN_ARCHS $SMP_ARCHS $BIGSMP_ARCHS $UP_ARCHS"
-
-    BUILD_ARCHS=
-    for arch in $(uniqify "$ALL_ARCHS") ; do
-       if [ -z "$TARGET_ARCHS" ] || echo "$TARGET_ARCHS" | grep "$arch" >/dev/null 2>/dev/null ; then
-           BUILD_ARCHS="$BUILD_ARCHS $arch"
-       fi
-    done
-    [ "$BUILD_ARCHS" ] || usage 1 "No available target archs to build."
-    echo "Building for: $BUILD_ARCHS"
-}
-
-tarflags()
-{
-    case "$1" in
-       '')
-           fatal 1 "tarflags(): File name argument missing."
-           ;;
-       *.tar.gz)
-           echo 'zxf'
-           ;;
-       *.tar.bz2)
-           echo 'jxf'
-           ;;
-       *)
-           fatal 1 "tarflags(): Unrecognized tar extension in file: $1"
-           ;;
-    esac
-}
-
-untar()
-{
-    echo "Untarring ${1##*/}..."
-    tar $(tarflags "$1") "$1"
-}
-
-unpack_lustre()
-{
-    DIRNAME="lustre-$TAG-$TIMESTAMP"
-    if [ "$LUSTRE" ] ; then
-       untar "$LUSTRE"
-       [ -d lustre ] || ln -sf lustre* lustre
-    else
-       cvs -d "$CVSROOT" -qz3 co -D "$DATE" "-r$TAG" -d "$DIRNAME" lustre || \
-           fatal 1 "There was an error checking out Lustre from CVS."
-       echo "Creating lustre tarball..."
-       tar zcf "$DIRNAME.tar.gz" "$DIRNAME" \
-           --exclude "CVS" --exclude "*~" --exclude ".cvsignore" || \
-           fatal 1 "Could not create Lustre tarball."
-       LUSTRE="$PWD/$DIRNAME.tar.gz"
-       ln -sf "$DIRNAME" lustre
-    fi
-}
-
-unpack_linux()
-{
-    untar "$KERNEL_FILE"
-    [ -d linux ] || ln -sf linux* linux
-}
-
-patch_linux()
-{
-    [ "$SERIES" ] || return 0
-    FULL_PATCH="$PWD/lustre-kernel-${TARGET}-${EXTRA_VERSION}.patch"
-    [ -f "$FULL_PATCH" ] && rm -f "$FULL_PATCH"
-    pushd linux >/dev/null
-    echo -n "Applying patches:"
-    for patch in $(<"$SERIES_FILE") ; do
-       echo -n " $patch"
-       PATCH_FILE="$TOPDIR/lustre/kernel_patches/patches/$patch"
-       [ -r "$PATCH_FILE" ] || \
-           fatal 1 "Patch $patch does not exist in Lustre tree."
-       cat "$PATCH_FILE" >> "$FULL_PATCH" || \
-           fatal 1 "Error adding patch $patch to full patch."
-       patch -s -p1 < "$PATCH_FILE" || fatal 1 "Error applying patch $patch."
-    done
-    echo
-    popd >/dev/null
-    echo "Full patch has been saved in ${FULL_PATCH##*/}."
-    echo "Replacing .config files..."
-    [ -d linux/configs ] || mkdir linux/configs || \
-        fatal 1 "Error creating configs directory."
-    rm -f linux/configs/*
-    cp -v lustre/kernel_patches/kernel_configs/kernel-${VERSION}-${TARGET}*.config linux/configs/ || \
-       fatal 1 "Error copying in kernel configs."
-}
-
-pack_linux()
-{
-    TARBALL="$(readlink linux)-$EXTRA_VERSION.tar.gz"
-    echo "Creating patched linux tarball $TARBALL..."
-    tar zcf "$TARBALL" "$(readlink linux)" \
-       --exclude "CVS" --exclude ".cvsignore" || \
-       --exclude "*.orig" --exclude "*~" --exclude "*.rej" || \
-       fatal 1 "Error creating patched Linux tarball."
-}
-
-clean_linux()
-{
-    [ -d linux ] || return 0
-    echo "Cleaning linux..."
-    [ -L linux ] && rm -rf $(readlink linux)
-    rm -rf linux
-}
-
-prep_build()
-{
-    # make .spec file
-    if [ -f /etc/init.d/functions -a -f /etc/sysconfig/network ] ; then
-        ENABLE_INIT_SCRIPTS=""
-    else
-        ENABLE_INIT_SCRIPTS="# "
-    fi
-    sed -e "s/@KERNEL_VERSION@/$VERSION/g" \
-       -e "s/@KERNEL_EXTRA_VERSION@/$EXTRA_VERSION/g" \
-       -e "s^@KERNEL_RELEASE@^${EXTRA_VERSION//-/_}^g" \
-       -e "s/@KERNEL_SOURCE@/$KERNEL/g" \
-       -e "s/@LUSTRE_SOURCE@/${LUSTRE##*/}/g" \
-       -e "s/@LUSTRE_TARGET@/$TARGET/g" \
-       -e "s/@CONFIGURE_FLAGS@/$CONFIGURE_FLAGS/g" \
-       -e "s/@BASE_ARCHS@/$BASE_ARCHS/g" \
-       -e "s/@BIGMEM_ARCHS@/$BIGMEM_ARCHS/g" \
-       -e "s/@BOOT_ARCHS@/$BOOT_ARCHS/g" \
-       -e "s/@JENSEN_ARCHS@/$BOOT_ARCHS/g" \
-       -e "s/@SMP_ARCHS@/$SMP_ARCHS/g" \
-       -e "s/@BIGSMP_ARCHS@/$BIGSMP_ARCHS/g" \
-       -e "s/@UP_ARCHS@/$UP_ARCHS/g" \
-       -e "s/@RHBUILD@/$RHBUILD/g" \
-       -e "s/@SUSEBUILD@/$SUSEBUILD/g" \
-       -e "s/@LINUX26@/$LINUX26/g" \
-       -e "s/@SUSEBUILD@/$SUSEBUILD/g" \
-       -e "s/@ENABLE_INIT_SCRIPTS@/$ENABLE_INIT_SCRIPTS/g" \
-       < $TOPDIR/lustre/scripts/lustre-kernel-2.4.spec.in \
-       > lustre-kernel-2.4.spec
-    [ -d SRPMS ] || mkdir SRPMS
-    [ -d RPMS ] || mkdir RPMS
-    [ -d BUILD ] || mkdir BUILD
-    [ -d SOURCES ] || mkdir SOURCES
-    for script in linux-{rhconfig.h,merge-config.awk,merge-modules.awk} \
-       suse-{functions.sh,post.sh,postun.sh,trigger-script.sh.in} ; do
-       cp $TOPDIR/lustre/scripts/$script SOURCES
-    done
-    cp "$LUSTRE" "$KERNEL_FILE" SOURCES
-}
-
-clean_lustre()
-{
-    [ -d lustre ] || return 0
-    echo "Cleaning lustre..."
-    [ -L lustre ] && rm -rf $(readlink lustre)
-    rm -rf lustre
-}
-
-build()
-{
-    echo "Building rpms for: $BUILD_ARCHS..."
-    targets=
-    for arch in $BUILD_ARCHS ; do
-       targets="--target $arch $targets"
-    done
-
-    rpmbuild $targets -bb lustre-kernel-2.4.spec \
-       --define "_topdir $TOPDIR" || \
-       fatal 1 "Error building rpms for $arch."
-
-    (( $DO_SRC )) && rpmbuild -bs lustre-kernel-2.4.spec \
-       --define "_topdir $TOPDIR" || \
-       fatal 1 "Error building .src.rpm."
-}
-
-publish()
-{
-    publishing || return 0
-}
-
-[ -r ~/.lbuildrc ] && . ~/.lbuildrc
-
-options=$(getopt -o d:D:h -l extraversion:,kerneldir:,lustre:,nosrc,publish,release,tag:,target:,target-archs: -- "$@")
-
-eval set -- "$options"
-    
-while [ "$1" ] ; do
-    case "$1" in
-       '')
-           usage 1
-           ;;
-       -d)
-           CVSROOT=$2
-           shift 2
-           ;;
-       -D)
-           DATE=$2
-           shift 2
-           ;;
-       --extraversion)
-           EXTRA_VERSION=$2
-           shift 2
-           ;;
-       --help | -h)
-           usage 0
-           ;;
-       --kerneldir)
-           KERNELDIR=$2
-           shift 2
-           ;;
-       --lustre)
-           LUSTRE=$2
-           shift 2
-           ;;
-       --nosrc)
-           DO_SRC=0
-           shift 1
-           ;;
-       --publish)
-           PUBLISH=1
-           shift
-           ;;
-       --release)
-           RELEASE=1
-           shift
-           ;;
-       --tag)
-           TAG=$2
-           shift 2
-           ;;
-       --target)
-           TARGET=$2
-           shift 2
-           ;;
-       --target-archs)
-           TARGET_ARCHS=$2
-           shift 2
-           ;;
-       --)
-           shift
-           CONFIGURE_FLAGS=$@
-           break
-           ;; 
-       *)
-           usage 1 "Unrecognized option: $1"
-           ;;
-    esac
-done
-
-check_options
-
-unpack_lustre
-load_target
-
-if (( $DO_SRC )) ; then
-    unpack_linux
-    patch_linux
-    pack_linux
-    clean_linux
-fi
-
-# prep_build needs the .spec.in from the lustre source
-prep_build
-clean_lustre
-
-build
-publish
diff --git a/lustre/scripts/lmake b/lustre/scripts/lmake
deleted file mode 100755 (executable)
index 8613723..0000000
+++ /dev/null
@@ -1,658 +0,0 @@
-#!/bin/sh
-
-# option variables
-DESTDIR=
-KERNELDIR=
-TARGET=
-# Not sure what to put here
-# TARGET_ARCH=$(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
-TARGET_ARCH=
-TARGET_CONFIG=
-JOBS=1
-CONFIGURE_FLAGS=
-
-# commands to run
-BUILD_LUSTRE=0
-BUILD_KERNEL=0
-DEPEND_KERNEL=0
-INSTALL_LUSTRE=0
-INSTALL_KERNEL=0
-SAVE_HEADERS=0
-UNPACK_KERNEL=0
-
-# provided by target file
-KERNEL=
-SERIES=
-CONFIG=
-VERSION=
-EXTRA_VERSION=
-
-BASE_ARCHS=
-BIGMEM_ARCHS=
-BOOT_ARCHS=
-JENSEN_ARCHS=
-SMP_ARCHS=
-BIGSMP_ARCHS=
-UP_ARCHS=
-
-RHBUILD=0
-SUSEBUILD=0
-
-# flat-out globals
-TOPDIR=
-TARGET_FILE=
-KERNEL_FILE=
-SERIES_FILE=
-CONFIG_FILE=
-
-canon()
-{
-    pushd $1 >/dev/null
-    echo $PWD
-    popd >/dev/null
-}
-TOPDIR=$(canon "${0%%${0##*/}}/..")
-
-cleanup()
-{
-    true
-}
-
-fatal()
-{
-    cleanup
-    [ "$2" ] && echo
-    [ "$2" ] && echo "${0##*/}: $2"
-    exit $1
-}
-
-list_targets()
-{
-    echo -n "Available targets:"
-    for target in $TOPDIR/kernel_patches/targets/*.target ; do
-       target_file=${target##*/}
-       echo -n " ${target_file%%.target}"
-    done
-    echo
-}
-
-
-usage()
-{
-    cat <<EOF
-Usage: ${0##*/} [OPTION]... [-- <lustre configure options>]
-
-Options:
-
-  --build
-    same as --build-kernel --build-lustre --unpack-kernel
-
-  --build-lustre
-    configure and compile lustre.  Requires that --build-kernel was
-    already run.
-
-  --build-kernel
-    configure and compile a kernel.  Implies --depend-kernel.
-    Requires that --unpack-kernel was already run.
-
-  --depend-kernel)
-    Prepares a kernel tree for building (similar to make mrproper
-    oldconfig dep).  Requires that --unpack-kernel was already run.
-
-  --destdir=DESTDIR
-    Root directory to install into (like DESTDIR with auto*).
-
-  --extraversion=EXTRAVERSION
-    Overrides the target kernel\'s EXTRAVERSION text.
-
-  -h, --help
-    Display this message.
-
-  --install
-    same as --install-kernel --install-lustre
-
-  --install-lustre
-    run make install in the Lustre tree.
-
-  --install-kernel
-    install the kernel image and modules.
-
-  -j jobs
-    This works just like the -j option to make, and is passed to make
-    when building.
-
-  --kerneldir=KERNELDIR
-    Directory containing linux source tarballs.
-
-  --target=TARGET
-    Name of the configuration to use.  The available targets are
-    listed below.
-
-  --target-arch=ARCH
-    Specifies an architecture to use when choosing a kernel config
-    file.  Default is i386.
-
-  --target-config=CONFIG
-    Specifies a special option (such as smp, bigsmp, bigmem, or BOOT)
-    to use when choosing a kernel config file.  This also modifies the
-    kernel version and modules directory.
-
-  --unpack-kernel
-    Untars and patches the kernel source.
-
-  The order that commands (--build-lustre, --unpack-kernel) are
-  specified on the command line is ignored; ${0##*/} will always
-  execute them in the correct order (unpack, then build, then install
-  etc.).
-
-EOF
-    list_targets
-
-    fatal "$1" "$2"
-}
-
-check_options()
-{
-    (( $BUILD_LUSTRE || $BUILD_KERNEL || $DEPEND_KERNEL || \
-           $INSTALL_LUSTRE || $INSTALL_KERNEL || $SAVE_HEADERS || \
-           $UNPACK_KERNEL )) || \
-               fatal 1 "No commands specified."
-
-    if (( $UNPACK_KERNEL )) ; then
-       [ "$KERNELDIR" ] || \
-           fatal 1 "A kernel directory must be specified with --kerneldir."
-       [ -d "$KERNELDIR" ] || \
-           fatal 1 "$KERNELDIR is not a directory."
-    fi
-
-    if (( $INSTALL_LUSTRE || $INSTALL_KERNEL || $SAVE_HEADERS )) ; then
-       [ -z "$DESTDIR" -o -d "$DESTDIR" ] || \
-           fatal 1 "$DESTDIR is not a directory."
-    fi
-
-    [ "$TARGET" ] || usage 1 "A target must be specified with --target."
-    TARGET_FILE="$TOPDIR/kernel_patches/targets/$TARGET.target"
-    [ -r "$TARGET_FILE" ] || \
-       fatal 1 "Target '$TARGET' was not found.  Try --list-targets."
-
-    if [ -z "$JOBS" -o "$JOBS" -lt "1" ] ; then
-       JOBS=1
-    fi
-}
-
-get_lustre_version()
-{
-    lustre_patch=$(grep lustre_version "$SERIES_FILE" 2>/dev/null)
-    [ "$lustre_patch" ] || \
-       fatal 1 "Could not determine Lustre version from $SERIES series."
-
-    awk '/^\+#define LUSTRE_KERNEL_VERSION /{ print $3 }' \
-       "$TOPDIR/kernel_patches/patches/$lustre_patch" 2>/dev/null
-}
-
-load_target()
-{
-    EXTRA_VERSION_save="$EXTRA_VERSION"
-
-    . "$TARGET_FILE"
-
-    [ "$KERNEL" ] || fatal 1 "Target $TARGET did not specify a kernel."
-# Suse 2.6 has our patches in already
-#    [ "$SERIES" ] || fatal 1 "Target $TARGET did not specify a patch series."
-#    [ "$CONFIG" ] || fatal 1 "Target $TARGET did not specify a kernel config."
-    [ "$VERSION" ] || fatal 1 "Target $TARGET did not specify the kernel version."
-    
-    if [ "$KERNELDIR" ] ; then
-       KERNEL_FILE="$KERNELDIR/$KERNEL"
-       [ -r "$KERNELDIR/$KERNEL" ] || \
-           fatal 1 "Target $TARGET's kernel file $KERNEL not found in kernel directory $KERNELDIR."
-    fi
-
-    if [ "$SERIES" ]; then
-        SERIES_FILE="$TOPDIR/kernel_patches/series/$SERIES"
-        [ -r "$SERIES_FILE" ] || \
-           fatal 1 "Target $TARGET's series $SERIES missing from $TOPDIR/kernel_patches/series."
-    fi
-
-    TARGET_ARCH=${TARGET_ARCH:-$BASE_ARCHS}
-    CONFIG_TARGET="$TARGET-${TARGET_ARCH}${TARGET_CONFIG:+-$TARGET_CONFIG}"
-    CONFIG_FILE="$TOPDIR/kernel_patches/kernel_configs/kernel-$VERSION-$CONFIG_TARGET.config"
-    [ -r "$CONFIG_FILE" ] ||
-       fatal 1 "Target $TARGET's config file $CONFIG_FILE missing from $TOPDIR/kernel_patches/configs."
-
-    if [ "$EXTRA_VERSION_save" ] ; then
-       EXTRA_VERSION="$EXTRA_VERSION_save"
-    else
-       EXTRA_VERSION="${EXTRA_VERSION}_lustre.$(get_lustre_version)"
-    fi
-}
-
-tarflags()
-{
-    case "$1" in
-       '')
-           fatal 1 "tarflags(): File name argument missing."
-           ;;
-       *.tar.gz)
-           echo 'zxf'
-           ;;
-       *.tar.bz2)
-           echo 'jxf'
-           ;;
-       *)
-           fatal 1 "tarflags(): Unrecognized tar extension in file: $1"
-           ;;
-    esac
-}
-
-untar()
-{
-    echo "Untarring ${1##*/}..."
-    tar $(tarflags $1) $1
-}
-
-
-extract_kernel()
-{
-    (( $UNPACK_KERNEL )) || return 0
-    pushd "$TOPDIR" >/dev/null
-    if [ -d linux ] ; then
-       [ -L linux ] && rm -rf $(readlink linux)
-       rm -rf linux
-    fi
-    untar "$KERNEL_FILE"
-    [ -d linux ] || ln -sf linux* linux
-    popd >/dev/null
-}
-
-patch_kernel()
-{
-    (( $UNPACK_KERNEL )) || return 0
-    [ "$SERIES" ] || return 0
-    pushd "$TOPDIR/linux" >/dev/null
-    echo -n "Applying patch"
-    for patch in $(<"$SERIES_FILE") ; do
-       PATCH_FILE="$TOPDIR/kernel_patches/patches/$patch"
-       [ -r "$PATCH_FILE" ] || \
-           fatal 1 "Patch file not found: $patch"
-       echo -n " $patch"
-       patch -s -p1 < "$PATCH_FILE" || fatal 1 "Error applying patch $patch."
-    done
-    echo
-    popd >/dev/null
-}
-
-set_make()
-{
-    MAKE="make -s"
-    if [ "$CC" ] ; then
-       MAKE="$MAKE CC=$CC"
-    fi
-    if [ "$ARCH" ] ; then
-       MAKE_ARCH="$MAKE ARCH=$ARCH"
-    else
-       case $TARGET_ARCH in
-           i?86)
-                ;;
-            *)
-               MAKE_ARCH="$MAKE ARCH=$TARGET_ARCH"
-               ;;
-        esac
-    fi
-    MAKE_J="$MAKE -j $JOBS"
-}
-
-depend_kernel()
-{
-    (( $DEPEND_KERNEL )) || return 0
-    # we need to override $CC at make time, since there is no
-    # configure
-    set_make
-    pushd "$TOPDIR/linux" >/dev/null
-    echo "Overriding EXTRAVERSION in kernel..."
-    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -${EXTRA_VERSION}${TARGET_CONFIG}/" Makefile
-    echo "Making depend in $PWD..."
-    $MAKE mrproper || fatal 1 "Error running make mrproper"
-    cp "$CONFIG_FILE" .config
-    for oc in oldconfig_nonint silentoldconfig oldconfig ; do
-       if grep -q "$oc" Makefile ; then
-           OLDCONFIG="$oc"
-           break
-       fi
-    done
-    $MAKE $OLDCONFIG || fatal 1 "Error running make oldconfig"
-    case "$VERSION" in
-       2.6*)
-            SYMLINKS="include/asm"
-            ;;
-        2.4*)
-           SYMLINKS="symlinks"
-           ;;
-    esac
-    $MAKE $SYMLINKS
-    $MAKE_J dep || fatal 1 "Error running make dep"
-    $MAKE include/linux/version.h || fatal 1 "Error making include/linux/version.h"
-}
-
-build_kernel()
-{
-    (( $BUILD_KERNEL )) || return 0
-    set_make
-    echo "Building kernel in $PWD..."
-    case "$TARGET_ARCH" in
-       i386 | i586 | i686 | athlon | x86_64)
-           $MAKE_J bzImage || fatal 1 "Error making bzImage."
-           ;;
-        ppc | ppc64)
-           $MAKE_J vmlinux || fatal 1 "Error making vmlinux."
-           ;;
-       *)
-           $MAKE_J boot || fatal 1 "Error making boot."
-           ;;
-    esac
-    $MAKE_J modules || fatal 1 "Error building modules."
-
-    popd >/dev/null
-}
-
-configure_lustre()
-{
-    (( $BUILD_LUSTRE )) || return 0
-    pushd "$TOPDIR" >/dev/null
-    [ -f Makefile ] && make -s clean
-    [ -f configure ] || sh ./autogen.sh
-    ./configure --with-linux=$PWD/linux $CONFIGURE_FLAGS || \
-       fatal 1 "Error configuring Lustre."
-    popd >/dev/null
-}
-
-build_lustre()
-{
-    (( $BUILD_LUSTRE )) || return 0
-    set_make
-    pushd "$TOPDIR" >/dev/null
-    $MAKE_J || fatal 1 "Error building Lustre."
-    popd >/dev/null
-}
-
-install_kernel()
-{
-    (( $INSTALL_KERNEL )) || return 0
-    set_make
-    FULL_VERSION="${VERSION}-${EXTRA_VERSION}${TARGET_CONFIG}"
-    pushd "$TOPDIR/linux" >/dev/null
-    mkdir -p "$DESTDIR/boot"
-
-    install -m 644 System.map "$DESTDIR/boot/System.map-${FULL_VERSION}"
-    # install -m 644 module-info ...
-    install -m 644 "$CONFIG_FILE" "$DESTDIR/boot/config-${FULL_VERSION}"
-
-    mkdir -p "$DESTDIR/dev/shm"
-    mkdir -p "$DESTDIR/lib/modules/${FULL_VERSION}"
-
-    $MAKE INSTALL_MOD_PATH="$DESTDIR" KERNELRELEASE="$FULL_VERSION" \
-       -s modules_install || \
-       fatal 1 "Error installing modules."
-
-    case "$TARGET_ARCH" in
-       i386 | i586 | i686 | athlon)
-           cp arch/i386/boot/bzImage "$DESTDIR/boot/vmlinuz-${FULL_VERSION}"
-           cp vmlinux "$DESTDIR/lib/modules/${FULL_VERSION}/"
-           ln -sf "../lib/modules/${FULL_VERSION}/vmlinux" "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
-           ;;
-       x86_64)
-           cp arch/x86_64/boot/bzImage "$DESTDIR/boot/vmlinuz-${FULL_VERSION}"
-           cp vmlinux "$DESTDIR/lib/modules/${FULL_VERSION}/"
-           ln -sf "../lib/modules/${FULL_VERSION}/vmlinux" "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
-           ;;
-        ppc | ppc64)
-           cp vmlinux "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
-           ln -sf "$DESTDIR/boot/vmlinux-${FULL_VERSION}" "../lib/modules/${FULL_VERSION}/vmlinux" 
-           ;;
-       ia64)
-           gzip -cfv vmlinux > vmlinuz
-           mkdir -p "$DESTDIR/boot/efi/redhat"
-           install -m 755 vmlinux "$DESTDIR/lib/modules/${FULL_VERSION}/"
-           install -m 755 vmlinuz "$DESTDIR/boot/efi/redhat/vmlinuz-${FULL_VERSION}"
-           ln -sf "../../../lib/modules/${FULL_VERSION}/vmlinux" "$DESTDIR/boot/efi/redhat/vmlinux-${FULL_VERSION}"
-           ln -sf "efi/redhat/vmlinux-${FULL_VERSION}" "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
-           ln -sf "efi/redhat/vmlinuz-${FULL_VERSION}" "$DESTDIR/boot/vmlinuz-${FULL_VERSION}"
-           ;;
-       *)
-           cp vmlinuz "$DESTDIR/boot/vmlinuz-${FULL_VERSION}"
-           cp vmlinux "$DESTDIR/lib/modules/${FULL_VERSION}/vmlinux-${FULL_VERSION}"
-           ln -sf "../lib/modules/${FULL_VERSION}/vmlinux-${FULL_VERSION}" "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
-
-           ;;
-    esac
-    if [ -e init/kerntypes.o ] ; then
-       cp init/kerntypes.o "$DESTDIR/boot/Kerntypes-${FULL_VERSION}"
-    fi
-
-    popd >/dev/null
-}
-
-install_lustre()
-{
-    (( $INSTALL_LUSTRE )) || return 0
-    set_make
-    FULL_VERSION="${VERSION}-${EXTRA_VERSION}${TARGET_CONFIG}"
-    pushd "$TOPDIR" >/dev/null
-    $MAKE -s install "DESTDIR=$DESTDIR" KERNELRELEASE="$FULL_VERSION" || fatal 1 "Error installing Lustre."
-    popd >/dev/null
-}
-
-build_kms()
-{
-    (( $BUILD_KERNEL )) || return 0
-    (( $SUSEBUILD )) || return 0
-    set_make
-    FULL_VERSION="${VERSION}-${EXTRA_VERSION}${TARGET_CONFIG}"
-    mkdir -p "${TOPDIR}/modules-${FULL_VERSION}"
-    for dir in /usr/src/kernel-modules/* ; do
-       # we are replacing lustre-lite, so don't include it
-       if [ ${dir##*/} != "lustre-lite" -a -e $dir/Makefile ]; then
-           build_dir="${TOPDIR}/modules-${FULL_VERSION}/${dir##*/}"
-           cp -a $dir $build_dir
-           # these modules are terrible, and don't all build
-           $MAKE_J -C $build_dir modules KERNEL_SOURCE="${TOPDIR}/linux"
-       fi
-    done
-}
-
-symver()
-{
-    local file=$1 name=${1%.ko}
-    nm $file \
-    | sed -ne 's,^0*\([0-9a-f]\{8\}\) A __crc_\(.*\),0x\1\t\2\t'"$name"',p'
-}
-
-install_kms()
-{
-    (( $INSTALL_KERNEL )) || return 0
-    (( $SUSEBUILD )) || return 0
-    set_make
-    FULL_VERSION="${VERSION}-${EXTRA_VERSION}${TARGET_CONFIG}"
-    for build_dir in "${TOPDIR}/modules-${FULL_VERSION}/*" ; do
-       [ -d $build_dir ] || continue
-        # these modules are terrible, and don't all build
-       $MAKE -C $build_dir KERNEL_SOURCE="${TOPDIR}/linux" INSTALL_MOD_PATH="$DESTDIR" 
-    done
-    (   symver vmlinux
-       moddir="${DESTDIR}/lib/modules/${FULL_VERSION}"
-       cd $moddir/kernel
-       for module in $(find * -name '*.ko'); do
-           symver $module
-       done
-       cd $moddir
-       for module in $(find * -path 'kernel/*' -prune -o \
-                          -name '*.ko' -print); do
-           symver $module
-       done
-    ) | sort -u -k2 \
-       | gzip -c9 > "${DESTDIR}/boot/symvers-${VERSION}-${EXTRA_VERSION}-${TARGET_ARCH}${TARGET_CONFIG}.gz"
-}
-
-save_headers()
-{
-    echo "Saving headers for $1 $2..."
-    pushd linux >/dev/null
-
-    KVERREL="${VERSION}-${EXTRA_VERSION}"
-    # deal with the kernel headers that are version specific
-    
-    saveddir="$RPM_BUILD_ROOT/usr/src/linux-${KVERREL}/savedheaders/$2/$1"
-    mkdir -p "$saveddir"
-    install -m 644 include/linux/autoconf.h "$saveddir/autoconf.h"
-    install -m 644 include/linux/version.h  "$saveddir/version.h"
-    mv include/linux/modules "$saveddir/"
-    echo $2 $1 ../../savedheaders/$2/$1/ >>  $RPM_BUILD_ROOT/usr/src/linux-${KVERREL}/savedheaders/list
-    popd >/dev/null
-}
-
-save_all_headers()
-{
-    (( $SAVE_HEADERS )) || return 0
-
-    for arch in $BIGMEM_ARCHS ; do
-       save_headers bigmem $arch
-    done
-
-    for arch in $BOOT_ARCHS ; do
-       save_headers BOOT $arch
-    done
-
-    for arch in $JENSEN_ARCHS ; do
-       save_headers jensen $arch
-    done
-
-    for arch in $SMP_ARCHS ; do
-       save_headers smp $arch
-    done
-
-    for arch in $BIGSMP_ARCHS ; do
-       save_headers bigsmp $arch
-    done
-    for arch in $UP_ARCHS ; do
-       save_headers up $arch
-    done
-}
-
-longopts="build,build-lustre,build-kernel,depend-kernel,destdir:,extraversion:"
-longopts="$longopts,help,install,install-lustre,install-kernel,kerneldir:"
-longopts="$longopts,save-headers,target:,target-arch:,target-config:,unpack-kernel"
-
-options=$(getopt -o hj: -l "$longopts" -- "$@")
-
-eval set -- "$options"
-    
-while [ "$1" ] ; do
-    case "$1" in
-       '')
-           usage 1
-           ;;
-       --build)
-           BUILD_LUSTRE=1
-           BUILD_KERNEL=1
-           DEPEND_KERNEL=1
-           UNPACK_KERNEL=1
-           shift
-           ;;
-       --build-lustre)
-           BUILD_LUSTRE=1
-           shift
-           ;;
-       --build-kernel)
-           BUILD_KERNEL=1
-           DEPEND_KERNEL=1
-           shift
-           ;;
-       --depend-kernel)
-           DEPEND_KERNEL=1
-           shift
-           ;;
-       --destdir)
-           DESTDIR=$2
-           shift 2
-           ;;
-       --extraversion)
-           EXTRA_VERSION=$2
-           shift 2
-           ;;
-       --help | -h)
-           usage 0
-           ;;
-       --install)
-           INSTALL_LUSTRE=1
-           INSTALL_KERNEL=1
-           shift
-           ;;
-       --install-lustre)
-           INSTALL_LUSTRE=1
-           shift
-           ;;
-       --install-kernel)
-           INSTALL_KERNEL=1
-           shift
-           ;;
-       -j)
-           JOBS=$2
-           shift 2
-           ;;
-       --kerneldir)
-           KERNELDIR=$2
-           shift 2
-           ;;
-       --save-headers)
-           SAVE_HEADERS=1
-           shift
-           ;;
-       --target)
-           TARGET=$2
-           shift 2
-           ;;
-       --target-arch)
-           TARGET_ARCH=$2
-           shift 2
-           ;;
-       --target-config)
-           TARGET_CONFIG=$2
-           shift 2
-           ;;
-       --unpack-kernel)
-           UNPACK_KERNEL=1
-           shift
-           ;;
-       --)
-           shift
-           CONFIGURE_FLAGS=$@
-           break
-           ;; 
-       *)
-           usage 1 "Unrecognized option: $1"
-           ;;
-    esac
-done
-
-check_options
-load_target
-
-extract_kernel
-patch_kernel
-
-depend_kernel
-build_kernel
-
-configure_lustre
-build_lustre
-
-build_kms
-
-install_kernel
-install_lustre
-
-install_kms
-
-save_all_headers
-
-exit 0
diff --git a/lustre/scripts/lustre-kernel-2.4.spec.in b/lustre/scripts/lustre-kernel-2.4.spec.in
deleted file mode 100644 (file)
index 8267879..0000000
+++ /dev/null
@@ -1,979 +0,0 @@
-Summary: The Linux kernel (the core of the Linux operating system)
-
-# Versions of various parts
-
-#
-# Polite request for people who spin their own kernel rpms:
-# please modify the "release" field in a way that identifies
-# that the kernel isn't the stock RHL kernel, for example by
-# adding some text to the end of the version number.
-#
-%define kversion @KERNEL_VERSION@
-%define kextraver @KERNEL_EXTRA_VERSION@
-%define release @KERNEL_RELEASE@
-# /usr/src/%{kslnk} -> /usr/src/linux-%{KVERREL}
-%define kslnk linux-2.4
-
-# groups of related archs
-%define all_x86 i386 i686 i586 athlon
-#define all_x86 i686 i386 i586 athlon
-
-%define nptlarchs %{all_x86}
-#define nptlarchs noarch
-%define rhbuild @RHBUILD@
-%define susebuild @SUSEBUILD@
-%define linux26 @LINUX26@
-
-# disable build root strip policy
-%define __spec_install_post /usr/lib/rpm/brp-compress || :
-#
-# RPM foo magic
-%define _missing_doc_files_terminate_build    0
-%define _unpackaged_files_terminate_build 0
-%define debug_package %{nil}
-
-# Enable this to build a board-specific kernel configuration 
-# some architectures have LOTS of different setups and this 
-# is a way to deal with that cleanly.
-#
-#define targetboard assabet
-%define dashtargetboard %{?targetboard:-%{targetboard}}
-%define withtargetboard 0
-%{?targetboard: %{expand: %%define withtargetboard 1}}
-       
-# Override generic defaults with per-arch defaults (which can
-# themselves be overridden with --with/--without).  These must
-# ONLY be "0", never "1"
-
-%define buildbase 0
-%define buildbigmem 0
-%define buildBOOT 0
-%define buildjensen 0
-%define buildsmp 0
-%define buildbigsmp 0
-%define buildup 0
-%define buildsrc 0
-
-%ifarch @BASE_ARCHS@
-%define buildbase 1
-%endif
-
-%ifarch @BIGMEM_ARCHS@
-%define buildbigmem 1
-%endif
-
-%ifarch @BOOT_ARCHS@
-%define buildBOOT 1
-%endif
-
-%ifarch @JENSEN_ARCHS@
-%define buildjensen 1
-%endif
-
-%ifarch @SMP_ARCHS@
-%define buildsmp 1
-%endif
-
-%ifarch @BIGSMP_ARCHS@
-%define buildbigsmp 1
-%endif
-
-%ifarch @UP_ARCHS@
-%define buildup 1
-%endif
-
-# For board-specific kernels, build only the normal kernel (which may actually be smp, not up).
-%if %{withtargetboard}
-%define buildsmp 0
-%define buildbigsmp 0
-%define buildBOOT 0
-%define buildbigmem 0
-%define buildjensen 0
-%endif
-
-%if 0
-Second, per-architecture exclusions (ifarch)
-%ifarch i386
-%define buildsmp 0
-%endif
-%ifarch ia64
-%define buildBOOT 0
-%endif
-%endif
-
-# we can't test values inline, only whether a macro exists
-%{expand: %%define buildup_%{buildup} yadda}
-%{expand: %%define buildsmp_%{buildsmp} yadda}
-%{expand: %%define buildbigsmp_%{buildbigsmp} yadda}
-%{expand: %%define buildBOOT_%{buildBOOT} yadda}
-%{expand: %%define buildbigmem_%{buildbigmem} yadda}
-%{expand: %%define buildjensen_%{buildjensen} yadda}
-%{expand: %%define ikd_%{ikd} yadda}
-%{expand: %%define ibcs_%{ibcs} yadda}
-%{expand: %%define debuglevel_%{debugging} yadda}
-
-%{expand: %%define kernel_conflicts  ppp <= 2.3.15, pcmcia-cs <= 3.1.20, isdn4k-utils <= 3.0, mount < 2.10r-5, nfs-utils < 0.3.1, cipe < 1.4.5, tux < 2.1.0, kudzu <= 0.92, e2fsprogs < 1.22, initscripts < 5.84, dev < 3.2-7, iptables < 1.2.5-3, bcm5820 < 1.81, nvidia-rh72 <= 1.0, oprofile < 0.4}
-
-%if %{rhbuild}
-%define BOOT_kernel_prereq fileutils, modutils >=  2.4.18
-%define kernel_prereq %{BOOT_kernel_prereq}, initscripts >= 5.83, mkinitrd >= 3.2.6
-%endif
-
-%ifarch ia64
-%define initrd_dir /boot/efi/redhat
-%else
-%define initrd_dir /boot
-%endif
-
-%ifarch %{all_x86} x86_64
-%define kernel_glob vmlinu?-%{KVERREL}
-%endif
-%ifarch ia64
-# <sigh>, no GLOB_BRACE for filelists, efi needs to be done separately
-%define kernel_glob vmlinuz-%{KVERREL}
-%endif
-%ifarch alpha
-%define kernel_glob vmlinu?-%{KVERREL}
-%endif
-
-Name: kernel
-Version: %{kversion}
-Release: %{release}%{?targetboard:%{targetboard}}%{?debuglevel_1:.dbg}
-%define KVERREL %{PACKAGE_VERSION}-%{kextraver}%{?targetboard:%{targetboard}}%{?debuglevel_1:.dbg}
-License: GPL
-Group: System Environment/Kernel
-ExclusiveArch: %{all_x86} x86_64 ia64 ppc
-ExclusiveOS: Linux
-Obsoletes: kernel-modules, kernel-sparc
-Provides: kernel = %{version}
-BuildConflicts: rhbuildsys(DiscFree) < 500Mb
-%ifarch %{all_x86} ia64 x86_64
-Provides: kernel-drm = 4.1.0, kernel-drm = 4.2.0, kernel-drm = 4.3.0, kernel-drm = 4.2.99.3
-%endif
-Autoreqprov: no
-%if %{rhbuild}
-Prereq: %{kernel_prereq}
-Conflicts: %{kernel_conflicts}
-
-BuildPreReq: patch >= 2.5.4, bash >= 2.03, sh-utils, gnupg, tar
-BuildPreReq: bzip2, findutils, dev, gzip, m4
-%endif
-
-Vendor: Cluster File Systems, Inc.
-URL: http://www.kernel.org/
-Buildroot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root
-
-Source0: @LUSTRE_SOURCE@
-Source1: @KERNEL_SOURCE@
-
-Source15: linux-rhconfig.h
-Source16: linux-merge-config.awk
-Source17: linux-merge-modules.awk
-
-Source25: suse-functions.sh
-Source26: suse-post.sh
-Source27: suse-postun.sh
-Source28: suse-trigger-script.sh.in
-
-%package source
-Summary: The source code for the Linux kernel.
-Group: Development/System
-Prereq: fileutils
-Requires: gawk
-Requires: gcc >= 2.96-98
-Autoreqprov: 0
-
-%package doc
-Summary: Various documentation bits found in the kernel source.
-Group: Documentation
-
-%description
-The kernel package contains the Linux kernel (vmlinuz), the core of a
-Linux operating system.  The kernel handles the basic functions of the
-operating system: memory allocation, process allocation, device input
-and output, etc.
-
-%description source
-The kernel-source package contains the source code files for the Linux
-kernel. These source files are needed to build custom/third party device
-drivers. The source files can also be used to build a custom kernel that is
-better tuned to your particular hardware, if you are so inclined (and you
-know what you're doing).
-
-%description doc
-This package contains documentation files form the kernel
-source. Various bits of information about the Linux kernel and the
-device drivers shipped with it are documented in these files. 
-
-You'll want to install this package if you need a reference to the
-options that can be passed to Linux kernel modules at load time.
-
-%package smp
-Summary: The Linux kernel compiled for SMP machines.
-Group: System Environment/Kernel
-Provides: module-info, kernel = %{version}
-%ifarch %{all_x86} ia64 x86_64
-Provides: kernel-drm = 4.1.0, kernel-drm = 4.2.0, kernel-drm = 4.3.0, kernel-drm = 4.2.99.3
-%endif
-%if %{rhbuild}
-Prereq: %{kernel_prereq}
-Conflicts: %{kernel_conflicts}
-%endif
-
-%description smp
-This package includes a SMP version of the Linux kernel. It is
-required only on machines with two or more CPUs, although it should
-work fine on single-CPU boxes.
-
-Install the kernel-smp package if your machine uses two or more CPUs.
-
-%package bigsmp
-Summary: The Linux kernel compiled for SMP machines.
-Group: System/Kernel
-Provides: module-info, kernel = %{version}, k_smp4G
-Obsoletes: k_smp4G
-%ifarch %{all_x86} ia64 x86_64
-Provides: kernel-drm = 4.1.0, kernel-drm = 4.2.0, kernel-drm = 4.3.0, kernel-drm = 4.2.99.3
-%endif
-%if %{rhbuild}
-Prereq: %{kernel_prereq}
-Conflicts: %{kernel_conflicts}
-%endif
-
-%description bigsmp
-This package includes a SMP version of the Linux kernel. It is
-required only on machines with two or more CPUs, although it should
-work fine on single-CPU boxes.
-
-Install the kernel-bigsmp package if your machine uses two or more CPUs.
-
-%package bigmem
-Summary: The Linux Kernel for machines with more than 4 Gigabyte of memory.
-Group: System Environment/Kernel
-Provides: module-info, kernel = %{version}
-%ifarch %{all_x86} ia64 x86_64
-Provides: kernel-drm = 4.1.0, kernel-drm = 4.2.0, kernel-drm = 4.3.0, kernel-drm = 4.2.99.3
-%endif
-%if %{rhbuild}
-Prereq: %{kernel_prereq}
-Conflicts: %{kernel_conflicts}
-Obsoletes: kernel-enterprise <= 2.4.10
-%endif
-
-%description bigmem
-This package includes a kernel that has appropriate configuration options
-enabled for Pentium III machines with 4 Gigabyte of memory or more.
-
-%package BOOT
-Summary: The version of the Linux kernel used on installation boot disks.
-Group: System Environment/Kernel
-Provides: kernel = %{version}
-%if %{rhbuild}
-Prereq: %{BOOT_kernel_prereq}
-Conflicts: %{kernel_conflicts}
-%endif
-
-%description BOOT
-This package includes a trimmed down version of the Linux kernel.
-This kernel is used on the installation boot disks only and should not
-be used for an installed system, as many features in this kernel are
-turned off because of the size constraints.
-
-%package BOOTsmp
-Summary: The Linux kernel used on installation boot disks for SMP machines.
-Group: System Environment/Kernel
-Provides: kernel = %{version}
-%if %{rhbuild}
-Prereq: %{BOOT_kernel_prereq}
-Conflicts: %{kernel_conflicts}
-%endif
-
-%description BOOTsmp
-This package includes a trimmed down version of the Linux kernel. This
-kernel is used on the installation boot disks only and should not be used
-for an installed system, as many features in this kernel are turned off
-because of the size constraints. This kernel is used when booting SMP
-machines that have trouble coming up to life with the uniprocessor kernel.
-
-%package jensen
-Summary: The Linux Kernel compiled for the Alpha Jensen platform.
-Group: System Environment/Kernel
-Provides: kernel = %{version}
-%if %{rhbuild}
-Prereq: %{kernel_prereq}
-Conflicts: %{kernel_conflicts}
-%endif
-
-%description jensen
-This package includes a kernel that has appropriate configuration
-options enabled for use on the Alpha Jensen platform.  The Jensen
-platform is not supported in the normal generic alpha kernel support.
-
-%package -n lustre-lite-utils
-Summary: Lustre utils for Linux
-Group: Applications/System
-
-%description -n lustre-lite-utils
-The Lustre Lite file system utilities.  This includes the tools needed
-to configure, mount, and administer a Lustre filesystem.  This package
-is necessary if you want to access a Lustre filesystem.
-
-# the lustre-doc files are just included as %doc wiht
-# lustre-lite-utils
-
-#%package -n lustre-doc
-#Summary: Sample Lustre configurations and documentation
-#Group: Documentation
-
-#%description -n lustre-doc
-#The Lustre book, sample configurations, and other documentation for
-#Lustre.
-
-%package -n lustre-ldap
-Summary: LDAP schema files for Lustre
-Group: System Environment/Daemons
-
-%description -n lustre-ldap
-LDAP schema files for Lustre.  These are needed if you plan to store
-your Lustre configuration in LDAP, rather than on disk.
-
-%prep
-%setup -n lustre-kernel-%{version} -q -c
-if [ ! -d lustre ] ; then
-    ln -sf lustre* lustre
-fi
-pushd lustre >/dev/null
-sh -x ./scripts/lmake \
-       --unpack-kernel \
-       --target @LUSTRE_TARGET@ \
-       --target-arch %{_target_cpu} \
-       --kerneldir $RPM_SOURCE_DIR
-popd >/dev/null
-
-# handle both SuSE and Red Hat's new-kernel-pkg bits
-for flavor in "" smp bigmem bigsmp BOOT jensen ; do
-       for when in pre preun post postun ; do
-               script="${when}${flavor}.sh"
-               echo "if [ -f /etc/SuSE-release ] ; then" > ${script}
-               sed -e "s/@when@/$when/g" -e "s^%ver_str^%{KVERREL}${flavor}^g" %{SOURCE28} >> ${script}
-               cat %{SOURCE25} >> ${script}
-               case $when in
-                       post)
-                               sed -e "s^%ver_str^%{KVERREL}${flavor}^g" %{SOURCE26} >> ${script}
-                               ;;
-                       postun)
-                               sed -e "s^%ver_str^%{KVERREL}${flavor}^g" %{SOURCE27} >> ${script}
-                               ;;
-               esac
-               echo "exit 0; fi" >> ${script}
-               case $when in
-                       post)
-                               if [ -z "${flavor}" ] ; then
-                                       cat >> ${script} <<EOF
-cd /boot
-%ifnarch ia64 
-ln -sf vmlinuz-%{KVERREL} vmlinuz
-%endif
-ln -sf System.map-%{KVERREL} System.map
-ln -sf module-info-%{KVERREL} module-info
-EOF
-                               fi
-                               cat >> ${script} <<EOF
-[ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade
-[ -x /sbin/mkkerneldoth ] && /sbin/mkkerneldoth
-if [ -x /sbin/new-kernel-pkg ] ; then
-        /sbin/new-kernel-pkg --mkinitrd --depmod --install %{KVERREL}${flavor}
-fi
-EOF
-                               ;;
-                       postun)
-                               ;;
-                       pre)
-                               cat >> ${script} <<EOF
-/sbin/modprobe loop 2>/dev/null >/dev/null || :
-exit 0
-EOF
-                               ;;
-                       preun)
-                               cat >> ${script} <<EOF
-/sbin/modprobe loop 2> /dev/null > /dev/null  || :
-rm -f /lib/modules/%{KVERREL}${flavor}/modules.*
-if [ -x /sbin/new-kernel-pkg ] ; then
- /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}${flavor}
-fi
-EOF
-                               ;;
-               esac
-       done
-done
-
-%build
-# if RPM_BUILD_NCPUS unset, set it
-if [ -z "$RPM_BUILD_NCPUS" ] ; then
-    RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat || :)
-    if [ $RPM_BUILD_NCPUS -eq 0 ] ; then
-        RPM_BUILD_NCPUS=1
-    fi
-    if [ $RPM_BUILD_NCPUS -gt 8 ] ; then
-        RPM_BUILD_NCPUS=8
-    fi
-fi
-
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT
-
-DependKernel()
-{
-  target_config=${1:+--target-config $1}
-  sh -x ./scripts/lmake \
-       --depend-kernel \
-       --target @LUSTRE_TARGET@ \
-       --target-arch %{_target_cpu} \
-       ${target_config} \
-       --extraversion %{kextraver} \
-       -j $RPM_BUILD_NCPUS
-}
-
-BuildKernel()
-{
-  target_config=${1:+--target-config $1}
-  sh -x ./scripts/lmake \
-       --build-kernel --build-lustre \
-       --install \
-       --target @LUSTRE_TARGET@ \
-       --target-arch %{_target_cpu} \
-       ${target_config} \
-       --extraversion %{kextraver} \
-       --kerneldir $RPM_SOURCE_DIR \
-       -j $RPM_BUILD_NCPUS \
-       --destdir $RPM_BUILD_ROOT \
-       -- --enable-modules \
-       --disable-doc --disable-tests \
-       --disable-utils --disable-liblustre \
-       --sysconfdir=%{_sysconfdir} \
-       --mandir=%{_mandir} \
-       @CONFIGURE_FLAGS@
-}
-
-BuildLustre()
-{
-  target_config=${1:+--target-config $1}
-  sh -x ./scripts/lmake \
-       --build-lustre \
-       --install-lustre \
-       --target @LUSTRE_TARGET@ \
-       --target-arch %{_target_cpu} \
-       ${target_config} \
-       --extraversion %{kextraver} \
-       --kerneldir $RPM_SOURCE_DIR \
-       -j $RPM_BUILD_NCPUS \
-       --destdir $RPM_BUILD_ROOT \
-       -- --enable-utils \
-       --disable-doc --disable-tests \
-       --disable-modules --disable-liblustre \
-       --sysconfdir=%{_sysconfdir} \
-       --mandir=%{_mandir} \
-       @CONFIGURE_FLAGS@
-}
-
-SaveHeaders()
-{
-  sh -x ./scripts/lmake \
-       --save-headers \
-       --target @LUSTRE_TARGET@ \
-       --target-arch %{_target_cpu} \
-       --extraversion %{kextraver} \
-       --destdir $RPM_BUILD_ROOT
-}
-
-pushd lustre >/dev/null
-
-%if %{buildbigmem}
-BuildKernel bigmem
-%endif
-
-%if %{buildBOOT}
-BuildKernel BOOT
-%endif
-
-%if %{buildjensen}
-BuildKernel jensen
-%endif
-
-%if %{buildsmp}
-BuildKernel smp
-%endif
-
-%if %{buildbigsmp}
-BuildKernel bigsmp
-%endif
-
-%if %{buildup}
-BuildKernel
-%endif
-
-%if %{buildbase}
-BuildLustre
-SaveHeaders
-%endif
-
-popd >/dev/null
-
-%install
-pushd lustre >/dev/null
-# it's already installed, so just clean up some things that are rpm
-# specific
-for i in $RPM_BUILD_ROOT/lib/modules/* ; do
-  rm -f $i/modules.*
-  rm -f $i/build
-  ln -sf ../../../usr/src/linux-%{KVERREL} $i/build
-%ifarch %{ntplarchs}
-  # remove legacy pcmcia symlink that's no longer useful
-  rm -rf $i/pcmcia
-%endif
-done
-
-# mark the vmlinux* non-executable to fool strip-to-file
-chmod a-x $RPM_BUILD_ROOT/boot/vmlinux*
-
-BuildObj ()
-{
-       flavor=$1
-       if [ $flavor = "up" ] ; then
-               flavext=""
-       else
-               flavext="-$flavor"
-       fi
-       c="$RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}"
-       o="${c}-obj/%{_target_cpu}/$flavor"
-       mkdir -p $o
-       cp ../kernel_patches/kernel_configs/kernel-%{kversion}-@LUSTRE_TARGET@-%{_target_cpu}%{dashtargetboard}${flavext}.config \
-               $o/.config
-        for oc in oldconfig_nonint silentoldconfig oldconfig ; do
-           if grep -q "$oc" Makefile ; then
-               OLDCONFIG="$oc"
-               break
-           fi
-        done
-       MAKE="make -s O=$o -C ${c}"
-       $MAKE $OLDCONFIG
-       $MAKE prepare-all
-       $MAKE clean
-       rm -rf $o/.config.old $o/include/config
-        # Replace the Makefile in the object directory with a version
-        # that has relative path names.
-        read VERSION PATCHLEVEL SUBLEVEL <<-EOF
-$(set -- 2.6.5 ; echo ${*//./ })
-EOF
-        source scripts/mkmakefile \
-           ../../../linux-%{KVERREL} \
-            ../linux-%{KVERREL}-obj/%{_target_cpu}/$flavor \
-           $VERSION \
-           $PATCHLEVEL \
-           > $o/Makefile
-       zcat "$RPM_BUILD_ROOT/boot/symvers-%{KVERREL}-%{_target_cpu}${flavor}.gz" \
-           > $o/Module.symvers
-}
-
-##
-## do -source package cleanup/install
-##
-%if %{buildbase}
-    pushd linux >/dev/null
-    mkdir -p $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-    rm -f drivers/net/hamradio/soundmodem/gentbl scripts/mkdep
-    tar cf - . | tar xf - -C $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{kextraver}custom/" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/Makefile
-    ln -sf linux-%{KVERREL} $RPM_BUILD_ROOT/usr/src/linux
-    # install -m 644 %{SOURCE10}  $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-
-    #clean up the destination
-    make -s mrproper -C $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-    rm -rf $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs
-    mkdir -p $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs
-    cp ../kernel_patches/kernel_configs/kernel-%{kversion}-@LUSTRE_TARGET@*.config $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs
-    %if %{linux26}
-        # this only works because CFS only builds one kernel per target/arch per kernel-source rpm
-       objdir=$RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}-obj
-       mkdir -p $objdir
-        %if %{buildbigmem}
-       BuildObj bigmem
-        %endif
-        %if %{buildBOOT}
-       BuildObj BOOT
-        %endif
-        %if %{buildjensen}
-       BuildObj jensen
-        %endif
-        %if %{buildsmp}
-       BuildObj smp
-        %endif
-       %if %{buildbigsmp}
-       BuildObj bigsmp
-        %endif
-        %if %{buildup}
-       BuildObj up
-        %endif
-       # Remove $RPM_BUILD_ROOT prefix from symlinks.
-       for link in $(find $objdir -type l); do
-           target=$(readlink $link)
-           rm -f $link
-           ln -s ${target/$RPM_BUILD_ROOT/} $link
-       done
-    %else # 2.4 rh-style
-        cp ../kernel_patches/kernel_configs/kernel-%{kversion}-@LUSTRE_TARGET@-%{_target_cpu}%{dashtargetboard}.config $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/.config
-        for oc in oldconfig_nonint silentoldconfig oldconfig ; do
-           if grep -q "$oc" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/Makefile ; then
-               OLDCONFIG="$oc"
-               break
-           fi
-        done
-        make -s $OLDCONFIG -C $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-        %if %{linux26}
-           make -s include/asm -C $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-        %else
-           make -s symlinks -C $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-        %endif
-        make -s include/linux/version.h -C $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-
-        #this generates modversions info which we want to include and we may as
-        #well include the depends stuff as well, after we fix the paths
-        make -s depend -C $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-        find $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL} -name ".*depend" | \
-        while read file ; do
-            mv $file $file.old
-            sed -e "s|[^ ]*\(/usr/src/linux\)|\1|g" < $file.old > $file
-            rm -f $file.old
-        done
-
-        # Try to put some smarter autoconf.h and version.h files in place
-        pushd $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/include/linux ; {
-        rm -rf modules modversions.h autoconf.h version.h
-        cat > modversions.h <<EOF
-#ifndef _LINUX_MODVERSIONS_H
-#define _LINUX_MODVERSIONS_H
-#include <linux/rhconfig.h>
-#include <linux/modsetver.h>
-EOF
-        echo '#include <linux/rhconfig.h>' > autoconf.h
-        list=`find ../../savedheaders/* -name '*.ver' -exec basename '{}' \; | sort`
-        mkdir modules
-        for l in $list; do
-            sed 's,$,modules/'$l, ../../savedheaders/list | awk -f %{SOURCE17} > modules/$l
-            touch -r modules/$l modules/`basename $l .ver`.stamp
-            echo '#include <linux/modules/'$l'>' >> modversions.h
-        done
-        echo '#endif' >> modversions.h
-        sed 's,$,autoconf.h,' ../../savedheaders/list | awk -f %{SOURCE16} >> autoconf.h
-        install -m 644 %{SOURCE15} rhconfig.h
-        echo "#include <linux/rhconfig.h>" >> version.h
-        keyword=if
-        for i in smp BOOT BOOTsmp bigmem bigsmp up ; do
-            # When we build in an i386, we don't have an bigmem header directory
-            # in savedheaders/i386/bigmem.  We also don't have a BOOT directory
-            # anywhere except in savedheaders/i386.  So, we need to use this method
-            # of determining if a kernel version string needs to be included in the
-            # version.h file
-            verh=`echo ../../savedheaders/*/$i/version.h | awk ' { print $1 } '`
-            if [ -n "$verh" -a -f "$verh" ]; then
-                if [ "$i" = up ]; then
-                   if [ "$keyword" = if ]; then
-                       echo "#if 0" >> version.h
-                   fi
-                   echo "#else" >> version.h
-               else
-                   echo "#$keyword defined(__module__$i)" >> version.h
-                   keyword=elif
-                fi
-               grep UTS_RELEASE $verh >> version.h
-            fi
-            done
-        echo "#endif" >> version.h
-        if [ -f ../../savedheaders/%{_target_cpu}/up/version.h ] ; then
-            # keep to a standard normally
-            HEADER_FILE=../../savedheaders/%{_target_cpu}/up/version.h
-        else
-            # test build not including uniprocessor, must get info from somewhere
-            HEADER_FILE=$(ls ../../savedheaders/*/*/version.h | head -n 1)
-        fi
-        grep -v UTS_RELEASE $HEADER_FILE >> version.h
-        rm -rf ../../savedheaders
-        } ; popd
-        touch $RPM_BUILD_ROOT/boot/kernel.h-%{kversion}
-        
-        # rm -f $RPM_BUILD_ROOT/usr/include/linux
-        
-        rm -rf $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/savedheaders
-        
-        %if %{rhbuild}
-            # fix up the tmp_include_depends file wrt the buildroot
-            perl -p -i -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/tmp_include_depends
-        %endif
-    %endif # linux26
-    popd >/dev/null
-%endif # buildbase
-
-popd >/dev/null
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-###
-### scripts
-###
-
-# do this for upgrades...in case the old modules get removed we have
-# loopback in the kernel so that mkinitrd will work.
-%pre -f pre.sh
-
-%pre smp -f presmp.sh
-
-%pre bigsmp -f prebigsmp.sh
-
-%pre bigmem -f prebigmem.sh
-
-%post -f post.sh
-
-%post smp -f postsmp.sh
-
-%post bigsmp -f postbigsmp.sh
-
-%post bigmem -f postbigmem.sh
-
-%post jensen -f postjensen.sh
-
-%ifnarch ia64
-%post BOOT -f postBOOT.sh
-
-%endif
-
-%post -n lustre-lite-utils
-if [ ! -e /dev/obd ]; then
-   mknod /dev/obd c 10 241
-fi
-if [ ! -e /dev/portals ]; then
-   mknod /dev/portals c 10 240
-fi
-if [ -f /etc/init.d/lustre ] ; then
-       /sbin/chkconfig --add lustre
-       /sbin/chkconfig --add lustrefs
-fi
-
-# Allow clean removal of modules directory
-%preun -f preun.sh
-
-%preun smp -f preunsmp.sh
-
-%preun bigsmp -f preunbigsmp.sh
-
-%preun bigmem -f preunbigmem.sh
-
-%preun BOOT -f preunBOOT.sh
-
-%preun jensen -f preunjensen.sh
-
-# suse needs these i guess
-%postun -f postun.sh
-
-%postun smp -f postunsmp.sh
-
-%postun bigsmp -f postunbigsmp.sh
-
-%postun bigmem -f postunbigmem.sh
-
-%postun BOOT -f postunBOOT.sh
-
-%postun jensen -f postunjensen.sh
-
-# We need this here because we don't prereq kudzu; it could be
-# installed after the kernel
-%triggerin -- kudzu
-[ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade || :
-
-%triggerin smp -- kudzu
-[ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade || :
-
-%triggerin bigsmp -- kudzu
-[ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade || :
-
-%triggerin bigmem -- kudzu
-[ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade || :
-
-%triggerin BOOT -- kudzu
-[ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade || :
-
-%triggerin jensen -- kudzu
-[ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade || :
-
-
-# Old kernel-headers packages owned include symlinks; new
-# ones just make them so that we can have multiple kernel-headers
-# packages installed.
-
-%triggerpostun source -- kernel-headers < 2.2.16
-cd /usr/src
-rm -f %{kslnk}
-ln -snf linux-%{KVERREL} %{kslnk}
-exit 0
-
-%post source
-cd /usr/src
-rm -f %{kslnk}
-ln -snf linux-%{KVERREL} %{kslnk}
-
-%postun source
-if [ -L /usr/src/%{kslnk} ]; then 
-    if [ -L /usr/src/%{kslnk} -a `ls -ld /usr/src/%{kslnk} 2>/dev/null| awk '{ print $11 }'` = "linux-%{KVERREL}" ]; then
-       [ $1 = 0 ] && rm -f /usr/src/%{kslnk}
-    fi
-fi
-exit 0
-
-%preun -n lustre-lite-utils
-if [ $1 = 0 -a -f /etc/init.d/lustre ]; then
-       /sbin/chkconfig --del lustre
-       /sbin/chkconfig --del lustrefs
-fi
-
-###
-### file lists
-###
-
-%if %{buildup}
-%files
-%defattr(-, root, root)
-/boot/%{kernel_glob}
-%ifarch ia64
-/boot/efi/redhat/%{kernel_glob}
-%endif
-/boot/System.map-%{KVERREL}
-/boot/config-%{KVERREL}
-%dir /lib/modules
-%dir /dev/shm
-/lib/modules/%{KVERREL}
-%if %{linux26}
-/boot/Kerntypes-%{KVERREL}
-/boot/symvers-%{KVERREL}-%{_target_cpu}.gz
-%endif # linux26
-%endif
-
-%if %{buildsmp}
-%files smp
-%defattr(-, root, root)
-/boot/%{kernel_glob}smp
-%ifarch ia64
-/boot/efi/redhat/%{kernel_glob}smp
-%endif
-/boot/System.map-%{KVERREL}smp
-/boot/config-%{KVERREL}smp
-%dir /lib/modules
-%dir /dev/shm
-/lib/modules/%{KVERREL}smp
-%if %{linux26}
-/boot/Kerntypes-%{KVERREL}smp
-/boot/symvers-%{KVERREL}-%{_target_cpu}smp.gz
-%endif # linux26
-%endif
-
-%if %{buildbigsmp}
-%files bigsmp
-%defattr(-, root, root)
-/boot/%{kernel_glob}bigsmp
-%ifarch ia64
-/boot/efi/redhat/%{kernel_glob}bigsmp
-%endif
-/boot/System.map-%{KVERREL}bigsmp
-/boot/config-%{KVERREL}bigsmp
-%dir /lib/modules
-%dir /dev/shm
-/lib/modules/%{KVERREL}bigsmp
-%if %{linux26}
-/boot/Kerntypes-%{KVERREL}bigsmp
-/boot/symvers-%{KVERREL}-%{_target_cpu}bigsmp.gz
-%endif # linux26
-%endif
-
-%if %{buildbigmem}
-%files bigmem
-%defattr(-, root, root)
-/boot/%{kernel_glob}bigmem
-%ifarch ia64
-/boot/efi/redhat/%{kernel_glob}bigmem
-%endif
-/boot/System.map-%{KVERREL}bigmem
-/boot/config-%{KVERREL}bigmem
-%dir /lib/modules
-%dir /dev/shm
-/lib/modules/%{KVERREL}bigmem
-%if %{linux26}
-/boot/Kerntypes-%{KVERREL}bigmem
-/boot/symvers-%{KVERREL}-%{_target_cpu}bigmem.gz
-%endif # linux26
-%endif
-
-%if %{buildBOOT}
-%files BOOT
-%defattr(-, root, root)
-/boot/%{kernel_glob}BOOT
-%ifarch ia64
-/boot/efi/redhat/%{kernel_glob}BOOT
-%endif
-/boot/System.map-%{KVERREL}BOOT
-/boot/config-%{KVERREL}BOOT
-%dir /lib/modules
-%dir /dev/shm
-/lib/modules/%{KVERREL}BOOT
-%if %{linux26}
-/boot/Kerntypes-%{KVERREL}BOOT
-/boot/symvers-%{KVERREL}-%{_target_cpu}BOOT.gz
-%endif # linux26
-%endif
-
-%if %{buildbase}
-
-%if 1
-%files source
-%defattr(-,root,root)
-%dir /usr/src/linux-%{KVERREL}
-/usr/src/linux-%{KVERREL}/*
-%if %{linux26}
-%dir /usr/src/linux-%{KVERREL}-obj
-/usr/src/linux-%{KVERREL}-obj/*
-%endif # linux26
-%endif
-
-%files doc
-%defattr(-,root,root)
-%doc lustre/linux/Documentation/*
-
-%files -n lustre-lite-utils
-%defattr(-, root, root)
-%doc lustre/COPYING lustre/BUGS lustre/ChangeLog lustre/README lustre/doc/lustre.pdf
-/sbin/*
-/usr/sbin/*
-/usr/bin/*
-/usr/lib/lustre/python
-@ENABLE_INIT_SCRIPTS@/etc/init.d/lustre
-@ENABLE_INIT_SCRIPTS@/etc/init.d/lustrefs
-/usr/include/lustre/*
-/usr/include/portals/*
-/usr/include/linux/*
-/usr/lib/lib*.a
-/usr/share/man/man?/*
-
-#%files -n lustre-doc
-#%defattr(-, root, root)
-#/usr/share/doc/lustre/COPYING
-#/usr/share/doc/lustre/lustre.pdf
-#/usr/share/doc/lustre/COPYING
-
-/usr/share/lustre/examples
-
-%files -n lustre-ldap
-%defattr(-, root, root)
-/etc/openldap/slapd-lustre.conf
-/etc/openldap/schema/lustre.schema
-/usr/lib/lustre/lustre2ldif.xsl
-/usr/lib/lustre/top.ldif
-
-%endif # %{buildbase}
diff --git a/lustre/scripts/lustre.spec.in b/lustre/scripts/lustre.spec.in
deleted file mode 100644 (file)
index 3d036a7..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-# lustre.spec
-%define version @VERSION@
-%define kversion @LINUXRELEASE@
-%define linuxdir @LINUX@
-%define enable_doc @ENABLE_DOC@
-
-Summary: Lustre Lite File System
-Name: lustre-lite
-Version: %{version}
-Release: @RELEASE@
-Copyright: GPL
-Group: Utilities/System
-Requires: lustre-modules, PyXML
-Source: ftp://ftp.lustre.com/pub/lustre/lustre-%{version}.tar.gz
-BuildRoot: /var/tmp/lustre-%{version}-root
-
-%description
-The Lustre Lite Cluster File System: kernel drivers for file system,
-servers and utilities.
-
-%package -n lustre-modules
-Summary: Kernel Lustre drivers for Linux %{kversion}
-Requires: modutils >= 2.4.10
-Group: Development/Kernel
-
-%description -n lustre-modules
-Lustre file System, server and network drivers for Linux %{kversion}.
-
-%package -n lustre-source
-Summary: Object-Based Disk storage driver source
-Group: Development/Kernel
-
-%description -n lustre-source
-Lustre Lite Source for further development
-
-%package -n lustre-doc
-Summary: Documentation and sample configuration files
-Group: Documentation
-# FIXME: BuildArch overrides all the packages in rpm 4.0.4-7x
-#BuildArch: noarch
-
-%description -n lustre-doc
-Documentation and sample configuration files for Lustre
-
-%package -n lustre-ldap
-Summary: Configures openldap server for LDAP Lustre config database
-Group: Configuration
-Requires: openldap-servers, openldap-clients, python-ldap, 4Suite
-
-%description -n lustre-ldap
-Configures openldap server for LDAP Lustre config database
-
-
-#%package -n liblustre
-#Summary: Lustre Lib
-#Group: Development/Kernel
-
-#%description -n liblustre
-#Lustre lib binary package.
-
-%prep
-%setup -qn lustre-%{version}
-#%setup -c -n lustre-%{version}-lib
-%if %{enable_doc}
-  %define disable_doc ''
-%else
-  %define disable_doc --disable-doc
-%endif
-
-%build
-# if RPM_BUILD_NCPUS unset, set it
-if [ -z "$RPM_BUILD_NCPUS" ] ; then
-    RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat || :)
-    if [ $RPM_BUILD_NCPUS -eq 0 ] ; then
-        RPM_BUILD_NCPUS=1
-    fi
-    if [ $RPM_BUILD_NCPUS -gt 8 ] ; then
-        RPM_BUILD_NCPUS=8
-    fi
-fi
-
-rm -rf $RPM_BUILD_ROOT
-
-# Set an explicit path to our Linux tree, if we can.
-cd $RPM_BUILD_DIR/lustre-%{version}
-./configure \
-       --with-linux='%{linuxdir}' \
-       %{disable_doc} --disable-liblustre \
-       --sysconfdir=%{_sysconfdir} \
-       --mandir=%{_mandir} \
-       --libdir=%{_libdir}
-make -j $RPM_BUILD_NCPUS -s
-
-%install
-cd $RPM_BUILD_DIR/lustre-%{version}
-make install DESTDIR=$RPM_BUILD_ROOT
-
-%ifarch alpha
-# this hurts me
-  conf_flag=
-  linuxdir=%{linuxdir}
-  test -d $linuxdir && conf_flag=--with-linux=$linuxdir
-  make clean
-  ./configure --enable-rtscts-myrinet $conf_flag %{disable_doc}
-  make
-  cp linux/rtscts/rtscts.o $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/net/lustre/rtscts_myrinet.o
-  cp user/myrinet_utils/mcpload $RPM_BUILD_ROOT/usr/sbin/mcpload
-%endif
-
-# Create the pristine source directory.
-cd $RPM_BUILD_DIR/lustre-%{version}
-mkdir -p $RPM_BUILD_ROOT/usr/src
-rm -f lustre-source
-ln -s $RPM_BUILD_ROOT/usr/src lustre-source
-make distdir distdir=lustre-source/lustre-%{version}
-
-# ldap database directory
-mkdir -p $RPM_BUILD_ROOT/var/lib/ldap/lustre
-
-%files
-%attr(-, root, root) /sbin/mount.lustre
-%attr(-, root, root) /usr/sbin/lmc
-%attr(-, root, root) /usr/sbin/lctl
-%attr(-, root, root) /usr/sbin/lconf
-%attr(-, root, root) /usr/sbin/lrun
-%attr(-, root, root) /usr/sbin/llmount
-%attr(-, root, root) /usr/sbin/lwizard
-%attr(-, root, root) /usr/sbin/wiretest
-%attr(-, root, root) /usr/sbin/lactive
-%attr(-, root, root) /usr/sbin/llanalyze
-%attr(-, root, root) /usr/sbin/gmnalnid
-%attr(-, root, root) /usr/sbin/llstat.pl
-%attr(-, root, root) /usr/sbin/llobdstat.pl
-%attr(-, root, root) /usr/sbin/load_ldap.sh
-%attr(-, root, root) /usr/sbin/acceptor
-%attr(-, root, root) /usr/sbin/ptlctl
-%attr(-, root, root) /usr/sbin/debugctl
-%attr(-, root, root) /usr/sbin/lload
-%attr(-, root, root) /usr/sbin/obdbarrier
-%attr(-, root, root) /usr/sbin/obdio
-%attr(-, root, root) /usr/sbin/routerstat
-%attr(-, root, root) /usr/sbin/wirecheck
-%attr(-, root, root) /usr/bin/lfs
-%attr(-, root, root) /usr/bin/lfind
-%attr(-, root, root) /usr/bin/lstripe
-%attr(-, root, root) /usr/bin/mcreate
-%attr(-, root, root) /usr/bin/munlink
-%attr(-, root, root) %{_libdir}/lustre/python
-%attr(-, root, root) /usr/share/lustre/examples
-
-%attr(-, root, root) /etc/init.d/lustre
-%attr(-, root, root) /etc/init.d/lustrefs
-
-%attr(-, root, root) %{_libdir}/libptlctl.a
-%attr(-, root, root) %{_libdir}/liblustreapi.a
-%attr(-, root, root) /usr/include/lustre
-%attr(-, root, root) /usr/include/portals
-%attr(-, root, root) /usr/include/linux/lustre_idl.h
-
-%attr(-, root, root) /usr/share/man/man?/*
-
-%ifarch alpha
-%attr(-, root, root) /usr/sbin/mcpload
-%endif
-
-%files -n lustre-doc
-%attr(-, root, root) %doc COPYING FDL
-%if %{enable_doc}
-%attr(-, root, root) %doc doc/lustre.pdf doc/lustre-HOWTO.txt
-%endif
-#%attr(-, root, root) %doc tests/client-echo.cfg tests/client-mount.cfg
-#%attr(-, root, root) %doc tests/client-mount2.cfg
-#%attr(-, root, root) %doc tests/elan-client.cfg tests/elan-server.cfg
-#%attr(-, root, root) %doc tests/ldlm.cfg tests/lustre.cfg
-#%attr(-, root, root) %doc tests/mds.cfg tests/net-client.cfg
-#%attr(-, root, root) %doc tests/net-local.cfg tests/net-server.cfg
-#%attr(-, root, root) %doc tests/obdecho.cfg tests/obdfilter.cfg
-
-%files -n lustre-modules
-%attr(-, root, root) %doc COPYING
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre
-#portals modules
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/net/lustre
-
-%files -n lustre-source
-%attr(-, root, root) /usr/src/lustre-%{version}
-
-#%ifarch i386
-#%files -n liblustre
-#%attr(-, root, root) /lib/lustre
-#%attr(-, root, root) /usr/sbin/lctl
-#%attr(-, root, root) /usr/sbin/lfind
-#%attr(-, root, root) /usr/sbin/lstripe
-#%attr(-, root, root) /usr/sbin/obdio
-#%attr(-, root, root) /usr/sbin/obdbarrier
-#%attr(-, root, root) /usr/sbin/obdstat
-#%attr(-, root, root) /usr/sbin/lload
-#%attr(-, root, root) /usr/sbin/lconf
-#%attr(-, root, root) /usr/sbin/lmc
-#%attr(-, root, root) /usr/sbin/llanalyze
-#%endif
-
-
-%files -n lustre-ldap
-%attr(-, root, root) /etc/openldap/slapd-lustre.conf
-%attr(-, root, root) /etc/openldap/schema/lustre.schema
-%attr(-, root, root) /usr/share/lustre/lustre2ldif.xsl
-%attr(-, root, root) /usr/share/lustre/top.ldif
-#%dir /var/lib/ldap/lustre
-%attr(700, ldap, ldap) /var/lib/ldap/lustre
-
-%post
-/sbin/chkconfig --add lustre
-/sbin/chkconfig --add lustrefs
-
-%preun
-if [ $1 = 0 ]; then
-  /sbin/chkconfig --del lustre
-  /sbin/chkconfig --del lustrefs
-fi
-
-%post -n lustre-modules
-if [ ! -e /dev/obd ]; then
-   mknod /dev/obd c 10 241
-fi
-if [ ! -e /dev/portals ]; then
-   mknod /dev/portals c 10 240
-fi
-depmod -ae || exit 0
-
-%postun -n lustre-modules
-depmod -ae || exit 0
-
-%clean
-#rm -rf $RPM_BUILD_ROOT
-
-# end of file
diff --git a/lustre/scripts/merge1.sh b/lustre/scripts/merge1.sh
deleted file mode 100755 (executable)
index c2d642f..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/sh -e 
-
-CONFLICTS=cvs-merge-conflicts
-CVS="cvs -z3"
-
-if [ -f .mergeinfo ] ; then
-    echo ".mergeinfo exists - clean up first"
-    exit 
-fi
-
-if [ -f $CONFLICTS ] ; then
-    echo "$CONFLICTS exists - clean up first"
-    exit 
-fi
-
-if [ $# != 2 ]; then
-    echo "This is phase 1 of merging branches. Usage: $0 parent child"
-    exit
-fi
-
-parent=$1
-PARENT=`echo $parent | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
-child=$2
-CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
-date=`date +%Y%m%d_%H%M`
-module=lustre
-
-case $parent in
-  HEAD) : ;;
-  b_*|b[1-4]*) : ;;
-  *) parent="b_$parent" ;;
-esac
-case $child in
-  HEAD) : ;;
-  b_*|b[1-4]*) : ;;
-  *) child="b_$child"
-esac
-
-if [ "$child" != "HEAD" -a "`cat CVS/Tag 2> /dev/null`" != "T$child" ]; then
-       echo "This script must be run within the $child branch"
-       exit 1
-fi
-
-TEST_FILE=${TEST_FILE:-ChangeLog} # does this need to be smarter?
-check_tag() {
-       [ -z "$1" ] && echo "check_tag() missing arg" && exit3
-       [ "$1" = "HEAD" ] && return
-       $CVS log $TEST_FILE 2> /dev/null | grep -q "    $1: " && return
-       echo "$0: tag $1 not found in $TEST_FILE"
-       exit 2
-}
-
-check_tag $parent
-check_tag ${CHILD}_BASE
-
-cat << EOF > .mergeinfo
-parent=$parent
-PARENT=$PARENT
-child=$child
-CHILD=$CHILD
-date=$date
-module=$module
-CONFLICTS=$CONFLICTS
-OPERATION=Merge
-OPERWHERE=from
-EOF
-
-echo PARENT: $PARENT parent: $parent CHILD: $CHILD child: $child date: $date
-
-echo -n "tagging $parent as '${PARENT}_${CHILD}_UPDATE_PARENT_$date' ...."
-$CVS rtag -r $parent ${PARENT}_${CHILD}_UPDATE_PARENT_$date $module
-echo "done"
-echo -n "tagging $child as '${PARENT}_${CHILD}_UPDATE_CHILD_$date' ...."
-$CVS rtag -r $child ${PARENT}_${CHILD}_UPDATE_CHILD_$date $module
-echo "done"
-
-# Apply all of the changes to your local tree:
-echo "Updating: -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_UPDATE_PARENT_$date ...."
-$CVS update -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_UPDATE_PARENT_$date -dP
-echo "done"
-
-echo -n "Recording conflicts in $CONFLICTS ..."
-if $CVS update | awk '/^C/ { print $2 }' > $CONFLICTS; then
-    echo "Conflicts found, fix before committing."
-    cat $CONFLICTS
-else 
-    echo "No conflicts found"
-    rm -f $CONFLICTS
-fi
-echo "done"
-
-echo "Build, test, commit and then run merge2.sh (no arguments)"
diff --git a/lustre/scripts/merge2.sh b/lustre/scripts/merge2.sh
deleted file mode 100755 (executable)
index 43586f0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh -e 
-
-if [ ! -f .mergeinfo ] ; then
-    echo ".mergeinfo doesn't exist - exit"
-    exit 
-fi
-
-. .mergeinfo
-
-if [ -f $CONFLICTS ] ; then
-    echo "$CONFLICTS exists - clean up first"
-    cat $CONFLICTS
-    exit 
-fi
-
-cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1
-
-echo -n "Tagging ${PARENT}_${CHILD}_UPDATE_PARENT_$date as ${CHILD}_BASE_$date ..."
-cvs rtag -r ${PARENT}_${CHILD}_UPDATE_PARENT_$date ${CHILD}_BASE_$date $module
-echo  "done"
-echo -n "Tagging ${CHILD}_BASE as ${CHILD}_BASE_PREV ...."
-cvs rtag -F -r ${CHILD}_BASE ${CHILD}_BASE_PREV $module
-echo  "done"
-echo "${CHILD}_BASE_$date as ${CHILD}_BASE ..."
-cvs rtag -F -r ${CHILD}_BASE_$date ${CHILD}_BASE $module
-
-echo "saving .mergeinfo as .mergeinfo-$date"
-mv .mergeinfo .mergeinfo-$date
-echo  "done"