Skip to content

Commit 2ce61a3

Browse files
skip77bmastbergen
authored andcommitted
Set kpatch/driver certs for all builds
- Kpatch and driver (DUP) certs should be embedded in all builds - official and local (unsigned) - No version increment here - this change doesn't affect any releases, only local builds
1 parent da3b067 commit 2ce61a3

1 file changed

Lines changed: 1 addition & 25 deletions

File tree

ciq/SPECS/kernel-clk6.18.spec

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,9 +1002,6 @@ Source8010: x509.genkey.rocky
10021002
%endif
10031003
%endif
10041004

1005-
# CIQ Kernel
1006-
%if 0%{?pe_signing_certkeyslot:1}
1007-
10081005
# CIQ Kernel will override above with CIQ certs
10091006
%define secureboot_ca_0 %{SOURCE8001}
10101007
%ifarch x86_64
@@ -1024,9 +1021,6 @@ Source8010: x509.genkey.rocky
10241021
%define uki_secureboot_key_0 %{SOURCE8009}
10251022
%endif
10261023

1027-
# 0%%{?pe_signing_certkeyslot:1}
1028-
%endif
1029-
10301024
# rhel && !eln
10311025
%endif
10321026

@@ -2182,32 +2176,18 @@ done
21822176
%if %{signkernel}%{signmodules}
21832177

21842178
%ifnarch noarch
2185-
# Add DUP and kpatch certificates to system trusted keys for RHEL
2179+
# Add DUP and kpatch certificates to system trusted keys
21862180
truncate -s0 ../certs/rhel.pem
21872181
%if 0%{?rhel}
21882182

2189-
%if 0%{?pe_signing_certkeyslot:1}
2190-
21912183
# Add DUP and kpatch certificates to system trusted keys for Rocky Linux from CIQ
21922184
%{log_msg "Add DUP and kpatch certificates to system trusted keys for Rocky Linux from CIQ"}
21932185
openssl x509 -inform der -in %{driver_cert} -out ciqkerneldup1.pem
21942186
openssl x509 -inform der -in %{kpatch_cert} -out ciqkernelkpatch1.pem
21952187
openssl x509 -inform der -in %{SOURCE102} -out nvidiagpuoot001.pem
21962188
cat ciqkerneldup1.pem ciqkernelkpatch1.pem nvidiagpuoot001.pem > ../certs/ciqkernel.pem
21972189

2198-
%else
21992190

2200-
%if %{rhelkeys}
2201-
%{log_msg "Add DUP and kpatch certificates to system trusted keys for RHEL"}
2202-
openssl x509 -inform der -in %{SOURCE100} -out rheldup3.pem
2203-
openssl x509 -inform der -in %{SOURCE101} -out rhelkpatch1.pem
2204-
openssl x509 -inform der -in %{SOURCE102} -out nvidiagpuoot001.pem
2205-
cat rheldup3.pem rhelkpatch1.pem nvidiagpuoot001.pem >> ../certs/rhel.pem
2206-
# rhelkeys
2207-
%endif
2208-
2209-
# 0%{?pe_signing_certkeyslot:1}
2210-
%endif
22112191
%if %{signkernel}
22122192
%ifarch s390x ppc64le
22132193
openssl x509 -inform der -in %{secureboot_ca_0} -out secureboot.pem
@@ -2222,11 +2202,7 @@ openssl x509 -inform der -in %{ima_ca_cert} -out imaca.pem
22222202
cat imaca.pem >> ../certs/rhel.pem
22232203

22242204
for i in *.config; do
2225-
%if 0%{?pe_signing_certkeyslot:1}
22262205
sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS=""@CONFIG_SYSTEM_TRUSTED_KEYS="certs/ciqkernel.pem"@' $i
2227-
%else
2228-
sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS=""@CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"@' $i
2229-
%endif
22302206
sed -i 's@CONFIG_EFI_SBAT_FILE=""@CONFIG_EFI_SBAT_FILE="kernel.sbat"@' $i
22312207
done
22322208
# ifnarch noarch

0 commit comments

Comments
 (0)