summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * dir-watch-kqueue: Silence -Wshadow warningAlex Richardson2022-09-131-1/+2
| | | | | | | | | | | | | | | | This should be the last warning that is preventing us from using -Werror for FreeBSD builds. (cherry picked from commit 2480181af4ef0cae65aab303e103b58d8f6f2066) Backported-from: dbus!307
| * Fix building on Mac OSX when using launchdRalf Habacker2022-09-131-0/+1
| | | | | | | | | | | | | | | | | | Provided by Dawid Wróbel at https://invent.kde.org/packaging/craft-blueprints-kde\ /-/blob/master/libs/dbus/0002-fix-macos-build.diff (cherry picked from commit 30426b26e6aacd6587e97d444ac577db6f0e7e23) Backported-from: dbus!287
| * dbus-sysdeps-util-unix.c: Avoid including sys/syslimits.hAlex Richardson2022-09-134-9/+1
| | | | | | | | | | | | | | | | | | | | This header is GCC specific header that on my system just contains `#include_next <limits.h>`. FreeBSD also provides this header but it contains a `#warning` that it should not be used. Replace the one use with `#include <limit.h>` and drop the configure checks. (cherry picked from commit a214ed824d257b5ab3ea81c8286395e65df81423) Backported-from: dbus!280
| * Move release checklist to its own fileSimon McVittie2022-09-132-80/+83
| | | | | | | | | | | | | | | | In other projects I've found that having a separate file that only lists the release steps makes them easier to check. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 3758e5b1648a26fd2343db3c804d32a29ae75ff8)
| * test: Skip tests that involve switching uid if unable to do soSimon McVittie2022-09-131-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a Linux user namespace, it is possible that we are uid 0 but are unable to switch to some other uid like DBUS_USER or DBUS_TEST_USER, because the other uid is not "mapped" in the user namespace, resulting in setuid() or setresuid() failing with EINVAL "Invalid argument". For example, it's easy for this to happen when running under the bubblewrap tool. Try to drop privileges in a child process, and skip the test if we are unable to do so. Resolves: dbus#407 Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 8b08dd32644cfdf6d6d054bfbcb836f3fefca723) Backported-from: dbus!330
| * sysdeps: Only open oom_score_adj read/write if we need to write itSimon McVittie2022-09-131-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're running in a sandbox, we might not have write access to oom_score_adj. In the common case where we don't have any special protection from the OOM-killer, we can detect that with only read access, and skip the part where we open it for writing. (We would also not have write access to oom_score_adj if we're running with elevated Linux capabilities while not root, but that should never actually happen for dbus-daemon-launch-helper, which is setuid root for production use or has no capabilities during unit-testing.) Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit a8006841ce73e0d2131c55d414e3e45a1827b6d6) Backported-from: dbus!291
| * activation-helper: Never crash if unable to write oom_score_adjSimon McVittie2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | _dbus_warn() normally only logs a warning, but can be made fatal by environment variables. In particular, we do that during unit testing, which can result in a build-time test failure if dbus is built in a sandbox environment that prevents write access. _dbus_log() does only the logging part of _dbus_warn(), which seems more appropriate here. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit ad72e3b9e352f6cb1d568bb01f0d79c2a63fc276) Backported-from: dbus!291
| * COPYING: The project is called dbus, not D-BusSimon McVittie2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | 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> (cherry picked from commit 789d97ad53044f94351a958e785c2923643b346a)
| * configure: Avoid exit() when checking for __sync_sub_and_fetch()Alex Richardson2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | 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. (cherry picked from commit 56e52a4212cb78e55d1bdee9c1f2a85a205c1ee9) Backported-from: dbus!320
| * build: Do not dist built XML catalogJan Tojnar2022-09-131-1/+2
| | | | | | | | | | | | | | It will have whatever paths the person who built the dist tarball hardcoded. (cherry picked from commit dcd19cc0d970df073643caee4bd3b97fe93b68ac) Backported-from: dbus!317
| * cmake: Fix definition of DBUS_USE_SYNCAlex Richardson2022-09-132-2/+2
| | | | | | | | | | | | | | | | | | | | dbus-sysdeps-unix.c checks for DBUS_USE_SYNC using 0/1 checks not defined checks, so we should be using #cmakedefine01. This fixes lots of -Wundef warnings when compiling for FreeBSD and ensures that we actually use atomics instead of the pthread fallback there. (cherry picked from commit b932c343c4965023b0fd0a16be76840755ff6434) Backported-from: dbus!306
| * bus/dir-watch: Do not crash with > 128 dirsJan Tojnar2022-09-132-2/+12
| | | | | | | | | | | | | | | | | | | | | | Without this running, dbus-daemon with long XDG_DATA_DIRS will crash on out-of-bounds write: $ XDG_DATA_DIRS=$(seq -f "/foo/%g" -s ':' 129) dbus-daemon --session *** stack smashing detected ***: terminated (cherry picked from commit b551b3e9737958216a1a9d359150a4110a9d0549) Backported-from: dbus!302
| * cmake: Correct DBUS_{SYSTEM,SESSION}_CONFIG_FILE on UNIX systemsAlex Richardson2022-09-131-2/+2
| | | | | | | | | | | | | | | | | | We always install to a dbus-1 subdir, but the path encoded in the binary was missing the dbus-1/ subdirectory, so we end up getting errors when trying to load it. (cherry picked from commit f4876e7cb5815f5d329f9517d96a1df88688cf9f) Backported-from: dbus!297
| * Fix no-X11 build after d847b5f6ae994c408c166ed51752ed9f550df600Alex Richardson2022-09-131-2/+0
| | | | | | | | | | | | | | | | | | Since that commit the error variable is used in all cases not only the DBUS_BUILD_X11 #ifdef branches. Fixes: https://gitlab.freedesktop.org/dbus/dbus/-/issues/392 (cherry picked from commit 6c1c7e539f17099e6f2b624cdae160fd8138a8fb) Backported-from: dbus!298
| * cmake: Look for dbus-arch-deps.h next to DBus1Config.cmakeSimon McVittie2022-09-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <dbus/dbus-arch-deps.h> is architecture-dependent, and compilers have not traditionally supported an installation path for architecture-specific headers (Debian-based systems have /usr/include/${multiarch_tuple}, but that isn't portable beyond Debian). When dbus was built using Autotools, dependent projects that use CMake need to look for this header in the right place. Unfortunately, it seems that at least recent versions of CMake will ignore the HINTS we get from pkg-config if they are told to search in a non-standard prefix via ${DBus1_ROOT}. Look for dbus-arch-deps.h in a directory derived from the filename of the CMake config file, before trying the normal search algorithm. The CMake config file is in ${libdir}, and so is the architecture-specific header, so this should work reasonably reliably. According to the CMake documentation, if we search for the same thing multiple times, the first successful result will be used; and searching with NO_DEFAULT_PATH is the official way to prepend things to the search order. Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/314 Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 104df89947913e97bf4253d7dea53626063f6406) Backported-from: dbus!191
| * sysdeps-unix: check fd before calling _dbus_fd_set_close_on_exec()Mike Gilbert2022-09-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | If /proc/self/oom_score_adj does not exist, fd will invalid (-1). Attempting to set the CLOEXEC flag will obviously fail, and we lose the original errno value from open(). Bug: https://bugs.gentoo.org/834725 Signed-off-by: Mike Gilbert <floppym@gentoo.org> (cherry picked from commit 769a0462befb9829594a76e675526aba8579317e) Backported-from: dbus!285
| * cmake: Fix DBUS_SESSION_SOCKET_DIR when cross-compilingAlex Richardson2022-09-132-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Inferring it from the environment is not correct, since the host system could have a different temporary directory defined. Instead of guessing based on the host, require the user to pass an explicit directory when cross-compiling. This is helpful for me since I am cross-compiling for FreeBSD from macOS and on my host TMPDIR is set to /var/folders/<random characters>/T/ instead of the expected /tmp. (cherry picked from commit e827309976cab94c806fda20013915f1db2d4f5a) Backported-from: dbus!279
| * cmake: Use -Wl,-export_dynamic when building for macOSAlex Richardson2022-09-131-2/+7
| | | | | | | | | | | | | | | | The macOS linker does not accept --export-dynamic, so use this alternate spelling. (cherry picked from commit c7f6d072522702a505de71b3faa2ff160bde848e) Backported-from: dbus!278
| * cmake: Only pass -Wl,--export-dynamic when linkingAlex Richardson2022-09-131-2/+2
| | | | | | | | | | | | | | | | | | | | Otherwise we get the following warnings when building .o files with Clang: clang-13: warning: -Wl,--export-dynamic: 'linker' input unused [-Wunused-command-line-argument] This is required to allow the -Werror build to pass on FreeBSD. (cherry picked from commit 1a8fd7a3820d193d1132bc4c84317348799181ff) Backported-from: dbus!278
| * cmake: Drop an unnecessary include directoryAlex Richardson2022-09-131-1/+0
| | | | | | | | | | | | | | | | | | | | There should be no need to include the directory above the DBus sources, if that is actually required users can always pass -I flags to CMake. I noticed this because CLion started indexing all my cloned projects when I opened DBus due to this include path. (cherry picked from commit be5da7305e779f73c6832647cd69235bb348865f) Backported-from: dbus!282
| * cmake: Detect backtrace() support on platforms such as FreeBSDAlex Richardson2022-09-132-1/+7
| | | | | | | | | | | | | | | | | | | | | | On FreeBSD use of backtrace requires linking libexecinfo. The current check_symbol_exists() will fail due to that missing library. Fortunately, CMake ships with a FindBacktrace module (at least since 3.0) that can be used to correctly handle platforms such as FreeBSD (and OpenBSD according to the FindBacktrace source). (cherry picked from commit 3f5bdf0c2df3fb2b15f7dde246bf035bfae4d37a) Backported-from: dbus!281
| * Revert "Fix gcc compile error: redundant redeclaration of ‘environ’ ↵Alex Richardson2022-09-131-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [-Werror=redundant-decls]" Breaks the build on FreeBSD which doens't have an environ declaration. The CMake check_symbol_exists call sets `HAVE_DECL_ENVIRON` to an empty variable (which means if(DEFINED) suceeds). This normalization should not be necessary as it will be handled correctly by `#cmakedefine01`. If not, all the other HAVE_* defines would also be wrong. This reverts commit e8b34b419e44e0b95622f45c0f17487e241b1961. (cherry picked from commit d4dbde9fc5bb217fe279b162195961552837fcca) Backported-from: dbus!277
| * cmake: Set DBUS_*_CONFIG_FILE to be in datadir on UnixRalf Habacker2022-09-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | The files were installed to the datadir (usually /usr/share) since commit 70950325, but the macros used to implement dbus-daemon --system and dbus-daemon --session still looked for them in the sysconfdir (usually /etc). Fixes: 70950325 "Adjust cmake build to match autoconf installation locations" (cherry picked from commit 6c21072a1e7832783b77dfde8d95ddf1e5927b98) Backported-from: dbus!267
| * cmake: setup variable WORDS_BIGENDIAN correctlyRalf Habacker2022-09-132-0/+7
| | | | | | | | | | | | | | | | | | | | | | Since version 3.0 cmake provides the macro test_big_endian for that purpose. fixes #375 Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de> (cherry picked from commit d74fee2727617778aafe42dc6ea7519876efe9a8) Backported-from: dbus!266
| * bus: Show the errno if inotify cannot be initializedSimon McVittie2022-09-131-1/+1
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 25e22b2540d04aa66341def929081b477a28a4cd) Backported-from: dbus!235
| * bus: Correct check for inotify_init() failureSimon McVittie2022-09-131-1/+1
|/ | | | | | | | | fd 0 is a valid fd - although if we are using stdin as our inotify fd, something is weird somewhere. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 7e61e0b53b2555cdd6256b446a2422a6bf969114) Backported-from: dbus!235
* Merge branch '1.14.x-ci' into 'dbus-1.14'Simon McVittie2022-09-121-14/+30
|\ | | | | | | | | Fix CI on 1.14.x branch See merge request dbus/dbus!337
| * 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: clean up the previously used installation prefix and ↵Ralf Habacker2022-09-121-0/+7
| | | | | | | | | | | | | | | | | | the downloaded mingw packages This is necessary to have a clean initial state when running the script locally. Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
| * tools/ci-install.sh: Use partially qualified versions with mingw package namesRalf Habacker2022-09-121-11/+11
| | | | | | | | | | | | Fixes dbus/dbus#388 Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
| * tools/ci-install.sh: on debian|ubuntu reduce the need for mingw package name ↵Ralf Habacker2022-09-121-2/+9
|/ | | | | | | | | | | | | | changes Instead of having to specify an exact version that needs to be adjusted with each repository update, it is now possible to specify package names without version or partially qualified versions, which reduces the frequency of necessary adjustments. This is achieved by searching for the package names in a previously downloaded list of available packages. Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
* Merge branch '1.14-with-x' into 'dbus-1.14'Simon McVittie2022-03-012-18/+24
|\ | | | | | | | | [1.14] Backport dbus!263 See merge request dbus/dbus!264
| * Update NEWS with dbus!263Simon McVittie2022-03-011-1/+6
| | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * Convert "if" calls to AS_IF macro for the block that handles X11Lars Wendler2022-03-011-7/+6
| | | | | | | | (cherry picked from commit c71f013a64cd7f6de4c9cf3cf3b236239d713eb1)
| * Add have_x11=no if --without-x was given to make later checks happyLars Wendler2022-03-011-0/+1
| | | | | | | | (cherry picked from commit bf3cb42c6db1f4479467d66a111b08a98afef31b)
| * Emit an error when --with-x was given but no X11 libs were foundLars Wendler2022-03-011-6/+7
| | | | | | | | (cherry picked from commit 17c88a894499da64460a0ef76db1d8b88ceb9eeb)
| * Move DBUS_X_* definitions into PKG_CHECK_MODULES blockLars Wendler2022-03-011-5/+5
| | | | | | | | (cherry picked from commit 51e468d828785cbc7060678f6f257723ba11cd10)
| * build: Treat --with-x[=yes] the same as --with-x=autoLars Wendler2022-03-011-1/+1
|/ | | | | | | Previously, --with-x would disable the check for X11 libraries, which was not intended. (cherry picked from commit 99cc28e0eb1a37233c0f7d3595175d1f331550e7)
* Post-release version bump for 1.14.xSimon McVittie2022-02-282-1/+6
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Prepare v1.14.0dbus-1.14.0Simon McVittie2022-02-282-9/+23
| | | | | Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/350 Signed-off-by: Simon McVittie <smcv@collabora.com>
* spec: Go back to v0.38Simon McVittie2022-02-281-2/+2
| | | | | | | Nothing changed in v0.39 yet, and it would be confusing to have the version uploaded alongside dbus 1.14.0 say "not yet finalized". Signed-off-by: Simon McVittie <smcv@collabora.com>
* Revert "Disable MSVC CI by default for now"Simon McVittie2022-02-281-2/+0
| | | | | | This reverts commit 254b17977e228a4ec419c98e95588d564d36ddb1. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Update AUTHORSSimon McVittie2022-02-281-0/+1
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Merge branch 'doc_dbus-api-design_link_fixes' into 'master'Ralf Habacker2022-02-281-7/+7
|\ | | | | | | | | doc/dbus-api-design: fix broken links See merge request dbus/dbus!257
| * doc/dbus-api-design: fix broken linksMichael Nosthoff2022-02-281-7/+7
|/ | | | | * use version independent qtdbus url * developer.gnome.org links moved to developer-old.gnome.org * bustle now on freedesktop gitlab
* Merge branch 'mingw-w64-printf' into 'master'Ralf Habacker2022-02-284-9/+19
|\ | | | | | | | | | | | | build: Opt out from using mingw-w64's replacement printf(), etc. Closes #380 See merge request dbus/dbus!261
| * CI: Make most gcc warnings fatal for CMake buildsSimon McVittie2022-02-271-1/+1
| | | | | | | | | | | | This makes sure we notice problems early. Signed-off-by: Simon McVittie <smcv@collabora.com>
| * CI: Use current Debian stable release for mingw-w64 buildsSimon McVittie2022-02-271-8/+0
| | | | | | | | | | | | | | | | Now that we have resolved the failure to build with newer mingw-w64, we don't need to hold these back to Debian 10 'buster' and can upgrade to the current stable release, Debian 11 'bullseye'. Signed-off-by: Simon McVittie <smcv@collabora.com>
| * build: Opt out from using mingw-w64's replacement printf(), etc.Simon McVittie2022-02-272-0/+18
|/ | | | | | | | | | | | | | | The Windows code in dbus is careful to use Windows-specific equivalents of the Standard C features that are not implemented by msvcrt.dll, so we don't need to substitute a Standard C printf implementation. This avoids compiler warnings/errors when gcc expects us to be using Microsoft printf syntax (`ms_printf` attribute), but newer versions of mingw-w64 expect us to be using GNU or Standard C printf syntax (`gnu_printf` attribute) as a result of `__USE_MINGW_ANSI_STDIO` being enabled by default if not otherwise specified. Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/380 Signed-off-by: Simon McVittie <smcv@collabora.com>
* Merge branch 'ci' into 'master'Simon McVittie2022-02-253-68/+27
|\ | | | | | | | | CI: Update Debian releases See merge request dbus/dbus!260