Merge branch 'dbus-1.10'
authorSimon McVittie <smcv@collabora.com>
Fri, 7 Jul 2017 09:59:35 +0000 (10:59 +0100)
committerSimon McVittie <smcv@collabora.com>
Fri, 7 Jul 2017 09:59:35 +0000 (10:59 +0100)
1  2 
NEWS
test/Makefile.am
test/dbus-daemon.c
test/name-test/Makefile.am

diff --cc NEWS
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -34,126 -14,18 +34,129 @@@ Fixes
    error which needs to be corrected by the user of libdbus.
    (fd.o #101568, Simon McVittie)
  
 -• Wrap test-pending-call-disconnected with dbus-run-session so that it can
 -  pass in environments that are not already running a D-Bus session bus,
 -  fixing a build-time test regression in 1.10.20
 -  (fd.o #101698, Simon McVittie)
 +• dbus_message_iter_append_basic() and dbus_message_iter_open_container()
 +  will no longer report that their arguments were invalid if they run out
 +  of memory at exactly the wrong time. (fd.o #101568, Simon McVittie)
  
 -D-Bus 1.10.20 (2017-06-29)
+ • Ensure that tests fail if they would otherwise have tried to connect to
+   the real session bus (fd.o #101698, Simon McVittie)
 +Internal changes relevant to dbus developers:
 +
 +• DBusVariant is a new mechanism to copy single values from a message into
 +  a buffer without copying the entire message (fd.o #101568, Simon McVittie)
 +
 +• DBUS_SYSTEM_LOG_FATAL has been replaced by DBUS_SYSTEM_LOG_ERROR.
 +  Logging an ERROR message does not make the process exit; the caller
 +  is responsible for calling abort() or exit(), whichever is more appropriate.
 +  (fd.o #101568, Simon McVittie)
 +
 +• Better test coverage (fd.o #101568, Simon McVittie)
 +
 +D-Bus 1.11.14 (2017-06-29)
  ==
  
 -The “suggesting a delivery gone horribly wrong” release.
 +The “irrational fear of bees” release.
 +
 +Dependencies:
 +
 +• Expat >= 2.1.0 is always required
 +• libselinux >= 2.0.86 is required if SELinux support is enabled
 +• GLib >= 2.40 is required if full test coverage is enabled
 +
 +Build-time configuration changes:
 +
 +• We now use pkg-config to find libexpat in Autotools builds. This requires
 +  Expat 2.1.0 (March 2012) or later. In particular, this should remove the
 +  need to configure with LDFLAGS=-L/usr/local/lib on OpenBSD, which can
 +  itself cause compilation failures.
 +
 +  As with all pkg-config-based configure checks, you can use
 +  PKG_CONFIG_PATH=/whatever/lib/pkgconfig to find expat.pc in a
 +  non-standard prefix, or EXPAT_CFLAGS="-I/whatever/include" and
 +  EXPAT_LIBS="-L/whatever/lib -lexpat" to avoid needing a .pc file
 +  at all.
 +
 +  (fd.o #69801, Simon McVittie)
 +
 +• Similarly, we now use pkg-config to find libselinux. Version 2.0.86
 +  is required due to the removal of explicit refcounting for SIDs.
 +  (fd.o #100912, Laurent Bigonville)
 +
 +Behaviour changes:
 +
 +• Previously, /etc/machine-id could be copied to /var/lib/dbus/machine-id
 +  as a side-effect of a sufficiently privileged process merely reading the
 +  machine ID. It is no longer copied as a side-effect of reading.
 +  Running dbus-uuidgen --ensure, which should be done after installing dbus,
 +  continues to copy /etc/machine-id to /var/lib/dbus/machine-id if the
 +  former exists and the latter does not.
 +  (fd.o #101257, Simon McVittie)
 +
 +• The undocumented Verbose interface, and the GetAllMatchRules method on
 +  the undocumented Stats interface, must now be used via the object path
 +  /org/freedesktop/DBus. Previously, they existed on all object paths.
 +  (fd.o #101257, Simon McVittie)
 +
 +• AddMatch() with a match rule containing eavesdrop='true' will now fail
 +  unless called by either the same user as the dbus-daemon, or Unix uid 0
 +  (root), matching the restrictions applied to the newer BecomeMonitor()
 +  method. On the session bus this has no practical effect. On the system
 +  bus this will prevent certain configurations that already did not
 +  work well in practice. (fd.o #101567, Simon McVittie)
 +
 +Enhancements:
 +
 +• D-Bus Specification version 0.31
 +  · Don't require implementation-specific search paths to be lowest
 +    priority
 +  · Correct regex syntax for optionally-escaped bytes in addresses so it
 +    includes hyphen-minus, forward slash and underscore as intended
 +  · Describe all message bus methods in the same section
 +  · Clarify the correct object path for method calls to the message bus
 +    (/org/freedesktop/DBus, DBUS_PATH_DBUS in the reference implementation)
 +  · Document that the message bus implements Introspectable, Peer and
 +    Properties
 +  · Add new Features and Interfaces properties for message bus
 +    feature-discovery
 +  · Add unix:dir=..., which resembles unix:tmpdir=... but never uses
 +    abstract sockets
 +  · Don't require eavesdrop='true' to be accepted from connections not
 +    sufficiently privileged to use it successfully
 +  · Formally deprecate eavesdropping in favour of BecomeMonitor
 +  (fd.o #99825, #100686, #100795, #101256, #101257, #101567;
 +  Simon McVittie, Tom Gundersen)
 +
 +• Implement the Properties and Peer interfaces in dbus-daemon
 +  (fd.o #101257, Simon McVittie)
 +
 +• New function dbus_try_get_local_machine_id() is like
 +  dbus_get_local_machine_id(), but returning a DBusError. Other code
 +  that needs the machine ID will now report a recoverable error (instead
 +  of logging to stderr and aborting) if no machine ID is available.
 +  Generating a machine ID is still considered to be a required part of
 +  installing dbus correctly. (fd.o #13194, Simon McVittie)
 +
 +• Implement GetConnectionSELinuxSecurityContext("org.freedesktop.DBus")
 +  (fd.o #101315, Laurent Bigonville)
 +
 +• Avoid deprecated API calls when using SELinux
 +  (fd.o #100912, Laurent Bigonville)
 +
 +• Switch a test from the deprecated g_test_trap_fork() to
 +  g_test_trap_subprocess(), for Windows support and better robustness
 +  on Unix (fd.o #101362, Simon McVittie)
 +
 +• On systemd systems, if ${localstatedir}/dbus/machine-id doesn't exist,
 +  instruct systemd-tmpfiles to make it a symbolic link to /etc/machine-id.
 +  This prevents the two files from going out of sync on stateless or live
 +  images without needing to run dbus-uuidgen, and supports older D-Bus
 +  implementations that do not necessarily read /etc/machine-id themselves.
 +  (fd.o #101570, Simon McVittie)
 +
 +• Implement unix:dir=..., which resembles unix:tmpdir=... but never uses
 +  abstract sockets. This is preferable when used with Linux containers.
 +  (fd.o #101567, Simon McVittie)
  
  Fixes:
  
@@@ -233,29 -199,20 +233,31 @@@ installable_test_meta_with_config = 
  
  installcheck_tests =
  installcheck_environment = \
 +      export XDG_DATA_HOME=@abs_top_builddir@/test/XDG_DATA_HOME; \
 +      export XDG_DATA_DIRS=@abs_top_builddir@/test/XDG_DATA_DIRS:$(DESTDIR)$(datadir); \
        export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
+       export DBUS_SESSION_BUS_ADDRESS=do-not-use-real-session:; \
        export DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT); \
        export DBUS_TEST_DBUS_LAUNCH=$(DESTDIR)$(bindir)/dbus-launch$(EXEEXT); \
        export DBUS_TEST_DBUS_MONITOR=$(DESTDIR)$(bindir)/dbus-monitor$(EXEEXT); \
        export DBUS_TEST_DBUS_SEND=$(DESTDIR)$(bindir)/dbus-send$(EXEEXT); \
 +      export DBUS_TEST_DBUS_UUIDGEN=$(DESTDIR)$(bindir)/dbus-uuidgen$(EXEEXT); \
 +      export DBUS_TEST_EXEC=@abs_top_builddir@/test; \
        export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \
        export DBUS_TEST_DATADIR=$(DESTDIR)$(datadir); \
 +      export DBUS_TEST_UNINSTALLED=1; \
        ${NULL}
  
 +# Tests in bus/config-parser.c rely on these specific values for XDG_* and
 +# DBUS_TEST_BUILDDIR.
  AM_TESTS_ENVIRONMENT = \
 +      export XDG_DATA_HOME=@abs_top_builddir@/test/XDG_DATA_HOME; \
 +      export XDG_DATA_DIRS=@abs_top_builddir@/test/XDG_DATA_DIRS:@abs_top_builddir@/test/XDG_DATA_DIRS2; \
        export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
        export DBUS_FATAL_WARNINGS=1; \
+       export DBUS_SESSION_BUS_ADDRESS=do-not-use-real-session:; \
 +      export DBUS_TEST_BUILDDIR=@abs_builddir@; \
 +      export DBUS_TEST_SRCDIR=@abs_srcdir@; \
        export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \
        export DBUS_TEST_DBUS_LAUNCH=@abs_top_builddir@/tools/dbus-launch$(EXEEXT); \
        export DBUS_TEST_DBUS_MONITOR=@abs_top_builddir@/tools/dbus-monitor$(EXEEXT); \
@@@ -171,13 -147,14 +171,14 @@@ setup (Fixture *f
        /* we're relying on being single-threaded for this to be safe */
        f->saved_runtime_dir = g_strdup (g_getenv ("XDG_RUNTIME_DIR"));
        g_setenv ("XDG_RUNTIME_DIR", f->tmp_runtime_dir, TRUE);
+       g_unsetenv ("DBUS_SESSION_BUS_ADDRESS");
      }
  
 -  address = test_get_dbus_daemon (config ? config->config_file : NULL,
 -                                  TEST_USER_ME,
 -                                  &f->daemon_pid);
 +  f->address = test_get_dbus_daemon (config ? config->config_file : NULL,
 +                                     TEST_USER_ME, NULL,
 +                                     &f->daemon_pid);
  
 -  if (address == NULL)
 +  if (f->address == NULL)
      {
        f->skip = TRUE;
        return;
Simple merge