[packages/mbedtls/DEVEL-3.5] - updated to 3.5.2 (new sonames; disable aes native code on 32-bit x86 by default)

qboosh qboosh at pld-linux.org
Tue Feb 20 21:52:01 CET 2024


commit f539bcd2947179fb4e7261ce1bd9faa8e869c0f2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Feb 20 21:44:46 2024 +0100

    - updated to 3.5.2 (new sonames; disable aes native code on 32-bit x86 by default)

 mbedtls.spec | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)
---
diff --git a/mbedtls.spec b/mbedtls.spec
index d513e37..15ccea2 100644
--- a/mbedtls.spec
+++ b/mbedtls.spec
@@ -1,13 +1,17 @@
+#
+# Conditional build:
+%bcond_with	x86aes	# (32-bit) x86 pclmul+sse2+aes instruction sets
+
 Summary:	Light-weight cryptographic and SSL/TLS library
 Summary(pl.UTF-8):	Lekka biblioteka kryptograficzna oraz SSL/TLS
 Name:		mbedtls
-Version:	3.4.0
+Version:	3.5.2
 Release:	1
 License:	GPL v2+
 Group:		Libraries
 #Source0Download: https://github.com/ARMmbed/mbedtls/releases
 Source0:	https://github.com/ARMmbed/mbedtls/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	3f6c2eadc1243e9895d65c67b46eb890
+# Source0-md5:	65fccd1e2f0aa0aa544e35c626075785
 Patch0:		%{name}-config-dtls-srtp.patch
 URL:		https://www.trustedfirmware.org/projects/mbed-tls/
 BuildRequires:	cmake >= 3.5.1
@@ -76,6 +80,16 @@ Dokumentacja API biblioteki mbedTLS.
 %patch0 -p1
 
 %build
+%ifarch %{ix86}
+%if %{with x86aes}
+# mbedtls 3.5.[0-2] on 32-bit x86 requires aes.c and aesni.c built with AES+SSE2 options
+# but aes.c code is executed regardless of CPU features detection
+CFLAGS="%{rpmcflags} -mpclmul -msse2 -maes"
+%else
+%{__sed} -i -e 's,^#define MBEDTLS_AESNI_C,// &,' include/mbedtls/mbedtls_config.h
+%endif
+%endif
+
 install -d build
 cd build
 %cmake .. \
@@ -111,11 +125,13 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc ChangeLog LICENSE README.md
 %attr(755,root,root) %{_libdir}/libmbedcrypto.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmbedcrypto.so.14
+%attr(755,root,root) %ghost %{_libdir}/libmbedcrypto.so.15
 %attr(755,root,root) %{_libdir}/libmbedtls.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmbedtls.so.19
+%attr(755,root,root) %ghost %{_libdir}/libmbedtls.so.20
 %attr(755,root,root) %{_libdir}/libmbedx509.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmbedx509.so.5
+%attr(755,root,root) %ghost %{_libdir}/libmbedx509.so.6
+%attr(755,root,root) %{_libdir}/libeverest.so
+%attr(755,root,root) %{_libdir}/libp256m.so
 %dir %{_libexecdir}/%{name}
 %attr(755,root,root) %{_libexecdir}/%{name}/aead_demo
 %attr(755,root,root) %{_libexecdir}/%{name}/benchmark
@@ -181,6 +197,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libmbedcrypto.so
 %attr(755,root,root) %{_libdir}/libmbedtls.so
 %attr(755,root,root) %{_libdir}/libmbedx509.so
+%{_includedir}/everest
 %{_includedir}/mbedtls
 %{_includedir}/psa
 %{_libdir}/cmake/MbedTLS
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mbedtls.git/commitdiff/f539bcd2947179fb4e7261ce1bd9faa8e869c0f2



More information about the pld-cvs-commit mailing list