public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] dbus: split -common and -tools out of main package
@ 2020-11-02 18:05 Luca Bocassi
  2020-11-02 19:18 ` [PATCH v2] " Luca Bocassi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Luca Bocassi @ 2020-11-02 18:05 UTC (permalink / raw)
  To: openembedded-core

From: Luca Boccassi <luca.boccassi@microsoft.com>

Certain config files and units are shared between dbus-daemon and
dbus-broker (available in meta-openembedded), so split them out to
allow installing dbus-broker without pulling in dbus-daemon and its
dependencies.
Stand-alone command line tools can also be used regardless of whether
the buses are provided by dbus-daemon or dbus-broker, so split them
out into dbus-tools.
Finally, move the XML schema files out of the main package and into
the development package.

All these changes follow the same pattern used by Fedora, which was
one of the first distro to switch to dbus-broker by default:

https://src.fedoraproject.org/rpms/dbus/blob/master/f/dbus.spec

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
 meta/recipes-core/dbus/dbus_1.12.20.bb | 39 +++++++++++++++-----------
 1 file changed, 23 insertions(+), 16 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus_1.12.20.bb b/meta/recipes-core/dbus/dbus_1.12.20.bb
index cf6f7dc0ef..f0b44207d6 100644
--- a/meta/recipes-core/dbus/dbus_1.12.20.bb
+++ b/meta/recipes-core/dbus/dbus_1.12.20.bb
@@ -11,6 +11,7 @@ RDEPENDS_dbus_class-nativesdk = ""
 PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
 ALLOW_EMPTY_dbus-ptest = "1"
 RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+RDEPENDS_${PN} += "${PN}-common ${PN}-tools"
 
 inherit useradd update-rc.d
 
@@ -31,7 +32,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib"
+PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools"
 
 OLDPKGNAME = "dbus-x11"
 OLDPKGNAME_class-nativesdk = ""
@@ -41,31 +42,37 @@ RPROVIDES_${PN} = "${OLDPKGNAME}"
 RREPLACES_${PN} += "${OLDPKGNAME}"
 
 FILES_${PN} = "${bindir}/dbus-daemon* \
-               ${bindir}/dbus-uuidgen \
                ${bindir}/dbus-cleanup-sockets \
-               ${bindir}/dbus-send \
-               ${bindir}/dbus-monitor \
                ${bindir}/dbus-launch \
                ${bindir}/dbus-run-session \
-               ${bindir}/dbus-update-activation-environment \
                ${libexecdir}/dbus* \
                ${sysconfdir} \
                ${localstatedir} \
-               ${datadir}/dbus-1/services \
-               ${datadir}/dbus-1/system-services \
-               ${datadir}/dbus-1/session.d \
-               ${datadir}/dbus-1/session.conf \
-               ${datadir}/dbus-1/system.d \
-               ${datadir}/dbus-1/system.conf \
-               ${datadir}/xml/dbus-1 \
-               ${systemd_system_unitdir} \
-               ${systemd_user_unitdir} \
-               ${nonarch_libdir}/sysusers.d/dbus.conf \
+               ${systemd_system_unitdir}/dbus.service \
+               ${systemd_user_unitdir}/dbus.service \
                ${nonarch_libdir}/tmpfiles.d/dbus.conf \
 "
+FILES_${PN}-common = "${sysconfdir}/dbus-1 \
+                      ${datadir}/dbus-1/services \
+                      ${datadir}/dbus-1/system-services \
+                      ${datadir}/dbus-1/session.d \
+                      ${datadir}/dbus-1/session.conf \
+                      ${datadir}/dbus-1/system.d \
+                      ${datadir}/dbus-1/system.conf \
+                      ${systemd_system_unitdir}/dbus.socket \
+                      ${systemd_system_unitdir}/sockets.target.wants \
+                      ${systemd_user_unitdir}/dbus.socket \
+                      ${systemd_user_unitdir}/sockets.target.wants \
+                      ${nonarch_libdir}/sysusers.d/dbus.conf \
+"
+FILES_${PN}-tools = "${bindir}/dbus-uuidgen \
+                     ${bindir}/dbus-send \
+                     ${bindir}/dbus-monitor \
+                     ${bindir}/dbus-update-activation-environment \
+"
 FILES_${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1"
 
 PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
 pkg_postinst_dbus() {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2] dbus: split -common and -tools out of main package
  2020-11-02 18:05 [PATCH] dbus: split -common and -tools out of main package Luca Bocassi
@ 2020-11-02 19:18 ` Luca Bocassi
  2020-11-11 10:32   ` Luca Boccassi
  2020-11-12 17:29   ` [OE-core] " Richard Purdie
  2020-11-13 10:47 ` [PATCH v3] " Luca Bocassi
  2020-11-13 14:50 ` [PATCH v4] " Luca Bocassi
  2 siblings, 2 replies; 9+ messages in thread
From: Luca Bocassi @ 2020-11-02 19:18 UTC (permalink / raw)
  To: openembedded-core

From: Luca Boccassi <luca.boccassi@microsoft.com>

Certain config files and units are shared between dbus-daemon and
dbus-broker (available in meta-openembedded), so split them out to
allow installing dbus-broker without pulling in dbus-daemon and its
dependencies.
Stand-alone command line tools can also be used regardless of whether
the buses are provided by dbus-daemon or dbus-broker, so split them
out into dbus-tools.
Finally, move the XML schema files out of the main package and into
the development package.

All these changes follow the same pattern used by Fedora, which was
one of the first distro to switch to dbus-broker by default:

https://src.fedoraproject.org/rpms/dbus/blob/master/f/dbus.spec

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
v2: fix FILES_ regex to correctly include all units but the sockets
    in the main package

 meta/recipes-core/dbus/dbus_1.12.20.bb | 35 +++++++++++++++-----------
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus_1.12.20.bb b/meta/recipes-core/dbus/dbus_1.12.20.bb
index cf6f7dc0ef..400c7a1401 100644
--- a/meta/recipes-core/dbus/dbus_1.12.20.bb
+++ b/meta/recipes-core/dbus/dbus_1.12.20.bb
@@ -11,6 +11,7 @@ RDEPENDS_dbus_class-nativesdk = ""
 PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
 ALLOW_EMPTY_dbus-ptest = "1"
 RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+RDEPENDS_${PN} += "${PN}-common ${PN}-tools"
 
 inherit useradd update-rc.d
 
@@ -31,7 +32,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib"
+PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools"
 
 OLDPKGNAME = "dbus-x11"
 OLDPKGNAME_class-nativesdk = ""
@@ -41,31 +42,37 @@ RPROVIDES_${PN} = "${OLDPKGNAME}"
 RREPLACES_${PN} += "${OLDPKGNAME}"
 
 FILES_${PN} = "${bindir}/dbus-daemon* \
-               ${bindir}/dbus-uuidgen \
                ${bindir}/dbus-cleanup-sockets \
-               ${bindir}/dbus-send \
-               ${bindir}/dbus-monitor \
                ${bindir}/dbus-launch \
                ${bindir}/dbus-run-session \
-               ${bindir}/dbus-update-activation-environment \
                ${libexecdir}/dbus* \
                ${sysconfdir} \
                ${localstatedir} \
-               ${datadir}/dbus-1/services \
-               ${datadir}/dbus-1/system-services \
-               ${datadir}/dbus-1/session.d \
-               ${datadir}/dbus-1/session.conf \
-               ${datadir}/dbus-1/system.d \
-               ${datadir}/dbus-1/system.conf \
-               ${datadir}/xml/dbus-1 \
                ${systemd_system_unitdir} \
                ${systemd_user_unitdir} \
-               ${nonarch_libdir}/sysusers.d/dbus.conf \
                ${nonarch_libdir}/tmpfiles.d/dbus.conf \
 "
+FILES_${PN}-common = "${sysconfdir}/dbus-1 \
+                      ${datadir}/dbus-1/services \
+                      ${datadir}/dbus-1/system-services \
+                      ${datadir}/dbus-1/session.d \
+                      ${datadir}/dbus-1/session.conf \
+                      ${datadir}/dbus-1/system.d \
+                      ${datadir}/dbus-1/system.conf \
+                      ${systemd_system_unitdir}/dbus.socket \
+                      ${systemd_system_unitdir}/sockets.target.wants \
+                      ${systemd_user_unitdir}/dbus.socket \
+                      ${systemd_user_unitdir}/sockets.target.wants \
+                      ${nonarch_libdir}/sysusers.d/dbus.conf \
+"
+FILES_${PN}-tools = "${bindir}/dbus-uuidgen \
+                     ${bindir}/dbus-send \
+                     ${bindir}/dbus-monitor \
+                     ${bindir}/dbus-update-activation-environment \
+"
 FILES_${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1"
 
 PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
 pkg_postinst_dbus() {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] dbus: split -common and -tools out of main package
  2020-11-02 19:18 ` [PATCH v2] " Luca Bocassi
@ 2020-11-11 10:32   ` Luca Boccassi
  2020-11-12 17:29   ` [OE-core] " Richard Purdie
  1 sibling, 0 replies; 9+ messages in thread
From: Luca Boccassi @ 2020-11-11 10:32 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

On Mon, 2020-11-02 at 19:18 +0000, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> Certain config files and units are shared between dbus-daemon and
> dbus-broker (available in meta-openembedded), so split them out to
> allow installing dbus-broker without pulling in dbus-daemon and its
> dependencies.
> Stand-alone command line tools can also be used regardless of whether
> the buses are provided by dbus-daemon or dbus-broker, so split them
> out into dbus-tools.
> Finally, move the XML schema files out of the main package and into
> the development package.
> 
> All these changes follow the same pattern used by Fedora, which was
> one of the first distro to switch to dbus-broker by default:
> 
> https://src.fedoraproject.org/rpms/dbus/blob/master/f/dbus.spec
> 
> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> ---
> v2: fix FILES_ regex to correctly include all units but the sockets
>     in the main package
> 
>  meta/recipes-core/dbus/dbus_1.12.20.bb | 35 +++++++++++++++-----------
>  1 file changed, 21 insertions(+), 14 deletions(-)
> 
> diff --git a/meta/recipes-core/dbus/dbus_1.12.20.bb b/meta/recipes-core/dbus/dbus_1.12.20.bb
> index cf6f7dc0ef..400c7a1401 100644
> --- a/meta/recipes-core/dbus/dbus_1.12.20.bb
> +++ b/meta/recipes-core/dbus/dbus_1.12.20.bb
> @@ -11,6 +11,7 @@ RDEPENDS_dbus_class-nativesdk = ""
>  PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
>  ALLOW_EMPTY_dbus-ptest = "1"
>  RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
> +RDEPENDS_${PN} += "${PN}-common ${PN}-tools"
>  
>  inherit useradd update-rc.d
>  
> @@ -31,7 +32,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
>  
>  DEBIANNAME_${PN} = "dbus-1"
>  
> -PACKAGES =+ "${PN}-lib"
> +PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools"
>  
>  OLDPKGNAME = "dbus-x11"
>  OLDPKGNAME_class-nativesdk = ""
> @@ -41,31 +42,37 @@ RPROVIDES_${PN} = "${OLDPKGNAME}"
>  RREPLACES_${PN} += "${OLDPKGNAME}"
>  
>  FILES_${PN} = "${bindir}/dbus-daemon* \
> -               ${bindir}/dbus-uuidgen \
>                 ${bindir}/dbus-cleanup-sockets \
> -               ${bindir}/dbus-send \
> -               ${bindir}/dbus-monitor \
>                 ${bindir}/dbus-launch \
>                 ${bindir}/dbus-run-session \
> -               ${bindir}/dbus-update-activation-environment \
>                 ${libexecdir}/dbus* \
>                 ${sysconfdir} \
>                 ${localstatedir} \
> -               ${datadir}/dbus-1/services \
> -               ${datadir}/dbus-1/system-services \
> -               ${datadir}/dbus-1/session.d \
> -               ${datadir}/dbus-1/session.conf \
> -               ${datadir}/dbus-1/system.d \
> -               ${datadir}/dbus-1/system.conf \
> -               ${datadir}/xml/dbus-1 \
>                 ${systemd_system_unitdir} \
>                 ${systemd_user_unitdir} \
> -               ${nonarch_libdir}/sysusers.d/dbus.conf \
>                 ${nonarch_libdir}/tmpfiles.d/dbus.conf \
>  "
> +FILES_${PN}-common = "${sysconfdir}/dbus-1 \
> +                      ${datadir}/dbus-1/services \
> +                      ${datadir}/dbus-1/system-services \
> +                      ${datadir}/dbus-1/session.d \
> +                      ${datadir}/dbus-1/session.conf \
> +                      ${datadir}/dbus-1/system.d \
> +                      ${datadir}/dbus-1/system.conf \
> +                      ${systemd_system_unitdir}/dbus.socket \
> +                      ${systemd_system_unitdir}/sockets.target.wants \
> +                      ${systemd_user_unitdir}/dbus.socket \
> +                      ${systemd_user_unitdir}/sockets.target.wants \
> +                      ${nonarch_libdir}/sysusers.d/dbus.conf \
> +"
> +FILES_${PN}-tools = "${bindir}/dbus-uuidgen \
> +                     ${bindir}/dbus-send \
> +                     ${bindir}/dbus-monitor \
> +                     ${bindir}/dbus-update-activation-environment \
> +"
>  FILES_${PN}-lib = "${libdir}/lib*.so.*"
>  RRECOMMENDS_${PN}-lib = "${PN}"
> -FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool"
> +FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1"
>  
>  PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
>  pkg_postinst_dbus() {

Ping. Any chance for a review? Thanks.

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH v2] dbus: split -common and -tools out of main package
  2020-11-02 19:18 ` [PATCH v2] " Luca Bocassi
  2020-11-11 10:32   ` Luca Boccassi
@ 2020-11-12 17:29   ` Richard Purdie
  2020-11-12 17:53     ` Luca Boccassi
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2020-11-12 17:29 UTC (permalink / raw)
  To: Luca Bocassi, openembedded-core; +Cc: Ross Burton

On Mon, 2020-11-02 at 19:18 +0000, Luca Bocassi wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> Certain config files and units are shared between dbus-daemon and
> dbus-broker (available in meta-openembedded), so split them out to
> allow installing dbus-broker without pulling in dbus-daemon and its
> dependencies.
> Stand-alone command line tools can also be used regardless of whether
> the buses are provided by dbus-daemon or dbus-broker, so split them
> out into dbus-tools.
> Finally, move the XML schema files out of the main package and into
> the development package.
> 
> All these changes follow the same pattern used by Fedora, which was
> one of the first distro to switch to dbus-broker by default:
> 
> https://src.fedoraproject.org/rpms/dbus/blob/master/f/dbus.spec
> 
> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> ---
> v2: fix FILES_ regex to correctly include all units but the sockets
>     in the main package

I tried putting this through testing on the autobuilder but it fails in
world builds:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1589/steps/13/logs/stdio

(dbus-native seems to depend upon dbus-native-tools-native)

so I've had to drop the patch.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH v2] dbus: split -common and -tools out of main package
  2020-11-12 17:29   ` [OE-core] " Richard Purdie
@ 2020-11-12 17:53     ` Luca Boccassi
  0 siblings, 0 replies; 9+ messages in thread
From: Luca Boccassi @ 2020-11-12 17:53 UTC (permalink / raw)
  To: richard.purdie@linuxfoundation.org,
	openembedded-core@lists.openembedded.org
  Cc: ross.burton@arm.com

On Thu, 2020-11-12 at 17:29 +0000, Richard Purdie wrote:
> On Mon, 2020-11-02 at 19:18 +0000, Luca Bocassi wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > Certain config files and units are shared between dbus-daemon and
> > dbus-broker (available in meta-openembedded), so split them out to
> > allow installing dbus-broker without pulling in dbus-daemon and its
> > dependencies.
> > Stand-alone command line tools can also be used regardless of whether
> > the buses are provided by dbus-daemon or dbus-broker, so split them
> > out into dbus-tools.
> > Finally, move the XML schema files out of the main package and into
> > the development package.
> > 
> > All these changes follow the same pattern used by Fedora, which was
> > one of the first distro to switch to dbus-broker by default:
> > 
> > https://src.fedoraproject.org/rpms/dbus/blob/master/f/dbus.spec
> > 
> > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > ---
> > v2: fix FILES_ regex to correctly include all units but the sockets
> >     in the main package
> 
> I tried putting this through testing on the autobuilder but it fails in
> world builds:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1589/steps/13/logs/stdio
> 
> (dbus-native seems to depend upon dbus-native-tools-native)
> 
> so I've had to drop the patch.
> 
> Cheers,
> 
> Richard

Hi,

That's a weird error? Building the basic poky reference didn't show it.

Any suggestion on how to fix it? Do you see anything obviously wrong
with the patch? Is this the correct way to add a runtime dependency in
Yocto:

RDEPENDS_${PN} += "${PN}-common ${PN}-tools"

Should it hard-code the name and drop the ${PN} perhaps?

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3] dbus: split -common and -tools out of main package
  2020-11-02 18:05 [PATCH] dbus: split -common and -tools out of main package Luca Bocassi
  2020-11-02 19:18 ` [PATCH v2] " Luca Bocassi
@ 2020-11-13 10:47 ` Luca Bocassi
  2020-11-13 14:34   ` Richard Purdie
  2020-11-13 14:50 ` [PATCH v4] " Luca Bocassi
  2 siblings, 1 reply; 9+ messages in thread
From: Luca Bocassi @ 2020-11-13 10:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie

From: Luca Boccassi <luca.boccassi@microsoft.com>

Certain config files and units are shared between dbus-daemon and
dbus-broker (available in meta-openembedded), so split them out to
allow installing dbus-broker without pulling in dbus-daemon and its
dependencies.
Stand-alone command line tools can also be used regardless of whether
the buses are provided by dbus-daemon or dbus-broker, so split them
out into dbus-tools.
Finally, move the XML schema files out of the main package and into
the development package.

All these changes follow the same pattern used by Fedora, which was
one of the first distro to switch to dbus-broker by default:

https://src.fedoraproject.org/rpms/dbus/blob/master/f/dbus.spec

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
v2: fix FILES_ regex to correctly include all units but the sockets
    in the main package
v3: do not use ${PN} in RDEPENDS, as bitbake expansion is broken and
    generates wrong values (eg: dbus-native-common-native)

 meta/recipes-core/dbus/dbus_1.12.20.bb | 35 +++++++++++++++-----------
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus_1.12.20.bb b/meta/recipes-core/dbus/dbus_1.12.20.bb
index cf6f7dc0ef..16342fc6f2 100644
--- a/meta/recipes-core/dbus/dbus_1.12.20.bb
+++ b/meta/recipes-core/dbus/dbus_1.12.20.bb
@@ -11,6 +11,7 @@ RDEPENDS_dbus_class-nativesdk = ""
 PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
 ALLOW_EMPTY_dbus-ptest = "1"
 RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+RDEPENDS_${PN} += "dbus-common dbus-tools"
 
 inherit useradd update-rc.d
 
@@ -31,7 +32,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib"
+PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools"
 
 OLDPKGNAME = "dbus-x11"
 OLDPKGNAME_class-nativesdk = ""
@@ -41,31 +42,37 @@ RPROVIDES_${PN} = "${OLDPKGNAME}"
 RREPLACES_${PN} += "${OLDPKGNAME}"
 
 FILES_${PN} = "${bindir}/dbus-daemon* \
-               ${bindir}/dbus-uuidgen \
                ${bindir}/dbus-cleanup-sockets \
-               ${bindir}/dbus-send \
-               ${bindir}/dbus-monitor \
                ${bindir}/dbus-launch \
                ${bindir}/dbus-run-session \
-               ${bindir}/dbus-update-activation-environment \
                ${libexecdir}/dbus* \
                ${sysconfdir} \
                ${localstatedir} \
-               ${datadir}/dbus-1/services \
-               ${datadir}/dbus-1/system-services \
-               ${datadir}/dbus-1/session.d \
-               ${datadir}/dbus-1/session.conf \
-               ${datadir}/dbus-1/system.d \
-               ${datadir}/dbus-1/system.conf \
-               ${datadir}/xml/dbus-1 \
                ${systemd_system_unitdir} \
                ${systemd_user_unitdir} \
-               ${nonarch_libdir}/sysusers.d/dbus.conf \
                ${nonarch_libdir}/tmpfiles.d/dbus.conf \
 "
+FILES_${PN}-common = "${sysconfdir}/dbus-1 \
+                      ${datadir}/dbus-1/services \
+                      ${datadir}/dbus-1/system-services \
+                      ${datadir}/dbus-1/session.d \
+                      ${datadir}/dbus-1/session.conf \
+                      ${datadir}/dbus-1/system.d \
+                      ${datadir}/dbus-1/system.conf \
+                      ${systemd_system_unitdir}/dbus.socket \
+                      ${systemd_system_unitdir}/sockets.target.wants \
+                      ${systemd_user_unitdir}/dbus.socket \
+                      ${systemd_user_unitdir}/sockets.target.wants \
+                      ${nonarch_libdir}/sysusers.d/dbus.conf \
+"
+FILES_${PN}-tools = "${bindir}/dbus-uuidgen \
+                     ${bindir}/dbus-send \
+                     ${bindir}/dbus-monitor \
+                     ${bindir}/dbus-update-activation-environment \
+"
 FILES_${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1"
 
 PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
 pkg_postinst_dbus() {
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] dbus: split -common and -tools out of main package
  2020-11-13 10:47 ` [PATCH v3] " Luca Bocassi
@ 2020-11-13 14:34   ` Richard Purdie
  2020-11-13 14:50     ` Luca Bocassi
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2020-11-13 14:34 UTC (permalink / raw)
  To: luca.boccassi, openembedded-core

On Fri, 2020-11-13 at 10:47 +0000, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> Certain config files and units are shared between dbus-daemon and
> dbus-broker (available in meta-openembedded), so split them out to
> allow installing dbus-broker without pulling in dbus-daemon and its
> dependencies.
> Stand-alone command line tools can also be used regardless of whether
> the buses are provided by dbus-daemon or dbus-broker, so split them
> out into dbus-tools.
> Finally, move the XML schema files out of the main package and into
> the development package.
> 
> All these changes follow the same pattern used by Fedora, which was
> one of the first distro to switch to dbus-broker by default:
> 
> https://src.fedoraproject.org/rpms/dbus/blob/master/f/dbus.spec
> 
> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> ---
> v2: fix FILES_ regex to correctly include all units but the sockets
>     in the main package
> v3: do not use ${PN} in RDEPENDS, as bitbake expansion is broken and
>     generates wrong values (eg: dbus-native-common-native)

Without testing I can tell this will break multilib.

RDEPENDS and native are a little confusing and tricky, basically due to
legacy. This is why you'll see RDEPENDS_${PN}_class-native = "" and
that is probably what is needed here.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v4] dbus: split -common and -tools out of main package
  2020-11-02 18:05 [PATCH] dbus: split -common and -tools out of main package Luca Bocassi
  2020-11-02 19:18 ` [PATCH v2] " Luca Bocassi
  2020-11-13 10:47 ` [PATCH v3] " Luca Bocassi
@ 2020-11-13 14:50 ` Luca Bocassi
  2 siblings, 0 replies; 9+ messages in thread
From: Luca Bocassi @ 2020-11-13 14:50 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie

From: Luca Boccassi <luca.boccassi@microsoft.com>

Certain config files and units are shared between dbus-daemon and
dbus-broker (available in meta-openembedded), so split them out to
allow installing dbus-broker without pulling in dbus-daemon and its
dependencies.
Stand-alone command line tools can also be used regardless of whether
the buses are provided by dbus-daemon or dbus-broker, so split them
out into dbus-tools.
Finally, move the XML schema files out of the main package and into
the development package.

All these changes follow the same pattern used by Fedora, which was
one of the first distro to switch to dbus-broker by default:

https://src.fedoraproject.org/rpms/dbus/blob/master/f/dbus.spec

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
v2: fix FILES_ regex to correctly include all units but the sockets
    in the main package
v3: do not use ${PN} in RDEPENDS, as bitbake expansion is broken and
    generates wrong values (eg: dbus-native-common-native)
v4: use ${PN} again in RDEPENDS, and instead set RDEPENDS_${PN}_class-native
    to empty string as suggested

 meta/recipes-core/dbus/dbus_1.12.20.bb | 36 ++++++++++++++++----------
 1 file changed, 22 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus_1.12.20.bb b/meta/recipes-core/dbus/dbus_1.12.20.bb
index cf6f7dc0ef..4040fdb22a 100644
--- a/meta/recipes-core/dbus/dbus_1.12.20.bb
+++ b/meta/recipes-core/dbus/dbus_1.12.20.bb
@@ -11,6 +11,8 @@ RDEPENDS_dbus_class-nativesdk = ""
 PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
 ALLOW_EMPTY_dbus-ptest = "1"
 RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+RDEPENDS_${PN} += "${PN}-common ${PN}-tools"
+RDEPENDS_${PN}_class-native = ""
 
 inherit useradd update-rc.d
 
@@ -31,7 +33,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
 
 DEBIANNAME_${PN} = "dbus-1"
 
-PACKAGES =+ "${PN}-lib"
+PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools"
 
 OLDPKGNAME = "dbus-x11"
 OLDPKGNAME_class-nativesdk = ""
@@ -41,31 +43,37 @@ RPROVIDES_${PN} = "${OLDPKGNAME}"
 RREPLACES_${PN} += "${OLDPKGNAME}"
 
 FILES_${PN} = "${bindir}/dbus-daemon* \
-               ${bindir}/dbus-uuidgen \
                ${bindir}/dbus-cleanup-sockets \
-               ${bindir}/dbus-send \
-               ${bindir}/dbus-monitor \
                ${bindir}/dbus-launch \
                ${bindir}/dbus-run-session \
-               ${bindir}/dbus-update-activation-environment \
                ${libexecdir}/dbus* \
                ${sysconfdir} \
                ${localstatedir} \
-               ${datadir}/dbus-1/services \
-               ${datadir}/dbus-1/system-services \
-               ${datadir}/dbus-1/session.d \
-               ${datadir}/dbus-1/session.conf \
-               ${datadir}/dbus-1/system.d \
-               ${datadir}/dbus-1/system.conf \
-               ${datadir}/xml/dbus-1 \
                ${systemd_system_unitdir} \
                ${systemd_user_unitdir} \
-               ${nonarch_libdir}/sysusers.d/dbus.conf \
                ${nonarch_libdir}/tmpfiles.d/dbus.conf \
 "
+FILES_${PN}-common = "${sysconfdir}/dbus-1 \
+                      ${datadir}/dbus-1/services \
+                      ${datadir}/dbus-1/system-services \
+                      ${datadir}/dbus-1/session.d \
+                      ${datadir}/dbus-1/session.conf \
+                      ${datadir}/dbus-1/system.d \
+                      ${datadir}/dbus-1/system.conf \
+                      ${systemd_system_unitdir}/dbus.socket \
+                      ${systemd_system_unitdir}/sockets.target.wants \
+                      ${systemd_user_unitdir}/dbus.socket \
+                      ${systemd_user_unitdir}/sockets.target.wants \
+                      ${nonarch_libdir}/sysusers.d/dbus.conf \
+"
+FILES_${PN}-tools = "${bindir}/dbus-uuidgen \
+                     ${bindir}/dbus-send \
+                     ${bindir}/dbus-monitor \
+                     ${bindir}/dbus-update-activation-environment \
+"
 FILES_${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${libdir}/cmake/DBus1 ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1"
 
 PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
 pkg_postinst_dbus() {
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] dbus: split -common and -tools out of main package
  2020-11-13 14:34   ` Richard Purdie
@ 2020-11-13 14:50     ` Luca Bocassi
  0 siblings, 0 replies; 9+ messages in thread
From: Luca Bocassi @ 2020-11-13 14:50 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

On Fri, 2020-11-13 at 14:34 +0000, Richard Purdie wrote:
> On Fri, 2020-11-13 at 10:47 +0000, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > Certain config files and units are shared between dbus-daemon and
> > dbus-broker (available in meta-openembedded), so split them out to
> > allow installing dbus-broker without pulling in dbus-daemon and its
> > dependencies.
> > Stand-alone command line tools can also be used regardless of whether
> > the buses are provided by dbus-daemon or dbus-broker, so split them
> > out into dbus-tools.
> > Finally, move the XML schema files out of the main package and into
> > the development package.
> > 
> > All these changes follow the same pattern used by Fedora, which was
> > one of the first distro to switch to dbus-broker by default:
> > 
> > https://src.fedoraproject.org/rpms/dbus/blob/master/f/dbus.spec
> > 
> > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > ---
> > v2: fix FILES_ regex to correctly include all units but the sockets
> >     in the main package
> > v3: do not use ${PN} in RDEPENDS, as bitbake expansion is broken and
> >     generates wrong values (eg: dbus-native-common-native)
> 
> Without testing I can tell this will break multilib.
> 
> RDEPENDS and native are a little confusing and tricky, basically due to
> legacy. This is why you'll see RDEPENDS_${PN}_class-native = "" and
> that is probably what is needed here.
> 
> Cheers,
> 
> Richard

Ok, sent a v4, even though I really do not follow - there's already
this in the recipe:

RDEPENDS_dbus_class-native = ""

Also won't that mean that for native builds there's no dependency, thus
breaking the dbus package (the required conf is no longer installed)?

-- 
Kind regards,
Luca Boccassi


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-11-13 14:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-02 18:05 [PATCH] dbus: split -common and -tools out of main package Luca Bocassi
2020-11-02 19:18 ` [PATCH v2] " Luca Bocassi
2020-11-11 10:32   ` Luca Boccassi
2020-11-12 17:29   ` [OE-core] " Richard Purdie
2020-11-12 17:53     ` Luca Boccassi
2020-11-13 10:47 ` [PATCH v3] " Luca Bocassi
2020-11-13 14:34   ` Richard Purdie
2020-11-13 14:50     ` Luca Bocassi
2020-11-13 14:50 ` [PATCH v4] " Luca Bocassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox