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
RevLine 
[9d3d8a8]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
[60caf48]7 <!ENTITY polkit-download-http "https://gitlab.freedesktop.org/polkit/polkit/-/archive/&polkit-version;/polkit-&polkit-version;.tar.gz">
[f47c6a6b]8 <!ENTITY polkit-download-ftp " ">
[60caf48]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)">
[9d3d8a8]13]>
14
[01996ebb]15<sect1 id="polkit" xreflabel="Polkit-&polkit-version;">
[9d3d8a8]16 <?dbhtml filename="polkit.html"?>
17
18 <sect1info>
19 <date>$Date$</date>
20 </sect1info>
21
[01996ebb]22 <title>Polkit-&polkit-version;</title>
[9d3d8a8]23
24 <indexterm zone="polkit">
[01996ebb]25 <primary sortas="a-Polkit">Polkit</primary>
[9d3d8a8]26 </indexterm>
27
28 <sect2 role="package">
[01996ebb]29 <title>Introduction to Polkit</title>
[9d3d8a8]30
[b84342d6]31 <para>
[01996ebb]32 <application>Polkit</application> is a toolkit for defining and handling
[9ca304a]33 authorizations. It is used for allowing unprivileged processes to
[30f82900]34 communicate with privileged processes.
[b84342d6]35 </para>
[9d3d8a8]36
[f1a479c7]37 &lfs111_checked;
[27e62762]38
[9d3d8a8]39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
[b84342d6]42 <para>
43 Download (HTTP): <ulink url="&polkit-download-http;"/>
44 </para>
[9d3d8a8]45 </listitem>
46 <listitem>
[b84342d6]47 <para>
48 Download (FTP): <ulink url="&polkit-download-ftp;"/>
49 </para>
[9d3d8a8]50 </listitem>
51 <listitem>
[b84342d6]52 <para>
53 Download MD5 sum: &polkit-md5sum;
54 </para>
[9d3d8a8]55 </listitem>
56 <listitem>
[b84342d6]57 <para>
58 Download size: &polkit-size;
59 </para>
[9d3d8a8]60 </listitem>
61 <listitem>
[b84342d6]62 <para>
63 Estimated disk space required: &polkit-buildsize;
64 </para>
[9d3d8a8]65 </listitem>
66 <listitem>
[b84342d6]67 <para>
68 Estimated build time: &polkit-time;
69 </para>
[9d3d8a8]70 </listitem>
71 </itemizedlist>
[ad539dbe]72
[7e280b45]73 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
74 <itemizedlist spacing="compact">
[ad539dbe]75 <listitem>
[4a0b346]76 <para>
[7e280b45]77 Required patch:
[4483a9a]78 <ulink url="&patch-root;/polkit-&polkit-version;-security_fixes-1.patch"/>
[4a0b346]79 </para>
80 </listitem>
[b5b1af68]81 <listitem>
82 <para>
83 Required patch:
84 <ulink url="&patch-root;/polkit-&polkit-version;-js91-1.patch"/>
85 </para>
86 </listitem>
[3b40dbb3]87 </itemizedlist>
[ad539dbe]88
[01996ebb]89 <bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
[9d3d8a8]90
91 <bridgehead renderas="sect4">Required</bridgehead>
[bb947c32]92 <para role="required">
[6d03f3e]93 <xref linkend="glib2"/> and
[b5b1af68]94 <xref linkend="js91"/>
[4c2be438]95 </para>
96
[51dfb3e]97 <bridgehead renderas="sect4">Recommended</bridgehead>
98 <para role="recommended">
[59f6a1f]99 <xref linkend="gobject-introspection"/>,
100 <xref linkend="libxslt"/>,
[6288de8]101 <xref linkend="linux-pam"/>
[7cb4635]102 <phrase revision="sysv">
[8558044]103 and <xref role="first" linkend="elogind"/>
[7cb4635]104 </phrase>
[f586237]105 </para>
106
[51dfb3e]107 <note>
[f586237]108 <para>
[51dfb3e]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.
[f586237]116 </para>
117 </note>
118
119
[59f6a1f]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
[4c2be438]125 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
126 <para role="optional">
127 <xref linkend="gobject-introspection"/>
128 </para>
[59f6a1f]129 -->
[9d3d8a8]130
131 <bridgehead renderas="sect4">Optional</bridgehead>
[bb947c32]132 <para role="optional">
[bf654b1]133 <xref linkend="dbus-python"/> and
134 <xref linkend="python-dbusmock"/> (both needed for tests), and
[59f6a1f]135 <!--<xref linkend="DocBook"/>, (Part of libxslt's chain)
136 <xref linkend="docbook-xsl"/>,-->
137 <xref linkend="gtk-doc"/>
[f586237]138 </para>
139
140 <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
141 <para role="required" revision="systemd">
[96e9478]142 <xref role="runtime" linkend="systemd"/>
[4c2be438]143 </para>
[875b4070]144
[f13e9026]145 <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
146 Optional Runtime Dependencies
147 </bridgehead>
[fee64868]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
[875b4070]160 <note>
[b84342d6]161 <para>
[f586237]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
[59f6a1f]166 need to use <option>-Dman=false</option> in the instructions
[f586237]167 below.
[b84342d6]168 </para>
[875b4070]169 </note>
[9d3d8a8]170
171 <para condition="html" role="usernotes">User Notes:
[37aba7f]172 <ulink url="&blfs-wiki;/polkit"/>
173 </para>
[9d3d8a8]174 </sect2>
175
176 <sect2 role="installation">
[01996ebb]177 <title>Installation of Polkit</title>
[9d3d8a8]178
[b84342d6]179 <para>
[01996ebb]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
[59f6a1f]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>
[7e280b45]198
199 <para>
[4483a9a]200 Apply a patch to fix two security issues:
[7e280b45]201 </para>
202
[4483a9a]203<screen><userinput remap="pre">patch -Np1 -i ../polkit-&polkit-version;-security_fixes-1.patch</userinput></screen>
[7e280b45]204
[b5b1af68]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
[01996ebb]211 <para>
212 Install <application>Polkit</application> by running the following
[37aba7f]213 commands:
[b84342d6]214 </para>
[9d3d8a8]215
[59f6a1f]216<screen revision="systemd"><userinput>mkdir build &amp;&amp;
217cd build &amp;&amp;
218
219meson --prefix=/usr \
[60caf48]220 --buildtype=release \
[59f6a1f]221 -Dman=true \
222 -Dsession_tracking=libsystemd-login \
[60caf48]223 -Dtests=true \
[59f6a1f]224 .. &amp;&amp;
225ninja</userinput></screen>
[51dfb3e]226
[59f6a1f]227<screen revision="sysv"><userinput>mkdir build &amp;&amp;
228cd build &amp;&amp;
229
230meson --prefix=/usr \
[60caf48]231 --buildtype=release \
[59f6a1f]232 -Dman=true \
233 -Dsession_tracking=libelogind \
234 -Dsystemdsystemunitdir=/tmp \
[60caf48]235 -Dtests=true \
[59f6a1f]236 .. &amp;&amp;
237ninja</userinput></screen>
238
[60caf48]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 -->
[b84342d6]243 <para>
[8558044]244 To test the results, first ensure that the system
[bf654b1]245 <application>D-Bus</application> daemon is running,
246 and both <xref linkend='dbus-python'/> and
247 <xref linkend='python-dbusmock'/> are installed.
[60caf48]248 Then run <command>meson test -t3</command>.
[59f6a1f]249 </para>
[9d3d8a8]250
[b84342d6]251 <para>
252 Now, as the <systemitem class="username">root</systemitem> user:
253 </para>
[9d3d8a8]254
[59f6a1f]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>
[9d3d8a8]259
260 </sect2>
261
262 <sect2 role="commands">
263 <title>Command Explanations</title>
264
[7e280b45]265 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
266 href="../../xincludes/meson-buildtype-release.xml"/>
267
[492cca2c]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
[59f6a1f]275 <!--
[4a0b346]276 <para revision="sysv">
[59f6a1f]277 <parameter>- -disable-libsystemd-login</parameter>: This switch forces
[4a0b346]278 polkit to build with elogind support (if available) rather than
279 systemd-logind.
280 </para>
281
[59f6a1f]282
[ad539dbe]283 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
284 href="../../xincludes/static-libraries.xml"/>
[59f6a1f]285 -->
286
[51dfb3e]287 <para>
[59f6a1f]288 <option>-Dauthfw=shadow</option>: This switch enables the
[f586237]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>.
[b84342d6]292 </para>
293
[59f6a1f]294 <!--
[e05cd03f]295 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[51dfb3e]296 href="../../xincludes/gtk-doc-rebuild.xml"/>
[59f6a1f]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>
[51dfb3e]319
[9d3d8a8]320 </sect2>
321
[a6bd736]322 <sect2 role="configuration">
[01996ebb]323 <title>Configuring Polkit</title>
[a6bd736]324
325 <sect3>
326 <title>PAM Configuration</title>
327
328 <note>
[b84342d6]329 <para>
[01996ebb]330 If you did not build <application>Polkit</application> with
[ad539dbe]331 <application>Linux PAM</application> support, you can skip this
332 section.
[a6bd736]333 </para>
334 </note>
335
[b84342d6]336 <para>
[0d7900a]337 If you have built <application>Polkit</application> with
338 <application>Linux PAM</application> support, you need to modify
[9ca304a]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>
[b84342d6]342 user to create the configuration file for <application>Linux PAM</application>:
[a6bd736]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
[9d3d8a8]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>
[b84342d6]369 <seg>
[59f6a1f]370 pkaction, pkcheck, <!--pk-example-frobnicate,--> pkexec,
[f342c0a9]371 pkttyagent and polkitd
[b84342d6]372 </seg>
373 <seg>
[0d7900a]374 libpolkit-agent-1.so and
[b84342d6]375 libpolkit-gobject-1.so
376 </seg>
[028759b]377 <seg>
[01996ebb]378 /etc/polkit-1,
379 /usr/include/polkit-1,
380 /usr/lib/polkit-1,
381 /usr/share/gtk-doc/html/polkit-1 and
[028759b]382 /usr/share/polkit-1
[b84342d6]383 </seg>
[9d3d8a8]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>
[b84342d6]395 <para>
[4c24eb0a]396 is used to obtain information about registered PolicyKit actions
[b84342d6]397 </para>
[9d3d8a8]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>
[b84342d6]407 <para>
[4c24eb0a]408 is used to check whether a process is authorized for action
[b84342d6]409 </para>
[9d3d8a8]410 <indexterm zone="polkit pkcheck">
411 <primary sortas="b-pkcheck">pkcheck</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
[59f6a1f]416<!--
[72d90b67]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>
[4c24eb0a]422 command
[72d90b67]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>
[59f6a1f]429-->
430
[9d3d8a8]431 <varlistentry id="pkexec">
432 <term><command>pkexec</command></term>
433 <listitem>
[b84342d6]434 <para>
[4c24eb0a]435 allows an authorized user to execute a command as another user
[b84342d6]436 </para>
[9d3d8a8]437 <indexterm zone="polkit pkexec">
438 <primary sortas="b-pkexec">pkexec</primary>
439 </indexterm>
440 </listitem>
441 </varlistentry>
442
[b84342d6]443 <varlistentry id="pkttyagent">
444 <term><command>pkttyagent</command></term>
[9d3d8a8]445 <listitem>
[b84342d6]446 <para>
[4c24eb0a]447 is used to start a textual authentication agent for the subject
[b84342d6]448 </para>
449 <indexterm zone="polkit pkttyagent">
450 <primary sortas="b-pkttyagent">pkttyagent</primary>
[9d3d8a8]451 </indexterm>
452 </listitem>
[b84342d6]453 </varlistentry>
[9d3d8a8]454
[875b4070]455 <varlistentry id="polkitd">
[9d3d8a8]456 <term><command>polkitd</command></term>
457 <listitem>
[b84342d6]458 <para>
[0d7900a]459 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
[4c24eb0a]460 service on the system message bus
[b84342d6]461 </para>
[875b4070]462 <indexterm zone="polkit polkitd">
[9d3d8a8]463 <primary sortas="b-polkitd">polkitd</primary>
464 </indexterm>
465 </listitem>
466 </varlistentry>
467
468 <varlistentry id="libpolkit-agent-1">
[4c24eb0a]469 <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
[9d3d8a8]470 <listitem>
[b84342d6]471 <para>
[01996ebb]472 contains the <application>Polkit</application> authentication
[4c24eb0a]473 agent API functions
[b84342d6]474 </para>
[9d3d8a8]475 <indexterm zone="polkit libpolkit-agent-1">
[b84342d6]476 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
[9d3d8a8]477 </indexterm>
478 </listitem>
479 </varlistentry>
480
481 <varlistentry id="libpolkit-gobject-1">
[4c24eb0a]482 <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
[9d3d8a8]483 <listitem>
[b84342d6]484 <para>
[4c24eb0a]485 contains the <application>Polkit</application> authorization API functions
[b84342d6]486 </para>
[9d3d8a8]487 <indexterm zone="polkit libpolkit-gobject-1">
[b84342d6]488 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
[9d3d8a8]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.