Whamcloud - gitweb
LU-62 rhel6 support
authorBrian J. Murrell <brian@whamcloud.com>
Mon, 7 Mar 2011 22:37:44 +0000 (17:37 -0500)
committerJohann Lombardi <johann@whamcloud.com>
Thu, 7 Apr 2011 19:07:22 +0000 (12:07 -0700)
So that RHEL6 client can be built.

Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: Ie5ff1249aee8725625901d1dad242a8f8c48765a
Reviewed-on: http://review.whamcloud.com/385
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
build/funcs.sh
build/lbuild
build/lbuild-rhel6 [new file with mode: 0644]
lustre/autoconf/lustre-core.m4
lustre/kernel_patches/targets/2.6-rhel6.target.in [new file with mode: 0644]

index f7046f5..09292d0 100644 (file)
@@ -179,6 +179,7 @@ autodetect_target() {
     case ${distro} in
           oel5) target="2.6-oel5";;
          rhel5) target="2.6-rhel5";;
+         rhel6) target="2.6-rhel6";;
         sles10) target="2.6-sles10";;
         sles11) target="2.6-sles11";;
             *) fatal 1 "I don't know what distro $distro is.\nEither update autodetect_target() or use the --target argument.";;
index b761fc6..2b8e051 100755 (executable)
@@ -291,6 +291,9 @@ check_options() {
     fi
 
     case $TARGET in
+        2.6-rhel6)
+            CANONICAL_TARGET="rhel6"
+            ;;
         2.6-rhel5)
             CANONICAL_TARGET="rhel5"
             ;;
diff --git a/build/lbuild-rhel6 b/build/lbuild-rhel6
new file mode 100644 (file)
index 0000000..53bcee7
--- /dev/null
@@ -0,0 +1,71 @@
+# 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
+
+source ${0%/*}/lbuild-rhel
+
+SPEC_NAME="kernel.spec"
+DEVEL_PATH_ARCH_DELIMETER="."
+
+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\
+' \
+          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}/${DISTRO}/${TARGET_ARCH}"}
+
+    find_linux_rpm-rhel "$prefix" "$wanted_kernel" "$pathtorpms"
+
+}
+
+kernel_srpm_location() {
+
+    echo "ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/"
+
+}
index fd971bc..9ae3659 100644 (file)
@@ -2497,6 +2497,7 @@ lustre/include/lustre/Makefile
 lustre/kernel_patches/targets/2.6-suse.target
 lustre/kernel_patches/targets/2.6-vanilla.target
 lustre/kernel_patches/targets/2.6-rhel4.target
+lustre/kernel_patches/targets/2.6-rhel6.target
 lustre/kernel_patches/targets/2.6-rhel5.target
 lustre/kernel_patches/targets/2.6-fc5.target
 lustre/kernel_patches/targets/2.6-patchless.target
diff --git a/lustre/kernel_patches/targets/2.6-rhel6.target.in b/lustre/kernel_patches/targets/2.6-rhel6.target.in
new file mode 100644 (file)
index 0000000..0c1d2b5
--- /dev/null
@@ -0,0 +1,24 @@
+lnxmaj="2.6.32"
+lnxrel="71.18.2.el6"
+
+KERNEL_SRPM=kernel-${lnxmaj}-${lnxrel}.src.rpm
+EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
+LUSTRE_VERSION=@VERSION@
+
+OFED_VERSION=inkernel
+
+BASE_ARCHS="i686 x86_64 ia64 ppc64"
+BIGMEM_ARCHS=""
+BOOT_ARCHS=""
+JENSEN_ARCHS=""
+#SMP_ARCHS="i686 x86_64 ia64 ppc64"
+# RHEL5 doesn't use smp specific kernels
+SMP_ARCHS=""
+UP_ARCHS=""
+
+for cc in gcc ; do
+    if which $cc >/dev/null 2>/dev/null ; then
+        export CC=$cc
+        break
+    fi
+done