From cec7b9966575340b464e961164b23f08ff7f27cb Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 22 Sep 2023 22:34:01 -0700 Subject: [PATCH 1/6] live-build/auto/config: fail immediately on unknown arch/subarch. When trying to make changes to refactor livecd-rootfs, it is difficult to know what side effects a change may have because of the use of globs on arch/subarch and the lack of an authoritative list of supported arch combinations. This assembles a list of all possible values for $ARCH:$SUBARCH by looking at all existing uses of $SUBARCH in live-build/auto/config and combining with etc/default-arches from ubuntu-cdimage: $ grep + etc/default-arches |grep -vE '(trusty|xenial|bionic|focal)[[:space:]]|appliance' It also includes a special-case *appliance* glob, because there are many Ubuntu Core appliance builds and there may be more in the future, and we don't want to have to update livecd-rootfs with a hard-coded list. Otherwise, this includes all currently used / supported combinations. The amd64+kassel subarch is referenced in the code, but stopped being built a while ago because "end of contract"; and there are some older no-longer-used subarchs for particular raspi variants, which there is work to clean up separately. So this should be a no-op wrt buildability of any existing images on mantic - and if not, that's important for us to know! --- debian/changelog | 6 ++++++ live-build/auto/config | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/debian/changelog b/debian/changelog index 85d736f9..e224dcbb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (23.10.45) UNRELEASED; urgency=medium + + * live-build/auto/config: fail immediately on unknown arch/subarch. + + -- Steve Langasek Fri, 22 Sep 2023 22:19:57 -0700 + livecd-rootfs (23.10.44) mantic; urgency=medium * Fix the subarch used in the hook to identify images for sifive diff --git a/live-build/auto/config b/live-build/auto/config index 6b257987..5d83cb66 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -1,6 +1,24 @@ #! /bin/sh set -e +case $ARCH:$SUBARCH in + amd64:|amd64:generic|amd64:intel-iot|\ + arm64:|arm64:generic|arm64:raspi|arm64:snapdragon|\ + arm64:tegra|arm64:tegra-igx|\ + armhf:|armhf:raspi|\ + i386:\ + ppc64el:\ + riscv64:icicle|riscv64:nezha|riscv64:licheerv|riscv64:unmatched|\ + riscv64:visionfive|riscv64:visionfive2|\ + s390x:\ + *appliance*) + ;; + *) + echo "Unknown architecture target $ARCH:$SUBARCH" + exit 1 + ;; +esac + if [ -e config/germinate-output ]; then mv -T config/germinate-output germ-tmp rm -rf config From 1f2523920dd7b2cd9dbcacf33a0690a600a934b9 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 26 Sep 2023 09:46:16 -0700 Subject: [PATCH 2/6] Add missing '|' --- live-build/auto/config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index 5d83cb66..d4a9c621 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -6,11 +6,11 @@ case $ARCH:$SUBARCH in arm64:|arm64:generic|arm64:raspi|arm64:snapdragon|\ arm64:tegra|arm64:tegra-igx|\ armhf:|armhf:raspi|\ - i386:\ - ppc64el:\ + i386:|\ + ppc64el:|\ riscv64:icicle|riscv64:nezha|riscv64:licheerv|riscv64:unmatched|\ riscv64:visionfive|riscv64:visionfive2|\ - s390x:\ + s390x:|\ *appliance*) ;; *) From 9fce6428c37d3b81c574d408a1af615677c7723d Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 26 Sep 2023 10:18:26 -0700 Subject: [PATCH 3/6] alphabetize the list --- live-build/auto/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index d4a9c621..b9853c6c 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -8,7 +8,7 @@ case $ARCH:$SUBARCH in armhf:|armhf:raspi|\ i386:|\ ppc64el:|\ - riscv64:icicle|riscv64:nezha|riscv64:licheerv|riscv64:unmatched|\ + riscv64:icicle|riscv64:licheerv|riscv64:nezha|riscv64:unmatched|\ riscv64:visionfive|riscv64:visionfive2|\ s390x:|\ *appliance*) From f9b299ec4d11b9147d71e6dc22fc47794f3399e3 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 27 Sep 2023 13:38:12 -0700 Subject: [PATCH 4/6] Another arm64 subarch about to land --- live-build/auto/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index b9853c6c..196bff0c 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -4,7 +4,7 @@ set -e case $ARCH:$SUBARCH in amd64:|amd64:generic|amd64:intel-iot|\ arm64:|arm64:generic|arm64:raspi|arm64:snapdragon|\ - arm64:tegra|arm64:tegra-igx|\ + arm64:tegra|arm64:tegra-igx|arm64:x13s|\ armhf:|armhf:raspi|\ i386:|\ ppc64el:|\ From 94082a66011440084dda8ed45051572cb19fafcb Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 6 Dec 2023 00:04:28 -0800 Subject: [PATCH 5/6] And support riscv64 builds with no subarch such as https://launchpad.net/~cloudware/+livefs/ubuntu/noble/cpc/ --- live-build/auto/config | 1 + 1 file changed, 1 insertion(+) diff --git a/live-build/auto/config b/live-build/auto/config index 196bff0c..0a8f109c 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -8,6 +8,7 @@ case $ARCH:$SUBARCH in armhf:|armhf:raspi|\ i386:|\ ppc64el:|\ + riscv64:|\ riscv64:icicle|riscv64:licheerv|riscv64:nezha|riscv64:unmatched|\ riscv64:visionfive|riscv64:visionfive2|\ s390x:|\ From 323ffd735c37e44b3f96e7b5aa13b1ba0be32521 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 6 Dec 2023 08:38:33 -0800 Subject: [PATCH 6/6] Also add support for riscv64 builds with 'generic' subarch CPC team builds use null subarch but ubuntu-cdimage builds use 'generic' subarch https://launchpad.net/~ubuntu-cdimage/+livefs/ubuntu/noble/cpc/+build/542136 --- live-build/auto/config | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index 0a8f109c..822bd7d9 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -8,9 +8,8 @@ case $ARCH:$SUBARCH in armhf:|armhf:raspi|\ i386:|\ ppc64el:|\ - riscv64:|\ - riscv64:icicle|riscv64:licheerv|riscv64:nezha|riscv64:unmatched|\ - riscv64:visionfive|riscv64:visionfive2|\ + riscv64:|riscv64:generic|riscv64:icicle|riscv64:licheerv|\ + riscv64:nezha|riscv64:unmatched|riscv64:visionfive|riscv64:visionfive2|\ s390x:|\ *appliance*) ;;