summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2019-04-17dbus-send: Avoid duplicated-branches warningDavid King1-4/+7
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 c0bf0d185d72e20e70da9a98e13f69e19f2a87d5)
2018-12-04CI: Exercise maintainer-only documentation buildSimon McVittie2-0/+33
Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit bcc34caa43d8e5dba8266cf163d8a24e4fb55dce)
2018-12-04CI: Stop building on Ubuntu 14.04 'trusty'Simon McVittie1-17/+7
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 0c553afcd9c79bc19ffdad67980f421def5d0613)
2018-12-04ci-build.sh: Show file size in list of files to be able to compare generated ↵Ralf Habacker1-1/+1
file size (cherry picked from commit bac2fd3aa458c7dfd002f7ec96a245d630c5830f)
2018-12-04CI: Remove unimplemented --with-glib optionSimon McVittie1-1/+0
dbus has never actually had this option. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit e0a1bfb26a9f72e8fe59af770d394a90810a7cea)
2018-12-04CI: List attributes, sizes etc. of installed files, not just namesSimon McVittie1-1/+1
Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit d71049799a3f87de95151e00c667c05dd0b5386c)
2018-10-04ci: Use ccache to speed up repeated buildsSimon McVittie1-0/+1
Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit d0728fd06e5a2302e7596e3df56b68b0a0834fd7)
2018-10-04ci: Explicitly install cmakeSimon McVittie1-0/+1
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 907832e00849ca454322052981dbb122ea537506)
2018-10-04ci: Teach ci-install.sh to install wine on Debian 9 'stretch'Simon McVittie1-3/+15
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 408b222a9fc61327cd7be385b6705f30f0c38802)
2018-10-04travis-ci: Add cross building support for mingw 64 bit compilerRalf Habacker2-22/+44
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 d22e7901b555a0bfb5e06fb2463d839a276c7482)
2018-02-20Add a unit test for the dbus-daemon resetting its fd limitSimon McVittie1-2/+5
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 49ca421997d91d3e01626b2c92a826e6a5db0b2f)
2018-01-29travis-ci: Get autoconf-archive from Debian 9 'stretch'Simon McVittie1-1/+1
Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit acb775a92b1c554f251de129c7e51db19522b65e)
2017-11-10travis-ci: Enable/disable more features in various buildsSimon McVittie1-0/+10
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 3c031ef5aa1f7f53c6344781cb38b78abe44dc96)
2017-10-31build: Avoid using `echo -e`Tony Theodore1-1/+1
`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 216ae1adfcf9ce9274019b3c29b8f1245c26dec1)
2017-10-18Windows: Use libtool-detected RC to compile resources in tools/Simon McVittie1-1/+1
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-09-28ci-build: Use a mirror of mingw binaries, not msys2 binariesSimon McVittie1-1/+1
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-27Add Windows manifest to dbus-update-activation-environment.exeRalf Habacker2-2/+25
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-27ci-build: Use a mirror that hopefully works better than SourceforgeSimon McVittie1-1/+1
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-09-25Deprecate the pam_console/pam_foreground flag-file directorySimon McVittie1-0/+3
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-25Merge branch 'dbus-1.10'Simon McVittie1-0/+2
2017-09-25dbus-send: Reassure the compiler that secondary_type is initializedSimon McVittie1-0/+2
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-06-09dbus-launch: Use dbus_try_get_local_machine_id()Simon McVittie1-6/+13
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-08test/dbus-daemon: Exercise the Peer interfaceSimon McVittie1-0/+2
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-04-10Travis-CI: Omit -I, -L from cross-compilation optionsSimon McVittie1-2/+0
Now that we detect Expat via pkg-config, this is no longer needed. Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-04-07dbus-launch: clarify signal handlerSimon McVittie1-12/+6
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-07dbus-monitor: handle default case for binary mode headerSimon McVittie1-0/+2
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-07test, tools: assert impossible values of local enums are not reachedSimon McVittie4-2/+19
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-02-16Travis-CI: Get new autoconf-archive from UbuntuSimon McVittie1-1/+1
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 9935a5b7d177b2368506fa48e7fdfa94ea0151fa)
2017-02-14Travis-CI: Get new autoconf-archive from UbuntuSimon McVittie1-1/+1
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-13dbus-send: Handle OOM failures by abortingPhilip Withnall1-29/+48
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-13tools: Improve argument validation in dbus-spamPhilip Withnall1-0/+11
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>
2016-11-29Merge branch '1.10-docker'Simon McVittie3-189/+424
2016-11-29ci-install, ci-build: add brief documentation for parameter variablesSimon McVittie2-0/+51
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29ci-install.sh: make ci_in_docker follow the yes/no convention tooSimon McVittie1-2/+2
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29travis-ci: Add and use infrastructure to build and test in DockerSimon McVittie3-2/+66
Debian stable, Debian testing and Ubuntu LTS provide a reasonable spectrum of old and new distributions. I'm only doing one build on each to avoid a combinatorial explosion of options. The Docker images don't have any deb-src apt sources set up, so don't use `apt-get build-dep`; just include dependencies manually. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29travis-ci: add an install script instead of open-coding it in .travis.ymlSimon McVittie1-0/+101
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> [smcv: move comment to install script as suggested] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29travis-ci: introduce maybe_fail_tests() to make test failure more obviousSimon McVittie1-7/+12
Taken from the version I added to OSTree. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29travis-ci: run in bash, with the "unofficial strict mode"Simon McVittie1-20/+10
set -u forces us to set all variables that we use (for example with the ${foo:=bar} syntax to take an existing value or set a default), or use the ${foo:-bar} syntax to make it explicit that the variable might be unset. set -o pipefail (which is a bash feature) detects failure in non-last elements of a pipeline. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29travis-ci: consistently use yes/no instead of yes/emptySimon McVittie1-11/+11
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29travis-ci: consistently use ci_* for parameter variablesSimon McVittie1-29/+29
This aligns it with the more generic script based on this one that I sent to OSTree. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29ci-build: retab with 4-space indentationSimon McVittie1-171/+173
This realigns it with the script loosely based on this one that I sent to OSTree. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29travis-ci: add an explicit copyright/license statementSimon McVittie1-0/+22
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29Rename distro-style CI build from "release" to "production"Simon McVittie1-2/+2
This avoids confusion with the meaning of "release" used by AX_IS_RELEASE. AX_IS_RELEASE is about facts about the source tree, namely the distinction between releases (tags) and random snapshots. The build variants in .travis.yml are about facts about the build being done, namely the distinction between production and debug/developer builds. Production builds are sometimes referred to as "release builds", for example in typical CMake and MSVC build environments, but a different term seems better here. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97357 [smcv: cherry-picked from master to dbus-1.10 to get the Travis-CI setup consistent between the two branches]
2016-11-22Merge branch 'dbus-1.10'Simon McVittie1-1/+1
2016-11-22ci-build: run our copy of config.guessSimon McVittie1-1/+1
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-10-13Add missing function attributes suggested by clang (but not by gcc)Simon McVittie8-1/+36
clang is a little more enthusiastic about suggesting these. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-10-13dbus-launch-x11: print a window ID portablySimon McVittie1-1/+2
On LP64 platforms, a Window is unsigned long. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-10-13Clean up how we arrange for environ to be declaredSimon McVittie1-2/+5
Annoyingly, the POSIX way to declare environ (as "extern char **environ") is a redundant declaration in glibc with _GNU_SOURCE; work around that. We also have a workaround for _NSGetEnviron() needing to be used instead of direct access to environ in at least some circumstances on Mac OS. Attempt to sync that up between all the files that use environ, consistently sorting the most special special-cases first (Windows for files that are compiled there, then Mac, then GNU, with lowest-common-denominator POSIX last). The affected files are already OS-specific, so I'm not bothering to introduce a nicer or higher-level API for this. Based on the best bits of an earlier patch from me, and an earlier patch from Thomas Zimmermann. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Thomas Zimmermann <tdz@users.sourceforge.net> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97357
2016-10-13Be more const-correctSimon McVittie3-5/+6
As a general design principle, strings that we aren't going to modify should usually be const. When compiling with -Wwrite-strings, quoted string constants are of type "const char *", causing compiler warnings when they are assigned to char * variables. Unfortunately, we need to add casts in a few places: * _dbus_list_append(), _dbus_test_oom_handling() and similar generic "user-data" APIs take a void *, not a const void *, so we have to cast * For historical reasons the execve() family of functions take a (char * const *), i.e. a constant pointer to an array of mutable strings, so again we have to cast * _dbus_spawn_async_with_babysitter similarly takes a char **, although we can make it a little more const-correct by making it take (char * const *) like execve() does This also incorporates a subsequent patch by Thomas Zimmermann to put various string constants in static storage, which is a little more efficient. Signed-off-by: Simon McVittie <smcv@debian.org> Reviewed-by: Thomas Zimmermann <tdz@users.sourceforge.net> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97357
2016-10-10Fix warnings from compiler option '-Wshadow'Thomas Zimmermann2-10/+10
Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98192