Skip to contentSkip to conversation

dbus: do not use systemctl from host for configure

PATCH New [email protected] 1 participant 1 message Feb 15, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dbus: do not use systemctl from host for configure

From: Andy Kling <[email protected]>

configure.ac from dbus uses $PATH to get the location of systemctl. If it is not found /usr/bin/systemctl is used. It is possible to override the location by passing SYSTEMCTL=[value] to configure. The value is used to replace @SYSTEMCTL@ in systemd-user/dbus.socket.in. dbus.socket sets the environment variable DBUS_SESSION_BUS_ADDRESS using systemctl.

dbus does not depend on systemd-systemctl-native, so location from host installation or the default value gets used. Adding systemd-systemctl to the build would give path from sysroot.

Forcing SYSTEMCTL=${base_bindir}/systemctl for target gives the correct path there and the environment variable is set after a user session was opened.

[YOCTO #11002]

---
 meta/recipes-core/dbus/dbus_1.10.14.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/dbus/dbus_1.10.14.bb +1 -0
index e4f54ec734..75c8c41df8 100644
@@ -97,6 +97,7 @@ EXTRA_OECONF = "--disable-tests \
                 --disable-libaudit \
                 "
 
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
 EXTRA_OECONF_append_class-native = " --disable-selinux"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
Signature · 1 line
2.11.0