source: general/sysutils/elogind.xml@ cce4984

10.0 10.1 11.0 11.1 9.1 lazarus qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since cce4984 was cce4984, checked in by Pierre Labastie <pieere@…>, 2 years ago

Add tests to elogind, and add as comments possible addition for next version

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22558 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 10.9 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 elogind-download-http "https://github.com/elogind/elogind/archive/v&elogind-version;/elogind-&elogind-version;.tar.gz">
8 <!ENTITY elogind-download-ftp " ">
9 <!ENTITY elogind-md5sum "fb5ba9da1115d68d2b6cdbcd10167b7d">
10 <!ENTITY elogind-size "1.3 MB">
11 <!ENTITY elogind-buildsize "56 MB (add 1 MB for tests)">
12 <!ENTITY elogind-time "0.4 SBU (NINJAJOBS=1)">
13]>
14
15<sect1 id="elogind" revision="sysv" xreflabel="elogind-&elogind-version;">
16 <?dbhtml filename="elogind.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>elogind-&elogind-version;</title>
24
25 <indexterm zone="elogind">
26 <primary sortas="a-elogind">elogind</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to elogind</title>
31
32 <para>
33 <application>elogind</application> is the
34 <application>systemd</application> project's "logind", extracted out to
35 be a standalone daemon. It integrates with <xref linkend="linux-pam"/>
36 to know the set of users that are logged in to a system and whether they
37 are logged in graphically, on the console, or remotely.
38 <application>Elogind</application> exposes this information via the
39 standard org.freedesktop.login1 <application>D-Bus</application>
40 interface, as well as through the file system using systemd's standard
41 <filename class="directory">/run/systemd</filename> layout.
42 </para>
43
44 &lfs90_checked;
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>
50 Download (HTTP): <ulink url="&elogind-download-http;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download (FTP): <ulink url="&elogind-download-ftp;"/>
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download MD5 sum: &elogind-md5sum;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download size: &elogind-size;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated disk space required: &elogind-buildsize;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Estimated build time: &elogind-time;
76 </para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">elogind Dependencies</bridgehead>
81
82 <bridgehead renderas="sect4">Required</bridgehead>
83 <para role="required">
84 <xref role="first" linkend="dbus"/>
85 </para>
86
87 <bridgehead renderas="sect4">Recommended</bridgehead>
88 <para role="recommended">
89 <xref linkend="DocBook"/>,
90 <xref linkend="docbook-xsl"/>, and
91 <xref linkend="libxslt"/> (to build the man pages),
92 <xref linkend="linux-pam"/>, and
93 <xref linkend="polkit" role="runtime"/> (runtime)
94 </para>
95
96 <bridgehead renderas="sect4">Optional</bridgehead>
97 <para role="optional">
98 For the tests:
99 <xref linkend="lxml"/>,
100 <xref linkend="gobject-introspection"/>,
101 <xref linkend="zsh"/>,
102 <xref linkend="valgrind"/>,
103 <ulink url="https://github.com/linux-audit/audit-userspace">
104 audit-userspace</ulink>,
105 <ulink url="https://github.com/scop/bash-completion">
106 bash-completion</ulink>,
107 <ulink url="https://mirrors.edge.kernel.org/pub/linux/utils/kernel/kexec/">
108 kexec</ulink>, and
109 <ulink url="http://www.selinuxproject.org/page/Main_Page">
110 SELinux</ulink>
111 </para>
112
113 <para condition="html" role="usernotes">User Notes:
114 <ulink url="&blfs-wiki;/elogind"/>
115 </para>
116 </sect2>
117
118 <sect2 role="kernel" id="elogind-kernel">
119 <title>Kernel Configuration</title>
120
121 <para>
122 Enable the following options in the kernel configuration and recompile the
123 kernel if necessary:
124 </para>
125
126<!-- Spaces are significant in <screen> sections -->
127<screen><literal>General setup ---&gt;
128 [*] Control Group support [CONFIG_CGROUPS]
129File systems ---&gt;
130 [*] Inotify support for userspace [CONFIG_INOTIFY_USER]
131 Pseudo filesystems ---&gt;
132 [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]</literal></screen>
133
134 <para>
135 In addition, some tests need the userspace cryptographic kernel API, which
136 is enabled with:
137 </para>
138
139<screen><literal>
140-*- Cryptographic API ---&gt; [CONFIG_CRYPTO]
141 &lt;M/*&gt; Userspace cryptographic algorithm configuration [CONFIG_CRYPTO_USER]
142 &lt;M/*&gt; User-space interface for hash algorithms [CONFIG_CRYPTO_USER_API_HASH]</literal></screen>
143
144 <indexterm zone="elogind elogind-kernel">
145 <primary sortas="d-elogind">elogind</primary>
146 </indexterm>
147 </sect2>
148
149 <sect2 role="installation">
150 <title>Installation of elogind</title>
151
152 <para>
153 First fix an issue with reading a session file:
154 </para>
155
156<screen><userinput>sed -e '/dirent-util/a #include "env-file.h"' \
157 -e '/sessions/{n;n;s/=.*$/= parse_env_file (NULL, p, "UID", \&amp;s);/}' \
158 -i src/basic/cgroup-util.c</userinput></screen>
159
160 <para>
161 Install <application>elogind</application> by running the following
162 commands:
163 </para>
164
165<screen><userinput>mkdir build &amp;&amp;
166cd build &amp;&amp;
167
168meson --prefix=/usr \
169 --sysconfdir=/etc \
170 --localstatedir=/var \
171 -Dcgroup-controller=elogind \
172 -Ddbuspolicydir=/etc/dbus-1/system.d \
173<!-- needed in 243.4 -Dman=auto \
174--> .. &amp;&amp;
175ninja</userinput></screen>
176
177 <para>
178 To test the results, issue: <command>ninja test</command>. A few tests
179 are skipped if not run with <systemitem class="username">root</systemitem>
180 privileges.
181 </para>
182
183 <para>
184 Now, as the <systemitem class="username">root</systemitem> user:
185 </para>
186
187<screen role="root"><userinput>ninja install &amp;&amp;
188ln -sfv libelogind.pc /usr/lib/pkgconfig/libsystemd.pc &amp;&amp;
189ln -sfvn elogind /usr/include/systemd</userinput></screen>
190
191 </sect2>
192
193 <sect2 role="commands">
194 <title>Command Explanations</title>
195
196 <para>
197 <parameter>-Dcgroup-controller=elogind</parameter>: This switch ensures
198 that <application>elogind</application> is selected as the cgroup
199 controller, even if booted with another running cgroup controller.
200 </para>
201
202 <para>
203 <parameter>-Ddbuspolicydir=/etc/dbus-1/system.d</parameter>: This switch
204 sets the location of the <application>D-Bus</application> policy
205 directory.
206 </para>
207<!-- added in 243.4
208 <para>
209 <parameter>-Dman=auto</parameter>: The default value of this switch is
210 <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
211 allows building and installing the man pages if the recommended
212 dependencies are installed.
213 </para>-->
214
215 <para>
216 <command>ln -s ...</command>: These commands install symlinks so that
217 software packages find systemd compatible library and headers.
218 </para>
219
220 </sect2>
221
222 <sect2 role="configuration">
223 <title>Configuring elogind</title>
224
225 <para>
226 Each user will need to register a user session using
227 <application>Linux-PAM</application> at login. The
228 <filename>/etc/pam.d/system-session</filename> file needs to
229 be modified and a new file needs to be created in order for
230 <command>elogind</command> to work correctly. Run the following
231 commands as the <systemitem class="username">root</systemitem> user:
232 </para>
233
234<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF" &amp;&amp;
235<literal># Begin elogind addition
236
237session required pam_loginuid.so
238session optional pam_elogind.so
239
240# End elogind addition</literal>
241EOF
242cat &gt; /etc/pam.d/elogind-user &lt;&lt; "EOF"
243<literal># Begin /etc/pam.d/elogind-user
244
245account required pam_access.so
246account include system-account
247
248session required pam_env.so
249session required pam_limits.so
250session required pam_unix.so
251session required pam_loginuid.so
252session optional pam_keyinit.so force revoke
253session optional pam_elogind.so
254
255auth required pam_deny.so
256password required pam_deny.so
257
258# End /etc/pam.d/elogind-user</literal>
259EOF</userinput></screen>
260
261 </sect2>
262
263 <sect2 role="content" revision="sysv">
264 <title>Contents</title>
265
266 <segmentedlist>
267 <segtitle>Installed Programs</segtitle>
268 <segtitle>Installed Library</segtitle>
269 <segtitle>Installed Directories</segtitle>
270
271 <seglistitem>
272 <seg>
273 busctl,
274 elogind-inhibit, and
275 loginctl
276 </seg>
277 <seg>
278 libelogind.so
279 </seg>
280 <seg>
281 /lib/elogind,
282 /etc/elogind,
283 /usr/include/elogind, and
284 /usr/share/doc/elogind-&elogind-version;
285 </seg>
286 </seglistitem>
287 </segmentedlist>
288
289 <variablelist>
290 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
291 <?dbfo list-presentation="list"?>
292 <?dbhtml list-presentation="table"?>
293
294 <varlistentry id="busctl">
295 <term><command>busctl</command></term>
296 <listitem>
297 <para>
298 is used to introspect and monitor the D-Bus bus.
299 </para>
300 <indexterm zone="elogind busctl">
301 <primary sortas="b-busctl">busctl</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 <varlistentry id="elogind-inhibit">
307 <term><command>elogind-inhibit</command></term>
308 <listitem>
309 <para>
310 is used to execute a program with a shutdown, sleep or idle
311 inhibitor lock taken.
312 </para>
313 <indexterm zone="elogind elogind-inhibit">
314 <primary sortas="b-elogind-inhibit">elogind-inhibit</primary>
315 </indexterm>
316 </listitem>
317 </varlistentry>
318
319 <varlistentry id="loginctl">
320 <term><command>loginctl</command></term>
321 <listitem>
322 <para>
323 is used to introspect and control the state of the elogind Login
324 Manager.
325 </para>
326 <indexterm zone="elogind loginctl">
327 <primary sortas="b-loginctl">loginctl</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
332 <varlistentry id="libelogind">
333 <term><filename class="libraryfile">libelogind.so</filename></term>
334 <listitem>
335 <para>
336 is the main elogind utility library.
337 </para>
338 <indexterm zone="elogind libelogind">
339 <primary sortas="c-libelogind">libelogind.so</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
344 </variablelist>
345
346 </sect2>
347
348</sect1>
349
Note: See TracBrowser for help on using the repository browser.