Bug 2261 - dbus-launch should be included in main dbus package
Summary: dbus-launch should be included in main dbus package
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.3 M3
Assignee: Radu Moisan
QA Contact:
URL:
Whiteboard: http://git.yoctoproject.org/cgit/cgit...
Depends on:
Blocks:
 
Reported: 2012-04-08 16:04 UTC by tf
Modified: 2012-09-25 11:29 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tf 2012-04-08 16:04:44 UTC
The dbus recipe packages the dbus-launch into a dbus-x11 package, which is only created if the distro feature 'x11' is selected. I think this is left over from some older version of dbus, AFAICT, in 1.4 dbus-launch does not require x11, only its autolaunch feature does, which is not enabled when building without x11 (and can be explicitly disabled with --disable-x11-autolaunch ).
Comment 1 Shane Wang 2012-04-12 17:29:51 UTC
Saul, can you have another guy to help to look at this? Many many thanks.
Comment 2 Dongxiao Xu 2012-04-16 08:33:55 UTC
We did have a commit 8dc48993f33a3f656a8f980f5c0c048b47bce9cf that splits dbus-launch from the main dbus package.

In current dbus configuration, we don't add the parameter "--disable-x11-autolaunch", therefore dbus-launch should still depends on X, right?

If this is correct, we couldn't make the dbus package RDEPENDS on libx11 package, otherwise, dbus will be un-usable in Non-X environment.
Comment 3 tf 2012-04-16 14:39:50 UTC
(In reply to comment #2)
> In current dbus configuration, we don't add the parameter
> "--disable-x11-autolaunch", therefore dbus-launch should still depends on X,
> right?

I do not think this is necessary; AFAIK, the x11-autolaunch feature of dbus-launch is configured automatically (by the configure script) based on whether X is available or not.

> If this is correct, we couldn't make the dbus package RDEPENDS on libx11
> package, otherwise, dbus will be un-usable in Non-X environment.

With dbus-launch in dbux-x11, dbus is not very usable on non-X image either, because you can't start a dbus session without dbus-launch. If it is not feasible to include dbus-launch in the main package, then perhaps there needs to be dbus-nox package that includes dbus-launch built without the X dependency?
Comment 4 Ross Burton 2012-04-16 15:22:33 UTC
Here's my suggestion:

1) remove the --with-x/--without-x configure arguments. If you want to force no-discovery for native builds the correct argument is --disable-x11-autolaunch.  This ensures that DBus looks at the build environment to determine whether to enable X11 bus discovery or not.

2) make the virtual/libx11 DEPENDS conditional based on the x11 distro feature.  This makes the build dependencies reflect the feature list.

3) remove dbus-x11, meaning that dbus-launch with its potential X11 dependency is now back in dbus where is belongs.

4) Potentially make dbus provide dbus-x11, for compatibility.
Comment 5 Dongxiao Xu 2012-04-18 05:42:48 UTC
What about moving this bug to 1.3 cycle? I think it doesn't impact current functionality severely.
Comment 6 Radu Moisan 2012-07-25 13:52:43 UTC
submitted patch, waiting for review.
Comment 7 Radu Moisan 2012-08-14 06:10:21 UTC
merged into master.
Comment 8 Stoicescu Cornel 2012-09-24 15:55:07 UTC
     Bitbaked a core-image-base on latest master commit (e1c1ee19e04eca1ffd09b49104a7b49e89c74d12); dbus-launch is present and seems to work, showing DBUS_SESSION_BUS_ADDRESS and DBUS_SESSION_BUS_PID when executed from shell with no argument. 

     As described, this is a non-x11 build. Does this test suffice in order to set this ti Verified?
Comment 9 Ross Burton 2012-09-24 16:00:43 UTC
The test case for this is that the binary "dbus-launch" is in the dbus package, and not the dbus-x11 package.

(the huge debate around when and how to enable/disable x11 was a side-issue)
Comment 10 Stoicescu Cornel 2012-09-25 11:29:10 UTC
      I see the required changes made to the dbus recipe: 

OLDPKGNAME = "dbus-x11"
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 \
               ${libexecdir}/dbus* \
               ${sysconfdir} \
               ${localstatedir} \
               ${datadir}/dbus-1/services \
               ${datadir}/dbus-1/system-services"
FILES_${PN}-lib = "${libdir}/lib*.so.*"

EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
EXTRA_OECONF_X_virtclass-native = "--disable-x11-autolaunch"

     I also built a core-image-base and dbus-launch is present and working. 
     I am setting this to verified on:

commit e1c1ee19e04eca1ffd09b49104a7b49e89c74d12
Date:   Mon Sep 24 08:37:09 2012 +0000