source: postlfs/security/polkit.xml@ a3fa2d4b

11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since a3fa2d4b was bf654b1, checked in by Xi Ruoyao <xry111@…>, 2 years ago

polkit: uncomment test dependencies

Forgot to do this yesterday...

  • Property mode set to 100644
File size: 15.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY polkit-download-http "https://gitlab.freedesktop.org/polkit/polkit/-/archive/&polkit-version;/polkit-&polkit-version;.tar.gz">
8 <!ENTITY polkit-download-ftp " ">
9 <!ENTITY polkit-md5sum "5687b19e9ca9a0225957b8967d8f4458">
10 <!ENTITY polkit-size "740 KB">
11 <!ENTITY polkit-buildsize "8.9 MB (with tests)">
12 <!ENTITY polkit-time "0.2 SBU (with tests, using parallelism=4)">
13]>
14
15<sect1 id="polkit" xreflabel="Polkit-&polkit-version;">
16 <?dbhtml filename="polkit.html"?>
17
18 <sect1info>
19 <date>$Date$</date>
20 </sect1info>
21
22 <title>Polkit-&polkit-version;</title>
23
24 <indexterm zone="polkit">
25 <primary sortas="a-Polkit">Polkit</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to Polkit</title>
30
31 <para>
32 <application>Polkit</application> is a toolkit for defining and handling
33 authorizations. It is used for allowing unprivileged processes to
34 communicate with privileged processes.
35 </para>
36
37 &lfs111_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>
43 Download (HTTP): <ulink url="&polkit-download-http;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download (FTP): <ulink url="&polkit-download-ftp;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download MD5 sum: &polkit-md5sum;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download size: &polkit-size;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated disk space required: &polkit-buildsize;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated build time: &polkit-time;
69 </para>
70 </listitem>
71 </itemizedlist>
72
73 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
74 <itemizedlist spacing="compact">
75 <listitem>
76 <para>
77 Required patch:
78 <ulink url="&patch-root;/polkit-&polkit-version;-security_fixes-1.patch"/>
79 </para>
80 </listitem>
81 <listitem>
82 <para>
83 Required patch:
84 <ulink url="&patch-root;/polkit-&polkit-version;-js91-1.patch"/>
85 </para>
86 </listitem>
87 </itemizedlist>
88
89 <bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
90
91 <bridgehead renderas="sect4">Required</bridgehead>
92 <para role="required">
93 <xref linkend="glib2"/> and
94 <xref linkend="js91"/>
95 </para>
96
97 <bridgehead renderas="sect4">Recommended</bridgehead>
98 <para role="recommended">
99 <xref linkend="gobject-introspection"/>,
100 <xref linkend="libxslt"/>,
101 <xref linkend="linux-pam"/>
102 <phrase revision="sysv">
103 and <xref role="first" linkend="elogind"/>
104 </phrase>
105 </para>
106
107 <note>
108 <para>
109 Since <phrase revision="sysv"><command>elogind</command></phrase>
110 <phrase revision="systemd"><command>systemd-logind</command></phrase>
111 uses PAM to register user sessions, it is a good idea to build
112 <application>Polkit</application> with PAM support so
113 <phrase revision="sysv"><command>elogind</command></phrase>
114 <phrase revision="systemd"><command>systemd-logind</command></phrase>
115 can track <application>Polkit</application> sessions.
116 </para>
117 </note>
118
119
120 <!-- Due to the fact that meson will not autodetect g-i and
121 has it set to required unless you pass an option, and the likelihood
122 of users ignoring a command explanation and then sending in mails
123 regarding KDE or GNOME not working after installing polkit, let's move
124 it to recommended. See #15640 for logic
125 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
126 <para role="optional">
127 <xref linkend="gobject-introspection"/>
128 </para>
129 -->
130
131 <bridgehead renderas="sect4">Optional</bridgehead>
132 <para role="optional">
133 <xref linkend="dbus-python"/> and
134 <xref linkend="python-dbusmock"/> (both needed for tests), and
135 <!--<xref linkend="DocBook"/>, (Part of libxslt's chain)
136 <xref linkend="docbook-xsl"/>,-->
137 <xref linkend="gtk-doc"/>
138 </para>
139
140 <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
141 <para role="required" revision="systemd">
142 <xref role="runtime" linkend="systemd"/>
143 </para>
144
145 <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
146 Optional Runtime Dependencies
147 </bridgehead>
148 <para role="optional">
149 One polkit authentication agent for using polkit in the graphical
150 environment:
151 <application>polkit-kde-agent</application> in
152 <xref role="runtime" linkend="plasma5-build"/> for KDE,
153 the agent built in
154 <xref role="runtime" linkend="gnome-shell"/> for GNOME3,
155 <xref role="runtime" linkend="polkit-gnome"/> for XFCE, and
156 <application>lxpolkit</application> in
157 <xref role="runtime" linkend="lxsession"/> for LXDE.
158 </para>
159
160 <note>
161 <para>
162 If <xref linkend="libxslt"/> is installed,
163 then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
164 required. If you have installed <xref linkend="libxslt"/>, but you do
165 not want to install any of the DocBook packages mentioned, you will
166 need to use <option>-Dman=false</option> in the instructions
167 below.
168 </para>
169 </note>
170
171 <para condition="html" role="usernotes">User Notes:
172 <ulink url="&blfs-wiki;/polkit"/>
173 </para>
174 </sect2>
175
176 <sect2 role="installation">
177 <title>Installation of Polkit</title>
178
179 <para>
180 There should be a dedicated user and group to take control
181 of the <command>polkitd</command> daemon after it is
182 started. Issue the following commands as the
183 <systemitem class="username">root</systemitem> user:
184 </para>
185
186<screen role="root"><userinput>groupadd -fg 27 polkitd &amp;&amp;
187useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
188 -g polkitd -s /bin/false polkitd</userinput></screen>
189
190 <para>
191 First, fix problems with setting permissions during installation and with
192 meson-0.60.0:
193 </para>
194
195<screen><userinput remap="pre">sed '/0,/s/^/#/' -i meson_post_install.py &amp;&amp;
196sed '/policy,/d' -i actions/meson.build \
197 -i src/examples/meson.build</userinput></screen>
198
199 <para>
200 Apply a patch to fix two security issues:
201 </para>
202
203<screen><userinput remap="pre">patch -Np1 -i ../polkit-&polkit-version;-security_fixes-1.patch</userinput></screen>
204
205 <para>
206 Port this package to use JS-91:
207 </para>
208
209<screen><userinput remap="pre">patch -Np1 -i ../polkit-&polkit-version;-js91-1.patch</userinput></screen>
210
211 <para>
212 Install <application>Polkit</application> by running the following
213 commands:
214 </para>
215
216<screen revision="systemd"><userinput>mkdir build &amp;&amp;
217cd build &amp;&amp;
218
219meson --prefix=/usr \
220 --buildtype=release \
221 -Dman=true \
222 -Dsession_tracking=libsystemd-login \
223 -Dtests=true \
224 .. &amp;&amp;
225ninja</userinput></screen>
226
227<screen revision="sysv"><userinput>mkdir build &amp;&amp;
228cd build &amp;&amp;
229
230meson --prefix=/usr \
231 --buildtype=release \
232 -Dman=true \
233 -Dsession_tracking=libelogind \
234 -Dsystemdsystemunitdir=/tmp \
235 -Dtests=true \
236 .. &amp;&amp;
237ninja</userinput></screen>
238
239 <!--
240 "-t3" for raising the timeout to 90s, i. e. 3x the default:
241 https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/107
242 -->
243 <para>
244 To test the results, first ensure that the system
245 <application>D-Bus</application> daemon is running,
246 and both <xref linkend='dbus-python'/> and
247 <xref linkend='python-dbusmock'/> are installed.
248 Then run <command>meson test -t3</command>.
249 </para>
250
251 <para>
252 Now, as the <systemitem class="username">root</systemitem> user:
253 </para>
254
255<screen role="root" revision="systemd"><userinput>ninja install</userinput></screen>
256
257<screen role="root" revision="sysv"><userinput>ninja install &amp;&amp;
258rm -v /tmp/*.service</userinput></screen>
259
260 </sect2>
261
262 <sect2 role="commands">
263 <title>Command Explanations</title>
264
265 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
266 href="../../xincludes/meson-buildtype-release.xml"/>
267
268 <para>
269 <parameter>-Dtests=true</parameter>: This switch allows to run the
270 test suite of this package. As <application>Polkit</application> is
271 used for authorizations, its integrity can affect system security.
272 So it's recommended to run the test suite building this package.
273 </para>
274
275 <!--
276 <para revision="sysv">
277 <parameter>- -disable-libsystemd-login</parameter>: This switch forces
278 polkit to build with elogind support (if available) rather than
279 systemd-logind.
280 </para>
281
282
283 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
284 href="../../xincludes/static-libraries.xml"/>
285 -->
286
287 <para>
288 <option>-Dauthfw=shadow</option>: This switch enables the
289 package to use the <application>Shadow</application> rather than the
290 <application>Linux PAM</application> Authentication framework. Use it
291 if you have not installed <application>Linux PAM</application>.
292 </para>
293
294 <!--
295 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
296 href="../../xincludes/gtk-doc-rebuild.xml"/>
297 -->
298
299 <para>
300 <option>-Dintrospection=false</option>: Use this option if you are certain
301 that you do not need gobject-introspection files for polkit, or do not have
302 gobject-introspection installed.
303 </para>
304
305 <para>
306 <option>-Dman=false</option>: Use this option to disable generating and
307 installing manual pages. This is useful if libxslt is not installed.
308 </para>
309
310 <para>
311 <option>-Dexamples=true</option>: Use this option to build the example
312 programs.
313 </para>
314
315 <para>
316 <option>-Dgtk_doc=true</option>: Use this option to enable building and
317 installing the API documentation.
318 </para>
319
320 </sect2>
321
322 <sect2 role="configuration">
323 <title>Configuring Polkit</title>
324
325 <sect3>
326 <title>PAM Configuration</title>
327
328 <note>
329 <para>
330 If you did not build <application>Polkit</application> with
331 <application>Linux PAM</application> support, you can skip this
332 section.
333 </para>
334 </note>
335
336 <para>
337 If you have built <application>Polkit</application> with
338 <application>Linux PAM</application> support, you need to modify
339 the default PAM configuration file which was installed by default to get
340 <application>Polkit</application> to work correctly with BLFS. Issue the
341 following commands as the <systemitem class="username">root</systemitem>
342 user to create the configuration file for <application>Linux PAM</application>:
343 </para>
344
345<screen role="root"><userinput>cat &gt; /etc/pam.d/polkit-1 &lt;&lt; "EOF"
346<literal># Begin /etc/pam.d/polkit-1
347
348auth include system-auth
349account include system-account
350password include system-password
351session include system-session
352
353# End /etc/pam.d/polkit-1</literal>
354EOF</userinput></screen>
355
356 </sect3>
357
358 </sect2>
359
360 <sect2 role="content">
361 <title>Contents</title>
362
363 <segmentedlist>
364 <segtitle>Installed Programs</segtitle>
365 <segtitle>Installed Libraries</segtitle>
366 <segtitle>Installed Directories</segtitle>
367
368 <seglistitem>
369 <seg>
370 pkaction, pkcheck, <!--pk-example-frobnicate,--> pkexec,
371 pkttyagent and polkitd
372 </seg>
373 <seg>
374 libpolkit-agent-1.so and
375 libpolkit-gobject-1.so
376 </seg>
377 <seg>
378 /etc/polkit-1,
379 /usr/include/polkit-1,
380 /usr/lib/polkit-1,
381 /usr/share/gtk-doc/html/polkit-1 and
382 /usr/share/polkit-1
383 </seg>
384 </seglistitem>
385 </segmentedlist>
386
387 <variablelist>
388 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
389 <?dbfo list-presentation="list"?>
390 <?dbhtml list-presentation="table"?>
391
392 <varlistentry id="pkaction">
393 <term><command>pkaction</command></term>
394 <listitem>
395 <para>
396 is used to obtain information about registered PolicyKit actions
397 </para>
398 <indexterm zone="polkit pkaction">
399 <primary sortas="b-pkaction">pkaction</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 <varlistentry id="pkcheck">
405 <term><command>pkcheck</command></term>
406 <listitem>
407 <para>
408 is used to check whether a process is authorized for action
409 </para>
410 <indexterm zone="polkit pkcheck">
411 <primary sortas="b-pkcheck">pkcheck</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416<!--
417 <varlistentry id="pk-example-frobnicate">
418 <term><command>pk-example-frobnicate</command></term>
419 <listitem>
420 <para>
421 is an example program to test the <command>pkexec</command>
422 command
423 </para>
424 <indexterm zone="polkit pk-example-frobnicate">
425 <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
426 </indexterm>
427 </listitem>
428 </varlistentry>
429-->
430
431 <varlistentry id="pkexec">
432 <term><command>pkexec</command></term>
433 <listitem>
434 <para>
435 allows an authorized user to execute a command as another user
436 </para>
437 <indexterm zone="polkit pkexec">
438 <primary sortas="b-pkexec">pkexec</primary>
439 </indexterm>
440 </listitem>
441 </varlistentry>
442
443 <varlistentry id="pkttyagent">
444 <term><command>pkttyagent</command></term>
445 <listitem>
446 <para>
447 is used to start a textual authentication agent for the subject
448 </para>
449 <indexterm zone="polkit pkttyagent">
450 <primary sortas="b-pkttyagent">pkttyagent</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry id="polkitd">
456 <term><command>polkitd</command></term>
457 <listitem>
458 <para>
459 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
460 service on the system message bus
461 </para>
462 <indexterm zone="polkit polkitd">
463 <primary sortas="b-polkitd">polkitd</primary>
464 </indexterm>
465 </listitem>
466 </varlistentry>
467
468 <varlistentry id="libpolkit-agent-1">
469 <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
470 <listitem>
471 <para>
472 contains the <application>Polkit</application> authentication
473 agent API functions
474 </para>
475 <indexterm zone="polkit libpolkit-agent-1">
476 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
477 </indexterm>
478 </listitem>
479 </varlistentry>
480
481 <varlistentry id="libpolkit-gobject-1">
482 <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
483 <listitem>
484 <para>
485 contains the <application>Polkit</application> authorization API functions
486 </para>
487 <indexterm zone="polkit libpolkit-gobject-1">
488 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
489 </indexterm>
490 </listitem>
491 </varlistentry>
492
493 </variablelist>
494
495 </sect2>
496
497</sect1>
Note: See TracBrowser for help on using the repository browser.