diff --git a/mbedtls-enable-pthread.patch b/mbedtls-enable-pthread.patch new file mode 100644 index 0000000..33b682c --- /dev/null +++ b/mbedtls-enable-pthread.patch @@ -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 diff --git a/mbedtls.changes b/mbedtls.changes index c565e95..80b74be 100644 --- a/mbedtls.changes +++ b/mbedtls.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon May 29 17:41:24 UTC 2023 - Arjen de Korte + +- 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 diff --git a/mbedtls.spec b/mbedtls.spec index b3b2902..1c10d0a 100644 --- a/mbedtls.spec +++ b/mbedtls.spec @@ -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