!24 添加dim内核模块签名

From: @jinlun123123 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
This commit is contained in:
openeuler-ci-bot 2024-11-13 07:21:06 +00:00 committed by Gitee
commit 50f9d5375c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,10 +1,28 @@
%global debug_package %{nil}
%define kernel_version %(ver=`rpm -qa|grep kernel-devel`;echo ${ver#*kernel-devel-})
# Redefining __spec_install_post, Causes the kernel
# module to be signed at the end of the install phase
%if 0%{?openEuler_sign_rsa}
%global __modsign_install_post \
module_path="$RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra/dim" \
sh /usr/lib/rpm/brp-ebs-sign --module $module_path/dim_core.ko ||: \
mv $module_path/dim_core.ko.sig $module_path/dim_core.ko ||: \
sh /usr/lib/rpm/brp-ebs-sign --module $module_path/dim_monitor.ko ||: \
mv $module_path/dim_monitor.ko.sig $module_path/dim_monitor.ko ||: \
%{nil}
%global __tmp_spec_install_post %{__spec_install_post}
%global __spec_install_post \
%{__tmp_spec_install_post} \
%{__modsign_install_post} \
%{nil}
%endif
Name : dim
Summary : Dynamic Integrity Measurement
Version : 1.0.2
Release : 8
Release : 9
License : GPL-2.0
Source0 : %{name}-v%{version}.tar.gz
BuildRequires: kernel-devel kernel-headers
@ -98,6 +116,9 @@ rm -rf %{buildroot}
%attr(0400,root,root) /lib/modules/%{kernel_version}/extra/dim/dim_monitor.ko
%changelog
* Wed Nov 13 2024 jinlun <jinlun@huawei.com> 1.0.2-9
- add signature for dim
* Mon Aug 19 2024 gengqihu <gengqihu2@h-partners.com> 1.0.2-8
- Enabled DIM_HASH_SUPPORT_SM3