Skip to content

Commit 8bfc499

Browse files
skip77bmastbergen
authored andcommitted
Spec change: kmod+kpatch certs in unsigned builds
- Unsgined (local) builds should trust the CIQ driver/kpatch certs rather than the RHEL ones - No version bump for this - it only affects local builds going forward
1 parent 1a02716 commit 8bfc499

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

ciq/SPECS/kernel-clk6.12.spec

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -873,9 +873,6 @@ Source8010: x509.genkey.rocky
873873
%endif
874874
%endif
875875

876-
# CIQ Kernel
877-
%if 0%{?pe_signing_certkeyslot:1}
878-
879876
# CIQ Kernel will override above with CIQ certs
880877
%define secureboot_ca_0 %{SOURCE8001}
881878
%ifarch x86_64
@@ -895,9 +892,6 @@ Source8010: x509.genkey.rocky
895892
%define uki_secureboot_key_0 %{SOURCE8009}
896893
%endif
897894

898-
# 0%%{?pe_signing_certkeyslot:1}
899-
%endif
900-
901895
# rhel && !eln
902896
%endif
903897

@@ -2004,27 +1998,13 @@ done
20041998

20051999
%if 0%{?rhel}
20062000

2007-
%if 0%{?pe_signing_certkeyslot:1}
2008-
20092001
# Add DUP and kpatch certificates to system trusted keys for Rocky Linux from CIQ
20102002
%{log_msg "Add DUP and kpatch certificates to system trusted keys for Rocky Linux from CIQ"}
20112003
openssl x509 -inform der -in %{driver_cert} -out ciqkerneldup1.pem
20122004
openssl x509 -inform der -in %{kpatch_cert} -out ciqkernelkpatch1.pem
20132005
openssl x509 -inform der -in %{SOURCE102} -out nvidiagpuoot001.pem
20142006
cat ciqkerneldup1.pem ciqkernelkpatch1.pem nvidiagpuoot001.pem > ../certs/ciqkernel.pem
20152007

2016-
%else
2017-
2018-
# Add DUP and kpatch certificates to system trusted keys for RHEL
2019-
%{log_msg "Add DUP and kpatch certificates to system trusted keys for RHEL"}
2020-
openssl x509 -inform der -in %{SOURCE100} -out rheldup3.pem
2021-
openssl x509 -inform der -in %{SOURCE101} -out rhelkpatch1.pem
2022-
openssl x509 -inform der -in %{SOURCE102} -out nvidiagpuoot001.pem
2023-
cat rheldup3.pem rhelkpatch1.pem nvidiagpuoot001.pem > ../certs/rhel.pem
2024-
2025-
# 0%%{?pe_signing_certkeyslot:1}
2026-
%endif
2027-
20282008
%if %{signkernel}
20292009
%ifarch s390x ppc64le
20302010
openssl x509 -inform der -in %{secureboot_ca_0} -out secureboot.pem
@@ -2038,21 +2018,10 @@ cat secureboot.pem >> ../certs/rhel.pem
20382018
openssl x509 -inform der -in %{ima_ca_cert} -out imaca.pem
20392019
cat imaca.pem >> ../certs/rhel.pem
20402020

2041-
%if 0%{?pe_signing_certkeyslot:1}
2042-
20432021
for i in *.config; do
20442022
sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS=""@CONFIG_SYSTEM_TRUSTED_KEYS="certs/ciqkernel.pem"@' $i
20452023
done
20462024

2047-
%else
2048-
2049-
for i in *.config; do
2050-
sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS=""@CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"@' $i
2051-
done
2052-
2053-
# 0%%{?pe_signing_certkeyslot:1}
2054-
%endif
2055-
20562025
# ifnarch noarch
20572026
%endif
20582027

@@ -2647,7 +2616,6 @@ BuildKernel() {
26472616
SBATsuffix="rhel"
26482617
%endif
26492618

2650-
%if 0%{?pe_uki_signing_certkeyslot:1}
26512619
SBAT=$(cat <<- EOF
26522620
linux,1,CIQ,linux,$KernelVer,mailto:secureboot@ciq.com
26532621
linux.$SBATsuffix,1,Red Hat,linux,$KernelVer,mailto:secalert@redhat.com
@@ -2656,14 +2624,6 @@ BuildKernel() {
26562624
kernel-uki-virt.ciq_rocky,1,CIQ,kernel-uki-virt,$kernelVer,mailto:secureboot@ciq.com
26572625
EOF
26582626
)
2659-
%else
2660-
SBAT=$(cat <<- EOF
2661-
linux,1,Red Hat,linux,$KernelVer,mailto:secalert@redhat.com
2662-
linux.$SBATsuffix,1,Red Hat,linux,$KernelVer,mailto:secalert@redhat.com
2663-
kernel-uki-virt.$SBATsuffix,1,Red Hat,kernel-uki-virt,$KernelVer,mailto:secalert@redhat.com
2664-
EOF
2665-
)
2666-
%endif
26672627

26682628
KernelUnifiedImageDir="$RPM_BUILD_ROOT/lib/modules/$KernelVer"
26692629
KernelUnifiedImage="$KernelUnifiedImageDir/$InstallName-virt.efi"

0 commit comments

Comments
 (0)