This is an automated email from the ASF dual-hosted git repository. fgerlits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 29d78d3424aa55862a5e3619084bf20a15b6c173 Author: Gabor Gyimesi <[email protected]> AuthorDate: Tue Aug 12 13:02:04 2025 +0200 MINIFICPP-2604 Upgrade Azure SDK to the latest release - Upgrade Azure Identity to version 1.13.0 - Upgrade Azure Storage Blobs to version 12.14.0 - Upgrade Azure Storage Files Datalake to version 12.13.0-beta.1 - Fix managed identity handling in Azure SDK Signed-off-by: Ferenc Gerlits <[email protected]> Closes #2005 --- cmake/AzureSdkCpp.cmake | 55 +++++++++ cmake/BundledAzureSdkCpp.cmake | 125 --------------------- cmake/BundledLibcURL.cmake | 1 + .../containers/AzureStorageServerContainer.py | 2 +- extensions/azure/CMakeLists.txt | 5 +- .../azure/storage/AzureBlobStorageClient.cpp | 20 ++-- extensions/azure/storage/AzureBlobStorageClient.h | 2 +- .../azure-sdk-cpp/fix-managed-identity.patch | 15 +++ thirdparty/azure-sdk-cpp/fix-openssl-helper.patch | 34 ++++++ thirdparty/azure-sdk-cpp/gcc13.patch | 44 -------- thirdparty/azure-sdk-cpp/remove-amqp.patch | 15 --- thirdparty/azure-sdk-cpp/wil.patch | 12 ++ 12 files changed, 130 insertions(+), 200 deletions(-) diff --git a/cmake/AzureSdkCpp.cmake b/cmake/AzureSdkCpp.cmake new file mode 100644 index 000000000..bafad992b --- /dev/null +++ b/cmake/AzureSdkCpp.cmake @@ -0,0 +1,55 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +include(FetchContent) + +if (WIN32) + set(WIL_BUILD_TESTS OFF CACHE INTERNAL "") + set(WIL_BUILD_PACKAGING OFF CACHE INTERNAL "") + + FetchContent_Declare( + wil + URL https://github.com/microsoft/wil/archive/refs/tags/v1.0.250325.1.tar.gz + URL_HASH SHA256=c9e667d5f86ded43d17b5669d243e95ca7b437e3a167c170805ffd4aa8a9a786 + SYSTEM + ) + FetchContent_MakeAvailable(wil) +endif() + +set(WARNINGS_AS_ERRORS OFF CACHE INTERNAL "") +set(DISABLE_AZURE_CORE_OPENTELEMETRY ON CACHE INTERNAL "") +set(BUILD_TRANSPORT_CURL ON CACHE INTERNAL "") +set(BUILD_TESTING OFF CACHE INTERNAL "") +set(BUILD_SAMPLES OFF CACHE INTERNAL "") +set(DISABLE_AMQP ON CACHE INTERNAL "") + +set(PATCH_FILE_1 "${CMAKE_SOURCE_DIR}/thirdparty/azure-sdk-cpp/wil.patch") +set(PATCH_FILE_2 "${CMAKE_SOURCE_DIR}/thirdparty/azure-sdk-cpp/fix-openssl-helper.patch") +set(PATCH_FILE_3 "${CMAKE_SOURCE_DIR}/thirdparty/azure-sdk-cpp/fix-managed-identity.patch") + +set(PC ${Bash_EXECUTABLE} -c "set -x &&\ + (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_1}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_1}\\\") &&\ + (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_2}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_2}\\\") &&\ + (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE_3}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE_3}\\\")") + +FetchContent_Declare(asdkext + URL https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-identity_1.13.0.tar.gz + URL_HASH "SHA256=a18ce70f8da11266b6a1aec3c02233ca889ea6137471a9f633131f00dfd386c0" + PATCH_COMMAND "${PC}" + SYSTEM +) + +FetchContent_MakeAvailable(asdkext) diff --git a/cmake/BundledAzureSdkCpp.cmake b/cmake/BundledAzureSdkCpp.cmake deleted file mode 100644 index 3294ac636..000000000 --- a/cmake/BundledAzureSdkCpp.cmake +++ /dev/null @@ -1,125 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -function(use_bundled_libazure SOURCE_DIR BINARY_DIR) - set(PATCH_FILE1 "${SOURCE_DIR}/thirdparty/azure-sdk-cpp/remove-amqp.patch") - set(PATCH_FILE2 "${SOURCE_DIR}/thirdparty/azure-sdk-cpp/gcc13.patch") - set(PC ${Bash_EXECUTABLE} -c "set -x && \ - (\"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE}\")") - set(PC ${Bash_EXECUTABLE} -c "set -x &&\ - (\"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE1}\") &&\ - (\"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE2}\") ") - # Define byproducts - set(INSTALL_DIR "${BINARY_DIR}/thirdparty/azure-sdk-cpp-install") - if (WIN32) - set(LIBDIR "lib") - else() - include(GNUInstallDirs) - string(REPLACE "/" ";" LIBDIR_LIST ${CMAKE_INSTALL_LIBDIR}) - list(GET LIBDIR_LIST 0 LIBDIR) - endif() - if (WIN32) - set(SUFFIX "lib") - set(PREFIX "") - set(AZURE_CORE_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-core.${SUFFIX}") - set(AZURE_STORAGE_COMMON_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-storage-common.${SUFFIX}") - set(AZURE_STORAGE_BLOBS_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-storage-blobs.${SUFFIX}") - set(AZURE_IDENTITY_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-identity.${SUFFIX}") - set(AZURE_STORAGE_FILES_DATALAKE_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-storage-files-datalake.${SUFFIX}") - else() - set(SUFFIX "a") - set(PREFIX "lib") - set(AZURE_CORE_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-core.${SUFFIX}") - set(AZURE_STORAGE_COMMON_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-storage-common.${SUFFIX}") - set(AZURE_STORAGE_BLOBS_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-storage-blobs.${SUFFIX}") - set(AZURE_IDENTITY_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-identity.${SUFFIX}") - set(AZURE_STORAGE_FILES_DATALAKE_LIB "${INSTALL_DIR}/${LIBDIR}/${PREFIX}azure-storage-files-datalake.${SUFFIX}") - endif() - - set(AZURESDK_LIBRARIES_LIST - "${AZURE_CORE_LIB}" - "${AZURE_STORAGE_COMMON_LIB}" - "${AZURE_STORAGE_BLOBS_LIB}" - "${AZURE_IDENTITY_LIB}" - "${AZURE_STORAGE_FILES_DATALAKE_LIB}") - - set(AZURE_SDK_CMAKE_ARGS ${PASSTHROUGH_CMAKE_ARGS} - -DWARNINGS_AS_ERRORS=OFF - -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} - -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON - -DBUILD_TRANSPORT_CURL=ON) - append_third_party_passthrough_args(AZURE_SDK_CMAKE_ARGS "${AZURE_SDK_CMAKE_ARGS}") - - # Build project - ExternalProject_Add( - asdkext # short for azure-sdk-cpp-external due to windows MAX_PATH limitations - URL https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-storage-files-datalake_12.7.0.tar.gz - URL_HASH "SHA256=42b9c1df0c15d9e0a3f547eeba8c45708aa86819986da66234e267f4ad728112" - SOURCE_DIR "${BINARY_DIR}/thirdparty/azure-sdk-cpp-src" - INSTALL_DIR "${BINARY_DIR}/thirdparty/azure-sdk-cpp-install" - BUILD_BYPRODUCTS "${AZURESDK_LIBRARIES_LIST}" - EXCLUDE_FROM_ALL TRUE - CMAKE_ARGS ${AZURE_SDK_CMAKE_ARGS} - LIST_SEPARATOR % # This is needed for passing semicolon-separated lists - PATCH_COMMAND ${PC} - DOWNLOAD_NO_PROGRESS TRUE - TLS_VERIFY TRUE - ) - - # Set dependencies - add_dependencies(asdkext CURL::libcurl LibXml2::LibXml2 OpenSSL::Crypto OpenSSL::SSL) - - # Set variables - set(LIBAZURE_FOUND "YES" CACHE STRING "" FORCE) - set(LIBAZURE_INCLUDE_DIRS "${INSTALL_DIR}/include" CACHE STRING "" FORCE) - set(LIBAZURE_LIBRARIES ${AZURESDK_LIBRARIES_LIST} CACHE STRING "" FORCE) - - # Create imported targets - FOREACH(LIBAZURE_INCLUDE_DIR ${LIBAZURE_INCLUDE_DIRS}) - file(MAKE_DIRECTORY ${LIBAZURE_INCLUDE_DIR}) - ENDFOREACH(LIBAZURE_INCLUDE_DIR) - - add_library(AZURE::azure-core STATIC IMPORTED) - set_target_properties(AZURE::azure-core PROPERTIES IMPORTED_LOCATION "${AZURE_CORE_LIB}") - add_dependencies(AZURE::azure-core asdkext) - target_include_directories(AZURE::azure-core INTERFACE ${LIBAZURE_INCLUDE_DIRS}) - target_link_libraries(AZURE::azure-core INTERFACE CURL::libcurl OpenSSL::Crypto OpenSSL::SSL) - if (WIN32) - target_link_libraries(AZURE::azure-core INTERFACE winhttp.lib WebServices.lib) - endif() - - add_library(AZURE::azure-identity STATIC IMPORTED) - set_target_properties(AZURE::azure-identity PROPERTIES IMPORTED_LOCATION "${AZURE_IDENTITY_LIB}") - add_dependencies(AZURE::azure-identity asdkext) - target_include_directories(AZURE::azure-identity INTERFACE ${LIBAZURE_INCLUDE_DIRS}) - - add_library(AZURE::azure-storage-common STATIC IMPORTED) - set_target_properties(AZURE::azure-storage-common PROPERTIES IMPORTED_LOCATION "${AZURE_STORAGE_COMMON_LIB}") - add_dependencies(AZURE::azure-storage-common asdkext) - target_include_directories(AZURE::azure-storage-common INTERFACE ${LIBAZURE_INCLUDE_DIRS}) - target_link_libraries(AZURE::azure-storage-common INTERFACE LibXml2::LibXml2) - - add_library(AZURE::azure-storage-blobs STATIC IMPORTED) - set_target_properties(AZURE::azure-storage-blobs PROPERTIES IMPORTED_LOCATION "${AZURE_STORAGE_BLOBS_LIB}") - add_dependencies(AZURE::azure-storage-blobs asdkext) - target_include_directories(AZURE::azure-storage-blobs INTERFACE ${LIBAZURE_INCLUDE_DIRS}) - - add_library(AZURE::azure-storage-files-datalake STATIC IMPORTED) - set_target_properties(AZURE::azure-storage-files-datalake PROPERTIES IMPORTED_LOCATION "${AZURE_STORAGE_FILES_DATALAKE_LIB}") - add_dependencies(AZURE::azure-storage-files-datalake asdkext) - target_include_directories(AZURE::azure-storage-files-datalake INTERFACE ${LIBAZURE_INCLUDE_DIRS}) -endfunction(use_bundled_libazure) diff --git a/cmake/BundledLibcURL.cmake b/cmake/BundledLibcURL.cmake index 207d97171..ffcdeebc4 100644 --- a/cmake/BundledLibcURL.cmake +++ b/cmake/BundledLibcURL.cmake @@ -93,6 +93,7 @@ function(use_bundled_curl SOURCE_DIR BINARY_DIR) add_dependencies(CURL::libcurl curl-external) target_include_directories(CURL::libcurl INTERFACE ${CURL_INCLUDE_DIRS}) target_link_libraries(CURL::libcurl INTERFACE ZLIB::ZLIB Threads::Threads OpenSSL::SSL OpenSSL::Crypto) + target_compile_definitions(CURL::libcurl INTERFACE CURL_STATICLIB) if (APPLE) target_link_libraries(CURL::libcurl INTERFACE "-framework CoreFoundation") target_link_libraries(CURL::libcurl INTERFACE "-framework SystemConfiguration") diff --git a/docker/test/integration/cluster/containers/AzureStorageServerContainer.py b/docker/test/integration/cluster/containers/AzureStorageServerContainer.py index f9dfbb273..c1918cdbd 100644 --- a/docker/test/integration/cluster/containers/AzureStorageServerContainer.py +++ b/docker/test/integration/cluster/containers/AzureStorageServerContainer.py @@ -31,7 +31,7 @@ class AzureStorageServerContainer(Container): logging.info('Creating and running azure storage server docker container...') self.client.containers.run( - "mcr.microsoft.com/azure-storage/azurite:3.33.0", + "mcr.microsoft.com/azure-storage/azurite:3.35.0", detach=True, name=self.name, network=self.network.name, diff --git a/extensions/azure/CMakeLists.txt b/extensions/azure/CMakeLists.txt index 7bdad325d..b6014ddf2 100644 --- a/extensions/azure/CMakeLists.txt +++ b/extensions/azure/CMakeLists.txt @@ -21,8 +21,7 @@ if (NOT (ENABLE_ALL OR ENABLE_AZURE)) return() endif() -include(BundledAzureSdkCpp) -use_bundled_libazure(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) +include(AzureSdkCpp) include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) @@ -39,7 +38,7 @@ target_include_directories(minifi-azure BEFORE PRIVATE ${CMAKE_SOURCE_DIR}/exten target_link_libraries(minifi-azure ${LIBMINIFI} Threads::Threads) target_link_libraries(minifi-azure LibXml2::LibXml2) -target_link_libraries(minifi-azure AZURE::azure-storage-files-datalake AZURE::azure-storage-blobs AZURE::azure-storage-common AZURE::azure-core AZURE::azure-identity) +target_link_libraries(minifi-azure Azure::azure-storage-files-datalake Azure::azure-storage-blobs Azure::azure-storage-common Azure::azure-core Azure::azure-identity) if (WIN32) target_link_libraries(minifi-azure crypt32.lib bcrypt.lib) diff --git a/extensions/azure/storage/AzureBlobStorageClient.cpp b/extensions/azure/storage/AzureBlobStorageClient.cpp index 629313b70..9393008ba 100644 --- a/extensions/azure/storage/AzureBlobStorageClient.cpp +++ b/extensions/azure/storage/AzureBlobStorageClient.cpp @@ -55,32 +55,30 @@ AzureBlobStorageClient::AzureBlobStorageClient() { utils::AzureSdkLogger::initialize(); } -std::unique_ptr<Azure::Storage::Blobs::BlobContainerClient> AzureBlobStorageClient::createClient(const AzureStorageCredentials &credentials, const std::string &container_name) { +Azure::Storage::Blobs::BlobContainerClient AzureBlobStorageClient::createClient(const AzureStorageCredentials &credentials, const std::string &container_name) { if (credentials.getUseManagedIdentityCredentials()) { auto storage_client = Azure::Storage::Blobs::BlobServiceClient( "https://" + credentials.getStorageAccountName() + ".blob." + credentials.getEndpointSuffix(), std::make_shared<Azure::Identity::ManagedIdentityCredential>()); - - return std::make_unique<Azure::Storage::Blobs::BlobContainerClient>(storage_client.GetBlobContainerClient(container_name)); + return storage_client.GetBlobContainerClient(container_name); } else { - return std::make_unique<Azure::Storage::Blobs::BlobContainerClient>( - Azure::Storage::Blobs::BlobContainerClient::CreateFromConnectionString(credentials.buildConnectionString(), container_name)); + return Azure::Storage::Blobs::BlobContainerClient::CreateFromConnectionString(credentials.buildConnectionString(), container_name); } } bool AzureBlobStorageClient::createContainerIfNotExists(const PutAzureBlobStorageParameters& params) { auto container_client = createClient(params.credentials, params.container_name); - return container_client->CreateIfNotExists().Value.Created; + return container_client.CreateIfNotExists().Value.Created; } Azure::Storage::Blobs::Models::UploadBlockBlobResult AzureBlobStorageClient::uploadBlob(const PutAzureBlobStorageParameters& params, std::span<const std::byte> buffer) { auto container_client = createClient(params.credentials, params.container_name); - auto blob_client = container_client->GetBlockBlobClient(params.blob_name); + auto blob_client = container_client.GetBlockBlobClient(params.blob_name); return blob_client.UploadFrom(reinterpret_cast<const uint8_t*>(buffer.data()), buffer.size()).Value; } std::string AzureBlobStorageClient::getUrl(const AzureBlobStorageParameters& params) { auto container_client = createClient(params.credentials, params.container_name); - return container_client->GetUrl(); + return container_client.GetUrl(); } bool AzureBlobStorageClient::deleteBlob(const DeleteAzureBlobStorageParameters& params) { @@ -91,13 +89,13 @@ bool AzureBlobStorageClient::deleteBlob(const DeleteAzureBlobStorageParameters& } else if (params.optional_deletion == OptionalDeletion::DELETE_SNAPSHOTS_ONLY) { delete_options.DeleteSnapshots = Azure::Storage::Blobs::Models::DeleteSnapshotsOption::OnlySnapshots; } - auto response = container_client->DeleteBlob(params.blob_name, delete_options); + auto response = container_client.DeleteBlob(params.blob_name, delete_options); return response.Value.Deleted; } std::unique_ptr<io::InputStream> AzureBlobStorageClient::fetchBlob(const FetchAzureBlobStorageParameters& params) { auto container_client = createClient(params.credentials, params.container_name); - auto blob_client = container_client->GetBlobClient(params.blob_name); + auto blob_client = container_client.GetBlobClient(params.blob_name); Azure::Storage::Blobs::DownloadBlobOptions options; if (params.range_start || params.range_length) { Azure::Core::Http::HttpRange range; @@ -119,7 +117,7 @@ std::vector<Azure::Storage::Blobs::Models::BlobItem> AzureBlobStorageClient::lis auto container_client = createClient(params.credentials, params.container_name); Azure::Storage::Blobs::ListBlobsOptions options; options.Prefix = params.prefix; - for (auto page_result = container_client->ListBlobs(options); page_result.HasPage(); page_result.MoveToNextPage()) { + for (auto page_result = container_client.ListBlobs(options); page_result.HasPage(); page_result.MoveToNextPage()) { result.insert(result.end(), page_result.Blobs.begin(), page_result.Blobs.end()); } return result; diff --git a/extensions/azure/storage/AzureBlobStorageClient.h b/extensions/azure/storage/AzureBlobStorageClient.h index 9b782114a..89c42c434 100644 --- a/extensions/azure/storage/AzureBlobStorageClient.h +++ b/extensions/azure/storage/AzureBlobStorageClient.h @@ -43,7 +43,7 @@ class AzureBlobStorageClient : public BlobStorageClient { std::vector<Azure::Storage::Blobs::Models::BlobItem> listContainer(const ListAzureBlobStorageParameters& params) override; private: - static std::unique_ptr<Azure::Storage::Blobs::BlobContainerClient> createClient(const AzureStorageCredentials& credentials, const std::string &container_name); + static Azure::Storage::Blobs::BlobContainerClient createClient(const AzureStorageCredentials& credentials, const std::string &container_name); std::shared_ptr<core::logging::Logger> logger_{core::logging::LoggerFactory<AzureBlobStorageClient>::getLogger()}; }; diff --git a/thirdparty/azure-sdk-cpp/fix-managed-identity.patch b/thirdparty/azure-sdk-cpp/fix-managed-identity.patch new file mode 100644 index 000000000..7e52ead06 --- /dev/null +++ b/thirdparty/azure-sdk-cpp/fix-managed-identity.patch @@ -0,0 +1,15 @@ +Azure SDK C++ commit fixes this in commit b33fb227ce56f2e93625521d34be2f8970869199, should be available in the next release + +diff --git a/sdk/identity/azure-identity/src/managed_identity_source.cpp b/sdk/identity/azure-identity/src/managed_identity_source.cpp +index 93a5969bf..c3d203a58 100644 +--- a/sdk/identity/azure-identity/src/managed_identity_source.cpp ++++ b/sdk/identity/azure-identity/src/managed_identity_source.cpp +@@ -527,7 +527,7 @@ std::unique_ptr<ManagedIdentitySource> ImdsManagedIdentitySource::Create( + + imdsUrl = Core::Url{imdsEndpointEnvVarValue}; + } +- imdsUrl.SetPath("/metadata/identity/oauth2/token"); ++ imdsUrl.SetPath("metadata/identity/oauth2/token"); + + return std::unique_ptr<ManagedIdentitySource>( + new ImdsManagedIdentitySource(clientId, objectId, resourceId, imdsUrl, options)); diff --git a/thirdparty/azure-sdk-cpp/fix-openssl-helper.patch b/thirdparty/azure-sdk-cpp/fix-openssl-helper.patch new file mode 100644 index 000000000..d6c1c2c6c --- /dev/null +++ b/thirdparty/azure-sdk-cpp/fix-openssl-helper.patch @@ -0,0 +1,34 @@ +There seems to be an issue with the c++17 make_openssl_unique implementation in the Azure SDK: https://github.com/Azure/azure-sdk-for-cpp/issues/6697 + +diff --git a/sdk/attestation/azure-security-attestation/src/private/crypto/openssl/openssl_helpers.hpp b/sdk/attestation/azure-security-attestation/src/private/crypto/openssl/openssl_helpers.hpp +index a52791cea..5734bb76c 100644 +--- a/sdk/attestation/azure-security-attestation/src/private/crypto/openssl/openssl_helpers.hpp ++++ b/sdk/attestation/azure-security-attestation/src/private/crypto/openssl/openssl_helpers.hpp +@@ -39,19 +39,6 @@ namespace Azure { namespace Security { namespace Attestation { namespace _detail + using openssl_evp_pkey = openssl_unique_ptr<EVP_PKEY>; + using openssl_bio = openssl_unique_ptr<BIO>; + +-#ifdef __cpp_nontype_template_parameter_auto +- // *** Wrapper function that calls a given OpensslApi, and returns the corresponding +- // openssl_unique_ptr<T>: +- template <auto OpensslApi, typename... Args> auto make_openssl_unique(Args&&... args) +- { +- auto raw = OpensslApi( +- forward<Args>(args)...); // forwarding is probably unnecessary, could use const Args&... +- // check raw +- using T = remove_pointer_t<decltype(raw)>; // no need to request T when we can see +- // what OpensslApi returned +- return openssl_unique_ptr<T>{raw}; +- } +-#else // ^^^ C++17 ^^^ / vvv C++14 vvv + template <typename Api, typename... Args> + auto make_openssl_unique(Api& OpensslApi, Args&&... args) + { +@@ -62,7 +49,6 @@ namespace Azure { namespace Security { namespace Attestation { namespace _detail + // what OpensslApi returned + return openssl_unique_ptr<T>{raw}; + } +-#endif // ^^^ C++14 ^^^ + + extern std::string GetOpenSSLError(std::string const& what); + diff --git a/thirdparty/azure-sdk-cpp/gcc13.patch b/thirdparty/azure-sdk-cpp/gcc13.patch deleted file mode 100644 index 41db6ff51..000000000 --- a/thirdparty/azure-sdk-cpp/gcc13.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff '--color=auto' -rupN azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0/sdk/core/azure-core/inc/azure/core/base64.hpp azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0-patched/sdk/core/azure-core/inc/azure/core/base64.hpp ---- azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0/sdk/core/azure-core/inc/azure/core/base64.hpp 2023-07-11 04:18:12.000000000 +0200 -+++ azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0-patched/sdk/core/azure-core/inc/azure/core/base64.hpp 2023-07-31 10:24:28.267049474 +0200 -@@ -13,6 +13,7 @@ - #include <stdexcept> - #include <string> - #include <vector> -+#include <cstdint> - - namespace Azure { namespace Core { - -diff '--color=auto' -rupN azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0/sdk/core/azure-core/inc/azure/core/uuid.hpp azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0-patched/sdk/core/azure-core/inc/azure/core/uuid.hpp ---- azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0/sdk/core/azure-core/inc/azure/core/uuid.hpp 2023-07-11 04:18:12.000000000 +0200 -+++ azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0-patched/sdk/core/azure-core/inc/azure/core/uuid.hpp 2023-07-31 10:29:58.670195225 +0200 -@@ -13,6 +13,7 @@ - #include <array> - #include <cstring> - #include <string> -+#include <cstdint> - - namespace Azure { namespace Core { - /** -diff '--color=auto' -rupN azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0/sdk/keyvault/azure-security-keyvault-keys/src/private/key_sign_parameters.hpp azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0-patched/sdk/keyvault/azure-security-keyvault-keys/src/private/key_sign_parameters.hpp ---- azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0/sdk/keyvault/azure-security-keyvault-keys/src/private/key_sign_parameters.hpp 2023-07-11 04:18:12.000000000 +0200 -+++ azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0-patched/sdk/keyvault/azure-security-keyvault-keys/src/private/key_sign_parameters.hpp 2023-07-31 10:42:25.125314240 +0200 -@@ -11,6 +11,7 @@ - - #include <string> - #include <vector> -+#include <cstdint> - - namespace Azure { - namespace Security { -diff '--color=auto' -rupN azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0/sdk/keyvault/azure-security-keyvault-keys/src/private/key_verify_parameters.hpp azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0-patched/sdk/keyvault/azure-security-keyvault-keys/src/private/key_verify_parameters.hpp ---- azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0/sdk/keyvault/azure-security-keyvault-keys/src/private/key_verify_parameters.hpp 2023-07-11 04:18:12.000000000 +0200 -+++ azure-sdk-for-cpp-azure-storage-files-datalake_12.7.0-patched/sdk/keyvault/azure-security-keyvault-keys/src/private/key_verify_parameters.hpp 2023-07-31 11:02:08.775192072 +0200 -@@ -11,6 +11,7 @@ - - #include <string> - #include <vector> -+#include <cstdint> - - namespace Azure { - namespace Security { diff --git a/thirdparty/azure-sdk-cpp/remove-amqp.patch b/thirdparty/azure-sdk-cpp/remove-amqp.patch deleted file mode 100644 index daacddd01..000000000 --- a/thirdparty/azure-sdk-cpp/remove-amqp.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -rupN a/sdk/core/CMakeLists.txt b/sdk/core/CMakeLists.txt ---- a/sdk/core/CMakeLists.txt 2023-07-11 04:18:12.000000000 +0200 -+++ b/sdk/core/CMakeLists.txt 2023-07-25 16:58:17.919348377 +0200 -@@ -10,11 +10,6 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - - add_subdirectory(azure-core) - --if (NOT BUILD_WINDOWS_UWP) -- message(STATUS "Including AMQP library") -- add_subdirectory(azure-core-amqp) --endif() -- - if (NOT DISABLE_AZURE_CORE_OPENTELEMETRY) - add_subdirectory(azure-core-tracing-opentelemetry) - endif() diff --git a/thirdparty/azure-sdk-cpp/wil.patch b/thirdparty/azure-sdk-cpp/wil.patch new file mode 100644 index 000000000..f3e352c7a --- /dev/null +++ b/thirdparty/azure-sdk-cpp/wil.patch @@ -0,0 +1,12 @@ +diff --git a/sdk/identity/azure-identity/CMakeLists.txt b/sdk/identity/azure-identity/CMakeLists.txt +index 57fe6bbc2..62ad84492 100644 +--- a/sdk/identity/azure-identity/CMakeLists.txt ++++ b/sdk/identity/azure-identity/CMakeLists.txt +@@ -109,7 +109,6 @@ target_link_libraries(azure-identity PUBLIC Azure::azure-core) + target_compile_definitions(azure-identity PRIVATE _azure_BUILDING_SDK) + + if(WIN32 AND NOT(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_SYSTEM_VERSION STREQUAL "10.0")) +- find_package(wil CONFIG REQUIRED) + target_link_libraries(azure-identity PRIVATE WIL::WIL bcrypt crypt32) + else() + find_package(OpenSSL REQUIRED)
