From 4476f60b9bb7a8716835a514e968e87d2a28f565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Thu, 28 Mar 2024 12:11:06 +0100 Subject: [PATCH] Add support for building Ubuntu Core 24 images. --- debian/changelog | 6 +++++ live-build/auto/config | 59 ++++++++++++++++-------------------------- 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6d01742f..d94c2485 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (24.04.53) UNRELEASED; urgency=medium + + * Add support for building Ubuntu Core 24 images. + + -- Ɓukasz 'sil2100' Zemczak Thu, 28 Mar 2024 12:10:15 +0100 + livecd-rootfs (24.04.52) noble; urgency=medium * Move from hwe-22.04 to hwe-24.04 throughout, hwe-22.04 is obsolete and diff --git a/live-build/auto/config b/live-build/auto/config index c819d547..fcadd193 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -476,46 +476,33 @@ case $IMAGEFORMAT in ;; *) ;; esac - case $SUITE in - xenial) - # Ubuntu Core 16 - UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS -c $CHANNEL" + + # Ubuntu Core 24 + # For now we stick to updating this by hand, but a more tasteful solution + # will follow + CORE_MAJOR=24 + + # Currently uc24 assertions do not support global channel overrides, + # instead we have per-channel models + case $CHANNEL in + stable) + MODEL="ubuntu-core-${CORE_MAJOR}-${MODEL#pc-}" ;; - bionic) - # Ubuntu Core 18 - MODEL="ubuntu-core-18-${MODEL#pc-}" + candidate|beta|edge|dangerous) + MODEL="ubuntu-core-${CORE_MAJOR}-${MODEL#pc-}-${CHANNEL}" + ;; + dangerous-*) + # That being said, the dangerous grade *does* + # support channel overrides, so we can use the + # dangerous model assertion and override the channel + # freely. + MODEL="ubuntu-core-${CORE_MAJOR}-${MODEL#pc-}-dangerous" + CHANNEL=${CHANNEL#dangerous-} UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS -c $CHANNEL" ;; *) - if [ "$SUITE" = "focal" ]; then - CORE_MAJOR=20 - else - CORE_MAJOR=22 - fi - # Ubuntu Core 2x - # Currently uc2x assertions do not support global - # channel overrides, instead we have per-channel models - case $CHANNEL in - stable) - MODEL="ubuntu-core-${CORE_MAJOR}-${MODEL#pc-}" - ;; - candidate|beta|edge|dangerous) - MODEL="ubuntu-core-${CORE_MAJOR}-${MODEL#pc-}-${CHANNEL}" - ;; - dangerous-*) - # That being said, the dangerous grade *does* - # support channel overrides, so we can use the - # dangerous model assertion and override the channel - # freely. - MODEL="ubuntu-core-${CORE_MAJOR}-${MODEL#pc-}-dangerous" - CHANNEL=${CHANNEL#dangerous-} - UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS -c $CHANNEL" - ;; - *) - echo "Unknown CHANNEL ${CHANNEL} specification for ${SUITE}" - exit 1 - ;; - esac + echo "Unknown CHANNEL ${CHANNEL} specification for ${SUITE}" + exit 1 ;; esac