summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* CI: Avoid using a no-op download location that gives a 403 errorSimon McVittie2023-05-121-1/+1
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Make creation of user idempotentSimon McVittie2023-05-121-2/+4
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Disable OOM-testing code paths for Meson, matching Autotools and CMakeSimon McVittie2023-05-121-0/+4
| | | | | | | | 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>
* CI: Install mingw64-cross-cmake in openSUSE imageSimon McVittie2023-05-121-0/+1
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Sort lists of openSUSE packages alphabeticallySimon McVittie2023-05-121-3/+3
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Update Windows runnersSimon McVittie2023-05-121-1/+1
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* tools/ci-install.sh: Make sure we always have a messagebus user, even if the ↵Ralf Habacker2023-02-211-0/+4
| | | | | | | | | dbus package isn't installed This fixes a CI installation issue with the meson build system on openSUSE distribution. Fixes #445
* CI: Re-run some tests as root or as non-root, as appropriateSimon McVittie2023-02-061-8/+23
| | | | | | | | | 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>
* CI: Remove vestigial support for re-running tests in a Docker containerSimon McVittie2023-02-062-44/+3
| | | | | | | | 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>
* CI: Don't change ownership of source directorySimon McVittie2023-02-061-5/+0
| | | | | | | | | | | | 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.
* meson: Introduce message_bus and tools command line optionDaniel Wagner2023-01-041-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later licenseRalf Habacker2023-01-045-0/+10
| | | | | | | | | 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
* tools/cmake-format: Relicense to BSD-3-ClauseRalf Habacker2022-11-291-4/+1
| | | | Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
* tools: Mark GPL-only files with SPDX license identifierSimon McVittie2022-11-2912-0/+12
| | | | | | | | 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>
* ci: get UBSan to fail and print full backtracesEvgeny Vereshchagin2022-10-131-0/+2
| | | | | | | | | | | 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>
* ci: build dbus with clang as wellEvgeny Vereshchagin2022-10-132-1/+21
| | | | | | | 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>
* build: Show a warning if the system bus socket is not interoperableSimon McVittie2022-10-111-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | We would like to start using ${runstatedir}/dbus/system_bus_socket, so that distributors who make /var/run a symbolic link to /run will usually get their dbus-daemon listening on /run/dbus/system_bus_socket, which has some advantages in corner cases, such as when /var is mediated by an automounter or is unmounted during system shutdown. Unfortunately, the interoperable path in the D-Bus Specification is /var/run/dbus/system_bus_socket for historical reasons (D-Bus is older than /run), and older versions of Slackware are known to have had /run and /var/run as distinct directories. Do a check during configuration to catch systems configured like this and show a warning. When cross-compiling, this assumes that the system where dbus is built (the build system in Autotools/Meson, or the "host" in CMake terminology) has its /var/run and /run set up in a way that is compatible with the system where dbus will run (the host system in Autotools/Meson, or the "target" in CMake terminology). This is not 100% correct, but seems good enough for a warning that will hopefully only trigger for misguided OS distributors. Signed-off-by: Simon McVittie <smcv@collabora.com>
* dbus-monitor: Disable automatic message filteringKai A. Hiller2022-10-111-1/+1
|
* CI: Don't pin msys2 packages to a specific version at allSimon McVittie2022-09-121-13/+15
| | | | | | | | | | | Similar to dbus/dbus!286, but more so: just use the package names, ignoring their version numbers completely. pcre2 is not strictly needed at the moment, but it'll be a dependency for GLib >= 2.73.x (older versions used pcre). For a bit of future-proofing, download both pcre and pcre2. Signed-off-by: Simon McVittie <smcv@collabora.com>
* tools/ci-install.sh: Install meson build dependencies on FreeBSDAlex Richardson2022-08-101-0/+3
| | | | | Python is already installed, but we need the python3 package to get the /usr/local/bin/python3 symlink rather than the one with the version suffix.
* ci-build.sh: Add a autotools ci_variant without the docs archiveAlex Richardson2022-08-101-4/+6
| | | | | This is needed to add autotools support to the FreeBSD CI since we don't include all the packages needed to build dbus-docs.tar.xz.
* gitlab-ci: Use GNU make on FreeBSDAlex Richardson2022-08-102-1/+5
| | | | | | The Makefile.am files contain % pattern rules that are not supported by `make` (bmake) on FreeBSD. Since the replacing the patterns is non-trivial, this commit updates the CI script to use GNU make when building on FreeBSD.
* gitlab-ci: Install pkg-config on FreeBSDAlex Richardson2022-08-101-0/+1
| | | | | | Without this change the autotools build system fails to find glib and reports an error. The CMake build worked prior to this change since CMake has fallback logic to find glib even without pkg-config.
* dbus-launch-x11.c: Silence clang -Wcast-align warningAlex Richardson2022-08-101-1/+1
| | | | | In this case the cast is safe since the manual guarantees that the underlying storage is an array of `long`.
* tools/ci-build.sh: Ensure that $builddir is setAlex Richardson2022-08-101-0/+4
| | | | | | When adding the new FreeBSD CI, this was not implicitly forwarded to QEMU, so the build script failed with confusing errors. Add an explicit check that the variable is set to make those cases easier to debug.
* tools/ci-install.sh: Add FreeBSD supportAlex Richardson2022-08-101-0/+30
| | | | This adds support for installing the required packages on FreeBSD.
* tools/ci-{build,install}.sh: Use a portable interpreter argumentAlex Richardson2022-08-102-2/+2
| | | | | | FreeBSD has bash installed as /usr/local/bin/bash, so hardcoding /bin/bash does not work. Instead use the portable replacement using env which will find bash in $PATH.
* Remove fallback implementation of strtoll(), strtoull()Simon McVittie2022-07-194-324/+1
| | | | | | | We now require a (mostly-)C99 compiler, which guarantees the presence of these functions. Signed-off-by: Simon McVittie <smcv@collabora.com>
* dbus-launch-x11: Ignore X11 connection when checking for memory leaksSimon McVittie2022-07-151-1/+20
| | | | | | | | | | | | | | The X11 connection is opened and never closed. Because dbus-launch forks and continues to run non-trivial code in a forked child, it is not clear whether (or where) it would be safe to close it; instead, we leave it open until process exit, at which point the socket is cleaned up by the kernel. Any memory allocated for the X11 connection is only allocated once per run of dbus-launch, so there's no need to keep track of it, and we can silence these memory leak warnings as uninteresting. Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Link libexpat statically when using Wine to run testsSimon McVittie2022-07-131-0/+3
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Ensure that subprojects (if used) are on the Wine PATHSimon McVittie2022-07-131-1/+10
| | | | | | | If we are not using Meson subprojects, this will have no practical effect, because the directories won't exist. Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Enable Ducktype-based documentation on Debian/UbuntuSimon McVittie2022-07-131-2/+12
| | | | | | | | We don't currently know the equivalent of python3-mallard-ducktype on other OSs like openSUSE, but we know this should work on Debian (it does when we do Autotools builds). Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Run Meson with -v so we can see compiler command-linesSimon McVittie2022-07-131-1/+1
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Enable modular tests for all Meson-based CI buildsSimon McVittie2022-07-131-1/+2
| | | | | | | The whole point of these tests is that they're safe to enable because they don't affect the production binaries. Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Factor out Wine setup so that it applies equally to MesonSimon McVittie2022-07-131-15/+21
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Install cross pkg-config on openSUSESimon McVittie2022-07-131-0/+1
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Explicitly enable wrap dependenciesSimon McVittie2022-07-131-0/+5
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Tell Meson build where to find the source directorySimon McVittie2022-07-131-1/+1
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Implement debug build variant for MesonSimon McVittie2022-07-131-1/+22
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Explicitly disable features that can't work on WindowsSimon McVittie2022-07-131-0/+13
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Add glue to build with mingw-w64 toolchain on DebianSimon McVittie2022-07-131-1/+14
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Only use openSUSE mingw*-meson as a replacement for `meson setup`Simon McVittie2022-07-131-7/+15
| | | | | | | | These pass a lot of configure arguments taken from RPM macros, which are only accepted by the meson command if we don't explicitly select a mode. Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Verify that Autotools `make dist` includes everything needed for MesonSimon McVittie2022-07-131-4/+4
| | | | | | | | | | | | | | | | | This is similar to what we have done for CMake since dbus/dbus!87 (commit 1063bba "CI: Do the CMake native debug build from an Autotools `make dist`"). Our official source releases are Autotools `make dist` tarballs, so our CI should assert that such tarballs contain everything necessary to do a CMake or Meson build, so that downstream distributions using our tarballs as source can choose their preferred build system. When the Meson build system is ready to be recommended as more preferred than Autotools, we can do as GLib did: stop releasing `make dist` tarballs, and start releasing `meson dist` tarballs instead (which will change nothing for Meson or CMake users, but Autotools users will have to run autoreconf or autogen.sh before building). Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Consistently build in ./buildSimon McVittie2022-07-131-8/+13
| | | | | | | This will make it easier to capture log files. All our CI builds happen in an expendable checkout, so we can safely remove and re-create ./build. Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Add repository for word-size-independent mingw stuffSimon McVittie2022-07-131-0/+2
| | | | | | windows:mingw:win64 depends on packages from windows:mingw. Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Reinstate mingw*-glib2-develSimon McVittie2022-07-131-0/+1
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* CI: Use mingw32-meson if that's what we're targetingSimon McVittie2022-07-131-1/+4
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add meson build CIMarc-André Lureau2022-07-133-2/+24
| | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* meson: Create /var/lib/dbusSimon McVittie2022-07-131-0/+5
| | | | | | This holds the machine ID created by dbus-uuidgen. Signed-off-by: Simon McVittie <smcv@collabora.com>
* build: Change how we create empty directories from MesonSimon McVittie2022-07-132-0/+20
| | | | | | | | | Use install_emptydir() in Meson versions that support it, or a script with similar invocation in versions that do not. This will make it straightforward to migrate to install_emptydir() when we drop support for Meson versions older than 0.60.0. Signed-off-by: Simon McVittie <smcv@collabora.com>