diff options
author | Gilles Dartiguelongue <eva@gentoo.org> | 2009-02-15 22:33:16 +0000 |
---|---|---|
committer | Gilles Dartiguelongue <eva@gentoo.org> | 2009-02-15 22:33:16 +0000 |
commit | 345de3d34d7c561c4466f6ad95622cce6a17ebf2 (patch) | |
tree | c1582797aa1def45447bd19524402c0b52dd304d /sys-auth | |
parent | Adding ~amd64 keyword (diff) | |
download | gentoo-2-345de3d34d7c561c4466f6ad95622cce6a17ebf2.tar.gz gentoo-2-345de3d34d7c561c4466f6ad95622cce6a17ebf2.tar.bz2 gentoo-2-345de3d34d7c561c4466f6ad95622cce6a17ebf2.zip |
Bump to 0.2.10-r1.
* Add compatibility script for at_console dependant programs, bug #257761.
* Remove unneeded rm, bug #259096.
* Add a Xsession script for people not using gdm, bug #257763.
* Plug a leak, bug #258685.
* Add keepdirs and fix localstatedir, bug #257164.
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'sys-auth')
9 files changed, 298 insertions, 62 deletions
diff --git a/sys-auth/consolekit/ChangeLog b/sys-auth/consolekit/ChangeLog index 399242f526d4..6aa99c1385ba 100644 --- a/sys-auth/consolekit/ChangeLog +++ b/sys-auth/consolekit/ChangeLog @@ -1,6 +1,22 @@ # ChangeLog for sys-auth/consolekit # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/ChangeLog,v 1.39 2009/02/15 14:57:30 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/ChangeLog,v 1.40 2009/02/15 22:33:16 eva Exp $ + +*consolekit-0.2.10-r1 (15 Feb 2009) + + 15 Feb 2009; Gilles Dartiguelongue <eva@gentoo.org> + +files/consolekit-0.2.10-directory-leak.patch, +files/90-consolekit, + +files/consolekit-0.2.10-cleanup_console_tags.patch, + +files/consolekit-0.2.10-pam-add-nox11.patch, + +files/consolekit-0.2.10-polkit-automagic.patch, + +files/pam-foreground-compat.ck, -consolekit-0.2.1.ebuild, + +consolekit-0.2.10-r1.ebuild: + Bump to 0.2.10-r1. + * Add compatibility script for at_console dependant programs, bug #257761. + * Remove unneeded rm, bug #259096. + * Add a Xsession script for people not using gdm, bug #257763. + * Plug a leak, bug #258685. + * Add keepdirs and fix localstatedir, bug #257164. 15 Feb 2009; Markus Meier <maekke@gentoo.org> consolekit-0.2.10.ebuild: x86 stable, bug #242270 diff --git a/sys-auth/consolekit/consolekit-0.2.1.ebuild b/sys-auth/consolekit/consolekit-0.2.1.ebuild deleted file mode 100644 index 7efe8fe64f4c..000000000000 --- a/sys-auth/consolekit/consolekit-0.2.1.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.2.1.ebuild,v 1.18 2007/11/19 05:02:22 kumba Exp $ - -inherit eutils autotools multilib - -MY_PN="ConsoleKit" - -DESCRIPTION="Framework for defining and tracking users, login sessions and seats." -HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit" -SRC_URI="http://people.freedesktop.org/~mccann/dist/${MY_PN}-${PV}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sh sparc x86" -IUSE="debug pam" - -# Not parallel make safe -MAKEOPTS="$MAKEOPTS -j1" - -RDEPEND=">=dev-libs/glib-2.7 - >=dev-libs/dbus-glib-0.61 - >=x11-libs/libX11-1.0.0 - pam? ( virtual/pam ) - elibc_glibc? ( !=sys-libs/glibc-2.4* )" -DEPEND="${RDEPEND} - dev-util/pkgconfig" - -S="${WORKDIR}/${MY_PN}-${PV}" - -src_compile() { - econf $(use_enable debug) \ - $(use_enable pam pam-module) \ - --with-pam-module-dir=/$(get_libdir)/security \ - --with-pid-file=/var/run/consolekit.pid \ - --with-dbus-services=/usr/share/dbus-1/services/ \ - || die "econf failed" - emake || die "emake failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install failed" - - #crappy Redhat init script - rm -f "${D}/etc/rc.d/init.d/ConsoleKit" - rm -r "${D}/etc/rc.d/" - - #Portage barfs on .la files - rm -f "${D}/$(get_libdir)/security/pam_ck_connector.la" - - # Gentoo style init script - newinitd "${FILESDIR}"/${PN}-0.1.rc consolekit -} - -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" - ewarn -} diff --git a/sys-auth/consolekit/consolekit-0.2.10-r1.ebuild b/sys-auth/consolekit/consolekit-0.2.10-r1.ebuild new file mode 100644 index 000000000000..cbe353045ef4 --- /dev/null +++ b/sys-auth/consolekit/consolekit-0.2.10-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.2.10-r1.ebuild,v 1.1 2009/02/15 22:33:16 eva Exp $ + +EAPI="2" + +inherit autotools eutils multilib pam + +MY_PN="ConsoleKit" +MY_PV="${PV//_pre*/}" + +DESCRIPTION="Framework for defining and tracking users, login sessions and seats." +HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit" +SRC_URI="http://people.freedesktop.org/~mccann/dist/${MY_PN}-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="debug pam" + +RDEPEND=">=dev-libs/glib-2.7 + >=dev-libs/dbus-glib-0.61 + >=x11-libs/libX11-1.0.0 + pam? ( virtual/pam ) + elibc_glibc? ( !=sys-libs/glibc-2.4* )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +S="${WORKDIR}/${MY_PN}-${MY_PV}" + +src_prepare() { + # Fix directory leaks, bug #258685 + epatch "${FILESDIR}/${P}-directory-leak.patch" + + # Clean up at_console compat files, bug #257761 + epatch "${FILESDIR}/${P}-cleanup_console_tags.patch" + + # Add nox11 option to no interfere with Xsession script, bug #257763 + epatch "${FILESDIR}/${P}-pam-add-nox11.patch" + + # Fix automagic dependency on policykit + epatch "${FILESDIR}/${P}-polkit-automagic.patch" + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable pam pam-module) \ + --disable-polkit \ + --with-pam-module-dir=/$(getpam_mod_dir) \ + --with-pid-file=/var/run/consolekit.pid \ + --with-dbus-services=/usr/share/dbus-1/services/ \ + --localstatedir=/var +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + # crappy Redhat init script + rm -f "${D}/etc/rc.d/init.d/ConsoleKit" + + # Portage barfs on .la files + rm -f "${D}/$(get_libdir)/security/pam_ck_connector.la" + + # Gentoo style init script + newinitd "${FILESDIR}"/${PN}-0.1.rc consolekit + + # Some PM drop empty dirs, bug #257164 + keepdir /usr/$(get_libdir)/ConsoleKit/run-session.d + keepdir /etc/ConsoleKit/run-session.d + keepdir /var/run/ConsoleKit + keepdir /var/log/ConsoleKit + + insinto /etc/X11/xinit/xinitrc.d/ + doins "${FILESDIR}/90-consolekit" || die "doins failed" + + exeinto /usr/$(get_libdir)/ConsoleKit/run-session.d/ + doexe "${FILESDIR}/pam-foreground-compat.ck" || die "doexe failed" +} + +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" + + ewarn + ewarn "You need to chmod +x /etc/X11/xinit/xinitrc.d/90-consolekit" + ewarn "to benefit of consolekit if you are not using gdm or pam integration." +} diff --git a/sys-auth/consolekit/files/90-consolekit b/sys-auth/consolekit/files/90-consolekit new file mode 100644 index 000000000000..c25e8b49cfbc --- /dev/null +++ b/sys-auth/consolekit/files/90-consolekit @@ -0,0 +1,12 @@ +# -*- sh -*- +# Xsession.d script for ck-launch-session. +# +# +# This file is sourced by Xsession(5), not executed. + +CK_LAUNCH_SESSION=/usr/bin/ck-launch-session + +if [ -z "$XDG_SESSION_COOKIE" ] && [ -x "$CK_LAUNCH_SESSION" ]; then + STARTUP="$CK_LAUNCH_SESSION $STARTUP" +fi + diff --git a/sys-auth/consolekit/files/consolekit-0.2.10-cleanup_console_tags.patch b/sys-auth/consolekit/files/consolekit-0.2.10-cleanup_console_tags.patch new file mode 100644 index 000000000000..d1699d900a76 --- /dev/null +++ b/sys-auth/consolekit/files/consolekit-0.2.10-cleanup_console_tags.patch @@ -0,0 +1,65 @@ +# http://patches.ubuntu.com/by-release/extracted/ubuntu/c/consolekit/0.2.10-1ubuntu9/ +--- a/src/main.c 2008-07-25 03:19:34.000000000 +0200 ++++ b/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 (); diff --git a/sys-auth/consolekit/files/consolekit-0.2.10-directory-leak.patch b/sys-auth/consolekit/files/consolekit-0.2.10-directory-leak.patch new file mode 100644 index 000000000000..450ff77d1f54 --- /dev/null +++ b/sys-auth/consolekit/files/consolekit-0.2.10-directory-leak.patch @@ -0,0 +1,11 @@ +# https://bugs.gentoo.org/show_bug.cgi?id=258685 +--- a/src/ck-run-programs.c ++++ b/src/ck-run-programs.c +@@ -225,6 +225,7 @@ + out_loop: + g_free (child_argv[0]); + } ++ g_dir_close (dir); + out: + g_strfreev (env_for_child); + } diff --git a/sys-auth/consolekit/files/consolekit-0.2.10-pam-add-nox11.patch b/sys-auth/consolekit/files/consolekit-0.2.10-pam-add-nox11.patch new file mode 100644 index 000000000000..ddac6bc0efa4 --- /dev/null +++ b/sys-auth/consolekit/files/consolekit-0.2.10-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 diff --git a/sys-auth/consolekit/files/consolekit-0.2.10-polkit-automagic.patch b/sys-auth/consolekit/files/consolekit-0.2.10-polkit-automagic.patch new file mode 100644 index 000000000000..18b0de8f5761 --- /dev/null +++ b/sys-auth/consolekit/files/consolekit-0.2.10-polkit-automagic.patch @@ -0,0 +1,29 @@ +diff -Naur ConsoleKit-0.2.10/configure.ac ConsoleKit-0.2.10.new/configure.ac +--- ConsoleKit-0.2.10/configure.ac 2008-02-13 09:25:50.000000000 +0530 ++++ ConsoleKit-0.2.10.new/configure.ac 2008-08-09 11:36:25.000000000 +0530 +@@ -55,10 +55,21 @@ + gthread-2.0 >= $GLIB_REQUIRED_VERSION + ) + +-PKG_CHECK_MODULES(POLKIT, +- polkit >= $POLKIT_REQUIRED_VERSION, +- have_polkit=yes, +- have_polkit=no) ++AC_ARG_ENABLE([polkit], ++ AC_HELP_STRING([--enable-polkit], [Enable PolicyKit support (default auto)]), ++ enable_polkit=$enableval, ++ enable_polkit=auto) ++ ++if test "x$enable_polkit" != "xno"; then ++ PKG_CHECK_MODULES(POLKIT, ++ polkit >= $POLKIT_REQUIRED_VERSION, ++ have_polkit=yes, ++ have_polkit=no) ++ if test "x$enable_polkit" = "xyes" -a "x$have_polkit" = "xno"; then ++ AC_MSG_ERROR([PolicyKit support explicitly requested but dependencies not found]) ++ fi ++fi ++ + if test "x$have_polkit" = "xyes" ; then + AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit]) + fi diff --git a/sys-auth/consolekit/files/pam-foreground-compat.ck b/sys-auth/consolekit/files/pam-foreground-compat.ck new file mode 100644 index 000000000000..0697ca81ba45 --- /dev/null +++ b/sys-auth/consolekit/files/pam-foreground-compat.ck @@ -0,0 +1,17 @@ +#!/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 + |