]> git.ipfire.org Git - thirdparty/dbus.git/log
thirdparty/dbus.git
3 years agoMerge branch 'fix-issue-375' into 'master'
Ralf Habacker [Thu, 3 Mar 2022 11:45:09 +0000 (11:45 +0000)] 
Merge branch 'fix-issue-375' into 'master'

cmake: setup variable WORDS_BIGENDIAN correctly

Closes #375

See merge request dbus/dbus!266

3 years agocmake: setup variable WORDS_BIGENDIAN correctly
Ralf Habacker [Wed, 2 Mar 2022 10:00:06 +0000 (11:00 +0100)] 
cmake: setup variable WORDS_BIGENDIAN correctly

Since version 3.0 cmake provides the macro test_big_endian for
that purpose.

fixes #375

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agoAdd api doc to _dbus_platform_c|rmutex_new()
Ralf Habacker [Mon, 21 Feb 2022 15:07:48 +0000 (16:07 +0100)] 
Add api doc to _dbus_platform_c|rmutex_new()

The documentation has been added to the header to avoid duplication as
these functions are implemented platform specific.

Cherry-picked from merge request dbus/dbus!243

Reviewed-by: @smcv
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agoUpdate NEWS
Simon McVittie [Tue, 1 Mar 2022 18:44:25 +0000 (18:44 +0000)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'configure_with-x_option' into 'master'
Simon McVittie [Tue, 1 Mar 2022 18:28:06 +0000 (18:28 +0000)] 
Merge branch 'configure_with-x_option' into 'master'

build: Fix logic for --with-x configure option

See merge request dbus/dbus!263

3 years agoConvert "if" calls to AS_IF macro for the block that handles X11
Lars Wendler [Tue, 1 Mar 2022 15:11:05 +0000 (16:11 +0100)] 
Convert "if" calls to AS_IF macro for the block that handles X11

3 years agoAdd have_x11=no if --without-x was given to make later checks happy
Lars Wendler [Tue, 1 Mar 2022 15:08:06 +0000 (16:08 +0100)] 
Add have_x11=no if --without-x was given to make later checks happy

3 years agoEmit an error when --with-x was given but no X11 libs were found
Lars Wendler [Tue, 1 Mar 2022 15:05:52 +0000 (16:05 +0100)] 
Emit an error when --with-x was given but no X11 libs were found

3 years agoMove DBUS_X_* definitions into PKG_CHECK_MODULES block
Lars Wendler [Tue, 1 Mar 2022 15:01:29 +0000 (16:01 +0100)] 
Move DBUS_X_* definitions into PKG_CHECK_MODULES block

3 years agobuild: Treat --with-x[=yes] the same as --with-x=auto
Lars Wendler [Tue, 1 Mar 2022 14:56:30 +0000 (15:56 +0100)] 
build: Treat --with-x[=yes] the same as --with-x=auto

Previously, --with-x would disable the check for X11 libraries, which
was not intended.

3 years agoMerge branch 'bus-inotify-error-handling' into 'master'
Simon McVittie [Mon, 28 Feb 2022 23:00:58 +0000 (23:00 +0000)] 
Merge branch 'bus-inotify-error-handling' into 'master'

bus: Fix error handling for inotify_init()

See merge request dbus/dbus!235

3 years agobus: Show the errno if inotify cannot be initialized
Simon McVittie [Fri, 10 Dec 2021 13:09:15 +0000 (13:09 +0000)] 
bus: Show the errno if inotify cannot be initialized

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agobus: Correct check for inotify_init() failure
Simon McVittie [Fri, 10 Dec 2021 13:08:38 +0000 (13:08 +0000)] 
bus: Correct check for inotify_init() failure

fd 0 is a valid fd - although if we are using stdin as our inotify fd,
something is weird somewhere.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoRevert "spec: Go back to v0.38"
Simon McVittie [Mon, 28 Feb 2022 18:20:14 +0000 (18:20 +0000)] 
Revert "spec: Go back to v0.38"

This reverts commit 428f60e8b2f5e3f1871c3173700bbe2d8139e242.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoPost-release version bump for 1.15.x
Simon McVittie [Mon, 28 Feb 2022 18:20:08 +0000 (18:20 +0000)] 
Post-release version bump for 1.15.x

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoPrepare v1.14.0 dbus-1.14.0
Simon McVittie [Mon, 28 Feb 2022 11:36:48 +0000 (11:36 +0000)] 
Prepare v1.14.0

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/350
Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agospec: Go back to v0.38
Simon McVittie [Mon, 28 Feb 2022 11:23:39 +0000 (11:23 +0000)] 
spec: Go back to v0.38

Nothing changed in v0.39 yet, and it would be confusing to have the
version uploaded alongside dbus 1.14.0 say "not yet finalized".

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoRevert "Disable MSVC CI by default for now"
Simon McVittie [Mon, 28 Feb 2022 11:22:30 +0000 (11:22 +0000)] 
Revert "Disable MSVC CI by default for now"

This reverts commit 254b17977e228a4ec419c98e95588d564d36ddb1.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoUpdate AUTHORS
Simon McVittie [Mon, 28 Feb 2022 11:15:32 +0000 (11:15 +0000)] 
Update AUTHORS

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'doc_dbus-api-design_link_fixes' into 'master'
Ralf Habacker [Mon, 28 Feb 2022 08:16:17 +0000 (08:16 +0000)] 
Merge branch 'doc_dbus-api-design_link_fixes' into 'master'

doc/dbus-api-design: fix broken links

See merge request dbus/dbus!257

3 years agodoc/dbus-api-design: fix broken links
Michael Nosthoff [Thu, 24 Feb 2022 16:31:45 +0000 (16:31 +0000)] 
doc/dbus-api-design: fix broken links

* use version independent qtdbus url
* developer.gnome.org links moved to developer-old.gnome.org
* bustle now on freedesktop gitlab

3 years agoMerge branch 'mingw-w64-printf' into 'master'
Ralf Habacker [Mon, 28 Feb 2022 07:47:19 +0000 (07:47 +0000)] 
Merge branch 'mingw-w64-printf' into 'master'

build: Opt out from using mingw-w64's replacement printf(), etc.

Closes #380

See merge request dbus/dbus!261

3 years agoCI: Make most gcc warnings fatal for CMake builds
Simon McVittie [Sun, 27 Feb 2022 17:09:05 +0000 (17:09 +0000)] 
CI: Make most gcc warnings fatal for CMake builds

This makes sure we notice problems early.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoCI: Use current Debian stable release for mingw-w64 builds
Simon McVittie [Fri, 25 Feb 2022 16:08:32 +0000 (16:08 +0000)] 
CI: Use current Debian stable release for mingw-w64 builds

Now that we have resolved the failure to build with newer mingw-w64,
we don't need to hold these back to Debian 10 'buster' and can upgrade
to the current stable release, Debian 11 'bullseye'.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agobuild: Opt out from using mingw-w64's replacement printf(), etc.
Simon McVittie [Fri, 25 Feb 2022 16:06:59 +0000 (16:06 +0000)] 
build: Opt out from using mingw-w64's replacement printf(), etc.

The Windows code in dbus is careful to use Windows-specific equivalents
of the Standard C features that are not implemented by msvcrt.dll, so
we don't need to substitute a Standard C printf implementation.

This avoids compiler warnings/errors when gcc expects us to be using
Microsoft printf syntax (`ms_printf` attribute), but newer versions of
mingw-w64 expect us to be using GNU or Standard C printf syntax
(`gnu_printf` attribute) as a result of `__USE_MINGW_ANSI_STDIO` being
enabled by default if not otherwise specified.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/380
Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'ci' into 'master'
Simon McVittie [Fri, 25 Feb 2022 14:55:49 +0000 (14:55 +0000)] 
Merge branch 'ci' into 'master'

CI: Update Debian releases

See merge request dbus/dbus!260

3 years agoCI: Use https to download MSYS packages
Simon McVittie [Fri, 25 Feb 2022 13:31:43 +0000 (13:31 +0000)] 
CI: Use https to download MSYS packages

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoCI: Install ci-certificates
Simon McVittie [Fri, 25 Feb 2022 13:31:12 +0000 (13:31 +0000)] 
CI: Install ci-certificates

We need this to be able to download MSYS packages now.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoCI: Build on Debian 11 'bullseye' instead of Debian 10 'buster'
Simon McVittie [Fri, 25 Feb 2022 13:48:05 +0000 (13:48 +0000)] 
CI: Build on Debian 11 'bullseye' instead of Debian 10 'buster'

This is the current stable release for Debian, making Debian 10 a much
less interesting target for backports. Add a manually-triggered job
so we can still try buster occasionally.

Continue to use buster for mingw-w64 builds until format string issues
with bullseye toolchains can be sorted out.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoCI: Remove EOL versions of Debian and Ubuntu
Simon McVittie [Fri, 25 Feb 2022 13:45:10 +0000 (13:45 +0000)] 
CI: Remove EOL versions of Debian and Ubuntu

Debian 9 'stretch' is EOL, and Ubuntu 16.04 is EOL unless you enter into
a special subscription with Canonical. This puts them outside our
informal security-support policy, and realistically, anyone sufficiently
change-averse to be following these distributions is not going to be
backporting a current version of dbus.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoDisable MSVC CI by default for now
Simon McVittie [Fri, 25 Feb 2022 13:53:56 +0000 (13:53 +0000)] 
Disable MSVC CI by default for now

The necessary CI runner doesn't seem to be available, and we shouldn't
let that prevent us from merging dbus changes. This can be reverted
when the runner comes back.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agobuild: Fix update-authors rule to work out-of-tree
Simon McVittie [Wed, 23 Feb 2022 19:42:46 +0000 (19:42 +0000)] 
build: Fix update-authors rule to work out-of-tree

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoAUTHORS: Update from git history
Simon McVittie [Wed, 23 Feb 2022 19:42:26 +0000 (19:42 +0000)] 
AUTHORS: Update from git history

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoStart development of dbus 1.13.24
Simon McVittie [Wed, 23 Feb 2022 19:40:15 +0000 (19:40 +0000)] 
Start development of dbus 1.13.24

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoPrepare dbus 1.13.22 and spec 0.38 dbus-1.13.22
Simon McVittie [Wed, 23 Feb 2022 14:35:07 +0000 (14:35 +0000)] 
Prepare dbus 1.13.22 and spec 0.38

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoUpdate NEWS
Simon McVittie [Wed, 23 Feb 2022 14:30:46 +0000 (14:30 +0000)] 
Update NEWS

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'oom-score-adj' into 'master'
Simon McVittie [Wed, 23 Feb 2022 12:29:22 +0000 (12:29 +0000)] 
Merge branch 'oom-score-adj' into 'master'

Fix handling of /proc/self/oom_score_adj on Linux

Closes #374 and #378

See merge request dbus/dbus!255

3 years agosysdeps-unix: Diagnose failure to open /proc/self/oom_score_adj
Simon McVittie [Mon, 21 Feb 2022 16:07:26 +0000 (16:07 +0000)] 
sysdeps-unix: Diagnose failure to open /proc/self/oom_score_adj

Previously, we silently ignored this, but now that we're more careful
about the contexts in which we try to reset the OOM score and whether
we log failures as a warning, we can let the dbus-daemon-launch-helper
show a message if it can't write there.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agospawn-unix: Don't log an error if unable to reset Linux OOM score
Simon McVittie [Mon, 21 Feb 2022 16:02:13 +0000 (16:02 +0000)] 
spawn-unix: Don't log an error if unable to reset Linux OOM score

We cannot safely log between fork() and exec() because it isn't an
async-signal-safe operation (in particular it might allocate memory).

We also don't want to treat a failure here as a real problem, because
it might legitimately not work: in a system dbus-daemon that has dropped
privileges from root, the pseudo-file representing this process parameter
remains owned by root and cannot be altered by the unprivileged user.

For the main use-case for this operation, the system dbus-daemon, we
have another opportunity to do this in the dbus-daemon-launch-helper
(see the previous commit).

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agodbus-daemon-launch-helper: Reset Linux OOM score adjustment here
Simon McVittie [Mon, 21 Feb 2022 16:00:42 +0000 (16:00 +0000)] 
dbus-daemon-launch-helper: Reset Linux OOM score adjustment here

Previously, we were relying on the system bus being able to reset
its OOM score adjustment after it forks, but before it execs the
dbus-daemon-launch-helper. However, it can't actually do that (leading
to dbus#378), because the system bus typically starts as root, uses its
root privileges to adjust resource limits, and then drops privileges
to the `@DBUS_USER@`, typically `dbus` or `messagebus`. This leaves the
pseudo-files in /proc for its process parameters owned by root, and the
`@DBUS_USER@` is not allowed to open them for writing.

The dbus-daemon-launch-helper is setuid root, so it can certainly
alter its OOM score adjustment before exec'ing the actual activated
service. We need to do this before dropping privileges, because after
dropping privileges we would be unable to write to this process
parameter.

This is a non-async-signal-safe context, so we can safely log errors
here, unlike the fork-and-exec code paths.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/378
Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agospawn-unix: On Linux, don't try to increase OOM-killer protection
Simon McVittie [Mon, 21 Feb 2022 15:53:38 +0000 (15:53 +0000)] 
spawn-unix: On Linux, don't try to increase OOM-killer protection

The oom_score_adj parameter is a signed integer, with increasingly
positive values being more likely to be killed by the OOM-killer,
and increasingly negative values being less likely.

Previously, we assumed that oom_score_adj would be negative or zero,
and reset it to zero, which does not require privileges because it
meant we're voluntarily giving up our OOM-killer protection.
In particular, bus/dbus.service.in has OOMScoreAdjust=-900, which
we don't want system services to inherit.

However, systemd >= 250 has started putting a positive oom_score_adj
on user processes, to make it more likely that the OOM killer will kill
a user process rather than a system process. Changing from a positive
oom_score_adj to zero is increasing protection from the OOM-killer,
which only a privileged process is allowed to do, resulting in warnings
whenever we carry out traditional (non-systemd) service activation
on the session bus.

To avoid this, do the equivalent of:

    if (oom_score_adj < 0)
        oom_score_adj = 0;

which is always allowed.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/374
Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agosysdeps-unix: Factor out _dbus_reset_oom_score_adj
Simon McVittie [Mon, 21 Feb 2022 15:41:41 +0000 (15:41 +0000)] 
sysdeps-unix: Factor out _dbus_reset_oom_score_adj

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agospawn-unix: Correct indentation
Simon McVittie [Mon, 21 Feb 2022 15:29:46 +0000 (15:29 +0000)] 
spawn-unix: Correct indentation

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'integration-test' into 'master'
Simon McVittie [Tue, 22 Feb 2022 17:05:05 +0000 (17:05 +0000)] 
Merge branch 'integration-test' into 'master'

tests: Ensure session bus has started before integration test

See merge request dbus/dbus!256

3 years agotests: Ensure session bus has started before integration test
Simon McVittie [Mon, 21 Feb 2022 10:35:10 +0000 (10:35 +0000)] 
tests: Ensure session bus has started before integration test

The session dbus-daemon won't necessarily be run immediately on login
if we are using systemd socket activation for it, and the transient
services directory $XDG_RUNTIME_DIR/dbus-1/services isn't created until
it's actually run. Ping the dbus-daemon to make sure it's available.

Signed-off-by: Simon McVittie <smcv@debian.org>
Bug-Debian: https://bugs.debian.org/1005889

3 years agoMerge branch 'cmake-fixes' into 'master'
Ralf Habacker [Mon, 21 Feb 2022 14:50:14 +0000 (14:50 +0000)] 
Merge branch 'cmake-fixes' into 'master'

cmake: remove obsolete variable DBUS_SOURCE_DIR

See merge request dbus/dbus!254

3 years agocmake: remove obsolete variable DBUS_SOURCE_DIR
Ralf Habacker [Fri, 18 Feb 2022 07:33:15 +0000 (08:33 +0100)] 
cmake: remove obsolete variable DBUS_SOURCE_DIR

This issue has been reported at #377

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agoMerge branch 'xml-catalog' into 'master'
Simon McVittie [Mon, 21 Feb 2022 14:11:02 +0000 (14:11 +0000)] 
Merge branch 'xml-catalog' into 'master'

doc: Introduce XML catalog

See merge request dbus/dbus!202

3 years agodoc: Introduce XML catalog
Jan Tojnar [Thu, 11 Feb 2021 05:00:45 +0000 (06:00 +0100)] 
doc: Introduce XML catalog

This adds a nice way of loading the DTD files based on the identifier
in the DOCTYPE declaration, no matter where the DTDs are installed.
See also ‘XML catalog’ Wikipedia entry and update-xmlcatalog(8).

3 years agoMerge branch 'add-confidential-mr-doc' into 'master'
Simon McVittie [Mon, 21 Feb 2022 13:55:18 +0000 (13:55 +0000)] 
Merge branch 'add-confidential-mr-doc' into 'master'

CONTRIBUTING.md: creation of "confidential" merge requests added

See merge request dbus/dbus!252

3 years agoCONTRIBUTING.md: creation of "confidential" merge requests added
Ralf Habacker [Thu, 17 Feb 2022 10:10:00 +0000 (11:10 +0100)] 
CONTRIBUTING.md: creation of "confidential" merge requests added

See #368

3 years agoMerge branch 'fix-issue-377' into 'master'
Simon McVittie [Thu, 17 Feb 2022 14:57:23 +0000 (14:57 +0000)] 
Merge branch 'fix-issue-377' into 'master'

cmake: fix for ninja phony cycle related configuring errors

Closes #377

See merge request dbus/dbus!253

3 years agocmake: fix for ninja phony cycle related configuring errors
Ralf Habacker [Thu, 17 Feb 2022 13:04:55 +0000 (14:04 +0100)] 
cmake: fix for ninja phony cycle related configuring errors

A prefix has been added to the custom target names in docbook-related
macros to fix the reported error:

  ninja: error: build.ninja:xxx: multiple rules generate
  doc/dbus-xxx.1.html [-w dupbuild=err]

Fixes #377

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agocmake: drop obsolete dependencies for generated docbook source files
Ralf Habacker [Thu, 17 Feb 2022 13:03:17 +0000 (14:03 +0100)] 
cmake: drop obsolete dependencies for generated docbook source files

The docbook source files are already dependencies of the generated
docbook files.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agocmake: let macro docbook handle all requested formats in one call
Ralf Habacker [Thu, 17 Feb 2022 13:01:56 +0000 (14:01 +0100)] 
cmake: let macro docbook handle all requested formats in one call

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agocmake: in macro generate_docbook_file use easier to read parameter names
Ralf Habacker [Thu, 17 Feb 2022 13:01:09 +0000 (14:01 +0100)] 
cmake: in macro generate_docbook_file use easier to read parameter names

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agoMerge branch 'dbus-server-signal-config-reloaded' into 'master'
Simon McVittie [Wed, 16 Feb 2022 14:08:48 +0000 (14:08 +0000)] 
Merge branch 'dbus-server-signal-config-reloaded' into 'master'

dbus-daemon: Inform dbus clients about configuration changes

Closes #376

See merge request dbus/dbus!250

3 years agodbus-daemon: Implement signal 'ActivatableServicesChanged'
Ralf Habacker [Tue, 15 Feb 2022 23:14:37 +0000 (00:14 +0100)] 
dbus-daemon: Implement signal 'ActivatableServicesChanged'

After any reload of the activatable service files the mentioned signal is
emitted to the current bus to inform clients.

The calls to signal emmission have not been implemented in the platform
specific functions _dbus_daemon_report_reloaded() to avoid duplicate
implementations.

Fixes #376
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agodbus-specification: Add signal 'ActivatableServicesChanged' and related bus feature
Ralf Habacker [Tue, 15 Feb 2022 15:19:59 +0000 (16:19 +0100)] 
dbus-specification: Add signal 'ActivatableServicesChanged' and related bus feature

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agoMerge branch 'address-escape-doc' into 'master'
Simon McVittie [Wed, 16 Feb 2022 12:22:21 +0000 (12:22 +0000)] 
Merge branch 'address-escape-doc' into 'master'

spec: add * to optionally-escaped bytes set

See merge request dbus/dbus!248

3 years agospec: add * to optionally-escaped bytes set
Kir Kolyshkin [Tue, 1 Feb 2022 04:31:11 +0000 (20:31 -0800)] 
spec: add * to optionally-escaped bytes set

Commit ee71e1ff6033a added * to the list of optionally escaped bytes
set, but did not update the documentation. I guess this happened because
the change is not backward compatible.

It seems that the period of 14+ years should be enough to not cause any
backward compatibility issues, so let's document this.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
3 years agoMerge branch 'ci-fix' into 'master'
Simon McVittie [Thu, 27 Jan 2022 19:57:34 +0000 (19:57 +0000)] 
Merge branch 'ci-fix' into 'master'

docker/windows: fix bad path from MR !218

See merge request dbus/dbus!247

3 years agodocker/windows: fix bad path from MR !218
Marc-André Lureau [Thu, 27 Jan 2022 19:07:14 +0000 (23:07 +0400)] 
docker/windows: fix bad path from MR !218

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agoMerge branch 'win-ci' into 'master'
Ralf Habacker [Thu, 27 Jan 2022 16:10:34 +0000 (16:10 +0000)] 
Merge branch 'win-ci' into 'master'

CI: add Windows native builds

See merge request dbus/dbus!218

3 years agogitlab-ci: add cmake Windows builds with VS and mingw-ucrt
Marc-André Lureau [Tue, 4 Jan 2022 11:16:02 +0000 (15:16 +0400)] 
gitlab-ci: add cmake Windows builds with VS and mingw-ucrt

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agogitlab-ci: build a Windows docker image, with VS15 & msys
Marc-André Lureau [Tue, 4 Jan 2022 11:14:51 +0000 (15:14 +0400)] 
gitlab-ci: build a Windows docker image, with VS15 & msys

Based on GStreamer & Mesa freedesktop gitlab CI, use the Windows 1809
runner provided by the GStreamer Foundation.

https://www.freedesktop.org/wiki/Infrastructure/

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agogitlab-ci: move "before_script" and "cache" to .debian-build
Marc-André Lureau [Tue, 4 Jan 2022 11:07:04 +0000 (15:07 +0400)] 
gitlab-ci: move "before_script" and "cache" to .debian-build

As we are introducing Windows builds next, move out Unix-specific
job definitions to the base job.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agogitlab-ci: factorize build jobs with "extends"
Marc-André Lureau [Tue, 4 Jan 2022 11:01:10 +0000 (15:01 +0400)] 
gitlab-ci: factorize build jobs with "extends"

It is easier to read and modify than anchors. And we are going to move
more Debian-specific to the base ".debian-build" next.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agobus/signal: fix compilation when only -Dembedded-tests
Marc-André Lureau [Thu, 13 Jan 2022 12:30:54 +0000 (16:30 +0400)] 
bus/signal: fix compilation when only -Dembedded-tests

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agocmake: add -fno-common when !MSVC
Marc-André Lureau [Mon, 3 Jan 2022 17:50:19 +0000 (21:50 +0400)] 
cmake: add -fno-common when !MSVC

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agocmake: fix warnings variables
Marc-André Lureau [Mon, 3 Jan 2022 17:48:05 +0000 (21:48 +0400)] 
cmake: fix warnings variables

Do not use strings for compiler flags.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agoMerge branch 'badoom' into 'master'
Simon McVittie [Fri, 21 Jan 2022 15:53:58 +0000 (15:53 +0000)] 
Merge branch 'badoom' into 'master'

auth: fix a no-memory case

See merge request dbus/dbus!246

3 years agoauth: fix a no-memory case
Marc-André Lureau [Mon, 10 Jan 2022 20:02:02 +0000 (00:02 +0400)] 
auth: fix a no-memory case

Jumping to "out" will call _dbus_string_zero() unconditionally on tmp
string variables. Do not attempt to zero what wasn't even initialized.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agoMerge branch 'cmake-msvc-fixes' into 'master'
Ralf Habacker [Mon, 3 Jan 2022 10:17:17 +0000 (10:17 +0000)] 
Merge branch 'cmake-msvc-fixes' into 'master'

cmake: do not use gcc specific warning when building with msvc

See merge request dbus/dbus!245

3 years agocmake: do not use gcc specific warning when building with msvc
Ralf Habacker [Mon, 3 Jan 2022 09:31:24 +0000 (10:31 +0100)] 
cmake: do not use gcc specific warning when building with msvc

4 years agoNEWS: Mention CMake 3.4 dependency
Simon McVittie [Fri, 17 Dec 2021 15:54:06 +0000 (15:54 +0000)] 
NEWS: Mention CMake 3.4 dependency

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoBump version number for continued development
Simon McVittie [Fri, 17 Dec 2021 15:50:15 +0000 (15:50 +0000)] 
Bump version number for continued development

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agodoc: Uninstall *.svg generated by Doxygen dbus-1.13.20
Simon McVittie [Fri, 17 Dec 2021 13:08:08 +0000 (13:08 +0000)] 
doc: Uninstall *.svg generated by Doxygen

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoPrepare v1.13.20
Simon McVittie [Fri, 17 Dec 2021 12:46:11 +0000 (12:46 +0000)] 
Prepare v1.13.20

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoUpdate AUTHORS from git log
Simon McVittie [Fri, 17 Dec 2021 12:49:04 +0000 (12:49 +0000)] 
Update AUTHORS from git log

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoMerge branch 'fix-issue-365' into 'master'
Simon McVittie [Thu, 16 Dec 2021 11:28:02 +0000 (11:28 +0000)] 
Merge branch 'fix-issue-365' into 'master'

Fix memory leaks in _dbus_get_install_root_as_hash in case of OOM condition

Closes #365

See merge request dbus/dbus!239

4 years agoIn _dbus_get_autolaunch_address() avoid uninitialized mutex
Ralf Habacker [Thu, 16 Dec 2021 09:01:35 +0000 (10:01 +0100)] 
In _dbus_get_autolaunch_address() avoid uninitialized mutex

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
4 years agoCleanup zero string length case condition in Windows helper functions
Ralf Habacker [Wed, 15 Dec 2021 08:31:15 +0000 (09:31 +0100)] 
Cleanup zero string length case condition in Windows helper functions

This cleanup has been processed in _dbus_daemon_publish_session_bus_address()
_dbus_get_install_root_as_hash() and _dbus_get_address_string().

The zero length condition has been catched in each function calling
the mentioned functions.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
4 years agoFix "out of memory" handling in _dbus_get_install_root_as_hash()
Ralf Habacker [Tue, 14 Dec 2021 14:24:08 +0000 (15:24 +0100)] 
Fix "out of memory" handling in _dbus_get_install_root_as_hash()

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
4 years agoFix "out of memory" handling in _dbus_get_address_string()
Ralf Habacker [Tue, 14 Dec 2021 14:23:27 +0000 (15:23 +0100)] 
Fix "out of memory" handling in _dbus_get_address_string()

To avoid partial strings, appending to the returned string
is only done if fully successful.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
4 years ago_dbus_get_install_root_as_hash() now expects an initialized DBusString instance as...
Ralf Habacker [Tue, 14 Dec 2021 14:16:33 +0000 (15:16 +0100)] 
_dbus_get_install_root_as_hash() now expects an initialized DBusString instance as a parameter

Since the _dbus_get_address_string() function is affected by the change,
the code calling the mentioned function been adapted.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
4 years ago_dbus_get_address_string() now expects an initialized DBusString instance as a parameter
Ralf Habacker [Tue, 14 Dec 2021 14:32:56 +0000 (15:32 +0100)] 
_dbus_get_address_string() now expects an initialized DBusString instance as a parameter

The mentioned function now expects an initialized DBusString instance as
parameter for the return of a string to have a clear responsibility
regarding initialization and usage and thus simplify the "out of memory"
management.

Since the _dbus_get_shm_name() and _dbus_get_mutex_name() functions are
affected by the change, the related documentation has been adapted.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
4 years agoIndentation correction of Windows specific utility functions
Ralf Habacker [Tue, 14 Dec 2021 11:07:01 +0000 (12:07 +0100)] 
Indentation correction of Windows specific utility functions

The corrections refer to the following commits, so that they are not mixed
up with blank changes.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
4 years agoMerge branch 'todo' into 'master'
Ralf Habacker [Thu, 16 Dec 2021 08:11:39 +0000 (08:11 +0000)] 
Merge branch 'todo' into 'master'

doc: Don't include TODO list in API documentation

See merge request dbus/dbus!238

4 years agodoc: Don't include TODO list in API documentation
Simon McVittie [Mon, 13 Dec 2021 12:34:07 +0000 (12:34 +0000)] 
doc: Don't include TODO list in API documentation

This is sorted non-deterministically, which is undesired for reproducible
builds, and is not really part of the API in any case.

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoMerge branch 'tap-skip' into 'master'
Ralf Habacker [Thu, 16 Dec 2021 08:01:53 +0000 (08:01 +0000)] 
Merge branch 'tap-skip' into 'master'

test: Avoid misleading diagnostic when some tests are skipped

Closes #363

See merge request dbus/dbus!241

4 years agotest: Avoid misleading diagnostic when some tests are skipped
Simon McVittie [Wed, 15 Dec 2021 12:31:54 +0000 (12:31 +0000)] 
test: Avoid misleading diagnostic when some tests are skipped

If we have 7 test-cases, of which we ran 3 and skipped 4, then it's
misleading to say "7 tests passed". Diagnose this as
"3 tests passed (4 skipped)" instead.

We can either skip tests by putting a specific test name on the test
command-line, or programmatically (for example the fd-passing test is
always skipped on Windows, because Windows cannot implement Unix
fd-passing).

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/363
Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoMerge branch 'arrays-of-tests' into 'master'
Ralf Habacker [Wed, 15 Dec 2021 18:24:10 +0000 (18:24 +0000)] 
Merge branch 'arrays-of-tests' into 'master'

test-utils: Don't assume all arrays of tests are zero-terminated

Closes #366

See merge request dbus/dbus!242

4 years agotest-utils: Don't assume all arrays of tests are zero-terminated
Simon McVittie [Wed, 15 Dec 2021 17:44:59 +0000 (17:44 +0000)] 
test-utils: Don't assume all arrays of tests are zero-terminated

Fixes: dbus!233
Resolves: dbus#366
Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoMerge branch 'sysdeps-publish' into 'master'
Ralf Habacker [Wed, 15 Dec 2021 13:54:12 +0000 (13:54 +0000)] 
Merge branch 'sysdeps-publish' into 'master'

sysdeps: Clarify bus address publication

See merge request dbus/dbus!240

4 years agosysdeps: Document _dbus_daemon_unpublish_session_bus_address
Simon McVittie [Wed, 15 Dec 2021 11:49:20 +0000 (11:49 +0000)] 
sysdeps: Document _dbus_daemon_unpublish_session_bus_address

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agosysdeps: Make some functions Windows-specific
Simon McVittie [Wed, 15 Dec 2021 11:41:05 +0000 (11:41 +0000)] 
sysdeps: Make some functions Windows-specific

_dbus_daemon_publish_session_bus_address had an empty implementation
but was never actually called on Unix, and
_dbus_daemon_is_session_bus_address_published wasn't even implemented.
Move them to the Windows-specific header to indicate that interface
changes here would only affect other Windows-specific code.

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoMerge branch 'offsetof' into 'master'
Simon McVittie [Mon, 13 Dec 2021 12:44:08 +0000 (12:44 +0000)] 
Merge branch 'offsetof' into 'master'

internals: Use Standard C offsetof macro if available

See merge request dbus/dbus!237

4 years agointernals: Use Standard C offsetof macro if available
Simon McVittie [Fri, 10 Dec 2021 15:12:59 +0000 (15:12 +0000)] 
internals: Use Standard C offsetof macro if available

clang 13 fails to compile our current implementation with:

.../dbus/dbus-message.c:2070:3: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant]
  _DBUS_STATIC_ASSERT (_DBUS_ALIGNOF (DBusMessageRealIter) <=
  ^
.../dbus/dbus-internals.h:460:25: note: expanded from macro '_DBUS_STATIC_ASSERT'
  typedef struct { char _assertion[(expr) ? 1 : -1]; } \

This appears to be because the "traditional" definition of
offsetof(), which we're hard-coding here, does not qualify as a constant
expression under C rules due to its use of pointer casts.

Modern compilers like gcc and clang have a built-in implementation
of offsetof that *is* a constant expression.

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoUpdate NEWS
Simon McVittie [Fri, 10 Dec 2021 16:58:01 +0000 (16:58 +0000)] 
Update NEWS

Since we're heading for a 1.14.x branch (dbus#350), also draft the
summary of what has changed since 1.12.x.

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