Compare commits

...
Author SHA1 Message Date
MickLesk 0a3a3004f1 Alpine VM: find the cloud image under its 3.25 name
Alpine 3.25 (2026-12-03) dropped the generic_ prefix and the bios/uefi
split: latest-stable now only holds alpine-3.25.0-x86_64-cloudinit-r0,
so the image lookup found nothing and the script stopped. The new image
boots under OVMF.
2026-12-05 12:30:14 +01:00
+5 -4
View File
@@ -97,18 +97,19 @@ fi
msg_info "Retrieving the URL for the Alpine cloud image"
# Alpine publishes a bios and a uefi variant side by side. This script boots
# through OVMF, so picking the bios image would produce a VM that never starts.
# Up to 3.24 Alpine published a bios and a uefi variant side by side; this
# script boots through OVMF, so the bios image would never start. From 3.25
# there is one image (no generic_ prefix) that boots both ways.
# The release number and the -r revision both live in the filename, so the
# directory has to be listed rather than guessed.
CLOUD_DIR="https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/cloud"
FILE=$(curl -fsSL "${CLOUD_DIR}/" 2>/dev/null | grep -oP 'href="\Kgeneric_alpine-[0-9.]+-x86_64-uefi-cloudinit-r[0-9]+\.qcow2(?=")' | sort -V | tail -1)
FILE=$(curl -fsSL "${CLOUD_DIR}/" 2>/dev/null | grep -oP 'href="\K(generic_)?alpine-[0-9.]+-x86_64-(uefi-)?cloudinit-r[0-9]+\.qcow2(?=")' | sort -V | tail -1)
if [[ -z "$FILE" ]]; then
msg_error "Could not determine the current Alpine cloud image"
exit 1
fi
ALPINE_VERSION=$(echo "$FILE" | grep -oP 'generic_alpine-\K[0-9.]+')
ALPINE_VERSION=$(echo "$FILE" | grep -oP 'alpine-\K[0-9.]+')
msg_ok "Alpine ${CL}${BL}${ALPINE_VERSION}${CL} ${GN}(${FILE})"
URL="${CLOUD_DIR}/${FILE}"