fix: install cnb pack from github releases instead of ppa

The ppa:cncf-buildpacks/pack-cli launchpad source is currently down, breaking the runtime image build and any bats run that calls install_pack. Pack is now tracked in contrib/dependencies.json and pulled from the buildpacks/pack GitHub release tarball, matching how other binary deps are managed. update-deb-dependencies gains hyphen-aware word-boundary matching so single-word names like pack cannot accidentally rewrite unrelated debian/control lines, keeping pack out of the package's hard requirements.
This commit is contained in:
Jose Diaz-Gonzalez
2026-05-02 09:12:46 -04:00
parent ef959160bd
commit 31ce5a7c48
4 changed files with 23 additions and 10 deletions

View File

@@ -655,9 +655,11 @@ convert_to_dockerfile() {
install_pack() {
if [[ ! -x /usr/bin/pack ]]; then
add-apt-repository --yes ppa:cncf-buildpacks/pack-cli
apt-get update
apt-get --yes install pack-cli
local DEPS_FILE="${BATS_TEST_DIRNAME}/../../contrib/dependencies.json"
local PACK_URL
PACK_URL="$(jq -r --arg arch "$(dpkg --print-architecture)" '.dependencies[] | select(.name == "pack") | .urls[$arch]' "$DEPS_FILE")"
curl -fsSL "$PACK_URL" | tar -C /usr/bin --no-same-owner -xzf - pack
chmod +x /usr/bin/pack
fi
}