From fed04855a35224e248e541b754b015df832503ba Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <9c07167bbe02febf5402665f4a907a0edd21c1fd.1507842722.git.Jim.Somerville@windriver.com> References: <9c07167bbe02febf5402665f4a907a0edd21c1fd.1507842722.git.Jim.Somerville@windriver.com> From: Scott Little Date: Tue, 9 May 2017 13:00:13 -0400 Subject: [PATCH 15/29] tis build unsigned package Signed-off-by: Jim Somerville --- SPECS/kernel-rt.spec | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/SPECS/kernel-rt.spec b/SPECS/kernel-rt.spec index fd9ed82..cd127ac 100644 --- a/SPECS/kernel-rt.spec +++ b/SPECS/kernel-rt.spec @@ -27,7 +27,7 @@ Summary: The Linux Realtime kernel # If we want to sign the kernel and modules, do_sign should be 1. # To speed up builds (don't sign) use 0. -%global do_sign 0 +%global do_sign 1 # conditional with/without variables # Note that the logic here is inverted; a bcond_without implies @@ -695,6 +695,13 @@ the kernel source. %endif # with_tools +%if %{do_sign} +%package unsigned +Summary: Unsigned build of the Linux kernel +%description unsigned +Contains an unsigned version of the Linux kernel +%endif # do_sign + %prep ## ApplyPatch routine patch_command='patch -p1 -F1 -s' @@ -942,6 +949,8 @@ BuildKernel() { fi # EFI SecureBoot signing, x86_64-only %if %{do_sign} + cp $KernelImage vmlinuz.unsigned + $CopyKernel vmlinuz.unsigned $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz.unsigned %ifarch x86_64 %pesign -s -i $KernelImage -o $KernelImage.signed -a %{SOURCE37} -c %{SOURCE37} -n %{pesign_name} mv $KernelImage.signed $KernelImage @@ -1708,6 +1717,11 @@ fi %kernel_variant_files %{buildvanilla} vanilla %endif +%if %{do_sign} +%files unsigned +/boot/vmlinuz.unsigned +%endif # do_sign + %changelog * Wed Sep 13 2017 Johnny Hughes [3.10.0-693.2.2.rt56.623.el7] - Manual CentOS Debranding -- 1.8.3.1