[Pkg-utopia-commits] r2387 - in /packages/unstable/consolekit/debian: changelog patches/02-exit_with_dbus.patch patches/03-cleanup_console_tags.patch patches/series
biebl at users.alioth.debian.org
biebl at users.alioth.debian.org
Fri Jul 25 22:32:32 UTC 2008
Author: biebl
Date: Fri Jul 25 22:32:32 2008
New Revision: 2387
URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=2387
Log:
* debian/patches/02-exit_with_dbus.patch
- Pulled from upstream git. Exit when D-Bus system bus is stopped.
* debian/patches/03-cleanup_console_tags.patch
- Cleanup console tag files on application startup and shutdown.
Added:
packages/unstable/consolekit/debian/patches/02-exit_with_dbus.patch
packages/unstable/consolekit/debian/patches/03-cleanup_console_tags.patch
Modified:
packages/unstable/consolekit/debian/changelog
packages/unstable/consolekit/debian/patches/series
Modified: packages/unstable/consolekit/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/consolekit/debian/changelog?rev=2387&op=diff
==============================================================================
--- packages/unstable/consolekit/debian/changelog (original)
+++ packages/unstable/consolekit/debian/changelog Fri Jul 25 22:32:32 2008
@@ -28,8 +28,12 @@
* debian/patches/01-dbus_policy.patch
- Allow only root to call the Restart and Stop D-Bus methods since we are
not using PolicyKit to restrict the access to those methods.
+ * debian/patches/02-exit_with_dbus.patch
+ - Pulled from upstream git. Exit when D-Bus system bus is stopped.
+ * debian/patches/03-cleanup_console_tags.patch
+ - Cleanup console tag files on application startup and shutdown.
- -- Michael Biebl <biebl at debian.org> Fri, 25 Jul 2008 00:45:24 +0200
+ -- Michael Biebl <biebl at debian.org> Sat, 26 Jul 2008 00:29:46 +0200
consolekit (0.2.3-3) unstable; urgency=low
Added: packages/unstable/consolekit/debian/patches/02-exit_with_dbus.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/consolekit/debian/patches/02-exit_with_dbus.patch?rev=2387&op=file
==============================================================================
--- packages/unstable/consolekit/debian/patches/02-exit_with_dbus.patch (added)
+++ packages/unstable/consolekit/debian/patches/02-exit_with_dbus.patch Fri Jul 25 22:32:32 2008
@@ -1,0 +1,113 @@
+From 8ec523138671a8fe93748a0b75adaaca96e2392e Mon Sep 17 00:00:00 2001
+From: William Jon McCann <jmccann at redhat.com>
+Date: Mon, 5 May 2008 13:34:08 -0400
+Subject: [PATCH] exit with the bus now that we're activated by the bus
+
+---
+ src/main.c | 65 +++++++----------------------------------------------------
+ 1 files changed, 8 insertions(+), 57 deletions(-)
+
+Index: ConsoleKit-0.2.10/src/main.c
+===================================================================
+--- ConsoleKit-0.2.10.orig/src/main.c 2008-07-25 03:17:18.000000000 +0200
++++ ConsoleKit-0.2.10/src/main.c 2008-07-25 03:17:26.000000000 +0200
+@@ -44,9 +44,6 @@
+
+ #define CK_DBUS_NAME "org.freedesktop.ConsoleKit"
+
+-static void bus_proxy_destroyed_cb (DBusGProxy *bus_proxy,
+- CkManager *manager);
+-
+ static gboolean
+ timed_exit_cb (GMainLoop *loop)
+ {
+@@ -138,60 +135,12 @@
+ return bus;
+ }
+
+-static gboolean
+-bus_reconnect (CkManager *manager)
+-{
+- DBusGConnection *bus;
+- DBusGProxy *bus_proxy;
+- gboolean ret;
+-
+- ret = TRUE;
+-
+- bus = get_system_bus ();
+- if (bus == NULL) {
+- goto out;
+- }
+-
+- bus_proxy = get_bus_proxy (bus);
+- if (bus_proxy == NULL) {
+- g_warning ("Could not construct bus_proxy object; will retry");
+- goto out;
+- }
+-
+- if (! acquire_name_on_proxy (bus_proxy) ) {
+- g_warning ("Could not acquire name; will retry");
+- goto out;
+- }
+-
+- manager = ck_manager_new ();
+- if (manager == NULL) {
+- g_warning ("Could not construct manager object");
+- exit (1);
+- }
+-
+- g_signal_connect (bus_proxy,
+- "destroy",
+- G_CALLBACK (bus_proxy_destroyed_cb),
+- manager);
+-
+- g_debug ("Successfully reconnected to D-Bus");
+-
+- ret = FALSE;
+-
+- out:
+- return ret;
+-}
+-
+ static void
+ bus_proxy_destroyed_cb (DBusGProxy *bus_proxy,
+- CkManager *manager)
++ GMainLoop *loop)
+ {
+ g_debug ("Disconnected from D-Bus");
+-
+- g_object_unref (manager);
+- manager = NULL;
+-
+- g_timeout_add (3000, (GSourceFunc)bus_reconnect, manager);
++ g_main_loop_quit (loop);
+ }
+
+ static void
+@@ -371,12 +320,12 @@
+ goto out;
+ }
+
++ loop = g_main_loop_new (NULL, FALSE);
++
+ g_signal_connect (bus_proxy,
+ "destroy",
+ G_CALLBACK (bus_proxy_destroyed_cb),
+- manager);
+-
+- loop = g_main_loop_new (NULL, FALSE);
++ loop);
+
+ if (do_timed_exit) {
+ g_timeout_add (1000 * 30, (GSourceFunc) timed_exit_cb, loop);
+@@ -384,7 +333,9 @@
+
+ g_main_loop_run (loop);
+
+- g_object_unref (manager);
++ if (manager != NULL) {
++ g_object_unref (manager);
++ }
+
+ g_main_loop_unref (loop);
+
Added: packages/unstable/consolekit/debian/patches/03-cleanup_console_tags.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/consolekit/debian/patches/03-cleanup_console_tags.patch?rev=2387&op=file
==============================================================================
--- packages/unstable/consolekit/debian/patches/03-cleanup_console_tags.patch (added)
+++ packages/unstable/consolekit/debian/patches/03-cleanup_console_tags.patch Fri Jul 25 22:32:32 2008
@@ -1,0 +1,66 @@
+Index: ConsoleKit-0.2.10/src/main.c
+===================================================================
+--- ConsoleKit-0.2.10.orig/src/main.c 2008-07-25 03:19:34.000000000 +0200
++++ ConsoleKit-0.2.10/src/main.c 2008-07-26 00:25:13.000000000 +0200
+@@ -149,6 +149,43 @@
+ unlink (CONSOLE_KIT_PID_FILE);
+ }
+
++#define CONSOLE_TAGS_DIR "/var/run/console"
++
++static void
++delete_console_tags (void)
++{
++ GDir *dir;
++ GError *error;
++ const gchar *name;
++
++ g_debug ("Cleaning up %s", CONSOLE_TAGS_DIR);
++
++ dir = g_dir_open (CONSOLE_TAGS_DIR, 0, &error);
++ if (dir == NULL) {
++ g_warning ("Couldn't open directory %s: %s", CONSOLE_TAGS_DIR,
++ error->message);
++ g_error_free (error);
++ return;
++ }
++ while ((name = g_dir_read_name (dir)) != NULL) {
++ gchar *file;
++ file = g_build_filename (CONSOLE_TAGS_DIR, name, NULL);
++
++ g_debug ("Removing tag file: %s", file);
++ if (unlink (file) == -1) {
++ g_warning ("Couldn't delete tag file: %s", file);
++ }
++ g_free (file);
++ }
++}
++
++static void
++cleanup (void)
++{
++ delete_console_tags ();
++ delete_pid ();
++}
++
+ /* copied from nautilus */
+ static int debug_log_pipes[2];
+
+@@ -229,7 +266,7 @@
+ snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ());
+ written = write (pf, pid, strlen (pid));
+ close (pf);
+- g_atexit (delete_pid);
++ g_atexit (cleanup);
+ } else {
+ g_warning ("Unable to write pid file %s: %s",
+ CONSOLE_KIT_PID_FILE,
+@@ -312,6 +349,8 @@
+
+ g_debug ("initializing console-kit-daemon %s", VERSION);
+
++ delete_console_tags ();
++
+ create_pid_file ();
+
+ manager = ck_manager_new ();
Modified: packages/unstable/consolekit/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/consolekit/debian/patches/series?rev=2387&op=diff
==============================================================================
--- packages/unstable/consolekit/debian/patches/series (original)
+++ packages/unstable/consolekit/debian/patches/series Fri Jul 25 22:32:32 2008
@@ -1,1 +1,3 @@
01-dbus_policy.patch
+02-exit_with_dbus.patch
+03-cleanup_console_tags.patch
More information about the Pkg-utopia-commits
mailing list