From: Daan De Meyer Date: Tue, 22 Oct 2024 12:22:47 +0000 (+0200) Subject: docs: Mention that a local build might be required to use mkosi X-Git-Tag: v257-rc1~152 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=c2c75d5ade1c996844f1a8f7070bce707d866589;p=systemd%2F.git docs: Mention that a local build might be required to use mkosi Currently we need ukify with support for --profile and --join-profile which isn't in an official release yet so mention that a local build from source might be required. --- diff --git a/docs/HACKING.md b/docs/HACKING.md index 992004a58a..a4c3bd78a8 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -44,9 +44,37 @@ or: $ 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`: +By default, the tools from your host system are used to build the image. +Sometimes we start using mkosi features that rely on functionality in systemd +tools that's not in an official release yet. In that case, you'll need to build +systemd from source on the host and configure mkosi to use the tools from the +systemd build directory. + +To do a local build, most distributions provide very simple and convenient ways +to install most development packages necessary to build systemd: + +```sh +# Fedora +$ sudo dnf builddep systemd +# Debian/Ubuntu +$ sudo apt-get build-dep systemd +# Arch +$ sudo pacman -S devtools +$ pkgctl repo clone --protocol=https systemd +$ cd systemd +$ makepkg -seoc +``` + +After installing the development packages, systemd can be built from source as follows: + +```sh +$ meson setup build +$ ninja -C build +$ meson test -C build +``` + +To have `mkosi` use the systemd tools from the `build/` directory, add the +following to `mkosi.local.conf`: ```conf [Host] @@ -97,29 +125,6 @@ $ git push -u # where REMOTE is your "fork" on GitHub And after that, head over to your repo on GitHub and click "Compare & pull request" -If you want to do a local build without mkosi, -most distributions also provide very simple and convenient ways to install most development packages necessary to build systemd: - -```sh -# Fedora -$ sudo dnf builddep systemd -# Debian/Ubuntu -$ sudo apt-get build-dep systemd -# Arch -$ sudo pacman -S devtools -$ pkgctl repo clone --protocol=https systemd -$ cd systemd -$ makepkg -seoc -``` - -After installing the development packages, systemd can be built from source as follows: - -```sh -$ meson setup build -$ ninja -C build -$ meson test -C build -``` - Happy hacking! ## Building distribution packages with mkosi