mirror of
https://git.yoctoproject.org/poky
synced 2026-04-28 15:32:27 +02:00
It is needed when support for both systemd and sysvinit are enabled. This also adds a patch for systemctl to call systemd-sysv-install without a hardcoded path and instead relies on finding it in $PATH. This is needed when calling systemctl from a recipe sysroot. (From OE-Core rev: 30140cb9354fa535f68fab58e73b76f0cca342e4) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
31 lines
1.2 KiB
BlitzBasic
31 lines
1.2 KiB
BlitzBasic
FILESEXTRAPATHS:prepend := "${THISDIR}/systemd:"
|
|
|
|
SUMMARY = "Systemctl executable from systemd"
|
|
|
|
require systemd.inc
|
|
|
|
DEPENDS = "gperf-native libcap-native util-linux-native python3-jinja2-native"
|
|
|
|
SRC_URI += "file://0001-systemctl-Call-systemd-sysv-install-without-path.patch"
|
|
SRC_URI += "file://0002-implment-systemd-sysv-install-for-OE.patch"
|
|
|
|
inherit pkgconfig meson native
|
|
|
|
MESON_TARGET = "systemctl:executable"
|
|
MESON_INSTALL_TAGS = "systemctl"
|
|
EXTRA_OEMESON += "-Dlink-systemctl-shared=false"
|
|
|
|
# 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}"
|
|
|
|
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.
|
|
# It is expected that the use of systemd-sysv-install will be removed
|
|
# with version 259 of systemd and then this, and everything that was
|
|
# added along with it, should be reverted.
|
|
install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${bindir}/systemd-sysv-install
|
|
}
|