]> git.ipfire.org Git - thirdparty/systemd.git/commit
meson: add a new -Dstandalone-binaries=true option
authorFilipe Brandenburger <filbranden@gmail.com>
Wed, 3 Jun 2020 21:02:59 +0000 (14:02 -0700)
committerFilipe Brandenburger <filbranden@gmail.com>
Wed, 10 Jun 2020 17:54:29 +0000 (10:54 -0700)
commit8ef8f3d5a7674e95d58a92a3dde6199b5d73e2c6
treebcd37241ed37a7665f8cc84445e698a98da4e37c
parent24bd74ae03efc98272236bd0a98a1d7d090d540c
meson: add a new -Dstandalone-binaries=true option

This adds an option to build standalone binaries that do not depend on the
systemd-shared library. This option can be handy to build binaries that can be
useful on a non-systemd system, binaries such as systemd-sysusers and
systemd-tmpfiles have been previously requested, but installing them with all
the required dependencies pulls in too much code that isn't really relevant for
those use cases. The standalone use case is also relevant in containers, where
minimizing the size of the container image is quite relevant.

For now, only `systemd-sysusers` is also built as a standalone binary.

The standalone binaries are installed as `/usr/bin/%{name}.standalone`, the
packaging system is reponsible for renaming those into the correct names
during the packaging step. RPM is able to do so with RemovePathPostfixes:

The default behavior is to build shared binaries only, since this option is
mainly intended for building distribution packages.

Tested that a proper separate binary is built when using this option and
that having it disabled (or using the default Meson configuration) does not
produce a binary for this option.
meson.build
meson_options.txt