Bug 15779 - dbus: systemd unit files are included even if systemd is disabled
Summary: dbus: systemd unit files are included even if systemd is disabled
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 5.0.7
Hardware: All arm
: Medium normal
Target Milestone: 5.0.15
Assignee: Unassigned
QA Contact:
URL:
Whiteboard: NEWCOMER
Depends on:
Blocks:
 
Reported: 2025-03-04 17:16 UTC by Zixun Li
Modified: 2026-04-09 15:23 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zixun Li 2025-03-04 17:16:45 UTC
Hi,

In yocto-5.0.7-57-g2afaed1013, systemd unit files of dbus are included in packages even if systemd is disabled in distro features:

oe-pkgdata-util list-pkg-files dbus
dbus:
        /etc/default/volatiles/99_dbus
        /etc/init.d/dbus-1
        /usr/bin/dbus-cleanup-sockets
        /usr/bin/dbus-daemon
        /usr/bin/dbus-launch
        /usr/bin/dbus-run-session
        /usr/lib/systemd/user/dbus.service
        /usr/libexec/dbus-daemon-launch-helper

oe-pkgdata-util list-pkg-files dbus-common
dbus-common:
        /etc/dbus-1/session.conf
        /etc/dbus-1/system.conf
        /usr/lib/systemd/user/dbus.socket
        /usr/lib/systemd/user/sockets.target.wants/dbus.socket
        /usr/share/dbus-1/session.conf
        /usr/share/dbus-1/system.conf
Comment 1 Randy MacLeod 2025-03-06 15:39:29 UTC
Either delete the files or find a better fix.
Comment 2 Ross Burton 2025-03-06 15:45:09 UTC
The ideal solution would be to inhert the systemd class, but I fear that there might be circular dependencies if this happens.

So I'd suggest trying to inherit the systemd class, and if that fails then manually do the cleanup in do_install().
Comment 3 daisuke.yamane 2025-06-17 04:03:12 UTC
When I tried to build dbus with yocto-5.2, I found that the service and socket files were not contained in the package.

$ oe-pkgdata-util list-pkg-files dbus dbus-common
dbus:
	/etc/default/volatiles/99_dbus
	/etc/init.d/dbus-1
	/usr/bin/dbus-cleanup-sockets
	/usr/bin/dbus-daemon
	/usr/bin/dbus-launch
	/usr/bin/dbus-run-session
	/usr/libexec/dbus-daemon-launch-helper
dbus-common:
	/etc/dbus-1/session.conf
	/etc/dbus-1/system.conf
	/usr/share/dbus-1/session.conf
	/usr/share/dbus-1/system.conf

It is possible that the issue has been fixed with an update to dbus.
Comment 4 Ross Burton 2025-06-17 09:36:45 UTC
Moving target, as this is fixed in recent releases.
Comment 5 Randy MacLeod 2026-04-09 15:23:33 UTC
Works on master. 
If you want to send patches to fix this on older releases, please do so.