Merge ~xnox/casper:x13s into casper:main

Proposed by Dimitri John Ledkov
Status: Rejected
Rejected by: Dimitri John Ledkov
Proposed branch: ~xnox/casper:x13s
Merge into: casper:main
Diff against target: 24 lines (+12/-1)
1 file modified
scripts/casper-bottom/61desktop_canary_tweaks (+12/-1)
Reviewer Review Type Date Requested Status
Steve Langasek Needs Fixing
Ubuntu Release Team Pending
Review via email: mp+452494@code.launchpad.net

Commit message

canary_tweaks: Encode kernel metapackage & flavour again

Ensure x13s booted installer installs laptop-23.10 kernel flavour.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

ah, forgot to restart the subiquity daemon.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

this got past the stage of installing kernel.

Revision history for this message
Steve Langasek (vorlon) wrote :

The subiquity implementation is:

        # the ISO may have been configured to tell us what kernel to use
        # /run is the historical location, but a bit harder to craft an ISO to
        # have it there as it needs to be populated at runtime.
        run_mp_file = os.path.join(self.app.base_model.root, "run/kernel-meta-package")
        etc_mp_file = os.path.join(
            self.app.base_model.root, "etc/subiquity/kernel-meta-package"
        )
        for mp_file in (run_mp_file, etc_mp_file):
            if os.path.exists(mp_file):
                with open(mp_file) as fp:
                    kernel_package = fp.read().strip()
                self.model.metapkg_name = kernel_package
                self.model.explicitly_requested = True
                log.debug(f"Using kernel {kernel_package} due to {mp_file}")
                break

This means that instead of casper having to guess the metapackage name at boot time based on uname, it is POSSIBLE for us to encode this in the squashfs at image construction time. And then all the logic about the metapackages is kept local to the image build system and we can populate it based on $KERNEL_FLAVOURS directly.

It means we need to add support for this in livecd-rootfs AND drop this bit from casper, because /run takes precedence over /etc. But once done, we should be free of this long-term.

review: Needs Fixing

Unmerged commits

4621e11... by Dimitri John Ledkov

canary_tweaks: Encode kernel metapackage & flavour again

Ensure x13s booted installer installs laptop-23.10 kernel flavour.

LP: #2037798

Signed-off-by: Dimitri John Ledkov <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/casper-bottom/61desktop_canary_tweaks b/scripts/casper-bottom/61desktop_canary_tweaks
2index b37028f..acd70da 100755
3--- a/scripts/casper-bottom/61desktop_canary_tweaks
4+++ b/scripts/casper-bottom/61desktop_canary_tweaks
5@@ -33,7 +33,18 @@ printf "[org.gnome.shell]\ndisabled-extensions=['ding@rastersoft.com']\n" >> /ro
6 chroot /root glib-compile-schemas /usr/share/glib-2.0/schemas/
7
8 # set the right kernel variant
9-echo "linux-generic-hwe-22.04" > /run/kernel-meta-package
10+case `uname -r` in
11+ *-laptop)
12+ meta=linux-laptop-23.10
13+ ;;
14+ *-generic)
15+ meta=linux-generic-hwe-22.04
16+ ;;
17+ *)
18+ meta=linux-generic-hwe-22.04
19+ ;;
20+esac
21+echo "$meta" > /run/kernel-meta-package
22
23 # start the installer on session start, restore normal session on close
24 cat > /root/usr/lib/systemd/user/ubuntu-desktop-installer.service << EOF

Subscribers

People subscribed via source and target branches