From e9430c91fac0dee0a6f0467958ddd491a60a6064 Mon Sep 17 00:00:00 2001 From: Johannes Schneider Date: Sat, 21 Jun 2025 22:46:28 +0200 Subject: systemd: add recipe for systemd-repart-native 257.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a recipe to build systemd-repart-native. The chosen version is a relatively recent one, to support: 1) PKCS#11 uris [1] to pass in the private key when creating a discoverable disk image (asĀ·--private-key-source). 2) setting Compression=/CompressionLevel= in the configuration [2], which is then passed over to a (recent version of) mkfs.erofs The recipe was adapted from an incomplete 'systemd-tools' patch [3] that is floating upstream. Link: [1]: https://github.com/systemd/systemd/commit/0a8264080a5d4b5e13e65eed80ac98a476f7fe43 Link: [2]: https://github.com/systemd/systemd/commit/27cacec939a46f61706d7b48a51b6f5880be4662 Link: [3]: https://lists.openembedded.org/g/openembedded-core/topic/108223984#msg204065 Signed-off-by: Johannes Schneider Signed-off-by: Khem Raj --- .../systemd/systemd-repart-native_257.6.bb | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 meta-oe/recipes-core/systemd/systemd-repart-native_257.6.bb diff --git a/meta-oe/recipes-core/systemd/systemd-repart-native_257.6.bb b/meta-oe/recipes-core/systemd/systemd-repart-native_257.6.bb new file mode 100644 index 0000000000..15b60af02e --- /dev/null +++ b/meta-oe/recipes-core/systemd/systemd-repart-native_257.6.bb @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: MIT +# +# Copyright Leica Geosystems AG +# + +SUMMARY = "systemd-repart" +DESCRIPTION = "systemd-repart grows and adds partitions to a partition table, based on the configuration files described in repart.d(5), or generates a Discoverable Disk Image (DDI) for a system extension (sysext, see systemd-sysext(8))." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd" + +LICENSE = "GPL-2.0-only & LGPL-2.1-or-later" +LICENSE:libsystemd = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ + file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" + +SRCREV = "00a12c234e2506f5cab683460199575f13c454db" +SRCBRANCH = "v257-stable" +SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH}" + +S = "${WORKDIR}/git" + +DEPENDS = " \ + cryptsetup-native \ + gperf-native \ + libcap \ + python3-jinja2-native \ + util-linux \ +" + +inherit meson pkgconfig gettext native + +MESON_TARGET = "systemd-repart" + +# 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 ${B}/systemd-repart ${D}${bindir}/systemd-repart + install -d ${D}${libdir}/ + install -m 0644 ${B}/src/shared/libsystemd-shared-257.so ${D}${libdir}/libsystemd-shared-257.so + + install -d ${D}${libdir}/systemd/repart/ + cp -r ${S}/src/repart/definitions ${D}${libdir}/systemd/repart/ +} -- cgit v1.2.3-54-g00ecf