diff options
| author | Michael Biebl <biebl@debian.org> | 2008-07-26 00:29:46 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2009-07-14 17:41:09 +0200 |
| commit | 45bd8efd313204bfd0cfa17b9829257d591019dc (patch) | |
| tree | e32fbf902009fe1d464d84edcbd62eb22a6c6a33 | |
| parent | e548070b1ba25f1c04e73fdc8e429ccdcc03f38c (diff) | |
| download | consolekit-debian/0.2.10-1.tar.gz | |
Imported Debian patch 0.2.10-1debian/0.2.10-1
| -rw-r--r-- | debian/90consolekit | 11 | ||||
| -rw-r--r-- | debian/changelog | 37 | ||||
| -rw-r--r-- | debian/consolekit.install | 12 | ||||
| -rw-r--r-- | debian/consolekit.preinst | 5 | ||||
| -rw-r--r-- | debian/control | 4 | ||||
| -rw-r--r-- | debian/libck-connector0.symbols | 9 | ||||
| -rw-r--r-- | debian/org.freedesktop.ConsoleKit.service | 4 | ||||
| -rw-r--r-- | debian/pam-foreground-compat.ck | 16 | ||||
| -rw-r--r-- | debian/patches/01-dbus_policy.patch | 27 | ||||
| -rw-r--r-- | debian/patches/02-exit_with_dbus.patch | 113 | ||||
| -rw-r--r-- | debian/patches/03-cleanup_console_tags.patch | 66 | ||||
| -rw-r--r-- | debian/patches/series | 3 | ||||
| -rwxr-xr-x | debian/rules | 6 |
13 files changed, 297 insertions, 16 deletions
diff --git a/debian/90consolekit b/debian/90consolekit new file mode 100644 index 0000000..9550576 --- /dev/null +++ b/debian/90consolekit @@ -0,0 +1,11 @@ +# -*- sh -*- +# Xsession.d script for ck-launch-session. +# +# +# This file is sourced by Xsession(5), not executed. + +CK_LAUNCH_SESSION=/usr/bin/ck-launch-session + +if [ -z "$XDG_SESSION_COOKIE" ] && [ -x "$CK_LAUNCH_SESSION" ]; then + STARTUP="$CK_LAUNCH_SESSION $STARTUP" +fi diff --git a/debian/changelog b/debian/changelog index a9a1e5f..c4dea84 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,40 @@ +consolekit (0.2.10-1) unstable; urgency=low + + * New upstream release. (Closes: #464005, #489030) + * debian/control + - Add Build-Depends on pkg-config. + - Add Build-Depends on zlib1g-dev. + - Add Build-Depends on quilt. + - Bump Standards-Version to 3.8.0. No further changes. + * debian/org.freedesktop.ConsoleKit.service + - Removed, merged upstream. + * debian/libck-connector0.symbols + - Add symbols file for libck-connector library. + * consolekit.install + - Install all binaries in /usr/bin and /usr/sbin instead of listing them + individually. + - Update the list of installed directories. + - Install 90consolekit into /etc/X11/Xsession.d. + * debian/pam-foreground-compat.ck + - Add run-session.d script which creates pam_console compatible tag files. + Script shamelessly taken from Ubuntu. (Closes: #422349) + * debian/rules + - Install pam-foreground-compat.ck into /usr/lib/ConsoleKit/run-session.d. + - Include patchsys-quilt.mk for patch management. + * debian/90consolekit + - Xsession ConsoleKit integration. Script is taken from Ubuntu but renamed + to better fit with the existing naming conventions for Xsession scripts. + (Closes: #452627) + * 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@debian.org> Sat, 26 Jul 2008 00:29:46 +0200 + consolekit (0.2.3-3) unstable; urgency=low * debian/control diff --git a/debian/consolekit.install b/debian/consolekit.install index eb61be5..5361e2a 100644 --- a/debian/consolekit.install +++ b/debian/consolekit.install @@ -1,8 +1,8 @@ debian/tmp/etc/dbus-1/system.d/ConsoleKit.conf debian/tmp/etc/ConsoleKit/ -debian/tmp/usr/bin/ck-list-sessions -debian/tmp/usr/lib/consolekit/ck-get-x11-server-pid -debian/tmp/usr/lib/consolekit/ck-get-x11-display-device -debian/tmp/usr/lib/consolekit/ck-collect-session-info -debian/tmp/usr/sbin/console-kit-daemon -debian/org.freedesktop.ConsoleKit.service usr/share/dbus-1/system-services/ +debian/tmp/usr/share/dbus-1/system-services/ +debian/tmp/usr/lib/ConsoleKit/ +debian/tmp/var/log/ConsoleKit/ +debian/tmp/usr/sbin/ +debian/tmp/usr/bin/ +debian/90consolekit etc/X11/Xsession.d/ diff --git a/debian/consolekit.preinst b/debian/consolekit.preinst index 6748388..f3a9b9a 100644 --- a/debian/consolekit.preinst +++ b/debian/consolekit.preinst @@ -37,10 +37,7 @@ rm_conffile() case "$1" in - install) - ;; - - upgrade) + install|upgrade) # Upgrade from previous versions if dpkg --compare-versions "$2" lt "0.2.3-3"; then rm_conffile consolekit /etc/init.d/consolekit diff --git a/debian/control b/debian/control index be4669c..7f6f3ee 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,8 @@ Section: admin Priority: optional Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org> Uploaders: Michael Biebl <biebl@debian.org> -Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libdbus-glib-1-dev (>= 0.30), libglib2.0-dev (>= 2.7.0), libx11-dev (>= 1.0.0), xmlto, libpam0g-dev -Standards-Version: 3.7.3 +Build-Depends: cdbs, debhelper (>= 5), autotools-dev, pkg-config, ,quilt, libdbus-glib-1-dev (>= 0.30), libglib2.0-dev (>= 2.7.0), libx11-dev (>= 1.0.0), xmlto, libpam0g-dev, zlib1g-dev +Standards-Version: 3.8.0 Vcs-Svn: svn://svn.debian.org/svn/pkg-utopia/packages/unstable/consolekit Vcs-Browser: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/consolekit Homepage: http://www.freedesktop.org/wiki/Software/ConsoleKit diff --git a/debian/libck-connector0.symbols b/debian/libck-connector0.symbols new file mode 100644 index 0000000..7401150 --- /dev/null +++ b/debian/libck-connector0.symbols @@ -0,0 +1,9 @@ +libck-connector.so.0 libck-connector0 #MINVER# + ck_connector_close_session@Base 0.2.1 + ck_connector_get_cookie@Base 0.2.1 + ck_connector_new@Base 0.2.1 + ck_connector_open_session@Base 0.2.1 + ck_connector_open_session_for_user@Base 0.2.1 + ck_connector_open_session_with_parameters@Base 0.2.1 + ck_connector_ref@Base 0.2.1 + ck_connector_unref@Base 0.2.1 diff --git a/debian/org.freedesktop.ConsoleKit.service b/debian/org.freedesktop.ConsoleKit.service deleted file mode 100644 index 9f1c724..0000000 --- a/debian/org.freedesktop.ConsoleKit.service +++ /dev/null @@ -1,4 +0,0 @@ -[D-BUS Service] -Name=org.freedesktop.ConsoleKit -Exec=/usr/sbin/console-kit-daemon -User=root diff --git a/debian/pam-foreground-compat.ck b/debian/pam-foreground-compat.ck new file mode 100644 index 0000000..7f6b122 --- /dev/null +++ b/debian/pam-foreground-compat.ck @@ -0,0 +1,16 @@ +#!/bin/sh +TAGDIR=/var/run/console + +[ -n "$CK_SESSION_USER_UID" ] || exit 1 + +TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`" + +if [ "$1" = "session_added" ]; then + mkdir -p "$TAGDIR" + echo "$CK_SESSION_ID" >> "$TAGFILE" +fi + +if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then + sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE" + [ -s "$TAGFILE" ] || rm -f "$TAGFILE" +fi diff --git a/debian/patches/01-dbus_policy.patch b/debian/patches/01-dbus_policy.patch new file mode 100644 index 0000000..6596ab2 --- /dev/null +++ b/debian/patches/01-dbus_policy.patch @@ -0,0 +1,27 @@ +Index: ConsoleKit-0.2.10/data/ConsoleKit.conf +=================================================================== +--- ConsoleKit-0.2.10.orig/data/ConsoleKit.conf 2008-02-12 16:45:04.000000000 +0100 ++++ ConsoleKit-0.2.10/data/ConsoleKit.conf 2008-07-25 00:34:44.000000000 +0200 +@@ -22,10 +22,6 @@ + send_interface="org.freedesktop.DBus.Properties" /> + + <allow send_interface="org.freedesktop.ConsoleKit.Manager" +- send_member="Restart"/> +- <allow send_interface="org.freedesktop.ConsoleKit.Manager" +- send_member="Stop"/> +- <allow send_interface="org.freedesktop.ConsoleKit.Manager" + send_member="OpenSession"/> + <allow send_interface="org.freedesktop.ConsoleKit.Manager" + send_member="CloseSession"/> +@@ -91,4 +87,11 @@ + send_member="GetIdleSinceHint"/> + </policy> + ++ <policy user="root"> ++ <allow send_interface="org.freedesktop.ConsoleKit.Manager" ++ send_member="Restart"/> ++ <allow send_interface="org.freedesktop.ConsoleKit.Manager" ++ send_member="Stop"/> ++ </policy> ++ + </busconfig> diff --git a/debian/patches/02-exit_with_dbus.patch b/debian/patches/02-exit_with_dbus.patch new file mode 100644 index 0000000..8cf3372 --- /dev/null +++ b/debian/patches/02-exit_with_dbus.patch @@ -0,0 +1,113 @@ +From 8ec523138671a8fe93748a0b75adaaca96e2392e Mon Sep 17 00:00:00 2001 +From: William Jon McCann <jmccann@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); + diff --git a/debian/patches/03-cleanup_console_tags.patch b/debian/patches/03-cleanup_console_tags.patch new file mode 100644 index 0000000..0dfdbd9 --- /dev/null +++ b/debian/patches/03-cleanup_console_tags.patch @@ -0,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 (); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..03f4d79 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +01-dbus_policy.patch +02-exit_with_dbus.patch +03-cleanup_console_tags.patch diff --git a/debian/rules b/debian/rules index 756a9a3..6d3a5f2 100755 --- a/debian/rules +++ b/debian/rules @@ -3,7 +3,13 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/rules/utils.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +DEB_CONFIGURE_LIBEXECDIR := "\$$(prefix)/lib/ConsoleKit" DEB_CONFIGURE_EXTRA_FLAGS := --enable-pam-module \ --enable-docbook-docs \ --with-pid-file=/var/run/console-kit-daemon.pid + +install/consolekit:: + install -m 755 debian/pam-foreground-compat.ck debian/tmp/usr/lib/ConsoleKit/run-session.d/ |
