${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\
+ rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/fs/ext4/ext4-inode-test*' \
+ SPECS/$SPEC_NAME 2>&1 ||
+ fatal 1 "Error while editing SPECS/$SPEC_NAME"
+}
+
patch_spec() {
local buildid="$1"
$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' \
# 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"
}
kernel_srpm_location() {
-
- echo "http://vault.centos.org/centos/8/updates/Source/SPackages/"
-
+ local kdir
+
+ case $lnxrel in
+ *8_4) kdir="8.4.2105" ;;
+ *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() {