Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
e5124dd6a0
!64 【openEuler-24.03-LTS】Fix the failure of testcase compiled with kernel-6.x
From: @yixiangzhike 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2024-11-21 01:38:20 +00:00
yixiangzhike
3592782958 Fix the failure of testcase compiled with kernel-6.x 2024-11-20 18:28:09 +08:00
openeuler-ci-bot
48b6d7fd38
!63 【Mainline】simplified control macro
From: @yixiangzhike 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2024-01-18 07:58:24 +00:00
yixiangzhike
63ffe70495 simplified control macro 2024-01-18 14:50:19 +08:00
openeuler-ci-bot
a432f6b3d9
!61 [sync] PR-60: 【openEuler-23.09】Refix the failure of building with cppcheck>=2.11 by using upstream patch
From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2023-08-17 01:45:48 +00:00
yixiangzhike
196c9ff535 Refix the failure of building with cppcheck>=2.11 by using upstream patch
(cherry picked from commit 3c72d76aa0d3f86e778e5e9367791a08090ac7f9)
2023-08-16 17:22:00 +08:00
openeuler-ci-bot
036e8ea764
!58 【Mainline】Append newline to command sha256hmac
From: @yixiangzhike 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2023-08-16 03:20:51 +00:00
yixiangzhike
5987d2a864 Append newline to command sha256hmac 2023-08-15 16:14:14 +08:00
openeuler-ci-bot
9c559eb88b
!57 【Mainline】fix the failure of building with cppcheck>=2.11
From: @yixiangzhike 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-07-25 10:12:19 +00:00
yixiangzhike
ddddd219bf fix the failure of building with cppcheck>=2.11 2023-07-25 16:41:21 +08:00
4 changed files with 148 additions and 6 deletions

View File

@ -0,0 +1,35 @@
From 8776e34e11351265f6efde0db5ecddecac3ab217 Mon Sep 17 00:00:00 2001
From: yixiangzhike <yixiangzhike007@163.com>
Date: Mon, 26 Jun 2023 22:22:15 +0800
Subject: [PATCH] Append newline to stdout
Append newline to stdout for printing hash may be a good experience.
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
---
apps/kcapi-hasher.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/apps/kcapi-hasher.c b/apps/kcapi-hasher.c
index 7c53f90..fd60536 100644
--- a/apps/kcapi-hasher.c
+++ b/apps/kcapi-hasher.c
@@ -905,12 +905,14 @@ int main(int argc, char *argv[])
.bsd_style = 0,
.hashlen = 0,
.key = KEY_FIPSCHECK,
+ .newline = 1,
};
const struct hash_params PARAMS_SELF_HMACCALC = {
.name = NAMES_SHA512[1],
.bsd_style = 0,
.hashlen = 0,
.key = KEY_HMACCALC,
+ .newline = 1,
};
basec = strdup(argv[0]);
--
2.27.0

View File

@ -0,0 +1,33 @@
From 2a49df86007becae89f335025e549bdbd26a24d2 Mon Sep 17 00:00:00 2001
From: Ondrej Mosnacek <omosnace@redhat.com>
Date: Wed, 26 Jul 2023 10:32:34 +0200
Subject: [PATCH] Prevent cppcheck from defining CHECK_DIR
Recent versions of cppcheck fail with a syntax error when they check
apps/kcapi-hasher.c with CHECK_DIR defined (probably they now define it
to 1 instead of an empty value). To fix it, instruct cppcheck to only
check with CHECK_DIR left undefined.
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2225970
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 0a6ff26..0189848 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -241,7 +241,7 @@ endif
if HAVE_CPPCHECK
cppcheck:
- $(CPPCHECK) --error-exitcode=42 --enable=performance,warning,portability $(sort $(SCAN_FILES))
+ $(CPPCHECK) -U CHECK_DIR --error-exitcode=42 --enable=performance,warning,portability $(sort $(SCAN_FILES))
endif
if HAVE_MKTEMP
--
2.27.0

View File

@ -0,0 +1,43 @@
From c2af62dcc7a287f3c14f6aaec5724401c1ea470a Mon Sep 17 00:00:00 2001
From: Ondrej Mosnacek <omosnace@redhat.com>
Date: Mon, 15 Aug 2022 10:19:50 +0200
Subject: [PATCH] tests: fix overly-optimistic kernel version checks
The mainline kernel is now at version 6.0 so these >= 5.99 checks are
now incorrectly enabling tests that don't work. Instead of bumping the
imaginary version and face the same problem again in a couple years,
replace the checks with 'false' and a TODO comment.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
---
test/test.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/test.sh b/test/test.sh
index 1d9be73..a75b802 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -1560,7 +1560,8 @@ else
echo_deact "AEAD tests of copied AAD deactivated"
fi
-if $(check_min_kernelver 5 99); then
+# TODO add version check when supported upstream
+if false; then
asymfunc 4
asymfunc 4 -s
asymfunc 4 -v
@@ -1583,7 +1584,8 @@ else
echo_deact "All asymmetric tests deactivated"
fi
-if $(check_min_kernelver 5 99); then
+# TODO add version check when supported upstream
+if false; then
kppfunc 13
kppfunc 13 X -m
kppfunc 13 -v
--
2.33.0

View File

@ -2,11 +2,9 @@
%global sysctl_optmem_max 81920
%global distroname_ext %{_vendor}
%if %{?openEuler:1}0
%define enable_docbook_pdf 1
%else
%define enable_docbook_pdf 0
%endif
# Define enable_docbook_pdf to 0,
# if you don't need pdf and ps document.
%global enable_docbook_pdf 1
# Calculate hmac file after installing for binary
%define __spec_install_post \
@ -26,7 +24,7 @@ ln -s libkcapi.so.%{version}.hmac %{buildroot}/%{_lib}/fipscheck/libkcapi.so.
Name: libkcapi
Version: 1.4.0
Release: 2
Release: 7
Summary: libkcapi - Linux Kernel Crypto API User Space Interface Library
License: BSD or GPLv2
@ -35,6 +33,9 @@ Source0: http://www.chronox.de/%{name}/%{name}-%{version}.tar.xz
Source1: http://www.chronox.de/%{name}/%{name}-%{version}.tar.xz.asc
Patch0: libkcapi-1.1.1-lib_Fix_kcapi_handle_destroy_closing_FD_0.patch
Patch1: backport-Append-newline-to-stdout.patch
Patch2: backport-Prevent-cppcheck-from-defining-CHECK_DIR.patch
Patch3: backport-tests-fix-overly-optimistic-kernel-version-checks.patch
BuildRequires: clang coreutils cppcheck gcc hardlink
BuildRequires: libtool openssl perl systemd xmlto kernel-headers >= 4.10.0
@ -219,6 +220,36 @@ popd
%{_mandir}/man3/kcapi_*.3.*
%changelog
* Wed Nov 20 2024 yixiangzhike <yixiangzhike007@163.com> - 1.4.0-7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix the failure of testcase compiled with kernel-6.x
* Thu Jan 18 2024 yixiangzhike <yixiangzhike007@163.com> - 1.4.0-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:simplified control macro
* Wed Aug 16 2023 yixiangzhike <yixiangzhike007@163.com> - 1.4.0-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:refix the failure of building with cppcheck>=2.11 by using upstream patch
* Tue Aug 15 2023 yixiangzhike <yixiangzhike007@163.com> - 1.4.0-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:append newline to command /usr/bin/sha*hmac
* 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