diff options
author | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2018-04-16 22:14:52 +0200 |
---|---|---|
committer | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2018-04-20 17:07:06 +0200 |
commit | bb0882c5dad030f676e424265ebcd869bb3ff899 (patch) | |
tree | d95bb2d7ad6b5ac47427f73babe015b0ade02342 /meta-agl-profile-core/recipes-core/dbus | |
parent | 97e5e76efa44f55ee9aaf3998bb3df38b829706c (diff) |
Introduce meta-agl-profile-core and meta-agl-profile-graphics
Rework towards agl profiles.
This change is part of a series of changes to create the
AGL profiles.
This set will mainly introduce the 'core' profile.
It is setup to be a drop-in change, thus some files were kept
in (dummy) locations for now.
However, they'll be taken care of in the next changes in this series.
The main target of the meta-agl-profile-core layer is to host:
- a minimal, bootable image with network and package management enabled
-- agl-image-boot
- a minimal image with network and packagemanagement and the AGL APIs
-- agl-image-minimal
The layer meta-agl-profile-graphical is used as superset of these
and includes support for egl+wayland+weston. All recipes concerning
graphics were moved there. This is not a full profile as we still have
to migrate some parts of meta-agl-demo in a follow-up changeset.
The roadmap as discussed during the F2F session in Karlsruhe is:
- week 16 : core profile and profiles w/o graphics
- week 17 : graphical profiles
- week 18 : final conversion of the demo image
v2: moved agl-login-manager from -graphics to -core (see Jose's comment)
v3: moved back after discussion - follow-up in separate changeset
Change-Id: Idacb0d1274baac1f63f8d1b850d4b1104ac33918
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-profile-core/recipes-core/dbus')
6 files changed, 53 insertions, 0 deletions
diff --git a/meta-agl-profile-core/recipes-core/dbus/.appends.core b/meta-agl-profile-core/recipes-core/dbus/.appends.core new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meta-agl-profile-core/recipes-core/dbus/.appends.core diff --git a/meta-agl-profile-core/recipes-core/dbus/dbus-cynara_%.bbappend b/meta-agl-profile-core/recipes-core/dbus/dbus-cynara_%.bbappend new file mode 120000 index 000000000..fcdfb1783 --- /dev/null +++ b/meta-agl-profile-core/recipes-core/dbus/dbus-cynara_%.bbappend @@ -0,0 +1 @@ +dbus_%.bbappend
\ No newline at end of file diff --git a/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.service b/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.service new file mode 100644 index 000000000..dee6ad741 --- /dev/null +++ b/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.service @@ -0,0 +1,10 @@ +[Unit] +Description=D-Bus User Message Bus +Documentation=man:dbus-daemon(1) +Requires=dbus.socket + +[Service] +ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation +ExecReload=/usr/bin/dbus-send --print-reply --session --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig +Restart=always +RestartSec=1 diff --git a/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.socket b/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.socket new file mode 100644 index 000000000..af76b2f12 --- /dev/null +++ b/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.socket @@ -0,0 +1,9 @@ +[Unit] +Description=D-Bus User Message Bus Socket +Before=sockets.target + +[Socket] +ListenStream=%t/bus + +[Install] +WantedBy=default.target diff --git a/meta-agl-profile-core/recipes-core/dbus/dbus/dbus_env.conf b/meta-agl-profile-core/recipes-core/dbus/dbus/dbus_env.conf new file mode 100644 index 000000000..f8f02669b --- /dev/null +++ b/meta-agl-profile-core/recipes-core/dbus/dbus/dbus_env.conf @@ -0,0 +1,5 @@ +[Unit] +Wants=dbus.service + +[Service] +Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/bus 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)} \ + " |