Commit graph

6239 commits

Author SHA1 Message Date
Ralf Habacker
5efc97f03c dbus-specification: Add signal 'ActivatableServicesChanged' and related bus feature
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-02-16 14:00:13 +01:00
Simon McVittie
758d37b1f8 Merge branch 'address-escape-doc' into 'master'
spec: add * to optionally-escaped bytes set

See merge request dbus/dbus!248
2022-02-16 12:22:21 +00:00
Kir Kolyshkin
87070a615a spec: add * to optionally-escaped bytes set
Commit ee71e1ff60 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>
2022-01-31 20:34:00 -08:00
Simon McVittie
37b76d1373 Merge branch 'ci-fix' into 'master'
docker/windows: fix bad path from MR !218

See merge request dbus/dbus!247
2022-01-27 19:57:34 +00:00
Marc-André Lureau
94f8689417 docker/windows: fix bad path from MR !218
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-27 23:07:18 +04:00
Ralf Habacker
7f5469d7dc Merge branch 'win-ci' into 'master'
CI: add Windows native builds

See merge request dbus/dbus!218
2022-01-27 16:10:34 +00:00
Marc-André Lureau
84e60c55e4 gitlab-ci: add cmake Windows builds with VS and mingw-ucrt
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-21 21:16:45 +04:00
Marc-André Lureau
98c903656d 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>
2022-01-21 21:16:45 +04:00
Marc-André Lureau
f8067a07c3 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>
2022-01-21 21:16:45 +04:00
Marc-André Lureau
e0deb95b31 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>
2022-01-21 21:16:45 +04:00
Marc-André Lureau
a58d46b789 bus/signal: fix compilation when only -Dembedded-tests
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-21 21:16:45 +04:00
Marc-André Lureau
2a5f1cfda7 cmake: add -fno-common when !MSVC
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-21 21:16:45 +04:00
Marc-André Lureau
b0d418a51b cmake: fix warnings variables
Do not use strings for compiler flags.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-21 21:16:45 +04:00
Simon McVittie
d90ad99648 Merge branch 'badoom' into 'master'
auth: fix a no-memory case

See merge request dbus/dbus!246
2022-01-21 15:53:58 +00:00
Marc-André Lureau
cfdfac9169 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>
2022-01-21 16:05:09 +04:00
Ralf Habacker
eef6e75978 Merge branch 'cmake-msvc-fixes' into 'master'
cmake: do not use gcc specific warning when building with msvc

See merge request dbus/dbus!245
2022-01-03 10:17:17 +00:00
Ralf Habacker
98ef5e22f7 cmake: do not use gcc specific warning when building with msvc 2022-01-03 10:31:24 +01:00
Simon McVittie
3de360aa4b NEWS: Mention CMake 3.4 dependency
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-12-17 15:54:08 +00:00
Simon McVittie
31b5e0ff8b Bump version number for continued development
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-12-17 15:50:15 +00:00
Simon McVittie
8afc535770 doc: Uninstall *.svg generated by Doxygen
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-12-17 13:08:08 +00:00
Simon McVittie
f013f991fa Prepare v1.13.20
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-12-17 13:07:48 +00:00
Simon McVittie
7e155b8531 Update AUTHORS from git log
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-12-17 12:49:09 +00:00
Simon McVittie
308a1aa48c 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
2021-12-16 11:28:02 +00:00
Ralf Habacker
8a6a8a794f In _dbus_get_autolaunch_address() avoid uninitialized mutex
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2021-12-16 10:05:50 +01:00
Ralf Habacker
9e35022436 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>
2021-12-16 10:04:47 +01:00
Ralf Habacker
1bbc135234 Fix "out of memory" handling in _dbus_get_install_root_as_hash()
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2021-12-16 09:46:46 +01:00
Ralf Habacker
d9e404c03a 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>
2021-12-16 09:46:46 +01:00
Ralf Habacker
dbc8f2a818 _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>
2021-12-16 09:46:46 +01:00
Ralf Habacker
1f0331be72 _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>
2021-12-16 09:46:36 +01:00
Ralf Habacker
58b9dcd6ee 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>
2021-12-16 08:13:39 +00:00
Ralf Habacker
7c3c3f9222 Merge branch 'todo' into 'master'
doc: Don't include TODO list in API documentation

See merge request dbus/dbus!238
2021-12-16 08:11:39 +00:00
Simon McVittie
ce8d7759a2 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>
2021-12-16 08:02:26 +00:00
Ralf Habacker
edc0134b10 Merge branch 'tap-skip' into 'master'
test: Avoid misleading diagnostic when some tests are skipped

Closes #363

See merge request dbus/dbus!241
2021-12-16 08:01:53 +00:00
Simon McVittie
fedb33179e 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>
2021-12-16 07:52:46 +00:00
Ralf Habacker
be5873f1bb 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
2021-12-15 18:24:10 +00:00
Simon McVittie
632831c959 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>
2021-12-15 17:47:32 +00:00
Ralf Habacker
28d585cdb7 Merge branch 'sysdeps-publish' into 'master'
sysdeps: Clarify bus address publication

See merge request dbus/dbus!240
2021-12-15 13:54:12 +00:00
Simon McVittie
aaa515f47d sysdeps: Document _dbus_daemon_unpublish_session_bus_address
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-12-15 11:55:06 +00:00
Simon McVittie
84a6147f80 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>
2021-12-15 11:55:06 +00:00
Simon McVittie
53085931a4 Merge branch 'offsetof' into 'master'
internals: Use Standard C offsetof macro if available

See merge request dbus/dbus!237
2021-12-13 12:44:08 +00:00
Simon McVittie
a24cf746e2 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>
2021-12-13 12:36:35 +00:00
Simon McVittie
83232393ef 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>
2021-12-10 17:10:12 +00:00
Simon McVittie
4e2f4d87d3 Merge branch 'disable-containers' into 'master'
Disable the Containers interface

See merge request dbus/dbus!236
2021-12-10 17:04:55 +00:00
Simon McVittie
9d60676ae0 Disable the Containers interface
We've had a request for a 1.14.x stable-branch, but the Containers
interface is only partially implemented, not yet described in the
D-Bus Specification, and not ready to be part of our API guarantees.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-12-10 16:48:51 +00:00
Simon McVittie
67f1a01f7b Merge branch 'cmake-verbose-config' into 'master'
cmake: add option ENABLE_VERBOSE_CONFIG

See merge request dbus/dbus!230
2021-12-10 14:23:34 +00:00
Ralf Habacker
77375263f5 cmake: add option ENABLE_VERBOSE_CONFIG
Checking the filenames of generated configuration files is now optionally
possible with this cmake option. They are no longer displayed by default
to avoid unnecessarily flooding the output.
2021-12-10 14:16:52 +00:00
Simon McVittie
203e8a4d75 Merge branch 'cmake-fix-warnings-flags' into 'master'
cmake: Make gcc builds use similar compiler warnings to autotools

Closes #356

See merge request dbus/dbus!227
2021-12-10 14:16:39 +00:00
Ralf Habacker
8e2f0f588e cmake: add configure option 'ENABLE_WERROR' to keep in sync with autotools 2021-12-10 13:36:28 +00:00
Ralf Habacker
667b153dce cmake: Make gcc builds use similar compiler warnings to autotools
Fixes #356
2021-12-10 13:36:28 +00:00
Ralf Habacker
40c9655e91 cmake: use the string 'append' command to add compiler flags for convenience
The minimum version of cmake has been increased because the mentioned
string command has been added with cmake 3.4.
2021-12-10 13:36:28 +00:00