Commit graph

6955 commits

Author SHA1 Message Date
Simon McVittie
54f9aa554a bus: Don't create /run/dbus/containers if the feature is disabled
The `Containers1` interface is not stable or production-ready, and is
compile-time-optional behind a build option, which in fact currently
cannot be enabled (it intentionally provokes a compiler `#error` if
enabled). If it isn't enabled, this directory won't be useful, so
there's no reason to create it.

As discussed in <https://github.com/systemd/mkosi/issues/3189>, if we
use the `@DBUS_USER@` here, it makes `tmpfiles.d/dbus.conf` dependent
on having created the `@DBUS_USER@` via `sysusers.d` or some
appropriate distro-specific mechanism. This is problematic in distros
that split up the functionality of dbus into several layers, such as
Debian: the `@DBUS_USER@` conceptually belongs to the same layer as
the well-known system bus, but `/etc/machine-id` and
`/var/lib/dbus/machine-id` are also used by the well-known session bus,
which is orthogonal to the system bus; so we want `dbus.conf` to be in a
lower layer than the `@DBUS_USER@`.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-11-18 19:00:26 +00:00
Simon McVittie
08d64b1638 doc, maint: Publishing DTDs requires a MR to xdg-specs
We can no longer upload to specifications.freedesktop.org directly.
Instead, that area of the freedesktop.org web space is updated by
sending merge requests to the xdg/xdg-specs> project.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-11-04 15:49:39 +00:00
Simon McVittie
f4cf1ebb6d release-checklist: We only update the wiki page for new stable branches
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-11-04 15:47:53 +00:00
Simon McVittie
87204d19b8 Merge branch 'doc-devhelp' into 'master'
doc: Fix Devhelp index for reorganization of documentation files

See merge request dbus/dbus!486
2024-10-29 17:50:45 +00:00
Simon McVittie
264b5ab484 doc: Use the top-level index.html as the table of contents for Devhelp
Now that we have this table of contents, we might as well use it.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-10-29 17:49:44 +00:00
Simon McVittie
397f9789e6 doc: Use api/html to link to Doxygen docs in Devhelp index
Now that we're installing the Doxygen documentation in a subdirectory,
the Devhelp index needs to reflect that.

Fixes: 522633b4 "cmake: install api docs in html subdir"
Fixes: f546ddd9 "meson: Install Doxygen docs as api/html/*.html"
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-10-29 17:49:44 +00:00
Simon McVittie
dc89ac01a9 Post-release version bump
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-29 17:48:31 +00:00
Simon McVittie
d30794756d Prepare v1.15.12
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-29 13:16:08 +00:00
Simon McVittie
7d06ca9473 Regenerate AUTHORS as per maint/release-checklist.md
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-29 13:00:23 +00:00
Simon McVittie
90619c3e58 NEWS: Start to summarize what's new in 1.16.x
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-28 19:27:27 +00:00
Simon McVittie
955db66c27 Move old NEWS into separate files, one per stable release
The main NEWS file continues to document all changes since 1.12.0,
including the entire 1.13.x/1.14.x series.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-28 19:26:19 +00:00
Simon McVittie
78883432b3 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-28 16:13:46 +00:00
Simon McVittie
43bdf1e6d7 Merge branch 'large-rlimit-timeout' into 'master'
tests: Only check whether the first 1024 fds are close-on-exec

Closes #527

See merge request dbus/dbus!481
2024-10-28 16:10:52 +00:00
Simon McVittie
6946489326 tests: Only check whether the first 1024 fds are close-on-exec
On recent Linux systems, systemd sets the hard limit on the number of
file descriptors extremely high (about 1e9, compared with about 1e6 in
previous systemd versions or 4096 in the kernel's historical defaults),
and dbus raises its soft limit to match the hard limit. The result of
sysconf(_SC_OPEN_MAX) is based on the fd limit, and iterating linearly
through that many fds takes long enough for activation to time out.

This particular piece of code is just test instrumentation, which aims to
log (possibly fatal) warnings if any file descriptor is not close-on-exec
as it should be. In practice the test suite doesn't use anywhere near
a thousand fds, so it's sufficient to run this check against a much
smaller number of fds.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/527
Bug-Debian: https://bugs.debian.org/1086148
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-28 16:10:39 +00:00
Simon McVittie
4e8973398f Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-28 13:29:41 +00:00
Simon McVittie
b6a6b83bb5 Merge branch 'misc-test' into 'master'
test: fix cleanup_test_socket_tempdir on Solaris

See merge request dbus/dbus!480
2024-10-18 14:19:40 +00:00
Alan Coopersmith
66170cbb21 test: fix cleanup_test_socket_tempdir on Solaris
Solaris does not allow rmdir() to remove the cwd, so chdir() out of
the tempdir before removing it.

Without this fix, misc-internal reported a failure on Solaris 11.4:
not ok 16 - failed to remove test socket directory /tmp/dbus-test-tduvWc

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-10-18 14:16:26 +00:00
Simon McVittie
c59108890a Merge branch 'fdpass' into 'master'
Fix fd limit handling in fdpass test

Closes #176

See merge request dbus/dbus!479
2024-10-14 19:24:43 +00:00
Alan Coopersmith
72642d7ff6 test: Move fd limit check into test_flood
Other tests have different requirements for fds (and already check for
them), so move this check into the specific test (mirroring what those
other tests already do) instead of blocking the whole test program,
incorrectly using autoconf test return codes instead of TAP protocol,
as discussed in #176.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-10-13 12:37:32 -07:00
Alan Coopersmith
f851484bf5 test: raise fd limit to maximum before running fdpass tests
Many of these tests require more than the default fd limit on some systems,
so raise the limit, if we can, to give them a better chance of being able
to run.

Closes #176
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-10-13 12:26:48 -07:00
Simon McVittie
88ec21ce94 Merge branch 'adt' into 'master'
meson fixes for Solaris audit API support

See merge request dbus/dbus!477
2024-10-08 11:31:31 +00:00
Alan Coopersmith
78fc81f5cf meson: add adt_libs to libdbus dependencies
Needed when building with support for Solaris audit API, otherwise
linking fails with:

Undefined                       first referenced
 symbol                             in file
adt_export_session_data             dbus/libdbus-1.so.3.38.1.p/dbus-sysdeps-unix.c.o
adt_start_session                   dbus/libdbus-1.so.3.38.1.p/dbus-sysdeps-unix.c.o
adt_end_session                     dbus/libdbus-1.so.3.38.1.p/dbus-sysdeps-unix.c.o
adt_set_from_ucred                  dbus/libdbus-1.so.3.38.1.p/dbus-sysdeps-unix.c.o

Fixes: cd2e3826 ("Add Meson build system")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-10-07 17:29:46 -07:00
Alan Coopersmith
274c16589f meson: Fix check for Solaris audit API to work with gcc 14
Need to declare a variable type to avoid gcc 14 error:

error: type defaults to 'int' in declaration of 'adt_user_context'
 [-Wimplicit-int]

Fixes: cd2e3826 ("Add Meson build system")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-10-07 17:13:53 -07:00
Simon McVittie
57f885bd4c Merge branch 'etc' into 'master'
spec/bus: allow searching for system-services in /etc/

See merge request dbus/dbus!467
2024-10-03 12:10:42 +00:00
Luca Boccassi
25a0890023 spec: recommend searching for system-services in /etc/ and /run/
This is useful when an asset manager wants to install a system
service while /usr/ is read-only (e.g.: portable services running
on a different namespaced image). Also recommend searching in /run/
following the now-standard pattern, for ephemeral services.

Signed-off-by: Luca Boccassi <bluca@debian.org>
2024-10-03 01:02:56 +01:00
Luca Boccassi
776e6e0b04 bus: search for system-services in /etc/ and /run/ by default
Tthis is useful when an asset manager wants to install a system
service while /usr/ is read-only (e.g.: portable
services running on a different namespaced image). Unlike other
directories, enforce strict naming and do not set up an inotify,
as the directories might not even exist until much later. Also
search in /run/ for ephemeral services that will disappear after
a reboot.

Signed-off-by: Luca Boccassi <bluca@debian.org>
2024-10-03 00:58:29 +01:00
Simon McVittie
76472091ad Merge branch 'no-more-fsfullr' into 'master'
LICENSES: Drop FSFULLR

See merge request dbus/dbus!475
2024-10-01 17:56:25 +00:00
Simon McVittie
74d57deb60 LICENSES: Drop FSFULLR
This was only used in the Autotools build system, which we deleted.

Fixes: 8ea959b2 "Remove autotools related files"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 17:55:33 +00:00
Simon McVittie
b2b34b75ae Merge branch 'meson-install-no-dbus-user' into 'master'
Handle missing user when installing setuid in meson_post_install.py

Closes #492

See merge request dbus/dbus!457
2024-10-01 16:40:32 +00:00
Jordan Williams
b104667bd7 Handle missing user when installing setuid in meson_post_install.py
The logic that sets the dbus-daemon-launcher-helper setuid does not
handle the case where the group named the same as the dbus_user does not
exist.
This makes the assumption that the primary group of the dbus_user
has the same name as the dbus_user.
This may not be the case.

To remedy these issues, obtain the group id for dbus_user instead of
attempting to retrieve the group id by name.
To avoid a failure when the user does not exist, handle the KeyError
exception from the pwd.getpwnam function by printing a warning and
skipping the logic to set the binary setuid.
Perform an additional check to ensure that the dbus_user's primary group
 has only a single member.
Fail similarly if it has more than one member.

Resolves: #492
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 16:23:02 +00:00
Simon McVittie
9091c40bf5 Merge branch 'null-type-sim' into 'master'
doc: Recommend ways to simulate a nullable type

See merge request dbus/dbus!446
2024-10-01 15:11:03 +00:00
Zeeshan Ali Khan
88826865c1 doc: Recommend ways to simulate a nullable type
In the API design document.

Related: #25.

co-authored-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Zeeshan Ali Khan <zeeshanak@gnome.org>
2024-10-01 15:56:48 +01:00
Simon McVittie
83476b7a93 NEWS: Update
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 15:51:23 +01:00
Simon McVittie
579afc0924 Merge branch 'message-bus-ifaces' into 'master'
spec: Give each message bus interface a section, and document Debug and Verbose

See merge request dbus/dbus!472
2024-10-01 14:41:25 +00:00
Simon McVittie
f8b9513050 spec: Document the o.fd.DBus.Verbose interface
Like Debug.Stats, this was implemented but never documented. Do so now.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:41:06 +00:00
Simon McVittie
07c0a5232e spec: Document the o.fd.DBus.Debug.Stats interface
We never actually documented this when it was added to the dbus-daemon.
Do so now.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:41:06 +00:00
Simon McVittie
ec2e24630c spec: Add a reminder of how to access Properties
Readers of the message bus specification might be encountering Properties
for the first time, so for the basic properties in the o.fd.DBus
interface, link to the interface definition.

I'm not intending to add similar text for extension interfaces like
Containers.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:41:06 +00:00
Simon McVittie
bafb2c455d spec: Have a sect2 per interface documented for the message bus
Previously, we arbitrarily divided o.fd.DBus into "messages"
(methods and signals), in one sect2, and Properties, in another sect2;
and for the only extended interface that is documented so far,
o.fd.DBus.Monitoring, we included its single method in the list of
o.fd.DBus methods.

This is putting too much weight on implementation details of how the
D-Bus protocol is implemented (with Properties being "less core" than
methods and signals), and not enough weight on how interfaces are
conceptually structured. It's more usual to group together all aspects
of an interface into one document or section, and the current arbitrary
separation is going to look more and more odd as we start documenting
more interfaces like Containers (dbus!449), Stats and Verbose.

Instead, repurpose the "Message Bus Messages" section to become the
documentation for the o.fd.DBus interface, and introduce a separate
section for each other interface that the message bus provides.
Each one contains a full list of methods, signals and properties (if any)
if it is specific to the message bus, or a cross-reference to a more
generic interface description if it is equally applicable to the message
bus and its clients.

Prompted by discussion on dbus!449.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:41:06 +00:00
Simon McVittie
a36d0e1cdb Merge branch 'apidoc-link' into 'master'
doc: Substitute DBUS_APIDOC_LINK from Meson build, not just CMake

See merge request dbus/dbus!470
2024-10-01 14:40:01 +00:00
Simon McVittie
34a31730ec meson: Substitute DBUS_APIDOC_LINK
doc/index.html.in is common to the Meson and CMake build systems, so
every time a new variable gets substituted into it, both the Meson and
CMake build systems need to provide a value for that variable.

Fixes: b58ca0e1 "cmake: Inclusion of a link in html overview file corrected"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:39:20 +00:00
Simon McVittie
f546ddd937 meson: Install Doxygen docs as api/html/*.html
This ensures that the Doxygen-built documentation has the same layout
in the installed files that it does in the build tree and on the
website. If we don't keep the same layout, then there is no value for
the `DBUS_APIDOC_LINK` in index.html that would be correct for both
the build tree and the installed tree. The build tree effectively has
a html subdirectory hard-coded, because that's how Doxygen lays out
its outputs.

This commit is the Meson equivalent of
commit 522633b4 "cmake: install api docs in html subdir" in the CMake
build system (dbus!473, dbus#519).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:39:20 +00:00
Simon McVittie
88239d7603 Merge branch 'spec-trivia' into 'master'
spec: Multiple small improvements

See merge request dbus/dbus!471
2024-10-01 14:16:18 +00:00
Simon McVittie
35c3a2f67b spec: Don't expect clients to support obsolete message buses
The newest release of the reference message bus that did not support
GetConnectionCredentials was 1.6.30, almost a decade ago.
It's entirely reasonable for new code to assume that
GetConnectionCredentials will succeed, and not implement a fallback.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 15:00:56 +01:00
Simon McVittie
c0d9495a06 spec: Improve flow of text when cross-referencing methods, etc.
`<xref>` will typically be replaced by something like
"the section called “Foo”", so if we want to name a specific method
in running text, we need to use `<link>`.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 15:00:56 +01:00
Simon McVittie
c16d34e7bf spec: Be consistent about the case of feature flags
The `AppArmor` feature flag is a case-sensitive string literal,
so consistently use its correct case-combination.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 15:00:56 +01:00
Simon McVittie
d60bc69f57 spec: Provide better cross-reference links for common interfaces
There's no need to make readers go looking for these in a larger section,
we can link directly to the individual interfaces.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 15:00:56 +01:00
Simon McVittie
a5f50e122f Merge branch 'deb12' into 'master'
Update CI jobs to be more reliable

See merge request dbus/dbus!474
2024-10-01 13:54:39 +00:00
Simon McVittie
abedc312ca Update Debian CI container from version 11 to 12
Debian 11 recently reached EOL, and we should really be using the
latest stable release as our reference.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:40:30 +01:00
Simon McVittie
9d5e78798d CI: Only configure wine as an exe_wrapper if we are going to run tests
This choice of exe_wrapper doesn't appear to work on Debian 12, causing
a build failure while checking that the output of the C++ compiler is
executable.

Another advantage of this is that if we're not running the test suite,
we can do a more traditional cross-build where running host-architecture
executables is impossible, which doubles as a way to prove that this
still works.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:40:26 +01:00
Simon McVittie
129c1c5d00 CI: Install clang with its Recommends
On Debian 12, this is necessary to get libclang-rt-14-dev (which
contains the headers for LeakSanitizer) without hard-coding the clang
major version.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:30:02 +01:00