From d5b71162c6327b8c3f67eb7a6d3f0f801dc8e79d Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Tue, 20 Sep 2022 10:05:28 -0400 Subject: [PATCH] bnxt_en: Fix build failure due to signing keys Commit 4aa9658077ce ("CentOS: Place module signing keys in a separate package") split the kernel's signing keys into a separate package and adjusted the build dependencies of all kernel modules. However, the changes for bnxt_en.spec were made to an incorrect line due to an admittedly misleading %define directive left over from the development of the original version of the spec file, introduced with commit 0ae9f6bd537b ("Add Broadcom NetXtreme-E drivers"). The build failure is as follows: === 8< === + /usr/src/kernels/.../scripts/sign-file \ sha256 \ /usr/src/kernels/.../signing_key.pem \ /usr/src/kernels/.../signing_key.x509 \ .../extra/bnxt_en/drivers/infiniband/hw/bnxt_re/bnxt_re.ko At main.c:160: - SSL error:02001002:system library:fopen:No such file or directory: \ bss_file.c:175 - SSL error:2006D080:BIO routines:BIO_new_file:no such file: \ bss_file.c:182 sign-file: /usr/src/kernels/.../signing_key.pem: No such file or \ directory === >8 === To resolve the build failure, this commit adds the newly added kernel{,-rt}-devel-keys package to a BuildRequires line of the bnxt_en kernel module spec file. Furthermore, to prevent similar accidents from occurring in the future, this commit removes the problematic %define directive from the spec file. Verification - First, reproduce this issue as follows: Clean the mock chroot used by the CentOS-based StarlingX build system and then run the following commands: build-pkgs --clean kernel kmod-bnxt_en && \ build-pkgs kernel kmod-bnxt_en - Afterwards, apply this commit and confirm that the following command no longer fails, indicating that the build issue discussed in the description is fixed: build-pkgs kernel kmod-bnxt_en Closes-Bug: 1990282 Fixes: 0ae9f6bd537b ("Add Broadcom NetXtreme-E drivers") Fixes: 4aa9658077ce ("CentOS: Place module signing keys in a separate package") Change-Id: Ief76dec1966a19f1417d67833f74980280cf1f36 Signed-off-by: M. Vefa Bicakci --- kernel-modules/bnxt_en/centos/bnxt_en.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel-modules/bnxt_en/centos/bnxt_en.spec b/kernel-modules/bnxt_en/centos/bnxt_en.spec index 6a0d76b5..9028543b 100644 --- a/kernel-modules/bnxt_en/centos/bnxt_en.spec +++ b/kernel-modules/bnxt_en/centos/bnxt_en.spec @@ -11,8 +11,6 @@ ## Default: retpolines are enabled. %bcond_without retpoline -%define kernel_module_package_buildreqs kernel%{?bt_ext}-devel, kernel%{?bt_ext}-devel-keys - # Disable the building of debug package(s). %define debug_package %{nil} @@ -31,7 +29,8 @@ BuildRequires: devtoolset-8-build BuildRequires: devtoolset-8-binutils BuildRequires: devtoolset-8-gcc BuildRequires: devtoolset-8-make -BuildRequires: kernel%{?bt_ext}-devel findutils +BuildRequires: findutils +BuildRequires: kernel%{?bt_ext}-devel kernel%{?bt_ext}-devel-keys BuildRequires: mlnx-ofa_kernel%{?bt_ext}-devel mlnx-ofa_kernel%{?bt_ext}-source Requires: mlnx-ofa_kernel%{?bt_ext}-modules Requires(post): /usr/sbin/depmod