X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=contrib%2Flbuild%2Flbuild-rhel8;h=7437392bfab13d2fd5b7e763415c0d1d1299427c;hp=d70a2383f29cc5c57248af0487ad5ab7cb0cc3db;hb=cf48a2d23bca685e1076e45370c5d3763c9a9952;hpb=d37b0ab99eaeeac391088848c275d2757b6ff17d;ds=sidebyside diff --git a/contrib/lbuild/lbuild-rhel8 b/contrib/lbuild/lbuild-rhel8 index d70a238..7437392 100644 --- a/contrib/lbuild/lbuild-rhel8 +++ b/contrib/lbuild/lbuild-rhel8 @@ -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" @@ -104,15 +108,21 @@ find_linux_rpm-rhel8() { } kernel_srpm_location() { + local kdir - echo "http://vault.centos.org/centos/8/updates/Source/SPackages/" + case $lnxrel in + *8_3) kdir="8.3.2011" ;; + *8_2) kdir="8.2.2004" ;; + *8_1) kdir="8.1.1911" ;; + *8_0) kdir="8.0.1905" ;; + *) ;; + esac + echo "http://vault.centos.org/$kdir/BaseOS/Source/SPackages/" } kernel_debuginfo_location() { - - echo "http://debuginfo.centos.org/8/x86_64/" - + echo "http://debuginfo.centos.org/8/x86_64/Packages/" } cleanup_rpmmacros() {