$ mkosi qemu
```
+By default, the tools from your host system are used to build the image. To have
+`mkosi` use the systemd tools from the `build/` directory, add the following to
+`mkosi.local.conf`:
+
+```conf
+[Host]
+ExtraSearchPaths=build/
+```
+
+And if you want `mkosi` to build a tools image and use the tools from there
+instead of looking for tools on the host, add the following to
+`mkosi.local.conf`:
+
+```conf
+[Host]
+ToolsTree=default
+```
+
Every time you rerun the `mkosi` command a fresh image is built, incorporating
all current changes you made to the project tree. To avoid having to build a new
image all the time when iterating on a patch, add the following to
'--output-dir', meson.current_build_dir() / 'mkosi.output',
'--cache-dir', meson.current_build_dir() / 'mkosi.cache',
'--build-dir', meson.current_build_dir() / 'mkosi.builddir',
+ '--extra-search-path', meson.current_build_dir(),
'--force',
'build',
],
$ meson setup --reconfigure build -Dremote=enabled
```
-Next, we can build the integration test image:
+To make sure `mkosi` doesn't try to build systemd from source during the image build
+process, you can add the following to `mkosi.local.conf`:
+
+```
+[Content]
+Environment=NO_BUILD=1
+```
+
+You might also want to use the `PackageDirectories=` or `Repositories=` option to provide
+mkosi with a directory or repository containing the systemd packages that should be installed
+instead. If the repository containing the systemd packages is not a builtin repository known
+by mkosi, you can use the `PackageManagerTrees=` option to write an extra repository definition
+to /etc which is used when building the image instead.
+
+Next, we can build the integration test image with meson:
```shell
$ meson compile -C build mkosi
```
+By default, the `mkosi` meson target which builds the integration test image depends on
+other meson targets to build various systemd tools that are used to build the image to make
+sure they are up-to-date. If you instead want the already installed systemd tools on the
+host to be used, you can run `mkosi` manually to build the image. To build the integration test
+image without meson, run the following:
+
+```shell
+$ mkosi -f
+```
+
+Note that by default we assume that `build/` is used as the meson build directory that will be used to run
+the integration tests. If you want to use another directory as the meson build directory, you will have to
+configure the mkosi build directory (`BuildDirectory=`), cache directory (`CacheDirectory=`) and output
+directory (`OutputDirectory=`) to point to the other directory using `mkosi.local.conf`.
+
After the image has been built, the integration tests can be run with:
```shell