-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump the vcpkg builtin-baseline
.
#5010
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
44c0773
Bump the vcpkg `builtin-baseline`.
teo-tsirpanis 47efa97
Remove unneeded port overlays.
teo-tsirpanis 0f6029d
Regenerate capnproto files.
teo-tsirpanis 9b70246
Remove direct dependency to libxml2 in Azure.
teo-tsirpanis b8f79ba
Fix compile errors.
teo-tsirpanis 0fff092
Copy upstream `aws-sdk-cpp` port.
teo-tsirpanis 5883c9d
Patch `aws-sdk-cpp` to fix failures to find curl.
teo-tsirpanis d1ddee5
Bump the baseline again to get newer AWS and Google Cloud SDK verisons.
teo-tsirpanis 4f7f96c
Copy upstream `aws-c-io` port.
teo-tsirpanis b0502be
Copy upstream `aws-sdk-cpp` port.
teo-tsirpanis 2a87808
Patch ports to fix MinGW failures.
teo-tsirpanis 5146655
Bump the baseline again to get an updated Google Cloud SDK port.
teo-tsirpanis f496913
Merge branch 'dev' into teo/bump-vcpkg-baseline
teo-tsirpanis abe95aa
Avoid building some unused AWS SDKs.
teo-tsirpanis 4703674
Add link to `aws-c-io` PR.
teo-tsirpanis 54e7c99
Merge branch 'dev' into teo/bump-vcpkg-baseline
teo-tsirpanis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,13 +26,13 @@ $ git commit | |
|
||
After copying the port, add an entry to the table below. You should also contribute your changes to vcpkg and/or the upstream package repository. | ||
|
||
For ease of review when patching existing ports, you are recommended to make one commit that copies the upstream port unchanged, and another commit that makes the changes you need. | ||
|
||
## List of port overlays | ||
|
||
| Port | Reason | | ||
|----------------------------|---------------------------------------------------------------------------------------------------------| | ||
| `libmagic` | Updating to the upstream port deferred due to failures. | | ||
| `pcre2` | To be removed alongside libmagic. | | ||
| `azure-storage-common-cpp` | Patching to disable default features on libxml2 (https://github.com/Azure/azure-sdk-for-cpp/pull/5221). | | ||
| `libfaketime` | Port does not yet exist upstream | | ||
| `vcpkg-cmake-config` | Patching to fix build issues with CMake 3.29.1. (https://github.com/microsoft/vcpkg/pull/38017) | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Subsequent versions of CMake 3.29.x have fixed the breaking change and this custom port is no longer needed. |
||
| `google-cloud-cpp` | Patching to remove dependency on GMock. (https://github.com/microsoft/vcpkg/pull/39802) | | ||
| Port | Reason | | ||
|---------------|----------------------------------------------------------------------------------------------------------------------------| | ||
| `aws-c-io` | Patching to fix MinGW build failures. (https://github.com/awslabs/aws-c-io/pull/664) | | ||
| `aws-sdk-cpp` | Patching to fix MinGW build failures, and to avoid building test-only SDKs (https://github.com/aws/aws-sdk-cpp/pull/3061). | | ||
| `libmagic` | Updating to the upstream port deferred due to failures. | | ||
| `libfaketime` | Port does not yet exist upstream | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/source/windows/secure_channel_tls_handler.c b/source/windows/secure_channel_tls_handler.c | ||
index b62b1a0..48f4556 100644 | ||
--- a/source/windows/secure_channel_tls_handler.c | ||
+++ b/source/windows/secure_channel_tls_handler.c | ||
@@ -53,7 +53,7 @@ struct secure_channel_ctx { | ||
struct aws_tls_ctx ctx; | ||
struct aws_string *alpn_list; | ||
SCHANNEL_CRED credentials; | ||
- PCERT_CONTEXT pcerts; | ||
+ PCCERT_CONTEXT pcerts; | ||
HCERTSTORE cert_store; | ||
HCERTSTORE custom_trust_store; | ||
HCRYPTPROV crypto_provider; | ||
@@ -188,7 +188,7 @@ static int s_manually_verify_peer_cert(struct aws_channel_handler *handler) { | ||
int result = AWS_OP_ERR; | ||
CERT_CONTEXT *peer_certificate = NULL; | ||
HCERTCHAINENGINE engine = NULL; | ||
- CERT_CHAIN_CONTEXT *cert_chain_ctx = NULL; | ||
+ PCCERT_CHAIN_CONTEXT cert_chain_ctx = NULL; | ||
|
||
/* get the peer's certificate so we can validate it.*/ | ||
SECURITY_STATUS status = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO awslabs/aws-c-io | ||
REF "v${VERSION}" | ||
SHA512 b5dc81635ce775c3783df2d4f6ccf0890b1e1669bddb1c10f6d200203684e84504ca87099cb88874010df28f98f658da5a4eacb9e4df0408d40d845f3d394f48 | ||
HEAD_REF master | ||
PATCHES | ||
"fix-pointer-mismatch.patch" | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
"-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files | ||
-DBUILD_TESTING=FALSE | ||
) | ||
|
||
vcpkg_cmake_install() | ||
|
||
string(REPLACE "dynamic" "shared" subdir "${VCPKG_LIBRARY_LINKAGE}") | ||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/${PORT}/cmake/${subdir}" DO_NOT_DELETE_PARENT_CONFIG_PATH) | ||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/${PORT}/cmake") | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake" [[/${type}/]] "/") | ||
|
||
file(REMOVE_RECURSE | ||
"${CURRENT_PACKAGES_DIR}/debug/include" | ||
"${CURRENT_PACKAGES_DIR}/debug/lib/${PORT}" | ||
"${CURRENT_PACKAGES_DIR}/debug/share" | ||
"${CURRENT_PACKAGES_DIR}/lib/${PORT}" | ||
) | ||
|
||
vcpkg_copy_pdbs() | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "aws-c-io", | ||
"version": "0.14.9", | ||
"description": "Handles all IO and TLS work for application protocols.", | ||
"homepage": "https://github.com/awslabs/aws-c-io", | ||
"license": "Apache-2.0", | ||
"supports": "!(windows & arm) & !uwp", | ||
"dependencies": [ | ||
"aws-c-cal", | ||
"aws-c-common", | ||
{ | ||
"name": "s2n", | ||
"platform": "!uwp & !windows" | ||
}, | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/toolchains/core-config.cmake b/toolchains/core-config.cmake | ||
index d90bfaf747..ab14402577 100644 | ||
--- a/toolchains/core-config.cmake | ||
+++ b/toolchains/core-config.cmake | ||
@@ -15,5 +15,9 @@ if (AWSSDK_CRYPTO_IN_SOURCE_BUILD) | ||
find_dependency(crypto) | ||
find_dependency(ssl) | ||
endif() | ||
+find_dependency(ZLIB) | ||
+if("@ENABLE_CURL_CLIENT@") | ||
+ find_dependency(CURL) | ||
+endif() | ||
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_PREV}) | ||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/cmake/AWSSDKConfig.cmake b/cmake/AWSSDKConfig.cmake | ||
--- a/cmake/AWSSDKConfig.cmake (revision 2f90f9fd6c56460bd382243aa215fcddcb5883c8) | ||
+++ b/cmake/AWSSDKConfig.cmake (date 1636913220527) | ||
@@ -54,18 +54,14 @@ | ||
string(REPLACE ";" "${AWS_MODULE_DIR};" SYSTEM_MODULE_PATH "${CMAKE_SYSTEM_PREFIX_PATH}${AWS_MODULE_DIR}") | ||
list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH} ${SYSTEM_MODULE_PATH}) | ||
|
||
-# On Windows, dlls are treated as runtime target and installed in bindir | ||
if (WIN32 AND AWSSDK_INSTALL_AS_SHARED_LIBS) | ||
- set(AWSSDK_INSTALL_LIBDIR "${AWSSDK_INSTALL_BINDIR}") | ||
# If installed CMake scripts are associated with dll library, define USE_IMPORT_EXPORT for customers | ||
add_definitions(-DUSE_IMPORT_EXPORT) | ||
endif() | ||
|
||
|
||
# Compute the default installation root relative to this file. | ||
-# from prefix/lib/cmake/AWSSDK/xx.cmake to prefix | ||
get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
-get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH) | ||
get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH) | ||
get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH) | ||
get_filename_component(AWS_NATIVE_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp b/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp | ||
index b8ab519..7cd91e9 100644 | ||
--- a/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp | ||
+++ b/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp | ||
@@ -19,6 +19,9 @@ | ||
|
||
#include <Windows.h> | ||
#include <winhttp.h> | ||
+#ifdef __MINGW32__ | ||
+#include <WinSock2.h> | ||
teo-tsirpanis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+#endif | ||
#include <mstcpip.h> // for tcp_keepalive | ||
#include <sstream> | ||
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/cmake/external_dependencies.cmake b/cmake/external_dependencies.cmake | ||
index acf16c0..3a49fb4 100644 | ||
--- a/cmake/external_dependencies.cmake | ||
+++ b/cmake/external_dependencies.cmake | ||
@@ -80,23 +80,12 @@ if(NOT NO_HTTP_CLIENT AND NOT USE_CRT_HTTP_CLIENT) | ||
set(BUILD_CURL 1) | ||
message(STATUS " Building Curl as part of AWS SDK") | ||
else() | ||
- include(FindCURL) | ||
+ find_package(CURL REQUIRED) | ||
if(NOT CURL_FOUND) | ||
message(FATAL_ERROR "Could not find curl") | ||
+ else() | ||
+ set(CURL_LIBRARIES CURL::libcurl) | ||
endif() | ||
- | ||
- # When built from source using cmake, curl does not include | ||
- # CURL_INCLUDE_DIRS or CURL_INCLUDE_DIRS so we need to use | ||
- # find_package to fix it | ||
- if ("${CURL_INCLUDE_DIRS}" STREQUAL "" AND "${CURL_LIBRARIES}" STREQUAL "") | ||
- message(STATUS "Could not find curl include or library path, falling back to find with config.") | ||
- find_package(CURL) | ||
- set(CURL_LIBRARIES CURL::libcurl) | ||
- else () | ||
- message(STATUS " Curl include directory: ${CURL_INCLUDE_DIRS}") | ||
- List(APPEND EXTERNAL_DEPS_INCLUDE_DIRS ${CURL_INCLUDE_DIRS}) | ||
- set(CLIENT_LIBS ${CURL_LIBRARIES}) | ||
- endif () | ||
set(CLIENT_LIBS_ABSTRACT_NAME curl) | ||
message(STATUS " Curl target link: ${CURL_LIBRARIES}") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Mandatory=$true)][string]$SourcesRef, | ||
[Parameter(Mandatory=$false)][string]$PortDirectory = $PSScriptRoot, | ||
[Parameter(Mandatory=$false)][string]$vcpkg = "$PSScriptRoot/../../vcpkg" | ||
) | ||
|
||
$ErrorActionPreference = "Stop" | ||
|
||
$ManifestIn = "$PortDirectory/vcpkg.in.json" | ||
$ManifestOut = "$PortDirectory/vcpkg.json" | ||
|
||
$ExtractedSources = "${env:TEMP}/aws-sdk-cpp-generateFeatures-$SourcesRef" | ||
if (-not (Test-Path $ExtractedSources)) { | ||
if (Test-Path "$ExtractedSources.tmp") { | ||
Remove-Item -Force "$ExtractedSources.tmp" | ||
} | ||
git clone --depth=1 "https://github.com/aws/aws-sdk-cpp" "$ExtractedSources.tmp" | Out-Host | ||
git -c "$ExtractedSources.tmp" checkout $SourcesRef | ||
Move-Item "$ExtractedSources.tmp" "$ExtractedSources" | ||
} | ||
Write-Host "Using sources directory: $ExtractedSources" | ||
|
||
|
||
$subfolders = Get-ChildItem -Path "$ExtractedSources\generated\src\aws-cpp-sdk-*", "$ExtractedSources\src\aws-cpp-sdk*" | Sort-Object -Property Name | ||
|
||
$manifest = Get-Content $ManifestIn | ConvertFrom-Json | ||
$manifest | Add-Member ` | ||
-NotePropertyName '$note' ` | ||
-NotePropertyValue 'Automatically generated by generateFeatures.ps1' | ||
$manifest | Add-Member -NotePropertyName 'features' -NotePropertyValue @{} | ||
|
||
function GetDescription($dir, $modulename) | ||
{ | ||
if (Test-Path "$dir\CMakeLists.txt") | ||
{ | ||
$descs = @(Select-String -Path "$dir\CMakeLists.txt" -Pattern "`"C\+\+ SDK for the AWS [^`"]*`"") | ||
if ($descs.count -eq 1) { | ||
$desc = $descs[0].Matches.Value -replace "`"","" | ||
"$desc" | ||
} | ||
else { "C++ SDK for the AWS $modulename service" } | ||
} | ||
else { "C++ SDK for the AWS $modulename service" } | ||
} | ||
|
||
$featureDependencies = @{} | ||
Select-String -Path "$ExtractedSources\cmake\sdksCommon.cmake" -Pattern "list\(APPEND SDK_DEPENDENCY_LIST `"([\w-]+):([\w-,]+)`"\)" -AllMatches ` | ||
| ForEach-Object { $_.Matches } ` | ||
| ForEach-Object { $featureDependencies[$_.Groups[1].Value] = @($_.Groups[2].Value -split "," ` | ||
| Where-Object { $_ -ne "core" }) } | ||
|
||
foreach ($subfolder in $subfolders) | ||
{ | ||
$modulename = $subfolder.name -replace "^aws-cpp-sdk-","" | ||
if ($modulename -match "-tests`$") { continue } | ||
if ($modulename -match "-sample`$") { continue } | ||
if ($modulename -eq "core") { continue } | ||
|
||
$lowermodulename = $modulename.ToLower() | ||
|
||
$featureObj = @{ description = (GetDescription $subfolder $modulename) } | ||
|
||
if ($featureDependencies.ContainsKey($lowermodulename)) { | ||
$featureObj.dependencies = ,@{ name = "aws-sdk-cpp"; "default-features" = $false; "features" = $featureDependencies[$lowermodulename] } | ||
} | ||
|
||
$manifest.features.Add("$lowermodulename", $featureObj) | ||
} | ||
|
||
[IO.File]::WriteAllText($ManifestOut, (ConvertTo-Json -Depth 10 -InputObject $manifest)) | ||
|
||
& $vcpkg format-manifest --feature-flags=-manifests $ManifestOut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/src/aws-cpp-sdk-core/CMakeLists.txt b/src/aws-cpp-sdk-core/CMakeLists.txt | ||
index c44546b0e..b66888362 100644 | ||
--- a/src/aws-cpp-sdk-core/CMakeLists.txt | ||
+++ b/src/aws-cpp-sdk-core/CMakeLists.txt | ||
@@ -113,13 +113,8 @@ if(ENABLE_CURL_CLIENT) | ||
int main() { | ||
CURL* handle = curl_easy_init(); | ||
return curl_easy_setopt(handle, CURLOPT_PROXY_SSLCERT, \"client.pem\"); }") | ||
- if (CMAKE_CROSSCOMPILING) | ||
- check_c_source_compiles("${CHECK_CURL_HAS_H2}" CURL_HAS_H2) | ||
- check_c_source_compiles("${CHECK_CURL_HAS_TLS_PROXY}" CURL_HAS_TLS_PROXY) | ||
- else() | ||
- check_c_source_runs("${CHECK_CURL_HAS_H2}" CURL_HAS_H2) | ||
- check_c_source_runs("${CHECK_CURL_HAS_TLS_PROXY}" CURL_HAS_TLS_PROXY) | ||
- endif() | ||
+ set(CURL_HAS_H2 OFF) | ||
+ set(CURL_HAS_TLS_PROXY ON) | ||
elseif(ENABLE_WINDOWS_CLIENT) | ||
# NOTE: HTTP/2 is not supported when using IXML_HTTP_REQUEST_2 | ||
if(USE_IXML_HTTP_REQUEST_2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake | ||
index 75283cdd1b6..71d383e3323 100644 | ||
--- a/cmake/sdks.cmake | ||
+++ b/cmake/sdks.cmake | ||
@@ -34,12 +34,14 @@ if(BUILD_ONLY) | ||
endforeach() | ||
endif() | ||
|
||
- get_dependencies_for_test(${TARGET} DEPENDENCY_LIST) | ||
- if(DEPENDENCY_LIST) | ||
- STRING(REPLACE "," ";" LIST_RESULT ${DEPENDENCY_LIST}) | ||
- foreach(DEPENDENCY IN LISTS LIST_RESULT) | ||
- list(APPEND SDK_DEPENDENCY_BUILD_LIST ${DEPENDENCY}) | ||
- endforeach() | ||
+ if(ENABLE_TESTING) | ||
+ get_dependencies_for_test(${TARGET} DEPENDENCY_LIST) | ||
+ if(DEPENDENCY_LIST) | ||
+ STRING(REPLACE "," ";" LIST_RESULT ${DEPENDENCY_LIST}) | ||
+ foreach(DEPENDENCY IN LISTS LIST_RESULT) | ||
+ list(APPEND SDK_DEPENDENCY_BUILD_LIST ${DEPENDENCY}) | ||
+ endforeach() | ||
+ endif() | ||
endif() | ||
endforeach() | ||
LIST(REMOVE_DUPLICATES SDK_BUILD_LIST) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The custom port for PCRE2 was applying some patches to its CMake build system, to make it usable from libmagic. These patches are now upstreamed.