mkosi: Copy packages to the build directory as well
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 3 Jul 2024 12:28:21 +0000 (14:28 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 5 Jul 2024 09:38:42 +0000 (11:38 +0200)
commit6a898c35da19a883f9dc26be90b6a7a1a9861d66
treebc02300d5bbe2a4d75152a526606e37c674b4e2a
parent16ea64e2bee4975ef64f15d33558a05e93e7aa08
mkosi: Copy packages to the build directory as well

With the latest mkosi, mkosi -t none can be used to rerun the build
script without messing with a previously built image. This allows
one to run "mkosi -t disk -f qemu" in one terminal to build and boot
an image in qemu and then run "mkosi -t none" in another terminal to
rebuild the packages. If one then has "RuntimeBuildSources=yes" set
in their mkosi configuration, the build directory is mounted into the
virtual machine, which means that one can then run "dnf upgrade
/work/build/*.rpm" from within the VM to install the new packages.

This allows for quickly iterating on changes without having to rebuild
the image all the time.

We'll probably want to document this at some point, but let's start
with making it possible by copying the built packages to the build directory.

(cherry picked from commit 690a85b1d4e794af62bca6d1ea530ffc530ee58c)
mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot
mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot
mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot