diff options
-rw-r--r-- | NEWS | 28 | ||||
-rw-r--r-- | aclocal.m4 | 3 | ||||
-rw-r--r-- | bus/dbus.service.in | 1 | ||||
-rw-r--r-- | cmake/CMakeLists.txt | 9 | ||||
-rw-r--r-- | cmake/config.h.cmake | 2 | ||||
-rw-r--r-- | cmake/modules/Macros.cmake | 26 | ||||
-rw-r--r-- | config.h.in | 3 | ||||
-rwxr-xr-x | configure | 32 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | dbus/dbus-internals.c | 21 | ||||
-rw-r--r-- | dbus/dbus-internals.h | 4 | ||||
-rw-r--r-- | dbus/dbus-sysdeps-unix.c | 23 | ||||
-rw-r--r-- | doc/dbus-specification.xml | 3 | ||||
-rw-r--r-- | ltmain.sh | 4 | ||||
-rw-r--r-- | test/dbus-daemon-eavesdrop.c | 2 | ||||
-rw-r--r-- | test/dbus-daemon.c | 2 | ||||
-rw-r--r-- | tools/dbus-launch.c | 8 |
17 files changed, 148 insertions, 30 deletions
@@ -1,3 +1,31 @@ +D-Bus 1.8.2 (2014-04-30) +== + +The “nobody wants red” release. + +Enhancements: + +• in the CMake build system, add some hints for Linux users cross-compiling + Windows D-Bus binaries to be able to run tests under Wine + (fd.o #41252, Ralf Habacker) + +• add Documentation key to dbus.service (fd.o #77447, Cameron Norman) + +Fixes: + +• in "dbus-uuidgen --ensure", try to copy systemd's /etc/machine-id + to /var/lib/dbus/machine-id instead of generating an entirely new ID + (fd.o #77941, Simon McVittie) + +• if dbus-launch receives an X error very quickly, do not kill + unrelated processes (fd.o #74698, Роман Донченко) + +• on Windows, allow up to 8K connections to the dbus-daemon, instead of the + previous 64 (fd.o #71297; Cristian Onet, Ralf Habacker) + +• cope with \r\n newlines in regression tests, since on Windows, + dbus-daemon.exe uses text mode (fd.o #75863, Руслан Ижбулатов) + D-Bus 1.8.0 (2014-01-20) == @@ -573,7 +573,8 @@ to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further diff --git a/bus/dbus.service.in b/bus/dbus.service.in index 1b0bbb29..3bc4726a 100644 --- a/bus/dbus.service.in +++ b/bus/dbus.service.in @@ -1,5 +1,6 @@ [Unit] Description=D-Bus System Message Bus +Documentation=man:dbus-daemon(1) Requires=dbus.socket [Service] diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index c8a68345..b7c25299 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -107,6 +107,10 @@ option (DBUS_DISABLE_ASSERT "Disable assertion checking" OFF) option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF) +if(WIN32) + set(FD_SETSIZE "8192" CACHE STRING "The maximum number of connections that can be handled at once") +endif() + find_package(EXPAT) find_package(X11) find_package(GLib2) @@ -597,6 +601,11 @@ endif(NOT DBUS_DISABLE_ASSERT) if (DBUS_DISABLE_CHECKS) message("NOTE: building without checks for arguments passed to public API makes it harder to debug apps using D-BUS, but will slightly decrease D-BUS library size and _very_ slightly improve performance.") endif(DBUS_DISABLE_CHECKS) + +foreach(_note ${FOOTNOTES}) + message(${_note}) +endforeach() + MESSAGE(" ") INCLUDE(modules/CPackInstallConfig.cmake) diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index 119ed396..bd4cd444 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -196,6 +196,8 @@ /* Define to 1 if you have struct cmsgred */ #cmakedefine HAVE_CMSGCRED 1 +#cmakedefine FD_SETSIZE @FD_SETSIZE@ + // system type defines #if defined(_WIN32) || defined(_WIN64) || defined (_WIN32_WCE) # define DBUS_WIN diff --git a/cmake/modules/Macros.cmake b/cmake/modules/Macros.cmake index 545f2e58..fd3f62c4 100644 --- a/cmake/modules/Macros.cmake +++ b/cmake/modules/Macros.cmake @@ -1,3 +1,29 @@ +if(DBUS_BUILD_TESTS AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Windows") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + find_file(WINE_EXECUTABLE + NAMES wine + PATHS /usr/bin /usr/local/bin + NO_CMAKE_FIND_ROOT_PATH + ) + find_file(HAVE_BINFMT_WINE_SUPPORT + NAMES DOSWin wine Wine windows Windows + PATHS /proc/sys/fs/binfmt_misc + NO_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH + ) + if(WINE_EXECUTABLE AND HAVE_BINFMT_WINE_SUPPORT) + list(APPEND FOOTNOTES "NOTE: The requirements to run cross compiled applications on your host system are achieved. You may run 'make check'.") + endif() + if(NOT WINE_EXECUTABLE) + list(APPEND FOOTNOTES "NOTE: You may install the Windows emulator 'wine' to be able to run cross compiled test applications.") + endif() + if(NOT HAVE_BINFMT_WINE_SUPPORT) + list(APPEND FOOTNOTES "NOTE: You may activate binfmt_misc support for wine to be able to run cross compiled test applications.") + endif() + else() + list(APPEND FOOTNOTES "NOTE: You will not be able to run cross compiled applications on your host system.") + endif() +endif() + MACRO(TIMESTAMP RESULT) if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE DATE) diff --git a/config.h.in b/config.h.in index c127fd20..1dc5fb25 100644 --- a/config.h.in +++ b/config.h.in @@ -129,6 +129,9 @@ /* Define if GLib, GObject, GIO are available */ #undef DBUS_WITH_GLIB +/* The maximum number of connections that can be handled at once */ +#undef FD_SETSIZE + /* The name of the gettext domain */ #undef GETTEXT_PACKAGE @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for dbus 1.8.0. +# Generated by GNU Autoconf 2.69 for dbus 1.8.2. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=dbus>. # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dbus' PACKAGE_TARNAME='dbus' -PACKAGE_VERSION='1.8.0' -PACKAGE_STRING='dbus 1.8.0' +PACKAGE_VERSION='1.8.2' +PACKAGE_STRING='dbus 1.8.2' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=dbus' PACKAGE_URL='' @@ -1512,7 +1512,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dbus 1.8.0 to adapt to many kinds of systems. +\`configure' configures dbus 1.8.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1586,7 +1586,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dbus 1.8.0:";; + short | recursive ) echo "Configuration of dbus 1.8.2:";; esac cat <<\_ACEOF @@ -1783,7 +1783,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dbus configure 1.8.0 +dbus configure 1.8.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2502,7 +2502,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dbus $as_me 1.8.0, which was +It was created by dbus $as_me 1.8.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3442,7 +3442,7 @@ fi # Define the identity of the package. PACKAGE='dbus' - VERSION='1.8.0' + VERSION='1.8.2' cat >>confdefs.h <<_ACEOF @@ -3651,6 +3651,7 @@ END fi fi + GETTEXT_PACKAGE=dbus-1 @@ -3741,7 +3742,7 @@ LT_CURRENT=11 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=3 +LT_REVISION=4 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has @@ -3754,8 +3755,8 @@ LT_AGE=8 DBUS_MAJOR_VERSION=1 DBUS_MINOR_VERSION=8 -DBUS_MICRO_VERSION=0 -DBUS_VERSION=1.8.0 +DBUS_MICRO_VERSION=2 +DBUS_VERSION=1.8.2 @@ -16526,6 +16527,11 @@ if test "$dbus_win" = yes; then $as_echo "#define DBUS_WIN 1" >>confdefs.h + # Yes, on Windows it really does work like this. + # http://support.microsoft.com/kb/111855 + +$as_echo "#define FD_SETSIZE 8192" >>confdefs.h + BUILD_TIMESTAMP=`date --iso-8601=minutes` # Assume DBUS_VERSION is always three numbers @@ -23260,7 +23266,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dbus $as_me 1.8.0, which was +This file was extended by dbus $as_me 1.8.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23326,7 +23332,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dbus config.status 1.8.0 +dbus config.status 1.8.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index ed77046a..eccdd30f 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.63]) m4_define([dbus_major_version], [1]) m4_define([dbus_minor_version], [8]) -m4_define([dbus_micro_version], [0]) +m4_define([dbus_micro_version], [2]) m4_define([dbus_version], [dbus_major_version.dbus_minor_version.dbus_micro_version]) AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus]) @@ -37,7 +37,7 @@ LT_CURRENT=11 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=3 +LT_REVISION=4 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has @@ -99,6 +99,9 @@ esac # Special defines for certain platforms if test "$dbus_win" = yes; then AC_DEFINE(DBUS_WIN,1,[Defined if we run on a W32 API based system]) + # Yes, on Windows it really does work like this. + # http://support.microsoft.com/kb/111855 + AC_DEFINE(FD_SETSIZE,8192,[The maximum number of connections that can be handled at once]) BUILD_TIMESTAMP=`date --iso-8601=minutes` AC_SUBST(BUILD_TIMESTAMP) # Assume DBUS_VERSION is always three numbers diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c index e2482597..575a0875 100644 --- a/dbus/dbus-internals.c +++ b/dbus/dbus-internals.c @@ -745,10 +745,18 @@ _dbus_read_uuid_file_without_creating (const DBusString *filename, return FALSE; } -static dbus_bool_t -_dbus_create_uuid_file_exclusively (const DBusString *filename, - DBusGUID *uuid, - DBusError *error) +/** + * Write the give UUID to a file. + * + * @param filename the file to write + * @param uuid the UUID to save + * @param error used to raise an error + * @returns #FALSE on error + */ +dbus_bool_t +_dbus_write_uuid_file (const DBusString *filename, + const DBusGUID *uuid, + DBusError *error) { DBusString encoded; @@ -757,8 +765,6 @@ _dbus_create_uuid_file_exclusively (const DBusString *filename, _DBUS_SET_OOM (error); return FALSE; } - - _dbus_generate_uuid (uuid); if (!_dbus_uuid_encode (uuid, &encoded)) { @@ -825,7 +831,8 @@ _dbus_read_uuid_file (const DBusString *filename, else { dbus_error_free (&read_error); - return _dbus_create_uuid_file_exclusively (filename, uuid, error); + _dbus_generate_uuid (uuid); + return _dbus_write_uuid_file (filename, uuid, error); } } diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index c5a3c9b8..c64d7566 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -361,6 +361,10 @@ dbus_bool_t _dbus_read_uuid_file (const DBusString *filename, dbus_bool_t create_if_not_found, DBusError *error); +dbus_bool_t _dbus_write_uuid_file (const DBusString *filename, + const DBusGUID *uuid, + DBusError *error); + dbus_bool_t _dbus_get_local_machine_uuid_encoded (DBusString *uuid_str); #define _DBUS_PASTE2(a, b) a ## b diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index ae42f56e..e81e52c3 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -3579,7 +3579,7 @@ _dbus_read_local_machine_uuid (DBusGUID *machine_id, _dbus_string_init_const (&filename, DBUS_MACHINE_UUID_FILE); - b = _dbus_read_uuid_file (&filename, machine_id, create_if_not_found, error); + b = _dbus_read_uuid_file (&filename, machine_id, FALSE, error); if (b) return TRUE; @@ -3587,7 +3587,26 @@ _dbus_read_local_machine_uuid (DBusGUID *machine_id, /* Fallback to the system machine ID */ _dbus_string_init_const (&filename, "/etc/machine-id"); - return _dbus_read_uuid_file (&filename, machine_id, FALSE, error); + b = _dbus_read_uuid_file (&filename, machine_id, FALSE, error); + + if (b) + { + /* try to copy it to the DBUS_MACHINE_UUID_FILE, but do not + * complain if that isn't possible for whatever reason */ + _dbus_string_init_const (&filename, DBUS_MACHINE_UUID_FILE); + _dbus_write_uuid_file (&filename, machine_id, NULL); + + return TRUE; + } + + if (!create_if_not_found) + return FALSE; + + /* if none found, try to make a new one */ + dbus_error_free (error); + _dbus_string_init_const (&filename, DBUS_MACHINE_UUID_FILE); + _dbus_generate_uuid (machine_id); + return _dbus_write_uuid_file (&filename, machine_id, error); } /** diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 8b83495f..f6b02152 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -63,9 +63,8 @@ <firstname>David</firstname> <surname>Zeuthen</surname> <affiliation> - <orgname>Red Hat, Inc.</orgname> <address> - <email>davidz@redhat.com</email> + <email>zeuthen@gmail.com</email> </address> </affiliation> </author> @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.6 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.6" +VERSION="2.4.2 Debian-2.4.2-1.7" TIMESTAMP="" package_revision=1.3337 diff --git a/test/dbus-daemon-eavesdrop.c b/test/dbus-daemon-eavesdrop.c index bc5ba121..a78d8888 100644 --- a/test/dbus-daemon-eavesdrop.c +++ b/test/dbus-daemon-eavesdrop.c @@ -151,6 +151,8 @@ spawn_dbus_daemon (gchar *binary, if (newline != NULL) { + if ((newline > address->str) && ('\r' == newline[-1])) + newline -= 1; g_string_truncate (address, newline - address->str); break; } diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c index c883425e..4b3b61e5 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -119,6 +119,8 @@ spawn_dbus_daemon (gchar *binary, if (newline != NULL) { + if ((newline > address->str) && ('\r' == newline[-1])) + newline -= 1; g_string_truncate (address, newline - address->str); break; } diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c index 7ecee63e..58a0322e 100644 --- a/tools/dbus-launch.c +++ b/tools/dbus-launch.c @@ -406,6 +406,9 @@ static pid_t bus_pid_to_kill = -1; static void kill_bus(void) { + if (bus_pid_to_kill <= 0) + return; + verbose ("Killing message bus and exiting babysitter\n"); kill (bus_pid_to_kill, SIGTERM); sleep (3); @@ -1275,6 +1278,10 @@ main (int argc, char **argv) bus_pid = val; + /* Have to initialize bus_pid_to_kill ASAP, so that the + X error callback can kill it if an error happens. */ + bus_pid_to_kill = bus_pid; + close (bus_pid_to_launcher_pipe[READ_END]); #ifdef DBUS_ENABLE_X11_AUTOLAUNCH @@ -1291,7 +1298,6 @@ main (int argc, char **argv) { char *address = NULL; /* another window got added. Return its address */ - bus_pid_to_kill = bus_pid; if (x11_get_address (&address, &bus_pid, &wid) && address != NULL) { |