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
This commit is contained in:
Joey Lee 2021-07-29 05:56:59 +00:00 committed by Git OBS Bridge
parent f7fb3783bc
commit fc03531124
3 changed files with 21 additions and 3 deletions

View File

@ -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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jul 28 07:39:14 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
- Fix signing of kernel in {,/usr}/lib/modules
-------------------------------------------------------------------
Fri Jul 23 09:11:28 UTC 2021 - dmueller@suse.com

View File

@ -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