From c00bbf3fb328d85a060f305adefb05e5b5364d7c Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Tue, 5 Sep 2023 16:33:25 -0600 Subject: [PATCH 1/2] desktop: place kernel in the live layer Placing the kernel in the live layer allows for selecting at install time which kernel to install. --- live-build/auto/config | 4 +-- .../ubuntu/hooks/020-ubuntu-live.binary | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100755 live-build/ubuntu/hooks/020-ubuntu-live.binary diff --git a/live-build/auto/config b/live-build/auto/config index 98802ae0..9b1e4b36 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -716,7 +716,6 @@ case $PROJECT in *) touch config/universe-enabled PASSES_TO_LAYERS="true" - KERNEL_FLAVOURS='generic-hwe-22.04' # the standard layer, contains all base common packages for later layers add_task standard minimal standard ubuntu-desktop ubuntu-desktop-default-languages add_package standard cloud-init @@ -724,6 +723,7 @@ case $PROJECT in add_task standard.live ubuntu-live remove_package standard.live ubiquity-frontend-gtk add_snap standard.live ubuntu-desktop-installer/classic + add_package standard.live linux-generic-hwe-22.04 casper # the enhanced-secureboot layer, contains all packages for the enhanced secureboot install add_package standard.enhanced-secureboot cryptsetup boot-managed-by-snapd @@ -1183,7 +1183,7 @@ case "$ARCH${SUBARCH:++$SUBARCH}" in esac case $PROJECT:${SUBPROJECT:-} in - ubuntu-server:*|ubuntu-base:*|ubuntu-oci:*) + ubuntu-server:*|ubuntu-base:*|ubuntu-oci:*|ubuntu:) OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none" KERNEL_FLAVOURS=none BINARY_REMOVE_LINUX=false diff --git a/live-build/ubuntu/hooks/020-ubuntu-live.binary b/live-build/ubuntu/hooks/020-ubuntu-live.binary new file mode 100755 index 00000000..eb5c3de0 --- /dev/null +++ b/live-build/ubuntu/hooks/020-ubuntu-live.binary @@ -0,0 +1,26 @@ +#! /bin/sh + +# Kernels are deliberately installed into the live layer for Subiquity +# installers. This provides the ability to select a different kernel later, a +# key function for OEM support and a general capability for Subiquity. + +set -eux + +case ${PASS:-} in + standard.live) + ;; + *) + exit 0 + ;; +esac + +if [ -n "${SUBPROJECT:-}" ]; then + echo "We don't run Ubuntu Desktop hooks for this project." +fi + +. config/binary +. config/functions + +mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-generic-hwe +mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-generic-hwe +chmod a+r ${PWD}/livecd.${PROJECT}.initrd-generic-hwe ${PWD}/livecd.${PROJECT}.kernel-generic-hwe From 07fec08555ff0fa67149ea8121eb50a4a7b3130b Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Thu, 7 Sep 2023 16:54:53 -0600 Subject: [PATCH 2/2] changelog --- debian/changelog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index fb5e7cc9..deb8b38d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ livecd-rootfs (23.10.34) UNRELEASED; urgency=medium + [ Steve Langasek ] * Drop (outdated, inconsistent) /etc/hosts from ubuntu-server chroot includes. @@ -7,7 +8,11 @@ livecd-rootfs (23.10.34) UNRELEASED; urgency=medium * auto/config: use the new server-live task to reduce the use of explicit calls to add_package and add_snap a bit. - -- Steve Langasek Wed, 06 Sep 2023 18:28:06 -0700 + [ Dan Bungert ] + * desktop: adjust kernel to be in the live layer, to support changing which + kernel is installed rather than always using hwe. (LP: #2026225) + + -- Dan Bungert Thu, 07 Sep 2023 16:53:08 -0600 livecd-rootfs (23.10.33) mantic; urgency=medium