kdump-tools uses ucf for config file management and naively
modifying the config file meant for the target system directly
will cause the file hash to not get updated in the ucf database.
This will then cause later modifications to fail because
"there's nothing to do". Although actually doing the modification
to the ucf database is messy. Let's just modify the file in the live
layer to get the behavior we want there.
We install the kdump-tools package to minimal layer via inclusion in the
desktop-minimal seed, but it is enabled by default. Include a new chroot
hook to set USE_KDUMP=0 to make sure it's disabled by default and let
the installer decide to enable it or not.
For Ubuntu 24.04 and later cloud-init is included in desktop images. This is not applicable for Hyperv images so
we can disable cloud-init. This leaves the cloud-init package installed but disabled so users can still
use it if they want.
This is a documented way to disable cloud-init. See https://cloudinit.readthedocs.io/en/latest/howto/disable_cloud_init.html
A change in 8fb21808 also removed many of the dependencies that the hyperv images require.
This removal has been restored in this commit by adding them expliciltly in the hyperv hook.
This makes the hook ok to use cross-flavor.
We could also move glib-compile-schemas to a separate hook, to ensure we never
silently fail because glib-compile-schemas is broken/missing.
When the files we're creating in the live layer have static content, ship
them in live-build/ubuntu/includes.chroot.minimal.standard.live instead of
generating them from live-build/ubuntu/hooks/020-ubuntu-live.chroot_early.
Also fixes the fact that
live-build/ubuntu/hooks/020-ubuntu-live.chroot_early was incorrectly writing
to /root in the previous upload instead of /usr.
Now that kernel names use expected -generic flavour, and kernels are
installed in the live layer, we can go back to stock behaviour of
auto/build noticing that binary hooks are called on a live layer and
executing the extraction & rename of the kernel flavours.
BTW we can even later expand that to support 2 generic abis, and
calling the bigger one the hwe generic such that can also remove
./live-build/ubuntu-server/hooks/04-kernel-bits.binary.
This fixes ubuntu arm64+x13s that is unable to find
ubuntu-x13s.kernel-laptop as due to this hook, which currently
produces ubuntu.kernel-generic in error which is not at all expected
by ubuntu-cdimage. Also this unbreaks producing oem & intel-iot
images, although we will build these in 24.04 only next.
This reverts ubuntu daily-live to use `--linux-flavours
laptop-generic-hwe-22.04` instead of `--linux-flavours none
--linux-packages=none --initramfs=none`, like it did in lunar and
pre-canary-image or images that install kernel in live layer.
Fixes: c00bbf3fb3 ("desktop: place kernel in the live layer")
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>