Compare commits
10 Commits
dc865b1547
...
c905ab2152
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c905ab2152 | ||
|
|
ca09fe3329 | ||
|
|
c712626e13 | ||
|
|
116c822921 | ||
|
|
807872082c | ||
|
|
a663131b83 | ||
|
|
16c07b3794 | ||
|
|
f1c2a79c3b | ||
|
|
e8cba26f10 | ||
|
|
215dc27855 |
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user