Commit graph

6349 commits

Author SHA1 Message Date
Simon McVittie
1aed6933c7 Merge branch 'test-autolaunch-win' into 'master'
Add autolaunch test on Windows

Closes #235

See merge request dbus/dbus!95
2022-06-27 18:18:53 +00:00
Ralf Habacker
b1dd6fa7a6 Add a test application for autostart on Windows implementation
The test application performs several individual tests to detect possible
problems with the autostart support under Windows. Connections are tested
with the standard scope, a 'custom' scope, the 'install path' scope and
the 'user' scope.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-06-27 15:34:23 +02:00
Ralf Habacker
556eb2ea1a sysdeps-win: display process id of started dbus-daemon
When verbose mode is enabled, this information is useful for debugging.
2022-06-27 15:32:07 +02:00
Ralf Habacker
6bced858cb sysdeps-win: Use the connection readiness event when starting dbus-daemon
In _dbus_get_autolaunch_address() instead of polling at intervals to see
if the shared memory segment is present, the named signal is now used to
reliably get the state of dbus-daemon.

In _dbus_get_autolaunch_shm() the unnecessary initialization of `address`
has been removed, error handling has been improved and the `wait` parameter
has been added to select waiting.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-06-27 15:32:07 +02:00
Ralf Habacker
62ccb35996 sysdeps-win: Let tests access autostarted dbus-daemon's handle
This will allow automated tests to kill the autostarted dbus-daemon
before continuing to the next test-case, which wasn't previously
possible.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-06-27 15:32:07 +02:00
Ralf Habacker
f20a05f60f sysdeps-win: Add support to give auto launched dbus daemon custom parameter
For that purpose the function _dbus_test_win_set_autolaunch_command_line_parameter()
has been added.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-06-27 15:32:07 +02:00
Ralf Habacker
08144b6ed8 Fix indentation of functions that are later changed 2022-06-27 15:32:07 +02:00
Simon McVittie
13e7b14e19 build: Include license files in releases
Fixes: 272928b "COPYING: Move full license text into LICENSES/"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-06-24 14:44:08 +01:00
Marc-André Lureau
e4d6b74b25 build-sys: drop DBUS_CMAKE
TEST_LISTEN is defined by the cmake/autotools (or meson) build systems.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-06-17 15:19:38 +04:00
Simon McVittie
5f27dc813b COPYING: Document what we mean by SPDX markers
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-27 14:19:58 +02:00
Simon McVittie
cd689f3d32 COPYING, CONTRIBUTING.md: Specifically mention the MIT license
This is the license we encourage contributors to use for new code, so
we should certainly have a reference copy of it.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-27 14:19:58 +02:00
Simon McVittie
272928bbbf COPYING: Move full license text into LICENSES/
Having the full text of the AFL-2.1 and GPL in this file makes it harder
to find the unique information, which is the summary. Move their full
text into LICENSES/ (consistent with how REUSE handles this), leaving
a short summary of the licensing situation in COPYING.

Loosely based on work from Ralf Habacker in dbus!304.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-27 14:19:58 +02:00
Simon McVittie
789d97ad53 COPYING: The project is called dbus, not D-Bus
We are trying to be consistent about saying this codebase is dbus
(a piece of software), which is the reference implementation of D-Bus
(a protocol).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-27 14:19:58 +02:00
Simon McVittie
b51f848b67 Merge branch 'implicit-func-def-configure' into 'master'
configure: Avoid exit() when checking for __sync_sub_and_fetch()

See merge request dbus/dbus!320
2022-05-26 11:41:02 +00:00
Alex Richardson
56e52a4212 configure: Avoid exit() when checking for __sync_sub_and_fetch()
Use of exit() requires a stdlib.h include. This check was failing for me
since the compiler defaulted to -Werror=implicit-function-declaration, so
__sync_sub_and_fetch() support was not dectected.
2022-05-26 11:26:38 +00:00
Simon McVittie
7a1d24bac6 Merge branch 'getresuid' into 'master'
cmake: Check for setresuid and getresuid

See merge request dbus/dbus!319
2022-05-26 11:26:13 +00:00
Alex Richardson
dafb5ddc09 cmake: Check for setresuid and getresuid
This was not being checked, so the codepaths using the define were
never included.
2022-05-25 22:01:51 +00:00
Simon McVittie
4b3c30a765 Merge branch 'wip/jtojnar/nodist-catalog' into 'master'
build: Do not dist built XML catalog

See merge request dbus/dbus!317
2022-05-24 11:38:52 +00:00
Jan Tojnar
dcd19cc0d9 build: Do not dist built XML catalog
It will have whatever paths the person who built the dist tarball hardcoded.
2022-05-24 11:25:31 +00:00
Simon McVittie
e368045782 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-23 13:41:34 +01:00
Simon McVittie
5c0382efef Merge branch 'dev_add_variant_type_to_dbus_send' into 'master'
dbus-send: Support for variants inside containers

See merge request dbus/dbus!206
2022-05-23 12:32:06 +00:00
Frederik Van Bogaert
38a98dbf02 dbus-send: Add support for variants to arrays and dictionaries
Adds support for:
* Arrays of variants
* Dictionaries with variants as keys

Manually tested and confirmed working using dbus-monitor.
Example usage:
```
$ dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus \
    com.example.SomeExample dict:string:variant:one,int16:1
```
In dbus-monitor:
```
method call time=1652796044.991509 sender=:1.84 -> destination=org.freedesktop.DBus
    serial=2 path=/org/freedesktop/DBus; interface=com.example; member=SomeExample
   array [
      dict entry(
         string "one"
         variant             int16 1
      )
   ]
```

Signed-off-by: Frederik Van Bogaert <frederik.vanbogaert@mind.be>
2022-05-23 12:15:02 +00:00
Simon McVittie
d7007915cc Merge branch 'element-size-morello' into 'master'
dbus-mempool.c: Ensure element_size is at least sizeof(void *)

See merge request dbus/dbus!318
2022-05-23 12:13:26 +00:00
Alex Richardson
999c29745f dbus-mempool.c: Ensure element_size is at least sizeof(void *)
I am trying to use DBus on an Arm Morello system where sizeof(void *) is
16 and not 8, so the assertion in the line below can fail unless we ensure
that element_size is at least sizeof(void *).
2022-05-22 22:54:34 +00:00
Simon McVittie
8adf01a489 Merge branch 'drop-auth-dir' into 'master'
build-sys: console-auth-dir leftovers

See merge request dbus/dbus!316
2022-05-20 13:53:36 +00:00
Marc-André Lureau
b342ed53e5 build-sys: console-auth-dir leftovers
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-20 13:40:58 +00:00
Simon McVittie
da58734541 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-20 14:21:55 +01:00
Simon McVittie
281e2af356 Merge branch 'editorconfig' into 'master'
.editorconfig: Automatically configure multiple text editors

See merge request dbus/dbus!310
2022-05-20 12:31:25 +00:00
Simon McVittie
772604a2d2 .editorconfig: Automatically configure multiple text editors
See editorconfig.org for details of the format. This is a first attempt
at describing our coding style in editorconfig syntax; please add new
file types here as they become relevant.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-20 12:17:48 +00:00
Simon McVittie
a7d8e25c83 Merge branch 'drop-auth-dir' into 'master'
Remove DBUS_CONSOLE_AUTH_DIR

See merge request dbus/dbus!314
2022-05-20 12:08:30 +00:00
Marc-André Lureau
17caf7f353 NEWS: add note about DBUS_CONSOLE_AUTH_DIR removal
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-19 22:19:25 +02:00
Marc-André Lureau
5705d14cf0 cmake: drop -DDBUS_CONSOLE_AUTH_DIR=
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-19 22:19:25 +02:00
Marc-André Lureau
cf124a41d7 autotools: drop --with-console-auth-dir=
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-19 22:19:25 +02:00
Marc-André Lureau
84fdcc5f27 dbus: remove pam_console/pam_foreground support
DBUS_CONSOLE_AUTH_DIR is deprecated since 1.11.18, and was intended to
have been removed in 1.13. Let's drop the related code now.

Fixes: https://gitlab.freedesktop.org/dbus/dbus/-/issues/181
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101629

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-19 22:19:25 +02:00
Simon McVittie
366b075dec Merge branch 'warnings' into 'master'
Fix unused warnings

See merge request dbus/dbus!315
2022-05-19 18:15:58 +00:00
Marc-André Lureau
708dd5a55e test: fix unused variable warnings
../../test/internals/assertions.c: In function ‘test_assert_error_is_set’:
../../test/internals/assertions.c:82:14: warning: unused variable ‘ep’ [-Wunused-variable]
   82 |   DBusError *ep = NULL;
      |              ^~
../../test/internals/assertions.c:81:13: warning: unused variable ‘e’ [-Wunused-variable]
   81 |   DBusError e = DBUS_ERROR_INIT;

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-19 17:57:31 +02:00
Marc-André Lureau
f2cf41e1ae dbus: fix unused warning
../../dbus/dbus-message.c:5462:17: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
 5462 |   unsigned char len;

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-19 17:57:31 +02:00
Simon McVittie
c64aa0308c Merge branch 'doc-https' into 'master'
doc: Use https URLs for home page and AUTHORS

See merge request dbus/dbus!313
2022-05-18 16:21:49 +00:00
Simon McVittie
1426cf811c doc: Use https URLs for home page and AUTHORS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-18 16:05:31 +00:00
Simon McVittie
f3aee6f8ce Merge branch 'meson-prep' into 'master'
Preparation for Meson build system

See merge request dbus/dbus!312
2022-05-18 15:56:23 +00:00
Marc-André Lureau
06e7411f7e dbus: fix warning: label 'oom' defined but not used
When DBUS_ENABLE_VERBOSE_MODE is not set, the compiler warns.

Let's remove the label.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-18 16:41:23 +01:00
Marc-André Lureau
c0e2f47d3b doc: silence some xmlto man pages warnings
Some pages are missing AUTHOR section, xmlto complains about it, ex:
Warn: meta author : no refentry/info/author                        dbus-update-activation-environment
Note: meta author : see http://www.docbook.org/tdg5/en/html/autho  dbus-update-activation-environment
Warn: meta author : no author data, so inserted a fixme            dbus-update-activation-environment

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-18 16:41:09 +01:00
Marc-André Lureau
8c2f8fc8c6 Doxyfile: browse for build-dir sources
This allows it to pick dbus-arch-deps.h as well when building out-of-tree.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-18 16:40:30 +01:00
Simon McVittie
86d891f067 Merge branch 'clang-format-config' into 'master'
Add a clang-format configuration file

See merge request dbus/dbus!308
2022-05-18 12:04:57 +00:00
Alex Richardson
a68209cb23 Add a clang-format configuration file
This ensures that IDEs such as CLion automatically use the correct
indentation, and running `git-clang-format` results in patches that are
actually quite close to the current style. It doesn't handle alignment
of parameters in function declarations, but otherwise it seems accurate.
2022-05-18 11:48:04 +00:00
Simon McVittie
cbad0a74f7 Merge branch 'fix-issue-368' into 'master'
Fix thread locking issues on Windows

Closes #368 and #370

See merge request dbus/dbus!244
2022-05-17 23:24:28 +00:00
Ralf Habacker
f888ee8028 On Windows in autolaunch related function use rmutex related functions to support thread locking
The previously used additional and incomplete functions have been merged
into the current rmutex functions to fix the reported bug and reduce the
maintenance effort.

Fixes #368, #370

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-05-17 23:06:54 +00:00
Simon McVittie
8b4699332d Merge branch 'silence-clang-wcast-align' into 'master'
Silence Clang -Wcast-align false-positives

See merge request dbus/dbus!305
2022-05-17 14:50:50 +00:00
Alex Richardson
f6689b4f02 dbus-memory.c: Silence -Wcast-align warnings
These values will be appropriately aligned, so we can silence the warning
by adding a void* cast.
2022-05-17 11:21:33 +00:00
Alex Richardson
13eeb2c656 dbus-marshal-bytes.c: Silence -Wcast-align warnings
We have ensured that the values are aligned at runtime, but Clang's
warning cannot see that. Silence the warning with a void* cast.
2022-05-17 11:21:33 +00:00