Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
c905ab2152
!56 [sync] PR-53: 【openEuler-20.03-LTS-SP1】Calculate hmac file after installing for binary
From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2023-04-28 08:24:08 +00:00
yixiangzhike
ca09fe3329 Calculate hmac file after installing for binary
(cherry picked from commit 04767fcbd15cd2178e7fa175a0c4589472bfa996)
2023-04-28 15:01:43 +08:00
openeuler-ci-bot
c712626e13
!48 [sync] PR-46: 【openEuler-20.03-LTS-SP1】Use macro to control whether to enable make check
From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2023-02-13 02:26:50 +00:00
yixiangzhike
116c822921 Use macro to control whether to enable make check
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
(cherry picked from commit 201f1d72e8e8ae583eafc6c0818d5834280892b9)
2023-02-10 15:06:26 +08:00
openeuler-ci-bot
807872082c
!47 [sync] PR-43: 【openEuler-20.03-LTS-SP1】Enable make check
From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2023-02-10 06:57:59 +00:00
yixiangzhike
a663131b83 Enable make check
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
(cherry picked from commit 759ac74e9333b8298a575c7470a3e98e76c4ac07)
2023-02-10 09:47:45 +08:00
openeuler-ci-bot
16c07b3794 !17 Solve the failure when installing libkcapi-devel
From: @panxh_purple
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
2020-11-25 21:05:51 +08:00
panxiaohe
f1c2a79c3b Solve the failure when installing libkcapi-devel 2020-11-20 11:03:25 +08:00
openeuler-ci-bot
e8cba26f10 !11 【openEuler-20.03-LTS-Next】Solve the failure when installing libkcapi-tests
From: @yixiangzhike
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
2020-10-22 16:42:10 +08:00
yixiangzhike
215dc27855 Solve the failure when installing libkcapi-tests 2020-10-22 14:48:04 +08:00

View File

@ -2,9 +2,26 @@
%global sysctl_optmem_max 81920
%global distroname_ext %{_vendor}
%bcond_with enable_test
# Calculate hmac file after installing for binary
%define __spec_install_post \
%{?__debug_package:%{__debug_install_post}} \
%{__arch_install_post} \
%{__os_install_post} \
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha1hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha1hmac.hmac \
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha224hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha224hmac.hmac \
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha256hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha256hmac.hmac \
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha384hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha384hmac.hmac \
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha512hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha512hmac.hmac \
hardlink -cfv %{buildroot}%{_bindir} \
bin/kcapi-hasher -n fipshmac -d %{buildroot}/%{_lib}/fipscheck %{buildroot}/%{_lib}/libkcapi.so.%{version} || exit 1 \
ln -s libkcapi.so.%{version}.hmac %{buildroot}/%{_lib}/fipscheck/libkcapi.so.1.hmac \
%{nil}
Name: libkcapi
Version: 1.2.0
Release: 2
Release: 7
Summary: libkcapi - Linux Kernel Crypto API User Space Interface Library
License: BSD or GPLv2
@ -23,13 +40,11 @@ Provides: %{name}-tools
Provides: hmaccalc == 0.9.14-10.1
Provides: hmaccalc%{?_isa} == 0.9.14-10.1
Provides: %{name}-hmaccalc
Provides: %{name}-tests
Obsoletes: %{name}-replacements <= %{version}-%{release}
Obsoletes: %{name}-tools
Obsoletes: hmaccalc <= 0.9.14-10
Obsoletes: %{name}-hmaccalc
Obsoletes: %{name}-tests
%description
The Linux kernel exports a Netlink interface of type AF_ALG to allow user space to utilize the kernel crypto API.
@ -44,9 +59,6 @@ Requires: %{name} == %{version}-%{release}
Obsoletes: %{name}-static
Provides: %{name}-static
Obsoletes: %{name}-tests
Provides: %{name}-tests
%description devel
Header files for applications that use %{name}.
@ -149,17 +161,28 @@ done
%ldconfig_scriptlets
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha1hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha1hmac.hmac
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha224hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha224hmac.hmac
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha256hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha256hmac.hmac
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha384hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha384hmac.hmac
bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha512hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha512hmac.hmac
hardlink -cfv %{buildroot}%{_bindir}
bin/kcapi-hasher -n fipshmac -d %{buildroot}/%{_lib}/fipscheck %{buildroot}/%{_lib}/libkcapi.so.%{version} || exit 1
ln -s libkcapi.so.%{version}.hmac %{buildroot}/%{_lib}/fipscheck/libkcapi.so.1.hmac
%check
%if %{with enable_test}
for t in cppcheck scan;do
%make_build $t
done
# Lowest limit to run the testsuite. If we cannot obtain
# this value, we asume the testsuite cannot be run.
if [ -f /proc/sys/net/core/optmem_max ]; then
test_optmem_max=`%{__cat} /proc/sys/net/core/optmem_max`
else
test_optmem_max=0
fi
if [ $test_optmem_max -ge 20480 ];then
pushd test
ENABLE_FUZZ_TEST=1 \
NO_32BIT_TEST=1 \
./test-invocation.sh ||:
popd
fi
%endif
%files
%doc %dir %{_pkgdocdir}
@ -190,6 +213,21 @@ ln -s libkcapi.so.%{version}.hmac %{buildroot}/%{_lib}/fipscheck/libkcapi.so.
%{_mandir}/man3/kcapi_*.3.*
%changelog
* Fri Apr 28 2023 yixiangzhike <yixiangzhike007@163.com> - 1.2.0-7
- Calculate hmac file after installing for binary
* Thu Feb 9 2023 yixiangzhike <yixiangzhike007@163.com> - 1.2.0-6
- Use macro to control whether to enable make check
* Wed Feb 8 2023 yixiangzhike <yixiangzhike007@163.com> - 1.2.0-5
- Enable make check
* Fri Nov 20 2020 panxiaohe <panxiaohe@huawei.com> - 1.2.0-4
- Solve the failure when installing libkcapi-devel
* Thu Oct 22 2020 zhangxingliang <zhangxingliang3@huawei.com> - 1.2.0-3
- Solve the failure when installing libkcapi-tests
* Fri Oct 16 2020 zhangxingliang <zhangxingliang3@huawei.com> - 1.2.0-2
- Detach the sub package libkcapi-tests from libkcapi