From 4729b7a5f44b9531afac739625956f2fafeb0b2c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 11 Jul 2016 10:52:44 +0100 Subject: [PATCH 1/3] update-activation-environment: produce better diagnostics on error If dbus-daemon or systemd replied to our method call with an error, we would report it as "invalid arguments" instead of the true error name and message. Same root cause as . Signed-off-by: Simon McVittie --- tools/dbus-update-activation-environment.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/dbus-update-activation-environment.c b/tools/dbus-update-activation-environment.c index 6c53d8e2..160ac5d0 100644 --- a/tools/dbus-update-activation-environment.c +++ b/tools/dbus-update-activation-environment.c @@ -378,7 +378,8 @@ next: exit (EX_UNAVAILABLE); } - if (!dbus_message_get_args (msg, &error, DBUS_TYPE_INVALID)) + if (dbus_set_error_from_message (&error, msg) || + !dbus_message_get_args (msg, &error, DBUS_TYPE_INVALID)) { fprintf (stderr, "%s: error from dbus-daemon: %s: %s\n", @@ -402,7 +403,8 @@ next: "%s: warning: error sending to systemd: %s: %s\n", PROGNAME, error.name, error.message); } - else if (!dbus_message_get_args (msg, &error, DBUS_TYPE_INVALID)) + else if (dbus_set_error_from_message (&error, msg) || + !dbus_message_get_args (msg, &error, DBUS_TYPE_INVALID)) { fprintf (stderr, "%s: warning: error from systemd: %s: %s\n", From 7ebe1de2187186a96946aa88d1c8457231996af4 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 11 Aug 2016 16:08:39 +0100 Subject: [PATCH 2/3] Mark WaitingForOK state as unused It should probably be used (see #97298) but the fact that it isn't is breaking compatibility with gcc 6, so apply a quick workaround while we look into what's wrong here. Signed-off-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97282 (cherry picked from commit 21d61180819c141e779d6ecf9919e62e768b6fd9) --- dbus/dbus-auth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c index f2227875..ea43ce72 100644 --- a/dbus/dbus-auth.c +++ b/dbus/dbus-auth.c @@ -282,6 +282,9 @@ static const DBusAuthStateData client_state_need_send_auth = { static const DBusAuthStateData client_state_waiting_for_data = { "WaitingForData", handle_client_state_waiting_for_data }; +/* The WaitingForOK state doesn't appear to be used. + * See https://bugs.freedesktop.org/show_bug.cgi?id=97298 */ +_DBUS_GNUC_UNUSED static const DBusAuthStateData client_state_waiting_for_ok = { "WaitingForOK", handle_client_state_waiting_for_ok }; From 32c940d18353449fa837ca058cd41b9bcdd61bbe Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 12 Aug 2016 10:12:28 +0100 Subject: [PATCH 3/3] NEWS for 1.10 --- NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index dec1ad54..13a06974 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,12 @@ Fixes: • Explicitly check for stdint.h (Ioan-Adrian Ratiu) +• update-activation-environment: produce better diagnostics on error + (fd.o #96653, Simon McVittie) + +• Don't fail the build with an unused const variable warning under gcc 6 + (fd.o #97282; Thomas Zimmermann, Simon McVittie) + • Merge dbus-1.10-ci branch, containing backports from 1.11.0 in build/test code to support continuous integration (fd.o #93194, Simon McVittie)