Commit graph

6916 commits

Author SHA1 Message Date
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
Simon McVittie
4a99452aab 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>
2024-10-01 14:30:02 +01:00
Simon McVittie
6c8f4f0d65 CI: Comment opensuse mingw32 cmake as known-failing
See dbus#520

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-01 14:30:02 +01:00
Simon McVittie
34284edecf 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>
2024-10-01 14:29:50 +01:00
Simon McVittie
c3ef9c9805 Merge branch 'more-test-deps' into 'master'
build: test/name-test/run-test.sh needs dbus-launch

See merge request dbus/dbus!468
2024-10-01 12:00:13 +00:00
Simon McVittie
e01e03cf97 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>
2024-10-01 11:59:52 +00:00
Simon McVittie
5f5cd5d65e Merge branch 'fix-519' into 'master'
cmake: install api docs in html subdir

Closes #519

See merge request dbus/dbus!473
2024-10-01 11:22:00 +00:00
Ralf Habacker
522633b4f9 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
2024-09-27 17:51:40 +02:00
Simon McVittie
21e94c209d Start changelog for v1.15.12
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-09-25 21:02:02 +01:00
Simon McVittie
ebc9117525 Prepare v1.15.10
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-09-25 15:16:47 +01:00
Simon McVittie
0800f981da Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-09-25 15:15:59 +01:00
Simon McVittie
ced843dca6 Merge branch 'gcc-14' into 'master'
Fix compiler warnings/errors with gcc 14

See merge request dbus/dbus!469
2024-09-25 14:12:46 +00:00
Simon McVittie
c2930ddf82 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>
2024-09-25 14:42:15 +01:00
Simon McVittie
dc8b50910d 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>
2024-09-25 14:42:15 +01:00
Simon McVittie
a936c7c4d5 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>
2024-09-25 14:42:15 +01:00
Simon McVittie
d8eaa77f43 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>
2024-09-25 14:42:15 +01:00
Simon McVittie
408fc1793b maint: Remove leftover Autotools references
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-09-25 14:18:24 +01:00
Simon McVittie
e097d44e22 AUTHORS: Update
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-09-25 14:14:45 +01:00
Simon McVittie
2eee1824ad Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-09-25 13:16:51 +01:00
Simon McVittie
a7312bfbd8 Merge branch 'uid_t' into 'master'
dbus-sysdeps-unix: don't add (uid_t)-1 to creds

See merge request dbus/dbus!464
2024-08-13 15:34:06 +00:00
Alyssa Ross
5ff177d2e2 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>
2024-08-13 15:11:23 +00:00
Simon McVittie
b8d7afa263 Merge branch 'test-deps' into 'master'
test: add missing test dependencies

See merge request dbus/dbus!465
2024-08-13 15:10:59 +00:00
Alyssa Ross
55e60abe18 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>
2024-07-29 14:09:37 +00:00
Simon McVittie
3d8b06a421 Merge branch 'tty' into 'master'
test: use "tty" group rather than "bin"

Closes #514

See merge request dbus/dbus!466
2024-07-29 12:21:02 +00:00
Alyssa Ross
3f988b9fb3
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>
2024-07-28 12:50:37 +02:00
Simon McVittie
9724c592a5 Merge branch 'macros' into 'master'
build: fix macro mistakes

See merge request dbus/dbus!463
2024-07-25 15:17:15 +00:00
Alyssa Ross
02ae9dfdbd
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")
2024-07-21 19:52:28 +02:00
Alyssa Ross
3e24ee1e27
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")
2024-07-21 19:52:16 +02:00
Ralf Habacker
68637759b9 Merge branch 'fix-dbus-send-manpage' into 'master'
Document the return value of dbus-send tool.

Closes #452

See merge request dbus/dbus!397
2024-05-27 15:24:18 +00:00
Philip Withnall
a5f8ee16ca Document the return value of dbus-send tool. 2024-05-27 15:24:18 +00:00
Ralf Habacker
fad4fc38ae CI: Disable "debian mingw64 meson debug" until #509 is fixed
See #509

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2024-05-27 16:35:04 +02:00
Ralf Habacker
750cef4baf Merge branch 'string-int-append' into 'master'
sysdeps: Remove _dbus_string_append_int(), _uint()

See merge request dbus/dbus!445
2024-05-18 12:31:46 +00:00
Simon McVittie
e159f1f406 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>
2024-05-18 12:19:16 +00:00
Simon McVittie
ac20c7a4ec 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>
2024-05-18 12:19:16 +00:00
Ralf Habacker
0e8d9d2c99 Merge branch 'document-send-with-reply' into 'master'
Document ownership of reference in dbus_connection_send_with_reply()

See merge request dbus/dbus!455
2024-05-18 12:00:02 +00:00
Wiebe Cazemier
da58b29399 Document ownership of reference in dbus_connection_send_with_reply()
Signed-off-by: Wiebe Cazemier <wiebe@ytec.nl>
2024-05-18 11:00:25 +00:00
Simon McVittie
42327d71f4 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
2024-05-10 10:49:57 +00:00
Ludovico de Nittis
236aef6e18 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>
2024-05-10 12:07:09 +02:00
Ludovico de Nittis
4bd2b52b23 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>
2024-05-10 12:02:13 +02:00
Ralf Habacker
e277bf9070 Merge branch 'cmake-fixes' into 'master'
cmake: complete installed files

Closes #504

See merge request dbus/dbus!459
2024-04-17 09:54:46 +00:00