@@ -1,16 +1,21 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/systemd:"
-SUMMARY = "native tools from systemd"
-
require systemd.inc
-DEPENDS = "gperf-native libcap-native util-linux-native python3-jinja2-native"
+SUMMARY = "native tools from systemd"
+
+# We don't actually need jinja to generate code, but it's checked for at configure time
+DEPENDS = "gperf-native python3-jinja2-native"
inherit pkgconfig meson native
-MESON_TARGET = "systemctl:executable"
-MESON_INSTALL_TAGS = "systemctl"
+# Disable everything that is auto-detected by default
+EXTRA_OEMESON += "--auto-features disabled"
+
+# Link systemctl statically
EXTRA_OEMESON += "-Dlink-systemctl-shared=false"
+
+# Ensure unused build paths are not in the binary
EXTRA_OEMESON += "-Dsysvinit-path= -Dsysvrcnd-path="
EXTRA_OEMESON += "-Dpam=disabled"
@@ -19,6 +24,9 @@ EXTRA_OEMESON += "-Dpam=disabled"
# More details are here https://github.com/systemd/systemd/issues/35897#issuecomment-2665405887
EXTRA_OEMESON += "--sysconfdir ${sysconfdir_native}"
+MESON_TARGET = "systemctl:executable"
+MESON_INSTALL_TAGS = "systemctl"
+
do_install:append() {
# Install systemd-sysv-install in /usr/bin rather than /usr/lib/systemd
# (where it is normally installed) so systemctl can find it in $PATH.