!57 【Mainline】fix the failure of building with cppcheck>=2.11
From: @yixiangzhike Reviewed-by: @dillon_chen Signed-off-by: @dillon_chen
This commit is contained in:
commit
9c559eb88b
@ -8,6 +8,9 @@
|
||||
%define enable_docbook_pdf 0
|
||||
%endif
|
||||
|
||||
# check failed with cppcheck >= 2.11
|
||||
%define min_cppcheck %pkg_version_cmp cppcheck 2.11
|
||||
|
||||
# Calculate hmac file after installing for binary
|
||||
%define __spec_install_post \
|
||||
%{?__debug_package:%{__debug_install_post}} \
|
||||
@ -26,7 +29,7 @@ ln -s libkcapi.so.%{version}.hmac %{buildroot}/%{_lib}/fipscheck/libkcapi.so.
|
||||
|
||||
Name: libkcapi
|
||||
Version: 1.4.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: libkcapi - Linux Kernel Crypto API User Space Interface Library
|
||||
|
||||
License: BSD or GPLv2
|
||||
@ -174,6 +177,10 @@ done
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%check
|
||||
%if %{min_cppcheck} >= 0
|
||||
# add -UCHECK_DIR to cppcheck with cppcheck >= 2.11
|
||||
sed -i 's/\$(CPPCHECK)/\$(CPPCHECK) -UCHECK_DIR/' Makefile
|
||||
%endif
|
||||
for t in cppcheck scan;do
|
||||
%make_build $t
|
||||
done
|
||||
@ -219,6 +226,12 @@ popd
|
||||
%{_mandir}/man3/kcapi_*.3.*
|
||||
|
||||
%changelog
|
||||
* Tue Jul 25 2023 yixiangzhike <yixiangzhike007@163.com> - 1.4.0-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix the failure of building with cppcheck >= 2.11
|
||||
|
||||
* Fri Apr 28 2023 yixiangzhike <yixiangzhike007@163.com> - 1.4.0-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user