1
0
Fork 0
mirror of https://gitlab.freedesktop.org/dbus/dbus.git synced 2025-12-05 22:37:13 +00:00
D-Bus specification and reference implementation, including libdbus and dbus-daemon https://www.freedesktop.org/wiki/Software/dbus/
Find a file
Simon McVittie 1bcf396c78 Merge branch 'replace-free-to-g_free' into 'main'
test: replace free to g_free because g_strdup_printf using g_malloc

See merge request dbus/dbus!537
2025-08-26 12:24:03 +00:00
.gitlab/issue_templates Add feature template 2022-03-18 08:36:35 +01:00
.reuse subprojects: Move SPDX information from inline to .reuse/dep5 2023-08-15 15:41:17 +01:00
bus config-parser-common: remove duplicate check "auth" config param 2025-08-22 22:20:10 +03:00
cmake build: Only define DBUS_SESSION_SOCKET_DIR on Unix 2025-05-16 10:22:11 +00:00
dbus build: add elogind support 2025-08-11 14:35:17 +00:00
doc spec: launchd is no longer open-source 2025-05-01 09:27:21 +09:00
LICENSES LICENSES: Drop FSFULLR 2024-10-01 17:55:33 +00:00
maint Rename the git branch used for development to 'main' 2025-02-18 14:31:28 +00:00
subprojects subprojects: Update fallback GLib subproject 2025-02-27 19:27:06 +00:00
test test: replace free to g_free because g_strdup_printf using g_malloc 2025-08-26 12:23:46 +00:00
tools build: add -lsocket -lnsl if needed on illumos and older Solaris 2025-08-19 12:34:00 +00:00
.clang-format clang-format: don't align escaped newlines in macro definitions 2022-09-21 11:35:05 +00:00
.editorconfig .editorconfig: Automatically configure multiple text editors 2022-05-20 12:17:48 +00:00
.gitignore .gitignore: remove autotools related files and pattern 2023-09-01 14:05:08 +00:00
.gitlab-ci.yml Rebuild FreeBSD image with space available for some upgrades 2025-08-19 14:30:14 +01:00
.mailmap Reduce duplicates from authors list 2011-08-06 00:08:22 +02:00
AUTHORS Prepare v1.15.92 2024-12-11 13:27:54 +00:00
cleanup-man-pages.sh 2006-10-21 Havoc Pennington <hp@redhat.com> 2006-10-22 00:31:08 +00:00
CMakeLists.txt Fix building with asserts enabled in FreeBSD 2025-05-19 10:32:55 +03:00
CONTRIBUTING.md Document the change of development branch name to main 2025-02-18 14:38:19 +00:00
COPYING Fix some stray filename references for GPL-2.0-or-later 2022-11-29 20:43:01 +00:00
dbus-1.pc.in cmake: Optionally create relocatable dbus-1.pc file 2017-03-20 14:14:42 +00:00
Doxyfile.in Doxyfile: browse for build-dir sources 2022-05-18 16:40:30 +01:00
INSTALL INSTALL, README: Simplify Meson vs. CMake recommendation 2024-12-17 12:42:36 +00:00
meson.build build: add -lsocket -lnsl if needed on illumos and older Solaris 2025-08-19 12:34:00 +00:00
meson_options.txt build: enable solaris_console_owner_file by default on Solaris & illumos 2025-08-19 12:34:00 +00:00
meson_post_install.py Handle missing user when installing setuid in meson_post_install.py 2024-10-01 16:23:02 +00:00
NEWS Update NEWS 2025-08-19 14:37:22 +01:00
NEWS.pre-1-0 * Split NEWS and ChangeLog into a .pre-1-0 file as per HACKING 2007-05-25 20:49:50 +00:00
NEWS.pre-1-2 getting ready for 1.2 stable branch 2008-04-04 15:37:50 -04:00
NEWS.pre-1-4 Move old NEWS into separate files, one per stable release 2024-10-28 19:26:19 +00:00
NEWS.pre-1-6 Move old NEWS into separate files, one per stable release 2024-10-28 19:26:19 +00:00
NEWS.pre-1-8 Move old NEWS into separate files, one per stable release 2024-10-28 19:26:19 +00:00
NEWS.pre-1-10 Move old NEWS into separate files, one per stable release 2024-10-28 19:26:19 +00:00
NEWS.pre-1-12 Move old NEWS into separate files, one per stable release 2024-10-28 19:26:19 +00:00
README README: Mention the -alpha, -beta, -rc tags since 1.17.x 2024-12-17 12:48:18 +00:00
README.cmake cmake: Make intrusive (formerly embedded) tests into a separate option 2024-12-10 15:43:34 +00:00
README.cygwin README.win, README.cygwin: Describe dbus4win, etc. as historical 2024-12-17 12:45:27 +00:00
README.launchd Enable launchd. 2010-12-06 21:33:14 +01:00
README.valgrind Add documentation on running clients with Valgrind 2012-11-09 15:27:27 +00:00
README.win README.win, README.cygwin: Describe dbus4win, etc. as historical 2024-12-17 12:45:27 +00:00
README.wince Add README for Windows CE. 2010-04-13 21:09:09 +02:00

Sections in this file describe:
 - introduction and overview
 - low-level vs. high-level API
 - version numbers
 - options to the configure script
 - ABI stability policy

Introduction
===

D-Bus is a simple system for interprocess communication and coordination.

The "and coordination" part is important; D-Bus provides a bus daemon that does things like:
 - notify applications when other apps exit
 - start services on demand
 - support single-instance applications

See https://www.freedesktop.org/wiki/Software/dbus/ for lots of documentation,
mailing lists, etc.

See also the file CONTRIBUTING.md for notes of interest to developers
working on D-Bus.

If you're considering D-Bus for use in a project, you should be aware
that D-Bus was designed for a couple of specific use cases, a "system
bus" and a "desktop session bus." These are documented in more detail
in the D-Bus specification and FAQ available on the web site.

If your use-case isn't one of these, D-Bus may still be useful, but
only by accident; so you should evaluate carefully whether D-Bus makes
sense for your project.

Security
===

If you find a security vulnerability that is not known to the public,
please report it privately to dbus-security@lists.freedesktop.org
or by reporting a Gitlab issue at
https://gitlab.freedesktop.org/dbus/dbus/issues/new and marking it
as "confidential".
Please do not open merge requests for security issues: if you have a
proposed patch, it can be discussed on the confidential issue or by
private email.

On Unix systems, the system bus (dbus-daemon --system) is designed
to be a security boundary between users with different privileges.

On Unix systems, the session bus (dbus-daemon --session) is designed
to be used by a single user, and only accessible by that user.

We do not currently consider D-Bus on Windows to be security-supported,
and we do not recommend allowing untrusted users to access Windows
D-Bus via TCP.

Note: low-level API vs. high-level binding APIs
===

A core concept of the D-Bus implementation is that "libdbus" is
intended to be a low-level API. Most programmers are intended to use
the bindings to GLib, Qt, Python, Mono, Java, or whatever. These
bindings have varying levels of completeness and are maintained as
separate projects from the main D-Bus package. The main D-Bus package
contains the low-level libdbus, the bus daemon, and a few command-line
tools such as dbus-launch.

If you use the low-level API directly, you're signing up for some
pain. Think of the low-level API as analogous to Xlib or GDI, and the
high-level API as analogous to Qt/GTK+/HTML.

Version numbers
===

D-Bus uses the same odd/even versioning system as GLib, SDL and older
Linux kernels, where even-numbered minor versions are stable and
odd-numbered minor versions are development snapshots.

So for example, development snapshots: 1.1.1, 1.1.2, 1.1.3, 1.3.4
Stable versions: 1.0, 1.0.1, 1.0.2, 1.2.1, 1.2.3

All pre-1.0 versions were development snapshots.

Development snapshots make no ABI stability guarantees for new ABI
introduced since the last stable release. Development snapshots are
likely to have more bugs than stable releases, obviously.

Since 1.16.0, development snapshots will also have an -alpha, -beta or -rc
suffix on the version number to make their development status more obvious.

Configuration and installation
===

This branch of dbus can be built by using Meson or CMake.
The Meson build system is the recommended build system since version 1.16.0,
except when building on Windows, for which CMake is recommended (this
recommendation might change to Meson in future).

Please see `INSTALL` for full details.

API/ABI Policy
===

Now that D-Bus has reached version 1.0, the objective is that all
applications dynamically linked to libdbus will continue working
indefinitely with the most recent system and session bus daemons.

 - The protocol will never be broken again; any message bus should 
   work with any client forever. However, extensions are possible
   where the protocol is extensible.

 - If the library API is modified incompatibly, we will rename it 
   as in http://ometer.com/parallel.html - in other words, 
   it will always be possible to compile against and use the older 
   API, and apps will always get the API they expect.

Interfaces can and probably will be _added_. This means both new
functions and types in libdbus, and new methods exported to
applications by the bus daemon.

The above policy is intended to make D-Bus as API-stable as other
widely-used libraries (such as GTK+, Qt, Xlib, or your favorite
example). If you have questions or concerns they are very welcome on
the D-Bus mailing list.

NOTE ABOUT DEVELOPMENT SNAPSHOTS AND VERSIONING

Odd-numbered minor releases (1.1.x, 1.3.x, 2.1.x, etc. -
major.minor.micro) are devel snapshots for testing, and any new ABI
they introduce relative to the last stable version is subject to
change during the development cycle.

Any ABI found in a stable release, however, is frozen.

ABI will not be added in a stable series if we can help it. i.e. the
ABI of 1.2.0 and 1.2.5 you can expect to be the same, while the ABI of
1.4.x may add more stuff not found in 1.2.x.

NOTE ABOUT STATIC LINKING

We are not yet firmly freezing all runtime dependencies of the libdbus
library. For example, the library may read certain files as part of
its implementation, and these files may move around between versions.

As a result, we don't yet recommend statically linking to
libdbus. Also, reimplementations of the protocol from scratch might
have to work to stay in sync with how libdbus behaves.

To lock things down and declare static linking and reimplementation to
be safe, we'd like to see all the internal dependencies of libdbus
(for example, files read) well-documented in the specification, and
we'd like to have a high degree of confidence that these dependencies
are supportable over the long term and extensible where required.

NOTE ABOUT HIGH-LEVEL BINDINGS

Note that the high-level bindings are _separate projects_ from the
main D-Bus package, and have their own release cycles, levels of
maturity, and ABI stability policies. Please consult the documentation
for your binding.

Bootstrapping D-Bus on new platforms
===

A full build of dbus, with all regression tests enabled and run, depends
on GLib. A full build of GLib, with all regression tests enabled and run,
depends on dbus.

To break this cycle, don't enable full test coverage (for at least one
of those projects) during bootstrapping. You can rebuild with full test
coverage after you have built both dbus and GLib at least once.