Whamcloud - gitweb
LU-14029 kernel: new kernel [SLES15 SP2 5.3.18-24.24.1] 65/40265/3
authorJian Yu <yujian@whamcloud.com>
Thu, 15 Oct 2020 19:58:01 +0000 (12:58 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 3 Nov 2020 03:40:26 +0000 (03:40 +0000)
This patch makes changes to support new SLES15 SP2 release
with kernel 5.3.18-24.24.1 for Lustre client.

Test-Parameters: trivial \
env=SANITY_EXCEPT="100 130 136 817" \
clientdistro=sles15sp2 serverdistro=el7.8 \
testlist=sanity

Change-Id: Icf97678ebb0c6495d956f13d57e0cea65a20b108
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40265
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
contrib/lbuild/funcs.sh
contrib/lbuild/lbuild-sles15
lustre/ChangeLog
lustre/autoconf/lustre-core.m4
lustre/kernel_patches/targets/4.12-sles15sp2.target.in [new file with mode: 0644]

index 3dd269f..5f729ef 100644 (file)
@@ -200,6 +200,7 @@ autodetect_target() {
         sles12.3) target="$(uname -r | cut -d . -f 1,2)-sles12sp3";;
         sles12*)  target="$(uname -r | cut -d . -f 1,2)-sles12";;
         sles15.1) target="$(uname -r | cut -d . -f 1,2)-sles15sp1";;
+        sles15.2) target="$(uname -r | cut -d . -f 1,2)-sles15sp2";;
           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 1d5a038..e2afcfb 100644 (file)
@@ -13,7 +13,18 @@ source ${LBUILD_DIR}/lbuild-sles
 
 kernel_srpm_location() {
     local site
-    site="http://mgmt/cobbler/repo_mirror/updates-sles15.1-src"
+    local kdir
+
+    case $lnxmaj in
+    4.12)
+        kdir=updates-sles15.1-src
+        ;;
+    5.3)
+        kdir=updates-sles15.2-src
+        ;;
+    esac
+
+    site="http://mgmt/cobbler/repo_mirror/$kdir"
     echo "$site/src/"
 }
 
@@ -23,12 +34,24 @@ edit_specs() {
     (cd $TOPDIR/SOURCES; ./mkspec --release ${lnxrel})
     for spec in $RPMSMPTYPE source syms; do
         #cp $TOPDIR/SOURCES/kernel-$spec.spec{,.orig}
+        case $lnxmaj in
+        4.12)
         sed -i -e "s/^\(Release: *\).*$/\1${lnxrel}_${buildid}/" \
                -e '/^%setup /a\
-cp  %_sourcedir/linux-4.12-lustre.patch %_builddir/%{name}-%{version}/intel.lustre.patch\
-grep -q intel.lustre.patch %_sourcedir/series.conf || echo -e "\\n\\tintel.lustre.patch" >> %_sourcedir/series.conf' \
+cp  %_sourcedir/linux-4.12-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"
+        ;;
+        5.3)
+        sed -i -e "s/^\(Release: *\).*$/\1${lnxrel}_${buildid}/" \
+               -e '/^%setup /a\
+cp  %_sourcedir/linux-5.3-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"
+        ;;
+        esac
 
         if $KERNEL_LUSTRE_NAMING; then
             # these are all of the changes needed because we change the package names
@@ -99,13 +122,28 @@ find_linux_rpm-sles15() {
     local wanted_kernel="$2"
     local pathtorpms=${3:-"$KERNELRPMSBASE/$lnxmaj/$DISTROMAJ/$TARGET_ARCH"}
     local wanted_kernel_org="$wanted_kernel"
+    local base_site
+    local base_dir
+    local dev_site
+    local dev_dir
 
     if [ "x$rpmfix_diff" != "x" ] && [ $wanted_kernel != "${lnxmaj}${lnxmin}-${lnxrel}${rpmfix_diff}" ]; then
         wanted_kernel="${lnxmaj}${lnxmin}-${lnxrel}${rpmfix_diff}"
     fi
 
-    local base_site="http://mgmt/cobbler/repo_mirror/updates-basesystem-sles15.1-x86_64"
-    local dev_site="http://mgmt/cobbler/repo_mirror/updates-devtools-sles15.1-x86_64"
+    case $lnxmaj in
+    4.12)
+        base_dir=updates-basesystem-sles15.1-x86_64
+        dev_dir=updates-devtools-sles15.1-x86_64
+        ;;
+    5.3)
+        base_dir=updates-basesystem-sles15.2-x86_64
+        dev_dir=updates-devtools-sles15.2-x86_64
+        ;;
+    esac
+
+    base_site="http://mgmt/cobbler/repo_mirror/$base_dir"
+    dev_site="http://mgmt/cobbler/repo_mirror/$dev_dir"
 
     if [ ! -f $pathtorpms/kernel-default-devel-$wanted_kernel.$(resolve_arch $TARGET_ARCH).rpm ]; then
         fetch_url "$base_site/x86_64/kernel-default-devel-$wanted_kernel.$(resolve_arch $TARGET_ARCH).rpm" $pathtorpms
index a1d33bd..24b889c 100644 (file)
@@ -26,6 +26,7 @@ TBD Whamcloud
          4.12.14-95.48        (SLES12 SP4)
          4.12.14-122.20       (SLES12 SP5)
          4.12.14-197.37       (SLES15 SP1)
+         5.3.18-24.24         (SLES15 SP2)
          4.15.0-48            (Ubuntu 18.04)
        * Other clients known to build on these kernels at some point (others may also work):
          3.10.0-862.14.4.el7  (RHEL7.5)
index b468523..58494f4 100644 (file)
@@ -2849,6 +2849,7 @@ lustre/kernel_patches/targets/4.14-rhel7.6.target
 lustre/kernel_patches/targets/4.12-sles12sp4.target
 lustre/kernel_patches/targets/4.12-sles12sp5.target
 lustre/kernel_patches/targets/4.12-sles15sp1.target
+lustre/kernel_patches/targets/4.12-sles15sp2.target
 lustre/kernel_patches/targets/3.x-fc18.target
 lustre/ldlm/Makefile
 lustre/fid/Makefile
diff --git a/lustre/kernel_patches/targets/4.12-sles15sp2.target.in b/lustre/kernel_patches/targets/4.12-sles15sp2.target.in
new file mode 100644 (file)
index 0000000..8dd6b13
--- /dev/null
@@ -0,0 +1,37 @@
+lnxmaj="5.3"
+lnxmin=".18"
+lnxrel="24.24"
+# use this when there is an "RPM fix" which means that the name of the
+# (source) RPM has been updated but the version of the kernel inside the
+# RPM is not also updated
+rpmfix=".1"
+
+# this is the delimeter that goes before the "smp" at the end of the version
+# defaults to empty
+FLAVOR_DELIMITER="-"
+
+KERNEL_SRPM=kernel-source-${lnxmaj}${lnxmin}-${lnxrel}${rpmfix}.src.rpm
+SERIES=""
+VERSION=$lnxmaj
+EXTRA_VERSION="${lnxmin#.}-${lnxrel}_lustre.@VERSION@"
+LUSTRE_VERSION=@VERSION@
+
+OFED_VERSION=inkernel
+
+BASE_ARCHS="i686 ppc x86_64 ia64 ppc64"
+BIGMEM_ARCHS=""
+BOOT_ARCHS=""
+JENSEN_ARCHS=""
+DEFAULT_ARCHS="i686 x86_64 ia64 ppc64"
+BIGSMP_ARCHS=""
+PSERIES64_ARCHS="ppc"
+UP_ARCHS=""
+SRC_ARCHS=""
+#RPMSMPTYPE="smp"
+
+for cc in gcc ; do
+    if which $cc >/dev/null 2>/dev/null ; then
+        export CC=$cc
+        break
+    fi
+done