Skip to content
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3101a68
Revert revert libcurl https://github.com/microsoft/vcpkg-tool/pull/1856
BillyONeal Nov 18, 2025
74fc3cc
Revert build lab changes to that used for official vcpkg releases wit…
BillyONeal Jan 23, 2026
114898f
Delete try_parse_curl_progress_data and try_parse_curl_max5_size.
BillyONeal Jan 23, 2026
eb13c3e
Delete parse_split_url_view and format_url_query.
BillyONeal Jan 23, 2026
78a1462
Also try libcurl-gnutls.so.4 and libcurl-nss.so.4
BillyONeal Jan 23, 2026
079b9f4
Use system libcurl on macOS
BillyONeal Jan 23, 2026
424b231
Add CMAKE_EXPORT_COMPILE_COMMANDS
BillyONeal Jan 24, 2026
2260bbd
Try to get curl into the official signed builds' netiso
BillyONeal Jan 24, 2026
4777da1
Workaround older versions of curl.
BillyONeal Jan 27, 2026
d4b4839
Implement VCPKG_LIBCURL_DLSYM
BillyONeal Jan 27, 2026
2a4cdbe
Try selfhosting vcpkg to get curl on Windows.
BillyONeal Jan 27, 2026
01a8033
Also fix scripts-SHA updating.
BillyONeal Jan 28, 2026
20b08e1
Add toolchain for Windows.
BillyONeal Jan 28, 2026
c7083f5
Supply VCPKG_LIBCURL_URL on glibc and use system libcurl on alpine.
BillyONeal Jan 28, 2026
af7b6c0
Fix VCPKG_LIBCURL to actually use options.
BillyONeal Jan 28, 2026
ce29b94
More curl options.
BillyONeal Jan 28, 2026
c661d55
Fix default typo.
BillyONeal Jan 28, 2026
7c2c35a
Merge remote-tracking branch 'origin/main' into restore-libcurl
BillyONeal Jan 28, 2026
ecbe8db
Go back to dlsym on Alpine, try updated headers to fix arm64-linux
BillyONeal Jan 28, 2026
c2bd2db
Disable auto-baseline.
BillyONeal Jan 28, 2026
85bde1d
Suppress CodeQL and format.
BillyONeal Jan 28, 2026
7031829
Revert "Disable auto-baseline."
BillyONeal Jan 29, 2026
373d292
Delete 'Install system libcurl' now that we no longer need it on *nix
BillyONeal Jan 29, 2026
488a3fc
Revert no longer relevant build setup changes.
BillyONeal Jan 29, 2026
908dfee
Add an error message for when we can't find libcurl.so.4
BillyONeal Jan 29, 2026
0cc0003
Fix some Linux build errors.
BillyONeal Jan 29, 2026
9f353d5
Move vcpkg's vcpkg manifest to a subdirectory to avoid having every e…
BillyONeal Jan 29, 2026
ca27d93
Actually fix Linux build errors 😅
BillyONeal Jan 29, 2026
dbb019c
Turn on curl[non-http] because we have told customers to use file://
BillyONeal Jan 29, 2026
594e0f1
Call vcpkg_curl_global_init(CURL_GLOBAL_DEFAULT); in vcpkg-test.
BillyONeal Jan 29, 2026
c786633
Apply suggestions from code review
BillyONeal Jan 29, 2026
6da8d8b
Implement move assignment operators correctly.
BillyONeal Jan 29, 2026
f9718a4
Fix HEAD requests.
BillyONeal Jan 29, 2026
75bf930
Format
BillyONeal Jan 29, 2026
9d3d9a6
Resolve copilot PR suggestions.
BillyONeal Jan 29, 2026
647594d
Implement NetworkErrorProxyMightHelp in the two switches speaking Dow…
BillyONeal Jan 29, 2026
d9d10e5
Use "warning" for retries.
BillyONeal Jan 29, 2026
d07cf6b
Improve ReadFilePointer::size.
BillyONeal Jan 29, 2026
ea81188
Fix copilot's status suggestion to actually build.
BillyONeal Jan 29, 2026
a87b9fd
Reorder retries to avoid sleep(0)
BillyONeal Jan 29, 2026
eb21f0d
Treat all FTP 4xx errors as retry-able
BillyONeal Feb 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ if(DEFINE_DISABLE_METRICS OR VCPKG_DISABLE_METRICS)
"file vcpkg.disable_metrics next to the binary.")
endif()

set(VCPKG_MANIFEST_DIR "${CMAKE_CURRENT_LIST_DIR}/src" CACHE PATH "Path to vcpkg manifest directory")

project(vcpkg
DESCRIPTION "vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS."
HOMEPAGE_URL "https://github.com/microsoft/vcpkg"
Expand Down Expand Up @@ -195,6 +197,7 @@ set(TEST_SCRIPT_ASSET_CACHE_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/test-script

find_package(fmt REQUIRED)
find_package(CMakeRC REQUIRED)
find_package(LibCURL REQUIRED)

# === Target: locale-resources ===

Expand Down Expand Up @@ -229,6 +232,8 @@ target_compile_definitions(vcpkglib PUBLIC
_FILE_OFFSET_BITS=64
)

target_link_libraries(vcpkglib PUBLIC CURL::libcurl)

if(VCPKG_STANDALONE_BUNDLE_SHA)
target_compile_definitions(vcpkglib PUBLIC
"VCPKG_STANDALONE_BUNDLE_SHA=${VCPKG_STANDALONE_BUNDLE_SHA}"
Expand Down
12 changes: 9 additions & 3 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"hidden": true,
"cacheVariables": {
"VCPKG_OFFICIAL_BUILD": true,
"VCPKG_BASE_VERSION": "2023-09-15",
"VCPKG_STANDALONE_BUNDLE_SHA": "8b28c1829802a133941805c68004427052588ba6eefbdf9fb6061151a92c131491df7e29470309e804450c075d2f0673515d5d8c19997148ebcb2874493d304d"
"VCPKG_BASE_VERSION": "2025-12-16",
"VCPKG_STANDALONE_BUNDLE_SHA": "23c77d1dd70bf861328a8e35203aed2db0deb9a83aa924cadaf96ffaae42e8629363184b99168e33158b819d695c748bd7cb9eb39528bd374f8b7e2ab6d4f6de",
"VCPKG_ARTIFACTS_SHA": "def65b1f4a710c0b521603a275ff6bae31ad8c5b938cd4445fb69c4d0da97c21d753c274c9b9b1cc2f8a86ba694759d4f3f4f325f88be02a5d8ad10c8f56e5df"
}
},
{
Expand Down Expand Up @@ -39,6 +40,7 @@
{
"name": "windows",
"hidden": true,
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"cacheVariables": {
"VCPKG_BUILD_TLS12_DOWNLOADER": true
},
Expand All @@ -64,6 +66,9 @@
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-windows-static"
}
},
{
Expand Down Expand Up @@ -165,7 +170,8 @@
"name": "linux-arm64-ci",
"inherits": [ "linux-ci" ],
"cacheVariables": {
"CMAKE_SYSTEM_PROCESSOR": "aarch64"
"CMAKE_SYSTEM_PROCESSOR": "aarch64",
"VCPKG_LIBCURL_DLSYM_UPDATED_HEADERS": true
}
},
{
Expand Down
29 changes: 29 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,35 @@ SOFTWARE.
=========================================
END OF CMakeRC NOTICES, INFORMATION, AND LICENSE

curl

%% curl NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
COPYRIGHT AND PERMISSION NOTICE

Copyright (C) Daniel Stenberg, <daniel@haxx.se>, and many
contributors, see the THANKS file.

All rights reserved.

Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.
=========================================
END OF curl NOTICES, INFORMATION, AND LICENSE

The following third party software is incorporated into vcpkg-artifacts:

---------------------------------------------------------
Expand Down
60 changes: 23 additions & 37 deletions azure-pipelines/end-to-end-tests-dir/asset-caching.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Throw-IfNotFailed
$expected = @(
"A suitable version of cmake was not found \(required v[0-9.]+\)\.",
"Trying to download cmake-[0-9.]+-[^.]+\.(zip|tar\.gz) using asset cache file://$assetCacheRegex/[0-9a-z]+",
"error: curl: \(37\) Couldn't open file [^\n]+",
"error: curl operation failed with error code 37 \((Couldn't|Could not) read a file:\/\/ file\)\.",
"error: Not a transient network error, won't retry download from file://$assetCacheRegex/[0-9a-z]+"
"error: there were no asset cache hits, and x-block-origin blocks trying the authoritative source https://github\.com/Kitware/CMake/releases/download/[^ ]+",
"note: If you are using a proxy, please ensure your proxy settings are correct\.",
"Possible causes are:",
Expand Down Expand Up @@ -100,7 +101,8 @@ if (-not ($actual -match $expected)) {
Refresh-TestRoot
$expected = @(
"^Downloading https://localhost:1234/foobar\.html -> example3\.html",
"error: curl: \(7\) Failed to connect to localhost port 1234( after \d+ ms)?: ((Could not|Couldn't) connect to server|Connection refused)",
"error: curl operation failed with error code 7 \((Couldn't|Could not) connect to server\)\.",
"error: Not a transient network error, won't retry download from https://localhost:1234/foobar\.html",
"note: If you are using a proxy, please ensure your proxy settings are correct\.",
"Possible causes are:",
"1\. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable to ``https://address:port``\.",
Expand All @@ -123,9 +125,11 @@ if (-not ($actual -match $expected)) {
Refresh-TestRoot
$expected = @(
"^Downloading example3\.html, trying https://localhost:1234/foobar\.html",
"error: curl operation failed with error code 7 \((Couldn't|Could not) connect to server\)\.",
"error: Not a transient network error, won't retry download from https://localhost:1234/foobar\.html",
"Trying https://localhost:1235/baz\.html",
"error: curl: \(7\) Failed to connect to localhost port 1234( after \d+ ms)?: ((Could not|Couldn't) connect to server|Connection refused)",
"error: curl: \(7\) Failed to connect to localhost port 1235( after \d+ ms)?: ((Could not|Couldn't) connect to server|Connection refused)",
"error: curl operation failed with error code 7 \((Couldn't|Could not) connect to server\)\.",
"error: Not a transient network error, won't retry download from https://localhost:1235/baz\.html",
"note: If you are using a proxy, please ensure your proxy settings are correct\.",
"Possible causes are:",
"1\. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable to ``https://address:port``\.",
Expand Down Expand Up @@ -177,42 +181,20 @@ if (-not ($actual -match $expected)) {
}

# ... also with multiple authoritative URLs
if ($IsWindows) {
# WinHTTP
Refresh-TestRoot
$expected = @(
"^Downloading example3\.html, trying https://nonexistent\.example\.com",
"warning: Download https://nonexistent\.example\.com failed -- retrying after 1000ms",
"warning: Download https://nonexistent\.example\.com failed -- retrying after 2000ms",
"warning: Download https://nonexistent\.example\.com failed -- retrying after 4000ms",
"Trying https://raw\.githubusercontent\.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE\.txt",
"Successfully downloaded example3\.html",
"$"
) -join "`n"

$actual = Run-VcpkgAndCaptureOutput @commonArgs x-download "$TestDownloadsRoot/example3.html" --sha512 65077997890f66f6041bb3284bb7b88e27631411ccbc253201ca4e00c4bcc58c0d77edffda4975498797cc10772c7fd68fbeb13cc4ac493a3471a9d49e5b6f24 --url https://nonexistent.example.com --url https://raw.githubusercontent.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE.txt
Throw-IfFailed
if (-not ($actual -match $expected)) {
throw "Failure: azurl (no), x-block-origin (no), asset-cache (n/a), download (succeed)"
}
}

# Force curl with --header
Refresh-TestRoot
$expected = @(
"^Downloading example3\.html, trying https://nonexistent\.example\.com",
"warning: (Problem : timeout\.|Transient problem: timeout) Will retry in 1 seconds?\. 3 retries left\.",
"warning: (Problem : timeout\.|Transient problem: timeout) Will retry in \d+ seconds?\. 2 retries left\.",
"warning: (Problem : timeout\.|Transient problem: timeout) Will retry in \d+ seconds?\. 1 (retries|retry) left\.",
"Trying https://raw\.githubusercontent\.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE\.txt",
"error: curl operation failed with error code 6 \((Couldn't|Could not) resolve (hostname|host name)\)\.",
"error: Not a transient network error, won't retry download from https://nonexistent\.example\.com",
"Trying https://raw\.githubusercontent\.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE\.txt"
"Successfully downloaded example3\.html",
"$"
) -join "`n"

$actual = Run-VcpkgAndCaptureOutput @commonArgs x-download "$TestDownloadsRoot/example3.html" --sha512 65077997890f66f6041bb3284bb7b88e27631411ccbc253201ca4e00c4bcc58c0d77edffda4975498797cc10772c7fd68fbeb13cc4ac493a3471a9d49e5b6f24 --url https://nonexistent.example.com --url https://raw.githubusercontent.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE.txt --header "Cache-Control: no-cache"
Throw-IfFailed
if (-not ($actual -match $expected)) {
throw "Failure: azurl (no), x-block-origin (no), asset-cache (n/a), download (succeed)"
throw "Failure: azurl (no), x-block-origin (no), asset-cache (n/a), download (succeed), headers (cache-control)"
}

# azurl (no), x-block-origin (yes), asset-cache (n/a), download (n/a)
Expand All @@ -236,8 +218,10 @@ Refresh-TestRoot
$expected = @(
"^Trying to download example3\.html using asset cache file://$assetCacheRegex/[0-9a-z]+",
"Asset cache miss; trying authoritative source https://localhost:1234/foobar\.html",
"error: curl: \(37\) Couldn't open file [^\n]+",
"error: curl: \(7\) Failed to connect to localhost port 1234( after \d+ ms)?: ((Could not|Couldn't) connect to server|Connection refused)",
"error: curl operation failed with error code 37 \((Couldn't|Could not) read a file:// file\)\.",
"error: Not a transient network error, won't retry download from file://$assetCacheRegex/[0-9a-z]+",
"error: curl operation failed with error code 7 \((Couldn't|Could not) connect to server\)\.",
"error: Not a transient network error, won't retry download from https://localhost:1234/foobar\.html",
"note: If you are using a proxy, please ensure your proxy settings are correct\.",
"Possible causes are:",
"1\. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable to ``https://address:port``\.",
Expand Down Expand Up @@ -296,7 +280,11 @@ if (-not ($actual -match $expected)) {
$expected = @(
"^Trying to download example3\.html using asset cache file://$assetCacheRegex/[0-9a-z]+",
"Asset cache miss; trying authoritative source https://raw\.githubusercontent\.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE\.txt",
"error: curl: \(37\) Couldn't open file [^\n]+",
"error: curl operation failed with error code 37 \((Couldn't|Could not) read a file:// file\)\.",
"error: Not a transient network error, won't retry download from file://$assetCacheRegex/[0-9a-z]+",
"[^\n]+example3\.html\.\d+\.part: error: download from https://raw\.githubusercontent\.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE\.txt had an unexpected hash",
"note: Expected: d06b93c883f8126a04589937a884032df031b05518eed9d433efb6447834df2596aebd500d69b8283e5702d988ed49655ae654c1683c7a4ae58bfa6b92f2b73b",
"note: Actual : 65077997890f66f6041bb3284bb7b88e27631411ccbc253201ca4e00c4bcc58c0d77edffda4975498797cc10772c7fd68fbeb13cc4ac493a3471a9d49e5b6f24",
"note: If you are using a proxy, please ensure your proxy settings are correct\.",
"Possible causes are:",
"1\. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable to ``https://address:port``\.",
Expand All @@ -306,9 +294,6 @@ $expected = @(
"The value set by your proxy might be wrong, or have same ``https://`` prefix issue\.",
"3\. Your proxy's remote server is out of service\.",
"If you believe this is not a temporary download server failure and vcpkg needs to be changed to download this file from a different location, please submit an issue to https://github\.com/Microsoft/vcpkg/issues",
"[^\n]+example3\.html\.\d+\.part: error: download from https://raw\.githubusercontent\.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE\.txt had an unexpected hash",
"note: Expected: d06b93c883f8126a04589937a884032df031b05518eed9d433efb6447834df2596aebd500d69b8283e5702d988ed49655ae654c1683c7a4ae58bfa6b92f2b73b",
"note: Actual : 65077997890f66f6041bb3284bb7b88e27631411ccbc253201ca4e00c4bcc58c0d77edffda4975498797cc10772c7fd68fbeb13cc4ac493a3471a9d49e5b6f24",
"$"
) -join "`n"
$actual = Run-VcpkgAndCaptureOutput @commonArgs x-download "$TestDownloadsRoot/example3.html" --sha512 d06b93c883f8126a04589937a884032df031b05518eed9d433efb6447834df2596aebd500d69b8283e5702d988ed49655ae654c1683c7a4ae58bfa6b92f2b73b --url https://raw.githubusercontent.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE.txt "--x-asset-sources=x-azurl,file://$AssetCache,,readwrite"
Expand Down Expand Up @@ -358,7 +343,8 @@ if (-not ($actual -match $expected)) {
Refresh-TestRoot
$expected = @(
"^Trying to download example3\.html using asset cache file://$assetCacheRegex/[0-9a-z]+",
"error: curl: \(37\) Couldn't open file [^\n]+",
"error: curl operation failed with error code 37 \((Couldn't|Could not) read a file:// file\)\.",
"error: Not a transient network error, won't retry download from file://$assetCacheRegex/[0-9a-z]+",
"error: there were no asset cache hits, and x-block-origin blocks trying the authoritative source https://raw\.githubusercontent\.com/microsoft/vcpkg-tool/1767aaee7b229c609f7ad5cf2f57b6a6cc309fb8/LICENSE\.txt",
"note: or https://alternate\.example\.com",
"note: If you are using a proxy, please ensure your proxy settings are correct\.",
Expand Down
7 changes: 7 additions & 0 deletions azure-pipelines/signing-nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="VS-CoreXtFeeds" value="https://devdiv.pkgs.visualstudio.com/_packaging/VS-CoreXtFeeds/nuget/v3/index.json" />
</packageSources>
</configuration>
Loading
Loading