--- consolekit-0.3.0.orig/debian/rules +++ consolekit-0.3.0/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +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/ + install -D -m 644 debian/libpam-ck-connector.pam-auth-update debian/tmp/usr/share/pam-configs/consolekit --- consolekit-0.3.0.orig/debian/changelog +++ consolekit-0.3.0/debian/changelog @@ -0,0 +1,251 @@ +consolekit (0.3.0-2ubuntu3) jaunty; urgency=low + + * Add 13-work-without-policykit.patch: If PolicyKit cannot be initialized, + just disable support for it, do not fail completely. (LP: #275432) + + -- Martin Pitt Thu, 26 Mar 2009 10:42:26 +0100 + +consolekit (0.3.0-2ubuntu2) jaunty; urgency=low + + * No-change rebuild to fix lpia shared library dependencies. + + -- Colin Watson Thu, 19 Mar 2009 02:03:07 +0000 + +consolekit (0.3.0-2ubuntu1) jaunty; urgency=low + + * Merge with Debian unstable: + - Some packaging fixes. + - Fix current FTBFS due to invalid documentation XML. (LP: #338001) + * Remaining Ubuntu changes: + - debian/consolekit.preinst: Remove obsolete conffile on upgrade. This + needs to be kept until after next LTS. + - PolicyKit support: + + debian/control: Build-depend on libpolkit-dev. + + debian/consolekit.install: Install PolicyKit policy. + + -- Martin Pitt Mon, 16 Mar 2009 11:24:40 +0100 + +consolekit (0.3.0-2) unstable; urgency=low + + * debian/consolekit.prerm + - Stop console-kit-daemon upon package removal (using start-stop-daemon). + (Closes: #518346) + + -- Michael Biebl Tue, 10 Mar 2009 17:15:35 +0100 + +consolekit (0.3.0-1) unstable; urgency=low + + * New upstream release. + * debian/patches/01-dbus_policy.patch + - Removed, the access to the restart and stop actions is now properly + restricted by checks in the source code. + * debian/patches/02-exit_with_dbus.patch + - Removed, merged upstream. + * debian/patches/05-dbus_policy.patch + - Updated by pulling latest patch from upstream Git. + * debian/patches/06-xmlto_skip_validation.patch + - Skip XML validation when generating the documentation. (Closes: #516253) + A proper fix will be, to make ConsoleKit.xml actually valid XML. + * debian/consolekit.docs + - Update path to spec html file. + * Merge patches from Ubuntu + - debian/patches/04-consolekit_park.patch (Closes: #489032) + - debian/patches/05-pam-add-nox11.patch + - debian/patches/08-fix-double-close.patch + - debian/patches/09-directory-handle-leak.patch (Closes: #516532) + - debian/patches/10-file_monitor_remove_watch_crash.patch + - debian/patches/11-unref-dbus-proxy.patch + - debian/patches/12-allow-get-sessions.patch + * debian/control + - Wrap Build-Depends. + - Bump Build-Depends on debhelper to (>= 7). + * debian/compat + - Bump debhelper compat level to 7. + * Fix FTBFS on GNU/kFreeBSD. (Closes: #511270) + - debian/patches/80-gnukfreebsd_support_configure.ac.patch + debian/patches/81-gnukfreebsd_support_pseudo_run_autoconf.patch + + Add kfreebsd target to configure(.ac) script + - debian/control + + Add libkvm-dev to Build-Depends on kfreebsd ports. + Patch by Luca Favatella, thanks. + * debian/libpam-ck-connector.{pam-auth-update,install,postinst,prerm}, + debian/rules: enable pam_ck_connector by default using the new + pam-auth-update support. + * debian/control: depend on libpam-runtime (>= 1.0.1-6) for the above. + + -- Michael Biebl Tue, 10 Mar 2009 12:48:43 +0100 + +consolekit (0.3-0ubuntu4) jaunty; urgency=low + + * Adding debian/patches/12-allow-get-sessions.patch to allow for + the GetSessions command to be called on the Manager interface. This + saves the effort of calling GetSeats and then GetSessions on each + of them. (LP: #338001) + + -- Ted Gould Wed, 04 Mar 2009 13:59:45 -0600 + +consolekit (0.3-0ubuntu3) jaunty; urgency=low + + * Unref the dbus proxy when finalizing the session object, so that + they are not leaked. (LP: #284229) + - When leaked they would stay in the list of active proxies, which + is iterated over during some proxy operations. This would lead to + a dramatic slowdown and CPU usage spike if a lot of sessions were + created and destroyed. + + -- James Westby Mon, 12 Jan 2009 16:09:17 +0000 + +consolekit (0.3-0ubuntu2) jaunty; urgency=low + + * debian/patches/11-dbus_policy.patch: + - Apply patch from Colin Walters (fd.o bug 19020) to correct D-Bus + policy. LP: #318754. + + -- Scott James Remnant Fri, 16 Jan 2009 11:37:46 +0000 + +consolekit (0.3-0ubuntu1) jaunty; urgency=low + + * New upstream release: (LP: #273711) + - Initial support for login session IDs. + - Various bug fixes. + * Drop patches accepted/backported from upstream: + - 02-exit_with_dbus.patch + - 06-polkit-result.patch + - 07-fix-thread-shutdown.patch + * debian/consolekit.docs: Update path to spec html file. + + -- Martin Pitt Tue, 23 Sep 2008 20:48:39 +0200 + +consolekit (0.2.10-5) unstable; urgency=high + + * debian/watch + - Fix the regex to not use the second Perl group. + * Urgency high as it still blocks #503532. + + -- Michael Biebl Thu, 08 Jan 2009 16:56:40 +0100 + +consolekit (0.2.10-4) unstable; urgency=high + + [ Michael Biebl ] + * debian/watch + - Check for both .gz and .bz2 tarballs. + * debian/control + - Add ${misc:Depends} to libck-connector-dev. + + [ Simon McVittie ] + * debian/patches/05-dbus_policy.patch: patch from + Colin Walters so ConsoleKit introspection and SetIdleHint still work + after CVE-2008-4311 is fixed in dbus-daemon. (Closes: #510645) + * Urgency high for bugfix that blocks CVE-2008-4311 upload. + + -- Michael Biebl Wed, 07 Jan 2009 17:58:29 +0100 + +consolekit (0.2.10-3) unstable; urgency=low + + * debian/patches/04-defer_daemonizing.patch + - Daemonize after registering the dbus name to avoid a race condition + where dbus-daemon thinks that console-kit-daemon has failed to start + properly and returns an error to the caller. (Closes: #507815) + * Document all patches to make lintian happy. + + -- Michael Biebl Fri, 05 Dec 2008 01:28:46 +0100 + +consolekit (0.2.10-2) unstable; urgency=high + + * debian/patches/03-cleanup_console_tags.patch + - Properly initialize GError to avoid daemon crash if /var/run/console/ + does not exist. Also, demote message about it from warning to debug, + since it is not an error condition at all. (Closes: #492686) + Patch by Martin Pitt, thanks. + + -- Michael Biebl Mon, 28 Jul 2008 11:09:28 +0200 + +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 Sat, 26 Jul 2008 00:29:46 +0200 + +consolekit (0.2.3-3) unstable; urgency=low + + * debian/control + - The Vcs-* fields are now officially supported, so remove the XS- prefix. + - Bump Standards-Version to 3.7.3. No further changes required. + - Drop dependency on lsb-base, as we no longer install a SysV init script. + - Tighten dependency on dbus (>= 1.1.2). This is required for the D-Bus + system activation support. + * debian/consolekit.init + - Deleted, no longer required. + * debian/consolekit.install + - Install the D-Bus service file debian/org.freedesktop.ConsoleKit.service + into /usr/share/dbus-1/system-services. This allows to start the + ConsoleKit service on demand. + * debian/consolekit.preinst + - Make sure the conffile /etc/init.d/consolekit and its symlinks in + /etc/rc?.d are properly removed on package upgrades. + + -- Michael Biebl Tue, 11 Dec 2007 23:14:14 +0100 + +consolekit (0.2.3-2) unstable; urgency=low + + * debian/control + - Add Depends: lsb-base (>= 3.0-6) as the init script uses the LSB logging + functions. + - Use the new "Homepage:" field to specify the upstream URL. + + -- Michael Biebl Sun, 21 Oct 2007 20:04:16 +0200 + +consolekit (0.2.3-1) unstable; urgency=low + + * New upstream release. + * debian/consolekit.install + - Install the ck-get-x11-display-device binary. + - Install the configuration files in /etc/ConsoleKit/. + * debian/consolekit.docs + - Install the ConsoleKit specification document. + + -- Michael Biebl Wed, 19 Sep 2007 21:34:38 +0200 + +consolekit (0.2.1-2) unstable; urgency=low + + * Upload to unstable. + + -- Michael Biebl Fri, 10 Aug 2007 00:22:56 +0200 + +consolekit (0.2.1-1) experimental; urgency=low + + * Initial release. (Closes: #416568) + + -- Michael Biebl Thu, 29 Mar 2007 01:38:27 +0200 + --- consolekit-0.3.0.orig/debian/libpam-ck-connector.prerm +++ consolekit-0.3.0/debian/libpam-ck-connector.prerm @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = remove ]; then + pam-auth-update --package --remove consolekit +fi + +#DEBHELPER# + +exit 0 --- consolekit-0.3.0.orig/debian/pam-foreground-compat.ck +++ consolekit-0.3.0/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 --- consolekit-0.3.0.orig/debian/90consolekit +++ consolekit-0.3.0/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 --- consolekit-0.3.0.orig/debian/libck-connector0.symbols +++ consolekit-0.3.0/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 --- consolekit-0.3.0.orig/debian/watch +++ consolekit-0.3.0/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://people.freedesktop.org/~mccann/dist/ConsoleKit-(.*)\.tar\.(?:gz|bz2) --- consolekit-0.3.0.orig/debian/consolekit.install +++ consolekit-0.3.0/debian/consolekit.install @@ -0,0 +1,9 @@ +debian/tmp/etc/dbus-1/system.d/ConsoleKit.conf +debian/tmp/etc/ConsoleKit/ +debian/tmp/usr/share/dbus-1/system-services/ +debian/tmp/usr/share/PolicyKit/policy/ +debian/tmp/usr/lib/ConsoleKit/ +debian/tmp/var/log/ConsoleKit/ +debian/tmp/usr/sbin/ +debian/tmp/usr/bin/ +debian/90consolekit etc/X11/Xsession.d/ --- consolekit-0.3.0.orig/debian/copyright +++ consolekit-0.3.0/debian/copyright @@ -0,0 +1,67 @@ +This package was debianized by Michael Biebl on +Thu, 29 Mar 2007 01:38:27 +0200. + +It was downloaded from http://people.freedesktop.org/~mccann/dist/. + +Upstream Author: + William Jon McCann + +Copyright: + Copyright (C) 2006 William Jon McCann + +License: GPL v2 or later + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +=============================================================================== + +libck-connector/* +pam-ck-connector/* + +Copyright: + Copyright (c) 2007 David Zeuthen + Copyright (c) 2007 William Jon McCann + +License: MIT license + + 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. + +=============================================================================== + +The Debian packaging is (C) 2007, Michael Biebl and +is licensed under the GPL, see above. + --- consolekit-0.3.0.orig/debian/libck-connector-dev.install +++ consolekit-0.3.0/debian/libck-connector-dev.install @@ -0,0 +1,4 @@ +debian/tmp/usr/lib/libck-connector.so +debian/tmp/usr/lib/pkgconfig/ +debian/tmp/usr/include/ConsoleKit/ck-connector/ +debian/tmp/usr/share/doc/ConsoleKit/spec/ usr/share/doc/libck-connector-dev/ --- consolekit-0.3.0.orig/debian/compat +++ consolekit-0.3.0/debian/compat @@ -0,0 +1 @@ +7 --- consolekit-0.3.0.orig/debian/libpam-ck-connector.postinst +++ consolekit-0.3.0/debian/libpam-ck-connector.postinst @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +pam-auth-update --package + +#DEBHELPER# --- consolekit-0.3.0.orig/debian/libpam-ck-connector.pam-auth-update +++ consolekit-0.3.0/debian/libpam-ck-connector.pam-auth-update @@ -0,0 +1,6 @@ +Name: ConsoleKit Session Management +Default: yes +Priority: 0 +Session-Type: Additional +Session-Final: + optional pam_ck_connector.so nox11 --- consolekit-0.3.0.orig/debian/libck-connector0.install +++ consolekit-0.3.0/debian/libck-connector0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libck-connector.so.* --- consolekit-0.3.0.orig/debian/README.Debian +++ consolekit-0.3.0/debian/README.Debian @@ -0,0 +1,8 @@ +ConsoleKit for Debian +--------------------- + +ConsoleKit allows to track seats and sessions. It either needs integration +into the login manager, like gdm, or it can go through a pam module. +Install the package libpam-ck-connector for that. + + -- Michael Biebl Thu, 29 Mar 2007 01:38:27 +0200 --- consolekit-0.3.0.orig/debian/consolekit.prerm +++ consolekit-0.3.0/debian/consolekit.prerm @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +DAEMON=/usr/sbin/console-kit-daemon +PIDFILE=/var/run/console-kit-daemon.pid + +if [ "$1" = remove ]; then + start-stop-daemon --stop --quiet --oknodo --exec $DAEMON --pidfile $PIDFILE +fi + +#DEBHELPER# + +exit 0 --- consolekit-0.3.0.orig/debian/consolekit.docs +++ consolekit-0.3.0/debian/consolekit.docs @@ -0,0 +1 @@ +debian/tmp/usr/share/doc/ConsoleKit/spec/ConsoleKit.html --- consolekit-0.3.0.orig/debian/control +++ consolekit-0.3.0/debian/control @@ -0,0 +1,73 @@ +Source: consolekit +Section: admin +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Utopia Maintenance Team +Uploaders: Michael Biebl +Build-Depends: cdbs, + debhelper (>= 7), + autotools-dev, + pkg-config, + quilt, + libdbus-glib-1-dev (>= 0.30), + libglib2.0-dev (>= 2.7.0), + libx11-dev (>= 1.0.0), + libkvm-dev [kfreebsd-i386 kfreebsd-amd64], + xmlto, + libpam0g-dev, + libpolkit-dev (>= 0.8), + 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 + +Package: consolekit +Section: admin +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, dbus (>= 1.1.2) +Recommends: libpam-ck-connector +Description: framework for defining and tracking users, sessions and seats + ConsoleKit is a system daemon for tracking what users are logged + into the system and how they interact with the computer (e.g. + which keyboard and mouse they use). + . + It provides asynchronous notification via the system message bus. + . + This package provides the system daemon and tools to interact with it. + +Package: libck-connector0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: ConsoleKit libraries + ConsoleKit is a system daemon for tracking what users are logged + into the system and how they interact with the computer (e.g. + which keyboard and mouse they use). + . + This package provides a convenience library which simplifies the access to + ConsoleKit. + +Package: libck-connector-dev +Section: libdevel +Architecture: any +Depends: libck-connector0 (= ${binary:Version}), ${misc:Depends}, libdbus-1-dev +Description: ConsoleKit development files + ConsoleKit is a system daemon for tracking what users are logged + into the system and how they interact with the computer (e.g. + which keyboard and mouse they use). + . + This package provides the development libraries and headers. + +Package: libpam-ck-connector +Section: admin +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-runtime (>= 1.0.1-6) +Description: ConsoleKit PAM module + ConsoleKit is a system daemon for tracking what users are logged + into the system and how they interact with the computer (e.g. + which keyboard and mouse they use). + . + This package provides a PAM module which can be used for console logins. + Graphical login managers should talk to ConsoleKit directly. + --- consolekit-0.3.0.orig/debian/libpam-ck-connector.install +++ consolekit-0.3.0/debian/libpam-ck-connector.install @@ -0,0 +1,3 @@ +debian/tmp/lib/security/pam_ck_connector.so +debian/tmp/usr/share/man/man8/pam_ck_connector.8 +debian/tmp/usr/share/pam-configs/consolekit --- consolekit-0.3.0.orig/debian/consolekit.preinst +++ consolekit-0.3.0/debian/consolekit.preinst @@ -0,0 +1,63 @@ +#!/bin/sh -e +# This script can be called in the following ways: +# +# Before the package is installed: +# install +# +# Before removed package is upgraded: +# install +# +# Before the package is upgraded: +# upgrade +# +# +# If postrm fails during upgrade or fails on failed upgrade: +# abort-upgrade + + +# remove a no-longer used conffile +rm_conffile() +{ + PKGNAME="$1" + CONFFILE="$2" + + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" + if [ "$md5sum" != "$old_md5sum" ]; then + echo "Obsolete conffile $CONFFILE has been modified by you." + echo "Saving as $CONFFILE.dpkg-bak ..." + mv -f "$CONFFILE" "$CONFFILE".dpkg-bak + else + echo "Removing obsolete conffile $CONFFILE ..." + rm -f "$CONFFILE" + fi + fi +} + + +case "$1" in + install|upgrade) + # Upgrade from previous versions + if dpkg --compare-versions "$2" lt "0.2.3-3"; then + rm_conffile consolekit /etc/init.d/consolekit + update-rc.d consolekit remove >/dev/null + fi + if dpkg --compare-versions "$2" lt-nl "0.2.10-1"; then + # renamed to 90consolekit + rm_conffile consolekit /etc/X11/Xsession.d/90-console-kit + fi + + ;; + + abort-upgrade) + ;; + + *) + echo "$0 called with unknown argument \`$1'" 1>&2 + exit 1 + ;; +esac + +#DEBHELPER# +exit 0 --- consolekit-0.3.0.orig/debian/patches/13-work-without-policykit.patch +++ consolekit-0.3.0/debian/patches/13-work-without-policykit.patch @@ -0,0 +1,19 @@ +# Description: If PolicyKit cannot be initialized, just disable support for it, do not fail completely. +# Ubuntu: https://launchpad.net/bugs/275432 +# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=20876 +Index: consolekit-0.3.0/src/ck-manager.c +=================================================================== +--- consolekit-0.3.0.orig/src/ck-manager.c 2009-03-26 10:01:51.000000000 +0100 ++++ consolekit-0.3.0/src/ck-manager.c 2009-03-26 10:04:24.000000000 +0100 +@@ -2519,8 +2519,9 @@ + manager->priv->pol_ctx = polkit_context_new (); + polkit_context_set_io_watch_functions (manager->priv->pol_ctx, pk_io_add_watch, pk_io_remove_watch); + if (! polkit_context_init (manager->priv->pol_ctx, NULL)) { +- g_critical ("cannot initialize libpolkit"); +- return FALSE; ++ g_warning ("cannot initialize libpolkit, some functionality will not be available"); ++ polkit_context_unref (manager->priv->pol_ctx); ++ manager->priv->pol_ctx = NULL; + } + #endif + --- consolekit-0.3.0.orig/debian/patches/10-file_monitor_remove_watch_crash.patch +++ consolekit-0.3.0/debian/patches/10-file_monitor_remove_watch_crash.patch @@ -0,0 +1,249 @@ +# Description: Fix common crash when trying to remove a NULL watch +# Ubuntu: https://launchpad.net/bugs/269651 +# Upstream: http://bugs.freedesktop.org/show_bug.cgi?id=18046 +Index: consolekit-0.2.10/src/ck-file-monitor-inotify.c +=================================================================== +--- consolekit-0.2.10.orig/src/ck-file-monitor-inotify.c 2008-10-20 14:41:37.000000000 +0100 ++++ consolekit-0.2.10/src/ck-file-monitor-inotify.c 2008-10-20 14:56:02.000000000 +0100 +@@ -55,7 +55,7 @@ + + typedef struct + { +- FileInotifyWatch *watch; ++ gint wd; + CkFileMonitorEvent event; + char *path; + } FileMonitorEventInfo; +@@ -80,7 +80,9 @@ + guchar *buffer; + + guint events_idle_id; ++ guint remove_idle_id; + GQueue *notify_events; ++ GQueue *remove_events; + }; + + enum { +@@ -242,6 +244,10 @@ + file_monitor_remove_watch (CkFileMonitor *monitor, + FileInotifyWatch *watch) + { ++ if (watch->wd == -1) { ++ return; ++ } ++ + g_hash_table_remove (monitor->priv->path_to_watch, + watch->path); + g_hash_table_remove (monitor->priv->wd_to_watch, +@@ -296,6 +302,7 @@ + emit_events_in_idle (CkFileMonitor *monitor) + { + FileMonitorEventInfo *event_info; ++ gchar *path, *freeme; + + monitor->priv->events_idle_id = 0; + +@@ -303,29 +310,39 @@ + GSList *l; + FileInotifyWatch *watch; + +- watch = event_info->watch; +- +- for (l = watch->notifies; l != NULL; l = l->next) { +- FileMonitorNotify *notify; ++ watch = g_hash_table_lookup (monitor->priv->wd_to_watch, ++ GINT_TO_POINTER (event_info->wd)); + +- notify = g_hash_table_lookup (monitor->priv->notifies, +- GUINT_TO_POINTER (l->data)); +- if (notify == NULL) { +- continue; +- } +- +- if (! (notify->mask & event_info->event)) { +- continue; +- } +- +- if (notify->notify_func) { +- notify->notify_func (monitor, event_info->event, event_info->path, notify->user_data); +- } ++ if (watch) { ++ for (l = watch->notifies; l != NULL; l = l->next) { ++ FileMonitorNotify *notify; ++ ++ notify = g_hash_table_lookup (monitor->priv->notifies, ++ GUINT_TO_POINTER (l->data)); ++ if (notify == NULL) { ++ continue; ++ } ++ ++ if (! (notify->mask & event_info->event)) { ++ continue; ++ } ++ ++ if (notify->notify_func) { ++ freeme = NULL; ++ if (event_info->path) { ++ path = freeme = g_build_filename (watch->path, event_info->path, NULL); ++ } else { ++ path = watch->path; ++ } ++ notify->notify_func (monitor, event_info->event, path, notify->user_data); ++ if (freeme) { ++ g_free (freeme); ++ } ++ } ++ } + } + +- g_free (event_info->path); + event_info->path = NULL; +- + event_info->event = CK_FILE_MONITOR_EVENT_NONE; + + g_free (event_info); +@@ -334,6 +351,37 @@ + return FALSE; + } + ++static gboolean ++emit_removals_in_idle (CkFileMonitor *monitor) ++{ ++ gint wd; ++ FileInotifyWatch *watch; ++ GSList *l; ++ ++ monitor->priv->remove_idle_id = 0; ++ ++ while ((wd = g_queue_pop_head (monitor->priv->remove_events)) != NULL) { ++ watch = g_hash_table_lookup (monitor->priv->wd_to_watch, ++ GINT_TO_POINTER (wd)); ++ if (watch && watch->wd != -1) { ++ for (l = watch->notifies; l != NULL; l = l->next) { ++ FileMonitorNotify *notify; ++ ++ notify = g_hash_table_lookup (monitor->priv->notifies, ++ GUINT_TO_POINTER (l->data)); ++ if (notify == NULL) { ++ continue; ++ } ++ notify->watch = NULL; ++ } ++ file_monitor_remove_watch (monitor, watch); ++ g_free (watch); ++ } ++ } ++ ++ return FALSE; ++} ++ + static void + file_monitor_queue_event (CkFileMonitor *monitor, + FileMonitorEventInfo *event_info) +@@ -347,7 +395,7 @@ + + static void + queue_watch_event (CkFileMonitor *monitor, +- FileInotifyWatch *watch, ++ gint wd, + CkFileMonitorEvent event, + const char *path) + { +@@ -355,7 +403,7 @@ + + event_info = g_new0 (FileMonitorEventInfo, 1); + +- event_info->watch = watch; ++ event_info->wd = wd; + event_info->path = g_strdup (path); + event_info->event = event; + +@@ -363,8 +411,18 @@ + } + + static void ++queue_remove_event (CkFileMonitor *monitor, ++ gint wd) ++{ ++ g_queue_push_tail (monitor->priv->remove_events, wd); ++ ++ if (monitor->priv->remove_idle_id == 0) { ++ monitor->priv->remove_idle_id = g_idle_add ((GSourceFunc) emit_removals_in_idle, monitor); ++ } ++} ++ ++static void + handle_inotify_event (CkFileMonitor *monitor, +- FileInotifyWatch *watch, + struct inotify_event *ievent) + { + CkFileMonitorEvent event; +@@ -375,9 +433,9 @@ + freeme = NULL; + + if (ievent->len > 0) { +- path = freeme = g_build_filename (watch->path, ievent->name, NULL); ++ path = ievent->name; + } else { +- path = watch->path; ++ path = NULL; + } + + mask_str = imask_to_string (ievent->mask); +@@ -397,11 +455,11 @@ + } + + if (event != CK_FILE_MONITOR_EVENT_NONE) { +- queue_watch_event (monitor, watch, event, path); ++ queue_watch_event (monitor, ievent->wd, event, path); + } + + if (ievent->mask & IN_IGNORED) { +- file_monitor_remove_watch (monitor, watch); ++ queue_remove_event (monitor, ievent->wd); + } + } + +@@ -460,7 +518,7 @@ + watch = g_hash_table_lookup (monitor->priv->wd_to_watch, + GINT_TO_POINTER (ievent->wd)); + if (watch != NULL) { +- handle_inotify_event (monitor, watch, ievent); ++ handle_inotify_event (monitor, ievent); + } + + i += sizeof (struct inotify_event) + ievent->len; +@@ -523,11 +581,13 @@ + g_hash_table_steal (monitor->priv->notifies, + GUINT_TO_POINTER (id)); + +- notify->watch->notifies = g_slist_remove (notify->watch->notifies, GUINT_TO_POINTER (id)); ++ if (notify->watch) { ++ notify->watch->notifies = g_slist_remove (notify->watch->notifies, GUINT_TO_POINTER (id)); + +- if (g_slist_length (notify->watch->notifies) == 0) { +- file_monitor_remove_watch (monitor, notify->watch); +- g_free (notify->watch); ++ if (g_slist_length (notify->watch->notifies) == 0) { ++ file_monitor_remove_watch (monitor, notify->watch); ++ g_free (notify->watch); ++ } + } + + g_free (notify); +@@ -629,6 +689,7 @@ + + monitor->priv->serial = 1; + monitor->priv->notify_events = g_queue_new (); ++ monitor->priv->remove_events = g_queue_new (); + + setup_inotify (monitor); + } +@@ -649,6 +710,7 @@ + + g_hash_table_destroy (monitor->priv->notifies); + g_queue_free (monitor->priv->notify_events); ++ g_queue_free (monitor->priv->remove_events); + + G_OBJECT_CLASS (ck_file_monitor_parent_class)->finalize (object); + } --- consolekit-0.3.0.orig/debian/patches/series +++ consolekit-0.3.0/debian/patches/series @@ -0,0 +1,14 @@ +03-cleanup_console_tags.patch +04-consolekit_park.patch +04-defer_daemonizing.patch +05-dbus_policy.patch +05-pam-add-nox11.patch +06-xmlto_skip_validation.patch +08-fix-double-close.patch +09-directory-handle-leak.patch +10-file_monitor_remove_watch_crash.patch +11-unref-dbus-proxy.patch +12-allow-get-sessions.patch +13-work-without-policykit.patch +80-gnukfreebsd_support_configure.ac.patch +81-gnukfreebsd_support_pseudo_run_autoconf.patch --- consolekit-0.3.0.orig/debian/patches/12-allow-get-sessions.patch +++ consolekit-0.3.0/debian/patches/12-allow-get-sessions.patch @@ -0,0 +1,13 @@ +diff -ur ConsoleKit-0.3.0/data/ConsoleKit.conf ConsoleKit-ted/data/ConsoleKit.conf +--- ConsoleKit-0.3.0/data/ConsoleKit.conf 2009-03-04 14:02:53.000000000 -0600 ++++ ConsoleKit-ted/data/ConsoleKit.conf 2009-03-04 14:03:21.000000000 -0600 +@@ -41,6 +41,9 @@ + send_member="GetSeats"/> + ++ + + #include + #include ++ #ifdef HAVE_PATHS_H ++ #include ++ #endif /* HAVE_PATHS_H */ ++ ++ #ifndef _PATH_TTY ++ #define _PATH_TTY "/dev/tty" ++ #endif + + #include + #include +@@ -2370,6 +2377,41 @@ + CkManager *manager; + } RemoveLeaderData; + ++gboolean ++ck_manager_set_x11_parking_place (CkManager *manager, ++ const char *x11display, ++ const char *x11displaydevice, ++ DBusGMethodInvocation *context) ++{ ++ CkSeat *seat; ++ guint num; ++ gboolean res = FALSE; ++ ++ g_debug ("x11display=%s device=%s", x11display, x11displaydevice); ++ ++ seat = g_hash_table_lookup (manager->priv->seats, ++ CK_DBUS_PATH "/Seat1"); ++ /* FIXME: this is rather unpleasantly hardcoded, but it ++ * mirrors the code in find_seat_for_session - iwj */ ++ if (seat == NULL) { ++ g_debug ("no seat"); ++ goto xit; ++ } ++ ++ if (sscanf (x11displaydevice, _PATH_TTY "%u", &num) != 1) { ++ g_debug ("bad device"); ++ goto xit; ++ } ++ ++ ck_seat_set_park_vt (seat, num); ++ res = TRUE; ++ ++xit: ++ dbus_g_method_return (context, res); ++ ++ return TRUE; ++} ++ + static gboolean + remove_leader_for_connection (const char *cookie, + CkSessionLeader *leader, +Index: consolekit-0.3/src/ck-manager.h +=================================================================== +--- consolekit-0.3.orig/src/ck-manager.h 2008-09-23 20:56:46.000000000 +0200 ++++ consolekit-0.3/src/ck-manager.h 2008-09-23 21:23:47.000000000 +0200 +@@ -94,6 +94,10 @@ + gboolean ck_manager_close_session (CkManager *manager, + const char *cookie, + DBusGMethodInvocation *context); ++gboolean ck_manager_set_x11_parking_place (CkManager *manager, ++ const char *x11display, ++ const char *x11displaydevice, ++ DBusGMethodInvocation *context); + gboolean ck_manager_get_current_session (CkManager *manager, + DBusGMethodInvocation *context); + gboolean ck_manager_get_session_for_cookie (CkManager *manager, +Index: consolekit-0.3/src/ck-seat.c +=================================================================== +--- consolekit-0.3.orig/src/ck-seat.c 2008-09-23 20:56:46.000000000 +0200 ++++ consolekit-0.3/src/ck-seat.c 2008-09-23 21:23:47.000000000 +0200 +@@ -61,6 +61,8 @@ + CkSession *active_session; + + CkVtMonitor *vt_monitor; ++ guint vt_park_num; ++ gboolean vt_park_enable; + + DBusGConnection *connection; + }; +@@ -498,9 +500,17 @@ + g_object_ref (session); + ck_session_get_id (session, &ssid, NULL); + ck_session_set_active (session, TRUE, NULL); ++ g_debug ("Active session changed: %s", ssid); ++ } else if (seat->priv->vt_park_enable) { ++ ck_seat_park (seat); ++ g_debug ("Active session: none - parking"); ++ } else { ++ g_debug ("Active session: none and no parking"); + } + +- g_debug ("Active session changed: %s", ssid ? ssid : "(null)"); ++ /* We park only once: enable is set when a session exits ++ * and cleared here when we choose a new session. */ ++ seat->priv->vt_park_enable = FALSE; + + g_signal_emit (seat, signals [ACTIVE_SESSION_CHANGED], 0, ssid); + +@@ -549,6 +559,33 @@ + return TRUE; + } + ++void ++ck_seat_park (CkSeat *seat) ++{ ++ GError *vt_error; ++ guint num; ++ gboolean ret; ++ ++ num = seat->priv->vt_park_num; ++ g_debug ("Parking on VT %u", num); ++ if (num < 0) return; ++ ++ vt_error = NULL; ++ ret = ck_vt_monitor_set_active (seat->priv->vt_monitor, num, &vt_error); ++ if (! ret) { ++ g_debug ("Unable to park: %s", vt_error->message); ++ g_error_free (vt_error); ++ } ++} ++ ++void ++ck_seat_set_park_vt (CkSeat *seat, guint num) ++{ ++ g_debug ("Parking place is VT %u", num); ++ ++ seat->priv->vt_park_num = num; ++} ++ + gboolean + ck_seat_remove_session (CkSeat *seat, + CkSession *session, +@@ -592,6 +629,7 @@ + g_signal_emit (seat, signals [SESSION_REMOVED], 0, ssid); + + /* try to change the active session */ ++ seat->priv->vt_park_enable = TRUE; + maybe_update_active_session (seat); + + if (orig_session != NULL) { +@@ -988,6 +1026,8 @@ + g_str_equal, + g_free, + (GDestroyNotify) g_object_unref); ++ seat->priv->vt_park_num = -1; ++ seat->priv->vt_park_enable = FALSE; + seat->priv->devices = g_ptr_array_new (); + } + +Index: consolekit-0.3/src/ck-seat.h +=================================================================== +--- consolekit-0.3.orig/src/ck-seat.h 2008-09-23 20:56:46.000000000 +0200 ++++ consolekit-0.3/src/ck-seat.h 2008-09-23 21:23:47.000000000 +0200 +@@ -133,6 +133,9 @@ + gboolean ck_seat_activate_session (CkSeat *seat, + const char *ssid, + DBusGMethodInvocation *context); ++void ck_seat_park (CkSeat *seat); ++void ck_seat_set_park_vt (CkSeat *seat, ++ guint num); + + G_END_DECLS + +Index: consolekit-0.3/src/org.freedesktop.ConsoleKit.Manager.xml +=================================================================== +--- consolekit-0.3.orig/src/org.freedesktop.ConsoleKit.Manager.xml 2008-09-23 21:23:55.000000000 +0200 ++++ consolekit-0.3/src/org.freedesktop.ConsoleKit.Manager.xml 2008-09-23 21:24:01.000000000 +0200 +@@ -133,6 +133,12 @@ + + + ++ ++ ++ ++ ++ ++ + + + --- consolekit-0.3.0.orig/debian/patches/04-defer_daemonizing.patch +++ consolekit-0.3.0/debian/patches/04-defer_daemonizing.patch @@ -0,0 +1,30 @@ +Daemonize after registering the dbus name to avoid a race condition +where dbus-daemon thinks that console-kit-daemon has failed to start +properly and returns an error to the caller. (Closes: #507815) + +Index: ConsoleKit-0.2.10/src/main.c +=================================================================== +--- ConsoleKit-0.2.10.orig/src/main.c 2008-12-05 00:59:53.000000000 +0100 ++++ ConsoleKit-0.2.10/src/main.c 2008-12-05 00:59:56.000000000 +0100 +@@ -325,10 +325,6 @@ + goto out; + } + +- if (! no_daemon && daemon (0, 0)) { +- g_error ("Could not daemonize: %s", g_strerror (errno)); +- } +- + setup_debug_log (debug); + + connection = get_system_bus (); +@@ -347,6 +343,10 @@ + goto out; + } + ++ if (! no_daemon && daemon (0, 0)) { ++ g_error ("Could not daemonize: %s", g_strerror (errno)); ++ } ++ + g_debug ("initializing console-kit-daemon %s", VERSION); + + delete_console_tags (); --- consolekit-0.3.0.orig/debian/patches/05-dbus_policy.patch +++ consolekit-0.3.0/debian/patches/05-dbus_policy.patch @@ -0,0 +1,179 @@ +commit e0d9cc359b3099307067107b59ec691418e280b8 +Author: Colin Walters +Date: Sun Jan 18 13:06:37 2009 -0500 + + fix up D-Bus permissions + +Index: consolekit-0.3.0/data/ConsoleKit.conf +=================================================================== +--- consolekit-0.3.0.orig/data/ConsoleKit.conf 2009-03-03 01:48:13.000000000 +0100 ++++ consolekit-0.3.0/data/ConsoleKit.conf 2009-03-03 01:48:28.000000000 +0100 +@@ -8,88 +8,128 @@ + + + +- +- +- ++ + + + + +- +- +- ++ ++ ++ ++ + + +- +- +- +- +- +- +- +- +- +- +- +- + +- +- +- +- +- +- + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ + + --- consolekit-0.3.0.orig/debian/patches/80-gnukfreebsd_support_configure.ac.patch +++ consolekit-0.3.0/debian/patches/80-gnukfreebsd_support_configure.ac.patch @@ -0,0 +1,13 @@ +Index: ConsoleKit-0.3.0/configure.ac +=================================================================== +--- ConsoleKit-0.3.0.orig/configure.ac 2008-07-31 02:35:53.000000000 +0200 ++++ ConsoleKit-0.3.0/configure.ac 2009-03-10 12:06:52.000000000 +0100 +@@ -176,7 +176,7 @@ + CK_BACKEND="" + KVM_LIBS="" + case "$host" in +- *-*-freebsd*) ++ *-*-freebsd* | *-*-kfreebsd*-gnu) + CK_BACKEND="freebsd" + AC_CHECK_LIB(kvm, kvm_openfiles, have_kvm=yes, + AC_MSG_ERROR([Unable to find libkvm which is needed on FreeBSD])) --- consolekit-0.3.0.orig/debian/patches/81-gnukfreebsd_support_pseudo_run_autoconf.patch +++ consolekit-0.3.0/debian/patches/81-gnukfreebsd_support_pseudo_run_autoconf.patch @@ -0,0 +1,13 @@ +Index: ConsoleKit-0.3.0/configure +=================================================================== +--- ConsoleKit-0.3.0.orig/configure 2008-07-31 02:41:02.000000000 +0200 ++++ ConsoleKit-0.3.0/configure 2009-03-10 12:06:52.000000000 +0100 +@@ -24393,7 +24393,7 @@ + CK_BACKEND="" + KVM_LIBS="" + case "$host" in +- *-*-freebsd*) ++ *-*-freebsd* | *-*-kfreebsd*-gnu) + CK_BACKEND="freebsd" + { echo "$as_me:$LINENO: checking for kvm_openfiles in -lkvm" >&5 + echo $ECHO_N "checking for kvm_openfiles in -lkvm... $ECHO_C" >&6; } --- consolekit-0.3.0.orig/debian/patches/11-unref-dbus-proxy.patch +++ consolekit-0.3.0/debian/patches/11-unref-dbus-proxy.patch @@ -0,0 +1,16 @@ +# Unref the dbus proxy when finalizing the session object, so that they are not leaked +# Ubuntu: https://launchpad.net/bugs/284229 +# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=18330 +Index: consolekit-0.3/src/ck-session.c +=================================================================== +--- consolekit-0.3.orig/src/ck-session.c 2008-11-23 16:51:26.000000000 +0000 ++++ consolekit-0.3/src/ck-session.c 2008-11-23 16:51:41.000000000 +0000 +@@ -1100,6 +1100,8 @@ + + session_remove_activity_watch (session); + ++ g_object_unref (session->priv->bus_proxy); ++ + g_free (session->priv->id); + g_free (session->priv->cookie); + g_free (session->priv->seat_id); --- consolekit-0.3.0.orig/debian/patches/05-pam-add-nox11.patch +++ consolekit-0.3.0/debian/patches/05-pam-add-nox11.patch @@ -0,0 +1,54 @@ +# Description: Add "nox11" option to the PAM module, which ignores PAM +# sessions where PAM_TTY is an X11 display. This allows adding +# pam_ck_connector to PAM's "common-session" without interfering +# with the already existing ConsoleKit operations in gdm, the +# Xsession script, etc. +# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=16746 + +Index: consolekit-0.2.10/pam-ck-connector/pam-ck-connector.c +=================================================================== +--- consolekit-0.2.10.orig/pam-ck-connector/pam-ck-connector.c 2008-08-04 18:23:37.000000000 +0200 ++++ consolekit-0.2.10/pam-ck-connector/pam-ck-connector.c 2008-08-04 18:23:49.000000000 +0200 +@@ -63,6 +63,7 @@ + #include "ck-connector.h" + + static int opt_debug = FALSE; ++static int opt_nox11 = FALSE; + + #ifndef HAVE_PAM_SYSLOG + +@@ -145,6 +146,8 @@ + for (i = 0; i < argc && argv[i] != NULL; i++) { + if (strcmp (argv[i] , "debug") == 0) { + opt_debug = TRUE; ++ } else if (strcmp (argv[i] , "nox11") == 0) { ++ opt_nox11 = TRUE; + } else { + ck_pam_syslog (pamh, LOG_ERR, "unknown option: %s", argv[i]); + } +@@ -276,6 +279,10 @@ + x11_display = NULL; + /* interpret any tty with a colon as a DISPLAY */ + if (strchr (display_device, ':') != NULL) { ++ if (opt_nox11) { ++ ck_pam_syslog (pamh, LOG_WARNING, "nox11 mode, ignoring PAM_TTY %s", display_device); ++ goto out; ++ } + x11_display = display_device; + display_device = ""; + } else if (strncmp (_PATH_DEV, display_device, 5) != 0) { +Index: consolekit-0.2.10/pam-ck-connector/pam_ck_connector.8 +=================================================================== +--- consolekit-0.2.10.orig/pam-ck-connector/pam_ck_connector.8 2008-08-04 18:23:44.000000000 +0200 ++++ consolekit-0.2.10/pam-ck-connector/pam_ck_connector.8 2008-08-04 18:23:49.000000000 +0200 +@@ -66,6 +66,10 @@ + .TP 3n + \fBdebug\fR + Print debug information. ++.TP 3n ++\fBnox11\fR ++Do not create a session if PAM specifies an X11 display instead of a ++/dev/tty terminal. + .fi + .RE + .sp --- consolekit-0.3.0.orig/debian/patches/06-xmlto_skip_validation.patch +++ consolekit-0.3.0/debian/patches/06-xmlto_skip_validation.patch @@ -0,0 +1,26 @@ +Index: consolekit-0.3.0/doc/dbus/Makefile.am +=================================================================== +--- consolekit-0.3.0.orig/doc/dbus/Makefile.am 2009-03-03 01:56:14.000000000 +0100 ++++ consolekit-0.3.0/doc/dbus/Makefile.am 2009-03-03 01:56:42.000000000 +0100 +@@ -16,7 +16,7 @@ + htmldoc_DATA = ConsoleKit.html + + ConsoleKit.html : $(SPEC_XML_FILES) +- $(XMLTO) xhtml-nochunks -m $(top_srcdir)/doc/dbus/config.xsl ConsoleKit.xml ++ $(XMLTO) --skip-validation xhtml-nochunks -m $(top_srcdir)/doc/dbus/config.xsl ConsoleKit.xml + + endif # DOCBOOK_DOCS_ENABLED + +Index: consolekit-0.3.0/doc/dbus/Makefile.in +=================================================================== +--- consolekit-0.3.0.orig/doc/dbus/Makefile.in 2009-03-03 01:56:12.000000000 +0100 ++++ consolekit-0.3.0/doc/dbus/Makefile.in 2009-03-03 01:57:03.000000000 +0100 +@@ -427,7 +427,7 @@ + + + @DOCBOOK_DOCS_ENABLED_TRUE@ConsoleKit.html : $(SPEC_XML_FILES) +-@DOCBOOK_DOCS_ENABLED_TRUE@ $(XMLTO) xhtml-nochunks -m $(top_srcdir)/doc/dbus/config.xsl ConsoleKit.xml ++@DOCBOOK_DOCS_ENABLED_TRUE@ $(XMLTO) --skip-validation xhtml-nochunks -m $(top_srcdir)/doc/dbus/config.xsl ConsoleKit.xml + + org.freedesktop.ConsoleKit.Manager.ref.xml : $(top_srcdir)/src/org.freedesktop.ConsoleKit.Manager.xml spec-to-docbook.xsl + $(XSLTPROC) $(top_srcdir)/doc/dbus/spec-to-docbook.xsl $< | tail -n +2 > $@ --- consolekit-0.3.0.orig/debian/patches/03-cleanup_console_tags.patch +++ consolekit-0.3.0/debian/patches/03-cleanup_console_tags.patch @@ -0,0 +1,68 @@ +Cleanup console tag files on application startup and shutdown. + +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 = NULL; ++ const gchar *name; ++ ++ g_debug ("Cleaning up %s", CONSOLE_TAGS_DIR); ++ ++ dir = g_dir_open (CONSOLE_TAGS_DIR, 0, &error); ++ if (dir == NULL) { ++ g_debug ("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 (); --- consolekit-0.3.0.orig/debian/patches/08-fix-double-close.patch +++ consolekit-0.3.0/debian/patches/08-fix-double-close.patch @@ -0,0 +1,31 @@ +# Description: Fix double close of the log file (->file is an fdopen(->priv), which occasionally causes segfaults. +# Ubuntu: https://bugs.launchpad.net/bugs/263245 +# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=17866 +# Upstream: http://gitweb.freedesktop.org/?p=ConsoleKit.git;a=commitdiff;h=a58a4bff451dcf8a6019aed1b2fb276e9836b0f4 +--- a/src/ck-event-logger.c ++++ b/src/ck-event-logger.c +@@ -180,8 +180,10 @@ retry: + static void + reopen_file_stream (CkEventLogger *event_logger) + { +- close (event_logger->priv->fd); +- fclose (event_logger->priv->file); ++ /* fclose will also close the underlying fd */ ++ if (event_logger->priv->file != NULL) { ++ fclose (event_logger->priv->file); ++ } + + /* FIXME: retries */ + open_log_file (event_logger); +@@ -420,8 +422,8 @@ ck_event_logger_finalize (GObject *objec + g_async_queue_unref (event_logger->priv->event_queue); + } + +- if (event_logger->priv->fd != -1) { +- close (event_logger->priv->fd); ++ if (event_logger->priv->file != NULL) { ++ fclose (event_logger->priv->file); + } + + g_free (event_logger->priv->log_filename); +