mkosi: Make sure our systemd build always overrides the distros
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 4 Aug 2023 08:40:30 +0000 (10:40 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 4 Aug 2023 14:49:07 +0000 (16:49 +0200)
commit6ac5aa97ec2255fe78715b8cd02c5c17300f4310
tree00ce6037bf65ceeb25b3c761baa18db3bcc7b862
parentf2f8ed193c6076ed8f6070fb5166f8156be52d5a
mkosi: Make sure our systemd build always overrides the distros

Currently, we install the systemd install tree in the base image and
then build the initrd and final images from the base image. This means
if that any systemd package is pulled in during the initrd or final
image builds, it will override our version.

To fix this, we stop installing our build of systemd in the base image,
and store it in the output directory instead. That allows us to refer to
it using ExtraTrees= in the final and initrd image builds to install it
after all the distro packages have been installed, ensuring our version
always takes priority.
mkosi.presets/00-base/mkosi.build
mkosi.presets/00-base/mkosi.conf
mkosi.presets/00-base/mkosi.conf.d/10-arch.conf
mkosi.presets/00-base/mkosi.conf.d/10-debian-ubuntu.conf
mkosi.presets/00-base/mkosi.conf.d/10-opensuse.conf
mkosi.presets/10-initrd/mkosi.conf
mkosi.presets/20-final/mkosi.conf
mkosi.presets/20-final/mkosi.postinst