Commit graph

382 commits

Author SHA1 Message Date
Simon McVittie
fc2353f210 CI: Use Python 3
The dbus-1.12 branch needed Python, which the master branch no longer
does, but we can at least use a modern Python.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-25 14:17:01 +00:00
Simon McVittie
bad56dc99a CI: Use https to download MSYS packages
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-25 14:17:01 +00:00
Simon McVittie
1784fa3da1 CI: Install ci-certificates
We need this to be able to download MSYS packages now.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-25 14:17:01 +00:00
Simon McVittie
665e56653c CI: Fix unpack of documentation tarball
In dbus 1.12.x, this was a tar.gz archive, not a tar.xz archive.

Fixes: 8d34987e "CI: Exercise maintainer-only documentation build"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-25 14:17:01 +00:00
Marc-André Lureau
029a0adf4b ci: bump msys2 deps, fix broken links
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
(cherry picked from commit c5385dfd60)
2022-02-25 14:17:01 +00:00
Ralf Habacker
1701d9f1a6 tools/ci-install.sh: Use package=() style for local package list to avoid '\' notation
(cherry picked from commit 6412ccdf67)
2022-02-25 14:17:01 +00:00
Ralf Habacker
b49c0ad652 On CI use common install prefix named 'dep_prefix' for installing local packages
With this commit a new variable 'ci_local_packages' has been introduced
to have a choice for using development packages from a local installation
or from the distribution.

(cherry picked from commit 9c5734fe90)
2022-02-25 14:17:01 +00:00
Ralf Habacker
83d203d460 tools/ci-build.sh: Clean up directories from possible previous builds
Otherwise, ci-build.sh cannot be executed on a local system if there
are previous runs.

(cherry picked from commit e82d5fe486)
2022-02-25 13:26:40 +00:00
Ralf Habacker
e9b0e6069d tools/ci-install.sh: merge multiple calls to apt-get
This required a reorganization of the steps that had been carried out.
The new order is:
   1. install packages with apt-get
   2. create user for build if required
   3. fetch and unpack tar balls
   4. create messagebus user

(cherry picked from commit 478484f13c)
[backport for 1.12.x: This branch still needed python-dbus, python-gi]
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-25 13:26:36 +00:00
Ralf Habacker
331e05dc5d Move installing packages into tools/ci-install.sh
In tools/ci-build.sh the cross compile setup has to be moved further up
to match the correct subdirectory.

(cherry picked from commit 1e3d82d85e)
2022-02-25 13:16:55 +00:00
Simon McVittie
99523f3535 CI: Do the CMake native debug build from an Autotools make dist
We officially release dbus in the form of Autotools `make dist` tarballs,
but people who have downloaded those tarballs should be able to choose
the CMake build system. Our CI should assert that they can.

(The Autotools debug build already does a `make distcheck`, which
asserts that tarball releases can be used for an Autotools build.)

Signed-off-by: Simon McVittie <smcv@collabora.com>
Resolves: dbus#255
(cherry picked from commit 1063bba06b)
[backport for 1.12.x: in 1.12.x, `make dist` produces .tar.gz]
2022-02-25 13:16:52 +00:00
Simon McVittie
47018f5c3c CI: Install yelp-tools, for yelp-build, in recent distros
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 78efbb6c0d)
2022-02-25 13:04:20 +00:00
Simon McVittie
074934f18d CI: Make adduser properly non-interactive
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 52fcc82379)
2022-02-25 13:04:20 +00:00
Simon McVittie
52c881487d CI: Don't install weak dependencies (Recommends)
In particular this avoids installing the TeX toolchain.

However, this also means we don't install dbus, which broke some tests
in minimal containers where dbus wasn't already installed, because the
messagebus user wouldn't have been created. Make sure that user exists,
using the same adduser call as the Debian dbus package.

CMake really wants to find a C++ compiler (even though we only use C++
when compiling for Windows), so explicitly install the default
version of the GNU C++ compiler, g++.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit cb6abc6391)
2022-02-25 13:04:20 +00:00
Simon McVittie
787b9e9633 ci: Teach ci-install.sh to install wine on Debian 9 'stretch'
Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108177
Acked-by: Philip Withnall <withnall@endlessm.com>
(cherry picked from commit 408b222a9f)
2022-02-25 13:04:20 +00:00
Simon McVittie
d1799f782b ci-build: Update required MSYS packages
The older versions we were previously building against are no longer
available on mirrors.

Based on changes proposed in !189 by Arnout Engelen, and the package
list gathered by Ralf Habacker in #318.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/318
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 053238254e)
2022-02-25 13:04:20 +00:00
Simon McVittie
38f77d4ebe CI: Add ci_variant parameter
Originally part of commit 23e1f044 "Install qhelpgenerator for native
production build on buster". Later CI fixes rely on having this
available.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-25 13:04:16 +00:00
William Earley
73aa7f9739 dbus-launch: Replace slashes in DISPLAY if present
dbus-daemon fails to autolaunch with X11 on macOS 10.8+ because XQuartz
(the X11 package for macOS) provides a value for `$DISPLAY` that is
not expected by dbus, in that it contains `/` characters. This is
addressed by replacing the invalid path character `/` with `_`.

Resolves: #8
Resolves: #311
(cherry picked from commit 3545d0f4de)
2021-12-17 12:53:26 +00:00
David King
2fb62561f0 dbus-send: Avoid duplicated-branches warning
Switch the order of the argument checks to avoid the
-Wduplicated-branches warning.

Signed-off-by: David King <dking@redhat.com>
Reviewed-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit c0bf0d185d)
2019-04-17 13:38:05 +01:00
Simon McVittie
8d34987ef7 CI: Exercise maintainer-only documentation build
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit bcc34caa43)
2018-12-04 12:32:54 +00:00
Simon McVittie
acae9c0643 CI: Stop building on Ubuntu 14.04 'trusty'
The version of gcc in trusty is too old for AddressSanitizer, which we
want to be able to start using, and Travis-CI finally supports Ubuntu
16.04 'xenial' now. This lets us remove some workarounds, but we need
to update others.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 0c553afcd9)
2018-12-04 12:32:45 +00:00
Ralf Habacker
7c00027eb7 ci-build.sh: Show file size in list of files to be able to compare generated file size
(cherry picked from commit bac2fd3aa4)
2018-12-04 12:32:35 +00:00
Simon McVittie
e4ea333fcd CI: Remove unimplemented --with-glib option
dbus has never actually had this option.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit e0a1bfb26a)
2018-12-04 12:28:12 +00:00
Simon McVittie
42b4e7319b CI: List attributes, sizes etc. of installed files, not just names
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit d71049799a)
2018-12-04 12:28:08 +00:00
Simon McVittie
c5d71a1889 ci: Use ccache to speed up repeated builds
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit d0728fd06e)
2018-10-04 16:58:13 +01:00
Simon McVittie
6995c5ea5b ci: Explicitly install cmake
Travis-CI workers have cmake preinstalled, but Gitlab-CI Docker images
typically don't.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108177
Acked-by: Philip Withnall <withnall@endlessm.com>
(cherry picked from commit 907832e008)
2018-10-04 16:54:10 +01:00
Simon McVittie
35fb20a1f4 ci: Teach ci-install.sh to install wine on Debian 9 'stretch'
Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108177
Acked-by: Philip Withnall <withnall@endlessm.com>
(cherry picked from commit 408b222a9f)
2018-10-04 16:54:10 +01:00
Ralf Habacker
900daf5ee4 travis-ci: Add cross building support for mingw 64 bit compiler
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105662
(cherry picked from commit d22e7901b5)
2018-10-04 16:54:10 +01:00
Simon McVittie
180b27035f Add a unit test for the dbus-daemon resetting its fd limit
Reviewed-by: David King <dking@redhat.com>
[smcv: Fix typo in cmake macro name]
Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105165
(cherry picked from commit 49ca421997)
2018-02-20 18:42:53 +00:00
Simon McVittie
25a1926cf8 travis-ci: Get autoconf-archive from Debian 9 'stretch'
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit acb775a92b)
2018-01-29 11:59:50 +00:00
Simon McVittie
b672a683be travis-ci: Enable/disable more features in various builds
In the debug build, enable features that are off by default. In the
reduced build, explicitly disable features, some of which are
on by default. In the legacy build, check that we can compile the
default feature-set without inotify, dnotify, systemd, etc.

Reviewed-by: Philip Withnall <withnall@endlessm.com>
[smcv: Rebase onto 1.13.x branch, fix minor conflicts]
Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101354
(cherry picked from commit 3c031ef5aa)
2017-11-10 16:10:15 +00:00
Tony Theodore
47d2e5a345 build: Avoid using echo -e
`echo -e` is a GNU extension, and in particular not available on
Darwin.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103493
[smcv: Added commit message]
Reviewed-by: Simon McVittie <smcv@collabora.com>

(cherry picked from commit 216ae1adfc)
2017-10-31 13:06:55 +00:00
Simon McVittie
7fac44f98c Windows: Use libtool-detected RC to compile resources in tools/
We have two variables that both expand to i686-w64-mingw32-windres,
namely WINDRES and RC, and we might as well use the same one as
in dbus/ here. However, it seems we can't wrap windres in libtool
when producing an executable: if we use .rc.lo, my Automake 1.15.1
doesn't realise that it needs to include disable-uac.lo in the
list of objects, whereas if we use .rc.o, Ralf's libtool 2.4.2 and
Automake 1.13.4 disagree on where the output should go
(.libs/disable-uac.o vs. disable-uac.o) and the link fails.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103015
2017-10-18 12:45:57 +01:00
Simon McVittie
ed38caa71d ci-build: Use a mirror of mingw binaries, not msys2 binaries
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-28 11:37:53 +01:00
Ralf Habacker
214fbc6dbf Add Windows manifest to dbus-update-activation-environment.exe
This explicitly sets the execution level to 'asInvoker', preventing
Windows' UAC heuristics from deciding that because its name mentions
"update", it probably needs to escalate privileges.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102558
Reviewed-by: Simon McVittie <smcv@collabora.com>
2017-09-27 22:05:13 +02:00
Simon McVittie
c6e79f9113 ci-build: Use a mirror that hopefully works better than Sourceforge
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-27 15:38:35 +01:00
Simon McVittie
2aaa650939 Deprecate the pam_console/pam_foreground flag-file directory
This feature is now compile-time conditional, and off by default.

pam_console appears to have been in Fedora and Gentoo until 2007.
pam_foreground seems to be specific to Debian and Ubuntu, where it was
unmaintained since 2008 and removed in 2010. The replacement for both
was ConsoleKit, which has itself been superseded by systemd-logind and
ConsoleKit2.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/101629
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2017-09-25 20:28:02 +01:00
Simon McVittie
10c026332b Merge branch 'dbus-1.10' 2017-09-25 17:02:50 +01:00
Simon McVittie
7b623b65c6 dbus-send: Reassure the compiler that secondary_type is initialized
It's initialized to a non-trivial value whenever container_type
is DBUS_TYPE_DICT_ENTRY, and subsequently only used if
container_type is DBUS_TYPE_DICT_ENTRY, but Debian's gcc 7.2.0-7
doesn't seem to be able to infer that any more, causing build failure
under -Werror=maybe-uninitialized.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102979
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2017-09-25 16:59:23 +01:00
Simon McVittie
e98d907f7e dbus-launch: Use dbus_try_get_local_machine_id()
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13194
2017-06-09 13:35:31 +01:00
Simon McVittie
cc1ee6c39d test/dbus-daemon: Exercise the Peer interface
We have to skip the GetMachineId() part during build-time testing
if it wouldn't work - there is no guarantee that dbus has ever been
installed on the build system. However, we can insist on it during
installed-tests, if we make sure to complete the installation for the
Travis-CI build by running dbus-uuidgen.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
2017-06-08 17:00:38 +01:00
Simon McVittie
996f22c337 Travis-CI: Omit -I, -L from cross-compilation options
Now that we detect Expat via pkg-config, this is no longer needed.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-04-10 13:55:24 +01:00
Simon McVittie
053c48c035 dbus-launch: clarify signal handler
We only register signal_handler() for the three signals that we want
to handle as "kill dbus-daemon and exit", so there's no point in the
switch. Silence -Wswitch-default by removing it altogether.

The variable name got_fatal_signal and the verbose message are both
misleading, because actually this is a handler for multiple signals,
not just SIGHUP. Rename them to be generic.

Based on part of a patch from Thomas Zimmermann.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
2017-04-07 12:07:43 +01:00
Simon McVittie
67c3ad422c dbus-monitor: handle default case for binary mode header
Also comment why it's OK to not do anything for the modes that don't
have a header. We are effectively treating the default case as one
of those, on the assumption that future modes are more likely to
lack a header than to have one.

Based on part of a patch from Thomas Zimmermann.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
2017-04-07 12:07:21 +01:00
Simon McVittie
40560fa0c7 test, tools: assert impossible values of local enums are not reached
Based on part of a patch from Thomas Zimmermann.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
2017-04-07 12:07:01 +01:00
Simon McVittie
bca5a8465a Travis-CI: Get new autoconf-archive from Ubuntu
Hopefully this has better uptime than snapshot.debian.org, which is
really an archival service rather than a production component.

This particular autoconf-archive version was in Ubuntu 16.10, so it
should stay around for a while.

Signed-off-by: Simon McVittie <smcv@debian.org>
(cherry picked from commit 9935a5b7d1)
2017-02-16 13:28:11 +00:00
Simon McVittie
9935a5b7d1 Travis-CI: Get new autoconf-archive from Ubuntu
Hopefully this has better uptime than snapshot.debian.org, which is
really an archival service rather than a production component.

This particular autoconf-archive version was in Ubuntu 16.10, so it
should stay around for a while.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-02-14 08:58:26 +00:00
Philip Withnall
0a700328e8 dbus-send: Handle OOM failures by aborting
This is a fairly pointless feature to add, since the current behaviour
was to abort due to a NULL pointer dereference shortly after the OOM
failure. At least now people will get a helpful error message when they
try to use dbus-send on a machine with incurable memory pressure.

Coverity ID: 54710
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99759
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2017-02-13 16:08:05 +00:00
Philip Withnall
f8af4ad525 tools: Improve argument validation in dbus-spam
Check that at most one argument which sets the payload is provided, so
the allocated payload is not overwritten and leaked.

Coverity ID: 54759

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99693
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2017-02-13 14:52:19 +00:00
Simon McVittie
2bea7c4ad1 Merge branch '1.10-docker' 2016-11-29 13:13:15 +00:00