From e0a913e78ab82bb7fd7ffe7ea588b5c8f3bd0fb8 Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Fri, 26 Nov 2021 17:13:56 -0500 Subject: [PATCH] kernel-rt.spec: Install modules.kvm only once Unlike the standard kernel's kernel.spec, the low-latency/preempt-rt kernel's kernel-rt.spec splits KVM-related kernel modules into a separate RPM package, named kernel-rt-kvm. However, there exists a bug in the generation of the kernel-rt-core RPM package, which causes the file /lib/modules//modules.kvm file to be included in kernel-rt-core package as well as the kernel-rt-kvm package. This issue has not been problematic until commit bccb327f150f ("Fix secure boot signing of 5.10 kernel") has been merged to the starlingx/root repository. For easier cross-referencing, the aforementioned commit's change identifier is as follows: I4f49b9ac48fa50397aa98b8075386400b62ec6fa With the aforementioned change and with an ISO file that includes a kernel-rt-core RPM package that has been regenerated for binary code signing, the following installation error is encountered at installation time in All-in-One mode and low-latency profile: YumRPMTransError: Could not run transaction. file /lib/modules/5.10.74-XXX.XXXX.tis.rt.el7.x86_64/modules.kvm conflicts between attempted installs of kernel-rt-kvm-5.10.74-XXX.XXXX.tis.rt.el7.x86_64 and kernel-rt-core-5.10.74-XXX.XXXX.tis.rt.el7.x86_64 The reason why the aforementioned commit uncovers this issue is not fully known, but is most likely because the procedure for signing the kernel binaries regenerates the RPM files, which, along the way, change the attributes (such as the timestamp) of the modules.kvm file in kernel-rt-core. The discrepancy of the modules.kvm file's attributes between kernel-rt-core and kernel-rt-kvm appears to cause this issue. This commit resolves this issue by ensuring that the modules.kvm file is only provided by the kernel-rt-kvm RPM package and not the kernel-rt-core package. Verification: - An ISO image was built successfully with an incremental monolithic build. - The generated kernel-rt-core RPM package was confirmed to not include a modules.kvm file. - The built ISO image was confirmed to successfully install onto a VM using the All-in-One mode with low-latency profile. Closes-Bug: #1952488 Signed-off-by: M. Vefa Bicakci Change-Id: I5e783c9b931450a5b81d6b597892e93a66ddd25f --- kernel-rt/centos/kernel-rt.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel-rt/centos/kernel-rt.spec b/kernel-rt/centos/kernel-rt.spec index 926e5fe8..6c6b67a4 100644 --- a/kernel-rt/centos/kernel-rt.spec +++ b/kernel-rt/centos/kernel-rt.spec @@ -2932,6 +2932,7 @@ fi %{expand:%%files -f kernel-%{?3:%{3}-}core.list %{?1:-f kernel-%{?3:%{3}-}ldsoconf.list} %{?3:%{3}-}core}\ %exclude /lib/modules/%{KVERREL}%{?3:+%{3}}/kernel/arch/x86/kvm\ %exclude /lib/modules/%{KVERREL}%{?3:+%{3}}/kernel/drivers/gpu/drm/i915/gvt\ +%exclude /lib/modules/%{KVERREL}%{?3:+%{3}}/modules.kvm\ %{!?_licensedir:%global license %%doc}\ %license linux-%{KVERREL}/COPYING-%{version}-%{release}\ /lib/modules/%{KVERREL}%{?3:+%{3}}/%{?-k:%{-k*}}%{!?-k:vmlinuz}\