From 2aa8019903f8d8a5f9ae57717765d97e71901de9 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Wed, 27 Nov 2019 20:40:54 +0100 Subject: [PATCH] macros.kmp: add post-install kmod processing hooks The enablement of debuginfo generation broke custom %install scripts that perform module signing, and in an attempt to address that, additional hooks are added that can be used for module compression, signing, and other means of kmod processing. * macros.kmp (redhat_kmp_has_post_hooks): New macro, set to 1. (kernel_module_package_release): Add __brp_kmod_pre_sign_process, __brp_kmod_sign, __brp_kmod_post_sign_process, __brp_kmod_compress, and __brp_kmod_post_compress_process to the generated __spec_install_post. Resolves: #2002887 Signed-off-by: Eugene Syromiatnikov --- macros.kmp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/macros.kmp b/macros.kmp index 2bc7504..8eb6157 100644 --- a/macros.kmp +++ b/macros.kmp @@ -2,6 +2,8 @@ redhat_kernel_module_package 1 kernel_module_package_release 1 +redhat_kmp_has_post_hooks 1 + %__brp_kmod_set_exec_bit /usr/lib/rpm/redhat/brp-kmod-set-exec-bit %__brp_kmod_restore_perms /usr/lib/rpm/redhat/brp-kmod-restore-perms @@ -48,6 +50,11 @@ kernel_module_package_release 1 echo " %%%%{?__debug_package:%%%%{__debug_install_post}} \\\\" \ echo " %%{__arch_install_post} \\\\" \ echo " %%{__os_install_post} \\\\" \ + echo " %%{?__brp_kmod_pre_sign_process} \\\\" \ + echo " %%{?__brp_kmod_sign} \\\\" \ + echo " %%{?__brp_kmod_post_sign_process} \\\\" \ + echo " %%{?__brp_kmod_compress} \\\\" \ + echo " %%{?__brp_kmod_post_compress_process} \\\\" \ echo " %%{?__brp_kmod_restore_perms} \\\\" \ echo "%%{nil}" \ fi \