[dbus/f15/master] Add patch to log activation; we're trying to debug a potential bluez failure, and we really needed t
Colin Walters
walters at fedoraproject.org
Sat Mar 26 21:53:47 UTC 2011
commit d47d1cd2601e6850db7c9cba80337faa434f2f72
Author: Colin Walters <walters at verbum.org>
Date: Sat Mar 26 13:53:39 2011 -0400
Add patch to log activation; we're trying to debug a potential
bluez failure, and we really needed this before anyways.
activation-logging.patch | 103 ++++++++++++++++++++++++++++++++++++++++++++++
dbus.spec | 9 ++++-
2 files changed, 111 insertions(+), 1 deletions(-)
---
diff --git a/activation-logging.patch b/activation-logging.patch
new file mode 100644
index 0000000..1760b32
--- /dev/null
+++ b/activation-logging.patch
@@ -0,0 +1,103 @@
+From abfdde4255a1de97f565fb04c9a04a894b71c370 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters at verbum.org>
+Date: Sat, 26 Mar 2011 15:52:50 -0400
+Subject: [PATCH] activation: Use _dbus_system_log for activation information
+
+Log when we are activating something (and whether it's via systemd)
+as well as when we fail to activate.
+---
+ bus/activation.c | 56 ++++++++++++++++++++++++++++++++++++++++-------------
+ 1 files changed, 42 insertions(+), 14 deletions(-)
+
+diff --git a/bus/activation.c b/bus/activation.c
+index 7b2a72b..27a8ccc 100644
+--- a/bus/activation.c
++++ b/bus/activation.c
+@@ -1400,6 +1400,11 @@ babysitter_watch_callback (DBusWatch *watch,
+
+ if (activation_failed)
+ {
++ bus_context_log (pending_activation->activation->context,
++ DBUS_SYSTEM_LOG_INFO, "Activated service '%s' failed: %s",
++ pending_activation->service_name,
++ error.message);
++
+ /* Destroy all pending activations with the same exec */
+ _dbus_hash_iter_init (pending_activation->activation->pending_activations,
+ &iter);
+@@ -1462,6 +1467,10 @@ pending_activation_timed_out (void *data)
+ dbus_set_error (&error, DBUS_ERROR_TIMED_OUT,
+ "Activation of %s timed out",
+ pending_activation->service_name);
++ bus_context_log (pending_activation->activation->context,
++ DBUS_SYSTEM_LOG_INFO,
++ "Activation of service '%s' timed out",
++ pending_activation->service_name);
+
+ pending_activation_failed (pending_activation, &error);
+
+@@ -1976,9 +1985,15 @@ bus_activation_activate_service (BusActivation *activation,
+ service = bus_registry_lookup (registry, &service_string);
+
+ if (service != NULL)
+- /* Wonderful, systemd is connected, let's just send the msg */
+- retval = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service),
+- message, error);
++ {
++ bus_context_log (activation->context,
++ DBUS_SYSTEM_LOG_INFO, "Activating via systemd service name='%s' unit='%s'",
++ service_name,
++ entry->systemd_service);
++ /* Wonderful, systemd is connected, let's just send the msg */
++ retval = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service),
++ message, error);
++ }
+ else
+ /* systemd is not around, let's "activate" it. */
+ retval = bus_activation_activate_service (activation, connection, activation_transaction, TRUE,
+@@ -2083,18 +2098,31 @@ bus_activation_activate_service (BusActivation *activation,
+ }
+
+ _dbus_verbose ("Spawning %s ...\n", argv[0]);
+- if (!_dbus_spawn_async_with_babysitter (&pending_activation->babysitter, argv,
+- envp,
+- NULL, activation,
+- error))
+- {
+- _dbus_verbose ("Failed to spawn child\n");
+- _DBUS_ASSERT_ERROR_IS_SET (error);
+- dbus_free_string_array (argv);
+- dbus_free_string_array (envp);
++ bus_context_log (activation->context,
++ DBUS_SYSTEM_LOG_INFO, "Activating service '%s'",
++ service_name);
++ {
++ DBusError tmp_error;
++ dbus_error_init (&tmp_error);
++
++ if (!_dbus_spawn_async_with_babysitter (&pending_activation->babysitter, argv,
++ envp,
++ NULL, activation,
++ &tmp_error))
++ {
++ _dbus_verbose ("Failed to spawn child\n");
++ bus_context_log (activation->context,
++ DBUS_SYSTEM_LOG_INFO, "Failed to activate service %s: %s",
++ service_name,
++ tmp_error.message);
++ _DBUS_ASSERT_ERROR_IS_SET (&tmp_error);
++ dbus_move_error (&tmp_error, error);
++ dbus_free_string_array (argv);
++ dbus_free_string_array (envp);
+
+- return FALSE;
+- }
++ return FALSE;
++ }
++ }
+
+ dbus_free_string_array (argv);
+ envp = NULL;
+--
+1.7.4
+
diff --git a/dbus.spec b/dbus.spec
index cacf647..34a3dcc 100644
--- a/dbus.spec
+++ b/dbus.spec
@@ -10,7 +10,7 @@ Summary: D-BUS message bus
Name: dbus
Epoch: 1
Version: 1.4.6
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://www.freedesktop.org/software/dbus/
#VCS: git:git://git.freedesktop.org/git/dbus/dbus
Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz
@@ -46,6 +46,9 @@ Patch0: bindir.patch
# Not sure about this one
Patch1: dbus-1.0.1-generate-xml-docs.patch
+# https://bugs.freedesktop.org/show_bug.cgi?id=35705
+Patch2: activation-logging.patch
+
%description
D-BUS is a system for sending messages between applications. It is
used both for the system-wide message bus service, and as a
@@ -242,6 +245,10 @@ fi
%{_includedir}/*
%changelog
+* Sat Mar 26 2011 Colin Walters <walters at verbum.org> - 1:1.4.6-2
+- Add patch to log activation; we're trying to debug a potential
+ bluez failure, and we really needed this before anyways.
+
* Wed Feb 23 2011 Colin Walters <walters at verbum.org> - 1:1.4.6-1
- New upstream version
More information about the scm-commits
mailing list