[PATCH 1/3] systemd-tools: add recipe

Mikko Rapeli
2024-09-02T09:41:47Z

From: Erik Schilling <erik.schilling@linaro.org>

Provides systemd-tools-native recipe for ukify.py tooling.
Avoids full systemd native build which is not needed.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
.../systemd/systemd-tools_256.5.bb | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 meta/recipes-core/systemd/systemd-tools_256.5.bb

diff --git a/meta/recipes-core/systemd/systemd-tools_256.5.bb b/meta/recipes-core/systemd/systemd-tools_256.5.bb
new file mode 100644
index 0000000000..f2e419ffe0
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-tools_256.5.bb
@@ -0,0 +1,41 @@
+require systemd.inc
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
+
+DEPENDS = " \
+ intltool-native \
+ libcap \
+ util-linux \
+ gperf-native \
+ python3-jinja2-native \
+ python3-pyelftools-native \
+ python3-pefile \
+"
+
+inherit meson pkgconfig gettext
+
+MESON_TARGET = "ukify"
+
+# Helper variables to clarify locations. This mirrors the logic in systemd's
+# build system.
+rootprefix ?= "${root_prefix}"
+rootlibdir ?= "${base_libdir}"
+rootlibexecdir = "${rootprefix}/lib"
+
+EXTRA_OEMESON += "-Dnobody-user=nobody \
+ -Dnobody-group=nogroup \
+ -Drootlibdir=${rootlibdir} \
+ -Drootprefix=${rootprefix} \
+ -Ddefault-locale=C \
+ -Dmode=release \
+ -Dsystem-alloc-uid-min=101 \
+ -Dsystem-uid-max=999 \
+ -Dsystem-alloc-gid-min=101 \
+ -Dsystem-gid-max=999 \
+"
+
+do_install() {
+ install -d ${D}${bindir}/
+ install -m 0755 ${S}/src/ukify/ukify.py ${D}${bindir}/ukify
+}
+
+BBCLASSEXTEND = "native"
--
2.34.1