Gentoo Archives: gentoo-commits

From: "Romain Perier (mrpouet)" <mrpouet@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-auth/policykit/files: policykit-0.92-zsh-completions.patch policykit-0.92-as-needed.patch
Date: Sat, 20 Jun 2009 21:02:58
Message-Id: E1MI7iB-0000El-UX@stork.gentoo.org
1 mrpouet 09/06/20 21:02:55
2
3 Added: policykit-0.92-zsh-completions.patch
4 policykit-0.92-as-needed.patch
5 Log:
6 Version bump to 0.92, bug #274411
7 (Portage version: 2.2_rc33/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 sys-auth/policykit/files/policykit-0.92-zsh-completions.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/policykit/files/policykit-0.92-zsh-completions.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/policykit/files/policykit-0.92-zsh-completions.patch?rev=1.1&content-type=text/plain
14
15 Index: policykit-0.92-zsh-completions.patch
16 ===================================================================
17 Author: Saleem Abdulrasool <compnerd@××××××××.org>
18 Date: Mon Nov 19 15:35:03 2007 -0800
19
20 add zsh completion and optionalize bash and zsh completion
21
22 Signed-off-by: Saleem Abdulrasool <compnerd@××××××××.org>
23
24
25 tools/_polkit | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
26 tools/_polkit_action | 24 ++++++++++++++++++++++
27 tools/_polkit_auth | 50 ++++++++++++++++++++++++++++++++++++++++++++++
28 3 files changed, 128 insertions(+), 0 deletions(-)
29
30 diff --git a/tools/_polkit b/tools/_polkit
31 new file mode 100644
32 index 0000000..bc7bdac
33 --- /dev/null
34 +++ tools/_polkit
35 @@ -0,0 +1,54 @@
36 +#autoload
37 +
38 +# vim: set et sw=3 sts=3 ts=3 ft=zsh:
39 +# ZSH Completion for polkit-auth
40 +# Written by Saleem Abdulrasool <compnerd@××××××××.org>
41 +# Usage: _polkit actions|constraints|authorization|overriden-actions|obtainable-actions|authorized-actions
42 +
43 +_polkit_actions() {
44 + local actions
45 + actions=( $(polkit-action) )
46 + compadd "$@" -k actions
47 +}
48 +
49 +_polkit_constraints() {
50 + local constraints
51 + constraints=( local active local+active )
52 + compadd "$@" -k constraints
53 +}
54 +
55 +_polkit_authorization() {
56 + local authorization
57 + 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 )
58 + compadd "$@" -k authorization
59 +}
60 +
61 +_polkit_overriden_actions() {
62 + local overrides
63 + overrides=( $(polkit-action --show-overrides) )
64 + compadd "$@" -k overrides
65 +}
66 +
67 +_polkit_obtainable_actions() {
68 + local actions
69 + actions=( $(polkit-auth --show-obtainable) )
70 + compadd "$@" -k actions
71 +}
72 +
73 +_polkit_authorized_actions() {
74 + local actions
75 + actions=( $(polkit-auth --explicit) )
76 + compadd "$@" -k actions
77 +}
78 +
79 +_polkit() {
80 + local command="$argv[$#]"
81 +
82 + [[ "$command" == (actions|constraints|authorization|overriden-actions|obtainable-actions|authorized-actions) ]] || {
83 + _message "unknown command: $command"
84 + }
85 +
86 + _polkit_${command/-/_}
87 +}
88 +
89 +_polkit "$@"
90 diff --git a/tools/_polkit_action b/tools/_polkit_action
91 new file mode 100644
92 index 0000000..7ec7365
93 --- /dev/null
94 +++ tools/_polkit_action
95 @@ -0,0 +1,24 @@
96 +#compdef polkit-action
97 +
98 +# vim: set et sw=3 sts=3 ts=3 ft=zsh:
99 +# ZSH Completion for polkit-action
100 +# Written by Saleem Abdulrasool <compnerd@××××××××.org>
101 +
102 +_polkit_action() {
103 + local arguments
104 +
105 + arguments=(
106 + "(-)--action[Show detailed information about a specific action]:action:_polkit actions"
107 + "(-)--reset-defaults[Reset the defaults for the specified action]:Overridden Action:_polkit overriden-actions"
108 + "(-)--show-overrides[List actions where the defaults are overridden]"
109 + "(-)--set-defaults-any[Override the any stanza for an action]:Action:_polkit _actions:Authorization:_polkit authorization"
110 + "(-)--set-defaults-inactive[Override the inactive stanza for an action]:Action:polkit _actions:Authorization:_polkit authorization"
111 + "(-)--set-defaults-active[Override the active stanza for an action]:Action:polkit _actions:Authorization:_polkit authorization"
112 + "(-)--version[Display program version]"
113 + "(-)--help[Display program help]"
114 + )
115 +
116 + _arguments $arguments
117 +}
118 +
119 +_polkit_action "$@"
120 diff --git a/tools/_polkit_auth b/tools/_polkit_auth
121 new file mode 100644
122 index 0000000..e70f1a0
123 --- /dev/null
124 +++ tools/_polkit_auth
125 @@ -0,0 +1,50 @@
126 +#compdef polkit-auth
127 +
128 +# vim: set et sw=3 sts=3 ts=3 ft=zsh:
129 +# ZSH Completion for polkit-auth
130 +# Written by Saleem Abdulrasool <compnerd@××××××××.org>
131 +
132 +_polkit_auth() {
133 + local arguments action_arguments user_arguments grant_arguments
134 + local commands actions grant=0
135 +
136 + commands=( --show-obtainable --version --help )
137 + actions=( --obtain --explicit --explicit-detail --grant --revoke )
138 +
139 + for (( i = 0 ; i < ${#words[@]} ; i++ )) ; do
140 + if [[ "${words[$i]##--#}" == "grant" ]] ; then
141 + grant=1
142 + break
143 + fi
144 + done
145 +
146 + arguments=(
147 + '(-)--show-obtainable[Show all actions that can be obtained via authentication]'
148 + '(-)--version[Show version and exit]'
149 + '(-)--help[Show help information]'
150 + )
151 +
152 + action_arguments=(
153 + "($commands $actions)--obtain[Attempt to obtain authorization to do an action]:Obtainable Actions:_polkit obtainable-actions"
154 + "($commands $actions)--explicit[Show explicit authorizations]"
155 + "($commands $actions)--explicit-detail[Show detailed information about explicit authorizations]"
156 + "($commands $actions)--grant[Grant an authorization for an action]:Obtainable Actions:_polkit actions"
157 + "($commands $actions)--revoke[Revoke all authorization for an action]:Authorized Actions:_polkit authorized-actions"
158 + )
159 +
160 + user_arguments=(
161 + "($commands)--user[The user the authorization applies to]:User:_users"
162 + )
163 +
164 + grant_arguments=(
165 + "($commands)--constraint[Optional constraints on the granted authorization]:Constraint:_polkit constraints"
166 + )
167 +
168 + if [[ grant -eq 1 ]] ; then
169 + _arguments $arguments $user_arguments $action_arguments $grant_arguments
170 + else
171 + _arguments $arguments $user_arguments $action_arguments
172 + fi
173 +}
174 +
175 +_polkit_auth "$@"
176
177
178
179 1.1 sys-auth/policykit/files/policykit-0.92-as-needed.patch
180
181 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/policykit/files/policykit-0.92-as-needed.patch?rev=1.1&view=markup
182 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/policykit/files/policykit-0.92-as-needed.patch?rev=1.1&content-type=text/plain
183
184 Index: policykit-0.92-as-needed.patch
185 ===================================================================
186 configure.ac | 4 ----
187 1 files changed, 0 insertions(+), 4 deletions(-)
188
189 diff --git a/configure.ac b/configure.ac
190 index f210559..8970f9c 100644
191 --- a/configure.ac
192 +++ b/configure.ac
193 @@ -140,10 +140,6 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"],
194 [AC_MSG_ERROR([Can't find expat library. Please install expat.])])
195 AC_SUBST(EXPAT_LIBS)
196
197 -if test "x$GCC" = "xyes"; then
198 - LDFLAGS="-Wl,--as-needed $LDFLAGS"
199 -fi
200 -
201 dnl ---------------------------------------------------------------------------
202 dnl - User
203 dnl ---------------------------------------------------------------------------