Turn off the 'readonly' bit for the oneliner.
MODIFY
azure-pipelines/signing.yml
azure-pipelines/signing.yml
@@ -133,18 +133,18 @@ jobs:
copy "$(Build.BinariesDirectory)\install-vcpkg.ps1" "$(Build.BinariesDirectory)\vcpkg.cmd"
displayName: 'Duplicate Install Scripts'
- task: Powershell@2
- displayName: 'Build vcpkg-readonly-bundle.tar.gz'
+ displayName: 'Build vcpkg-gitregistry-bundle.tar.gz'
inputs:
pwsh: true
- filePath: install-vcpkg/mint-readonly-bundle.ps1
- arguments: '-DestinationTarballName "$(Build.BinariesDirectory)\vcpkg-readonly-bundle.tar.gz" -TempPath readonly-temp install-vcpkg/.vcpkg-root "$(Build.BinariesDirectory)\vcpkg.cmd" "$(Build.BinariesDirectory)\vcpkg.ps1"'
+ filePath: install-vcpkg/mint-gitregistry-bundle.ps1
+ arguments: '-DestinationTarballName "$(Build.BinariesDirectory)\vcpkg-gitregistry-bundle.tar.gz" -TempPath gitregistry-temp install-vcpkg/vcpkg-bundle.json "$(Build.BinariesDirectory)\vcpkg.cmd" "$(Build.BinariesDirectory)\vcpkg.ps1"'
- script: npm pack
displayName: Create vcpkg-ce Pack
workingDirectory: $(Build.BinariesDirectory)/vcpkg-ce
- script: |
mkdir "$(Build.ArtifactStagingDirectory)\staging"
move "$(Build.BinariesDirectory)\vcpkg-ce\vcpkg-ce-*.tgz" "$(Build.ArtifactStagingDirectory)\staging\vcpkg-ce.tgz"
- move "$(Build.BinariesDirectory)\vcpkg-readonly-bundle.tar.gz" "$(Build.ArtifactStagingDirectory)\staging\vcpkg-readonly-bundle.tar.gz"
+ move "$(Build.BinariesDirectory)\vcpkg-gitregistry-bundle.tar.gz" "$(Build.ArtifactStagingDirectory)\staging\vcpkg-gitregistry-bundle.tar.gz"
move "$(Build.BinariesDirectory)\install-vcpkg.ps1" "$(Build.ArtifactStagingDirectory)\staging\install-vcpkg.ps1"
move "$(Build.BinariesDirectory)\install-vcpkg.cmd" "$(Build.ArtifactStagingDirectory)\staging\install-vcpkg.cmd"
move "$(Build.BinariesDirectory)\vcpkg.ps1" "$(Build.ArtifactStagingDirectory)\staging\vcpkg.ps1"
@@ -157,8 +157,8 @@ jobs:
pwsh: true
targetType: 'inline'
script: |
- $readonlyBundleSha = (Get-FileHash "$(Build.ArtifactStagingDirectory)\staging\vcpkg-readonly-bundle.tar.gz" -Algorithm SHA512).Hash.ToLowerInvariant()
- Write-Host "##vso[task.setvariable variable=VCPKG_READONLY_BUNDLE_SHA;isOutput=true]$readonlyBundleSha"
+ $gitregistryBundleSha = (Get-FileHash "$(Build.ArtifactStagingDirectory)\staging\vcpkg-gitregistry-bundle.tar.gz" -Algorithm SHA512).Hash.ToLowerInvariant()
+ Write-Host "##vso[task.setvariable variable=VCPKG_GITREGISTRY_BUNDLE_SHA;isOutput=true]$gitregistryBundleSha"
$ceSha = (Get-FileHash "$(Build.ArtifactStagingDirectory)\staging\vcpkg-ce.tgz" -Algorithm SHA512).Hash.ToLowerInvariant()
Write-Host "##vso[task.setvariable variable=VCPKG_CE_SHA;isOutput=true]$ceSha"
- task: PublishBuildArtifacts@1
@@ -174,7 +174,7 @@ jobs:
pool:
vmImage: macOS-11
variables:
- VCPKG_READONLY_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_READONLY_BUNDLE_SHA'] ]
+ VCPKG_GITREGISTRY_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_GITREGISTRY_BUNDLE_SHA'] ]
VCPKG_CE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_CE_SHA'] ]
steps:
- task: CmdLine@2
@@ -192,7 +192,7 @@ jobs:
inputs:
failOnStderr: true
script: |
- cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)/$FMT_TARBALL_DIRNAME" -DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION -DVCPKG_READONLY_BUNDLE_SHA=$VCPKG_READONLY_BUNDLE_SHA -DVCPKG_CE_SHA=$VCPKG_CE_SHA -B "$(Build.BinariesDirectory)/build"
+ cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)/$FMT_TARBALL_DIRNAME" -DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION -DVCPKG_GITREGISTRY_BUNDLE_SHA=$VCPKG_GITREGISTRY_BUNDLE_SHA -DVCPKG_CE_SHA=$VCPKG_CE_SHA -B "$(Build.BinariesDirectory)/build"
make -j 8 -C "$(Build.BinariesDirectory)/build"
zip -j "$(Build.ArtifactStagingDirectory)/vcpkg-macos.zip" "$(Build.BinariesDirectory)/build/vcpkg"
- task: PublishBuildArtifacts@1
@@ -207,7 +207,7 @@ jobs:
pool:
name: 'vcpkg-rhel-7-5'
variables:
- VCPKG_READONLY_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_READONLY_BUNDLE_SHA'] ]
+ VCPKG_GITREGISTRY_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_GITREGISTRY_BUNDLE_SHA'] ]
VCPKG_CE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_CE_SHA'] ]
steps:
- task: CmdLine@2
@@ -226,7 +226,7 @@ jobs:
inputs:
failOnStderr: true
script: |
- scl enable devtoolset-9 'cmake3 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)/$FMT_TARBALL_DIRNAME" -DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION -DVCPKG_READONLY_BUNDLE_SHA=$VCPKG_READONLY_BUNDLE_SHA -DVCPKG_CE_SHA=$VCPKG_CE_SHA -B "$(Build.BinariesDirectory)/build"'
+ scl enable devtoolset-9 'cmake3 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)/$FMT_TARBALL_DIRNAME" -DVCPKG_BASE_VERSION=$VCPKG_BASE_VERSION -DVCPKG_GITREGISTRY_BUNDLE_SHA=$VCPKG_GITREGISTRY_BUNDLE_SHA -DVCPKG_CE_SHA=$VCPKG_CE_SHA -B "$(Build.BinariesDirectory)/build"'
make -j 4 -C "$(Build.BinariesDirectory)/build"
mv "$(Build.BinariesDirectory)/build/vcpkg" "$(Build.ArtifactStagingDirectory)/vcpkg-glibc"
- task: PublishBuildArtifacts@1
@@ -241,7 +241,7 @@ jobs:
dependsOn:
- arch_independent
variables:
- VCPKG_READONLY_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_READONLY_BUNDLE_SHA'] ]
+ VCPKG_GITREGISTRY_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_GITREGISTRY_BUNDLE_SHA'] ]
VCPKG_CE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_CE_SHA'] ]
steps:
- task: CmdLine@2
@@ -280,7 +280,7 @@ jobs:
pool:
name: 'VSEngSS-MicroBuild2022-1ES'
variables:
- VCPKG_READONLY_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_READONLY_BUNDLE_SHA'] ]
+ VCPKG_GITREGISTRY_BUNDLE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_GITREGISTRY_BUNDLE_SHA'] ]
VCPKG_CE_SHA: $[ dependencies.arch_independent.outputs['shas.VCPKG_CE_SHA'] ]
steps:
- task: PowerShell@2
@@ -306,7 +306,7 @@ jobs:
script: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86
cmake.exe --version
- cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)\%FMT_TARBALL_DIRNAME%" -DVCPKG_BASE_VERSION=%VCPKG_BASE_VERSION% -DVCPKG_READONLY_BUNDLE_SHA=%VCPKG_READONLY_BUNDLE_SHA% -DVCPKG_CE_SHA=%VCPKG_CE_SHA% -B "$(Build.BinariesDirectory)\x86"
+ cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)\%FMT_TARBALL_DIRNAME%" -DVCPKG_BASE_VERSION=%VCPKG_BASE_VERSION% -DVCPKG_GITREGISTRY_BUNDLE_SHA=%VCPKG_GITREGISTRY_BUNDLE_SHA% -DVCPKG_CE_SHA=%VCPKG_CE_SHA% -B "$(Build.BinariesDirectory)\x86"
ninja.exe -C "$(Build.BinariesDirectory)\x86"
- task: CmdLine@2
displayName: "Build vcpkg arm64 with CMake"
@@ -315,7 +315,7 @@ jobs:
script: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=x86
cmake.exe --version
- cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_PDB_SUFFIX="-arm64" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)\%FMT_TARBALL_DIRNAME%" -DVCPKG_BASE_VERSION=%VCPKG_BASE_VERSION% -DVCPKG_READONLY_BUNDLE_SHA=%VCPKG_READONLY_BUNDLE_SHA% -DVCPKG_CE_SHA=%VCPKG_CE_SHA% -B "$(Build.BinariesDirectory)\arm64"
+ cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_PDB_SUFFIX="-arm64" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)\%FMT_TARBALL_DIRNAME%" -DVCPKG_BASE_VERSION=%VCPKG_BASE_VERSION% -DVCPKG_GITREGISTRY_BUNDLE_SHA=%VCPKG_GITREGISTRY_BUNDLE_SHA% -DVCPKG_CE_SHA=%VCPKG_CE_SHA% -B "$(Build.BinariesDirectory)\arm64"
ninja.exe -C "$(Build.BinariesDirectory)\arm64"
- task: MicroBuildSigningPlugin@3
displayName: Install MicroBuild Signing
@@ -381,7 +381,7 @@ jobs:
move "$(Build.ArtifactStagingDirectory)\staging\vcpkg-ce.tgz" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-ce.tgz"
move "$(Build.ArtifactStagingDirectory)\staging\vcpkg-glibc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-glibc"
move "$(Build.ArtifactStagingDirectory)\staging\vcpkg-muslc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-muslc"
- move "$(Build.ArtifactStagingDirectory)\staging\vcpkg-readonly-bundle.tar.gz" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-readonly-bundle.tar.gz"
+ move "$(Build.ArtifactStagingDirectory)\staging\vcpkg-gitregistry-bundle.tar.gz" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-gitregistry-bundle.tar.gz"
move "$(Build.BinariesDirectory)\x86\vcpkg.exe" "$(Build.ArtifactStagingDirectory)\drop\vcpkg.exe"
move "$(Build.BinariesDirectory)\x86\vcpkg.pdb" "$(Build.ArtifactStagingDirectory)\drop\vcpkg.pdb"

RENAME
install-vcpkg/mint-readonly-bundle.ps1
install-vcpkg/mint-gitregistry-bundle.ps1
RENAME
install-vcpkg/.vcpkg-root
install-vcpkg/vcpkg-bundle.json
{
- "readonly": true,
+ "readonly": false,
"usegitregistry": true
}

MODIFY
src/vcpkg/commands.zbootstrap-readonly.cpp
src/vcpkg/commands.zbootstrap-readonly.cpp
@@ -31,18 +31,18 @@ namespace vcpkg::Commands
const auto& vcpkg_root = fs.almost_canonical(*vcpkg_root_arg, VCPKG_LINE_INFO);
fs.create_directories(vcpkg_root, VCPKG_LINE_INFO);
- const auto bundle_tarball = vcpkg_root / "vcpkg-readonly-bundle.tar.gz";
+ const auto bundle_tarball = vcpkg_root / "vcpkg-gitregistry-bundle.tar.gz";
#if defined(VCPKG_READONLY_BUNDLE_SHA)
print2("Downloading vcpkg readonly root bundle " VCPKG_BASE_VERSION_AS_STRING "\n");
const auto bundle_uri =
"https://github.com/microsoft/vcpkg-tool/releases/download/" VCPKG_BASE_VERSION_AS_STRING
- "/vcpkg-readonly-bundle.tar.gz";
+ "/vcpkg-gitregistry-bundle.tar.gz";
download_manager.download_file(
fs, bundle_uri, bundle_tarball, std::string(MACRO_TO_STRING(VCPKG_READONLY_BUNDLE_SHA)));
#else // ^^^ VCPKG_READONLY_BUNDLE_SHA / !VCPKG_READONLY_BUNDLE_SHA vvv
print2(Color::warning, "Downloading latest readonly bundle\n");
const auto bundle_uri =
- "https://github.com/microsoft/vcpkg-tool/releases/latest/download/vcpkg-readonly-bundle.tar.gz";
+ "https://github.com/microsoft/vcpkg-tool/releases/latest/download/vcpkg-gitregistry-bundle.tar.gz";
download_manager.download_file(fs, bundle_uri, bundle_tarball, nullopt);
#endif // ^^^ !VCPKG_READONLY_BUNDLE_SHA

Turn off the 'readonly' bit for the oneliner.