summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-04-08 12:14:47 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-04-08 12:37:34 +0200
commite71b40fd0026c0884ca26eb4f0a9fbe4d9285cfa (patch)
treeffff55b46e0d9b2268f979a05d6d8612f3a14784 /docs
parentMerge pull request #32141 from DaanDeMeyer/mkosi (diff)
downloadsystemd-e71b40fd0026c0884ca26eb4f0a9fbe4d9285cfa.tar.xz
systemd-e71b40fd0026c0884ca26eb4f0a9fbe4d9285cfa.zip
docs: Add note on RuntimeBuildSources= to hacking guide
Diffstat (limited to 'docs')
-rw-r--r--docs/HACKING.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/HACKING.md b/docs/HACKING.md
index 8abb5e040f..23ea7b10b1 100644
--- a/docs/HACKING.md
+++ b/docs/HACKING.md
@@ -82,6 +82,21 @@ to `mkosi.local.conf`:
QemuFirmware=uefi
```
+To avoid having to build a new image all the time when iterating on a patch, add
+the following to `mkosi.local.conf`:
+
+```conf
+[Host]
+RuntimeBuildSources=yes
+```
+
+After enabling this setting, the source and build directories will be mounted to
+`/work/src` and `/work/build` respectively when booting the image as a container
+or virtual machine. To build the latest changes and re-install, run
+`meson install -C /work/build --only-changed` in the container or virtual machine
+and optionally restart the daemon(s) you're working on using
+`systemctl restart <units>` or `systemctl daemon-reexec` if you're working on pid1.
+
Putting this all together, here's a series of commands for preparing a patch
for systemd: