]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Update HACKING for latest mkosi
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 16 Feb 2023 19:05:55 +0000 (20:05 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 16 Feb 2023 19:05:55 +0000 (20:05 +0100)
docs/HACKING.md

index 2ce7dea05dcc55789602c5ca575f3f92c0c1776b..3113bfe73698d0547f8c749286dc0c2bcc8641e2 100644 (file)
@@ -45,7 +45,7 @@ sufficient to type `mkosi` in the systemd project directory to generate a disk i
 you can boot either in `systemd-nspawn` or in a UEFI-capable VM:
 
 ```sh
-$ mkosi boot
+$ sudo mkosi boot # nspawn still needs sudo for now
 ```
 
 or:
@@ -62,16 +62,6 @@ both instructs mkosi to build cached images if they don't exist yet and to use
 cached images if they already exist so make sure to always specify `-i` if you
 want mkosi to use the cached images.
 
-If you're going to build mkosi images that use the same distribution and release
-that you're currently using, you can speed up the initial mkosi run by having it
-reuse the host's package cache. To do this, create a mkosi override file in
-mkosi.default.d/ (e.g 20-local.conf) and add the following contents:
-
-```
-[Content]
-Cache=<full-path-to-package-manager-cache> # (e.g. /var/cache/dnf)
-```
-
 If you want to do a local build without mkosi, most distributions also provide
 very simple and convenient ways to install all development packages necessary
 to build systemd:
@@ -103,9 +93,10 @@ $ ninja -C build                  # build it locally, see if everything compiles
 $ meson test -C build             # run some simple regression tests
 $ cd ..
 $ git clone https://github.com/systemd/mkosi.git
+$ ln -s mkosi/bin/mkosi ~/.local/bin/mkosi # Make sure ~/.local/bin is in $PATH
 $ cd systemd
-$ sudo ../mkosi/bin/mkosi         # build the test image
-$ sudo ../mkosi/bin/mkosi boot    # boot up the test image
+$ mkosi                           # build the test image
+$ mkosi qemu                      # boot up the test image in qemu
 $ git add -p                      # interactively put together your patch
 $ git commit                      # commit it
 $ git push -u <REMOTE>            # where REMOTE is your "fork" on GitHub