From b01ce16d351be6464cb96a50b8f422a75f6c158b Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Fri, 14 Aug 2026 20:36:35 +0300 Subject: [PATCH] allow overriding NetBSD package release --- kbuildx/scripts/netbsd-deps.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kbuildx/scripts/netbsd-deps.sh b/kbuildx/scripts/netbsd-deps.sh index e0757a4..f8e3372 100755 --- a/kbuildx/scripts/netbsd-deps.sh +++ b/kbuildx/scripts/netbsd-deps.sh @@ -2,6 +2,8 @@ set -eu export PATH=/usr/pkg/bin:/usr/pkg/sbin:/sbin:/usr/sbin:/bin:/usr/bin +package_release=${1:-} +case "$package_release" in current|trunk) package_release=;; esac if command -v resize_ffs >/dev/null 2>&1; then printf '%s\n' 'Growing NetBSD FFS root filesystem to fill the virtual disk' df -h / @@ -16,7 +18,11 @@ case "$(uname -m)" in aarch64|arm64) pkg_arch=aarch64 ;; *) printf '%s\n' "Unsupported NetBSD architecture: $(uname -m)" >&2; exit 1 ;; esac -package_path="http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$pkg_arch/11.0/All/" +if [ -z "$package_release" ]; then + host_release=$(uname -r) + package_release=${host_release%%.*}.0 +fi +package_path="http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$pkg_arch/$package_release/All/" # The prepared bsdkrun NetBSD image has no CA bundle and cannot install one # into its read-only certificate layout; use the official CDN over HTTP for # this disposable CI build guest so pkg_add/pkgin can bootstrap successfully. -- 2.51.2