From ada09ac4294a255ea9d420343b14648f3934ec3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Fri, 26 Jan 2024 14:55:33 +0100 Subject: [PATCH] Get back to using 2 layers, properly handle the install catalogue. --- live-build/auto/build | 4 ++++ live-build/auto/config | 27 +++++---------------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index a85db224..d5f0c01d 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -171,6 +171,10 @@ if [ "$PROJECT" = "ubuntu-core-desktop" ]; then mv output/*.img pc.img xz -0 -T4 pc.img rm -rf output/ + + # Prepare the source catalogue + cat install-sources-in.yaml | sed "s/@SIZE@/$(stat -c%s pc.img.xz)/g" > ../"$PREFIX".install-sources.yaml + # We need to rename the image file so that it can be pulled # by the builder. mv pc.img.xz ../"$PREFIX".img.xz diff --git a/live-build/auto/config b/live-build/auto/config index 2eb86dd5..5c944859 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -814,29 +814,12 @@ case $PROJECT in touch config/universe-enabled KERNEL_FLAVOURS='generic-hwe-22.04' PASSES_TO_LAYERS="true" - # the live layer, contains all packages for the live session installer - add_task live minimal - add_snap live ubuntu-core-desktop-installer/classic core22 snapd - add_package live linux-$KERNEL_FLAVOURS plymouth-theme-spinner squashfs-tools snapd cloud-init - - # now let's create the neccessary catalog files - cat <<-EOF > config/live.catalog-in.yaml - - default: true - description: - en: Ubuntu Core Desktop. - id: ubuntu-core-desktop - locale_support: none - name: - en: Ubuntu Core Desktop - path: pc.img.xz - type: dd-xz:file - size: @SIZE@ - variant: core - EOF - # we have to manually mark the live layer as the LIVE_PASS, since it's also - # the only layer we build - LIVE_PASS=live + # the minimal layer, for minimal installs + add_task minimal minimal + # the live layer, contains all packages for the live session installer + add_snap minimal.live ubuntu-core-desktop-installer/classic core22 snapd + add_package minimal.live linux-$KERNEL_FLAVOURS plymouth-theme-spinner squashfs-tools snapd cloud-init ;; ubuntu-oem)