]> git.ipfire.org Git - thirdparty/dbus.git/log
thirdparty/dbus.git
12 months agoMerge branch '1.16-no-containers' into dbus-1.16
Simon McVittie [Fri, 6 Dec 2024 13:43:29 +0000 (13:43 +0000)] 
Merge branch '1.16-no-containers' into dbus-1.16

12 months agoDisable deprecation warnings for stable branch
Simon McVittie [Fri, 6 Dec 2024 13:43:04 +0000 (13:43 +0000)] 
Disable deprecation warnings for stable branch

We're not going to replace deprecated functions here, similar to commit
88e0ccb2 in the dbus-1.10 branch.

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoUpdate NEWS
Simon McVittie [Fri, 29 Nov 2024 16:24:38 +0000 (16:24 +0000)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'issue531' into 'master'
Simon McVittie [Fri, 29 Nov 2024 16:11:18 +0000 (16:11 +0000)] 
Merge branch 'issue531' into 'master'

build: Check for socket(), socketpair() in -lsocket if necessary

Closes #531

See merge request dbus/dbus!491

12 months agobuild: Check for socket(), socketpair() in -lsocket if necessary
Simon McVittie [Fri, 29 Nov 2024 11:46:32 +0000 (11:46 +0000)] 
build: Check for socket(), socketpair() in -lsocket if necessary

On older Solaris, these functions exist in -lsocket rather than in the
standard C library. If we can't find them immediately, try again with
-lsocket added to the dependencies.

Later, use network_libs when checking for optional functions like
socketpair(), so that we will detect it correctly. If socketpair() is
not found, dbus compiles successfully without it, but dbus-daemon will
not start because it cannot set up reload signalling.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/531
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'fix-RANDOM_INDEX-32bit' into 'master'
Simon McVittie [Fri, 29 Nov 2024 12:58:03 +0000 (12:58 +0000)] 
Merge branch 'fix-RANDOM_INDEX-32bit' into 'master'

dbus-hash: Fix RANDOM_INDEX signed-integer-overflow on 32-bit

See merge request dbus/dbus!487

12 months agodbus-hash: Fix RANDOM_INDEX signed-integer-overflow on 32-bit
Jami Kettunen [Sat, 9 Nov 2024 23:54:55 +0000 (01:54 +0200)] 
dbus-hash: Fix RANDOM_INDEX signed-integer-overflow on 32-bit

Found by compiling with clang -fsanitize=signed-integer-overflow etc and
running dbus-daemon on armv7.

Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
13 months agoCompletely remove the Containers1 interface
Simon McVittie [Tue, 19 Nov 2024 13:11:13 +0000 (13:11 +0000)] 
Completely remove the Containers1 interface

This interface is still not ready for production use. To minimize
confusion, let's remove it from the 1.16.x stable branch. We can have
another try during the 1.17.x cycle, via dbus/dbus!449.

Signed-off-by: Simon McVittie <smcv@collabora.com>
13 months agoMerge branch 'no-containers-dir' into 'master'
Simon McVittie [Tue, 19 Nov 2024 11:28:51 +0000 (11:28 +0000)] 
Merge branch 'no-containers-dir' into 'master'

bus: Don't create /run/dbus/containers if the feature is disabled

See merge request dbus/dbus!488

13 months agobus: Don't create /run/dbus/containers if the feature is disabled
Simon McVittie [Mon, 18 Nov 2024 18:53:23 +0000 (18:53 +0000)] 
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>
13 months agodoc, maint: Publishing DTDs requires a MR to xdg-specs
Simon McVittie [Mon, 4 Nov 2024 15:49:39 +0000 (15:49 +0000)] 
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>
13 months agorelease-checklist: We only update the wiki page for new stable branches
Simon McVittie [Mon, 4 Nov 2024 15:47:53 +0000 (15:47 +0000)] 
release-checklist: We only update the wiki page for new stable branches

Signed-off-by: Simon McVittie <smcv@collabora.com>
13 months agoMerge branch 'doc-devhelp' into 'master'
Simon McVittie [Tue, 29 Oct 2024 17:50:45 +0000 (17:50 +0000)] 
Merge branch 'doc-devhelp' into 'master'

doc: Fix Devhelp index for reorganization of documentation files

See merge request dbus/dbus!486

13 months agodoc: Use the top-level index.html as the table of contents for Devhelp
Simon McVittie [Tue, 29 Oct 2024 15:48:21 +0000 (15:48 +0000)] 
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>
13 months agodoc: Use api/html to link to Doxygen docs in Devhelp index
Simon McVittie [Tue, 29 Oct 2024 15:47:21 +0000 (15:47 +0000)] 
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>
13 months agoPost-release version bump
Simon McVittie [Tue, 29 Oct 2024 17:48:31 +0000 (17:48 +0000)] 
Post-release version bump

Signed-off-by: Simon McVittie <smcv@collabora.com>
13 months agoPrepare v1.15.12 dbus-1.15.12
Simon McVittie [Tue, 29 Oct 2024 13:00:31 +0000 (13:00 +0000)] 
Prepare v1.15.12

Signed-off-by: Simon McVittie <smcv@collabora.com>
13 months agoRegenerate AUTHORS as per maint/release-checklist.md
Simon McVittie [Tue, 29 Oct 2024 12:59:24 +0000 (12:59 +0000)] 
Regenerate AUTHORS as per maint/release-checklist.md

Signed-off-by: Simon McVittie <smcv@collabora.com>
13 months agoNEWS: Start to summarize what's new in 1.16.x
Simon McVittie [Mon, 28 Oct 2024 19:27:27 +0000 (19:27 +0000)] 
NEWS: Start to summarize what's new in 1.16.x

Signed-off-by: Simon McVittie <smcv@collabora.com>
13 months agoMove old NEWS into separate files, one per stable release
Simon McVittie [Mon, 28 Oct 2024 19:26:01 +0000 (19:26 +0000)] 
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>
13 months agoUpdate NEWS
Simon McVittie [Mon, 28 Oct 2024 16:13:46 +0000 (16:13 +0000)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
13 months agoMerge branch 'large-rlimit-timeout' into 'master'
Simon McVittie [Mon, 28 Oct 2024 16:10:52 +0000 (16:10 +0000)] 
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

13 months agotests: Only check whether the first 1024 fds are close-on-exec
Simon McVittie [Sun, 27 Oct 2024 18:19:08 +0000 (18:19 +0000)] 
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>
13 months agoUpdate NEWS
Simon McVittie [Mon, 28 Oct 2024 13:29:41 +0000 (13:29 +0000)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
14 months agoMerge branch 'misc-test' into 'master'
Simon McVittie [Fri, 18 Oct 2024 14:19:40 +0000 (14:19 +0000)] 
Merge branch 'misc-test' into 'master'

test: fix cleanup_test_socket_tempdir on Solaris

See merge request dbus/dbus!480

14 months agotest: fix cleanup_test_socket_tempdir on Solaris
Alan Coopersmith [Tue, 15 Oct 2024 22:18:13 +0000 (15:18 -0700)] 
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>
14 months agoMerge branch 'fdpass' into 'master'
Simon McVittie [Mon, 14 Oct 2024 19:24:43 +0000 (19:24 +0000)] 
Merge branch 'fdpass' into 'master'

Fix fd limit handling in fdpass test

Closes #176

See merge request dbus/dbus!479

14 months agotest: Move fd limit check into test_flood
Alan Coopersmith [Sun, 13 Oct 2024 19:33:06 +0000 (12:33 -0700)] 
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>
14 months agotest: raise fd limit to maximum before running fdpass tests
Alan Coopersmith [Sun, 13 Oct 2024 19:24:09 +0000 (12:24 -0700)] 
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>
14 months agoMerge branch 'adt' into 'master'
Simon McVittie [Tue, 8 Oct 2024 11:31:31 +0000 (11:31 +0000)] 
Merge branch 'adt' into 'master'

meson fixes for Solaris audit API support

See merge request dbus/dbus!477

14 months agomeson: add adt_libs to libdbus dependencies
Alan Coopersmith [Tue, 8 Oct 2024 00:29:46 +0000 (17:29 -0700)] 
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>
14 months agomeson: Fix check for Solaris audit API to work with gcc 14
Alan Coopersmith [Tue, 8 Oct 2024 00:13:53 +0000 (17:13 -0700)] 
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>
14 months agoMerge branch 'etc' into 'master'
Simon McVittie [Thu, 3 Oct 2024 12:10:42 +0000 (12:10 +0000)] 
Merge branch 'etc' into 'master'

spec/bus: allow searching for system-services in /etc/

See merge request dbus/dbus!467

14 months agospec: recommend searching for system-services in /etc/ and /run/
Luca Boccassi [Fri, 13 Sep 2024 17:41:32 +0000 (19:41 +0200)] 
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>
14 months agobus: search for system-services in /etc/ and /run/ by default
Luca Boccassi [Fri, 13 Sep 2024 17:42:11 +0000 (19:42 +0200)] 
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>
14 months agoMerge branch 'no-more-fsfullr' into 'master'
Simon McVittie [Tue, 1 Oct 2024 17:56:25 +0000 (17:56 +0000)] 
Merge branch 'no-more-fsfullr' into 'master'

LICENSES: Drop FSFULLR

See merge request dbus/dbus!475

14 months agoLICENSES: Drop FSFULLR
Simon McVittie [Tue, 1 Oct 2024 15:28:55 +0000 (16:28 +0100)] 
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>
14 months agoMerge branch 'meson-install-no-dbus-user' into 'master'
Simon McVittie [Tue, 1 Oct 2024 16:40:32 +0000 (16:40 +0000)] 
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

14 months agoHandle missing user when installing setuid in meson_post_install.py
Jordan Williams [Wed, 6 Mar 2024 14:32:34 +0000 (08:32 -0600)] 
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>
14 months agoMerge branch 'null-type-sim' into 'master'
Simon McVittie [Tue, 1 Oct 2024 15:11:03 +0000 (15:11 +0000)] 
Merge branch 'null-type-sim' into 'master'

doc: Recommend ways to simulate a nullable type

See merge request dbus/dbus!446

14 months agodoc: Recommend ways to simulate a nullable type
Zeeshan Ali Khan [Wed, 13 Sep 2023 21:53:10 +0000 (23:53 +0200)] 
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>
14 months agoNEWS: Update
Simon McVittie [Tue, 1 Oct 2024 14:51:23 +0000 (15:51 +0100)] 
NEWS: Update

Signed-off-by: Simon McVittie <smcv@collabora.com>
14 months agoMerge branch 'message-bus-ifaces' into 'master'
Simon McVittie [Tue, 1 Oct 2024 14:41:25 +0000 (14:41 +0000)] 
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

14 months agospec: Document the o.fd.DBus.Verbose interface
Simon McVittie [Wed, 25 Sep 2024 17:00:09 +0000 (18:00 +0100)] 
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>
14 months agospec: Document the o.fd.DBus.Debug.Stats interface
Simon McVittie [Wed, 25 Sep 2024 16:59:36 +0000 (17:59 +0100)] 
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>
14 months agospec: Add a reminder of how to access Properties
Simon McVittie [Wed, 25 Sep 2024 16:58:42 +0000 (17:58 +0100)] 
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>
14 months agospec: Have a sect2 per interface documented for the message bus
Simon McVittie [Wed, 25 Sep 2024 16:56:18 +0000 (17:56 +0100)] 
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>
14 months agoMerge branch 'apidoc-link' into 'master'
Simon McVittie [Tue, 1 Oct 2024 14:40:01 +0000 (14:40 +0000)] 
Merge branch 'apidoc-link' into 'master'

doc: Substitute DBUS_APIDOC_LINK from Meson build, not just CMake

See merge request dbus/dbus!470

14 months agomeson: Substitute DBUS_APIDOC_LINK
Simon McVittie [Wed, 25 Sep 2024 14:39:49 +0000 (15:39 +0100)] 
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>
14 months agomeson: Install Doxygen docs as api/html/*.html
Simon McVittie [Tue, 1 Oct 2024 12:17:41 +0000 (13:17 +0100)] 
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>
14 months agoMerge branch 'spec-trivia' into 'master'
Simon McVittie [Tue, 1 Oct 2024 14:16:18 +0000 (14:16 +0000)] 
Merge branch 'spec-trivia' into 'master'

spec: Multiple small improvements

See merge request dbus/dbus!471

14 months agospec: Don't expect clients to support obsolete message buses
Simon McVittie [Wed, 25 Sep 2024 17:11:32 +0000 (18:11 +0100)] 
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>
14 months agospec: Improve flow of text when cross-referencing methods, etc.
Simon McVittie [Wed, 25 Sep 2024 17:08:19 +0000 (18:08 +0100)] 
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>
14 months agospec: Be consistent about the case of feature flags
Simon McVittie [Wed, 25 Sep 2024 16:57:20 +0000 (17:57 +0100)] 
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>
14 months agospec: Provide better cross-reference links for common interfaces
Simon McVittie [Wed, 25 Sep 2024 16:41:36 +0000 (17:41 +0100)] 
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>
14 months agoMerge branch 'deb12' into 'master'
Simon McVittie [Tue, 1 Oct 2024 13:54:39 +0000 (13:54 +0000)] 
Merge branch 'deb12' into 'master'

Update CI jobs to be more reliable

See merge request dbus/dbus!474

14 months agoUpdate Debian CI container from version 11 to 12
Simon McVittie [Tue, 1 Oct 2024 11:21:31 +0000 (12:21 +0100)] 
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>
14 months agoCI: Only configure wine as an exe_wrapper if we are going to run tests
Simon McVittie [Tue, 1 Oct 2024 13:28:56 +0000 (14:28 +0100)] 
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>
14 months agoCI: Install clang with its Recommends
Simon McVittie [Tue, 1 Oct 2024 13:10:51 +0000 (14:10 +0100)] 
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>
14 months agoCI: Don't run test suite under Wine on Debian
Simon McVittie [Tue, 1 Oct 2024 13:06:12 +0000 (14:06 +0100)] 
CI: Don't run test suite under Wine on Debian

This has been noted to be unreliable (dbus#509) and we now have more
realistic test coverage on actual Windows.

I'm marking these CI jobs to do the build but not run the tests,
instead of skipping them completely, because having coverage for a
successful build on mingw-w64 (32-bit, 64-bit) bit × (release, debug)
does still seem like a useful thing for us to have.

Signed-off-by: Simon McVittie <smcv@collabora.com>
14 months agoCI: Comment opensuse mingw32 cmake as known-failing
Simon McVittie [Tue, 1 Oct 2024 12:49:46 +0000 (13:49 +0100)] 
CI: Comment opensuse mingw32 cmake as known-failing

See dbus#520

Signed-off-by: Simon McVittie <smcv@collabora.com>
14 months agoCI: Stop working around httpredir.debian.org
Simon McVittie [Tue, 1 Oct 2024 11:56:00 +0000 (12:56 +0100)] 
CI: Stop working around httpredir.debian.org

All Debian Docker images from the last few years use deb.debian.org,
which is reliable, by default.

Signed-off-by: Simon McVittie <smcv@collabora.com>
14 months agoMerge branch 'more-test-deps' into 'master'
Simon McVittie [Tue, 1 Oct 2024 12:00:13 +0000 (12:00 +0000)] 
Merge branch 'more-test-deps' into 'master'

build: test/name-test/run-test.sh needs dbus-launch

See merge request dbus/dbus!468

14 months agobuild: test/name-test/run-test.sh needs dbus-launch
Simon McVittie [Wed, 25 Sep 2024 13:08:59 +0000 (14:08 +0100)] 
build: test/name-test/run-test.sh needs dbus-launch

If we're building on Unix with the message bus and tools enabled, then
we need to compile dbus-launch before we can expect this test to pass.

Continuation of commit 55e60abe "test: add missing test dependencies".

Signed-off-by: Simon McVittie <smcv@collabora.com>
14 months agoMerge branch 'fix-519' into 'master'
Simon McVittie [Tue, 1 Oct 2024 11:22:00 +0000 (11:22 +0000)] 
Merge branch 'fix-519' into 'master'

cmake: install api docs in html subdir

Closes #519

See merge request dbus/dbus!473

14 months agocmake: install api docs in html subdir
Ralf Habacker [Fri, 27 Sep 2024 15:50:42 +0000 (17:50 +0200)] 
cmake: install api docs in html subdir

CMake has previously installed the api documentation in the api/
subdirectory, but api/html is required to correspond to the link
in the generated index file (index.html).

Fix #519

15 months agoStart changelog for v1.15.12
Simon McVittie [Wed, 25 Sep 2024 20:02:02 +0000 (21:02 +0100)] 
Start changelog for v1.15.12

Signed-off-by: Simon McVittie <smcv@collabora.com>
15 months agoPrepare v1.15.10 dbus-1.15.10
Simon McVittie [Wed, 25 Sep 2024 13:19:13 +0000 (14:19 +0100)] 
Prepare v1.15.10

Signed-off-by: Simon McVittie <smcv@collabora.com>
15 months agoUpdate NEWS
Simon McVittie [Wed, 25 Sep 2024 14:15:59 +0000 (15:15 +0100)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
15 months agoMerge branch 'gcc-14' into 'master'
Simon McVittie [Wed, 25 Sep 2024 14:12:46 +0000 (14:12 +0000)] 
Merge branch 'gcc-14' into 'master'

Fix compiler warnings/errors with gcc 14

See merge request dbus/dbus!469

15 months agotest: Always initialize an "out" parameter
Simon McVittie [Wed, 25 Sep 2024 13:41:48 +0000 (14:41 +0100)] 
test: Always initialize an "out" parameter

check_valid_fd() does not touch its second parameter if the fd is not,
in fact, a valid fd. Initialize the "out" parameter to the opposite
of the value we are hoping for, so that both assertions will fail if
there is a problem.

Signed-off-by: Simon McVittie <smcv@collabora.com>
15 months agosysdeps-unix: Always initialize flags for syslog()
Simon McVittie [Wed, 25 Sep 2024 13:40:16 +0000 (14:40 +0100)] 
sysdeps-unix: Always initialize flags for syslog()

If passed an invalid DBusSystemLogSeverity, the default case for the
switch construct is to crash out with an assertion failure, but the
assertion failure itself is not compiled in if we are doing a production
build without assertions.

Detected by compiling with gcc 14, which does some static analysis
by default.

Signed-off-by: Simon McVittie <smcv@collabora.com>
15 months agodbus-spam: Ensure that payload_len is always initialized
Simon McVittie [Wed, 25 Sep 2024 13:38:31 +0000 (14:38 +0100)] 
dbus-spam: Ensure that payload_len is always initialized

A command like `dbus-test-tool spam --payload=abcde --bytes` could
previously have left the length uninitialized.

Detected by compiling with gcc 14.

Signed-off-by: Simon McVittie <smcv@collabora.com>
15 months agosysdeps: Avoid passing possibly null port-number string to printf %s
Simon McVittie [Wed, 25 Sep 2024 13:36:13 +0000 (14:36 +0100)] 
sysdeps: Avoid passing possibly null port-number string to printf %s

gcc 14 detects that port can be NULL here, which is technically invalid
to pass to printf (although many implementations print it as "(null)").
Becuase we're using getaddrinfo(), we treat a NULL service (port number
string) as a request to listen on "port 0", meaning we ask the kernel to
assign an arbitrary nonzero port for us; when printing addresses in
error messages, treating that as port 0 seems reasonable.

Signed-off-by: Simon McVittie <smcv@collabora.com>
15 months agomaint: Remove leftover Autotools references
Simon McVittie [Wed, 25 Sep 2024 13:18:24 +0000 (14:18 +0100)] 
maint: Remove leftover Autotools references

Signed-off-by: Simon McVittie <smcv@collabora.com>
15 months agoAUTHORS: Update
Simon McVittie [Wed, 25 Sep 2024 13:14:45 +0000 (14:14 +0100)] 
AUTHORS: Update

Signed-off-by: Simon McVittie <smcv@collabora.com>
15 months agoUpdate NEWS
Simon McVittie [Wed, 25 Sep 2024 12:16:51 +0000 (13:16 +0100)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
16 months agoMerge branch 'uid_t' into 'master'
Simon McVittie [Tue, 13 Aug 2024 15:34:06 +0000 (15:34 +0000)] 
Merge branch 'uid_t' into 'master'

dbus-sysdeps-unix: don't add (uid_t)-1 to creds

See merge request dbus/dbus!464

16 months agodbus-sysdeps-unix: don't add (uid_t)-1 to creds
Alyssa Ross [Mon, 22 Jul 2024 08:08:05 +0000 (10:08 +0200)] 
dbus-sysdeps-unix: don't add (uid_t)-1 to creds

If I set a breakpoint on the call to _dbus_credentials_add_unix_uid
further down in this function and run the loopback test, I can see
that sometimes it's getting called with a uid of 4294967295.  This is
not intended, but happens because the -1 value returned from
SO_PEERCRED is interpreted as a uid of 4294967295, because if uid_t is
unsigned, it won't be sign extended when assigned to uid_read.

As far as I can tell, every other API used in this function to get
uid/gid on some system returns an error when there's no credential
information (e.g. on a non-unix socket), rather than returning -1, so
they shouldn't have to do this check.

Fixes: 01af5ff4 ("add credentials support, add EXTERNAL auth mechanism")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
16 months agoMerge branch 'test-deps' into 'master'
Simon McVittie [Tue, 13 Aug 2024 15:10:59 +0000 (15:10 +0000)] 
Merge branch 'test-deps' into 'master'

test: add missing test dependencies

See merge request dbus/dbus!465

16 months agotest: add missing test dependencies
Alyssa Ross [Thu, 25 Jul 2024 08:49:50 +0000 (10:49 +0200)] 
test: add missing test dependencies

This fixes doing "meson setup" followed by "meson test", without doing
a full build in between.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
16 months agoMerge branch 'tty' into 'master'
Simon McVittie [Mon, 29 Jul 2024 12:21:02 +0000 (12:21 +0000)] 
Merge branch 'tty' into 'master'

test: use "tty" group rather than "bin"

Closes #514

See merge request dbus/dbus!466

16 months agotest: use "tty" group rather than "bin"
Alyssa Ross [Sun, 28 Jul 2024 10:50:37 +0000 (12:50 +0200)] 
test: use "tty" group rather than "bin"

Unlike "bin", "tty" actually means something on modern Linux distros,
and is used by a default udev rule, so it's more likely to exist on
distros than a group that just exists for historical compatibility
with who knows what.

"tty" exists on macOS, Debian, and Fedora (the criteria used for
choosing "bin" in f2905def ("policy tests: Use bin rather than
nogroup, wheel, or root")), but also fixes running the bus test for me
on NixOS, which has "tty" but not "bin".

Closes: https://gitlab.freedesktop.org/dbus/dbus/-/issues/514
Signed-off-by: Alyssa Ross <hi@alyssa.is>
17 months agoMerge branch 'macros' into 'master'
Simon McVittie [Thu, 25 Jul 2024 15:17:15 +0000 (15:17 +0000)] 
Merge branch 'macros' into 'master'

build: fix macro mistakes

See merge request dbus/dbus!463

17 months agomeson: fix name of DBUS_ENABLE_LAUNCHD macro
Alyssa Ross [Sun, 21 Jul 2024 12:24:13 +0000 (14:24 +0200)] 
meson: fix name of DBUS_ENABLE_LAUNCHD macro

This is the name used previously by autoconf, and still used by the C
code.  Presumably this meant that the launchd ended up never being
built with Meson, even if launchd support was enabled.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Fixes: cd2e3826 ("Add Meson build system")
17 months agobuild: remove unused macros
Alyssa Ross [Sun, 21 Jul 2024 12:22:44 +0000 (14:22 +0200)] 
build: remove unused macros

These were/are used as autoconf/CMake variable names, but were never
used by C code, so there's no need to export them as macros.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Fixes: dca6591f ("Keep cmake defines GLIB_VERSION_... in sync with autotools.")
Fixes: cd2e3826 ("Add Meson build system")
18 months agoMerge branch 'fix-dbus-send-manpage' into 'master'
Ralf Habacker [Mon, 27 May 2024 15:24:18 +0000 (15:24 +0000)] 
Merge branch 'fix-dbus-send-manpage' into 'master'

Document the return value of dbus-send tool.

Closes #452

See merge request dbus/dbus!397

18 months agoDocument the return value of dbus-send tool.
Philip Withnall [Mon, 27 May 2024 15:24:18 +0000 (15:24 +0000)] 
Document the return value of dbus-send tool.

18 months agoCI: Disable "debian mingw64 meson debug" until #509 is fixed
Ralf Habacker [Mon, 27 May 2024 14:34:50 +0000 (16:34 +0200)] 
CI: Disable "debian mingw64 meson debug" until #509 is fixed

See #509

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
19 months agoMerge branch 'string-int-append' into 'master'
Ralf Habacker [Sat, 18 May 2024 12:31:46 +0000 (12:31 +0000)] 
Merge branch 'string-int-append' into 'master'

sysdeps: Remove _dbus_string_append_int(), _uint()

See merge request dbus/dbus!445

19 months agosysdeps: Remove _dbus_string_append_int()
Simon McVittie [Wed, 23 Aug 2023 11:04:33 +0000 (12:04 +0100)] 
sysdeps: Remove _dbus_string_append_int()

It's a wrapper around snprintf(), so we are not gaining any efficiency
versus _dbus_string_append_printf(), and might as well use the more
general function instead. Doing it this way might even be a little *more*
efficient, since it reduces reallocations; it's certainly more concise.

Signed-off-by: Simon McVittie <smcv@collabora.com>
19 months agosysdeps: Remove _dbus_string_append_uint()
Simon McVittie [Wed, 23 Aug 2023 10:57:44 +0000 (11:57 +0100)] 
sysdeps: Remove _dbus_string_append_uint()

It's a wrapper around snprintf(), so we are not gaining any efficiency
versus _dbus_string_append_printf(), and might as well use the more
general function instead.

Signed-off-by: Simon McVittie <smcv@collabora.com>
19 months agoMerge branch 'document-send-with-reply' into 'master'
Ralf Habacker [Sat, 18 May 2024 12:00:02 +0000 (12:00 +0000)] 
Merge branch 'document-send-with-reply' into 'master'

Document ownership of reference in dbus_connection_send_with_reply()

See merge request dbus/dbus!455

19 months agoDocument ownership of reference in dbus_connection_send_with_reply()
Wiebe Cazemier [Mon, 19 Feb 2024 13:20:39 +0000 (14:20 +0100)] 
Document ownership of reference in dbus_connection_send_with_reply()

Signed-off-by: Wiebe Cazemier <wiebe@ytec.nl>
19 months agoMerge branch 'update_api_design_doc' into 'master'
Simon McVittie [Fri, 10 May 2024 10:49:57 +0000 (10:49 +0000)] 
Merge branch 'update_api_design_doc' into 'master'

doc/dbus-api-design: Update Bustle URL and replace deprecated D-Feet with d-spy

See merge request dbus/dbus!460

19 months agodoc/dbus-api-design: Replace D-Feet with d-spy
Ludovico de Nittis [Fri, 10 May 2024 10:07:09 +0000 (12:07 +0200)] 
doc/dbus-api-design: Replace D-Feet with d-spy

D-Feet is no longer maintained and its closest replacement, as mentioned
in the D-Feet page https://wiki.gnome.org/Apps/DFeet, is d-spy.

The project description doesn't need to be updated because d-spy
provides the same set of features that D-Feet had.

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
19 months agodoc/dbus-api-design: Update Bustle URL
Ludovico de Nittis [Fri, 10 May 2024 10:02:13 +0000 (12:02 +0200)] 
doc/dbus-api-design: Update Bustle URL

gitlab.fd.o/bustle/bustle points to the old archived project. The new
version has been rewritten in Rust and is now hosted at
gitlab.gnome.org/World/bustle

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
20 months agoMerge branch 'cmake-fixes' into 'master'
Ralf Habacker [Wed, 17 Apr 2024 09:54:46 +0000 (09:54 +0000)] 
Merge branch 'cmake-fixes' into 'master'

cmake: complete installed files

Closes #504

See merge request dbus/dbus!459

20 months agocmake: Inclusion of a link in html overview file corrected
Ralf Habacker [Tue, 2 Apr 2024 10:53:29 +0000 (12:53 +0200)] 
cmake: Inclusion of a link in html overview file corrected

The link for api documentation is now only inserted into the html
overview file when it is built.

20 months agocmake: Add missing docbook-based documentation
Ralf Habacker [Tue, 2 Apr 2024 10:48:35 +0000 (12:48 +0200)] 
cmake: Add missing docbook-based documentation

With this commit, the html documentation for dbus-faq, dbus-specification,
dbus-test-plan, dbus-tutorial is now also created and installed.