Backport uadk engine patch(24-32) from linaro. Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> (cherry picked from commit 9a48324e3f545ee8f8485847f3fecf252682eb6a)
114 lines
4.1 KiB
RPMSpec
114 lines
4.1 KiB
RPMSpec
%global debug_package %{nil}
|
|
|
|
Name: uadk_engine
|
|
Summary: UADK Accelerator Engine
|
|
Version: 1.0.0
|
|
Release: 5
|
|
License: Apache-2.0
|
|
Source: %{name}-%{version}.tar.gz
|
|
ExclusiveOS: linux
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
Prefix: /usr/local/lib/engines-1.1
|
|
Conflicts: %{name} < %{version}-%{release}
|
|
Provides: %{name} = %{version}-%{release}
|
|
BuildRequires: libwd >= 2.3.21
|
|
BuildRequires: openssl-devel sed autoconf automake libtool
|
|
Requires: openssl
|
|
ExclusiveArch: aarch64
|
|
|
|
Patch0001: 0001-digest-support-digest-multiple-update.patch
|
|
Patch0002: 0002-uadk_engine-define-the-variable-as-const.patch
|
|
Patch0003: 0003-ecc-fix-codecheck-warning.patch
|
|
Patch0004: 0004-rsa-delete-redundant-copy.patch
|
|
Patch0005: 0005-rsa-fix-coverity-warning.patch
|
|
Patch0006: 0006-ecc-cleanup-duplicate-public-key-allocation.patch
|
|
Patch0007: 0007-rsa-cleanup-about-reducing-function-parameters.patch
|
|
Patch0008: 0008-ecc-cleanup-sm2-compute-digest-function.patch
|
|
Patch0009: 0009-ecc-bugfix-about-ecc-init-after-alloc-sess.patch
|
|
Patch0010: 0010-rsa-cleanup-about-prime-generation.patch
|
|
Patch0011: 0011-ecc-cleanup-the-form-of-the-return-value.patch
|
|
Patch0012: 0012-engine-fix-uadk-engine-compatibility-issue.patch
|
|
Patch0013: 0013-digest-modify-the-process-of-free-session.patch
|
|
Patch0014: 0014-digest-modify-the-process-of-soft-and-hardware-hando.patch
|
|
Patch0015: 0015-ecc-bugfix-about-sm2-decryption.patch
|
|
Patch0016: 0016-dh-bugfix-about-dh-compute-key.patch
|
|
Patch0017: 0017-ecc-bugfix-about-ecc-general-init.patch
|
|
Patch0018: 0018-digest-fix-codecheck-warning.patch
|
|
Patch0019: 0019-cipher-fixup-a-code-check-warning.patch
|
|
Patch0020: 0020-rsa-fixup-a-code-check-warning.patch
|
|
Patch0021: 0021-cipher-delete-a-redundant-branch.patch
|
|
Patch0022: 0022-engine-fix-engine-can-t-work-under-hybrid-mode.patch
|
|
Patch0023: 0023-engine-add-the-kae-log-feature.patch
|
|
Patch0024: 0024-rsa-fix-interface-name.patch
|
|
Patch0025: 0025-ecc-cleanup-sm2-unreachable-code.patch
|
|
Patch0026: 0026-rsa-cleanup-of-code-style.patch
|
|
Patch0027: 0027-v1-fixup-about-uninitialized-variable.patch
|
|
Patch0028: 0028-ecc-fix-checking-conditions.patch
|
|
Patch0029: 0029-ecc-cleanup-print-log.patch
|
|
Patch0030: 0030-engine-fix-function-return-type.patch
|
|
Patch0031: 0031-rsa-fixup-about-the-wrong-copy.patch
|
|
Patch0032: 0032-README-modify-the-engine-id-name.patch
|
|
|
|
%description
|
|
This package contains the UADK Accelerator Engine
|
|
|
|
%prep
|
|
%autosetup -n %{name} -p1
|
|
|
|
%build
|
|
autoreconf -i
|
|
chmod +x configure
|
|
./configure --enable-kae
|
|
make
|
|
|
|
%install
|
|
mkdir -p ${RPM_BUILD_ROOT}/usr/local/lib/engines-1.1
|
|
install -b -m755 src/.libs/uadk_engine.so.%{version} ${RPM_BUILD_ROOT}/usr/local/lib/engines-1.1
|
|
|
|
%clean
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
%files
|
|
%defattr(755,root,root)
|
|
/usr/local/lib/engines-1.1/uadk_engine.so.%{version}
|
|
|
|
%pre
|
|
if [ "$1" = "2" ] ; then #2: update
|
|
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so > /dev/null 2>&1 || true
|
|
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so.0 > /dev/null 2>&1 || true
|
|
fi
|
|
|
|
%post
|
|
if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update
|
|
ln -sf $RPM_INSTALL_PREFIX/uadk_engine.so.%{version} $RPM_INSTALL_PREFIX/uadk_engine.so
|
|
ln -sf $RPM_INSTALL_PREFIX/uadk_engine.so.%{version} $RPM_INSTALL_PREFIX/uadk_engine.so.0
|
|
fi
|
|
/sbin/ldconfig
|
|
|
|
%preun
|
|
if [ "$1" = "0" ] ; then #0: uninstall
|
|
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so > /dev/null 2>&1 || true
|
|
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so.0 > /dev/null 2>&1 || true
|
|
rm -f /var/log/uadk_engine.log > /dev/null 2>&1 || true
|
|
rm -f /var/log/uadk_engine.log.old > /dev/null 2>&1 || true
|
|
fi
|
|
|
|
%postun
|
|
/sbin/ldconfig
|
|
|
|
%changelog
|
|
* Thu Mar 3 2022 linwenkai <linwenkai6@hisilicon.com> 1.0.0-5
|
|
- Backport uadk engine patch for v1.0.0
|
|
|
|
* Mon Feb 21 2022 linwenkai <linwenkai6@hisilicon.com> 1.0.0-4
|
|
- Backport uadk engine patch for v1.0.0
|
|
|
|
* Wed Jan 12 2022 linwenkai <linwenkai6@hisilicon.com> 1.0.0-3
|
|
- Backport uadk engine patch
|
|
|
|
* Fri Dec 10 2021 linwenkai <linwenkai6@hisilicon.com> 1.0.0-2
|
|
- Delete digest duplicate code
|
|
|
|
* Fri Dec 10 2021 linwenkai <linwenkai6@hisilicon.com> 1.0.0-1
|
|
- First Spec Version Include uadk_engine Code
|