--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: stretch-pu: package dbus/1.10.22-0+deb9u1
- From: Simon McVittie <smcv@debian.org>
- Date: Sun, 30 Jul 2017 12:08:14 +0100
- Message-id: <20170730110814.y5i2ap6noqtzblr7@perpetual.pseudorandom.co.uk>
Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu
I would like to track the dbus upstream 1.10.x bugfix branch (which I
maintain) in Debian stretch, as I did for the previous bugfix branch
1.8.x in Debian jessie. dbus uses GNOME-style versioning where x.odd.z
is a development branch and x.even.z is bugfix-only.
So far there are only minor fixes between the 1.10.18 currently in stretch
and the 1.10.22 that I'm proposing, but it is probably easier to review
a step at a time, and based on prior history we will probably need to do
an update to fix some security issue at some point in the stretch cycle.
I'm considering switching unstable to the 1.11.x development branch
shortly after the Ubuntu 17.10 import freeze, and then to a new 1.12.x
bugfix branch by the end of the year, but for now unstable is still
tracking the same branch as I'm proposing for stretch. This particular
upstream version is already in unstable (where it unfortunately had to
be re-versioned as 1.11.16+really1.10.22 due to a dch accident on the
experimental branch), and it seems fine so far; it hasn't migrated yet,
but it has built on all release architectures and passed ci.debian.net.
Filtered debdiff attached, omitting Autotools noise (see the diff
for the exact list of exclusions).
Summary of packaging changes:
> dbus (1.10.22-0+deb9u1) stretch; urgency=medium
>
> * New upstream stable release
> - d/copyright: Update
> - Drop Doxygen reproducibility patch, applied upstream
> - d/p/backports/Replace-DBUS_USE_TEST_BINARY-(etc.).patch:
> Update backported patch to apply to 1.10.22
> * debian/gbp.conf: Set git branch to debian/stretch
>
> -- Simon McVittie <smcv@debian.org> Sun, 30 Jul 2017 11:23:02 +0100
Summary of upstream changes:
> • dbus_message_iter_append_basic() no longer leaks memory if it fails to
> append a file descriptor to a message. (fd.o #101568, Simon McVittie)
>
> • dbus_message_iter_open_container() no longer leaks memory if it runs out
> of memory. (fd.o #101568, Simon McVittie)
>
> • dbus_message_append_args_valist() no longer leaks memory if given an
> unsupported type. This situation is still considered to be a programming
> 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)
>
> • Ensure that tests fail if they would otherwise have tried to connect to
> the real session bus (fd.o #101698, Simon McVittie)
>
> • Make build-time tests cope with finding Python 3, but not Python 2
> (fd.o #101716, Simon McVittie)
>
> • Fix a reference leak when blocking on a pending call on a connection
> that has been disconnected (fd.o #101481, Shin-ichi MORITA)
>
> • Don't put timestamps in the Doxygen-generated documentation, for
> closer-to-reproducible builds (fd.o #100692, Simon McVittie)
>
> • Avoid an assertion failure when connecting to a semicolon-separated
> series of addresses, one of which fails (fd.o #101257, Simon McVittie)
>
> • Update git URIs in HACKING document to sync up with cgit.freedesktop.org
> (fd.o #100715, Simon McVittie)
Thanks for considering,
S
diffstat for dbus-1.10.18 dbus-1.10.22
Doxyfile.in | 1
HACKING | 14 -
NEWS | 50 ++++
configure.ac | 4
dbus/dbus-connection.c | 2
dbus/dbus-message.c | 38 ++-
dbus/dbus-transport.c | 3
debian/changelog | 11
debian/copyright | 7
debian/gbp.conf | 2
debian/patches/backports/Replace-DBUS_USE_TEST_BINARY-with-DBUS_TEST_DBUS_LAUNCH.patch | 16 -
debian/patches/debian/Doxyfile.in-do-not-put-timestamps-in-HTML-for-reprod.patch | 22 -
debian/patches/series | 1
test/Makefile.am | 2
test/dbus-daemon.c | 1
test/name-test/Makefile.am | 26 ++
test/name-test/test-activation-forking.py | 8
test/name-test/test-pending-call-disconnected.c | 117 ++++++++++
test/name-test/test-wait-for-echo.py | 6
19 files changed, 266 insertions(+), 65 deletions(-)
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/configure.ac dbus-1.10.22/configure.ac
--- dbus-1.10.18/configure.ac 2017-04-05 16:23:18.000000000 +0100
+++ dbus-1.10.22/configure.ac 2017-07-27 13:57:03.000000000 +0100
@@ -3,7 +3,7 @@
m4_define([dbus_major_version], [1])
m4_define([dbus_minor_version], [10])
-m4_define([dbus_micro_version], [18])
+m4_define([dbus_micro_version], [22])
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])
@@ -38,7 +38,7 @@
## increment any time the source changes; set to
## 0 if you increment CURRENT
-LT_REVISION=11
+LT_REVISION=13
## increment if any interfaces have been added; set to 0
## if any interfaces have been changed or removed. removal has
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/dbus/dbus-connection.c dbus-1.10.22/dbus/dbus-connection.c
--- dbus-1.10.18/dbus/dbus-connection.c 2015-09-30 15:48:40.000000000 +0100
+++ dbus-1.10.22/dbus/dbus-connection.c 2017-06-29 18:31:50.000000000 +0100
@@ -2476,6 +2476,8 @@
/* on OOM error_msg is set to NULL */
complete_pending_call_and_unlock (connection, pending, error_msg);
+ if (error_msg != NULL)
+ dbus_message_unref (error_msg);
dbus_pending_call_unref (pending);
return;
}
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/dbus/dbus-message.c dbus-1.10.22/dbus/dbus-message.c
--- dbus-1.10.18/dbus/dbus-message.c 2016-10-07 21:27:14.000000000 +0100
+++ dbus-1.10.22/dbus/dbus-message.c 2017-07-07 08:51:46.000000000 +0100
@@ -1935,6 +1935,7 @@
_dbus_warn ("arrays of %s can't be appended with %s for now\n",
_dbus_type_to_string (element_type),
_DBUS_FUNCTION_NAME);
+ dbus_message_iter_abandon_container (&iter, &array);
goto failed;
}
@@ -2784,20 +2785,22 @@
int *fds;
dbus_uint32_t u;
+ ret = FALSE;
+
/* First step, include the fd in the fd list of this message */
if (!(fds = expand_fd_array(real->message, 1)))
- return FALSE;
+ goto out;
*fds = _dbus_dup(*(int*) value, NULL);
if (*fds < 0)
- return FALSE;
+ goto out;
u = real->message->n_unix_fds;
/* Second step, write the index to the fd */
if (!(ret = _dbus_type_writer_write_basic (&real->u.writer, DBUS_TYPE_UNIX_FD, &u))) {
_dbus_close(*fds, NULL);
- return FALSE;
+ goto out;
}
real->message->n_unix_fds += 1;
@@ -2816,6 +2819,9 @@
freed. */
#else
ret = FALSE;
+ /* This is redundant (we could just fall through), but it avoids
+ * -Wunused-label in builds that don't HAVE_UNIX_FD_PASSING */
+ goto out;
#endif
}
else
@@ -2823,6 +2829,7 @@
ret = _dbus_type_writer_write_basic (&real->u.writer, type, value);
}
+out:
if (!_dbus_message_iter_close_signature (real))
ret = FALSE;
@@ -2931,6 +2938,7 @@
DBusMessageRealIter *real = (DBusMessageRealIter *)iter;
DBusMessageRealIter *real_sub = (DBusMessageRealIter *)sub;
DBusString contained_str;
+ dbus_bool_t ret;
_dbus_return_val_if_fail (_dbus_message_iter_append_check (real), FALSE);
_dbus_return_val_if_fail (real->iter_type == DBUS_MESSAGE_ITER_TYPE_WRITER, FALSE);
@@ -2957,24 +2965,30 @@
if (!_dbus_message_iter_open_signature (real))
return FALSE;
+ ret = FALSE;
*real_sub = *real;
if (contained_signature != NULL)
{
_dbus_string_init_const (&contained_str, contained_signature);
- return _dbus_type_writer_recurse (&real->u.writer,
- type,
- &contained_str, 0,
- &real_sub->u.writer);
+ ret = _dbus_type_writer_recurse (&real->u.writer,
+ type,
+ &contained_str, 0,
+ &real_sub->u.writer);
}
else
{
- return _dbus_type_writer_recurse (&real->u.writer,
- type,
- NULL, 0,
- &real_sub->u.writer);
- }
+ ret = _dbus_type_writer_recurse (&real->u.writer,
+ type,
+ NULL, 0,
+ &real_sub->u.writer);
+ }
+
+ if (!ret)
+ _dbus_message_iter_abandon_signature (real);
+
+ return ret;
}
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/dbus/dbus-transport.c dbus-1.10.22/dbus/dbus-transport.c
--- dbus-1.10.18/dbus/dbus-transport.c 2015-09-30 15:48:40.000000000 +0100
+++ dbus-1.10.22/dbus/dbus-transport.c 2017-06-29 18:47:05.000000000 +0100
@@ -254,13 +254,16 @@
int len, i;
_dbus_assert (address != NULL);
+ _DBUS_ASSERT_ERROR_IS_CLEAR (error);
if (!dbus_parse_address (address, &entries, &len, error))
return NULL; /* not a valid address */
for (i = 0; i < len; i++)
{
+ dbus_error_free (error);
transport = _dbus_transport_open (entries[i], error);
+
if (transport != NULL)
break;
}
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/debian/changelog dbus-1.10.22/debian/changelog
--- dbus-1.10.18/debian/changelog 2017-04-05 20:07:19.000000000 +0100
+++ dbus-1.10.22/debian/changelog 2017-07-30 11:23:02.000000000 +0100
@@ -1,3 +1,14 @@
+dbus (1.10.22-0+deb9u1) stretch; urgency=medium
+
+ * New upstream stable release
+ - d/copyright: Update
+ - Drop Doxygen reproducibility patch, applied upstream
+ - d/p/backports/Replace-DBUS_USE_TEST_BINARY-(etc.).patch:
+ Update backported patch to apply to 1.10.22
+ * debian/gbp.conf: Set git branch to debian/stretch
+
+ -- Simon McVittie <smcv@debian.org> Sun, 30 Jul 2017 11:23:02 +0100
+
dbus (1.10.18-1) unstable; urgency=medium
* New upstream stable release
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/debian/copyright dbus-1.10.22/debian/copyright
--- dbus-1.10.18/debian/copyright 2017-04-05 20:07:19.000000000 +0100
+++ dbus-1.10.22/debian/copyright 2017-07-30 11:23:02.000000000 +0100
@@ -24,7 +24,7 @@
© 2008 Colin Walters
© 2009 Klaralvdalens Datakonsult AB, a KDAB Group company
© 2011-2012 Nokia Corporation
- © 2012-2015 Collabora Ltd.
+ © 2012-2017 Collabora Ltd.
© 2013 Intel Corporation
"modified code from libassuan, (C) FSF"
License: GPL-2+ or AFL-2.1
@@ -43,7 +43,7 @@
© 2003-2006 Red Hat, Inc.
© 2003 Philip Blundell
© 2011 Nokia Corporation
- © 2014-2015 Collabora Ltd.
+ © 2014-2017 Collabora Ltd.
License: GPL-2+
Files:
@@ -73,8 +73,9 @@
© 2008 Colin Walters
© 2009 Jonas Bähr
© 2008-2012 Nokia Corporation
- © 2008-2015 Collabora Ltd
+ © 2008-2017 Collabora Ltd
© 2013 Intel Corporation
+ © 2017 Shin-ichi MORITA
License: Expat
Files: tools/strto*ll.c
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/debian/gbp.conf dbus-1.10.22/debian/gbp.conf
--- dbus-1.10.18/debian/gbp.conf 2017-04-05 20:07:19.000000000 +0100
+++ dbus-1.10.22/debian/gbp.conf 2017-07-30 11:23:02.000000000 +0100
@@ -1,5 +1,5 @@
[DEFAULT]
pristine-tar = True
-debian-branch = debian/master
+debian-branch = debian/stretch
upstream-branch = upstream/1.10.x
patch-numbers = False
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/debian/patches/backports/Replace-DBUS_USE_TEST_BINARY-with-DBUS_TEST_DBUS_LAUNCH.patch dbus-1.10.22/debian/patches/backports/Replace-DBUS_USE_TEST_BINARY-with-DBUS_TEST_DBUS_LAUNCH.patch
--- dbus-1.10.18/debian/patches/backports/Replace-DBUS_USE_TEST_BINARY-with-DBUS_TEST_DBUS_LAUNCH.patch 2017-04-05 20:07:19.000000000 +0100
+++ dbus-1.10.22/debian/patches/backports/Replace-DBUS_USE_TEST_BINARY-with-DBUS_TEST_DBUS_LAUNCH.patch 2017-07-30 11:23:02.000000000 +0100
@@ -63,10 +63,10 @@
set_tests_properties(${_target} PROPERTIES ENVIRONMENT "${_env}")
endmacro(add_test_executable)
diff --git a/configure.ac b/configure.ac
-index 0746ddd..9c09d29 100644
+index 1fabddd..0184159 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1733,9 +1733,6 @@ AC_DEFINE_UNQUOTED([DBUS_TEST_EXEC], ["$DBUS_TEST_EXEC"],
+@@ -1739,9 +1739,6 @@ AC_DEFINE_UNQUOTED([DBUS_TEST_EXEC], ["$DBUS_TEST_EXEC"],
AC_DEFINE_UNQUOTED([DBUS_EXEEXT], ["$EXEEXT"],
[Extension for executables, typically empty or .exe])
@@ -77,10 +77,10 @@
TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test$EXEEXT"
AC_SUBST(TEST_LAUNCH_HELPER_BINARY)
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
-index ed776a7..1ff45ef 100644
+index 9d914f8..a267ef5 100644
--- a/dbus/dbus-sysdeps-unix.c
+++ b/dbus/dbus-sysdeps-unix.c
-@@ -3746,7 +3746,7 @@ _dbus_get_autolaunch_address (const char *scope,
+@@ -3775,7 +3775,7 @@ _dbus_get_autolaunch_address (const char *scope,
* but that's done elsewhere, and if it worked, this function wouldn't
* be called.) */
const char *display;
@@ -89,7 +89,7 @@
char *argv[6];
int i;
DBusString uuid;
-@@ -3791,9 +3791,9 @@ _dbus_get_autolaunch_address (const char *scope,
+@@ -3820,9 +3820,9 @@ _dbus_get_autolaunch_address (const char *scope,
}
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
@@ -103,17 +103,17 @@
progpath = DBUS_BINDIR "/dbus-launch";
/*
diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am
-index 3b7fcc6..fae2892 100644
+index 92227ed..42e1adc 100644
--- a/test/name-test/Makefile.am
+++ b/test/name-test/Makefile.am
-@@ -25,6 +25,7 @@ AM_TESTS_ENVIRONMENT = \
+@@ -35,6 +35,7 @@ AM_TESTS_ENVIRONMENT = \
export PYTHON=@PYTHON@; \
export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \
export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \
+ export DBUS_TEST_DBUS_LAUNCH=@abs_top_builddir@/tools/dbus-launch$(EXEEXT); \
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
+ unset DBUS_SESSION_BUS_PID; \
$(NULL)
-
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index 80e4a24..205a994 100644
--- a/tools/dbus-launch.c
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/debian/patches/debian/Doxyfile.in-do-not-put-timestamps-in-HTML-for-reprod.patch dbus-1.10.22/debian/patches/debian/Doxyfile.in-do-not-put-timestamps-in-HTML-for-reprod.patch
--- dbus-1.10.18/debian/patches/debian/Doxyfile.in-do-not-put-timestamps-in-HTML-for-reprod.patch 2017-04-05 20:07:19.000000000 +0100
+++ dbus-1.10.22/debian/patches/debian/Doxyfile.in-do-not-put-timestamps-in-HTML-for-reprod.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-From: Simon McVittie <smcv@debian.org>
-Date: Wed, 6 May 2015 09:17:06 +0100
-Subject: Doxyfile.in: do not put timestamps in HTML, for reproducible builds
-
-Origin: vendor, Debian
-Forwarded: no
----
- Doxyfile.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Doxyfile.in b/Doxyfile.in
-index f0a37ed..dbbdb4f 100644
---- a/Doxyfile.in
-+++ b/Doxyfile.in
-@@ -102,6 +102,7 @@ DISABLE_INDEX = NO
- ENUM_VALUES_PER_LINE = 4
- GENERATE_TREEVIEW = NO
- TREEVIEW_WIDTH = 250
-+HTML_TIMESTAMP = NO
- #---------------------------------------------------------------------------
- # configuration options related to the LaTeX output
- #---------------------------------------------------------------------------
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/debian/patches/series dbus-1.10.22/debian/patches/series
--- dbus-1.10.18/debian/patches/series 2017-04-05 20:07:19.000000000 +0100
+++ dbus-1.10.22/debian/patches/series 2017-07-30 11:23:02.000000000 +0100
@@ -1,4 +1,3 @@
backports/Replace-DBUS_USE_TEST_BINARY-with-DBUS_TEST_DBUS_LAUNCH.patch
debian/Don-t-abort-on-fatal-warnings-by-default.patch
-debian/Doxyfile.in-do-not-put-timestamps-in-HTML-for-reprod.patch
debian/session.conf-system.conf-include-legacy-files-as-.dpkg-ba.patch
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/Doxyfile.in dbus-1.10.22/Doxyfile.in
--- dbus-1.10.18/Doxyfile.in 2015-09-30 15:48:40.000000000 +0100
+++ dbus-1.10.22/Doxyfile.in 2017-06-29 18:47:05.000000000 +0100
@@ -102,6 +102,7 @@
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
+HTML_TIMESTAMP = NO
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/HACKING dbus-1.10.22/HACKING
--- dbus-1.10.18/HACKING 2015-09-30 15:48:40.000000000 +0100
+++ dbus-1.10.22/HACKING 2017-06-08 07:25:34.000000000 +0100
@@ -68,15 +68,15 @@
===
D-Bus uses Git as its version control system. The main repository is
-hosted at git.freedesktop.org/dbus/dbus. To clone D-Bus, execute the
-following command:
+hosted on freedesktop.org. To clone D-Bus, execute one of the
+following commands:
- git clone git://git.freedesktop.org/dbus/dbus
-OR
- git clone git.freedesktop.org:dbus/dbus
+ git clone https://anongit.freedesktop.org/git/dbus/dbus.git
+ git clone git://anongit.freedesktop.org/dbus/dbus
+ git clone ssh://git.freedesktop.org/git/dbus/dbus
-The latter form is the one that allows pushing, but it also requires
-an SSH account on the server. The former form allows anonymous
+The last form is the one that allows pushing, but it also requires
+an SSH account on the server. The other forms allow anonymous
checkouts.
D-Bus development happens in two branches in parallel: the current
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/NEWS dbus-1.10.22/NEWS
--- dbus-1.10.18/NEWS 2017-04-05 16:24:03.000000000 +0100
+++ dbus-1.10.22/NEWS 2017-07-27 13:56:49.000000000 +0100
@@ -1,3 +1,53 @@
+D-Bus 1.10.22 (2017-07-27)
+==
+
+The “roof terrace” release.
+
+Fixes:
+
+• dbus_message_iter_append_basic() no longer leaks memory if it fails to
+ append a file descriptor to a message. (fd.o #101568, Simon McVittie)
+
+• dbus_message_iter_open_container() no longer leaks memory if it runs out
+ of memory. (fd.o #101568, Simon McVittie)
+
+• dbus_message_append_args_valist() no longer leaks memory if given an
+ unsupported type. This situation is still considered to be a programming
+ 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)
+
+• Ensure that tests fail if they would otherwise have tried to connect to
+ the real session bus (fd.o #101698, Simon McVittie)
+
+• Make build-time tests cope with finding Python 3, but not Python 2
+ (fd.o #101716, Simon McVittie)
+
+D-Bus 1.10.20 (2017-06-29)
+==
+
+The “suggesting a delivery gone horribly wrong” release.
+
+Fixes:
+
+• Fix a reference leak when blocking on a pending call on a connection
+ that has been disconnected (fd.o #101481, Shin-ichi MORITA)
+
+• Don't put timestamps in the Doxygen-generated documentation, for
+ closer-to-reproducible builds (fd.o #100692, Simon McVittie)
+
+• Avoid an assertion failure when connecting to a semicolon-separated
+ series of addresses, one of which fails (fd.o #101257, Simon McVittie)
+
+Documentation:
+
+• Update git URIs in HACKING document to sync up with cgit.freedesktop.org
+ (fd.o #100715, Simon McVittie)
+
D-Bus 1.10.18 (2017-04-05)
==
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/test/dbus-daemon.c dbus-1.10.22/test/dbus-daemon.c
--- dbus-1.10.18/test/dbus-daemon.c 2016-07-11 11:15:34.000000000 +0100
+++ dbus-1.10.22/test/dbus-daemon.c 2017-07-21 09:49:12.000000000 +0100
@@ -147,6 +147,7 @@
/* 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,
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/test/Makefile.am dbus-1.10.22/test/Makefile.am
--- dbus-1.10.18/test/Makefile.am 2017-02-01 11:09:18.000000000 +0000
+++ dbus-1.10.22/test/Makefile.am 2017-07-21 09:49:12.000000000 +0100
@@ -200,6 +200,7 @@
installcheck_tests =
installcheck_environment = \
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); \
@@ -211,6 +212,7 @@
AM_TESTS_ENVIRONMENT = \
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_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); \
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/test/name-test/Makefile.am dbus-1.10.22/test/name-test/Makefile.am
--- dbus-1.10.18/test/name-test/Makefile.am 2015-11-23 21:47:51.000000000 +0000
+++ dbus-1.10.22/test/name-test/Makefile.am 2017-07-21 09:49:12.000000000 +0100
@@ -9,7 +9,15 @@
TEST_EXTENSIONS = .sh
-SH_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh
+LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh
+SH_LOG_DRIVER = $(LOG_DRIVER)
+
+LOG_COMPILER = \
+ @abs_top_builddir@/tools/dbus-run-session$(EXEEXT) \
+ --config-file=@abs_builddir@/uninstalled-session.conf \
+ --dbus-daemon=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
+ -- \
+ $(NULL)
SH_LOG_COMPILER = $(SHELL)
## note that TESTS has special meaning (stuff to use in make check)
@@ -20,17 +28,30 @@
if DBUS_ENABLE_EMBEDDED_TESTS
if DBUS_UNIX
AM_TESTS_ENVIRONMENT = \
+ export DBUS_SESSION_BUS_ADDRESS=do-not-use-real-session:; \
export DBUS_TOP_BUILDDIR=@abs_top_builddir@; \
export DBUS_TOP_SRCDIR=@abs_top_srcdir@; \
+ export PATH="@abs_top_builddir@/bus:$$PATH"; \
export PYTHON=@PYTHON@; \
export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \
export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \
export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
+ unset DBUS_SESSION_BUS_PID; \
$(NULL)
+uninstalled-session.conf: $(top_builddir)/bus/session.conf Makefile
+ $(SED) -e 's|<standard_session_servicedirs.*$$|<servicedir>@abs_top_builddir@/test/data/valid-service-files</servicedir>|g' \
+ -e 's|<include.*$$||g' \
+ < $< > $@
+
+check_DATA = \
+ uninstalled-session.conf \
+ $(NULL)
+
TESTS += \
run-test.sh \
run-test-systemserver.sh \
+ test-pending-call-disconnected \
$(NULL)
endif
endif
@@ -41,10 +62,11 @@
## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
## build even when not doing "make check"
-noinst_PROGRAMS=test-pending-call-dispatch test-pending-call-timeout test-threads-init test-ids test-shutdown test-privserver test-privserver-client test-autolaunch
+noinst_PROGRAMS=test-pending-call-dispatch test-pending-call-timeout test-pending-call-disconnected test-threads-init test-ids test-shutdown test-privserver test-privserver-client test-autolaunch
test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-1.la
test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-1.la
+test_pending_call_disconnected_LDADD=$(top_builddir)/dbus/libdbus-1.la
test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-1.la
test_ids_LDADD=$(top_builddir)/dbus/libdbus-1.la
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/test/name-test/test-activation-forking.py dbus-1.10.22/test/name-test/test-activation-forking.py
--- dbus-1.10.18/test/name-test/test-activation-forking.py 2015-09-30 15:48:40.000000000 +0100
+++ dbus-1.10.22/test/name-test/test-activation-forking.py 2017-07-21 09:49:12.000000000 +0100
@@ -7,7 +7,7 @@
import dbus
import dbus.mainloop.glib
except:
- print "Failed import, aborting test"
+ print("Failed import, aborting test")
sys.exit(0)
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -23,7 +23,7 @@
# Start it up
reply = i.Echo("hello world")
-print "TestSuiteForkingEchoService initial reply OK"
+print("TestSuiteForkingEchoService initial reply OK")
def ignore(*args, **kwargs):
pass
@@ -36,7 +36,7 @@
global o
global i
if counter > 10:
- print "Activated 10 times OK, TestSuiteForkingEchoService pass"
+ print("Activated 10 times OK, TestSuiteForkingEchoService pass")
loop.quit()
return
counter += 1
@@ -52,7 +52,7 @@
def check_counter():
if counter == 0:
- print "Failed to get NameOwnerChanged for TestSuiteForkingEchoService"
+ print("Failed to get NameOwnerChanged for TestSuiteForkingEchoService")
sys.exit(1)
GObject.timeout_add(15000, check_counter)
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/test/name-test/test-pending-call-disconnected.c dbus-1.10.22/test/name-test/test-pending-call-disconnected.c
--- dbus-1.10.18/test/name-test/test-pending-call-disconnected.c 1970-01-01 01:00:00.000000000 +0100
+++ dbus-1.10.22/test/name-test/test-pending-call-disconnected.c 2017-06-29 18:31:50.000000000 +0100
@@ -0,0 +1,117 @@
+/*
+ * Copyright © 2006 Red Hat Inc.
+ * Copyright © 2017 Shin-ichi MORITA <shin1morita@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+/**
+* Test to make sure that pending calls unref error messages
+* when blocked after disconnected.
+**/
+
+#include <config.h>
+#include <dbus/dbus.h>
+#include <dbus/dbus-sysdeps.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+static size_t count = 0;
+
+static void
+free_data (void *data)
+{
+ --count;
+ printf ("# Freed: %s\n", (const char*)data);
+}
+
+/* This test outputs TAP syntax: http://testanything.org/ */
+int
+main (int argc, char *argv[])
+{
+ dbus_int32_t slot_connection = -1;
+ dbus_int32_t slot_message = -1;
+ dbus_int32_t slot_pending = -1;
+ DBusError error;
+ DBusConnection *conn;
+ DBusMessage *method;
+ DBusPendingCall *pending;
+ DBusMessage *reply;
+
+ printf ("# Testing pending call error\n");
+
+ dbus_connection_allocate_data_slot (&slot_connection);
+ dbus_message_allocate_data_slot (&slot_message);
+ dbus_pending_call_allocate_data_slot (&slot_pending);
+
+ dbus_error_init (&error);
+ conn = dbus_bus_get_private (DBUS_BUS_SESSION, &error);
+ dbus_connection_set_data (conn, slot_connection, (void*)"connection", free_data);
+ ++count;
+ dbus_connection_set_exit_on_disconnect (conn, FALSE);
+
+ method = dbus_message_new_method_call ("org.freedesktop.TestSuiteEchoService",
+ "/org/freedesktop/TestSuite",
+ "org.freedesktop.TestSuite",
+ "Exit");
+ dbus_message_set_data (method, slot_message, (void*)"method", free_data);
+ ++count;
+
+ dbus_connection_send_with_reply (conn, method, &pending, -1);
+ dbus_message_unref (method);
+ dbus_pending_call_set_data (pending, slot_pending, (void*)"pending", free_data);
+ ++count;
+
+ dbus_connection_close (conn);
+
+ dbus_pending_call_block (pending);
+ reply = dbus_pending_call_steal_reply (pending);
+ dbus_pending_call_unref (pending);
+ if (reply == NULL)
+ {
+ printf ("Bail out! Reply is NULL ***\n");
+ exit (1);
+ }
+ dbus_message_set_data (reply, slot_message, (void*)"reply", free_data);
+ ++count;
+ if (dbus_message_get_type (reply) != DBUS_MESSAGE_TYPE_ERROR)
+ {
+ printf ("Bail out! Reply is not error ***\n");
+ exit (1);
+ }
+ dbus_message_unref (reply);
+
+ dbus_connection_unref (conn);
+
+ dbus_connection_free_data_slot (&slot_connection);
+ dbus_message_free_data_slot (&slot_message);
+ dbus_pending_call_free_data_slot (&slot_pending);
+
+ if (count != 0)
+ {
+ printf ("not ok # Not all refs were unrefed ***\n");
+ exit (1);
+ }
+ else
+ {
+ printf ("ok\n# Testing completed\n1..1\n");
+ exit (0);
+ }
+}
diff -Nru --exclude Makefile.in --exclude aclocal.m4 --exclude configure --exclude depcomp --exclude tap-driver.sh dbus-1.10.18/test/name-test/test-wait-for-echo.py dbus-1.10.22/test/name-test/test-wait-for-echo.py
--- dbus-1.10.18/test/name-test/test-wait-for-echo.py 2015-09-30 15:48:40.000000000 +0100
+++ dbus-1.10.22/test/name-test/test-wait-for-echo.py 2017-07-21 09:49:12.000000000 +0100
@@ -7,7 +7,7 @@
import dbus.mainloop.glib
from gi.repository import GObject
except:
- print "Failed import, aborting test"
+ print("Failed import, aborting test")
sys.exit(0)
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -16,7 +16,7 @@
exitcode = 0
def handle_noreceipt():
- print "Failed to get signal"
+ print("Failed to get signal")
global exitcode
exitcode = 1
loop.quit()
@@ -26,7 +26,7 @@
bus = dbus.SessionBus()
def sighandler(*args, **kwargs):
- print "got signal"
+ print("got signal")
loop.quit()
bus.add_signal_receiver(sighandler, dbus_interface='org.freedesktop.TestSuite', signal_name='Foo')
--- End Message ---