mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-08 01:11:31 +00:00
Refactor task/package handling for new installer images
do_layered_desktop_image() is now the standard entry point for flavors using ubuntu-desktop-bootstrap and handles minimal/standard/live layers in a configurable and flavor-agnostic way to reduce code duplication.
This commit is contained in:
parent
92e6c54dc9
commit
768f0e6bee
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -2,6 +2,7 @@ livecd-rootfs (24.04.62) UNRELEASED; urgency=medium
|
|||||||
|
|
||||||
* Invert check for whether to include casper since the "yes" list is now
|
* Invert check for whether to include casper since the "yes" list is now
|
||||||
much shorter than the "no" list
|
much shorter than the "no" list
|
||||||
|
* Refactor task/package handling for new installer images
|
||||||
|
|
||||||
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 18 Mar 2024 14:44:32 -0700
|
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 18 Mar 2024 14:44:32 -0700
|
||||||
|
|
||||||
|
@ -648,6 +648,46 @@ if ! [ -e config/germinate-output/structure ]; then
|
|||||||
-s $FLAVOUR.$SUITE $GERMINATE_ARG -a $ARCH)
|
-s $FLAVOUR.$SUITE $GERMINATE_ARG -a $ARCH)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
do_layered_desktop_image() {
|
||||||
|
touch config/universe-enabled
|
||||||
|
PASSES_TO_LAYERS="true"
|
||||||
|
if [ -n "$HAS_MINIMAL" ]; then
|
||||||
|
if [ -z "$MINIMAL_TASKS" ]; then
|
||||||
|
MINIMAL_TASKS="${FLAVOUR}-desktop-minimal"
|
||||||
|
if [ -n "$HAS_DEFAULT_LANGUAGES" ]; then
|
||||||
|
MINIMAL_TASKS="$MINIMAL_TASKS ${FLAVOUR}-desktop-minimal-default-languages"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# the minimal layer, for minimal installs
|
||||||
|
add_task minimal minimal standard $MINIMAL_TASKS
|
||||||
|
# fixme: this should go in seeds, not be in code here
|
||||||
|
add_package minimal cloud-init
|
||||||
|
MINIMAL_PREFIX=minimal.
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIVE_PREFIX=$MINIMAL_PREFIX
|
||||||
|
# the standard layer, contains all base common packages for later layers
|
||||||
|
if [ "$HAS_STANDARD" != no ]; then
|
||||||
|
if [ -z "$STANDARD_TASKS" ]; then
|
||||||
|
STANDARD_TASKS="${FLAVOUR}-desktop"
|
||||||
|
if [ -n "$HAS_DEFAULT_LANGUAGES" ]; then
|
||||||
|
STANDARD_TASKS="$STANDARD_TASKS ${FLAVOUR}-desktop-default-languages"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "$HAS_MINIMAL" ]; then
|
||||||
|
STANDARD_TASKS="minimal standard $STANDARD_TASKS"
|
||||||
|
add_package standard cloud-init
|
||||||
|
fi
|
||||||
|
add_task ${MINIMAL_PREFIX}standard $STANDARD_TASKS
|
||||||
|
LIVE_PREFIX="${LIVE_PREFIX}standard."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# the live layer, contains all packages for the live session installer
|
||||||
|
[ -n "$LIVE_TASK" ] || LIVE_TASK=${FLAVOUR}-live
|
||||||
|
add_task ${LIVE_PREFIX}live "$LIVE_TASK"
|
||||||
|
add_package ${LIVE_PREFIX}live linux-$KERNEL_FLAVOURS casper
|
||||||
|
}
|
||||||
|
|
||||||
case $PROJECT in
|
case $PROJECT in
|
||||||
ubuntu)
|
ubuntu)
|
||||||
case ${SUBPROJECT:-} in
|
case ${SUBPROJECT:-} in
|
||||||
@ -679,17 +719,10 @@ case $PROJECT in
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
touch config/universe-enabled
|
HAS_MINIMAL=yes
|
||||||
|
HAS_DEFAULT_LANGUAGES=yes
|
||||||
KERNEL_FLAVOURS='generic-hwe-24.04'
|
KERNEL_FLAVOURS='generic-hwe-24.04'
|
||||||
PASSES_TO_LAYERS="true"
|
do_layered_desktop_image
|
||||||
# the minimal layer, for minimal installs
|
|
||||||
add_task minimal minimal standard ubuntu-desktop-minimal ubuntu-desktop-minimal-default-languages
|
|
||||||
add_package minimal cloud-init
|
|
||||||
# the standard layer, contains all base common packages for later layers
|
|
||||||
add_task minimal.standard ubuntu-desktop ubuntu-desktop-default-languages
|
|
||||||
# the live layer, contains all packages for the live session installer
|
|
||||||
add_task minimal.standard.live ubuntu-live
|
|
||||||
add_package minimal.standard.live linux-$KERNEL_FLAVOURS casper
|
|
||||||
# language support
|
# language support
|
||||||
seeded_langs="$(get_seeded_languages desktop)"
|
seeded_langs="$(get_seeded_languages desktop)"
|
||||||
echo "$seeded_langs" | tr ' ' ',' > config/seeded-languages
|
echo "$seeded_langs" | tr ' ' ',' > config/seeded-languages
|
||||||
@ -754,18 +787,11 @@ case $PROJECT in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
ubuntu-oem)
|
ubuntu-oem)
|
||||||
touch config/universe-enabled
|
HAS_MINIMAL=yes
|
||||||
PASSES_TO_LAYERS="true"
|
HAS_DEFAULT_LANGUAGES=yes
|
||||||
#KERNEL_FLAVOURS='oem-24.04'
|
#KERNEL_FLAVOURS='oem-24.04'
|
||||||
KERNEL_FLAVOURS='generic-hwe-24.04'
|
KERNEL_FLAVOURS='generic-hwe-24.04'
|
||||||
add_task minimal minimal standard ubuntu-desktop-minimal ubuntu-desktop-minimal-default-languages
|
do_layered_desktop_image
|
||||||
add_package minimal cloud-init
|
|
||||||
add_task minimal.standard ubuntu-desktop ubuntu-desktop-default-languages
|
|
||||||
add_task minimal.standard.live ubuntu-live
|
|
||||||
remove_package minimal.standard.live ubiquity-frontend-gtk
|
|
||||||
add_snap minimal.standard.live ubuntu-desktop-bootstrap/classic
|
|
||||||
add_package minimal.standard.live linux-$KERNEL_FLAVOURS casper
|
|
||||||
|
|
||||||
cat <<-EOF > config/minimal.catalog-in.yaml
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
||||||
name: "Ubuntu Desktop for OEM (minimal)"
|
name: "Ubuntu Desktop for OEM (minimal)"
|
||||||
description: >-
|
description: >-
|
||||||
@ -796,14 +822,11 @@ case $PROJECT in
|
|||||||
|
|
||||||
edubuntu)
|
edubuntu)
|
||||||
# Edubuntu now ships the new installer.
|
# Edubuntu now ships the new installer.
|
||||||
touch config/universe-enabled
|
HAS_MINIMAL=yes
|
||||||
PASSES_TO_LAYERS="true"
|
MINIMAL_TASKS=edubuntu-desktop-gnome-minimal
|
||||||
|
STANDARD_TASKS=edubuntu-desktop-gnome
|
||||||
KERNEL_FLAVOURS=generic
|
KERNEL_FLAVOURS=generic
|
||||||
add_task minimal minimal standard edubuntu-desktop-gnome-minimal
|
do_layered_desktop_image
|
||||||
add_package minimal cloud-init
|
|
||||||
add_task minimal.standard edubuntu-desktop-gnome
|
|
||||||
add_task minimal.standard.live edubuntu-live
|
|
||||||
add_package minimal.standard.live linux-$KERNEL_FLAVOURS casper
|
|
||||||
cat <<-EOF > config/minimal.catalog-in.yaml
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
||||||
name: "Edubuntu Desktop (minimized)"
|
name: "Edubuntu Desktop (minimized)"
|
||||||
description: >-
|
description: >-
|
||||||
@ -829,14 +852,9 @@ case $PROJECT in
|
|||||||
|
|
||||||
ubuntucinnamon)
|
ubuntucinnamon)
|
||||||
# Ubuntu Cinnamon now ships the new installer.
|
# Ubuntu Cinnamon now ships the new installer.
|
||||||
touch config/universe-enabled
|
HAS_MINIMAL=yes
|
||||||
PASSES_TO_LAYERS="true"
|
|
||||||
KERNEL_FLAVOURS=generic
|
KERNEL_FLAVOURS=generic
|
||||||
add_task minimal minimal standard ubuntucinnamon-desktop-minimal
|
do_layered_desktop_image
|
||||||
add_package minimal cloud-init
|
|
||||||
add_task minimal.standard ubuntucinnamon-desktop
|
|
||||||
add_task minimal.standard.live ubuntucinnamon-live
|
|
||||||
add_package minimal.standard.live linux-$KERNEL_FLAVOURS
|
|
||||||
cat <<-EOF > config/minimal.catalog-in.yaml
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
||||||
name: "Ubuntu Cinnamon Desktop (minimized)"
|
name: "Ubuntu Cinnamon Desktop (minimized)"
|
||||||
description: >-
|
description: >-
|
||||||
@ -866,14 +884,9 @@ case $PROJECT in
|
|||||||
;;
|
;;
|
||||||
ubuntukylin)
|
ubuntukylin)
|
||||||
# Ubuntu Kylin now ships the new installer.
|
# Ubuntu Kylin now ships the new installer.
|
||||||
touch config/universe-enabled
|
HAS_MINIMAL=yes
|
||||||
PASSES_TO_LAYERS="true"
|
|
||||||
KERNEL_FLAVOURS=generic
|
KERNEL_FLAVOURS=generic
|
||||||
add_task minimal minimal standard ubuntukylin-desktop-minimal
|
do_layered_desktop_image
|
||||||
add_package minimal cloud-init
|
|
||||||
add_task minimal.standard ubuntukylin-desktop
|
|
||||||
add_task minimal.standard.live ubuntukylin-live
|
|
||||||
add_package minimal.standard.live linux-$KERNEL_FLAVOURS
|
|
||||||
cat <<-EOF > config/minimal.catalog-in.yaml
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
||||||
name: "Ubuntu Kylin Desktop (minimized)"
|
name: "Ubuntu Kylin Desktop (minimized)"
|
||||||
description: >-
|
description: >-
|
||||||
@ -899,12 +912,15 @@ case $PROJECT in
|
|||||||
|
|
||||||
xubuntu)
|
xubuntu)
|
||||||
# Xubuntu now ships the new installer.
|
# Xubuntu now ships the new installer.
|
||||||
touch config/universe-enabled
|
HAS_MINIMAL=yes
|
||||||
PASSES_TO_LAYERS="true"
|
MINIMAL_TASKS=xubuntu-minimal
|
||||||
KERNEL_FLAVOURS=generic
|
KERNEL_FLAVOURS=generic
|
||||||
# the minimal layer, for minimal installs (minimal and desktop iso)
|
case ${SUBPROJECT:-} in
|
||||||
add_task minimal minimal standard xubuntu-minimal
|
minimal)
|
||||||
add_package minimal cloud-init
|
HAS_STANDARD=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
do_layered_desktop_image
|
||||||
cat <<-EOF > config/minimal.catalog-in.yaml
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
||||||
name: "Xubuntu Minimal"
|
name: "Xubuntu Minimal"
|
||||||
description: >-
|
description: >-
|
||||||
@ -916,12 +932,9 @@ case $PROJECT in
|
|||||||
EOF
|
EOF
|
||||||
case ${SUBPROJECT:-} in
|
case ${SUBPROJECT:-} in
|
||||||
minimal)
|
minimal)
|
||||||
LIVE_LAYER_PARENT=minimal
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# the standard layer, for standard installs (desktop iso)
|
# the standard layer, for standard installs (desktop iso)
|
||||||
LIVE_LAYER_PARENT=minimal.standard
|
|
||||||
add_task minimal.standard xubuntu-desktop
|
|
||||||
cat <<-EOF > config/minimal.standard.catalog-in.yaml
|
cat <<-EOF > config/minimal.standard.catalog-in.yaml
|
||||||
name: "Xubuntu Desktop"
|
name: "Xubuntu Desktop"
|
||||||
description: >-
|
description: >-
|
||||||
@ -934,23 +947,16 @@ case $PROJECT in
|
|||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
add_task ${LIVE_LAYER_PARENT}.live xubuntu-live
|
|
||||||
add_package ${LIVE_LAYER_PARENT}.live linux-$KERNEL_FLAVOURS
|
|
||||||
/usr/share/livecd-rootfs/checkout-translations-branch \
|
/usr/share/livecd-rootfs/checkout-translations-branch \
|
||||||
https://git.launchpad.net/subiquity po config/catalog-translations
|
https://git.launchpad.net/subiquity po config/catalog-translations
|
||||||
;;
|
;;
|
||||||
|
|
||||||
ubuntu-budgie)
|
ubuntu-budgie)
|
||||||
# By default Ubuntu Budgie now ships the new installer.
|
# Ubuntu Budgie now ships the new installer.
|
||||||
touch config/universe-enabled
|
HAS_MINIMAL=yes
|
||||||
PASSES_TO_LAYERS="true"
|
HAS_DEFAULT_LANGUAGES=yes
|
||||||
KERNEL_FLAVOURS='generic-hwe-24.04'
|
KERNEL_FLAVOURS='generic-hwe-24.04'
|
||||||
add_task minimal minimal standard ubuntu-budgie-desktop-minimal ubuntu-budgie-desktop-minimal-default-languages
|
do_layered_desktop_image
|
||||||
add_task minimal.standard ubuntu-budgie-desktop ubuntu-budgie-desktop-default-languages
|
|
||||||
add_task minimal.standard.live ubuntu-budgie-live
|
|
||||||
add_package minimal cloud-init
|
|
||||||
remove_package minimal.standard.live ubiquity-frontend-gtk
|
|
||||||
add_package minimal.standard.live linux-$KERNEL_FLAVOURS casper
|
|
||||||
seeded_langs="$(get_seeded_languages budgie-desktop-minimal budgie-desktop)"
|
seeded_langs="$(get_seeded_languages budgie-desktop-minimal budgie-desktop)"
|
||||||
echo "$seeded_langs" | tr ' ' ',' > config/seeded-languages
|
echo "$seeded_langs" | tr ' ' ',' > config/seeded-languages
|
||||||
derive_language_layers minimal budgie-desktop-minimal budgie-desktop-minimal-default-languages "$seeded_langs"
|
derive_language_layers minimal budgie-desktop-minimal budgie-desktop-minimal-default-languages "$seeded_langs"
|
||||||
@ -980,14 +986,10 @@ case $PROJECT in
|
|||||||
|
|
||||||
ubuntu-mate)
|
ubuntu-mate)
|
||||||
# Ubuntu MATE now ships the new installer.
|
# Ubuntu MATE now ships the new installer.
|
||||||
touch config/universe-enabled
|
HAS_MINIMAL=yes
|
||||||
PASSES_TO_LAYERS="true"
|
MINIMAL_TASKS=ubuntu-mate-core
|
||||||
KERNEL_FLAVOURS=generic
|
KERNEL_FLAVOURS=generic
|
||||||
add_task minimal minimal standard ubuntu-mate-core
|
do_layered_desktop_image
|
||||||
add_package minimal cloud-init
|
|
||||||
add_task minimal.standard ubuntu-mate-desktop
|
|
||||||
add_task minimal.standard.live ubuntu-mate-live
|
|
||||||
add_package minimal.standard.live linux-$KERNEL_FLAVOURS
|
|
||||||
cat <<-EOF > config/minimal.catalog-in.yaml
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
||||||
name: "Ubuntu MATE Desktop (minimized)"
|
name: "Ubuntu MATE Desktop (minimized)"
|
||||||
description: >-
|
description: >-
|
||||||
@ -1013,14 +1015,10 @@ case $PROJECT in
|
|||||||
|
|
||||||
ubuntustudio-dvd)
|
ubuntustudio-dvd)
|
||||||
# By default Ubuntu Studio now ships the new installer.
|
# By default Ubuntu Studio now ships the new installer.
|
||||||
touch config/universe-enabled
|
STANDARD_TASKS="ubuntustudio-desktop ubuntustudio-audio ubuntustudio-graphics ubuntustudio-video ubuntustudio-photography"
|
||||||
PASSES_TO_LAYERS="true"
|
LIVE_TASK=ubuntustudio-dvd-live
|
||||||
KERNEL_FLAVOURS=lowlatency
|
KERNEL_FLAVOURS=lowlatency
|
||||||
LIVE_LAYER_PARENT=standard
|
do_layered_desktop_image
|
||||||
add_task standard minimal standard ubuntustudio-desktop ubuntustudio-audio ubuntustudio-graphics ubuntustudio-video ubuntustudio-photography
|
|
||||||
add_package standard cloud-init
|
|
||||||
add_task standard.live ubuntustudio-dvd-live
|
|
||||||
add_package standard.live linux-$KERNEL_FLAVOURS
|
|
||||||
cat <<-EOF > config/standard.catalog-in.yaml
|
cat <<-EOF > config/standard.catalog-in.yaml
|
||||||
name: "Ubuntu Studio Desktop"
|
name: "Ubuntu Studio Desktop"
|
||||||
description: >-
|
description: >-
|
||||||
@ -1557,7 +1555,7 @@ case $PROJECT in
|
|||||||
cp -af /usr/share/livecd-rootfs/live-build/ubuntu/includes.chroot \
|
cp -af /usr/share/livecd-rootfs/live-build/ubuntu/includes.chroot \
|
||||||
config/includes.chroot
|
config/includes.chroot
|
||||||
|
|
||||||
LIVE_LAYER=${LIVE_LAYER_PARENT:-minimal.standard}.live
|
LIVE_LAYER=${LIVE_PREFIX}live
|
||||||
cp -af /usr/share/livecd-rootfs/live-build/ubuntu/includes.chroot.minimal.standard.live \
|
cp -af /usr/share/livecd-rootfs/live-build/ubuntu/includes.chroot.minimal.standard.live \
|
||||||
config/includes.chroot.$LIVE_LAYER
|
config/includes.chroot.$LIVE_LAYER
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user