]> git.ipfire.org Git - thirdparty/dbus.git/log
thirdparty/dbus.git
2 years agoCI: Avoid using a no-op download location that gives a 403 error
Simon McVittie [Fri, 12 May 2023 16:48:48 +0000 (17:48 +0100)] 
CI: Avoid using a no-op download location that gives a 403 error

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Make creation of user idempotent
Simon McVittie [Fri, 12 May 2023 15:19:38 +0000 (16:19 +0100)] 
CI: Make creation of user idempotent

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Disable OOM-testing code paths for Meson, matching Autotools and CMake
Simon McVittie [Fri, 12 May 2023 14:31:58 +0000 (15:31 +0100)] 
CI: Disable OOM-testing code paths for Meson, matching Autotools and CMake

Repeatedly re-running each test with different malloc() calls failing
is really slow, and in particular this is making
dbus:dbus / marshal-recursive time out on freedesktop.org CI.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Install mingw64-cross-cmake in openSUSE image
Simon McVittie [Fri, 12 May 2023 14:28:47 +0000 (15:28 +0100)] 
CI: Install mingw64-cross-cmake in openSUSE image

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Sort lists of openSUSE packages alphabetically
Simon McVittie [Fri, 12 May 2023 14:28:11 +0000 (15:28 +0100)] 
CI: Sort lists of openSUSE packages alphabetically

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Update Windows runners
Simon McVittie [Fri, 12 May 2023 14:24:17 +0000 (15:24 +0100)] 
CI: Update Windows runners

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Remove an obsolete workaround
Simon McVittie [Fri, 12 May 2023 14:01:32 +0000 (15:01 +0100)] 
CI: Remove an obsolete workaround

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Update to current fdo CI templates
Simon McVittie [Fri, 12 May 2023 14:01:15 +0000 (15:01 +0100)] 
CI: Update to current fdo CI templates

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Only run for pushes to dbus
Simon McVittie [Fri, 12 May 2023 14:23:27 +0000 (15:23 +0100)] 
CI: Only run for pushes to dbus

In practice the pipeline is going to fail for namespaces other than
dbus, so don't waste time on trying to run it there; only run the
detached pipeline for the MR.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Run a detached pipeline for merge requests
Simon McVittie [Fri, 12 May 2023 14:00:34 +0000 (15:00 +0100)] 
CI: Run a detached pipeline for merge requests

After abuses of fdo infrastructure were mitigated in
freedesktop/freedesktop#540, contributors cannot usually run pipelines
in their own forks of dbus.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoMerge branch 'cmake_unistd' into 'master'
Simon McVittie [Tue, 21 Mar 2023 20:21:22 +0000 (20:21 +0000)] 
Merge branch 'cmake_unistd' into 'master'

cmake: add missing HAVE_SYS_SYSCALL_H define

See merge request dbus/dbus!400

2 years agocmake: add missing HAVE_SYS_SYSCALL_H define
Luca Boccassi [Mon, 20 Mar 2023 13:37:08 +0000 (13:37 +0000)] 
cmake: add missing HAVE_SYS_SYSCALL_H define

Signed-off-by: Luca Boccassi <bluca@debian.org>
2 years agoMerge branch 'fix-dbus-api-design-wrong-closing-tag' into 'master'
Simon McVittie [Thu, 2 Mar 2023 14:33:07 +0000 (14:33 +0000)] 
Merge branch 'fix-dbus-api-design-wrong-closing-tag' into 'master'

doc/dbus-api-design: fix wrong closing tag

See merge request dbus/dbus!396

2 years agodoc/dbus-api-design: fix wrong closing tag
Yen-Chin, Lee [Thu, 2 Mar 2023 07:31:28 +0000 (15:31 +0800)] 
doc/dbus-api-design: fix wrong closing tag

The original code of 'ProgressNotification' had a wrong closing tag,
which should use '</signal>' instead of '</method>'

Signed-off-by: Yen-Chin, Lee <coldnew.tw@gmail.com>
2 years agoMerge branch 'fix-issue-445' into 'master'
Simon McVittie [Tue, 21 Feb 2023 20:40:19 +0000 (20:40 +0000)] 
Merge branch 'fix-issue-445' into 'master'

CI: Make sure we always have a messagebus user, even if the dbus package isn't installed

Closes #445

See merge request dbus/dbus!394

2 years agotools/ci-install.sh: Make sure we always have a messagebus user, even if the dbus...
Ralf Habacker [Tue, 21 Feb 2023 09:37:36 +0000 (10:37 +0100)] 
tools/ci-install.sh: Make sure we always have a messagebus user, even if the dbus package isn't installed

This fixes a CI installation issue with the meson build system on openSUSE
distribution.

Fixes #445

2 years agoStart 1.15.6
Simon McVittie [Wed, 8 Feb 2023 16:53:37 +0000 (16:53 +0000)] 
Start 1.15.6

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoUpdate AUTHORS
Simon McVittie [Wed, 8 Feb 2023 16:51:33 +0000 (16:51 +0000)] 
Update AUTHORS

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoPrepare v1.15.4 dbus-1.15.4
Simon McVittie [Wed, 8 Feb 2023 11:55:54 +0000 (11:55 +0000)] 
Prepare v1.15.4

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoNEWS: Add #421
Simon McVittie [Wed, 8 Feb 2023 10:47:08 +0000 (10:47 +0000)] 
NEWS: Add #421

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years ago_dbus_string_skip_blank(): Let the final assert follow the previous search
Ralf Habacker [Thu, 19 Jan 2023 15:17:43 +0000 (16:17 +0100)] 
_dbus_string_skip_blank(): Let the final assert follow the previous search

This appears to have been a copy/paste mistake. If only blanks (defined as
spaces or tabs) were removed, then it cannot be right to check for white
space (defined as spaces, tabs, carriage return or linefeed) afterwards.

If libdbus was compiled with assertions enabled, then this is a
denial-of-service issue for dbus-daemon or other users of DBusServer:
an unauthenticated user with access to the server's socket can send
whitespace that triggers this assertion failure. We recommend that
production versions of dbus, for example in OS distributions, should be
compiled with checks but without assertions.

[smcv: expanded commit message]

Thanks: Evgeny Vereshchagin
Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/421

2 years agoAdd test for _dbus_string_skip_blank()
Ralf Habacker [Thu, 19 Jan 2023 15:18:56 +0000 (16:18 +0100)] 
Add test for _dbus_string_skip_blank()

[smcv: Fix a memory leak]

Reproduces: https://gitlab.freedesktop.org/dbus/dbus/-/issues/421

2 years agoUpdate NEWS for 1.15.x
Simon McVittie [Wed, 8 Feb 2023 10:32:54 +0000 (10:32 +0000)] 
Update NEWS for 1.15.x

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoMerge branch 'add-ci-build-libdbus-subproject' into 'master'
Simon McVittie [Tue, 7 Feb 2023 10:05:16 +0000 (10:05 +0000)] 
Merge branch 'add-ci-build-libdbus-subproject' into 'master'

gitlab-ci: build libdbus as subproject

See merge request dbus/dbus!388

2 years agogitlab-ci: build libdbus as subproject
Daniel Wagner [Fri, 13 Jan 2023 12:29:06 +0000 (13:29 +0100)] 
gitlab-ci: build libdbus as subproject

Test it's possible to consume libdbus as a subproject.

Suggested-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agobuild: Use list for dbus_static_flags
Daniel Wagner [Fri, 13 Jan 2023 13:04:19 +0000 (14:04 +0100)] 
build: Use list for dbus_static_flags

Meson complains that it is only allowed to concatenate list to lists and
not strings.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Origin: https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/388

2 years agoMerge branch 'add-test-header-fields' into 'master'
Simon McVittie [Mon, 6 Feb 2023 13:58:57 +0000 (13:58 +0000)] 
Merge branch 'add-test-header-fields' into 'master'

cmake: add missing test for header-fields

See merge request dbus/dbus!322

2 years ago.gitlab-ci.yml: exclude non-functioning test 'header-fields' in job 'windows vs15...
Ralf Habacker [Fri, 7 Oct 2022 09:53:23 +0000 (11:53 +0200)] 
.gitlab-ci.yml: exclude non-functioning test 'header-fields' in job 'windows vs15-64 cmake'

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2 years agocmake: add missing test for header-fields
Ralf Habacker [Mon, 27 Jun 2022 21:18:09 +0000 (23:18 +0200)] 
cmake: add missing test for header-fields

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2 years agoMerge branch 'gitlab-ci' into 'master'
Simon McVittie [Mon, 6 Feb 2023 13:36:43 +0000 (13:36 +0000)] 
Merge branch 'gitlab-ci' into 'master'

CI: Avoid changing uid, except when running installed-tests

Closes #447

See merge request dbus/dbus!392

2 years agoCI: Re-run some tests as root or as non-root, as appropriate
Simon McVittie [Mon, 6 Feb 2023 13:24:11 +0000 (13:24 +0000)] 
CI: Re-run some tests as root or as non-root, as appropriate

On Gitlab-CI we're always running the overall script as root (and
therefore we'll only enter the code path to re-run as non-root),
but when using these scripts for manual testing they might be run as
non-root to begin with.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Remove vestigial support for re-running tests in a Docker container
Simon McVittie [Mon, 6 Feb 2023 13:23:05 +0000 (13:23 +0000)] 
CI: Remove vestigial support for re-running tests in a Docker container

Travis CI needed this, but Gitlab-CI always runs our tests in a Docker
container of our choice, so there's never any need to enter another
(and it's not allowed anyway).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Re-clone the git repository every time
Simon McVittie [Mon, 6 Feb 2023 13:14:23 +0000 (13:14 +0000)] 
CI: Re-clone the git repository every time

This cleans up checkouts that were subjected to `chown -R` prior to this.

Resolves: dbus/dbus#447
Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoCI: Don't change ownership of source directory
Simon McVittie [Mon, 6 Feb 2023 13:13:04 +0000 (13:13 +0000)] 
CI: Don't change ownership of source directory

These CI scripts were originally used on Travis-CI, which starts all
builds as an ordinary user that has the ability to become root via `sudo`.
On Gitlab-CI, we don't need that: we start as uid 0, and can do the
whole CI run like that. This also means we get somewhat better test
coverage, because some of our unit tests benefit from being run as uid 0.

The only test coverage we lose by being uid 0 is that
test_pending_fd_timeout() in test/dbus-daemon.c is skipped, because
uid 0 bypasses the limit that's under test there.

2 years agoMerge branch 'alignof' into 'master'
Simon McVittie [Mon, 16 Jan 2023 12:23:20 +0000 (12:23 +0000)] 
Merge branch 'alignof' into 'master'

Define _DBUS_ALIGNOF using _Alignof when using C11 or newer

See merge request dbus/dbus!389

2 years agoDefine _DBUS_ALIGNOF using _Alignof when using C11 or newer
Khem Raj [Sat, 14 Jan 2023 20:39:43 +0000 (12:39 -0800)] 
Define _DBUS_ALIGNOF using _Alignof when using C11 or newer

WG14 N2350 made very clear that it is an UB having type definitions
within "offsetof" [1]. This patch changes the implementation of macro
_DBUS_ALIGNOF to builtin "_Alignof" to avoid undefined behavior.

clang 16+ has started to diagnose this [2]

Fixes build when using -std >= gnu11 and using clang16+

[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm
[2] https://reviews.llvm.org/D133574

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 years agoMerge branch 'jepio/fix-log-callback-segfault' into 'master'
Simon McVittie [Tue, 10 Jan 2023 11:59:06 +0000 (11:59 +0000)] 
Merge branch 'jepio/fix-log-callback-segfault' into 'master'

bus/selinux: Move vsnprintf call to avoid va_list reuse

See merge request dbus/dbus!386

2 years agobus/selinux: Move vsnprintf call to avoid va_list reuse
Jeremi Piotrowski [Mon, 9 Jan 2023 16:11:32 +0000 (17:11 +0100)] 
bus/selinux: Move vsnprintf call to avoid va_list reuse

In log_callback() the same va_list is reused for a call to vsnprintf and
vsyslog. A va_list can't be reused in this manner, such use is undefined
behavior that changes depending on glibc version.

In current glibc versions a segfault can be observed from the callsite at
bus/selinux.c:412. When trying to log a non-auditable event, the segfault
happens in strlen inside vsyslog.

Moving the call to vsnprintf closer to audit_log_user_avc_message (which is
followed by a 'goto out') avoids the reuse and segfault.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2 years agoMerge branch 'meson-fvisibility-hidden' into 'master'
Simon McVittie [Mon, 9 Jan 2023 15:01:52 +0000 (15:01 +0000)] 
Merge branch 'meson-fvisibility-hidden' into 'master'

meson: Use -fvisibility=hidden on Unix if supported

See merge request dbus/dbus!383

2 years agomeson: Use -fvisibility=hidden on Unix if supported
Simon McVittie [Fri, 6 Jan 2023 13:49:17 +0000 (13:49 +0000)] 
meson: Use -fvisibility=hidden on Unix if supported

This avoids accidentally exporting all of our private symbols as part
of the LIBDBUS_PRIVATE_x.y.z verdef, including ones that don't need to
be visible outside the shared library even when testing internals
(_dbus_watch_set_handler is a good example).

Helps: https://gitlab.freedesktop.org/dbus/dbus/-/issues/437
Signed-off-by: Simon McVittie <smcv@collabora.com>
2 years agoMerge branch 'fix-data-race' into 'master'
Ralf Habacker [Sat, 7 Jan 2023 09:17:43 +0000 (09:17 +0000)] 
Merge branch 'fix-data-race' into 'master'

Fix data race with members of struct DBusCounter

Closes #426

See merge request dbus/dbus!379

2 years agoFix data race in multithreaded application
Ralf Habacker [Tue, 3 Jan 2023 13:29:14 +0000 (14:29 +0100)] 
Fix data race in multithreaded application

This commit fixes a data race condition discovered by the
gcc thread sanitizer by also locking the associated mutex
when reading the corresponding counter.

Fixes #426

2 years agoAdd multithreaded unit test for DBusCounter to available build systems
Ralf Habacker [Tue, 3 Jan 2023 13:21:51 +0000 (14:21 +0100)] 
Add multithreaded unit test for DBusCounter to available build systems

The mentioned test is build on unix like platforms when embedded tests
are enabled.

2 years agoMerge branch 'meson-declare-dependency' into 'master'
Simon McVittie [Wed, 4 Jan 2023 14:26:56 +0000 (14:26 +0000)] 
Merge branch 'meson-declare-dependency' into 'master'

meson: Declare dependency for use as a subproject

See merge request dbus/dbus!368

2 years agomeson: Introduce message_bus and tools command line option
Daniel Wagner [Thu, 24 Nov 2022 08:17:45 +0000 (09:17 +0100)] 
meson: Introduce message_bus and tools command line option

To make the consume libdbus via Meson's subproject use case more useful,
introduce message_bus and tools command line options which control if
the D-Bus daemon and/or the tools are build. The idea here is that
depending projects are interested only in the library.

The strong recommendation is only to build libdbus as static library:

  libdbus_dep = dependency(
    'dbus-1',
    required: get_option('libdbus'),
    fallback: ['dbus', 'libdbus_dep'],
    default_options: [
      'default_library=static',
      'embedded_tests=false',
      'message_bus=false',
      'modular_tests=disabled',
      'tools=false',
    ],
  )

This ensures that any installed D-Bus infrastructure on the target
system is not overwritten.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agomeson: Declare dependency
Daniel Wagner [Tue, 22 Nov 2022 14:43:47 +0000 (15:43 +0100)] 
meson: Declare dependency

Allow other Meson project to consume libdbus as subproject. For this
we need to instantiate a dependency object.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge branch 'spdx-afl-2.1-or-gpl-2.0' into 'master'
Ralf Habacker [Wed, 4 Jan 2023 07:54:16 +0000 (07:54 +0000)] 
Merge branch 'spdx-afl-2.1-or-gpl-2.0' into 'master'

Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license

See merge request dbus/dbus!375

2 years agodbus/dbus-macros-internal.h: Add blank line after the copyright state
Ralf Habacker [Wed, 4 Jan 2023 07:32:55 +0000 (08:32 +0100)] 
dbus/dbus-macros-internal.h: Add blank line after the copyright state

Thus it is identical with the other places.

2 years agoAdd SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license
Ralf Habacker [Mon, 2 Jan 2023 14:31:43 +0000 (15:31 +0100)] 
Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license

The full license texts are not added because they were already
added in a previous commit.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
see #394

2 years agoMerge branch 'master' into 'master'
Ralf Habacker [Wed, 4 Jan 2023 07:40:59 +0000 (07:40 +0000)] 
Merge branch 'master' into 'master'

_dbus_loop_iterate: `timeout` can be defined as int

See merge request dbus/dbus!381

2 years ago_dbus_loop_iterate: `timeout` can be defined as int
Xin Shi [Wed, 4 Jan 2023 02:19:56 +0000 (10:19 +0800)] 
_dbus_loop_iterate: `timeout` can be defined as int

all places where `timeout` is used can be represented as int.
This MR is a response to issue #430.

Signed-off-by: Xin Shi <shixin21@huawei.com>
2 years agoMerge branch 'spdx-FSFULLR' into 'master'
Simon McVittie [Tue, 3 Jan 2023 19:24:08 +0000 (19:24 +0000)] 
Merge branch 'spdx-FSFULLR' into 'master'

Add SPDX license marker for the FSFULLR license

See merge request dbus/dbus!376

2 years agoAdd SPDX license marker for the FSFULLR license
Ralf Habacker [Mon, 2 Jan 2023 14:55:31 +0000 (15:55 +0100)] 
Add SPDX license marker for the FSFULLR license

The associated full license text was retrieved from https://spdx.org.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2 years agoMerge branch 'fix-425' into 'master'
Simon McVittie [Tue, 3 Jan 2023 19:02:12 +0000 (19:02 +0000)] 
Merge branch 'fix-425' into 'master'

Permit access to /tmp dbus socket

See merge request dbus/dbus!380

2 years agoPermit access to /tmp dbus socket
Dave Jones [Tue, 3 Jan 2023 18:42:51 +0000 (18:42 +0000)] 
Permit access to /tmp dbus socket

After 6e48c317 the test-apparmor-activation test fails as it can no
longer access the dbus socket in /tmp. This commit updates the apparmor
profile used within the test

2 years agoMerge branch 'master' into 'master'
Ralf Habacker [Tue, 3 Jan 2023 10:47:04 +0000 (10:47 +0000)] 
Merge branch 'master' into 'master'

socket_handle_watch: break when `found` is TRUE in server

See merge request dbus/dbus!374

2 years agosocket_handle_watch: break when `found` is TRUE in server
Aiknow [Thu, 15 Dec 2022 02:38:12 +0000 (10:38 +0800)] 
socket_handle_watch: break when `found` is TRUE in server

skip useless loop when `found` is TRUE.
This MR is a response to issue #431.

Signed-off-by: Aiknow <shixin21@huawei.com>
3 years agoMerge branch 'use-gitlab-uri' into 'master'
Simon McVittie [Wed, 30 Nov 2022 19:17:33 +0000 (19:17 +0000)] 
Merge branch 'use-gitlab-uri' into 'master'

cleanup: Use gitlab URI for bug reporting

See merge request dbus/dbus!372

3 years agocleanup: Use gitlab URI for bug reporting
Marco Trevisan (Treviño) [Tue, 1 Nov 2022 14:54:13 +0000 (15:54 +0100)] 
cleanup: Use gitlab URI for bug reporting

Bugzilla is dead for long time now.

3 years agoMerge branch 'pointer-assumptions' into 'master'
Simon McVittie [Tue, 29 Nov 2022 22:26:39 +0000 (22:26 +0000)] 
Merge branch 'pointer-assumptions' into 'master'

Statically assert some things we assume about pointers

See merge request dbus/dbus!345

3 years agointernals: Statically assert some things we assume about pointers
Simon McVittie [Tue, 29 Nov 2022 20:47:21 +0000 (20:47 +0000)] 
internals: Statically assert some things we assume about pointers

Like many relatively-low-level codebases, dbus has historically assumed
that data pointers are interchangeable with function pointers (which is
implied by POSIX and also true on Windows, but not guaranteed by ISO C).

Before dbus!335 was merged, we also assumed that size_t is the same
size as a pointer (which is frequently assumed, but not guaranteed by
ISO C, and notably not true on CHERI). dbus!335 is believed to have
removed all uses of that assumption.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agodbus-marshal-basic: Use _DBUS_ALIGNOF to compare alignments
Simon McVittie [Wed, 14 Sep 2022 12:32:47 +0000 (13:32 +0100)] 
dbus-marshal-basic: Use _DBUS_ALIGNOF to compare alignments

This means we get the alignment comparisons even on non-gcc compilers.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'cmake-licenseref' into 'master'
Simon McVittie [Tue, 29 Nov 2022 22:10:46 +0000 (22:10 +0000)] 
Merge branch 'cmake-licenseref' into 'master'

Fix SPDX license reference in FindGLIB2

See merge request dbus/dbus!371

3 years agoFix SPDX license reference in FindGLIB2
Simon McVittie [Tue, 29 Nov 2022 20:41:44 +0000 (20:41 +0000)] 
Fix SPDX license reference in FindGLIB2

The `.txt` here was unnecessary.

Fixes: d6abc1da "cmake: Add BSD-style licenses"
Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'lgpl' into 'master'
Simon McVittie [Tue, 29 Nov 2022 20:44:35 +0000 (20:44 +0000)] 
Merge branch 'lgpl' into 'master'

Add missing license text for LGPL-2.1-or-later

See merge request dbus/dbus!369

3 years agoAdd missing license text for LGPL-2.1-or-later
Simon McVittie [Tue, 29 Nov 2022 19:32:26 +0000 (19:32 +0000)] 
Add missing license text for LGPL-2.1-or-later

Fixes: 8c1d0f13 "dbus/dbus-backtrace-win.c: New file with backtrace generator for Windows"
Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'gpl' into 'master'
Simon McVittie [Tue, 29 Nov 2022 20:43:44 +0000 (20:43 +0000)] 
Merge branch 'gpl' into 'master'

Fix some stray filename references for GPL-2.0-or-later

See merge request dbus/dbus!370

3 years agoFix some stray filename references for GPL-2.0-or-later
Simon McVittie [Tue, 29 Nov 2022 19:34:32 +0000 (19:34 +0000)] 
Fix some stray filename references for GPL-2.0-or-later

The SPDX name for this license includes the `.0`.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'goto-considered-unnecessary' into 'master'
Ralf Habacker [Tue, 29 Nov 2022 19:02:38 +0000 (19:02 +0000)] 
Merge branch 'goto-considered-unnecessary' into 'master'

Use 'continue' keyword in preference to 'goto' where possible

See merge request dbus/dbus!356

3 years agoUse 'continue' keyword in preference to 'goto' where possible
Simon McVittie [Fri, 9 Sep 2022 15:21:43 +0000 (16:21 +0100)] 
Use 'continue' keyword in preference to 'goto' where possible

In some more complicated loops, we do need to use 'goto' to exit from
an inner loop, or to jump to cleanup or an increment of an iterator
immediately before the next loop iteration. However, in these simple
cases, jumping to a label immediately before the 'while' keyword is
unnecessary: we can use an equivalent 'continue' statement for flow
control.

This makes it easier for maintainers to notice the loops where we are
doing something more complicated, which still use 'goto', and know
that they need to pay more attention in those cases.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'spdx' into 'master'
Ralf Habacker [Tue, 29 Nov 2022 17:53:36 +0000 (17:53 +0000)] 
Merge branch 'spdx' into 'master'

Add SPDX licensing information for the uncommon licenses (not AFL-2.1|GPL-2.0+ and not MIT)

See merge request dbus/dbus!311

3 years agotools/cmake-format: Relicense to BSD-3-Clause
Ralf Habacker [Tue, 31 May 2022 08:45:44 +0000 (10:45 +0200)] 
tools/cmake-format: Relicense to BSD-3-Clause

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agocmake: Add BSD-style licenses
Simon McVittie [Wed, 18 May 2022 13:09:59 +0000 (14:09 +0100)] 
cmake: Add BSD-style licenses

I've erred on the side of caution and treated the COPYING-CMAKE-SCRIPTS
license (a BSD-3-Clause variation) as its own distinct license.

Co-authored-by: Ralf Habacker <ralf.habacker@freenet.de>
Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agodbus/dbus-backtrace-win.c: New file with backtrace generator for Windows
Ralf Habacker [Wed, 1 Jun 2022 08:02:15 +0000 (10:02 +0200)] 
dbus/dbus-backtrace-win.c: New file with backtrace generator for Windows

This file was added to simplify the license documentation, because the
code moved from dbus-sysdeps-win.c is subject to a different license.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
[smcv: keep license grant; add to Meson build system]
Co-authored-by: Simon McVittie <smcv@collabora.com>
3 years agotools: Mark GPL-only files with SPDX license identifier
Simon McVittie [Wed, 18 May 2022 13:55:48 +0000 (14:55 +0100)] 
tools: Mark GPL-only files with SPDX license identifier

These files are licensed under the GPL only, without the AFL dual-license
of most of the dbus codebase.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Co-authored-by: Ralf Habacker <ralf.habacker@freenet.de>
3 years agodbus-arch-deps: Mark as AFL-2.0 OR GPL-2.0-or-later
Simon McVittie [Wed, 18 May 2022 13:35:27 +0000 (14:35 +0100)] 
dbus-arch-deps: Mark as AFL-2.0 OR GPL-2.0-or-later

This was probably meant to be relicensed from AFL-2.0 to AFL-2.1 at the
same time as the rest of the codebase, but it wasn't. For now, just
convert its documented license status into machine-readable form.

The history of this file seems to be completely Red Hat and Collabora,
so we should be able to relicense it to (AFL-2.1 OR GPL-2.0-or-later)
or even to MIT, but let's start by making the stated license more
obvious.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agodbus-hash: Add (AFL-2.1 OR GPL-2.0-or-later) AND TCL SPDX license identifier
Simon McVittie [Wed, 18 May 2022 13:29:11 +0000 (14:29 +0100)] 
dbus-hash: Add (AFL-2.1 OR GPL-2.0-or-later) AND TCL SPDX license identifier

The TCL-derived code is under its own license, so the overall license
of the file is (AFL-2.1 OR GPL-2.0-or-later) AND TCL.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agodbus/dbus-sha.c: add LicenseRef-pycrypto-orig SPDX license marker
Ralf Habacker [Tue, 3 May 2022 08:12:36 +0000 (10:12 +0200)] 
dbus/dbus-sha.c: add LicenseRef-pycrypto-orig SPDX license marker

This permissive license does not appear to be a match for anything
on the SPDX license list, so we need to use the LicenseRef- prefix
for a custom license.

Co-authored-by: Simon McVittie <smcv@collabora.com>
3 years agodbus/versioninfo.rc.in: add LicenseRef-GAP SPDX license marker
Ralf Habacker [Tue, 3 May 2022 08:03:04 +0000 (10:03 +0200)] 
dbus/versioninfo.rc.in: add LicenseRef-GAP SPDX license marker

This permissive license does not appear to be a match for anything
on the SPDX license list, so we need to use the LicenseRef- prefix
for a custom license.

It's referred to as GAP (presumably short for "GNU all-permissive") in
https://sources.debian.org/src/libassuan/2.5.5-1/debian/copyright/
so use the same abbreviation here.

Co-authored-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'clang-ci' into 'master'
Simon McVittie [Fri, 14 Oct 2022 14:40:46 +0000 (14:40 +0000)] 
Merge branch 'clang-ci' into 'master'

ci: build dbus with clang as well

See merge request dbus/dbus!358

3 years agoci: get UBSan to fail and print full backtraces
Evgeny Vereshchagin [Mon, 10 Oct 2022 22:22:06 +0000 (22:22 +0000)] 
ci: get UBSan to fail and print full backtraces

Unlike ASan, by default UBSan prints one-line warnings and keeps going
and it makes it impossible for the CI to catch issues automatically when
it runs the unit tests. With this patch applied the CI should be able to
prevent issues like
https://gitlab.freedesktop.org/smcv/dbus-issue413/-/merge_requests/1#note_1549306
from making it into the repository going forward.

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
3 years agoci: build dbus with clang as well
Evgeny Vereshchagin [Mon, 10 Oct 2022 06:17:38 +0000 (06:17 +0000)] 
ci: build dbus with clang as well

It should make it possible to catch issues like
like https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/357

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
3 years agoMerge branch 'mit-license-some-tests' into 'master'
Simon McVittie [Wed, 12 Oct 2022 12:08:46 +0000 (12:08 +0000)] 
Merge branch 'mit-license-some-tests' into 'master'

Add copyright holders and MIT license to some tests that did not specify

See merge request dbus/dbus!359

3 years agotest-exit: Add a permissive license
Simon McVittie [Mon, 6 Jun 2022 14:19:57 +0000 (15:19 +0100)] 
test-exit: Add a permissive license

Red Hat have previously given permission for relicensing, and all
subsequent contributions to this file were trivial.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agotest-threads-init: Add a permissive license
Simon McVittie [Mon, 6 Jun 2022 14:18:36 +0000 (15:18 +0100)] 
test-threads-init: Add a permissive license

With permission from Philip Withnall on behalf of Endless, me on behalf
of Collabora, and relying on previous permission from Red Hat
representatives.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agomanual-tcp: Add a permissive license
Simon McVittie [Mon, 6 Jun 2022 14:11:44 +0000 (15:11 +0100)] 
manual-tcp: Add a permissive license

With permission from Ralf Habacker via dbus!304 and the mailing list.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agomanual-paths: Apply a permissive license
Simon McVittie [Mon, 6 Jun 2022 14:11:03 +0000 (15:11 +0100)] 
manual-paths: Apply a permissive license

This was contributed by Ralf Habacker and later edited by me, with a
trivial change from Thomas Zimmermann which I don't think affects its
copyright.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agomanual-dir-iter: Apply a permissive license
Simon McVittie [Mon, 6 Jun 2022 14:09:00 +0000 (15:09 +0100)] 
manual-dir-iter: Apply a permissive license

This was contributed by Ralf Habacker, with a trivial change from
Philip Withnall which I don't think affects its copyright.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agotest-shutdown: Apply a permissive license
Simon McVittie [Mon, 6 Jun 2022 14:04:57 +0000 (15:04 +0100)] 
test-shutdown: Apply a permissive license

All significant contributions to this file were from companies or
individuals that gave permission for relicensing to MIT (I have assumed
that trivial changes from Marcus Brinkmann and Kjartan Maraas were too
small to affect copyright status).

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agotest-ids: Apply a permissive license
Simon McVittie [Mon, 6 Jun 2022 13:55:42 +0000 (14:55 +0100)] 
test-ids: Apply a permissive license

All significant contributions to this file were from companies that gave
permission for relicensing to MIT (I have assumed that trivial changes
from Marcus Brinkmann and Ralf Habacker were too small to affect
copyright status).

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agotest-autolaunch: Add a permissive license
Simon McVittie [Mon, 6 Jun 2022 13:52:11 +0000 (14:52 +0100)] 
test-autolaunch: Add a permissive license

The license for this file was never stated, but all contributions to it
have been from Red Hat or Collabora, and representatives of both
companies gave permission for MIT relicensing in 2007.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agolaunch-helper-for-tests: Add a permissive license
Simon McVittie [Mon, 6 Jun 2022 13:48:49 +0000 (14:48 +0100)] 
launch-helper-for-tests: Add a permissive license

I wrote this, and it hasn't changed since.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'test-autolaunch-win-fixes' into 'master'
Simon McVittie [Wed, 12 Oct 2022 11:08:53 +0000 (11:08 +0000)] 
Merge branch 'test-autolaunch-win-fixes' into 'master'

test-autolaunch-win.c: Prevent assertion in dbus_message_unref()

Closes #422

See merge request dbus/dbus!366

3 years agotest-autolaunch-win.c: Prevent assertion in dbus_message_unref()
Ralf Habacker [Wed, 12 Oct 2022 07:34:37 +0000 (09:34 +0200)] 
test-autolaunch-win.c: Prevent assertion in dbus_message_unref()

dbus_message_unref() is in principle able to handle a NULL parameter, but
causes the program to abort when `fatal_warnings_on_check_failed` is set.

Therefore the call with a NULL parameter is avoided from now on.

Fixes #422

3 years agoMerge branch 'no-as-ac-expand' into 'master'
Ralf Habacker [Wed, 12 Oct 2022 06:41:02 +0000 (06:41 +0000)] 
Merge branch 'no-as-ac-expand' into 'master'

Autotools: use AX_RECURSIVE_EVAL instead of AS_AC_EXPAND

See merge request dbus/dbus!364

3 years agoAutotools: use AX_RECURSIVE_EVAL instead of AS_AC_EXPAND
Simon McVittie [Tue, 11 Oct 2022 20:20:50 +0000 (21:20 +0100)] 
Autotools: use AX_RECURSIVE_EVAL instead of AS_AC_EXPAND

AX_RECURSIVE_EVAL is maintained as part of autoconf-archive, so we don't
need to bundle our own copy and keep track of its licensing status.
It's very similar to AS_AC_EXPAND, but the arguments are the other way
round and it doesn't automatically AC_SUBST its result.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'no-pkg-m4' into 'master'
Ralf Habacker [Wed, 12 Oct 2022 06:22:51 +0000 (06:22 +0000)] 
Merge branch 'no-pkg-m4' into 'master'

m4: Stop shipping our own copy of pkg.m4

See merge request dbus/dbus!365

3 years agom4: Stop shipping our own copy of pkg.m4
Simon McVittie [Tue, 11 Oct 2022 20:08:05 +0000 (21:08 +0100)] 
m4: Stop shipping our own copy of pkg.m4

The canonical way to find these macro is to run autogen.sh or autoreconf
while pkg-config (or pkgconf) is installed, which will copy an up-to-date
version of the macros from /usr/share/aclocal. The `make dist` archive
will include a bundled copy of those macros, but the git repository
doesn't need them.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge branch 'autolaunch-win' into 'master'
Ralf Habacker [Tue, 11 Oct 2022 18:23:44 +0000 (18:23 +0000)] 
Merge branch 'autolaunch-win' into 'master'

Fixes for test-autolaunch-win

See merge request dbus/dbus!363

3 years agotest-autolaunch-win: Remove redundant check for ERROR message
Simon McVittie [Tue, 11 Oct 2022 17:41:00 +0000 (18:41 +0100)] 
test-autolaunch-win: Remove redundant check for ERROR message

This seems to have been intended to give a more specific error message
if the method call failed, but it will not have been effective, because
dbus_connection_send_with_reply_and_block() ends with a check for ERROR
messages using dbus_set_error_from_message(). This means that if the
reply was an ERROR message, it will already have been converted into a
DBusError by the time call_method() regains control.

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