@@ -1,19 +1,27 @@
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"
-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="
# Systemctl is supposed to operate on target, but the target sysroot is not
# determined at run-time, but rather set during configure
# More details are here https://github.com/systemd/systemd/issues/35897#issuecomment-2665405887
EXTRA_OEMESON += "--sysconfdir ${sysconfdir_native}"
+
+MESON_TARGET = "systemctl"
+MESON_INSTALL_TAGS = "systemctl"
Pass "--auto-features disabled" to disable all optional dependencies by default, and remove build dependencies that are not needed. Reorganise the recipe to make logical sense and so that the SUMMARY isn't overwritten by systemd.inc, and add comments. Signed-off-by: Ross Burton <ross.burton@arm.com> --- .../systemd/systemd-tools-native_259.5.bb | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)