diff options
| author | Weisser, Pascal.ext <Pascal.Weisser.ext@karlstorz.com> | 2025-07-22 13:32:50 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-28 14:51:50 +0100 |
| commit | 78f97b876219114b5144e691d4558adb44da46f3 (patch) | |
| tree | c047324621e20a75150098f8c28031e1b18291a2 | |
| parent | 6003a9615dc4cc8b02912815a3d785299d01fe25 (diff) | |
| download | poky-78f97b876219114b5144e691d4558adb44da46f3.tar.gz | |
dbus: add traditional-activation PACKAGECONFIG
Add traditional-activation PACKAGECONFIG to DBus recipe in order to allow
users to enable or disable traditional DBus service activation.
DBus service activation refers to automatically starting an application
when a DBus message is sent to a service provided by that application.
Traditionally, this is done by the DBus-daemon, thus, the term traditional
here. On systems using systemd, systemd can do this, instead.
On some systems it might be of interest to disable the traditional service
activation in order to ensure that services are always started via systemd.
Per default, traditional service activation is enabled for DBus. Thus, the
traditional-activation PACKAGECONFIG is added to the default PACKAGECONFIG.
Otherwise, we might introduce a breaking change here.
The binary dbus-daemon-launch-helper isn't created in case DBus is built
with traditional service activation disabled, so we change its attributes
only when traditional service activation is turned on.
(From OE-Core rev: 272aafbf0a2a1a158fdff42b6ce295fe861f1327)
Signed-off-by: Weisser, Pascal <pascal.weisser.ext@karlstorz.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/dbus/dbus_1.16.2.bb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/recipes-core/dbus/dbus_1.16.2.bb b/meta/recipes-core/dbus/dbus_1.16.2.bb index 65f7028b4f..aabc4c3efb 100644 --- a/meta/recipes-core/dbus/dbus_1.16.2.bb +++ b/meta/recipes-core/dbus/dbus_1.16.2.bb | |||
| @@ -28,7 +28,7 @@ EXTRA_OEMESON = "-Dxml_docs=disabled \ | |||
| 28 | " | 28 | " |
| 29 | 29 | ||
| 30 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ | 30 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ |
| 31 | user-session \ | 31 | traditional-activation user-session \ |
| 32 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ | 32 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ |
| 33 | " | 33 | " |
| 34 | PACKAGECONFIG:class-native = "" | 34 | PACKAGECONFIG:class-native = "" |
| @@ -36,6 +36,7 @@ PACKAGECONFIG:class-nativesdk = "" | |||
| 36 | 36 | ||
| 37 | PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd_system_unitdir=${systemd_system_unitdir},-Dsystemd=disabled,systemd" | 37 | PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd_system_unitdir=${systemd_system_unitdir},-Dsystemd=disabled,systemd" |
| 38 | PACKAGECONFIG[x11] = "-Dx11_autolaunch=enabled,-Dx11_autolaunch=disabled, virtual/libx11 libsm" | 38 | PACKAGECONFIG[x11] = "-Dx11_autolaunch=enabled,-Dx11_autolaunch=disabled, virtual/libx11 libsm" |
| 39 | PACKAGECONFIG[traditional-activation] = "-Dtraditional_activation=true,-Dtraditional_activation=false" | ||
| 39 | PACKAGECONFIG[user-session] = "-Duser_session=true -Dsystemd_user_unitdir=${systemd_user_unitdir},-Duser_session=false" | 40 | PACKAGECONFIG[user-session] = "-Duser_session=true -Dsystemd_user_unitdir=${systemd_user_unitdir},-Duser_session=false" |
| 40 | PACKAGECONFIG[verbose-mode] = "-Dverbose_mode=true,-Dverbose_mode=false,," | 41 | PACKAGECONFIG[verbose-mode] = "-Dverbose_mode=true,-Dverbose_mode=false,," |
| 41 | PACKAGECONFIG[audit] = "-Dlibaudit=enabled,-Dlibaudit=disabled,audit" | 42 | PACKAGECONFIG[audit] = "-Dlibaudit=enabled,-Dlibaudit=disabled,audit" |
| @@ -152,8 +153,11 @@ do_install:append:class-target() { | |||
| 152 | 153 | ||
| 153 | chown messagebus:messagebus ${D}${localstatedir}/lib/dbus | 154 | chown messagebus:messagebus ${D}${localstatedir}/lib/dbus |
| 154 | 155 | ||
| 155 | chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper | 156 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'traditional-activation', '1', '0', d)}" = "1" ] |
| 156 | chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper | 157 | then |
| 158 | chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper | ||
| 159 | chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper | ||
| 160 | fi | ||
| 157 | 161 | ||
| 158 | # Remove Red Hat initscript | 162 | # Remove Red Hat initscript |
| 159 | rm -rf ${D}${sysconfdir}/rc.d | 163 | rm -rf ${D}${sysconfdir}/rc.d |
