summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-auth/consolekit/ChangeLog9
-rw-r--r--sys-auth/consolekit/consolekit-0.4.2-r1.ebuild87
-rw-r--r--sys-auth/consolekit/consolekit-0.4.2-r3.ebuild (renamed from sys-auth/consolekit/consolekit-0.4.2-r2.ebuild)8
-rw-r--r--sys-auth/consolekit/files/90-consolekit-232
-rw-r--r--sys-auth/consolekit/files/consolekit-0.4.2-revert.patch212
5 files changed, 44 insertions, 304 deletions
diff --git a/sys-auth/consolekit/ChangeLog b/sys-auth/consolekit/ChangeLog
index 72ccf2093e00..178d6ddf24b8 100644
--- a/sys-auth/consolekit/ChangeLog
+++ b/sys-auth/consolekit/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-auth/consolekit
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/ChangeLog,v 1.77 2010/10/21 13:02:30 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/ChangeLog,v 1.78 2010/10/21 13:37:46 ssuominen Exp $
+
+*consolekit-0.4.2-r3 (21 Oct 2010)
+
+ 21 Oct 2010; Samuli Suominen <ssuominen@gentoo.org>
+ +consolekit-0.4.2-r3.ebuild, +files/90-consolekit-2:
+ Update /etc/X11/xinit/xinitrc.d/90-consolekit from Debian. Remove
+ -revert.patch and block broken sys-apps/shadow instead wrt #336634.
*consolekit-0.4.2-r2 (21 Oct 2010)
diff --git a/sys-auth/consolekit/consolekit-0.4.2-r1.ebuild b/sys-auth/consolekit/consolekit-0.4.2-r1.ebuild
deleted file mode 100644
index 93a222d3d8be..000000000000
--- a/sys-auth/consolekit/consolekit-0.4.2-r1.ebuild
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.4.2-r1.ebuild,v 1.1 2010/09/09 21:13:16 ssuominen Exp $
-
-EAPI=3
-inherit autotools eutils multilib pam
-
-MY_PN=ConsoleKit
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="Framework for defining and tracking users, login sessions and seats."
-HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit"
-SRC_URI="http://www.freedesktop.org/software/${MY_PN}/dist/${MY_P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux"
-IUSE="debug doc pam policykit test"
-
-RDEPEND=">=dev-libs/dbus-glib-0.80
- >=dev-libs/glib-2.20
- sys-libs/zlib
- x11-libs/libX11
- pam? ( virtual/pam )
- policykit? ( >=sys-auth/polkit-0.96 )"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig
- dev-libs/libxslt
- doc? ( app-text/xmlto )
- test? ( app-text/docbook-xml-dtd:4.1.2 )"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- epatch \
- "${FILESDIR}"/${PN}-0.2.10-cleanup_console_tags.patch \
- "${FILESDIR}"/${PN}-0.4.0-polkit-automagic.patch \
- "${FILESDIR}"/${PN}-0.4.0-multilib.patch \
- "${FILESDIR}"/${PN}-0.4.1-shutdown-reboot-without-policies.patch \
- "${FILESDIR}"/${PN}-0.4.2-revert.patch
-
- eautoreconf
-}
-
-src_configure() {
- econf \
- XMLTO_FLAGS="--skip-validation" \
- --localstatedir="${EPREFIX}"/var \
- $(use_enable pam pam-module) \
- $(use_enable doc docbook-docs) \
- $(use_enable debug) \
- $(use_enable policykit polkit) \
- --with-dbus-services="${EPREFIX}"/usr/share/dbus-1/services \
- --with-pam-module-dir=$(getpam_mod_dir)
-}
-
-src_install() {
- emake \
- DESTDIR="${D}" \
- htmldocdir="${EPREFIX}"/usr/share/doc/${PF}/html \
- install || die
-
- dodoc AUTHORS ChangeLog HACKING NEWS README TODO
-
- newinitd "${FILESDIR}"/${PN}-0.1.rc consolekit
-
- keepdir /usr/$(get_libdir)/ConsoleKit/run-session.d
- keepdir /etc/ConsoleKit/run-session.d
- keepdir /var/run/ConsoleKit
- keepdir /var/log/ConsoleKit
-
- exeinto /etc/X11/xinit/xinitrc.d
- doexe "${FILESDIR}"/90-consolekit || die
-
- exeinto /usr/$(get_libdir)/ConsoleKit/run-session.d
- doexe "${FILESDIR}"/pam-foreground-compat.ck || die
-
- find "${ED}" -name '*.la' -exec rm -f '{}' +
-}
-
-pkg_postinst() {
- ewarn
- ewarn "You need to restart ConsoleKit to get the new features."
- ewarn "This can be done with /etc/init.d/consolekit restart"
- ewarn "but make sure you do this and then restart your session"
- ewarn "otherwise you will get access denied for certain actions"
-}
diff --git a/sys-auth/consolekit/consolekit-0.4.2-r2.ebuild b/sys-auth/consolekit/consolekit-0.4.2-r3.ebuild
index e6f8f46cc904..89152def37e9 100644
--- a/sys-auth/consolekit/consolekit-0.4.2-r2.ebuild
+++ b/sys-auth/consolekit/consolekit-0.4.2-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.4.2-r2.ebuild,v 1.1 2010/10/21 13:02:30 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.4.2-r3.ebuild,v 1.1 2010/10/21 13:37:46 ssuominen Exp $
EAPI=3
inherit autotools eutils multilib pam
@@ -22,7 +22,8 @@ RDEPEND=">=dev-libs/dbus-glib-0.80
sys-libs/zlib
x11-libs/libX11
pam? ( virtual/pam )
- policykit? ( >=sys-auth/polkit-0.96 )"
+ policykit? ( >=sys-auth/polkit-0.96 )
+ !<sys-apps/shadow-4.1.4.2-r6"
DEPEND="${RDEPEND}
dev-util/pkgconfig
dev-libs/libxslt
@@ -37,7 +38,6 @@ src_prepare() {
"${FILESDIR}"/${PN}-0.4.0-polkit-automagic.patch \
"${FILESDIR}"/${PN}-0.4.0-multilib.patch \
"${FILESDIR}"/${PN}-0.4.1-shutdown-reboot-without-policies.patch \
- "${FILESDIR}"/${PN}-0.4.2-revert.patch \
"${FILESDIR}"/${PN}-0.4.2-check-for-VT_WAITEVENT-ioctl-during-runtime.patch
eautoreconf
@@ -71,7 +71,7 @@ src_install() {
keepdir /var/log/ConsoleKit
exeinto /etc/X11/xinit/xinitrc.d
- doexe "${FILESDIR}"/90-consolekit || die
+ newexe "${FILESDIR}"/90-consolekit-2 90-consolekit || die
exeinto /usr/$(get_libdir)/ConsoleKit/run-session.d
doexe "${FILESDIR}"/pam-foreground-compat.ck || die
diff --git a/sys-auth/consolekit/files/90-consolekit-2 b/sys-auth/consolekit/files/90-consolekit-2
new file mode 100644
index 000000000000..f0082a7f6445
--- /dev/null
+++ b/sys-auth/consolekit/files/90-consolekit-2
@@ -0,0 +1,32 @@
+# -*- 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
+}
+
+# gdm already creates a CK session for us, so do not run the expensive D-Bus
+# calls if we have $GDMSESSION
+if [ -z "$GDMSESSION" ] && [ -x "$CK_LAUNCH_SESSION" ] && \
+ ( [ -z "$XDG_SESSION_COOKIE" ] || is_on_console ) ; then
+ STARTUP="$CK_LAUNCH_SESSION $STARTUP"
+fi
diff --git a/sys-auth/consolekit/files/consolekit-0.4.2-revert.patch b/sys-auth/consolekit/files/consolekit-0.4.2-revert.patch
deleted file mode 100644
index 12a30953f5d2..000000000000
--- a/sys-auth/consolekit/files/consolekit-0.4.2-revert.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-http://bugs.gentoo.org/336634
-
-Revert upstream http://cgit.freedesktop.org/ConsoleKit/commit/?id=4f88228f31a63c026c424a92827f26ad7535275c
-which renders ConsoleKit unusable.
-
-diff -ur ConsoleKit-0.4.2.orig/src/ck-manager.c ConsoleKit-0.4.2/src/ck-manager.c
---- ConsoleKit-0.4.2.orig/src/ck-manager.c 2010-09-03 16:54:31.000000000 +0300
-+++ ConsoleKit-0.4.2/src/ck-manager.c 2010-09-10 00:02:32.000000000 +0300
-@@ -1660,175 +1660,12 @@
- dbus_g_method_return (context, cookie);
- }
-
--enum {
-- PROP_STRING,
-- PROP_BOOLEAN,
--};
--
--#define CK_TYPE_PARAMETER_STRUCT (dbus_g_type_get_struct ("GValueArray", \
-- G_TYPE_STRING, \
-- G_TYPE_VALUE, \
-- G_TYPE_INVALID))
--
--static gboolean
--_get_parameter (GPtrArray *parameters,
-- const char *name,
-- int prop_type,
-- gpointer *value)
--{
-- gboolean ret;
-- int i;
--
-- if (parameters == NULL) {
-- return FALSE;
-- }
--
-- ret = FALSE;
--
-- for (i = 0; i < parameters->len && ret == FALSE; i++) {
-- gboolean res;
-- GValue val_struct = { 0, };
-- char *prop_name;
-- GValue *prop_val;
--
-- g_value_init (&val_struct, CK_TYPE_PARAMETER_STRUCT);
-- g_value_set_static_boxed (&val_struct, g_ptr_array_index (parameters, i));
--
-- res = dbus_g_type_struct_get (&val_struct,
-- 0, &prop_name,
-- 1, &prop_val,
-- G_MAXUINT);
-- if (! res) {
-- g_debug ("Unable to extract parameter input");
-- goto cont;
-- }
--
-- if (prop_name == NULL) {
-- g_debug ("Skipping NULL parameter");
-- goto cont;
-- }
--
-- if (strcmp (prop_name, name) != 0) {
-- goto cont;
-- }
--
-- switch (prop_type) {
-- case PROP_STRING:
-- if (value != NULL) {
-- *value = g_value_dup_string (prop_val);
-- }
-- break;
-- case PROP_BOOLEAN:
-- if (value != NULL) {
-- *(gboolean *)value = g_value_get_boolean (prop_val);
-- }
-- break;
-- default:
-- g_assert_not_reached ();
-- break;
-- }
--
-- ret = TRUE;
--
-- cont:
-- g_free (prop_name);
-- if (prop_val != NULL) {
-- g_value_unset (prop_val);
-- g_free (prop_val);
-- }
-- }
--
-- return ret;
--}
--
--static gboolean
--_verify_login_session_id_is_local (CkManager *manager,
-- const char *login_session_id)
--{
-- GHashTableIter iter;
-- const char *id;
-- CkSession *session;
--
-- g_return_val_if_fail (CK_IS_MANAGER (manager), FALSE);
--
-- /* If any local session exists for the given login session id
-- then that means a trusted party has vouched for the
-- original login */
--
-- g_debug ("Looking for local sessions for login-session-id=%s", login_session_id);
--
-- session = NULL;
-- g_hash_table_iter_init (&iter, manager->priv->sessions);
-- while (g_hash_table_iter_next (&iter, (gpointer *)&id, (gpointer *)&session)) {
-- if (session != NULL) {
-- gboolean is_local;
-- char *sessid;
--
-- sessid = NULL;
-- g_object_get (session,
-- "login-session-id", &sessid,
-- "is-local", &is_local,
-- NULL);
-- if (g_strcmp0 (sessid, login_session_id) == 0 && is_local) {
-- g_debug ("CkManager: found is-local=true on %s", id);
-- return TRUE;
-- }
-- }
-- }
--
-- return FALSE;
--}
--
--static void
--add_param_boolean (GPtrArray *parameters,
-- const char *key,
-- gboolean value)
--{
-- GValue val = { 0, };
-- GValue param_val = { 0, };
--
-- g_value_init (&val, G_TYPE_BOOLEAN);
-- g_value_set_boolean (&val, value);
-- g_value_init (&param_val, CK_TYPE_PARAMETER_STRUCT);
-- g_value_take_boxed (&param_val,
-- dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT));
-- dbus_g_type_struct_set (&param_val,
-- 0, key,
-- 1, &val,
-- G_MAXUINT);
-- g_value_unset (&val);
--
-- g_ptr_array_add (parameters, g_value_get_boxed (&param_val));
--}
--
- static void
- verify_and_open_session_for_leader (CkManager *manager,
- CkSessionLeader *leader,
-- GPtrArray *parameters,
-+ const GPtrArray *parameters,
- DBusGMethodInvocation *context)
- {
-- /* Only allow a local session if originating from an existing
-- local session. Effectively this means that only trusted
-- parties can create local sessions. */
--
-- g_debug ("CkManager: verifying session for leader");
--
-- if (parameters != NULL && ! _get_parameter (parameters, "is-local", PROP_BOOLEAN, NULL)) {
-- gboolean is_local;
-- char *login_session_id;
--
-- g_debug ("CkManager: is-local has not been set, will inherit from existing login-session-id if available");
--
-- is_local = FALSE;
--
-- if (_get_parameter (parameters, "login-session-id", PROP_STRING, (gpointer *) &login_session_id)) {
-- is_local = _verify_login_session_id_is_local (manager, login_session_id);
-- g_debug ("CkManager: found is-local=%s", is_local ? "true" : "false");
-- }
--
-- add_param_boolean (parameters, "is-local", is_local);
-- }
--
- open_session_for_leader (manager,
- leader,
- parameters,
-diff -ur ConsoleKit-0.4.2.orig/tools/ck-collect-session-info.c ConsoleKit-0.4.2/tools/ck-collect-session-info.c
---- ConsoleKit-0.4.2.orig/tools/ck-collect-session-info.c 2010-09-03 16:54:31.000000000 +0300
-+++ ConsoleKit-0.4.2/tools/ck-collect-session-info.c 2010-09-10 00:06:30.000000000 +0300
-@@ -274,7 +274,8 @@
- si->x11_display_device = ck_process_stat_get_tty (xorg_stat);
- ck_process_stat_free (xorg_stat);
-
-- /* don't set is-local here - let the daemon do that */
-+ si->is_local = TRUE;
-+ si->is_local_is_set = TRUE;
-
- g_free (si->remote_host_name);
- si->remote_host_name = NULL;
-@@ -303,6 +304,13 @@
-
- fill_x11_info (si);
-
-+ if (! si->is_local_is_set) {
-+ /* FIXME: how should we set this? */
-+ /* non x11 sessions must be local I guess */
-+ si->is_local = TRUE;
-+ si->is_local_is_set = TRUE;
-+ }
-+
- res = ck_unix_pid_get_login_session_id (si->pid, &si->login_session_id);
- if (! res) {
- si->login_session_id = NULL;