From: Anthony G. Basile Date: Wed, 29 Jan 2020 14:21:46 +0000 (-0500) Subject: net-libs/mbedtls: fix wrong headers, bug #705038 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9bdff0e5ea288b745e38ef08914fe141a127902c;p=gentoo.git net-libs/mbedtls: fix wrong headers, bug #705038 Closes: https://bugs.gentoo.org/705038 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Anthony G. Basile --- diff --git a/net-libs/mbedtls/files/mbedtls-un-pebcak-705038-wrong-file.patch b/net-libs/mbedtls/files/mbedtls-un-pebcak-705038-wrong-file.patch new file mode 100644 index 000000000000..73e870fa1e4b --- /dev/null +++ b/net-libs/mbedtls/files/mbedtls-un-pebcak-705038-wrong-file.patch @@ -0,0 +1,50 @@ +Fix https://bugs.gentoo.org/705038 + +Thanks Greg Turner + +diff -urpN mbedtls-mbedtls-2.19.1.orig/crypto/include/CMakeLists.txt mbedtls-mbedtls-2.19.1/crypto/include/CMakeLists.txt +--- mbedtls-mbedtls-2.19.1.orig/crypto/include/CMakeLists.txt 2020-01-26 09:01:50.324231295 -0800 ++++ mbedtls-mbedtls-2.19.1/crypto/include/CMakeLists.txt 2020-01-26 09:04:26.498880873 -0800 +@@ -5,6 +5,19 @@ if(INSTALL_MBEDTLS_HEADERS) + file(GLOB headers "mbedtls/*.h") + file(GLOB psa_headers "psa/*.h") + ++ if(USE_CRYPTO_SUBMODULE) ++ # Don't overwrite mbedtls's header files! ++ # config.h is supposed to be automatically checked for compatibility ++ # in automatic builds, while the other files should not just be ++ # compatible, but also identical in theory. ++ # Practically, we don't check that in crypto but just assume that the ++ # submodule configuration is sane and trust tls's headers. ++ list(REMOVE_ITEM headers "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/compat-1.3.h" ++ "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/config.h" ++ "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/error.h" ++ "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/version.h") ++ endif(USE_CRYPTO_SUBMODULE) ++ + install(FILES ${headers} + DESTINATION include/mbedtls + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) +diff -urpN mbedtls-mbedtls-2.19.1.orig/include/CMakeLists.txt mbedtls-mbedtls-2.19.1/include/CMakeLists.txt +--- mbedtls-mbedtls-2.19.1.orig/include/CMakeLists.txt 2020-01-26 09:01:50.320231227 -0800 ++++ mbedtls-mbedtls-2.19.1/include/CMakeLists.txt 2020-01-26 09:03:45.761189288 -0800 +@@ -4,19 +4,6 @@ if(INSTALL_MBEDTLS_HEADERS) + + file(GLOB headers "mbedtls/*.h") + +- if(USE_CRYPTO_SUBMODULE) +- # Don't overwrite mbedtls's header files! +- # config.h is supposed to be automatically checked for compatibility +- # in automatic builds, while the other files should not just be +- # compatible, but also identical in theory. +- # Practically, we don't check that in crypto but just assume that the +- # submodule configuration is sane and trust tls's headers. +- list(REMOVE_ITEM headers "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/compat-1.3.h" +- "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/config.h" +- "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/error.h" +- "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/version.h") +- endif(USE_CRYPTO_SUBMODULE) +- + install(FILES ${headers} + DESTINATION include/mbedtls + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) diff --git a/net-libs/mbedtls/mbedtls-2.18.1-r1.ebuild b/net-libs/mbedtls/mbedtls-2.18.1-r1.ebuild index b11f2794a352..dfb900ea4c69 100644 --- a/net-libs/mbedtls/mbedtls-2.18.1-r1.ebuild +++ b/net-libs/mbedtls/mbedtls-2.18.1-r1.ebuild @@ -38,6 +38,7 @@ enable_mbedtls_option() { PATCHES=( "${FILESDIR}"/${PN}-dont-overwrite-headers.patch + "${FILESDIR}"/${PN}-un-pebcak-705038-wrong-file.patch ) src_prepare() { diff --git a/net-libs/mbedtls/mbedtls-2.19.1-r1.ebuild b/net-libs/mbedtls/mbedtls-2.19.1-r1.ebuild index 1a73d20f220e..a18fc8919884 100644 --- a/net-libs/mbedtls/mbedtls-2.19.1-r1.ebuild +++ b/net-libs/mbedtls/mbedtls-2.19.1-r1.ebuild @@ -38,6 +38,7 @@ enable_mbedtls_option() { PATCHES=( "${FILESDIR}"/${PN}-dont-overwrite-headers.patch + "${FILESDIR}"/${PN}-un-pebcak-705038-wrong-file.patch ) src_prepare() {