From 2edcf8e7dba67948f721650975a6317b17cb5ec7 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 16 Feb 2023 20:05:55 +0100 Subject: [PATCH] Update HACKING for latest mkosi --- docs/HACKING.md | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/docs/HACKING.md b/docs/HACKING.md index 2ce7dea05dc..3113bfe7369 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -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= # (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 # where REMOTE is your "fork" on GitHub -- 2.47.3