diff options
author | Romain Perier <mrpouet@gentoo.org> | 2009-06-20 21:02:55 +0000 |
---|---|---|
committer | Romain Perier <mrpouet@gentoo.org> | 2009-06-20 21:02:55 +0000 |
commit | 99fb4bd6e6b7d642da15f0ac559a0b6d7547ea5a (patch) | |
tree | cec08ad3ba7613f73c39effeafdb3aea7956772d /sys-auth/policykit | |
parent | Further pam_tally2 fixes. (diff) | |
download | gentoo-2-99fb4bd6e6b7d642da15f0ac559a0b6d7547ea5a.tar.gz gentoo-2-99fb4bd6e6b7d642da15f0ac559a0b6d7547ea5a.tar.bz2 gentoo-2-99fb4bd6e6b7d642da15f0ac559a0b6d7547ea5a.zip |
Version bump to 0.92, bug #274411
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'sys-auth/policykit')
-rw-r--r-- | sys-auth/policykit/ChangeLog | 9 | ||||
-rw-r--r-- | sys-auth/policykit/files/policykit-0.92-as-needed.patch | 18 | ||||
-rw-r--r-- | sys-auth/policykit/files/policykit-0.92-zsh-completions.patch | 159 | ||||
-rw-r--r-- | sys-auth/policykit/policykit-0.92.ebuild | 118 |
4 files changed, 303 insertions, 1 deletions
diff --git a/sys-auth/policykit/ChangeLog b/sys-auth/policykit/ChangeLog index 25b67d0480c5..7a70fa6072d9 100644 --- a/sys-auth/policykit/ChangeLog +++ b/sys-auth/policykit/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-auth/policykit # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-auth/policykit/ChangeLog,v 1.15 2009/04/25 02:42:16 dang Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-auth/policykit/ChangeLog,v 1.16 2009/06/20 21:02:55 mrpouet Exp $ + +*policykit-0.92 (20 Jun 2009) + + 20 Jun 2009; <mrpouet@gentoo.org> +policykit-0.92.ebuild, + +files/policykit-0.92-as-needed.patch, + +files/policykit-0.92-zsh-completions.patch: + Version bump to 0.92, bug #274411 *policykit-0.9-r1 (25 Apr 2009) diff --git a/sys-auth/policykit/files/policykit-0.92-as-needed.patch b/sys-auth/policykit/files/policykit-0.92-as-needed.patch new file mode 100644 index 000000000000..73450f4886ce --- /dev/null +++ b/sys-auth/policykit/files/policykit-0.92-as-needed.patch @@ -0,0 +1,18 @@ + configure.ac | 4 ---- + 1 files changed, 0 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f210559..8970f9c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -140,10 +140,6 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"], + [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) + AC_SUBST(EXPAT_LIBS) + +-if test "x$GCC" = "xyes"; then +- LDFLAGS="-Wl,--as-needed $LDFLAGS" +-fi +- + dnl --------------------------------------------------------------------------- + dnl - User + dnl --------------------------------------------------------------------------- diff --git a/sys-auth/policykit/files/policykit-0.92-zsh-completions.patch b/sys-auth/policykit/files/policykit-0.92-zsh-completions.patch new file mode 100644 index 000000000000..6c6e24143b32 --- /dev/null +++ b/sys-auth/policykit/files/policykit-0.92-zsh-completions.patch @@ -0,0 +1,159 @@ +Author: Saleem Abdulrasool <compnerd@compnerd.org> +Date: Mon Nov 19 15:35:03 2007 -0800 + + add zsh completion and optionalize bash and zsh completion + + Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> + + + tools/_polkit | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ + tools/_polkit_action | 24 ++++++++++++++++++++++ + tools/_polkit_auth | 50 ++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 128 insertions(+), 0 deletions(-) + +diff --git a/tools/_polkit b/tools/_polkit +new file mode 100644 +index 0000000..bc7bdac +--- /dev/null ++++ tools/_polkit +@@ -0,0 +1,54 @@ ++#autoload ++ ++# vim: set et sw=3 sts=3 ts=3 ft=zsh: ++# ZSH Completion for polkit-auth ++# Written by Saleem Abdulrasool <compnerd@compnerd.org> ++# Usage: _polkit actions|constraints|authorization|overriden-actions|obtainable-actions|authorized-actions ++ ++_polkit_actions() { ++ local actions ++ actions=( $(polkit-action) ) ++ compadd "$@" -k actions ++} ++ ++_polkit_constraints() { ++ local constraints ++ constraints=( local active local+active ) ++ compadd "$@" -k constraints ++} ++ ++_polkit_authorization() { ++ local authorization ++ authorization=( no auth_admin_one_shot auth_admin auth_admin_keep_session auth_admin_keep_always auth_self_one_shot auth_self auth_self_keep_session auth_self_keep_always yes ) ++ compadd "$@" -k authorization ++} ++ ++_polkit_overriden_actions() { ++ local overrides ++ overrides=( $(polkit-action --show-overrides) ) ++ compadd "$@" -k overrides ++} ++ ++_polkit_obtainable_actions() { ++ local actions ++ actions=( $(polkit-auth --show-obtainable) ) ++ compadd "$@" -k actions ++} ++ ++_polkit_authorized_actions() { ++ local actions ++ actions=( $(polkit-auth --explicit) ) ++ compadd "$@" -k actions ++} ++ ++_polkit() { ++ local command="$argv[$#]" ++ ++ [[ "$command" == (actions|constraints|authorization|overriden-actions|obtainable-actions|authorized-actions) ]] || { ++ _message "unknown command: $command" ++ } ++ ++ _polkit_${command/-/_} ++} ++ ++_polkit "$@" +diff --git a/tools/_polkit_action b/tools/_polkit_action +new file mode 100644 +index 0000000..7ec7365 +--- /dev/null ++++ tools/_polkit_action +@@ -0,0 +1,24 @@ ++#compdef polkit-action ++ ++# vim: set et sw=3 sts=3 ts=3 ft=zsh: ++# ZSH Completion for polkit-action ++# Written by Saleem Abdulrasool <compnerd@compnerd.org> ++ ++_polkit_action() { ++ local arguments ++ ++ arguments=( ++ "(-)--action[Show detailed information about a specific action]:action:_polkit actions" ++ "(-)--reset-defaults[Reset the defaults for the specified action]:Overridden Action:_polkit overriden-actions" ++ "(-)--show-overrides[List actions where the defaults are overridden]" ++ "(-)--set-defaults-any[Override the any stanza for an action]:Action:_polkit _actions:Authorization:_polkit authorization" ++ "(-)--set-defaults-inactive[Override the inactive stanza for an action]:Action:polkit _actions:Authorization:_polkit authorization" ++ "(-)--set-defaults-active[Override the active stanza for an action]:Action:polkit _actions:Authorization:_polkit authorization" ++ "(-)--version[Display program version]" ++ "(-)--help[Display program help]" ++ ) ++ ++ _arguments $arguments ++} ++ ++_polkit_action "$@" +diff --git a/tools/_polkit_auth b/tools/_polkit_auth +new file mode 100644 +index 0000000..e70f1a0 +--- /dev/null ++++ tools/_polkit_auth +@@ -0,0 +1,50 @@ ++#compdef polkit-auth ++ ++# vim: set et sw=3 sts=3 ts=3 ft=zsh: ++# ZSH Completion for polkit-auth ++# Written by Saleem Abdulrasool <compnerd@compnerd.org> ++ ++_polkit_auth() { ++ local arguments action_arguments user_arguments grant_arguments ++ local commands actions grant=0 ++ ++ commands=( --show-obtainable --version --help ) ++ actions=( --obtain --explicit --explicit-detail --grant --revoke ) ++ ++ for (( i = 0 ; i < ${#words[@]} ; i++ )) ; do ++ if [[ "${words[$i]##--#}" == "grant" ]] ; then ++ grant=1 ++ break ++ fi ++ done ++ ++ arguments=( ++ '(-)--show-obtainable[Show all actions that can be obtained via authentication]' ++ '(-)--version[Show version and exit]' ++ '(-)--help[Show help information]' ++ ) ++ ++ action_arguments=( ++ "($commands $actions)--obtain[Attempt to obtain authorization to do an action]:Obtainable Actions:_polkit obtainable-actions" ++ "($commands $actions)--explicit[Show explicit authorizations]" ++ "($commands $actions)--explicit-detail[Show detailed information about explicit authorizations]" ++ "($commands $actions)--grant[Grant an authorization for an action]:Obtainable Actions:_polkit actions" ++ "($commands $actions)--revoke[Revoke all authorization for an action]:Authorized Actions:_polkit authorized-actions" ++ ) ++ ++ user_arguments=( ++ "($commands)--user[The user the authorization applies to]:User:_users" ++ ) ++ ++ grant_arguments=( ++ "($commands)--constraint[Optional constraints on the granted authorization]:Constraint:_polkit constraints" ++ ) ++ ++ if [[ grant -eq 1 ]] ; then ++ _arguments $arguments $user_arguments $action_arguments $grant_arguments ++ else ++ _arguments $arguments $user_arguments $action_arguments ++ fi ++} ++ ++_polkit_auth "$@" diff --git a/sys-auth/policykit/policykit-0.92.ebuild b/sys-auth/policykit/policykit-0.92.ebuild new file mode 100644 index 000000000000..5af426465b02 --- /dev/null +++ b/sys-auth/policykit/policykit-0.92.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-auth/policykit/policykit-0.92.ebuild,v 1.1 2009/06/20 21:02:55 mrpouet Exp $ + +EAPI="2" + +inherit autotools eutils multilib pam + +MY_PN="polkit" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Policy framework for controlling privileges for system-wide services" +HOMEPAGE="http://hal.freedesktop.org/docs/PolicyKit" +SRC_URI="http://hal.freedesktop.org/releases/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug doc expat pam zsh-completion nls" + +RDEPEND=">=dev-libs/glib-2.14 + >=dev-libs/eggdbus-0.4 + expat? ( dev-libs/expat ) + pam? ( virtual/pam )" +DEPEND="${RDEPEND} + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + >=dev-util/pkgconfig-0.18 + >=dev-util/intltool-0.36 + >=dev-util/gtk-doc-am-1.10-r1 + doc? ( >=dev-util/gtk-doc-1.10 )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewuser polkituser -1 "-1" /dev/null polkituser +} + +src_prepare() { + # Add zsh completions + if use zsh-completion; then + epatch "${FILESDIR}/${P}-zsh-completions.patch" + fi + + # Don't force user to use --as-needed LDFLAGS + epatch "${FILESDIR}/${P}-as-needed.patch" + eautoreconf +} + +src_configure() { + + local conf= + + if use pam ; then + conf="--with-authfw=pam --with-pam-module-dir=$(getpam_mod_dir)" + else + conf="--with-authfw=none" + fi + + if use expat; then + conf="--with-expat=/usr" + fi + + econf ${conf} \ + --enable-fast-install \ + --enable-libtool-lock \ + --enable-man-pages \ + --disable-dependency-tracking \ + --with-os-type=gentoo \ + --with-polkit-user=polkituser \ + --localstatedir=/var \ + $(use_enable debug verbose-mode) \ + $(use_enable doc gtk-doc) \ + $(use_enable nls) +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + dodoc NEWS README AUTHORS ChangeLog || die "dodoc failed" + + if use zsh-completion ; then + insinto /usr/share/zsh/site-functions + doins "${S}/tools/_polkit" || die "zsh completion died" + doins "${S}/tools/_polkit_auth" || die "zsh completion died" + doins "${S}/tools/_polkit_action" || die "zsh completion died" + fi + + einfo "Installing basic PolicyKit.conf" + insinto /etc/PolicyKit + doins "${FILESDIR}"/PolicyKit.conf || die "doins failed" + # Need to keep a few directories around... + + diropts -m0770 -o root -g polkituser + keepdir /var/run/PolicyKit + keepdir /var/lib/PolicyKit +} + +pkg_preinst() { + # Stolen from vixie-cron ebuilds + has_version "<${CATEGORY}/${PN}-0.9" + fix_var_dir_perms=$? +} + +pkg_postinst() { + # bug #239231 + if [[ $fix_var_dir_perms = 0 ]] ; then + echo + ewarn "Previous version of PolicyKit handled /var/run and /var/lib" + ewarn "with different permissions. Proper permissions are" + ewarn "now being set on ${ROOT}var/lib/PolicyKit and ${ROOT}var/lib/PolicyKit" + ewarn "Look at these directories if you have a specific configuration" + ewarn "that needs special ownerships or permissions." + echo + chmod 0770 "${ROOT}"var/{lib,run}/PolicyKit || die "chmod failed" + chgrp -R polkituser "${ROOT}"var/{lib,run}/PolicyKit || die "chgrp failed" + fi +} |