]> git.ipfire.org Git - thirdparty/dbus.git/log
thirdparty/dbus.git
12 months agoMerge branch 'dbus-1.16'
Simon McVittie [Wed, 11 Dec 2024 16:21:26 +0000 (16:21 +0000)] 
Merge branch 'dbus-1.16'

12 months agoPost-release version bump
Simon McVittie [Wed, 11 Dec 2024 16:21:01 +0000 (16:21 +0000)] 
Post-release version bump

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoPrepare v1.15.92 dbus-1.15.92
Simon McVittie [Wed, 11 Dec 2024 13:27:54 +0000 (13:27 +0000)] 
Prepare v1.15.92

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoUpdate NEWS
Simon McVittie [Wed, 11 Dec 2024 13:19:40 +0000 (13:19 +0000)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'dbus-1.16'
Simon McVittie [Wed, 11 Dec 2024 13:16:16 +0000 (13:16 +0000)] 
Merge branch 'dbus-1.16'

12 months agoUpdate NEWS
Simon McVittie [Wed, 11 Dec 2024 13:16:10 +0000 (13:16 +0000)] 
Update NEWS

dbus!501 intentionally not mentioned here, it's a purely internal change.

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agocmake: Use a better bug reference
Simon McVittie [Wed, 11 Dec 2024 13:02:57 +0000 (13:02 +0000)] 
cmake: Use a better bug reference

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 648f4c2c372aac207e711429886e84810ef0c387)

12 months agobus: Update a build system cross-reference
Simon McVittie [Tue, 10 Dec 2024 11:00:28 +0000 (11:00 +0000)] 
bus: Update a build system cross-reference

We no longer have an Autotools build system, but Meson sets the same
environment variables that Autotools used to set. CMake does not, yet,
but ideally should.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/538
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 229e48f549dfb1af891545fd978974dd462777da)

12 months agosysdeps-unix: Report missing launchd session bus as non-fatal
Mohamed Akram [Tue, 10 Dec 2024 13:30:19 +0000 (17:30 +0400)] 
sysdeps-unix: Report missing launchd session bus as non-fatal

init_connections_unlocked() is called when connecting to any of the
well-known buses, and it initializes all of the well-known addresses:
session, system and starter. This means that a failure here causes
failure to connect to any one of the well-known buses, even if the
failure is actually only relevant to a different well-known bus.
As such, it should only fail on genuinely fatal errors, for example
an out-of-memory condition. It calls init_session_address() and
indirectly _dbus_lookup_session_address(), which therefore need to
have similar behaviour.

Previously, _dbus_lookup_session_address() would fail with a
fatal error whenever the macOS session bus was not correctly set up,
but that breaks the ability to connect to the system bus on macOS,
even though the system bus is not directly related to the session bus.
Instead, we should report a missing session bus as "not supported",
reserving an unsuccessful result for fatal situations like
out-of-memory. This brings _dbus_lookup_session_address_launchd()
into line with the error behaviour of _dbus_lookup_user_bus().

Closes: #510
(cherry picked from commit 827e952793b6ddda1bd84da3ae9f46204661cd6e)

12 months agocmake: Use a better bug reference
Simon McVittie [Wed, 11 Dec 2024 13:02:57 +0000 (13:02 +0000)] 
cmake: Use a better bug reference

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'issue538' into 'master'
Simon McVittie [Wed, 11 Dec 2024 12:51:55 +0000 (12:51 +0000)] 
Merge branch 'issue538' into 'master'

bus: Update a build system cross-reference

Closes #538

See merge request dbus/dbus!501

12 months agobus: Update a build system cross-reference
Simon McVittie [Tue, 10 Dec 2024 11:00:28 +0000 (11:00 +0000)] 
bus: Update a build system cross-reference

We no longer have an Autotools build system, but Meson sets the same
environment variables that Autotools used to set. CMake does not, yet,
but ideally should.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/538
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'diagnose-leaked-fd' into 'master'
Simon McVittie [Wed, 11 Dec 2024 12:50:14 +0000 (12:50 +0000)] 
Merge branch 'diagnose-leaked-fd' into 'master'

_dbus_check_fdleaks_leave: Try to describe what the leaked fd is

See merge request dbus/dbus!503

12 months ago_dbus_check_fdleaks_leave: Try to describe what the leaked fd is
Simon McVittie [Tue, 10 Dec 2024 13:54:00 +0000 (13:54 +0000)] 
_dbus_check_fdleaks_leave: Try to describe what the leaked fd is

Similar to ebf487ef, but in a different situation.

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'fix-macos-system-bus' into 'master'
Simon McVittie [Tue, 10 Dec 2024 16:53:11 +0000 (16:53 +0000)] 
Merge branch 'fix-macos-system-bus' into 'master'

sysdeps-unix: Report missing launchd session bus as non-fatal

Closes #510

See merge request dbus/dbus!461

12 months agosysdeps-unix: Report missing launchd session bus as non-fatal
Mohamed Akram [Tue, 10 Dec 2024 13:30:19 +0000 (17:30 +0400)] 
sysdeps-unix: Report missing launchd session bus as non-fatal

init_connections_unlocked() is called when connecting to any of the
well-known buses, and it initializes all of the well-known addresses:
session, system and starter. This means that a failure here causes
failure to connect to any one of the well-known buses, even if the
failure is actually only relevant to a different well-known bus.
As such, it should only fail on genuinely fatal errors, for example
an out-of-memory condition. It calls init_session_address() and
indirectly _dbus_lookup_session_address(), which therefore need to
have similar behaviour.

Previously, _dbus_lookup_session_address() would fail with a
fatal error whenever the macOS session bus was not correctly set up,
but that breaks the ability to connect to the system bus on macOS,
even though the system bus is not directly related to the session bus.
Instead, we should report a missing session bus as "not supported",
reserving an unsuccessful result for fatal situations like
out-of-memory. This brings _dbus_lookup_session_address_launchd()
into line with the error behaviour of _dbus_lookup_user_bus().

Closes: #510
12 months agoStart NEWS for 1.17.x
Simon McVittie [Tue, 10 Dec 2024 16:06:21 +0000 (16:06 +0000)] 
Start NEWS for 1.17.x

For now, the changes that have happened in parallel on the 1.16.x branch
are listed under 1.15.91.

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'dbus-1.16'
Simon McVittie [Tue, 10 Dec 2024 16:05:20 +0000 (16:05 +0000)] 
Merge branch 'dbus-1.16'

12 months agoUpdate NEWS for 1.16.x
Simon McVittie [Tue, 10 Dec 2024 16:00:26 +0000 (16:00 +0000)] 
Update NEWS for 1.16.x

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agotests: Exercise NSS group lookup before running tests
Simon McVittie [Tue, 10 Dec 2024 14:31:59 +0000 (14:31 +0000)] 
tests: Exercise NSS group lookup before running tests

Similar to #256, NSS plugins might open file descriptors the first time
they look up a system group, and leave them open. To avoid detecting
this as a leak, do one group lookup (which we expect to fail) before
starting testing, so that the fd is already open the first time we
call _dbus_check_fdleaks_enter(), and therefore is not considered to
have been leaked in _dbus_check_fdleaks_leave().

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/540
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 7cbb7b75dd2803fcb0c6edb18d5c43e4eaeee704)

12 months agosysdeps: Don't check for PROC_SUPER_MAGIC if it isn't defined
Simon McVittie [Mon, 9 Dec 2024 23:22:17 +0000 (23:22 +0000)] 
sysdeps: Don't check for PROC_SUPER_MAGIC if it isn't defined

Debian GNU/Hurd has fstatfs() but not PROC_SUPER_MAGIC.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/539
Bug-Debian: https://bugs.debian.org/1089641
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 5d7b87496f3bb094b926692036ae656c31efdd8e)

12 months agointernals: Use negative numbers to indicate no malloc failure simulation
Simon McVittie [Mon, 9 Dec 2024 17:12:18 +0000 (17:12 +0000)] 
internals: Use negative numbers to indicate no malloc failure simulation

If we set the countdown to simulating a failed allocation to
_DBUS_INT_MAX, then it will decrement every time we allocate memory,
eventually reaching 0 and triggering a simulated malloc failure.
In practice this does not happen during unit testing, because all of
our tests are (intentionally!) short enough that this can't happen,
but it can happen if a build of dbus with embedded tests enabled is
used for the "real" dbus-daemon or a "real" D-Bus service, either
during debugging or unintentionally, as noted on dbus/dbus!493.

We cannot simply special-case `_DBUS_INT_MAX` to never be decremented,
because _dbus_test_oom_handling() relies on the counter being
decremented even while we are not simulating malloc failure, as a way
to count the number of allocations as an upper bound for how long to
set the countdown during subsequent test runs.

Instead, reserve all negative numbers to represent the absence of
malloc failure simulation, while still being able to count allocations
by comparing two different negative numbers.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/535
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 0735c401a7b3c9e56096fcde8139e773067302bd)

12 months agocmake: Make intrusive (formerly embedded) tests into a separate option
Simon McVittie [Mon, 9 Dec 2024 18:16:46 +0000 (18:16 +0000)] 
cmake: Make intrusive (formerly embedded) tests into a separate option

Previously, the CMake build enabled tests by default, and enabled both
modular and intrusive (embedded) tests with a single option. This is
a really bad idea if anyone is using CMake-built binaries in production.

DBUS_BUILD_TESTS now enables only the modular tests, which are safe to
enable in production builds.

A new DBUS_ENABLE_INTRUSIVE_TESTS option enables the intrusive test
instrumentation.

To preserve existing test coverage, explicitly enable the intrusive
tests in most CMake-based Gitlab-CI jobs (Debian native, openSUSE native,
Windows).

In jobs that have a mirrored pair of production/debug builds (openSUSE
and Debian mingw32/mingw64 cmake), instead we leave the production
build as-is and only build full test coverage in the debug build.

Co-authored-by: Philip Withnall <philip@tecnocode.co.uk>
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 41c7570e1ea803e9635d9bcabba5fc221c94e7e6)

12 months agoRename "embedded tests" to "intrusive tests"
Simon McVittie [Mon, 9 Dec 2024 17:45:32 +0000 (17:45 +0000)] 
Rename "embedded tests" to "intrusive tests"

This hopefully helps to get across the point that enabling these tests
adds instrumentation to libdbus and dbus-daemon, with a potentially
significant impact on code size, performance and security.

To avoid a huge diffstat which would be difficult to review, the cpp
macro that is checked by most of the C code is still
DBUS_ENABLE_EMBEDDED_TESTS, which is defined or undefined under exactly
the same conditions as the new DBUS_ENABLE_INTRUSIVE_TESTS.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/537
Co-authored-by: Philip Withnall <philip@tecnocode.co.uk>
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 9c5b5838f5ff667225a913f97006816e3e401d55)

12 months agoMerge branch 'issue540' into 'master'
Simon McVittie [Tue, 10 Dec 2024 14:58:02 +0000 (14:58 +0000)] 
Merge branch 'issue540' into 'master'

tests: Exercise NSS group lookup before running tests

Closes #540

See merge request dbus/dbus!504

12 months agotests: Exercise NSS group lookup before running tests
Simon McVittie [Tue, 10 Dec 2024 14:31:59 +0000 (14:31 +0000)] 
tests: Exercise NSS group lookup before running tests

Similar to #256, NSS plugins might open file descriptors the first time
they look up a system group, and leave them open. To avoid detecting
this as a leak, do one group lookup (which we expect to fail) before
starting testing, so that the fd is already open the first time we
call _dbus_check_fdleaks_enter(), and therefore is not considered to
have been leaked in _dbus_check_fdleaks_leave().

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/540
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'issue530' into 'master'
Simon McVittie [Tue, 10 Dec 2024 12:30:37 +0000 (12:30 +0000)] 
Merge branch 'issue530' into 'master'

build: Allow version number to be followed by "-" and a suffix

See merge request dbus/dbus!494

12 months agobuild: Bump version number to 1.16.99-alpha
Simon McVittie [Fri, 6 Dec 2024 17:49:02 +0000 (17:49 +0000)] 
build: Bump version number to 1.16.99-alpha

This is a placeholder for the first release in the 1.17.x branch, which
is not yet ready, but is intended to be labelled as 1.17.0-alpha when
it is released.

Helps: dbus#530
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agobuild: Allow version number to be followed by "-" and a suffix
Simon McVittie [Fri, 6 Dec 2024 17:48:04 +0000 (17:48 +0000)] 
build: Allow version number to be followed by "-" and a suffix

Some distributions are known to have shipped dbus 1.15.x as though it
was a stable release, and it isn't clear whether they knew that we use
the odd/even versioning convention like GLib does.

If we add a -alpha, -beta, -rc suffix to development versions starting
from 1.17.0, then distros that know we use odd/even versioning will
know that our development versions are not a stable-branch, and so will
distros that mistakenly think we use the "semantic versioning"
versioning convention popularized by <https://semver.org/>.

(We intentionally do not use semver, because semver would require us to
ship a new minor version every time we add new API, and we do not have
the resources to provide security support for an unlimited number of
minor versions in parallel: we need to be able to nominate a subset of
our releases as having longer-term security support, in a way that signals
to distros that these are the releases they should prefer to ship.)

CMake's `project()` doesn't allow this version number format[1], but
we intend to use version numbers where the (major, minor, micro) tuple
is enough to uniquely identify a release, so we can just tell CMake our
version number without the suffix and there will be no ambiguity.

Similarly, the dash is not allowed in GNU ld version scripts, so use
the form of the version number without the suffix there.

[1] https://gitlab.kitware.com/cmake/cmake/-/issues/16716

Helps: dbus#530
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'hurd' into 'master'
Simon McVittie [Tue, 10 Dec 2024 11:30:05 +0000 (11:30 +0000)] 
Merge branch 'hurd' into 'master'

sysdeps: Don't check for PROC_SUPER_MAGIC if it isn't defined

Closes #539

See merge request dbus/dbus!500

12 months agosysdeps: Don't check for PROC_SUPER_MAGIC if it isn't defined
Simon McVittie [Mon, 9 Dec 2024 23:22:17 +0000 (23:22 +0000)] 
sysdeps: Don't check for PROC_SUPER_MAGIC if it isn't defined

Debian GNU/Hurd has fstatfs() but not PROC_SUPER_MAGIC.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/539
Bug-Debian: https://bugs.debian.org/1089641
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'issue535' into 'master'
Simon McVittie [Tue, 10 Dec 2024 11:28:49 +0000 (11:28 +0000)] 
Merge branch 'issue535' into 'master'

internals: Use negative numbers to indicate no malloc failure simulation

Closes #535

See merge request dbus/dbus!496

12 months agointernals: Use negative numbers to indicate no malloc failure simulation
Simon McVittie [Mon, 9 Dec 2024 17:12:18 +0000 (17:12 +0000)] 
internals: Use negative numbers to indicate no malloc failure simulation

If we set the countdown to simulating a failed allocation to
_DBUS_INT_MAX, then it will decrement every time we allocate memory,
eventually reaching 0 and triggering a simulated malloc failure.
In practice this does not happen during unit testing, because all of
our tests are (intentionally!) short enough that this can't happen,
but it can happen if a build of dbus with embedded tests enabled is
used for the "real" dbus-daemon or a "real" D-Bus service, either
during debugging or unintentionally, as noted on dbus/dbus!493.

We cannot simply special-case `_DBUS_INT_MAX` to never be decremented,
because _dbus_test_oom_handling() relies on the counter being
decremented even while we are not simulating malloc failure, as a way
to count the number of allocations as an upper bound for how long to
set the countdown during subsequent test runs.

Instead, reserve all negative numbers to represent the absence of
malloc failure simulation, while still being able to count allocations
by comparing two different negative numbers.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/535
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'intrusive' into 'master'
Simon McVittie [Tue, 10 Dec 2024 11:09:26 +0000 (11:09 +0000)] 
Merge branch 'intrusive' into 'master'

Rename "embedded tests" to "intrusive tests"

Closes #537

See merge request dbus/dbus!495

12 months agocmake: Make intrusive (formerly embedded) tests into a separate option
Simon McVittie [Mon, 9 Dec 2024 18:16:46 +0000 (18:16 +0000)] 
cmake: Make intrusive (formerly embedded) tests into a separate option

Previously, the CMake build enabled tests by default, and enabled both
modular and intrusive (embedded) tests with a single option. This is
a really bad idea if anyone is using CMake-built binaries in production.

DBUS_BUILD_TESTS now enables only the modular tests, which are safe to
enable in production builds.

A new DBUS_ENABLE_INTRUSIVE_TESTS option enables the intrusive test
instrumentation.

To preserve existing test coverage, explicitly enable the intrusive
tests in most CMake-based Gitlab-CI jobs (Debian native, openSUSE native,
Windows).

In jobs that have a mirrored pair of production/debug builds (openSUSE
and Debian mingw32/mingw64 cmake), instead we leave the production
build as-is and only build full test coverage in the debug build.

Co-authored-by: Philip Withnall <philip@tecnocode.co.uk>
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoRename "embedded tests" to "intrusive tests"
Simon McVittie [Mon, 9 Dec 2024 17:45:32 +0000 (17:45 +0000)] 
Rename "embedded tests" to "intrusive tests"

This hopefully helps to get across the point that enabling these tests
adds instrumentation to libdbus and dbus-daemon, with a potentially
significant impact on code size, performance and security.

To avoid a huge diffstat which would be difficult to review, the cpp
macro that is checked by most of the C code is still
DBUS_ENABLE_EMBEDDED_TESTS, which is defined or undefined under exactly
the same conditions as the new DBUS_ENABLE_INTRUSIVE_TESTS.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/537
Co-authored-by: Philip Withnall <philip@tecnocode.co.uk>
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agocmake: In client configuration file get DBus1_xxx variables from cmake target
Ralf Habacker [Mon, 1 Nov 2021 12:01:59 +0000 (13:01 +0100)] 
cmake: In client configuration file get DBus1_xxx variables from cmake target

The DBus1_xxx variables defined in DBusConfig.cmake for Windows builds
are currently hard-coded values and independent of those of the underlying
cmake target.
To avoid this, these values are retrieved from the corresponding cmake
target. In addition, the cmake allows the construction of the resulting
relocatable runtime paths.

(cherry picked from commit 29c2e9141a0c0dd850c89b5196fba9fa8eb66d89)

12 months agomemory: Remove redundant guard around _dbus_decrement_fail_alloc_counter()
Simon McVittie [Mon, 9 Dec 2024 18:25:27 +0000 (18:25 +0000)] 
memory: Remove redundant guard around _dbus_decrement_fail_alloc_counter()

This function is already inside `#ifdef DBUS_ENABLE_EMBEDDED_TESTS`
and doesn't need a second layer of the same guard.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 6e61173d6462b2793c213aa13d4392f232d1c6ec)

12 months agoMerge branch 'cmake-fixes' into 'master'
Simon McVittie [Tue, 10 Dec 2024 10:19:57 +0000 (10:19 +0000)] 
Merge branch 'cmake-fixes' into 'master'

cmake: In client configuration file get DBus1_xxx variables from cmake target

See merge request dbus/dbus!499

12 months agocmake: In client configuration file get DBus1_xxx variables from cmake target
Ralf Habacker [Mon, 1 Nov 2021 12:01:59 +0000 (13:01 +0100)] 
cmake: In client configuration file get DBus1_xxx variables from cmake target

The DBus1_xxx variables defined in DBusConfig.cmake for Windows builds
are currently hard-coded values and independent of those of the underlying
cmake target.
To avoid this, these values are retrieved from the corresponding cmake
target. In addition, the cmake allows the construction of the resulting
relocatable runtime paths.

12 months agoMerge branch 'mem-double-guard' into 'master'
Simon McVittie [Mon, 9 Dec 2024 23:26:19 +0000 (23:26 +0000)] 
Merge branch 'mem-double-guard' into 'master'

memory: Remove redundant guard around _dbus_decrement_fail_alloc_counter()

See merge request dbus/dbus!497

12 months agomemory: Remove redundant guard around _dbus_decrement_fail_alloc_counter()
Simon McVittie [Mon, 9 Dec 2024 18:25:27 +0000 (18:25 +0000)] 
memory: Remove redundant guard around _dbus_decrement_fail_alloc_counter()

This function is already inside `#ifdef DBUS_ENABLE_EMBEDDED_TESTS`
and doesn't need a second layer of the same guard.

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agorelease-checklist: Use a more copy-paste'able scp/rsync destination
Simon McVittie [Mon, 9 Dec 2024 17:06:29 +0000 (17:06 +0000)] 
release-checklist: Use a more copy-paste'able scp/rsync destination

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 7dc12d17c8c6908205e2f220e579c88c0068d56e)

12 months agorelease-checklist: Give a better reference for deprecation warnings
Simon McVittie [Mon, 9 Dec 2024 17:06:06 +0000 (17:06 +0000)] 
release-checklist: Give a better reference for deprecation warnings

Commit 4ebb275ab7 disabled deprecation warnings in the Autotools build
system, which we no longer have. Future stable-branches will want to
disable deprecation warnings in Meson instead.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit f651834427a603e6ac81758e5a300dca3cbe077a)

12 months agorelease-checklist: Fix sequencing
Simon McVittie [Mon, 9 Dec 2024 17:04:39 +0000 (17:04 +0000)] 
release-checklist: Fix sequencing

`meson dist` requires the version you intend to release to have been
committed already, and does not create any generated files in the
`${srcdir}` that are intended to be committed to git.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit b97b083f9a0600c51f702cfd452755e8c0625de2)

12 months agorelease-checklist: Use a more copy-paste'able scp/rsync destination
Simon McVittie [Mon, 9 Dec 2024 17:06:29 +0000 (17:06 +0000)] 
release-checklist: Use a more copy-paste'able scp/rsync destination

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agorelease-checklist: Give a better reference for deprecation warnings
Simon McVittie [Mon, 9 Dec 2024 17:06:06 +0000 (17:06 +0000)] 
release-checklist: Give a better reference for deprecation warnings

Commit 4ebb275ab7 disabled deprecation warnings in the Autotools build
system, which we no longer have. Future stable-branches will want to
disable deprecation warnings in Meson instead.

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agorelease-checklist: Fix sequencing
Simon McVittie [Mon, 9 Dec 2024 17:04:39 +0000 (17:04 +0000)] 
release-checklist: Fix sequencing

`meson dist` requires the version you intend to release to have been
committed already, and does not create any generated files in the
`${srcdir}` that are intended to be committed to git.

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months ago_dbus_loop_iterate: Fix OOM retry timeout handling
Petr Malat [Wed, 4 Dec 2024 09:30:24 +0000 (10:30 +0100)] 
_dbus_loop_iterate: Fix OOM retry timeout handling

If there is a pending OOM watch and at the same time there is no
timeout, poll is entered with infinite timeout, because infinite
is expressed with a negative number, which is smaller than any
actual timeout.

Introduce min_poll_timeout(), which returns the smaller non-negative
number of the two, or the larger negative number if both numbers
are negative.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/536
Signed-off-by: Petr Malat <oss@malat.biz>
[smcv: adjust whitespace]
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit a6023f49acfda099a7ccac9ebd804d553ec9d666)

12 months agoMerge branch 'oom_retry_tmout' into 'master'
Simon McVittie [Mon, 9 Dec 2024 16:52:39 +0000 (16:52 +0000)] 
Merge branch 'oom_retry_tmout' into 'master'

_dbus_loop_iterate: Fix OOM retry timeout handling

Closes #536

See merge request dbus/dbus!493

12 months ago_dbus_loop_iterate: Fix OOM retry timeout handling
Petr Malat [Wed, 4 Dec 2024 09:30:24 +0000 (10:30 +0100)] 
_dbus_loop_iterate: Fix OOM retry timeout handling

If there is a pending OOM watch and at the same time there is no
timeout, poll is entered with infinite timeout, because infinite
is expressed with a negative number, which is smaller than any
actual timeout.

Introduce min_poll_timeout(), which returns the smaller non-negative
number of the two, or the larger negative number if both numbers
are negative.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/536
Signed-off-by: Petr Malat <oss@malat.biz>
[smcv: adjust whitespace]
Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoBump version to 1.16.99 to start 1.17.x branch
Simon McVittie [Fri, 6 Dec 2024 16:52:25 +0000 (16:52 +0000)] 
Bump version to 1.16.99 to start 1.17.x branch

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoMerge branch 'dbus-1.16', rejecting stable-branch-only changes
Simon McVittie [Fri, 6 Dec 2024 16:50:43 +0000 (16:50 +0000)] 
Merge branch 'dbus-1.16', rejecting stable-branch-only changes

12 months agoPost-release version bump to 1.15.91
Simon McVittie [Fri, 6 Dec 2024 16:49:59 +0000 (16:49 +0000)] 
Post-release version bump to 1.15.91

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoPrepare 1.15.90 dbus-1.15.90
Simon McVittie [Fri, 6 Dec 2024 13:59:21 +0000 (13:59 +0000)] 
Prepare 1.15.90

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoUpdate AUTHORS
Simon McVittie [Fri, 6 Dec 2024 13:59:14 +0000 (13:59 +0000)] 
Update AUTHORS

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 months agoUpdate NEWS
Simon McVittie [Fri, 6 Dec 2024 13:53:23 +0000 (13:53 +0000)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
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