Whamcloud - gitweb
LU-12637 kernel: RHEL 8.1 server support
[fs/lustre-release.git] / contrib / lbuild / lbuild-rhel8
index d70a238..6963f58 100644 (file)
@@ -39,6 +39,17 @@ sed -e "s|REPLACE_ME|$LBUILD_KMODTOOL|" -e "s/\/usr\/src\/kernels/${tmp}/g" \
     ${LBUILD_DIR}/rhel8/rpmmacros.template > ${LBUILD_DIR}/rhel8/rpmmacros
 cat ${LBUILD_DIR}/rhel8/rpmmacros >> $RMAC
 
+patch_spec_rhel8() {
+    sed -i -e '/Provides: kernel-uname-r =/a\
+Provides: kernel-lustre = %{KVRA}%{?1:.%{1}}\\' \
+           -e '/Provides: kernel-devel-uname-r =/a\
+Provides: kernel-devel-lustre = %{KVRA}%{?1:.%{1}}\\' \
+           -e '/find $RPM_BUILD_ROOT\/lib\/modules\/$KernelVer/a\
+    cp -a fs/ext4/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/fs/ext4' \
+          SPECS/$SPEC_NAME 2>&1 ||
+        fatal 1 "Error while editing SPECS/$SPEC_NAME"
+}
+
 patch_spec() {
     local buildid="$1"
 
@@ -48,7 +59,7 @@ patch_spec() {
        $TOPDIR/SOURCES/patch-${lnxmaj}-lustre.patch
 
     # edit the SPEC with our changes
-    patch_spec_common "$buildid"
+    patch_spec_rhel8 "$buildid"
     sed -i -e '/^# empty final patch to facilitate testing of kernel patches/i\
 # adds Lustre patches\
 Patch99995: patch-%{version}-lustre.patch' \
@@ -57,14 +68,7 @@ Patch99995: patch-%{version}-lustre.patch' \
 # lustre patch\
 ApplyOptionalPatch patch-%{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}-4.18-rhel8-%{_target_cpu}.config ]; then\
-    echo "# $Arch" > configs/kernel-%{version}-%{_target_cpu}.config\
-    cat %{_topdir}/lustre/lustre/kernel_patches/kernel_configs/kernel-%{version}-4.18-rhel8-%{_target_cpu}.config >> configs/kernel-%{version}-%{_target_cpu}.config\
-  fi'\
            -e '/^# Dynamically generate kernel/a echo "CONFIG_BH_LRU_SIZE=16" >> config-generic'\
-           -e '/^%define listnewconfig_fail 1/s/1/0/'\
           SPECS/$SPEC_NAME 2>&1 || \
         fatal 1 "Error while editing SPECS/$SPEC_NAME"
 
@@ -105,7 +109,7 @@ find_linux_rpm-rhel8() {
 
 kernel_srpm_location() {
 
-    echo "http://vault.centos.org/centos/8/updates/Source/SPackages/"
+    echo "http://vault.centos.org/8.1.1911/BaseOS/Source/SPackages/"
 
 }