]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Treat default initrd as a regular subimage 3922/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 27 Sep 2025 20:58:04 +0000 (22:58 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 28 Sep 2025 12:30:22 +0000 (14:30 +0200)
commit30956dc4bbd27c50b03f3bb14b1591c2a993eae2
treef87afaaee02eaeee8fe6330d0517dd3b654b996b
parent29d328790294904566dbe65e0b9e28818b4b11b7
Treat default initrd as a regular subimage

Currently, because we build the default initrd as a substep of building
a regular image, we have lots of special cased logic for it and we still
propagate settings manually from the regular image to its default initrd.

Let's streamline this by treating the default initrd as a regular image.
The only complication about making this change is that we used to build
the default initrd on demand only if a kernel was actually installed into
the image. Because we have to make the decision of whether to build the
default initrd or not way earlier now, we can't check if kernels were
installed into the image or not. Instead, we check if any known kernel
packages are listed to be installed which should be a decent enough
heuristic.

Another regression is that the default initrd won't have access to any
packages built as part of the main image build anymore. We used to rely
on this in systemd but now we build the systemd packages in a separate
build subimage and those will still be available to the default initrd
image build.

We have to stop using Bootable=yes in a few tests as using it now means
the resources folder has to be available and we don't propagate it
during tests.
mkosi/__init__.py
mkosi/config.py
mkosi/distributions/__init__.py
mkosi/distributions/arch.py
mkosi/distributions/centos.py
mkosi/distributions/debian.py
mkosi/distributions/fedora.py
mkosi/distributions/opensuse.py
mkosi/distributions/postmarketos.py
mkosi/distributions/ubuntu.py
tests/test_config.py