X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=meta-agl-profile-core%2Frecipes-core%2Fdbus%2Fdbus_%25.bbappend;fp=meta-agl-profile-core%2Frecipes-core%2Fdbus%2Fdbus_%25.bbappend;h=e63ea0f28b7b4886f8331d40477b1a3a14ab4c9c;hb=bb0882c5dad030f676e424265ebcd869bb3ff899;hp=0000000000000000000000000000000000000000;hpb=97e5e76efa44f55ee9aaf3998bb3df38b829706c;p=AGL%2Fmeta-agl.git diff --git a/meta-agl-profile-core/recipes-core/dbus/dbus_%.bbappend b/meta-agl-profile-core/recipes-core/dbus/dbus_%.bbappend new file mode 100644 index 000000000..e63ea0f28 --- /dev/null +++ b/meta-agl-profile-core/recipes-core/dbus/dbus_%.bbappend @@ -0,0 +1,28 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/dbus" + +SRC_URI_append = "file://dbus.service \ + file://dbus.socket \ + file://dbus_env.conf \ + " + +inherit systemd + +do_install_append() { + if [ "${PN}" != "nativesdk-dbus" ]; then + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -m 644 -p -D ${WORKDIR}/dbus.service ${D}${systemd_user_unitdir}/dbus.service + install -m 644 -p -D ${WORKDIR}/dbus.socket ${D}${systemd_user_unitdir}/dbus.socket + install -m 644 -p -D ${WORKDIR}/dbus_env.conf ${D}${systemd_system_unitdir}/user@.service.d/dbus_env.conf + + # Execute these manually on behalf of systemctl script (from systemd-systemctl-native.bb) + # because it does not support systemd's user mode. + mkdir -p ${D}/etc/systemd/user/default.target.wants/ + ln -sf ${systemd_user_unitdir}/dbus.socket ${D}/etc/systemd/user/default.target.wants/dbus.socket + fi + fi +} + +FILES_${PN} += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/dbus.*', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_system_unitdir}/user@.service.d/dbus_env.conf', '', d)} \ + "