From fc035311248369fae36f12eee67d0f9a259b1f0a717a87fdfd8cf33667ac1e46 Mon Sep 17 00:00:00 2001 From: Joey Lee Date: Thu, 29 Jul 2021 05:56:59 +0000 Subject: [PATCH] Accepting request 908891 from home:lnussel:usrmove - Fix signing of kernel in {,/usr}/lib/modules OBS-URL: https://build.opensuse.org/request/show/908891 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=106 --- pesign-kernel-in-lib.diff | 17 +++++++++++++++-- pesign-obs-integration.changes | 5 +++++ pesign-obs-integration.spec | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/pesign-kernel-in-lib.diff b/pesign-kernel-in-lib.diff index 06da8f5..28b7b67 100644 --- a/pesign-kernel-in-lib.diff +++ b/pesign-kernel-in-lib.diff @@ -38,7 +38,7 @@ Index: pesign-obs-integration-10.2/pesign-gen-repackage-spec my $directory; my $output = "."; -@@ -418,6 +420,7 @@ sub print_files { +@@ -431,6 +433,7 @@ sub print_files { if ($f->{flags} & $filetypes{ghost}) { $attrs .= "%ghost "; if (S_ISREG($f->{mode})) { @@ -46,7 +46,7 @@ Index: pesign-obs-integration-10.2/pesign-gen-repackage-spec open(my $fh, '>', $path) or die "$path: $!\n"; if ($f->{size} > 0) { sysseek($fh, $f->{size} - 1, SEEK_SET); -@@ -425,7 +428,10 @@ sub print_files { +@@ -438,7 +441,10 @@ sub print_files { } close($fh); utime($f->{mtime}, $f->{mtime}, $path); @@ -57,3 +57,16 @@ Index: pesign-obs-integration-10.2/pesign-gen-repackage-spec symlink($f->{target}, $path); } } +Index: pesign-obs-integration-10.2/brp-99-pesign +=================================================================== +--- pesign-obs-integration-10.2.orig/brp-99-pesign ++++ pesign-obs-integration-10.2/brp-99-pesign +@@ -120,7 +120,7 @@ for f in "${files[@]}"; do + dest="$archive_dir/$f" + mkdir -p "${dest%/*}" + case "$f" in +- ./boot/* | *.efi) ++ ./boot/* | *.efi.sig | */lib/modules/*/vmlinu[xz] | */lib/modules/*/[Ii]mage | */lib/modules/*/z[Ii]mage) + if [ -f /usr/bin/pesign ]; then + pesign --certdir="$nss_db" -i "$f" -E $dest + else diff --git a/pesign-obs-integration.changes b/pesign-obs-integration.changes index 796a449..66e4d97 100644 --- a/pesign-obs-integration.changes +++ b/pesign-obs-integration.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jul 28 07:39:14 UTC 2021 - Ludwig Nussel + +- Fix signing of kernel in {,/usr}/lib/modules + ------------------------------------------------------------------- Fri Jul 23 09:11:28 UTC 2021 - dmueller@suse.com diff --git a/pesign-obs-integration.spec b/pesign-obs-integration.spec index 87adbf1..7ef530b 100644 --- a/pesign-obs-integration.spec +++ b/pesign-obs-integration.spec @@ -25,7 +25,7 @@ License: GPL-2.0-only Group: Development/Tools/Other URL: https://en.opensuse.org/openSUSE:UEFI_Image_File_Sign_Tools Source: %{name}-%{version}.tar.gz -Patch3: pesign-kernel-in-lib.diff +Patch: pesign-kernel-in-lib.diff BuildRequires: openssl Requires: fipscheck Requires: mozilla-nss-tools