Skip to content

dbus: enable user sessions#16254

Open
ddstreet wants to merge 1 commit intomicrosoft:3.0-devfrom
ddstreet:dbus-enable-user-sessions
Open

dbus: enable user sessions#16254
ddstreet wants to merge 1 commit intomicrosoft:3.0-devfrom
ddstreet:dbus-enable-user-sessions

Conversation

@ddstreet
Copy link
Copy Markdown
Contributor

While most distros have migrated over to dbus-broker, we still provide dbus-daemon, and we do not enable user sessions, so each user login does not have any dbus that can be used to communicate with the user session's systemd manager. This leads to frequent error messages while upgrading packages, and at other times, similar to:

Failed to connect to bus: No medium found
Reload daemon failed: Transport endpoint is not connected

Those errors also mean that while the systemd system manager (pid1) can be reloaded or reexeced, systemd user managers will not be reexeced on a package upgrade, nor can any other package that provides user session services cause their user services to reload/reexec on upgrade. This may leave user processes running old code after some package updates.

Note that the user can still communicate with the user session systemd manager, via systemctl, because it will use the private systemd bus. However, the root user (including scripts run during package updates) cannot connect to any user's private systemd bus and so must use the public user dbus, which is not provided by our dbus package currently.

This changes the dbus build to include support for user sessions.

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

enable user dbus support

Change Log

enables user dbus support

Does this affect the toolchain?

n

Associated issues
  • #xxxx
Links to CVEs
Test Methodology
  • Pipeline build id: xxxx

While most distros have migrated over to dbus-broker, we still provide
dbus-daemon, and we do not enable user sessions, so each user login
does not have any dbus that can be used to communicate with the user
session's systemd manager. This leads to frequent error messages while
upgrading packages, and at other times, similar to:

Failed to connect to bus: No medium found
Reload daemon failed: Transport endpoint is not connected

Those errors also mean that while the systemd system manager (pid1)
can be reloaded or reexeced, systemd user managers will not be
reexeced on a package upgrade, nor can any other package that provides
user session services cause their user services to reload/reexec on
upgrade. This may leave user processes running old code after some
package updates.

Note that the user can still communicate with the user session systemd
manager, via systemctl, because it will use the private systemd
bus. However, the root user (including scripts run during package
updates) cannot connect to any user's private systemd bus and so must
use the public user dbus, which is not provided by our dbus package
currently.

This changes the dbus build to include support for user sessions.
@ddstreet ddstreet requested a review from a team as a code owner March 23, 2026 01:50
@microsoft-github-policy-service microsoft-github-policy-service bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant