docs: Make sure we run mkosi genkey before everything else

Otherwise other commands might fail saying the keys don't exist
yet.
This commit is contained in:
Daan De Meyer
2025-04-03 16:37:56 +02:00
parent b6649f933b
commit 0298ddb881
2 changed files with 3 additions and 3 deletions

View File

@@ -39,6 +39,7 @@ chance that your distribution's packaged version of mkosi will be too old.
Then, you can build, run and test systemd executables as follows:
```sh
$ mkosi -f genkey # Generate signing keys once.
$ mkosi -f sandbox -- meson setup -Dbpf-framework=disabled build # bpftool detection inside mkosi sandbox is broken on Ubuntu Noble and older
$ mkosi -f sandbox -- meson compile -C build
$ mkosi -f sandbox -- build/systemctl --version
@@ -48,7 +49,6 @@ $ mkosi -f sandbox -- meson test -C build # Run the unit tests
To build and boot an OS image with the latest systemd installed:
```sh
$ mkosi -f genkey # Generate signing keys once.
$ mkosi -f sandbox -- meson compile -C build mkosi # (re-)build the OS image
$ mkosi boot # Boot the image with systemd-nspawn.
$ mkosi vm # Boot the image with qemu.
@@ -64,8 +64,8 @@ $ git clone https://github.com/systemd/systemd.git
$ cd systemd
$ git checkout -b <BRANCH> # where BRANCH is the name of the branch
$ $EDITOR src/core/main.c # or wherever you'd like to make your changes
$ mkosi -f sandbox -- meson setup build # Set up meson
$ mkosi -f genkey # Generate signing keys once.
$ mkosi -f sandbox -- meson setup build # Set up meson
$ mkosi -f sandbox -- meson compile -C build mkosi # (re-)build the test image
$ mkosi vm # Boot the image in qemu
$ git add -p # interactively put together your patch

View File

@@ -3,8 +3,8 @@
# This meson file can be used to run the integration tests without having to install any other dependencies
# as follows:
#
# mkosi -f sandbox -- meson setup testsuite test/integration-tests/standalone
# mkosi genkey
# mkosi -f sandbox -- meson setup testsuite test/integration-tests/standalone
# mkosi -f
# mkosi sandbox -- meson test -C testsuite
#