Skip to content

[dbus] fix embedded system bus socket path on Unix#51908

Open
miyanyan wants to merge 5 commits into
microsoft:masterfrom
miyanyan:dbus-bus-socket
Open

[dbus] fix embedded system bus socket path on Unix#51908
miyanyan wants to merge 5 commits into
microsoft:masterfrom
miyanyan:dbus-bus-socket

Conversation

@miyanyan
Copy link
Copy Markdown
Contributor

The compiled-in default DBUS_SYSTEM_BUS_DEFAULT_ADDRESS was embedding
a vcpkg-package-relative path like:
unix:path=<vcpkg_root>/packages/dbus_<triplet>/var/run/dbus/system_bus_socket

This is because dbus CMake derives RUNSTATEDIR from GNUInstallDirs,
which defaults relative to CMAKE_INSTALL_PREFIX. On vcpkg the prefix
points to the package directory, not the system root.

Fix by explicitly passing -DRUNSTATEDIR=/run on all Unix platforms,
consistent with how Linux distros package dbus (e.g. Debian passes
--with-system-socket=/run/dbus/system_bus_socket).

Fixes #51890.

Comment thread ports/dbus/portfile.cmake Outdated
@vicroms vicroms marked this pull request as draft May 23, 2026 07:52
miyanyan and others added 2 commits May 23, 2026 18:28
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
@miyanyan
Copy link
Copy Markdown
Contributor Author

the ci error seems not related with this pr

@miyanyan miyanyan closed this May 24, 2026
@miyanyan miyanyan reopened this May 24, 2026
@miyanyan miyanyan marked this pull request as ready for review May 24, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dbus] compiled-in default system bus socket uses ${VCPKG_ROOT}/packages/.../var/run/dbus/system_bus_socket instead of /run/dbus/system_bus_socket

2 participants