Whamcloud - gitweb
LU-12561 build: Remove old lbuild entries 53/35553/3
authorPatrick Farrell <pfarrell@whamcloud.com>
Thu, 18 Jul 2019 04:13:05 +0000 (00:13 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 27 Jul 2019 00:21:10 +0000 (00:21 +0000)
Remove lbuild entries for 2.6 based kernels (and earlier).

Test-Parameters: trivial

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I4bb3dcf9e9b4402d7f4e86bbd54f7d9d62efdc48
Reviewed-on: https://review.whamcloud.com/35553
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
contrib/lbuild/funcs.sh
contrib/lbuild/lbuild
contrib/lbuild/lbuild-fc11 [deleted file]
contrib/lbuild/lbuild-fc12 [deleted file]
contrib/lbuild/lbuild-rhel5 [deleted file]
contrib/lbuild/lbuild-rhel6 [deleted file]
contrib/lbuild/lbuild-sles10 [deleted file]
contrib/lbuild/lbuild-sles11 [deleted file]

index be8f696..2f864ae 100644 (file)
@@ -190,23 +190,14 @@ autodetect_target() {
 
     local target=""
     case ${distro} in
-          oel5*)  target="2.6-oel5";;
-         rhel5*)  target="2.6-rhel5";;
-         rhel6.9) target="2.6-rhel6.9";;
-         rhel6.8) target="2.6-rhel6.8";;
-         rhel6.7) target="2.6-rhel6.7";;
-         rhel6.6) target="2.6-rhel6.6";;
-         rhel6*)  target="2.6-rhel6";;
          rhel7*)  target="3.10-rhel7";;
          rhel8*)  target="4.18-rhel8";;
-        sles10*)  target="2.6-sles10";;
         sles11.4) target="$(uname -r | cut -d . -f 1,2)-sles11sp4";;
         sles11.3) target="$(uname -r | cut -d . -f 1,2)-sles11sp3";;
         sles11*)  target="$(uname -r | cut -d . -f 1,2)-sles11";;
         sles12.4) target="$(uname -r | cut -d . -f 1,2)-sles12sp4";;
         sles12.3) target="$(uname -r | cut -d . -f 1,2)-sles12sp3";;
         sles12*)  target="$(uname -r | cut -d . -f 1,2)-sles12";;
-          fc15)   target="2.6-fc15";;
           fc18)   target="3.x-fc18";;
              *)   fatal 1 "I don't know what distro $distro is.\nEither update autodetect_target() or use the --target argument.";;
     esac
index 7acbb3f..6a1ab0a 100755 (executable)
@@ -323,38 +323,9 @@ check_options() {
         3.10-rhel7*)
             CANONICAL_TARGET="rhel7"
             ;;
-        2.6-rhel6*)
-            CANONICAL_TARGET="rhel6"
-            ;;
-        2.6-rhel5)
-            CANONICAL_TARGET="rhel5"
-            ;;
-        2.6-rhel4)
-            CANONICAL_TARGET="rhel-2.6"
-            ;;
-        2.6-suse)
-            CANONICAL_TARGET="sles-2.6"
-            ;;
-        2.6-sles10)
-            CANONICAL_TARGET="sles10-2.6"
-            ;;
-        2.6-sles11 | 3.0-sles11)
+        3.0-sles11)
             CANONICAL_TARGET="sles11"
             ;;
-        2.6-oel5)
-            CANONICAL_TARGET="oel5"
-            ;;
-        hp_pnnl-2.4)
-            CANONICAL_TARGET="hp-pnnl-2.4"
-            ;;
-        2.6-vanilla \
-            | suse-2.4.21-2 \
-            | rh-2.4 \
-            | rhel-2.4 \
-            | sles-2.4 \
-            | 2.6-patchless)
-                CANONICAL_TARGET="$TARGET"
-                ;;
     esac
 
     local timestampnodig=$(echo $TIMESTAMP | sed -e s/[0-9]*//g)
diff --git a/contrib/lbuild/lbuild-fc11 b/contrib/lbuild/lbuild-fc11
deleted file mode 100644 (file)
index e705538..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-
-# Replace i686 with i586 for fc11.
-# Please see find_linux_devel_paths() in lbuild-rhel5 file for more details.
-if [ $TARGET_ARCH == 'i686' ]; then
-        DEVEL_PATH_ARCH="i586"
-fi
-source ${LBUILD_DIR}/lbuild-fc
-
-# increment this if you have made a change that should force a new kernel
-# to build built
-#BUILD_GEN=1
-#BUILD_GEN=2   # bz19952: remove -lustre tag from kernel RPM names
-#BUILD_GEN=3   # bz19975 enable the building of src.rpms by default
-BUILD_GEN+=".0"        # TT-107: don't cache the BUILD dir (reset major to 5)
-
-
diff --git a/contrib/lbuild/lbuild-fc12 b/contrib/lbuild/lbuild-fc12
deleted file mode 100644 (file)
index 7e54a85..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-
-source ${LBUILD_DIR}/lbuild-fc
-
-# increment this if you have made a change that should force a new kernel
-# to build built
-#BUILD_GEN=1
-#BUILD_GEN=2   # bz19952: remove -lustre tag from kernel RPM names
-#BUILD_GEN=3   # bz19975 enable the building of src.rpms by default
-BUILD_GEN+=".0"        # TT-107: don't cache the BUILD dir (reset major to 5)
diff --git a/contrib/lbuild/lbuild-rhel5 b/contrib/lbuild/lbuild-rhel5
deleted file mode 100644 (file)
index 887dd56..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-
-# increment this if you have made a change that should force a new kernel
-# to be built for this release of this distribution (only -- if you want to
-# force a kernel build on all releases of this distribution, update the BUILD_GEN
-# variable in build/lbuild-rhel and if you want to force kernel bulid for all
-# distributions, update the BUILD_GEN variable in build/lbuild)
-BUILD_GEN+=".0"
-
-# This distro does not support zfs, so define WITH_ZFS
-# use words that make the bash log readable.
-WITH_ZFS="Zfs Not Supported"
-
-source ${LBUILD_DIR}/lbuild-rhel
-
-SPEC_NAME="kernel-2.6.spec"
-
-patch_spec() {
-    local buildid="$1"
-
-    # edit the SPEC with our changes
-    patch_spec_common "$buildid"
-    sed -i -e '/^# empty final patch file to facilitate testing of kernel patches/i\
-# adds Lustre patches\
-Patch99995: linux-%{kversion}-lustre.patch' \
-           -e '/^# conditionally applied test patch for debugging convenience/i\
-# lustre patch\
-%patch99995 -p1\
-' \
-           -e '/-e $RPM_SOURCE_DIR\/kabi_whitelist_/i\
-    rm -f $RPM_SOURCE_DIR/kabi_whitelist_%{_target_cpu}$Flavour' \
-           -e '/_sourcedir\/kabitool -b \./a\
-    cp $RPM_BUILD_ROOT/kabi_whitelist $RPM_SOURCE_DIR/kabi_whitelist_%{_target_cpu}$Flavour' \
-           -e '/^%prep$/,/^# END OF PATCH APPLICATIONS$/s/kernel-%{kversion}/%{name}-%{kversion}/g' \
-    -e 's/^\(%define signmodules \).*/\10/' \
-          SPECS/$SPEC_NAME 2>&1 || \
-        fatal 1 "Error while editing SPECS/$SPEC_NAME"
-
-    if $KERNEL_LUSTRE_NAMING; then
-        # these are all of the changes needed because we change the package names
-        # to kernel-lustre-*.  these should all go away when we stop this insanity
-        sed -i -e 's/^\(Name:.*kernel\)/\1-lustre/' \
-               -e '/^Provides: glibc-kernheaders = /a\
-Provides: kernel-headers = %{rpmversion}-%{release}
-Obsoletes: kernel-headers
-' \
-               -e '/^Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}$/a\
-Provides: kernel = %{rpmversion}-%{release}
-' \
-               -e '/^Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}$/a\
-Provides: kernel-devel = %{rpmversion}-%{release}
-Obsoletes: kernel-devel
-' \
-               -e '/^Provides: %{name}-debuginfo-common-%{_target_cpu} = %{KVERREL}$/a\
-Provides: kernel-debuginfo-common = %{KVERREL}
-Obsoletes: kernel-debuginfo-common
-' \
-               -e '/^Provides: %{name}-debuginfo-%{_target_cpu} = %{KVERREL}$/a\
-Provides: kernel-debuginfo = %{KVERREL}
-Obsoletes: kernel-debuginfo
-' \
-              SPECS/$SPEC_NAME 2>&1 || \
-            fatal 1 "Error while editing SPECS/$SPEC_NAME"
-    fi
-
-    # finally, work around RH bug 491775, if needed
-    if ! grep -q "cp -a asm-x86_64 \$RPM_BUILD_ROOT/lib/modules/\$KernelVer/build/include" \
-              SPECS/$SPEC_NAME; then
-        # XXX - i wonder if we will need to do this ad-hoc patching enough to
-        #       formalize a patching system.  let's assume not for the time
-        #       being.
-        patch -s -p0 <<"EOF" 2>&1 || \
-            fatal 1 "Error while patching SPECS/$SPEC_NAME"
---- SPECS/$SPEC_NAME.dist      2009-03-23 20:30:55.000000000 -0400
-+++ SPECS/$SPEC_NAME   2009-03-23 20:37:03.000000000 -0400
-@@ -6961,6 +6961,10 @@
-     cd include
-     cp -a acpi config keys linux math-emu media mtd net pcmcia rdma rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-     cp -a `readlink asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-+    if [ "$Arch" = "i386" ]; then
-+      mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/asm-x86_64
-+      cp -a asm-x86_64/{stacktrace,k8,pci-direct}.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/asm-x86_64
-+    fi
-     if [ "$Arch" = "x86_64" ]; then
-       cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-     fi
-EOF
-    fi
-
-    return 0
-
-}
-
-unpack_linux_devel_rpm-rhel5() {
-    local callers_rpm="$1"
-
-    unpack_linux_devel_rpm-rhel "$callers_rpm"
-
-    if $USE_KABI; then
-        if [ ! -f usr/src/kernels/${lnxmaj}${lnxmin}-${lnxrel}-$TARGET_ARCH/symsets-${lnxmaj}${lnxmin}-${lnxrel}.tar.gz ]; then
-            fatal 1 "cannot build modules: the Kernel's symsets is missing."
-        fi
-    fi
-
-    return 0
-
-}
-
-find_linux_rpm-rhel5() {
-    local prefix="$1"
-    local wanted_kernel="$2"
-    local pathtorpms=${3:-"$KERNELRPMSBASE/$lnxmaj/$DISTROMAJ/$TARGET_ARCH"}
-
-    find_linux_rpm-rhel "$prefix" "$wanted_kernel" "$pathtorpms"
-}
-
-kernel_srpm_location() {
-
-    echo "http://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/"
-
-}
diff --git a/contrib/lbuild/lbuild-rhel6 b/contrib/lbuild/lbuild-rhel6
deleted file mode 100644 (file)
index ea5f025..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-
-# increment this if you have made a change that should force a new kernel
-# to be built for this release of this distribution (only -- if you want to
-# force a kernel build on all releases of this distribution, update the BUILD_GEN
-# variable in build/lbuild-rhel and if you want to force kernel bulid for all
-# distributions, update the BUILD_GEN variable in build/lbuild)
-#BUILD_GEN+=".0"
-#BUILD_GEN+=".1"               # added --with firmware to rpmbuild for rhel6
-#BUILD_GEN+=".0"       # TT-107: don't cache the BUILD dir (reset major to 5)
-BUILD_GEN+=".1"        # LU-1361: enable kernel ABI
-
-source ${LBUILD_DIR}/lbuild-rhel
-
-SPEC_NAME="kernel.spec"
-DEVEL_PATH_ARCH_DELIMETER="."
-USE_KABI=true
-
-patch_spec() {
-    local buildid="$1"
-
-    # edit the SPEC with our changes
-    patch_spec_common "$buildid"
-    sed -i -e '/^# empty final patch file to facilitate testing of kernel patches/i\
-# adds Lustre patches\
-Patch99995: linux-%{version}-lustre.patch' \
-           -e '/^ApplyOptionalPatch linux-kernel-test.patch/i\
-\
-# lustre patch\
-ApplyOptionalPatch linux-%{version}-lustre.patch\
-' \
-           -e "/rm -f include\/generated\/kernel.cross/i\\
-  # lustre kernel config.\\
-  if [ -f %{_topdir}/lustre/lustre/kernel_patches/kernel_configs/kernel-%{version}-$TARGET-%{_target_cpu}.config ]; then\\
-    echo \"# \$Arch\" > configs/kernel-%{version}-%{_target_cpu}.config\\
-    cat %{_topdir}/lustre/lustre/kernel_patches/kernel_configs/kernel-%{version}-$TARGET-%{_target_cpu}.config >> configs/kernel-%{version}-%{_target_cpu}.config\\
-  fi"\
-          SPECS/$SPEC_NAME 2>&1 || \
-        fatal 1 "Error while editing SPECS/$SPEC_NAME"
-
-    return 0
-
-}
-
-unpack_linux_devel_rpm-rhel6() {
-    local callers_rpm="$1"
-
-    unpack_linux_devel_rpm-rhel "$callers_rpm"
-
-
-    return 0
-
-}
-
-get_rpmbuildopts() {
-
-    if $KERNEL_LUSTRE_NAMING; then
-        echo -e "--define \"variant -lustre\" \c"
-    fi
-    echo "--with firmware"
-
-    return 0
-
-}
-
-find_linux_rpm-rhel6() {
-    local prefix="$1"
-    local wanted_kernel="$2"
-    local pathtorpms=${3:-"$KERNELRPMSBASE/$lnxmaj/$DISTROMAJ/$TARGET_ARCH"}
-
-    find_linux_rpm-rhel "$prefix" "$wanted_kernel" "$pathtorpms"
-
-}
-
-kernel_srpm_location() {
-
-    echo "http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/"
-
-}
-
-kernel_debuginfo_location() {
-
-       echo "http://debuginfo.centos.org/6/x86_64/"
-
-}
diff --git a/contrib/lbuild/lbuild-sles10 b/contrib/lbuild/lbuild-sles10
deleted file mode 100644 (file)
index 003ec28..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-
-# increment this if you have made a change that should force a new kernel
-# to build built for this distribution (only -- if you want to force a kernel
-# build on all distributions, update the BUILD_GEN variable in build/lbuild)
-BUILD_GEN+=".0"
-
-source ${LBUILD_DIR}/lbuild-sles
-
-kernel_srpm_location() {
-
-    local PLEV=$(sed -n -e 's/^PATCHLEVEL = //p' /etc/SuSE-release)
-    echo "https://nu.novell.com/repo/\$RCE/SLES11-SP${PLEV}-Updates/sle-11-$(resolve_arch $TARGET_ARCH)/rpm/src/"
-
-}
-
-# the location of the ofed-devel-<version>.<arch>.rpm
-OFED_DEVEL_LOCATION="$KERNELTREE"
-
-# do we want to rebuild the OFED devel RPM or use the supplied one?
-REBUILD_OFED_DEVEL_RPM=${REBUILD_OFED_DEVEL_RPM:-false}
-
-edit_specs() {
-
-    # edit the SPECs with our changes
-    local spec
-    for spec in $RPMSMPTYPE source; do
-        #cp $TOPDIR/SOURCES/kernel-$spec.spec{,.orig}
-        sed -i -e "s/^Release:.*/&_${buildid}/" \
-               -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\
-! grep -q lustre.patch %_sourcedir/series.conf && echo -e "\\n\\tlustre.patch" >> %_sourcedir/series.conf' \
-               -e "/flavor=\${config/a\
-    [ \"\$flavor\" == \"$RPMSMPTYPE\" ] || continue" \
-          SOURCES/kernel-${spec}.spec || fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
-
-        if $KERNEL_LUSTRE_NAMING; then
-            # these are all of the changes needed because we change the package names
-            # to kernel-lustre-*.  these should all go away when we stop this insanity
-            sed -i -e 's/^\(Name:.*kernel-\)\(.*\)/\1lustre-\2/' \
-                   -e "/^Provides:  *kernel = /a\
-Provides:       kernel-$spec = %{version}-%{release}
-" \
-                   -e 's/\(.*\)\([^#].*\)fookernel-source/\1\2kernel-lustre-source/g' \
-                   -e '/^%build/,/^%changelog/s/kernel-\({*\)source/kernel-\1lustre-source/g' \
-              SOURCES/kernel-${spec}.spec || fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
-        fi
-
-    # XXX - a building-on-Ubuntu hack
-    if grep -q "Ubuntu" /etc/issue; then
-        sed -i -e '/^%_sourcedir\/install-configs %_sourcedir .*/i\
-curl ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm1/broken-out/i386-use-c-code-for-current_thread_info.patch | patch -p1' \
-               -e 's/^\(BuildRequires: .*\)$/#NOU \1/g' \
-               -e 's/%(\(chmod .*\))$/%(bash -c "\1")/' \
-               -e 's/ -a 109//' \
-          SOURCES/kernel-${spec}.spec || fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
-     fi
-    done
-}
-
-unpack_linux_devel_rpm-sles10() {
-    local callers_rpm="$1"
-
-    # get the Module.symvers out of the kenrel-flavor RPM
-    local kernelrpm=${callers_rpm/-source-/-$RPMSMPTYPE-}
-
-    if ! rpm2cpio < "$kernelrpm" | cpio -id ./usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$(resolve_arch $TARGET_ARCH $PATCHLESS true)/$RPMSMPTYPE/Module.symvers ./boot/sym\* > /dev/null 2>&1; then
-        return 255
-    fi
-
-    # now just sanity check that everything needed to build properly versioned
-    # modules is in place
-    if [ ! -f usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$(resolve_arch $TARGET_ARCH $PATCHLESS true)/$RPMSMPTYPE/Module.symvers ]; then
-        fatal 1 "cannot build kernel modules: the Kernel's Module.symvers is missing."
-    fi
-    if [ ! -f boot/symsets-${lnxmaj}${lnxmin}-${lnxrel}-$RPMSMPTYPE.tar.gz ]; then
-        fatal 1 "cannot build modules: the Kernel's symsets is missing."
-    fi
-
-    return 0
-
-}
-
-build_sles_ofed_rpm() {
-    local variant="${1:+-$1}"
-    local add_spec_edit="$2"
-
-    if $REBUILD_OFED_DEVEL_RPM; then
-        #
-        # rebuild the $variant rpm
-        #
-
-        local SOURCE="${KERNELTREE}/ofed${variant}-${OFED_DEVEL_VERSION}.src.rpm"
-
-        # dirty hack until Novell make the kernel-source location overridable
-        # - unpack the src.rpm, patch the .spec and re-pack up the src.rpm
-        mkdir -p ofed-rpm/S{PEC,OURCE,RPM}S
-        pushd ofed-rpm
-        rpm2cpio < $KERNELTREE/ofed${variant}-${OFED_DEVEL_VERSION}.src.rpm | cpio -id
-        ed ofed${variant}.spec <<"EOF"
-/^%define kver /c
-%define kver %(flavors=($(ls %kobjdir/%_target_cpu/)); if test -s %kobjdir/%_target_cpu/${flavors[0]}/include/linux/utsrelease.h ; then LINUXRELEASEHEADER=utsrelease.h; else LINUXRELEASEHEADER=version.h; fi; sed -ne "/^#define UTS_RELEASE/s/.*\\"\\\(.*\\\)-${flavors[0]}\\"$/\\1/p" %kobjdir/%_target_cpu/${flavors[0]}/include/linux/$LINUXRELEASEHEADER)
-.
-/^             --kernel-version=%kver-$flavor --kernel-sources=\/usr\/src\/linux-obj\/%_target_cpu\/\$flavor/c
-               --kernel-version=%kver-$flavor --kernel-sources=%kobjdir/%_target_cpu/$flavor
-.
-/^     make -C \/usr\/src\/linux-obj\/%_target_cpu\/\$flavor modules_install \\/c
-     make -C %kobjdir/%_target_cpu/$flavor modules_install \
-.
-wq
-EOF
-        if type -p edit_spec_ofed${variant}; then
-            edit_spec_ofed${variant}
-        fi
-
-        mv ofed${variant}.spec SPECS
-        mv * SOURCES
-        mv SOURCES/S{PEC,RPM}S .
-        rpmbuild --bs --nodeps --define "_topdir $(pwd)" SPECS/ofed${variant}.spec 2>&1 || return 255
-        popd
-        mv ofed-rpm/SRPMS/* ${TOPDIR}/SRPMS/
-        rm -rf ofed-rpm
-        SOURCE="${TOPDIR}/SRPMS/ofed${variant}-${OFED_DEVEL_VERSION}.src.rpm"
-        # end of dirty hack
-
-        # dirty hack until Novell make the kernel-source location overridable
-        # when building kmps
-        # XXX - this is very racy.  let's hope we only ever have a single
-        #       instance of this running at a time
-        local tmpfile
-        if [ -f ~/.rpmmacros ]; then
-            tmpfile=$(mktemp ~/.rpmmacros.XXXXXX)
-            cp ~/.rpmmacros $tmpfile
-        fi
-        cat <<"EOF" >~/.rpmmacros
-# an overridable specification of where the linux-obj tree is located
-%{!?kobjdir: %define kobjdir /usr/src/linux-obj}
-
-# Defines %flavors_to_build and %kernel_source() as a side effect.
-%_kernel_module_package(n:v:r:s:f:Xp:) \
-%{expand:%( subpkg=%{-s*}%{!-s:/usr/lib/rpm/rpm-suse-kernel-module-subpackage} \
-        echo "%%define _suse_kernel_module_subpackage(n:v:r:f:p:) %%{expand:%%(cd %_sourcedir; cat $subpkg; echo %%%%nil)}" \
-        flavors="%{!-X:%*}%{-X:$(ls %kobjdir/%_target_cpu 2>/dev/null)}" \
-       a_flavor=($flavors)
-        flavors_to_build= \
-        if [ -s %kobjdir/%_target_cpu/${a_flavor}/include/linux/utsrelease.h ]; then
-            LINUXRELEASEHEADER=utsrelease.h
-        else
-            LINUXRELEASEHEADER=version.h
-        fi
-        kver=$(sed -ne "/^#define UTS_RELEASE/s/.*\\"\\\(.*\\\)-${a_flavor}\\"$/\\1/p" %kobjdir/%_target_cpu/${a_flavor}/include/linux/$LINUXRELEASEHEADER)
-        for flavor in $flavors; do \
-            if [ -n "%{-X}" ]; then \
-                case " %* " in \
-                (*" $flavor "*) \
-                    continue ;; \
-                esac \
-            fi \
-            krel=$(make -s -C %kobjdir/%_target_cpu/$flavor kernelrelease) \
-            [ -e %symsetsdir/symsets-$krel.tar.gz ] || continue \
-            flavors_to_build="$flavors_to_build $flavor" \
-            echo "%%_suse_kernel_module_subpackage -n %{-n*}%{!-n:%name}-kmp -v %{-v*}%{!-v:%version} -r %{-r*}%{!-r:%release} %{-p} $flavor $krel $kver" \
-        done \
-        echo "%%global flavors_to_build${flavors_to_build:-%%nil}" \
-        echo "%%global kernel_source() %kobjdir/%_target_cpu/%%%%{1}" \
-        \
-        echo "%package -n %{-n*}%{!-n:%name}-kmp-_dummy_" \
-        echo "Version: %version" \
-        echo "Summary: %summary" \
-        echo "Group: %group" \
-        echo "%description -n %{-n*}%{!-n:%name}-kmp-_dummy_" \
-        )}
-EOF
-        if ! rpmbuild --rebuild --nodeps --target ${TARGET_ARCH} \
-                                --define "symsetsdir ${TOPDIR}/reused/boot" \
-                                --define "kobjdir ${LINUXOBJ%/*/*}" \
-                                --define "_tmppath /var/tmp" \
-                                --define "_topdir ${TOPDIR}" \
-                      ${SOURCE} 2>&1; then
-            rm ~/.rpmmacros
-            if [ -n "$tmpfile" ]; then
-                cp $tmpfile ~/.rpmmacros
-                rm $tmpfile
-            fi
-            return 255
-        fi
-        rm ~/.rpmmacros
-        if [ -n "$tmpfile" ]; then
-            cp $tmpfile ~/.rpmmacros
-            rm $tmpfile
-        fi
-    fi # $REBUILD_OFED_DEVEL_RPM; then
-
-}
-
-# additional edits need to the ofed spec
-edit_spec_ofed() {
-
-        ed ofed.spec <<"EOF"
-/^# we assume config.mk and the include files are same for all flavors/a
-built_flavors=(%flavors_to_build)
-.
-/^cp obj\/default\/config\.mk \$RPM_BUILD_ROOT\/%{_prefix}\/src\/kernel-modules-ofed/c
-cp obj/${built_flavors[0]}/config.mk $RPM_BUILD_ROOT/%{_prefix}/src/kernel-modules-ofed
-.
-/^for D in obj\/default\\\\include \$(sed 's@^.*-I\\\${CWD}\/@obj\/default\\\\@' obj\/default\/config.mk); do/c
-for D in obj/${built_flavors[0]}\\include $(sed "s@^.*-I\${CWD}/@obj/${built_flavors[0]}\\\@" obj/${built_flavors[0]}/config.mk); do
-.
-wq
-EOF
-
-}
-
-build_ofed-sles10() {
-    local outfd=$1
-
-    if [ -z "$outfd" ] || [ $outfd = 1 ]; then
-        fatal 1 "You must supply a file descriptor to ${FUNCNAME[0]} and it cannot be 1"
-    fi
-
-    if $REBUILD_OFED_DEVEL_RPM; then
-        build_sles_ofed_rpm cxgb3-NIC >&${outfd} || return ${PIPESTATUS[0]}
-        build_sles_ofed_rpm >&${outfd} || return ${PIPESTATUS[0]}
-        OFED_DEVEL_LOCATION="${TOPDIR}/RPMS/$(resolve_arch $TARGET_ARCH $PATCHLESS)"
-    fi # $REBUILD_OFED_DEVEL_RPM; then
-
-    # XXX I'm not convinced this belongs in here, but really, this is a
-    # temporary hack until we get a base O/S intalled ofed-devel
-    local arch=$TARGET_ARCH
-    if [ -n "$OFED_VERSION" -a "$OFED_VERSION" = "inkernel" ]; then
-        local ofed_devel="${OFED_DEVEL_LOCATION}/ofed-devel-${OFED_DEVEL_VERSION}.$(resolve_arch $TARGET_ARCH "$PATCHLESS || ! $REBUILD_OFED_DEVEL_RPM").rpm"
-        if ! rpm2cpio < $ofed_devel | cpio -id; then
-            fatal 1 "could not unpack the ofed-devel rpm."
-       fi
-        echo "$(pwd)/usr/src/kernel-modules-ofed/$(resolve_arch $TARGET_ARCH "$PATCHLESS || ! $REBUILD_OFED_DEVEL_RPM")/$RPMSMPTYPE"
-    fi
-
-    return 0
-
-}
diff --git a/contrib/lbuild/lbuild-sles11 b/contrib/lbuild/lbuild-sles11
deleted file mode 100644 (file)
index 8514f96..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-
-# increment this if you have made a change that should force a new kernel
-# to build built for this distribution (only -- if you want to force a kernel
-# build on all distributions, update the BUILD_GEN variable in build/lbuild)
-BUILD_GEN+=".0"
-
-# This distro does not support zfs, so define WITH_ZFS
-# use words that make the bash log readable.
-WITH_ZFS="Zfs Not Supported"
-
-source ${LBUILD_DIR}/lbuild-sles
-
-kernel_srpm_location() {
-
-    local PLEV=$(sed -n -e 's/^PATCHLEVEL = //p' /etc/SuSE-release)
-    echo "https://nu.novell.com/repo/\$RCE/SLES11-SP${PLEV}-Updates/sle-11-$(resolve_arch $TARGET_ARCH)/rpm/src/"
-
-}
-
-edit_specs() {
-
-    # edit the SPECs with our changes
-    local spec
-    (cd $TOPDIR/SOURCES; ./mkspec --release ${lnxrel})
-    for spec in $RPMSMPTYPE source syms; do
-        #cp $TOPDIR/SOURCES/kernel-$spec.spec{,.orig}
-        sed -i -e "s/^\(Release: *\).*$/\1${lnxrel}_${buildid}/" \
-               -e '/^%setup /a\
-cp  %_sourcedir/linux-3.0-lustre.patch %_builddir/%{name}-%{version}/lustre.patch\
-! grep -q lustre.patch %_sourcedir/series.conf && echo -e "\\n\\tlustre.patch" >> %_sourcedir/series.conf' \
-          SOURCES/kernel-${spec}.spec || \
-            fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
-
-        if $KERNEL_LUSTRE_NAMING; then
-            # these are all of the changes needed because we change the package names
-            # to kernel-lustre-*.  these should all go away when we stop this insanity
-            sed -i -e 's/^\(Name:.*kernel-\)\(.*\)/\1lustre-\2/' \
-                   -e "/^Provides:  *kernel = /a\
-Provides:       kernel-$spec = %{version}-%{release}
-" \
-                   -e 's/^\([  ][      ]*-i %_builddir\/kernel-\)\(source-2.6.27.21\/\$patch; then\)/\1lustre-\2/' \
-                   -e '/^%build/,/^%changelog/s/\(kernel-\)\(source\.files\)/\1lustre-\2/g' \
-                   -e '/--no-backup-if-mismatch/,/fi/s/kernel-source-/kernel-lustre-source-/g' \
-                   -e "s/^\(%package -n kernel-\)\(.*\)/\1lustre-\2/" \
-                   -e "s/^\(%description -n kernel-\)\(.*\)/\1lustre-\2/" \
-                   -e "s/^\(%files -n kernel-\)\(.*\)/\1lustre-\2/" \
-                   -e "s/^\(Provides:.*kernel-\)\(.*\)/\1lustre-\2/" \
-                   -e "s/^\(Requires:.*kernel-\)\(.*\)/\1lustre-\2/" \
-                   -e "s/^\(Supplements:.*kernel-\)\(.*\)/\1lustre-\2/" \
-                SOURCES/kernel-${spec}.spec || \
-                fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
-        fi
-
-        # XXX - a building-on-Ubuntu hack
-        if grep -q "Ubuntu" /etc/issue; then
-            sed -i -e '/^%_sourcedir\/install-configs %_sourcedir .*/i\
-curl ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm1/broken-out/i386-use-c-code-for-current_thread_info.patch | patch -p1' \
-                   -e 's/^\(BuildRequires: .*\)$/#NOU \1/g' \
-                   -e 's/%(\(chmod .*\))$/%(bash -c "\1")/' \
-                   -e 's/ -a 109//' \
-              SOURCES/kernel-${spec}.spec || \
-            fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
-        fi
-    done
-}
-
-unpack_linux_devel_rpm-sles11() {
-    local callers_rpm="$1"
-
-    local rpmdir="${callers_rpm%/*}"
-
-    local kernelrpm
-    local wanted_kernel="${lnxmaj}${lnxmin}-${lnxrel}"
-
-    # this is a hack that should go away when the modified lustre kernel
-    # Provides kernel-default-devel                       vvvvvvvvv
-    if ! kernelrpm=$(find_rpm "$rpmdir" provides "^kernel-(lustre-)?default-devel = $wanted_kernel"); then
-        fatal 1 "Could not find the kernel-default-devel in $rpmdir/"
-    fi
-
-    if ! rpm2cpio < "$rpmdir/$kernelrpm" | cpio -id > /dev/null 2>&1; then
-        fatal 1 "Unpack error for $kernelrpm"
-    fi
-
-    # SLES also needs the kernel-source together with the kernel-default-devel
-    if ! kernelrpm=$(find_rpm "$rpmdir" provides "^kernel-source = $wanted_kernel"); then
-        fatal 1 "Could not find the kernel-source in $rpmdir/"
-    fi
-
-    if ! rpm2cpio < "$rpmdir/$kernelrpm" | cpio -id > /dev/null 2>&1; then
-        fatal 1 "Unpack error for $kernelrpm"
-    fi
-
-}
-
-find_linux_rpm-sles11() {
-       local prefix="$1"
-       local wanted_kernel="$2"
-       local pathtorpms=${3:-"$KERNELRPMSBASE/$lnxmaj/$DISTROMAJ/$TARGET_ARCH"}
-
-       local PLEV=$(sed -n -e 's/^PATCHLEVEL = //p' /etc/SuSE-release)
-       local site="https://nu.novell.com/repo/\$RCE/SLES11-SP${PLEV}-Updates/sle-11-$(resolve_arch $TARGET_ARCH)/rpm/$(resolve_arch $TARGET_ARCH)"
-
-       if [ ! -f $pathtorpms/kernel-default-devel-$wanted_kernel.$(resolve_arch $TARGET_ARCH).rpm ]; then
-               fetch_url "$site/kernel-default-devel-$wanted_kernel.$(resolve_arch $TARGET_ARCH).rpm" $pathtorpms
-       fi
-       # SLES also needs the kernel-source along with kernel-devel
-       if [ ! -f $pathtorpms/kernel-source-$wanted_kernel.$(resolve_arch $TARGET_ARCH).rpm ]; then
-               fetch_url "$site/kernel-source-$wanted_kernel.$(resolve_arch $TARGET_ARCH).rpm" $pathtorpms
-       fi
-       echo "kernel-default-devel-$wanted_kernel.$(resolve_arch $TARGET_ARCH).rpm"
-
-       return 0
-}