Accepting request 1089972 from security:tls

OBS-URL: https://build.opensuse.org/request/show/1089972
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mbedtls?expand=0&rev=39
This commit is contained in:
Dominique Leuenberger 2023-05-31 19:54:57 +00:00 committed by Git OBS Bridge
commit 32a19a5168
3 changed files with 34 additions and 10 deletions

View File

@ -0,0 +1,21 @@
diff -purN a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h
--- a/include/mbedtls/mbedtls_config.h 2023-03-27 19:05:28.000000000 +0200
+++ b/include/mbedtls/mbedtls_config.h 2023-05-29 19:15:39.917530360 +0200
@@ -1917,7 +1917,7 @@
*
* Uncomment this to enable pthread mutexes.
*/
-//#define MBEDTLS_THREADING_PTHREAD
+#define MBEDTLS_THREADING_PTHREAD
/**
* \def MBEDTLS_USE_PSA_CRYPTO
@@ -3312,7 +3312,7 @@
*
* Enable this layer to allow use of mutexes within mbed TLS
*/
-//#define MBEDTLS_THREADING_C
+#define MBEDTLS_THREADING_C
/**
* \def MBEDTLS_TIMING_C

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon May 29 17:41:24 UTC 2023 - Arjen de Korte <suse+build@de-korte.org>
- Remove obsolete CMake options as these are not used in 3.0+
(USE_PKCS11_HELPER_LIBRARY, ENABLE_ZLIB_SUPPORT)
- Enable MBEDTLS_THREADING_C and MBEDTLS_THREADING_PTHREAD (boo#1211810)
+ mbedtls-enable-pthread.patch
- Parallel execution of ctest works just fine (no need to limit to
one job)
-------------------------------------------------------------------
Sun May 7 20:44:12 UTC 2023 - Mariusz Fik <fisiu@opensuse.org>

View File

@ -28,11 +28,10 @@ Group: Development/Libraries/C and C++
URL: https://tls.mbed.org
Source: %{name}-%{version}.tar.gz
Source99: baselibs.conf
# PATCH-FEATURE-OPENSUSE - enable MBEDTLS_THREADING_PTHREAD and MBEDTLS_THREADING_C
Patch1: mbedtls-enable-pthread.patch
BuildRequires: cmake
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libpkcs11-helper-1)
BuildRequires: pkgconfig(zlib)
%{?suse_build_hwcaps_libs}
%description
@ -97,10 +96,6 @@ export CXXLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized"
%cmake \
-DUNSAFE_BUILD=ON \
-DLINK_WITH_PTHREAD=ON \
-DMBEDTLS_THREADING_C=ON \
-DMBEDTLS_THREADING_PTHREAD=ON \
-DUSE_PKCS11_HELPER_LIBRARY=ON \
-DENABLE_ZLIB_SUPPORT=ON \
-DINSTALL_MBEDTLS_HEADERS=ON \
-DUSE_SHARED_MBEDTLS_LIBRARY=ON \
-DUSE_STATIC_MBEDTLS_LIBRARY=OFF \
@ -112,11 +107,9 @@ export CXXLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized"
%cmake_install
%check
# parallel execution fails
# %%ctest
pushd build
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
%{_bindir}/ctest --output-on-failure --force-new-ctest-process -j1
%{_bindir}/ctest --output-on-failure --force-new-ctest-process
%post -n %{lib_tls} -p /sbin/ldconfig
%post -n %{lib_crypto} -p /sbin/ldconfig