From patchwork Fri Aug 1 20:49:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67968 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11086CA0EC0 for ; Fri, 1 Aug 2025 20:49:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.98025.1754081393573999524 for ; Fri, 01 Aug 2025 13:49:54 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EB7061516 for ; Fri, 1 Aug 2025 13:49:44 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9226D3F673 for ; Fri, 1 Aug 2025 13:49:52 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/5] systemd: explicitly disable dbus Date: Fri, 1 Aug 2025 21:49:24 +0100 Message-ID: <20250801204928.2580529-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 01 Aug 2025 20:49:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221373 This is actually only used in a single test that we don't build, so explicitly disable DBus instead of offering a PACKAGECONFIG that doesn't do what you might expect (enable some systemd/dbus integration). This doesn't change behaviour as this option wasn't enabled by default. Signed-off-by: Ross Burton --- meta/recipes-core/systemd/systemd_257.6.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/systemd/systemd_257.6.bb b/meta/recipes-core/systemd/systemd_257.6.bb index 9092d02c510..adc27f6cff1 100644 --- a/meta/recipes-core/systemd/systemd_257.6.bb +++ b/meta/recipes-core/systemd/systemd_257.6.bb @@ -147,7 +147,6 @@ PACKAGECONFIG[tpm2] = "-Dtpm2=enabled,-Dtpm2=disabled,tpm2-tss,tpm2-tss libtss2 PACKAGECONFIG[default-compression-lz4] = "-Dlz4=true -Ddefault-compression=lz4,,lz4" PACKAGECONFIG[default-compression-xz] = "-Dxz=true -Ddefault-compression=xz,,xz" PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true -Ddefault-compression=zstd,,zstd" -PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus" PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=enabled,-Defi=false -Dbootloader=disabled,python3-pyelftools-native" PACKAGECONFIG[elfutils] = "-Delfutils=enabled,-Delfutils=disabled,elfutils,,libelf libdw" PACKAGECONFIG[fido] = "-Dlibfido2=enabled,-Dlibfido2=disabled,libfido2" @@ -251,6 +250,7 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \ -Dsystem-alloc-gid-min=101 \ -Dsystem-gid-max=999 \ ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \ + -Ddbus=disabled \ " # Hardcode target binary paths to avoid using paths from sysroot or worse From patchwork Fri Aug 1 20:49:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67966 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA6D6C87FD2 for ; Fri, 1 Aug 2025 20:49:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.98308.1754081394056342955 for ; Fri, 01 Aug 2025 13:49:54 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 985B116A3 for ; Fri, 1 Aug 2025 13:49:45 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3A2183F673 for ; Fri, 1 Aug 2025 13:49:53 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/5] dbus: remove obsolete cleanups Date: Fri, 1 Aug 2025 21:49:25 +0100 Message-ID: <20250801204928.2580529-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250801204928.2580529-1-ross.burton@arm.com> References: <20250801204928.2580529-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 01 Aug 2025 20:49:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221372 The removal of the Red Hat initscript has been redundant since 2017[1]. The test directory is not installed, so there's no need to remove it. Signed-off-by: Ross Burton [1] dbus: 708a44d0 ("Remove distribution-specific init-scripts") --- meta/recipes-core/dbus/dbus_1.16.2.bb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/meta/recipes-core/dbus/dbus_1.16.2.bb b/meta/recipes-core/dbus/dbus_1.16.2.bb index 381dcec82a3..909a209fc7b 100644 --- a/meta/recipes-core/dbus/dbus_1.16.2.bb +++ b/meta/recipes-core/dbus/dbus_1.16.2.bb @@ -159,12 +159,6 @@ do_install:append:class-target() { chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper fi - # Remove Red Hat initscript - rm -rf ${D}${sysconfdir}/rc.d - - # Remove empty testexec directory as we don't build tests - rm -rf ${D}${libdir}/dbus-1.0/test - # Remove /run as it is created on startup rm -rf ${D}${runtimedir} } From patchwork Fri Aug 1 20:49:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67969 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08419C87FDA for ; Fri, 1 Aug 2025 20:49:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.98309.1754081394639652679 for ; Fri, 01 Aug 2025 13:49:54 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 41EBD237B for ; Fri, 1 Aug 2025 13:49:46 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DFA373F673 for ; Fri, 1 Aug 2025 13:49:53 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/5] dbus: glib is only used in the test suite Date: Fri, 1 Aug 2025 21:49:26 +0100 Message-ID: <20250801204928.2580529-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250801204928.2580529-1-ross.burton@arm.com> References: <20250801204928.2580529-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 01 Aug 2025 20:49:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221374 The glib/gio libraries are only used in a few of the tests: $ grep use_glib meson.build:use_glib = glib.found() and gio.found() test/meson.build:if use_glib test/meson.build:if message_bus and tools and platform_unix and use_glib test/meson.build:if use_glib test/meson.build:if message_bus and tools and platform_unix and use_glib So there's no need to depend on glib if we're not building the tests. Explicitly enable/disable the modular tests option to ensure that when the tests are not being installed we don't still need glib to build them. Signed-off-by: Ross Burton --- meta/recipes-core/dbus/dbus_1.16.2.bb | 5 ++--- 1 file changed, 2 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 909a209fc7b..1876ea8a944 100644 --- a/meta/recipes-core/dbus/dbus_1.16.2.bb +++ b/meta/recipes-core/dbus/dbus_1.16.2.bb @@ -20,7 +20,6 @@ SRC_URI[sha256sum] = "0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6 EXTRA_OEMESON = "-Dxml_docs=disabled \ -Ddoxygen_docs=disabled \ -Dsystem_socket=/run/dbus/system_bus_socket \ - -Dmodular_tests=enabled \ -Dchecks=true \ -Druntime_dir=${runtimedir} \ -Dtest_socket_dir=/tmp \ @@ -41,9 +40,9 @@ PACKAGECONFIG[user-session] = "-Duser_session=true -Dsystemd_user_unitdir=${syst PACKAGECONFIG[verbose-mode] = "-Dverbose_mode=true,-Dverbose_mode=false,," PACKAGECONFIG[audit] = "-Dlibaudit=enabled,-Dlibaudit=disabled,audit" PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" -PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false" +PACKAGECONFIG[tests] = "-Dmodular_tests=enabled -Dinstalled_tests=true,-Dmodular_tests=disabled -Dinstalled_tests=false,glib-2.0" -DEPENDS = "expat virtual/libintl glib-2.0" +DEPENDS = "expat virtual/libintl" RDEPENDS:${PN} += "${PN}-common ${PN}-tools" RDEPENDS:${PN}:class-native = "" From patchwork Fri Aug 1 20:49:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67967 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9614C87FCA for ; Fri, 1 Aug 2025 20:49:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.98312.1754081395320746565 for ; Fri, 01 Aug 2025 13:49:55 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DDDEB1516 for ; Fri, 1 Aug 2025 13:49:46 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 879893F673 for ; Fri, 1 Aug 2025 13:49:54 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 4/5] dbus: use the systemd class to handle the unit files Date: Fri, 1 Aug 2025 21:49:27 +0100 Message-ID: <20250801204928.2580529-4-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250801204928.2580529-1-ross.burton@arm.com> References: <20250801204928.2580529-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 01 Aug 2025 20:49:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221375 Originally, the dbus recipe couldn't use the systemd class because there was a circular dependency between systemd and dbus. However, since systemd v209 in 2014[1] systemd hasn't needed libdbus, as it has it's own implementation of the client library. DBus does not use the systemd libraries, so there is no circular dependency. Also the dbus package already was installing the service and socket files, so we were installing them again. Signed-off-by: Ross Burton [1] dbus: 718db96199 ("core: convert PID 1 to libsystemd-bus") --- meta/recipes-core/dbus/dbus_1.16.2.bb | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/meta/recipes-core/dbus/dbus_1.16.2.bb b/meta/recipes-core/dbus/dbus_1.16.2.bb index 1876ea8a944..5de6ba66bc7 100644 --- a/meta/recipes-core/dbus/dbus_1.16.2.bb +++ b/meta/recipes-core/dbus/dbus_1.16.2.bb @@ -46,16 +46,11 @@ DEPENDS = "expat virtual/libintl" RDEPENDS:${PN} += "${PN}-common ${PN}-tools" RDEPENDS:${PN}:class-native = "" -inherit useradd update-rc.d +inherit systemd useradd update-rc.d INITSCRIPT_NAME = "dbus-1" INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." -python __anonymous() { - if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): - d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") -} - PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools" USERADD_PACKAGES = "dbus-common" @@ -103,10 +98,10 @@ FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadi RDEPENDS:${PN}-ptest += "bash make dbus" -PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" pkg_postinst:dbus() { - # If both systemd and sysvinit are enabled, mask the dbus-1 init script - if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then + # If both systemd and sysvinit are enabled, mask the dbus-1 init script as systemd + # doesn't know that it matches dbus.service. + if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then if [ -n "$D" ]; then OPTS="--root=$D" fi @@ -139,15 +134,6 @@ do_install:append:class-target() { > ${D}${sysconfdir}/default/volatiles/99_dbus fi - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \ - install -d ${D}${systemd_system_unitdir}/$i; done - install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/ - ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket - ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket - ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service - fi - mkdir -p ${D}${localstatedir}/lib/dbus chown messagebus:messagebus ${D}${localstatedir}/lib/dbus From patchwork Fri Aug 1 20:49:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF11CC87FCB for ; Fri, 1 Aug 2025 20:49:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.98313.1754081396059122972 for ; Fri, 01 Aug 2025 13:49:56 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 878081516 for ; Fri, 1 Aug 2025 13:49:47 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2FA603F673 for ; Fri, 1 Aug 2025 13:49:55 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 5/5] dbus: add message-bus PACKAGECONFIG Date: Fri, 1 Aug 2025 21:49:28 +0100 Message-ID: <20250801204928.2580529-5-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250801204928.2580529-1-ross.burton@arm.com> References: <20250801204928.2580529-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 01 Aug 2025 20:49:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221376 There's no need to build an actual message bus in native or nativesdk environments, as if DBus is needed in those environments then it will be used to connect to the existing session or system bus. Add a PACKAGECONFIG for the message bus, and wrap the packaging logic with a PACKAGECONFIG check. Expat is only needed by the bus, so this reduces the mandatory build dependencies in the native case. Signed-off-by: Ross Burton --- meta/recipes-core/dbus/dbus_1.16.2.bb | 49 +++++++++++++++------------ 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/meta/recipes-core/dbus/dbus_1.16.2.bb b/meta/recipes-core/dbus/dbus_1.16.2.bb index 5de6ba66bc7..ce1cbd856e8 100644 --- a/meta/recipes-core/dbus/dbus_1.16.2.bb +++ b/meta/recipes-core/dbus/dbus_1.16.2.bb @@ -27,12 +27,13 @@ EXTRA_OEMESON = "-Dxml_docs=disabled \ " PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ - traditional-activation user-session \ + message-bus traditional-activation user-session \ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ " PACKAGECONFIG:class-native = "" PACKAGECONFIG:class-nativesdk = "" +PACKAGECONFIG[message-bus] = "-Dmessage_bus=true,-Dmessage_bus=false,expat" PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd_system_unitdir=${systemd_system_unitdir},-Dsystemd=disabled,systemd" PACKAGECONFIG[x11] = "-Dx11_autolaunch=enabled,-Dx11_autolaunch=disabled, virtual/libx11 libsm" PACKAGECONFIG[traditional-activation] = "-Dtraditional_activation=true,-Dtraditional_activation=false" @@ -42,7 +43,7 @@ PACKAGECONFIG[audit] = "-Dlibaudit=enabled,-Dlibaudit=disabled,audit" PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" PACKAGECONFIG[tests] = "-Dmodular_tests=enabled -Dinstalled_tests=true,-Dmodular_tests=disabled -Dinstalled_tests=false,glib-2.0" -DEPENDS = "expat virtual/libintl" +DEPENDS = "virtual/libintl" RDEPENDS:${PN} += "${PN}-common ${PN}-tools" RDEPENDS:${PN}:class-native = "" @@ -99,17 +100,19 @@ FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadi RDEPENDS:${PN}-ptest += "bash make dbus" pkg_postinst:dbus() { - # If both systemd and sysvinit are enabled, mask the dbus-1 init script as systemd - # doesn't know that it matches dbus.service. - if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then - if [ -n "$D" ]; then - OPTS="--root=$D" + if ${@bb.utils.contains('PACKAGECONFIG', 'message-bus', 'true', 'false', d)}; then + # If both systemd and sysvinit are enabled, mask the dbus-1 init script as systemd + # doesn't know that it matches dbus.service. + if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + systemctl $OPTS mask dbus-1.service fi - systemctl $OPTS mask dbus-1.service - fi - if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then - /etc/init.d/populate-volatile.sh update + if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then + /etc/init.d/populate-volatile.sh update + fi fi } @@ -125,19 +128,21 @@ EOF } do_install:append:class-target() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/init.d - sed 's:@bindir@:${bindir}:' < ${UNPACKDIR}/dbus-1.init > ${S}/dbus-1.init.sh - install -m 0755 ${S}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 - install -d ${D}${sysconfdir}/default/volatiles - echo "d messagebus messagebus 0755 /run/dbus none" \ - > ${D}${sysconfdir}/default/volatiles/99_dbus + if ${@bb.utils.contains('PACKAGECONFIG', 'message-bus', 'true', 'false', d)}; then + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + sed 's:@bindir@:${bindir}:' < ${UNPACKDIR}/dbus-1.init > ${S}/dbus-1.init.sh + install -m 0755 ${S}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 + install -d ${D}${sysconfdir}/default/volatiles + echo "d messagebus messagebus 0755 /run/dbus none" \ + > ${D}${sysconfdir}/default/volatiles/99_dbus + fi + + mkdir -p ${D}${localstatedir}/lib/dbus + + chown messagebus:messagebus ${D}${localstatedir}/lib/dbus fi - mkdir -p ${D}${localstatedir}/lib/dbus - - chown messagebus:messagebus ${D}${localstatedir}/lib/dbus - if [ "${@bb.utils.contains('PACKAGECONFIG', 'traditional-activation', '1', '0', d)}" = "1" ] then chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper