Gentoo Archives: gentoo-commits

From: "Gilles Dartiguelongue (eva)" <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-auth/polkit/files: polkit-0.93-fix-daemon-name.patch polkit-0.92-zsh-completions.patch
Date: Thu, 29 Oct 2009 23:28:04
Message-Id: E1N3ePS-00026c-Ff@stork.gentoo.org
1 eva 09/10/29 23:28:02
2
3 Added: polkit-0.93-fix-daemon-name.patch
4 polkit-0.92-zsh-completions.patch
5 Log:
6 Initial ebuild for GNOME 2.28.
7 (Portage version: 2.2_rc46/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 sys-auth/polkit/files/polkit-0.93-fix-daemon-name.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/polkit/files/polkit-0.93-fix-daemon-name.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/polkit/files/polkit-0.93-fix-daemon-name.patch?rev=1.1&content-type=text/plain
14
15 Index: polkit-0.93-fix-daemon-name.patch
16 ===================================================================
17 Fix daemon binary collision with <=policykit-0.9
18
19 https://bugs.freedesktop.org/show_bug.cgi?id=22951
20
21 --
22 --- data/org.freedesktop.PolicyKit1.service.in
23 +++ data/org.freedesktop.PolicyKit1.service.in
24 @@ -1,4 +1,4 @@
25 [D-BUS Service]
26 Name=org.freedesktop.PolicyKit1
27 -Exec=@libexecdir@/polkitd
28 +Exec=@libexecdir@/polkitd-1
29 User=root
30 --- docs/man/Makefile.am
31 +++ docs/man/Makefile.am
32 @@ -5,7 +5,7 @@
33
34 man_MANS = \
35 polkit.8 \
36 - polkitd.8 \
37 + polkitd-1.8 \
38 pklocalauthority.8 \
39 pkexec.1 \
40 pkcheck.1 \
41 @@ -19,7 +19,7 @@
42
43 EXTRA_DIST = \
44 polkit.xml \
45 - polkitd.xml \
46 + polkitd-1.xml \
47 pklocalauthority.xml \
48 pkexec.xml \
49 pkcheck.xml \
50 --- docs/man/polkitd-1.xml
51 +++ docs/man/polkitd-1.xml
52 @@ -0,0 +1,67 @@
53 +<?xml version="1.0"?>
54 +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
55 + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
56 +<!ENTITY version SYSTEM "../version.xml">
57 +]>
58 +<refentry id="polkitd-1.8">
59 + <refentryinfo>
60 + <title>polkitd-1</title>
61 + <date>May 2009</date>
62 + <productname>polkit</productname>
63 + </refentryinfo>
64 +
65 + <refmeta>
66 + <refentrytitle>polkitd-1</refentrytitle>
67 + <manvolnum>8</manvolnum>
68 + <refmiscinfo class="version"></refmiscinfo>
69 + </refmeta>
70 +
71 + <refnamediv>
72 + <refname>polkitd-1</refname>
73 + <refpurpose>PolicyKit daemon</refpurpose>
74 + </refnamediv>
75 +
76 + <refsynopsisdiv>
77 + <cmdsynopsis>
78 + <command>polkitd-1</command>
79 + </cmdsynopsis>
80 + </refsynopsisdiv>
81 +
82 + <refsect1 id="polkitd-1-description"><title>DESCRIPTION</title>
83 + <para>
84 + <command>polkitd-1</command> provides
85 + the <emphasis>org.freedesktop.PolicyKit1</emphasis> D-Bus
86 + service on the system message bus. Users or administrators
87 + should never need to start this daemon as it will be
88 + automatically started by
89 + <citerefentry><refentrytitle>dbus-daemon</refentrytitle><manvolnum>1</manvolnum></citerefentry>
90 + whenever an application calls into the service.
91 + </para>
92 + </refsect1>
93 +
94 + <refsect1 id="polkitd-1-author"><title>AUTHOR</title>
95 + <para>
96 + Written by David Zeuthen <email>davidz@××××××.com</email> with
97 + a lot of help from many others.
98 + </para>
99 + </refsect1>
100 +
101 + <refsect1 id="polkitd-1-bugs">
102 + <title>BUGS</title>
103 + <para>
104 + Please send bug reports to either the distribution or the
105 + polkit-devel mailing list,
106 + see the link <ulink url="http://lists.freedesktop.org/mailman/listinfo/polkit-devel"/>
107 + on how to subscribe.
108 + </para>
109 + </refsect1>
110 +
111 + <refsect1 id="polkitd-1-see-also">
112 + <title>SEE ALSO</title>
113 + <para>
114 + <citerefentry>
115 + <refentrytitle>polkit</refentrytitle><manvolnum>8</manvolnum>
116 + </citerefentry>
117 + </para>
118 + </refsect1>
119 +</refentry>
120 --- docs/man/polkitd.xml
121 +++ docs/man/polkitd.xml
122 @@ -1,67 +0,0 @@
123 -<?xml version="1.0"?>
124 -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
125 - "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
126 -<!ENTITY version SYSTEM "../version.xml">
127 -]>
128 -<refentry id="polkitd.8">
129 - <refentryinfo>
130 - <title>polkitd</title>
131 - <date>May 2009</date>
132 - <productname>polkit</productname>
133 - </refentryinfo>
134 -
135 - <refmeta>
136 - <refentrytitle>polkitd</refentrytitle>
137 - <manvolnum>8</manvolnum>
138 - <refmiscinfo class="version"></refmiscinfo>
139 - </refmeta>
140 -
141 - <refnamediv>
142 - <refname>polkitd</refname>
143 - <refpurpose>PolicyKit daemon</refpurpose>
144 - </refnamediv>
145 -
146 - <refsynopsisdiv>
147 - <cmdsynopsis>
148 - <command>polkitd</command>
149 - </cmdsynopsis>
150 - </refsynopsisdiv>
151 -
152 - <refsect1 id="polkitd-description"><title>DESCRIPTION</title>
153 - <para>
154 - <command>polkitd</command> provides
155 - the <emphasis>org.freedesktop.PolicyKit1</emphasis> D-Bus
156 - service on the system message bus. Users or administrators
157 - should never need to start this daemon as it will be
158 - automatically started by
159 - <citerefentry><refentrytitle>dbus-daemon</refentrytitle><manvolnum>1</manvolnum></citerefentry>
160 - whenever an application calls into the service.
161 - </para>
162 - </refsect1>
163 -
164 - <refsect1 id="polkitd-author"><title>AUTHOR</title>
165 - <para>
166 - Written by David Zeuthen <email>davidz@××××××.com</email> with
167 - a lot of help from many others.
168 - </para>
169 - </refsect1>
170 -
171 - <refsect1 id="polkitd-bugs">
172 - <title>BUGS</title>
173 - <para>
174 - Please send bug reports to either the distribution or the
175 - polkit-devel mailing list,
176 - see the link <ulink url="http://lists.freedesktop.org/mailman/listinfo/polkit-devel"/>
177 - on how to subscribe.
178 - </para>
179 - </refsect1>
180 -
181 - <refsect1 id="polkitd-see-also">
182 - <title>SEE ALSO</title>
183 - <para>
184 - <citerefentry>
185 - <refentrytitle>polkit</refentrytitle><manvolnum>8</manvolnum>
186 - </citerefentry>
187 - </para>
188 - </refsect1>
189 -</refentry>
190 --- docs/man/polkit.xml
191 +++ docs/man/polkit.xml
192 @@ -424,7 +424,7 @@
193 <refentrytitle>pklocalauthority</refentrytitle><manvolnum>8</manvolnum>
194 </citerefentry>
195 <citerefentry>
196 - <refentrytitle>polkitd</refentrytitle><manvolnum>8</manvolnum>
197 + <refentrytitle>polkitd-1</refentrytitle><manvolnum>8</manvolnum>
198 </citerefentry>
199 <citerefentry>
200 <refentrytitle>pkaction</refentrytitle><manvolnum>1</manvolnum>
201 --- docs/polkit/Makefile.am
202 +++ docs/polkit/Makefile.am
203 @@ -60,7 +60,7 @@
204 ../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml \
205 ../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml \
206 ../man/polkit.xml \
207 - ../man/polkitd.xml \
208 + ../man/polkitd-1.xml \
209 ../man/pklocalauthority.xml \
210 ../man/pkcheck.xml \
211 ../man/pkaction.xml \
212 --- src/polkitd/Makefile.am
213 +++ src/polkitd/Makefile.am
214 @@ -14,19 +14,19 @@
215 -D_REENTRANT \
216 $(NULL)
217
218 -libexec_PROGRAMS = polkitd
219 +libexec_PROGRAMS = polkitd-1
220
221 -polkitd_SOURCES = \
222 +polkitd_1_SOURCES = \
223 main.c \
224 $(NULL)
225
226 -polkitd_CFLAGS = \
227 +polkitd_1_CFLAGS = \
228 -DPOLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
229 -DG_LOG_DOMAIN=\"polkitd-1\" \
230 $(GLIB_CFLAGS) \
231 $(NULL)
232
233 -polkitd_LDADD = \
234 +polkitd_1_LDADD = \
235 $(DBUS_GLIB_LIBS) \
236 $(GLIB_LIBS) \
237 $(top_builddir)/src/polkit/libpolkit-gobject-1.la \
238
239
240
241 1.1 sys-auth/polkit/files/polkit-0.92-zsh-completions.patch
242
243 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/polkit/files/polkit-0.92-zsh-completions.patch?rev=1.1&view=markup
244 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/polkit/files/polkit-0.92-zsh-completions.patch?rev=1.1&content-type=text/plain
245
246 Index: polkit-0.92-zsh-completions.patch
247 ===================================================================
248 Author: Saleem Abdulrasool <compnerd@××××××××.org>
249 Date: Mon Nov 19 15:35:03 2007 -0800
250
251 add zsh completion and optionalize bash and zsh completion
252
253 Signed-off-by: Saleem Abdulrasool <compnerd@××××××××.org>
254
255
256 tools/_polkit | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
257 tools/_polkit_action | 24 ++++++++++++++++++++++
258 tools/_polkit_auth | 50 ++++++++++++++++++++++++++++++++++++++++++++++
259 3 files changed, 128 insertions(+), 0 deletions(-)
260
261 diff --git a/tools/_polkit b/tools/_polkit
262 new file mode 100644
263 index 0000000..bc7bdac
264 --- /dev/null
265 +++ tools/_polkit
266 @@ -0,0 +1,54 @@
267 +#autoload
268 +
269 +# vim: set et sw=3 sts=3 ts=3 ft=zsh:
270 +# ZSH Completion for polkit-auth
271 +# Written by Saleem Abdulrasool <compnerd@××××××××.org>
272 +# Usage: _polkit actions|constraints|authorization|overriden-actions|obtainable-actions|authorized-actions
273 +
274 +_polkit_actions() {
275 + local actions
276 + actions=( $(polkit-action) )
277 + compadd "$@" -k actions
278 +}
279 +
280 +_polkit_constraints() {
281 + local constraints
282 + constraints=( local active local+active )
283 + compadd "$@" -k constraints
284 +}
285 +
286 +_polkit_authorization() {
287 + local authorization
288 + 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 )
289 + compadd "$@" -k authorization
290 +}
291 +
292 +_polkit_overriden_actions() {
293 + local overrides
294 + overrides=( $(polkit-action --show-overrides) )
295 + compadd "$@" -k overrides
296 +}
297 +
298 +_polkit_obtainable_actions() {
299 + local actions
300 + actions=( $(polkit-auth --show-obtainable) )
301 + compadd "$@" -k actions
302 +}
303 +
304 +_polkit_authorized_actions() {
305 + local actions
306 + actions=( $(polkit-auth --explicit) )
307 + compadd "$@" -k actions
308 +}
309 +
310 +_polkit() {
311 + local command="$argv[$#]"
312 +
313 + [[ "$command" == (actions|constraints|authorization|overriden-actions|obtainable-actions|authorized-actions) ]] || {
314 + _message "unknown command: $command"
315 + }
316 +
317 + _polkit_${command/-/_}
318 +}
319 +
320 +_polkit "$@"
321 diff --git a/tools/_polkit_action b/tools/_polkit_action
322 new file mode 100644
323 index 0000000..7ec7365
324 --- /dev/null
325 +++ tools/_polkit_action
326 @@ -0,0 +1,24 @@
327 +#compdef polkit-action
328 +
329 +# vim: set et sw=3 sts=3 ts=3 ft=zsh:
330 +# ZSH Completion for polkit-action
331 +# Written by Saleem Abdulrasool <compnerd@××××××××.org>
332 +
333 +_polkit_action() {
334 + local arguments
335 +
336 + arguments=(
337 + "(-)--action[Show detailed information about a specific action]:action:_polkit actions"
338 + "(-)--reset-defaults[Reset the defaults for the specified action]:Overridden Action:_polkit overriden-actions"
339 + "(-)--show-overrides[List actions where the defaults are overridden]"
340 + "(-)--set-defaults-any[Override the any stanza for an action]:Action:_polkit _actions:Authorization:_polkit authorization"
341 + "(-)--set-defaults-inactive[Override the inactive stanza for an action]:Action:polkit _actions:Authorization:_polkit authorization"
342 + "(-)--set-defaults-active[Override the active stanza for an action]:Action:polkit _actions:Authorization:_polkit authorization"
343 + "(-)--version[Display program version]"
344 + "(-)--help[Display program help]"
345 + )
346 +
347 + _arguments $arguments
348 +}
349 +
350 +_polkit_action "$@"
351 diff --git a/tools/_polkit_auth b/tools/_polkit_auth
352 new file mode 100644
353 index 0000000..e70f1a0
354 --- /dev/null
355 +++ tools/_polkit_auth
356 @@ -0,0 +1,50 @@
357 +#compdef polkit-auth
358 +
359 +# vim: set et sw=3 sts=3 ts=3 ft=zsh:
360 +# ZSH Completion for polkit-auth
361 +# Written by Saleem Abdulrasool <compnerd@××××××××.org>
362 +
363 +_polkit_auth() {
364 + local arguments action_arguments user_arguments grant_arguments
365 + local commands actions grant=0
366 +
367 + commands=( --show-obtainable --version --help )
368 + actions=( --obtain --explicit --explicit-detail --grant --revoke )
369 +
370 + for (( i = 0 ; i < ${#words[@]} ; i++ )) ; do
371 + if [[ "${words[$i]##--#}" == "grant" ]] ; then
372 + grant=1
373 + break
374 + fi
375 + done
376 +
377 + arguments=(
378 + '(-)--show-obtainable[Show all actions that can be obtained via authentication]'
379 + '(-)--version[Show version and exit]'
380 + '(-)--help[Show help information]'
381 + )
382 +
383 + action_arguments=(
384 + "($commands $actions)--obtain[Attempt to obtain authorization to do an action]:Obtainable Actions:_polkit obtainable-actions"
385 + "($commands $actions)--explicit[Show explicit authorizations]"
386 + "($commands $actions)--explicit-detail[Show detailed information about explicit authorizations]"
387 + "($commands $actions)--grant[Grant an authorization for an action]:Obtainable Actions:_polkit actions"
388 + "($commands $actions)--revoke[Revoke all authorization for an action]:Authorized Actions:_polkit authorized-actions"
389 + )
390 +
391 + user_arguments=(
392 + "($commands)--user[The user the authorization applies to]:User:_users"
393 + )
394 +
395 + grant_arguments=(
396 + "($commands)--constraint[Optional constraints on the granted authorization]:Constraint:_polkit constraints"
397 + )
398 +
399 + if [[ grant -eq 1 ]] ; then
400 + _arguments $arguments $user_arguments $action_arguments $grant_arguments
401 + else
402 + _arguments $arguments $user_arguments $action_arguments
403 + fi
404 +}
405 +
406 +_polkit_auth "$@"