summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-08-31 13:50:24 +0000
committerChristian Breunig <christian@breunig.cc>2026-08-31 13:51:26 +0000
commit7080e2dce553d3121e00606821f2fb7acdfc63bb (patch)
treee96607f1072333d742501c7b57fe855ecb423727
parenta02be72903ac43a78b5fa0bbeaaac15e632205e7 (diff)
downloadvyos-build-7080e2dce553d3121e00606821f2fb7acdfc63bb.tar.gz
vyos-build-7080e2dce553d3121e00606821f2fb7acdfc63bb.zip
oci: T9265: add CPU architecture (fallback amd64) to image filename
Generated OCI images are now named vyos-<version>-oci-<arch>.tar (e.g. vyos-1.5.1-oci-amd64.tar) so amd64 and arm64 artifacts no longer collide. The architecture is read from the ISO version.json, falling back to amd64 for older ISOs built before ARM64 support was added.
-rwxr-xr-xscripts/iso-to-oci3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/iso-to-oci b/scripts/iso-to-oci
index 255ded8b..f79c02a0 100755
--- a/scripts/iso-to-oci
+++ b/scripts/iso-to-oci
@@ -55,7 +55,8 @@ xorriso -osirrox on -indev "${ISO}" -extract /live/filesystem.squashfs "${ROOTFS
echo "I: extracting squashfs content"
unsquashfs -follow -dest "${UNSQUASHFS}/" "${ROOTFS}/live/filesystem.squashfs" >/dev/null 2>&1
VERSION="$(jq --raw-output .version "${ROOTFS}/version.json")"
-ARCH="$(jq --raw-output .architecture "${ROOTFS}/version.json")"
+# older ISOs predate ARM64 support and carry no architecture in version.json
+ARCH="$(jq --raw-output '.architecture // "amd64"' "${ROOTFS}/version.json")"
OCI_IMAGE="vyos-${VERSION}-oci-${ARCH}.tar"
# fix locales for correct system configuration loading