Commit graph

6422 commits

Author SHA1 Message Date
Simon McVittie
1582f713a3 build: Distribute Meson build system in release tarballs
As long as we are treating Autotools as a first-class citizen, what we
release will be `make distcheck` output.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
eefdbe86f8 build: Make the DBUS_MACHINE_UUID_FILE correctly absolute
get_option('localstatedir') might be relative.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
c2b2e0e728 build: Resolve localstatedir, sysconfdir relative to prefix
If the prefix is something like /opt/dbus, then --localstatedir=var
should result in using /opt/dbus/var, and so on. However, if configured
with --localstatedir=/var, then the prefix is ignored.

Meson special-cases these to default to /var and /etc (respectively),
as absolute paths, if the prefix is /usr; so distribution builds will
typically still end up using /var and /etc.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
5e6706a530 build: Require yelp-build for ducktype docs, not Doxygen docs
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
6b2d1d65f3 doc: Build Ducktype documentation even if doxygen is not found
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
c02d34555a cmake: Generate the same DBus1Config with Meson as with Autotools
DBus1Config.cmake.in relies on DBus1Targets.cmake, which is generated
by CMake. DBus1Config.pkgconfig.in uses pkg-config and is independent
of CMake.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
fa764fe4e9 test/data: Generate a separate installable set of data files
Some of the strings we need to substitute into these files are not
the same for as-installed testing as for build-time testing.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
67b651d1c6 build-timestamp.py: Respect SOURCE_DATE_EPOCH
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
29a20c3284 build: Make modular_tests an auto feature
These don't alter the contents of the non-test executables, so we can
safely enable them whenever GLib is available.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
60afeaa5d6 test: Avoid arbitrary Python injection if compiled in a path with quotes
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
22b12cdb3f test: Disable sanitizers for test-segfault
This resolves the TODO comment.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
4bce2c36f0 test: Expect TAP output for tests in name-test
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
43927ea002 test: Don't run test-autolaunch directly
It's intended to be run from run-test.sh.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
83fbc01dca test: Sort test executables
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
3bfd184ab7 tools: Ship disable-uac.rc instead of generating it at build time
The Meson build system ships it anyway.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
0fa6060ea5 .gitignore: Ignore __pycache__ directories anywhere in the tree
The Meson build system adds several Python scripts, some of which import
code from other Python scripts, which will result in __pycache__
directories appearing in the source tree.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Marc-André Lureau
e7c1646661 README: update for meson build-sys 2022-07-13 20:36:13 +01:00
Félix Piédallu
cd2e382610 Add Meson build system
Signed-off-by: Félix Piédallu <felix@piedallu.me>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
b7a1da122a Merge branch 'spec-underscore-idn' into 'master'
spec: Document a recommendation for IDNs in reversed domain names

See merge request dbus/dbus!324
2022-07-13 17:32:45 +00:00
Simon McVittie
7bf5b2b5d6 spec: Document a recommendation for IDNs in reversed domain names
D-Bus names are in an ASCII subset, so IDNs have to be in their ACE
encoding (Punycode). ACE-encoded labels contain hyphen/minus characters,
and like any other label containing a hyphen/minus, we recommend
replacing those with underscores, to improve interoperability with
contexts that allow underscores but not hyphen/minus, such as
D-Bus object paths and Flatpak app-IDs.

Prompted by <https://github.com/flatpak/flatpak/issues/4974>.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 15:55:42 +01:00
Simon McVittie
59c082d45d Merge branch 'fixup' into 'master'
CI fixes

See merge request dbus/dbus!323
2022-07-11 11:17:53 +00:00
Marc-André Lureau
c79d428564 cmake: use -gdwarf-2
GCC 10.2.0 complains on opensuse mingw builds, ex:
disable-crash-handling.c: error: STABS debugging information is obsolete and not supported anymore [-Werror]

According to
https://gitlab.freedesktop.org/dbus/dbus/-/issues/133#note_129599,
-gdwarf-2 is the second best option.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-06 15:58:39 +04:00
Marc-André Lureau
505233a57f tools/ci: remove --{enable,disable}-containers
Fixes: 9d60676a ("Disable the Containers interface")

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-06 15:43:52 +04:00
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