]> git.ipfire.org Git - thirdparty/dbus.git/log
thirdparty/dbus.git
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

14 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>
14 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>
14 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>
14 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

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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.

20 months agoMerge branch 'autolaunch-regression' into 'master'
Ralf Habacker [Tue, 9 Apr 2024 06:27:52 +0000 (06:27 +0000)] 
Merge branch 'autolaunch-regression' into 'master'

sysdeps-win: Fix autolaunch: regression on Windows

Closes #503

See merge request dbus/dbus!458

20 months agosysdeps-win: Fix autolaunch: regression on Windows
Thomas Sondergaard [Sat, 6 Apr 2024 17:29:15 +0000 (19:29 +0200)] 
sysdeps-win: Fix autolaunch: regression on Windows

Commit f20a05f60f6f included in dbus-1.15.0 broke autolaunch: on
Windows. autolaunch_custom_command_line_parameter shall be initalized
to null as it is later used in only one place in the code, with this
ternary:

    autolaunch_custom_command_line_parameter ? autolaunch_custom_command_line_parameter : "--session"

Closes #503

22 months agoMerge branch 'master' into 'master'
Simon McVittie [Mon, 29 Jan 2024 13:54:19 +0000 (13:54 +0000)] 
Merge branch 'master' into 'master'

bus/dir-watch:Do not crash when reloading configuration with > 128 dirs

Closes #481

See merge request dbus/dbus!453

22 months agoDo not crash when reloading configuration with > 128 dirs
hongjinghao [Thu, 4 Jan 2024 07:15:53 +0000 (15:15 +0800)] 
Do not crash when reloading configuration with > 128 dirs

When `dbus-daemon` sets more than 128 directories for `XDG_DATA_DIRS`,
none of the elements in `new_dirs` will be `NULL`, which resulted in
these loops reading out-of-bounds (undefined behaviour). In practice
this led to a crash.

To avoid this, make sure to stop iteration at the end of the array.

[smcv: Expanded commit message]
Resolves: dbus/dbus#481

23 months agoMerge branch 'meson-visual-studio-2022' into 'master'
Simon McVittie [Mon, 15 Jan 2024 20:00:43 +0000 (20:00 +0000)] 
Merge branch 'meson-visual-studio-2022' into 'master'

meson: Use check_header to confirm headers work

Closes #494

See merge request dbus/dbus!454

23 months agomeson: Use check_header to confirm headers work
Thomas Sondergaard [Thu, 4 Jan 2024 16:45:46 +0000 (17:45 +0100)] 
meson: Use check_header to confirm headers work

instead of using has_header use check_header to confirm the header
works. This is necessary to get the meson build to work with Visual
Studio 2022. It has <stdatomic.h> but it does not actually work when
compiling a C program. A minimal C program that include <stdatomic.h>
fails with the following errors:

    C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(36): error C2061: syntax error: identifier 'atomic_bool'
    C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(36): error C2059: syntax error: ';'
    C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(37): error C2061: syntax error: identifier 'atomic_char'
    C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(37): error C2059: syntax error: ';'
    ...
    ...

check_header is consistent with CMake's

    check_include_file(stdatomic.h  HAVE_STDATOMIC_H)

which is why the CMake-based build of dbus works with Visual Studio
2022, while the meson build doesn't.

Fixes #494

2 years agoMerge branch 'issue489' into 'master'
Ralf Habacker [Fri, 1 Dec 2023 21:45:18 +0000 (21:45 +0000)] 
Merge branch 'issue489' into 'master'

CI: Fix more test failures

Closes #489 and #488

See merge request dbus/dbus!452

2 years agoCI: Set language environment variables to safe values
Simon McVittie [Fri, 1 Dec 2023 19:10:50 +0000 (19:10 +0000)] 
CI: Set language environment variables to safe values

Recent versions of glibc support C.UTF-8 natively, and both Debian and
openSUSE (which we use for our CI) have been patching it into our glibc
versions for several years before that.

Helps: https://gitlab.freedesktop.org/dbus/dbus/-/issues/488
Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Don't re-run the tests when preparing to build as a subproject
Simon McVittie [Fri, 1 Dec 2023 19:03:49 +0000 (19:03 +0000)] 
CI: Don't re-run the tests when preparing to build as a subproject

After running the test suite, we don't need (or want) to re-run the test
suite as a side-effect of producing a dist tarball. Historically, this
test-case used Autotools `make dist`, not `make distcheck`, but when
we removed the Autotools build system, it was replaced with
`meson dist` (similar to Autotools `make distcheck`). Change that to
`meson dist --no-tests`, which is more like Autotools `make dist` as
originally intended.

In particular, when we re-ran the test suite, we weren't filtering out
the time-consuming and timeout-prone tests that emulate malloc()
failures, which we don't normally intend to run in CI.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/489
Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Remove meson-dist and cmake-dist build systems
Simon McVittie [Fri, 1 Dec 2023 19:00:20 +0000 (19:00 +0000)] 
CI: Remove meson-dist and cmake-dist build systems

Before we removed the Autotools build system, these meant: do a
`make dist` with Autotools, then unpack the resulting tarball, and build
it with Meson or CMake (as appropriate). This was important because the
contents of an Autotools `make dist` differed significantly from what's
in git: only the files that were explicitly declared as sources in the
Autotools build system were distributed, and Autotools would also add its
own generated cruft.

Now that we're doing releases with Meson, the official source release
artifact is basically `git archive`, so there's much less need to
distinguish between official source releases and what's in git, and these
variant build systems became simple aliases for meson and cmake.
Remove those aliases from tools/ci-build.sh, and stop using them in
.gitlab-ci.yml.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoMerge branch 'fix-ci-build' into 'master'
Simon McVittie [Fri, 1 Dec 2023 18:09:05 +0000 (18:09 +0000)] 
Merge branch 'fix-ci-build' into 'master'

CI: force update opensuse image to a newer version

Closes #487

See merge request dbus/dbus!451

2 years agoCI: on openSUSE use cmake from the windows:mingw project instead from devel:tools...
Ralf Habacker [Fri, 1 Dec 2023 16:18:01 +0000 (17:18 +0100)] 
CI: on openSUSE use cmake from the windows:mingw project instead from devel:tools:building

Since this repo is already used for mingw builds, the additional repo and
associated problems can be avoided.

2 years agoCI: add hint when to update the build images
Ralf Habacker [Fri, 1 Dec 2023 15:51:54 +0000 (16:51 +0100)] 
CI: add hint when to update the build images

2 years agoCI: force update opensuse image to a newer version
Ralf Habacker [Fri, 1 Dec 2023 15:44:07 +0000 (16:44 +0100)] 
CI: force update opensuse image to a newer version

Since a time-frozen image is used in the CI, the tag must be changed to
update to a newer minor version.

Fixes #487

2 years agoUpdate NEWS
Simon McVittie [Fri, 1 Sep 2023 16:26:54 +0000 (17:26 +0100)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoMerge branch 'remove-autotools-support' into 'master'
Simon McVittie [Fri, 1 Sep 2023 16:06:10 +0000 (16:06 +0000)] 
Merge branch 'remove-autotools-support' into 'master'

Remove autotools build support

Closes #443

See merge request dbus/dbus!378

2 years agoREADME,INSTALL: remove references to the autotools build system
Ralf Habacker [Mon, 21 Aug 2023 21:35:58 +0000 (23:35 +0200)] 
README,INSTALL: remove references to the autotools build system

2 years ago.gitignore: remove autotools related files and pattern
Ralf Habacker [Mon, 2 Jan 2023 15:45:21 +0000 (16:45 +0100)] 
.gitignore: remove autotools related files and pattern

2 years agoRemove autotools related files
Ralf Habacker [Mon, 21 Aug 2023 21:34:51 +0000 (23:34 +0200)] 
Remove autotools related files

2 years agoRemove autotools support from CI jobs
Ralf Habacker [Mon, 21 Aug 2023 21:34:10 +0000 (23:34 +0200)] 
Remove autotools support from CI jobs

The 'debian mingw32 autotools debug' job was replaced with a corresponding
meson related job named 'debian mingw32 meson debug' and the remaining
autotools related jobs were removed.

The drop in replacement job for 'debian mingw64 autotools' is
'debian mingw32 meson' and is now build by default.

2 years agoMerge branch 'fix-y2038' into 'master'
Simon McVittie [Thu, 24 Aug 2023 13:13:37 +0000 (13:13 +0000)] 
Merge branch 'fix-y2038' into 'master'

time: use dbus_int64_t for seconds instead of long

See merge request dbus/dbus!444

2 years agotime: use dbus_int64_t for seconds instead of long
Alexander Kanavin [Tue, 22 Aug 2023 12:02:16 +0000 (14:02 +0200)] 
time: use dbus_int64_t for seconds instead of long

On 32 bit systems long will overflow in 2038, causing complete breakage.
This is confirmed by running dbus's test suite on a 32 bit system
with system time set to 2040 (and configured to use 64 bit time_t of course).

Note that both timespec and timeval are specified with time_t for the
seconds component. This should propagate everywhere where that data is
passed and stored, but previously _dbus_get_monotonic_time() and
_dbus_get_monotonic_time() would truncate it to long.

Also add a function for parsing dbus_int64_t from
files, as existing functions can only handle long.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
2 years agoStart 1.15.10 development
Simon McVittie [Mon, 21 Aug 2023 19:53:07 +0000 (20:53 +0100)] 
Start 1.15.10 development

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoPrepare v1.15.8 dbus-1.15.8
Simon McVittie [Mon, 21 Aug 2023 17:17:15 +0000 (18:17 +0100)] 
Prepare v1.15.8

Signed-off-by: Simon McVittie <smcv@collabora.com>