--- consolekit-0.4.1.orig/debian/libpam-ck-connector.postinst +++ consolekit-0.4.1/debian/libpam-ck-connector.postinst @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +pam-auth-update --package + +#DEBHELPER# --- consolekit-0.4.1.orig/debian/libck-connector0.symbols +++ consolekit-0.4.1/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.4.1.orig/debian/libpam-ck-connector.install +++ consolekit-0.4.1/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.4.1.orig/debian/gbp.conf +++ consolekit-0.4.1/debian/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +pristine-tar = True --- consolekit-0.4.1.orig/debian/consolekit.install +++ consolekit-0.4.1/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/polkit-1/ +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.4.1.orig/debian/copyright +++ consolekit-0.4.1/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-2'. + +=============================================================================== + +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.4.1.orig/debian/control +++ consolekit-0.4.1/debian/control @@ -0,0 +1,74 @@ +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-gobject-1-dev (>= 0.92), + zlib1g-dev +Standards-Version: 3.8.3 +Vcs-Git: git://git.debian.org/git/pkg-utopia/consolekit.git +Vcs-Browser: http://git.debian.org/?p=pkg-utopia/consolekit.git;a=summary +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 +Breaks: udev (<< 147) +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.4.1.orig/debian/pam-foreground-compat.ck +++ consolekit-0.4.1/debian/pam-foreground-compat.ck @@ -0,0 +1,17 @@ +#!/bin/sh +TAGDIR=/var/run/console + +[ -n "$CK_SESSION_USER_UID" ] || exit 1 +[ "$CK_SESSION_IS_LOCAL" = "true" ] || exit 0 + +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.4.1.orig/debian/90consolekit +++ consolekit-0.4.1/debian/90consolekit @@ -0,0 +1,30 @@ +# -*- 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 + +is_on_console() { + session=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \ + --type=method_call --print-reply --reply-timeout=2000 \ + /org/freedesktop/ConsoleKit/Manager \ + org.freedesktop.ConsoleKit.Manager.GetCurrentSession \ + | grep path | awk '{print $3}' | sed s/\"//g) + x11_display=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \ + --type=method_call --print-reply --reply-timeout=2000 \ + $session org.freedesktop.ConsoleKit.Session.GetX11Display \ + | grep string | awk '{print $2}' | sed s/\"//g) + + if [ -z "$x11_display" ] ; then + return 0 + else + return 1 + fi +} + +if [ -x "$CK_LAUNCH_SESSION" ] && \ + ( [ -z "$XDG_SESSION_COOKIE" ] || is_on_console ) ; then + STARTUP="$CK_LAUNCH_SESSION $STARTUP" +fi --- consolekit-0.4.1.orig/debian/libck-connector0.install +++ consolekit-0.4.1/debian/libck-connector0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libck-connector.so.* --- consolekit-0.4.1.orig/debian/libpam-ck-connector.pam-auth-update +++ consolekit-0.4.1/debian/libpam-ck-connector.pam-auth-update @@ -0,0 +1,7 @@ +Name: ConsoleKit Session Management +Default: yes +Priority: 0 +Session-Interactive-Only: yes +Session-Type: Additional +Session-Final: + optional pam_ck_connector.so nox11 --- consolekit-0.4.1.orig/debian/compat +++ consolekit-0.4.1/debian/compat @@ -0,0 +1 @@ +7 --- consolekit-0.4.1.orig/debian/README.source +++ consolekit-0.4.1/debian/README.source @@ -0,0 +1,3 @@ +This package uses the quilt patch management system. + +Please refer to /usr/share/doc/quilt/README.source for further information. --- consolekit-0.4.1.orig/debian/consolekit.docs +++ consolekit-0.4.1/debian/consolekit.docs @@ -0,0 +1 @@ +debian/tmp/usr/share/doc/ConsoleKit/spec/ConsoleKit.html --- consolekit-0.4.1.orig/debian/consolekit.preinst +++ consolekit-0.4.1/debian/consolekit.preinst @@ -0,0 +1,69 @@ +#!/bin/sh + +set -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 + # Ubuntu versions prior to 8.04 LTS introduced this script as + # "90-console-kit", Debian/Ubuntu later settled for + # "90consolekit"; needs to be kept until April 2010 (Ubuntu 10.04 + # LTS release) + 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.4.1.orig/debian/watch +++ consolekit-0.4.1/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-(.*)\.tar\.(?:gz|bz2) --- consolekit-0.4.1.orig/debian/rules +++ consolekit-0.4.1/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.4.1.orig/debian/changelog +++ consolekit-0.4.1/debian/changelog @@ -0,0 +1,306 @@ +consolekit (0.4.1-2ubuntu2) lucid; urgency=low + + * Add kubuntu-05-bus_name.patch patch, Closes LP: #495100 + "KDM requires type you details in twice" + + -- Yann Gilson Tue, 12 Jan 2010 14:54:59 +0100 + +consolekit (0.4.1-2ubuntu1) lucid; urgency=low + + * Sync to Debian git head, no remaining Ubuntu changes. + * Bump Breaks to udev to << 147, since 147-1 is in unstable now. + + -- Martin Pitt Wed, 11 Nov 2009 14:05:55 +0100 + +consolekit (0.4.1-2) unstable; urgency=low + + * Upload to unstable. + + -- Michael Biebl Tue, 10 Nov 2009 00:12:42 +0100 + +consolekit (0.4.1-1) experimental; urgency=low + + * New upstream release. + * The 'session_active_changed' type has been removed for session.d/ + callouts. Tools relying on that need to be ported to the new seat.d/ + infrastructure and use 'seat_active_session_changed' instead. + This breaks older versions of udev-acl, so add a Breaks: udev (<< 147~). + + -- Michael Biebl Thu, 05 Nov 2009 17:38:31 +0100 + +consolekit (0.3.1-2) unstable; urgency=low + + [ Martin Pitt ] + * debian/consolekit.preinst: Remove obsolete 90-console-kit conffile for + upgrades from Ubuntu 8.04. (Can be dropped after 10.04 LTS release.) + + [ Michael Biebl ] + * debian/patches/82-hurd_support.patch + - Add support for GNU/Hurd. (Closes: #552393) + The patch adds a sysdeps-gnu backend, which implements the process + management using Hurd's libps, the *ttyent API for the part of the + console implementation and the rest using similar (valid) approaches of + other backends. + Also, it fixes the PATH_MAX usage in pam-ck-connector/pam-ck-connector.c + by using a variable-length malloc'ed buffer. + Thanks to Pino Toscano for the patch. + * debian/patches/99-autoreconf.patch + - Run autoreconf as 82-hurd_support.patch changes the build system. + * debian/patches/81-gnukfreebsd_support_pseudo_run_autoconf.patch + - Remove, made obsolete by 99-autoreconf.patch. + + -- Michael Biebl Mon, 26 Oct 2009 00:52:52 +0100 + +consolekit (0.3.1-1) unstable; urgency=low + + * New upstream release: + - port to PolicyKit 1.0 + - D-Bus policy updates + - better diagnostic information for unimplemented backends + - file monitoring fixes + - get VT from X display if no controlling tty is available + - add "nox11" option to PAM module + - parse log entries with no body correctly + - fix zero-sized struct/unions + - solaris build fixes + - parse gecos field for real name + - leak fixes + - compile warning fixes + - fix doc xml validation errors + - fix doc generation when srcdir != builddir + - add example upstart events for logging + - fix ChangeLog generation script to work with git-log moved to libexecdir + * debian/control + - Add Build-Depends on libpolkit-gobject-1-dev (>= 0.92). + * debian/consolekit.install + - Install policy definitions for ConsoleKit. + * Drop patches + - 04-consolekit_park.patch (obsolete, not used) + - 05-dbus_policy.patch (merged upstream) + - 05-pam-add-nox11.patch (merged upstream) + - 06-xmlto_skip_validation.patch (fixed upstream, doc is valid xml now) + - 08-fix-double-close.patch (merged upstream) + - 09-directory-handle-leak.patch (merged upstream) + - 10-file_monitor_remove_watch_crash.patch (merged upstream) + - 11-unref-dbus-proxy.patch (merged upstream) + - 12-allow-get-sessions.patch (merged upstream) + * debian/pam-foreground-compat.ck + - Don't create tag files for remote users. (Closes: #547347) + + -- Michael Biebl Fri, 02 Oct 2009 02:58:05 +0200 + +consolekit (0.3.0-4) unstable; urgency=low + + * debian/consolekit.logrotate: Install a logrotate configuration file for + /var/log/ConsoleKit/history so that it doesn't get huge and cause + ck-history to take a long while to run on login. ck-history already + handles reading from rotated logs. (Closes: #537833) + Thanks to James Westby for the patch. + * debian/libpam-ck-connector.pam-auth-update: Mark this module as applying + only to interactive sessions. (Closes: #543306) + Thanks to Steve Langasek for the patch. + * Add README.source which refers to the quilt documentation. + * Bump Standards-Version to 3.8.3. + + -- Michael Biebl Wed, 02 Sep 2009 18:04:01 +0200 + +consolekit (0.3.0-3) unstable; urgency=low + + * debian/control + - Update Vcs-* fields. Package is now managed with Git on git.debian.org. + - Bump Standards-Version to 3.8.2. No further changes. + * debian/copyright + - Misc whitespace cleanups. + - Refer to versioned GPL-2 file. + * debian/consolekit.preinst + - Use "set -e" instead of "#!/bin/sh -e". + * debian/90consolekit + - If an X session is started from the console using startx, make sure to + register a CK session, even if XDG_SESSION_COOKIE is already set. + (Closes: #520720) + + -- Michael Biebl Tue, 14 Jul 2009 20:09:54 +0200 + +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.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.4.1.orig/debian/libpam-ck-connector.prerm +++ consolekit-0.4.1/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.4.1.orig/debian/consolekit.prerm +++ consolekit-0.4.1/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.4.1.orig/debian/README.Debian +++ consolekit-0.4.1/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.4.1.orig/debian/libck-connector-dev.install +++ consolekit-0.4.1/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.4.1.orig/debian/consolekit.logrotate +++ consolekit-0.4.1/debian/consolekit.logrotate @@ -0,0 +1,8 @@ +/var/log/ConsoleKit/history { + monthly + rotate 6 + delaycompress + compress + notifempty + missingok +} --- consolekit-0.4.1.orig/debian/patches/99-autoreconf.patch +++ consolekit-0.4.1/debian/patches/99-autoreconf.patch @@ -0,0 +1,773 @@ +Index: consolekit/aclocal.m4 +=================================================================== +--- consolekit.orig/aclocal.m4 2009-11-04 19:45:33.562022249 +0100 ++++ consolekit/aclocal.m4 2009-11-04 19:44:43.682021633 +0100 +@@ -2933,6 +2933,18 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + ++netbsdelf*-gnu) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' ++ soname_spec='${libname}${release}${shared_ext}$major' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ hardcode_into_libs=yes ++ dynamic_linker='NetBSD ld.elf_so' ++ ;; ++ + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -3524,7 +3536,7 @@ + lt_cv_deplibs_check_method=pass_all + ;; + +-netbsd*) ++netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else +@@ -4205,7 +4217,7 @@ + ;; + esac + ;; +- netbsd*) ++ netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise +@@ -4630,6 +4642,9 @@ + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; ++ linux* | k*bsd*-gnu) ++ _LT_TAGVAR(link_all_deplibs, $1)=no ++ ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; +@@ -4694,6 +4709,9 @@ + openbsd*) + with_gnu_ld=no + ;; ++ linux* | k*bsd*-gnu) ++ _LT_TAGVAR(link_all_deplibs, $1)=no ++ ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes +@@ -4876,7 +4894,7 @@ + fi + ;; + +- netbsd*) ++ netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= +@@ -5051,6 +5069,7 @@ + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi ++ _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then +@@ -5289,7 +5308,7 @@ + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + +- netbsd*) ++ netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else +@@ -8466,14 +8485,16 @@ + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) + # --------------------------------------------- + m4_define([_PKG_CONFIG], +-[if test -n "$$1"; then +- pkg_cv_[]$1="$$1" +- elif test -n "$PKG_CONFIG"; then +- PKG_CHECK_EXISTS([$3], +- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], +- [pkg_failed=yes]) +- else +- pkg_failed=untried ++[if test -n "$PKG_CONFIG"; then ++ if test -n "$$1"; then ++ pkg_cv_[]$1="$$1" ++ else ++ PKG_CHECK_EXISTS([$3], ++ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], ++ [pkg_failed=yes]) ++ fi ++else ++ pkg_failed=untried + fi[]dnl + ])# _PKG_CONFIG + +@@ -8517,9 +8538,9 @@ + if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then +- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + else +- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD +Index: consolekit/configure +=================================================================== +--- consolekit.orig/configure 2009-11-04 19:45:33.214032944 +0100 ++++ consolekit/configure 2009-11-04 19:44:55.010015927 +0100 +@@ -805,6 +805,8 @@ + HAVE_PAM_FALSE + HAVE_PAM_TRUE + CK_BACKEND ++CK_COMPILE_GNU_FALSE ++CK_COMPILE_GNU_TRUE + CK_COMPILE_SOLARIS_FALSE + CK_COMPILE_SOLARIS_TRUE + CK_COMPILE_FREEBSD_FALSE +@@ -6277,13 +6279,13 @@ + else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext +- (eval echo "\"\$as_me:6280: $ac_compile\"" >&5) ++ (eval echo "\"\$as_me:6282: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 +- (eval echo "\"\$as_me:6283: $NM \\\"conftest.$ac_objext\\\"\"" >&5) ++ (eval echo "\"\$as_me:6285: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 +- (eval echo "\"\$as_me:6286: output\"" >&5) ++ (eval echo "\"\$as_me:6288: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" +@@ -6753,7 +6755,7 @@ + lt_cv_deplibs_check_method=pass_all + ;; + +-netbsd*) ++netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else +@@ -7488,7 +7490,7 @@ + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 7491 "configure"' > conftest.$ac_ext ++ echo '#line 7493 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -8823,11 +8825,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:8826: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:8828: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:8830: \$? = $ac_status" >&5 ++ echo "$as_me:8832: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -9162,11 +9164,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:9165: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:9167: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:9169: \$? = $ac_status" >&5 ++ echo "$as_me:9171: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -9267,11 +9269,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:9270: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:9272: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:9274: \$? = $ac_status" >&5 ++ echo "$as_me:9276: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -9322,11 +9324,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:9325: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:9327: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:9329: \$? = $ac_status" >&5 ++ echo "$as_me:9331: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -9441,6 +9443,9 @@ + openbsd*) + with_gnu_ld=no + ;; ++ linux* | k*bsd*-gnu) ++ link_all_deplibs=no ++ ;; + esac + + ld_shlibs=yes +@@ -9623,7 +9628,7 @@ + fi + ;; + +- netbsd*) ++ netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= +@@ -9798,6 +9803,7 @@ + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi ++ link_all_deplibs=no + else + # not using gcc + if test "$host_cpu" = ia64; then +@@ -10212,7 +10218,7 @@ + link_all_deplibs=yes + ;; + +- netbsd*) ++ netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else +@@ -11189,6 +11195,18 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + ++netbsdelf*-gnu) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' ++ soname_spec='${libname}${release}${shared_ext}$major' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ hardcode_into_libs=yes ++ dynamic_linker='NetBSD ld.elf_so' ++ ;; ++ + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -12122,7 +12140,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12125 "configure" ++#line 12143 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12218,7 +12236,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12221 "configure" ++#line 12239 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -15109,10 +15127,11 @@ + { $as_echo "$as_me:$LINENO: checking for CONSOLE_KIT" >&5 + $as_echo_n "checking for CONSOLE_KIT... " >&6; } + +-if test -n "$CONSOLE_KIT_CFLAGS"; then +- pkg_cv_CONSOLE_KIT_CFLAGS="$CONSOLE_KIT_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$CONSOLE_KIT_CFLAGS"; then ++ pkg_cv_CONSOLE_KIT_CFLAGS="$CONSOLE_KIT_CFLAGS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= \$DBUS_REQUIRED_VERSION + gobject-2.0 >= \$GLIB_REQUIRED_VERSION + gthread-2.0 >= \$GLIB_REQUIRED_VERSION +@@ -15131,13 +15150,15 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi +-if test -n "$CONSOLE_KIT_LIBS"; then +- pkg_cv_CONSOLE_KIT_LIBS="$CONSOLE_KIT_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$CONSOLE_KIT_LIBS"; then ++ pkg_cv_CONSOLE_KIT_LIBS="$CONSOLE_KIT_LIBS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= \$DBUS_REQUIRED_VERSION + gobject-2.0 >= \$GLIB_REQUIRED_VERSION + gthread-2.0 >= \$GLIB_REQUIRED_VERSION +@@ -15156,8 +15177,9 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi + + +@@ -15170,15 +15192,15 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION ++ CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION + gobject-2.0 >= $GLIB_REQUIRED_VERSION + gthread-2.0 >= $GLIB_REQUIRED_VERSION +-" 2>&1` ++"` + else +- CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION ++ CONSOLE_KIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= $DBUS_REQUIRED_VERSION + gobject-2.0 >= $GLIB_REQUIRED_VERSION + gthread-2.0 >= $GLIB_REQUIRED_VERSION +-" 2>&1` ++"` + fi + # Put the nasty error message in config.log where it belongs + echo "$CONSOLE_KIT_PKG_ERRORS" >&5 +@@ -15249,10 +15271,11 @@ + { $as_echo "$as_me:$LINENO: checking for POLKIT" >&5 + $as_echo_n "checking for POLKIT... " >&6; } + +-if test -n "$POLKIT_CFLAGS"; then +- pkg_cv_POLKIT_CFLAGS="$POLKIT_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$POLKIT_CFLAGS"; then ++ pkg_cv_POLKIT_CFLAGS="$POLKIT_CFLAGS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\"") >&5 + ($PKG_CONFIG --exists --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5 + ac_status=$? +@@ -15262,13 +15285,15 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi +-if test -n "$POLKIT_LIBS"; then +- pkg_cv_POLKIT_LIBS="$POLKIT_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$POLKIT_LIBS"; then ++ pkg_cv_POLKIT_LIBS="$POLKIT_LIBS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\"") >&5 + ($PKG_CONFIG --exists --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5 + ac_status=$? +@@ -15278,8 +15303,9 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi + + +@@ -15292,9 +15318,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- POLKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1` ++ POLKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION"` + else +- POLKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1` ++ POLKIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION"` + fi + # Put the nasty error message in config.log where it belongs + echo "$POLKIT_PKG_ERRORS" >&5 +@@ -15333,10 +15359,11 @@ + { $as_echo "$as_me:$LINENO: checking for LIBDBUS" >&5 + $as_echo_n "checking for LIBDBUS... " >&6; } + +-if test -n "$LIBDBUS_CFLAGS"; then +- pkg_cv_LIBDBUS_CFLAGS="$LIBDBUS_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$LIBDBUS_CFLAGS"; then ++ pkg_cv_LIBDBUS_CFLAGS="$LIBDBUS_CFLAGS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= \$DBUS_REQUIRED_VERSION + \"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION +@@ -15349,13 +15376,15 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi +-if test -n "$LIBDBUS_LIBS"; then +- pkg_cv_LIBDBUS_LIBS="$LIBDBUS_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$LIBDBUS_LIBS"; then ++ pkg_cv_LIBDBUS_LIBS="$LIBDBUS_LIBS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= \$DBUS_REQUIRED_VERSION + \"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION +@@ -15368,8 +15397,9 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi + + +@@ -15382,11 +15412,11 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- LIBDBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION +-" 2>&1` ++ LIBDBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION ++"` + else +- LIBDBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION +-" 2>&1` ++ LIBDBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= $DBUS_REQUIRED_VERSION ++"` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBDBUS_PKG_ERRORS" >&5 +@@ -15452,10 +15482,11 @@ + { $as_echo "$as_me:$LINENO: checking for TOOLS" >&5 + $as_echo_n "checking for TOOLS... " >&6; } + +-if test -n "$TOOLS_CFLAGS"; then +- pkg_cv_TOOLS_CFLAGS="$TOOLS_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$TOOLS_CFLAGS"; then ++ pkg_cv_TOOLS_CFLAGS="$TOOLS_CFLAGS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= \$X11_REQUIRED_VERSION + glib-2.0 >= \$GLIB_REQUIRED_VERSION + \"") >&5 +@@ -15471,13 +15502,15 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi +-if test -n "$TOOLS_LIBS"; then +- pkg_cv_TOOLS_LIBS="$TOOLS_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$TOOLS_LIBS"; then ++ pkg_cv_TOOLS_LIBS="$TOOLS_LIBS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= \$X11_REQUIRED_VERSION + glib-2.0 >= \$GLIB_REQUIRED_VERSION + \"") >&5 +@@ -15493,8 +15526,9 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi + + +@@ -15507,13 +15541,13 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- TOOLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 >= $X11_REQUIRED_VERSION ++ TOOLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 >= $X11_REQUIRED_VERSION + glib-2.0 >= $GLIB_REQUIRED_VERSION +-" 2>&1` ++"` + else +- TOOLS_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 >= $X11_REQUIRED_VERSION ++ TOOLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 >= $X11_REQUIRED_VERSION + glib-2.0 >= $GLIB_REQUIRED_VERSION +-" 2>&1` ++"` + fi + # Put the nasty error message in config.log where it belongs + echo "$TOOLS_PKG_ERRORS" >&5 +@@ -15582,10 +15616,11 @@ + { $as_echo "$as_me:$LINENO: checking for HISTORY" >&5 + $as_echo_n "checking for HISTORY... " >&6; } + +-if test -n "$HISTORY_CFLAGS"; then +- pkg_cv_HISTORY_CFLAGS="$HISTORY_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$HISTORY_CFLAGS"; then ++ pkg_cv_HISTORY_CFLAGS="$HISTORY_CFLAGS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION + \"") >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION +@@ -15598,13 +15633,15 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi +-if test -n "$HISTORY_LIBS"; then +- pkg_cv_HISTORY_LIBS="$HISTORY_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PKG_CONFIG"; then ++ if test -n "$HISTORY_LIBS"; then ++ pkg_cv_HISTORY_LIBS="$HISTORY_LIBS" ++ else ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION + \"") >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION +@@ -15617,8 +15654,9 @@ + else + pkg_failed=yes + fi +- else +- pkg_failed=untried ++ fi ++else ++ pkg_failed=untried + fi + + +@@ -15631,11 +15669,11 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- HISTORY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION +-" 2>&1` ++ HISTORY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION ++"` + else +- HISTORY_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION +-" 2>&1` ++ HISTORY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION ++"` + fi + # Put the nasty error message in config.log where it belongs + echo "$HISTORY_PKG_ERRORS" >&5 +@@ -16237,7 +16275,7 @@ + CK_BACKEND="" + KVM_LIBS="" + case "$host" in +- *-*-freebsd*) ++ *-*-freebsd* | *-*-kfreebsd*-gnu) + CK_BACKEND="freebsd" + { $as_echo "$as_me:$LINENO: checking for kvm_openfiles in -lkvm" >&5 + $as_echo_n "checking for kvm_openfiles in -lkvm... " >&6; } +@@ -16322,6 +16360,9 @@ + *-*-solaris*) + CK_BACKEND="solaris" + ;; ++ *-*-gnu*) ++ CK_BACKEND="gnu" ++ ;; + *) + { { $as_echo "$as_me:$LINENO: error: No sysdeps back-end implemented for host $host" >&5 + $as_echo "$as_me: error: No sysdeps back-end implemented for host $host" >&2;} +@@ -16355,6 +16396,14 @@ + CK_COMPILE_SOLARIS_FALSE= + fi + ++ if test x$CK_BACKEND = xgnu; then ++ CK_COMPILE_GNU_TRUE= ++ CK_COMPILE_GNU_FALSE='#' ++else ++ CK_COMPILE_GNU_TRUE='#' ++ CK_COMPILE_GNU_FALSE= ++fi ++ + + + +@@ -17388,6 +17437,13 @@ + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi ++if test -z "${CK_COMPILE_GNU_TRUE}" && test -z "${CK_COMPILE_GNU_FALSE}"; then ++ { { $as_echo "$as_me:$LINENO: error: conditional \"CK_COMPILE_GNU\" was never defined. ++Usually this means the macro was only invoked conditionally." >&5 ++$as_echo "$as_me: error: conditional \"CK_COMPILE_GNU\" was never defined. ++Usually this means the macro was only invoked conditionally." >&2;} ++ { (exit 1); exit 1; }; } ++fi + if test -z "${HAVE_PAM_TRUE}" && test -z "${HAVE_PAM_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PAM\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +Index: consolekit/src/Makefile.in +=================================================================== +--- consolekit.orig/src/Makefile.in 2009-11-04 19:45:33.418020671 +0100 ++++ consolekit/src/Makefile.in 2009-11-04 19:44:57.430016634 +0100 +@@ -46,6 +46,10 @@ + @CK_COMPILE_FREEBSD_TRUE@ ck-sysdeps-freebsd.c \ + @CK_COMPILE_FREEBSD_TRUE@ $(NULL) + ++@CK_COMPILE_GNU_TRUE@am__append_4 = \ ++@CK_COMPILE_GNU_TRUE@ ck-sysdeps-gnu.c \ ++@CK_COMPILE_GNU_TRUE@ $(NULL) ++ + sbin_PROGRAMS = console-kit-daemon$(EXEEXT) $(am__EXEEXT_1) + noinst_PROGRAMS = test-event-logger$(EXEEXT) \ + test-tty-idle-monitor$(EXEEXT) test-vt-monitor$(EXEEXT) \ +@@ -69,15 +73,19 @@ + @CK_COMPILE_FREEBSD_TRUE@libck_la_DEPENDENCIES = \ + @CK_COMPILE_FREEBSD_TRUE@ $(am__DEPENDENCIES_1) + am__libck_la_SOURCES_DIST = ck-sysdeps.h ck-sysdeps-unix.c \ +- ck-sysdeps-linux.c ck-sysdeps-solaris.c ck-sysdeps-freebsd.c ++ ck-sysdeps-linux.c ck-sysdeps-solaris.c ck-sysdeps-freebsd.c \ ++ ck-sysdeps-gnu.c + @CK_COMPILE_LINUX_TRUE@am__objects_2 = ck-sysdeps-linux.lo \ + @CK_COMPILE_LINUX_TRUE@ $(am__objects_1) + @CK_COMPILE_SOLARIS_TRUE@am__objects_3 = ck-sysdeps-solaris.lo \ + @CK_COMPILE_SOLARIS_TRUE@ $(am__objects_1) + @CK_COMPILE_FREEBSD_TRUE@am__objects_4 = ck-sysdeps-freebsd.lo \ + @CK_COMPILE_FREEBSD_TRUE@ $(am__objects_1) ++@CK_COMPILE_GNU_TRUE@am__objects_5 = ck-sysdeps-gnu.lo \ ++@CK_COMPILE_GNU_TRUE@ $(am__objects_1) + am_libck_la_OBJECTS = ck-sysdeps-unix.lo $(am__objects_1) \ +- $(am__objects_2) $(am__objects_3) $(am__objects_4) ++ $(am__objects_2) $(am__objects_3) $(am__objects_4) \ ++ $(am__objects_5) + libck_la_OBJECTS = $(am_libck_la_OBJECTS) + am__EXEEXT_1 = + am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(dbusifdir)" +@@ -92,16 +100,16 @@ + ck-manager-glue.h ck-seat-glue.h ck-session-glue.h \ + ck-marshal.c ck-marshal.h ck-file-monitor-dummy.c \ + ck-file-monitor-inotify.c +-am__objects_5 = ck-marshal.$(OBJEXT) $(am__objects_1) +-@ENABLE_INOTIFY_FALSE@am__objects_6 = ck-file-monitor-dummy.$(OBJEXT) +-@ENABLE_INOTIFY_TRUE@am__objects_6 = \ ++am__objects_6 = ck-marshal.$(OBJEXT) $(am__objects_1) ++@ENABLE_INOTIFY_FALSE@am__objects_7 = ck-file-monitor-dummy.$(OBJEXT) ++@ENABLE_INOTIFY_TRUE@am__objects_7 = \ + @ENABLE_INOTIFY_TRUE@ ck-file-monitor-inotify.$(OBJEXT) + am_console_kit_daemon_OBJECTS = main.$(OBJEXT) ck-manager.$(OBJEXT) \ + ck-vt-monitor.$(OBJEXT) ck-tty-idle-monitor.$(OBJEXT) \ + ck-job.$(OBJEXT) ck-seat.$(OBJEXT) ck-session-leader.$(OBJEXT) \ + ck-session.$(OBJEXT) ck-log.$(OBJEXT) \ + ck-run-programs.$(OBJEXT) ck-event-logger.$(OBJEXT) \ +- $(am__objects_5) $(am__objects_1) $(am__objects_6) ++ $(am__objects_6) $(am__objects_1) $(am__objects_7) + console_kit_daemon_OBJECTS = $(am_console_kit_daemon_OBJECTS) + console_kit_daemon_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) libck.la \ +@@ -117,7 +125,7 @@ + ck-file-monitor-dummy.c ck-file-monitor-inotify.c \ + test-tty-idle-monitor.c + am_test_tty_idle_monitor_OBJECTS = ck-tty-idle-monitor.$(OBJEXT) \ +- $(am__objects_6) test-tty-idle-monitor.$(OBJEXT) \ ++ $(am__objects_7) test-tty-idle-monitor.$(OBJEXT) \ + $(am__objects_1) + test_tty_idle_monitor_OBJECTS = $(am_test_tty_idle_monitor_OBJECTS) + test_tty_idle_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@@ -363,12 +371,15 @@ + $(NULL) + + libck_la_SOURCES = ck-sysdeps.h ck-sysdeps-unix.c $(NULL) \ +- $(am__append_1) $(am__append_2) $(am__append_3) ++ $(am__append_1) $(am__append_2) $(am__append_3) \ ++ $(am__append_4) + @CK_COMPILE_FREEBSD_TRUE@libck_la_LIBADD = $(KVM_LIBS) ++@CK_COMPILE_GNU_TRUE@libck_la_LIBADD = -lps + EXTRA_libck_la_SOURCES = \ + ck-sysdeps-linux.c \ + ck-sysdeps-solaris.c \ + ck-sysdeps-freebsd.c \ ++ ck-sysdeps-gnu.c \ + $(NULL) + + BUILT_SOURCES = \ +@@ -574,6 +585,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-session-leader.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-session.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-freebsd.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-gnu.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-linux.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-solaris.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-sysdeps-unix.Plo@am__quote@ --- consolekit-0.4.1.orig/debian/patches/04-defer_daemonizing.patch +++ consolekit-0.4.1/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.4.1.orig/debian/patches/kubuntu-05-bus_name.patch +++ consolekit-0.4.1/debian/patches/kubuntu-05-bus_name.patch @@ -0,0 +1,46 @@ +https://bugs.freedesktop.org/show_bug.cgi?id=25744 + +Index: ConsoleKit-0.4.1/src/main.c +=================================================================== +--- ConsoleKit-0.4.1.orig/src/main.c 2010-01-12 14:32:32.847945847 +0100 ++++ ConsoleKit-0.4.1/src/main.c 2010-01-12 14:38:58.374946416 +0100 +@@ -327,11 +327,19 @@ + + setup_debug_log (debug); + ++ g_debug ("initializing console-kit-daemon %s", VERSION); ++ + connection = get_system_bus (); + if (connection == NULL) { + goto out; + } + ++ manager = ck_manager_new (); ++ ++ if (manager == NULL) { ++ goto out; ++ } ++ + bus_proxy = get_bus_proxy (connection); + if (bus_proxy == NULL) { + g_warning ("Could not construct bus_proxy object; bailing out"); +@@ -347,18 +355,10 @@ + g_error ("Could not daemonize: %s", g_strerror (errno)); + } + +- g_debug ("initializing console-kit-daemon %s", VERSION); +- +- delete_console_tags (); ++ delete_console_tags (); + + create_pid_file (); + +- manager = ck_manager_new (); +- +- if (manager == NULL) { +- goto out; +- } +- + loop = g_main_loop_new (NULL, FALSE); + + g_signal_connect (bus_proxy, --- consolekit-0.4.1.orig/debian/patches/80-gnukfreebsd_support_configure.ac.patch +++ consolekit-0.4.1/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.4.1.orig/debian/patches/series +++ consolekit-0.4.1/debian/patches/series @@ -0,0 +1,6 @@ +03-cleanup_console_tags.patch +04-defer_daemonizing.patch +kubuntu-05-bus_name.patch +80-gnukfreebsd_support_configure.ac.patch +82-hurd_support.patch +99-autoreconf.patch --- consolekit-0.4.1.orig/debian/patches/03-cleanup_console_tags.patch +++ consolekit-0.4.1/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.4.1.orig/debian/patches/82-hurd_support.patch +++ consolekit-0.4.1/debian/patches/82-hurd_support.patch @@ -0,0 +1,492 @@ +Description: Add support for GNU/Hurd + currently consolekit fails to build on GNU/Hurd mainly because there's no + sysdeps backend for the GNU OS implemented. Also there is an unconditional + PATH_MAX usage. + The attached patch proposes a sysdeps-gnu backend, which implements the process + management using Hurd's libps, the *ttyent API for the part of the console + implementation and the rest using similar (valid) approaches of other backends. + Also, it fixes the PATH_MAX usage in pam-ck-connector/pam-ck-connector.c by + using a variable-length malloc'ed buffer. +Author: Pino Toscano +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552393 +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24738 + +--- consolekit-0.3.1.orig/configure.ac ++++ consolekit-0.3.1/configure.ac +@@ -190,6 +190,9 @@ + *-*-solaris*) + CK_BACKEND="solaris" + ;; ++ *-*-gnu*) ++ CK_BACKEND="gnu" ++ ;; + *) + AC_MSG_ERROR([No sysdeps back-end implemented for host $host]) + ;; +@@ -200,6 +203,7 @@ + AM_CONDITIONAL(CK_COMPILE_LINUX, test x$CK_BACKEND = xlinux, [Compiling for Linux]) + AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for FreeBSD]) + AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris]) ++AM_CONDITIONAL(CK_COMPILE_GNU, test x$CK_BACKEND = xgnu, [Compiling for GNU]) + AC_SUBST(CK_BACKEND) + + dnl --------------------------------------------------------------------------- +--- consolekit-0.3.1.orig/src/Makefile.am ++++ consolekit-0.3.1/src/Makefile.am +@@ -56,11 +56,18 @@ + $(NULL) + libck_la_LIBADD = $(KVM_LIBS) + endif ++if CK_COMPILE_GNU ++libck_la_SOURCES += \ ++ ck-sysdeps-gnu.c \ ++ $(NULL) ++libck_la_LIBADD = -lps ++endif + + EXTRA_libck_la_SOURCES = \ + ck-sysdeps-linux.c \ + ck-sysdeps-solaris.c \ + ck-sysdeps-freebsd.c \ ++ ck-sysdeps-gnu.c \ + $(NULL) + + sbin_PROGRAMS = \ +--- /dev/null ++++ consolekit-0.3.1/src/ck-sysdeps-gnu.c +@@ -0,0 +1,396 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2009 Pino Toscano ++ * ++ * This program 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 program 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 program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#include "config.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#ifdef HAVE_PATHS_H ++#include ++#endif /* HAVE_PATHS_H */ ++ ++#include "ck-sysdeps.h" ++ ++struct _CkProcessStat ++{ ++ struct proc_stat *ps; /* the statistics of a process */ ++}; ++ ++static struct ps_context *pc = NULL; ++ ++static gboolean ++get_proc_stat_from_pid (pid_t pid, ++ ps_flags_t flags, ++ struct proc_stat **res_ps) ++{ ++ error_t err; ++ struct proc_stat *ps; ++ ++ g_assert (pid >= 0); ++ g_assert (res_ps != NULL); ++ ++ if (pc == NULL) { ++ err = ps_context_create (getproc (), &pc); ++ if (err) { ++ return FALSE; ++ } ++ } ++ ++ err = _proc_stat_create (pid, pc, &ps); ++ if (err) { ++ return FALSE; ++ } ++ ++ err = proc_stat_set_flags (ps, PSTAT_PID | flags); ++ if (err) { ++ return FALSE; ++ } ++ ++ *res_ps = ps; ++ return TRUE; ++} ++ ++ ++pid_t ++ck_process_stat_get_ppid (CkProcessStat *stat) ++{ ++ g_return_val_if_fail (stat != NULL, -1); ++ ++ return proc_stat_pid (stat->ps); ++} ++ ++char * ++ck_process_stat_get_cmd (CkProcessStat *stat) ++{ ++ g_return_val_if_fail (stat != NULL, NULL); ++ ++ return g_strdup (proc_stat_args (stat->ps)); ++} ++ ++char * ++ck_process_stat_get_tty (CkProcessStat *stat) ++{ ++ struct ps_tty *tty; ++ ++ g_return_val_if_fail (stat != NULL, NULL); ++ ++ tty = proc_stat_tty (stat->ps); ++ ++ return tty ? g_strdup (ps_tty_name (tty)) : NULL; ++} ++ ++gboolean ++ck_process_stat_new_for_unix_pid (pid_t pid, ++ CkProcessStat **stat, ++ GError **error) ++{ ++ gboolean res; ++ struct proc_stat *ps; ++ CkProcessStat *proc; ++ ++ g_return_val_if_fail (pid > 1, FALSE); ++ ++ if (stat == NULL) { ++ return FALSE; ++ } ++ ++ *stat = NULL; ++ ++ res = get_proc_stat_from_pid (pid, PSTAT_ARGS | PSTAT_TTY, &ps); ++ if (!res) { ++ return FALSE; ++ } ++ ++ proc = g_new0 (CkProcessStat, 1); ++ proc->ps = ps; ++ *stat = proc; ++ ++ return TRUE; ++} ++ ++void ++ck_process_stat_free (CkProcessStat *stat) ++{ ++ _proc_stat_free (stat->ps); ++ ++ g_free (stat); ++} ++ ++GHashTable * ++ck_unix_pid_get_env_hash (pid_t pid) ++{ ++ struct proc_stat *ps; ++ char *env_p; ++ size_t env_index; ++ size_t env_l; ++ gboolean res; ++ GHashTable *hash; ++ ++ g_return_val_if_fail (pid > 1, NULL); ++ ++ res = get_proc_stat_from_pid (pid, PSTAT_ENV, &ps); ++ if (!res) { ++ return NULL; ++ } ++ ++ hash = g_hash_table_new_full (g_str_hash, ++ g_str_equal, ++ g_free, ++ g_free); ++ ++ env_index = 0; ++ env_l = 0; ++ env_p = proc_stat_env (ps); ++ while (env_index < proc_stat_env_len (ps)) { ++ env_l = strlen (env_p); ++ env_index += env_l + 1; ++ if (env_l) { ++ char **vals; ++ vals = g_strsplit (env_p, "=", 2); ++ if (vals != NULL) { ++ g_hash_table_insert (hash, ++ g_strdup (vals[0]), ++ g_strdup (vals[1])); ++ g_strfreev (vals); ++ } ++ } ++ env_p = env_p + env_l + 1; ++ } ++ ++ _proc_stat_free (ps); ++ ++ return hash; ++} ++ ++char * ++ck_unix_pid_get_env (pid_t pid, ++ const char *var) ++{ ++ struct proc_stat *ps; ++ char *env_p; ++ size_t env_index; ++ size_t env_l; ++ char *prefix; ++ int prefix_len; ++ char *val; ++ gboolean res; ++ ++ g_return_val_if_fail (pid > 1, NULL); ++ ++ val = NULL; ++ ++ res = get_proc_stat_from_pid (pid, PSTAT_ENV, &ps); ++ if (!res) { ++ return NULL; ++ } ++ ++ prefix = g_strdup_printf ("%s=", var); ++ prefix_len = strlen (prefix); ++ ++ env_index = 0; ++ env_l = 0; ++ env_p = proc_stat_env (ps); ++ while (env_index < proc_stat_env_len (ps)) { ++ env_l = strlen (env_p); ++ env_index += env_l + 1; ++ if (env_l && g_str_has_prefix (env_p, prefix)) { ++ val = g_strdup (env_p + prefix_len); ++ break; ++ } ++ env_p = env_p + env_l + 1; ++ } ++ ++ g_free (prefix); ++ ++ _proc_stat_free (ps); ++ ++ return val; ++} ++ ++uid_t ++ck_unix_pid_get_uid (pid_t pid) ++{ ++ struct proc_stat *ps; ++ gboolean res; ++ uid_t uid; ++ ++ g_return_val_if_fail (pid > 1, 0); ++ ++ res = get_proc_stat_from_pid (pid, PSTAT_OWNER_UID, &ps); ++ if (!res) { ++ return 0; ++ } ++ ++ uid = proc_stat_owner_uid (ps); ++ ++ _proc_stat_free (ps); ++ ++ return uid; ++} ++ ++pid_t ++ck_unix_pid_get_ppid (pid_t pid) ++{ ++ struct proc_stat *ps; ++ gboolean res; ++ pid_t ppid; ++ ++ g_return_val_if_fail (pid > 1, 0); ++ ++ res = get_proc_stat_from_pid (pid, PSTAT_PROC_INFO, &ps); ++ if (!res) { ++ return 0; ++ } ++ ++ ppid = proc_stat_proc_info (ps)->ppid; ++ ++ _proc_stat_free (ps); ++ ++ return ppid; ++} ++ ++gboolean ++ck_unix_pid_get_login_session_id (pid_t pid, ++ char **idp) ++{ ++ g_return_val_if_fail (pid > 1, FALSE); ++ ++ return FALSE; ++} ++ ++gboolean ++ck_get_max_num_consoles (guint *num) ++{ ++ int max_consoles; ++ int res; ++ gboolean ret; ++ struct ttyent *t; ++ ++ ret = FALSE; ++ max_consoles = 0; ++ ++ res = setttyent (); ++ if (res == 0) { ++ goto done; ++ } ++ ++ while ((t = getttyent ()) != NULL) { ++ if (t->ty_status & TTY_ON && strncmp (t->ty_name, "tty", 3) == 0) ++ max_consoles++; ++ } ++ ++ /* Increment one more so that all consoles are properly counted ++ * this is arguable a bug in vt_add_watches(). ++ */ ++ max_consoles++; ++ ++ ret = TRUE; ++ ++ endttyent (); ++ ++done: ++ if (num != NULL) { ++ *num = max_consoles; ++ } ++ ++ return ret; ++} ++ ++char * ++ck_get_console_device_for_num (guint num) ++{ ++ char *device; ++ ++ device = g_strdup_printf (_PATH_TTY "%u", num); ++ ++ return device; ++} ++ ++gboolean ++ck_get_console_num_from_device (const char *device, ++ guint *num) ++{ ++ guint n; ++ gboolean ret; ++ ++ n = 0; ++ ret = FALSE; ++ ++ if (device == NULL) { ++ return FALSE; ++ } ++ ++ if (sscanf (device, _PATH_TTY "%u", &n) == 1) { ++ ret = TRUE; ++ } ++ ++ if (num != NULL) { ++ *num = n; ++ } ++ ++ return ret; ++} ++ ++gboolean ++ck_get_active_console_num (int console_fd, ++ guint *num) ++{ ++ gboolean ret; ++ int res; ++ long cur_active; ++ char buf[30]; ++ guint active; ++ ++ g_assert (console_fd != -1); ++ ++ active = 0; ++ ret = FALSE; ++ ++ res = readlink ("/dev/cons/vcs", buf, sizeof (buf)); ++ if (res > 0) { ++ /* the resolved path is like "/dev/vcs/$number", so skip ++ the non-number part at the start */ ++ const char *p = buf; ++ while ((*p) && ((*p < '0') || (*p > '9'))) { ++ ++p; ++ } ++ if (*p) { ++ cur_active = strtol (p, NULL, 10); ++ g_debug ("Current VT: tty%ld", cur_active); ++ active = cur_active; ++ ret = TRUE; ++ } ++ } ++ ++ if (num != NULL) { ++ *num = active; ++ } ++ ++ return ret; ++} +--- consolekit-0.3.1.orig/pam-ck-connector/pam-ck-connector.c ++++ consolekit-0.3.1/pam-ck-connector/pam-ck-connector.c +@@ -244,7 +244,7 @@ + const char *s; + uid_t uid; + char buf[256]; +- char ttybuf[PATH_MAX]; ++ char *ttybuf; + DBusError error; + dbus_bool_t is_local; + +@@ -252,6 +252,8 @@ + + is_local = TRUE; + ++ ttybuf = NULL; ++ + _parse_pam_args (pamh, flags, argc, argv); + + /* Register with ConsoleKit as part of the session management */ +@@ -295,7 +297,9 @@ + x11_display = display_device; + display_device = ""; + } else if (strncmp (_PATH_DEV, display_device, 5) != 0) { +- snprintf (ttybuf, sizeof (ttybuf), _PATH_DEV "%s", display_device); ++ int len = strlen (_PATH_DEV) + strlen (display_device) + 1; ++ ttybuf = malloc (len); ++ snprintf (ttybuf, len, _PATH_DEV "%s", display_device); + display_device = ttybuf; + } + +@@ -411,6 +415,7 @@ + ret = PAM_SUCCESS; + + out: ++ free (ttybuf); + return ret; + } +