source: BOOK/final-system/common/systemd.xml@ 62afd55

clfs-3.0.0-systemd systemd
Last change on this file since 62afd55 was 62afd55, checked in by Chris Staub <chris@…>, 11 years ago

Avoid running setcap during systemd installation

  • Property mode set to 100644
File size: 18.2 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<sect1 id="ch-system-systemd" role="wrap">
8 <?dbhtml filename="systemd.html"?>
9
10 <title>Systemd-&systemd-version;</title>
11
12 <indexterm zone="ch-system-systemd">
13 <primary sortas="a-systemd">Systemd</primary>
14 </indexterm>
15
16 <sect2 role="package">
17 <title/>
18
19 <para>The systemd package is a system and service manager for Linux
20 operating systems.</para>
21
22 </sect2>
23
24 <sect2 role="installation">
25 <title>Installation of Systemd</title>
26
27 <para os="p1">Systemd 211 merged several libraries into
28 <filename class="libraryfile">libsystemd</filename>, but some packages
29 that use systemd still expect those separate libraries. Apply a patch
30 to allow backwards compatibility with these packages by
31 installing Pkg-config files for the old libraries:</para>
32
33<screen os="p2"><userinput>patch -Np1 -i ../&systemd-compat-patch;</userinput></screen>
34
35 <para os="s1">Prevent the <filename>Makefile</filename> from trying to run
36 <command>setcap</command> on <command>systemd-detect-virt</command>,
37 which will fail if the kernel or file system does not support extended
38 capabilities:</para>
39
40<screen os="s2"><userinput>sed -i '/virt-install-hook /d' Makefile.in</userinput></screen>
41
42 <para os="s3">The <filename>timesyncd.conf</filename> file contains a
43 reference to a non-existent <filename>timesyncd.conf(5)</filename> man
44 page. Remove that reference to avoid possible confusion:</para>
45
46<screen os="s4"><userinput>sed -i '/timesyncd.conf/d' src/timesync/timesyncd.conf.in</userinput></screen>
47
48 <para os="a">Prepare systemd for compilation:</para>
49
50<screen os="b"><userinput>./configure --prefix=/usr \
51 --sysconfdir=/etc --localstatedir=/var \
52 --libexecdir=/usr/lib --docdir=/usr/share/doc/systemd-&systemd-version; \
53 --with-rootprefix="" --with-rootlibdir=/lib \
54 --enable-split-usr --disable-gudev --with-kbd-loadkeys=/bin/loadkeys \
55 --with-kbd-setfont=/bin/setfont --with-dbuspolicydir=/etc/dbus-1/system.d \
56 --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
57 --with-dbussessionservicedir=/usr/share/dbus-1/services \
58 --with-dbussystemservicedir=/usr/share/dbus-1/system-services</userinput></screen>
59
60 <variablelist os="c">
61 <title>The meaning of the configure options:</title>
62
63 <varlistentry>
64 <term><parameter>--with-root*</parameter></term>
65 <listitem>
66 <para>These switches ensure that core programs and
67 shared libraries are installed in the subdirectories
68 of the root partition.</para>
69 </listitem>
70 </varlistentry>
71
72 <varlistentry>
73 <term><parameter>--enable-split-usr</parameter></term>
74 <listitem>
75 <para>This switch ensures that systemd will work on
76 systems where /bin, /lib and /sbin directories are not
77 symlinks to their /usr counterparts.</para>
78 </listitem>
79 </varlistentry>
80
81 <varlistentry>
82 <term><parameter>--disable-gudev</parameter></term>
83 <listitem>
84 <para>This switch prevents systemd from building
85 <filename class="libraryfile">libgudev</filename> as it requires
86 Glib, which is not installed in CLFS.</para>
87 </listitem>
88 </varlistentry>
89
90 <varlistentry>
91 <term><parameter>--with-dbus*</parameter></term>
92 <listitem>
93 <para>These switches ensure that D-Bus configuration files get
94 installed to the correct locations.</para>
95 </listitem>
96 </varlistentry>
97 </variablelist>
98
99 <para os="d">Compile the package:</para>
100
101<screen os="e"><userinput>make</userinput></screen>
102
103 <para os="f">Prevent a broken test case from running:</para>
104
105<screen os="g"><userinput remap="test">sed -e "s:test/udev-test.pl::g" \
106 -e "s:test-bus-cleanup\$(EXEEXT) ::g" \
107 -e "s:test-bus-gvariant\$(EXEEXT) ::g" \
108 -i Makefile</userinput></screen>
109
110 <para os="h">To test the results, issue:</para>
111
112<screen os="i"><userinput remap="test">make check</userinput></screen>
113
114 <para os="j">Install the package:</para>
115
116<screen os="k"><userinput>make install</userinput></screen>
117
118 <para os="l">Install documentation files that are not installed by default:</para>
119
120<screen os="m"><userinput>install -v -m644 man/*.html /usr/share/doc/systemd-&systemd-version;</userinput></screen>
121
122 <para os="n">Move NSS myhostname library to <filename class="directory">/lib
123</filename>:</para>
124
125<screen os="o"><userinput>mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
126
127 <para os="p">Remove an unnecessary directory:</para>
128
129<screen os="q"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
130
131 <para os="r">Create symlinks for backwards-compatibility with Sysvinit:</para>
132
133<screen os="s"><userinput>for tool in runlevel reboot shutdown poweroff halt telinit; do
134 ln -sfv ../bin/systemctl /sbin/$tool
135done
136ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
137
138 <para os="t">Modify a configuration file which references a group that
139 doesn't exist:</para>
140
141<screen os="u"><userinput>sed -i "s@root lock@root root@g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
142
143 </sect2>
144
145 <sect2 id="conf-systemd" role="configuration">
146 <title>Configuring Systemd</title>
147
148 <indexterm zone="conf-systemd">
149 <primary sortas="a-systemd">systemd</primary>
150 <secondary>configuring</secondary></indexterm>
151
152 <indexterm zone="conf-systemd">
153 <primary sortas="e-/etc/os-release">/etc/os-release</primary>
154 </indexterm>
155
156 <para>Create <filename>/etc/machine-id</filename> which is needed
157 by Journald:</para>
158
159<screen><userinput>systemd-machine-id-setup</userinput></screen>
160
161 <para>Create a file to identify the operating system.
162 <command>systemd</command> will use this file on boot to put information
163 on the screen.</para>
164
165<screen><userinput>cat &gt; /etc/os-release &lt;&lt; "EOF"
166# Begin /etc/os-release
167
168NAME=Cross-LFS
169ID=clfs
170
171PRETTY_NAME=Cross Linux From Scratch
172ANSI_COLOR=0;33
173
174VERSION=&version;
175VERSION_ID=&versionid;
176
177# End /etc/os-release
178EOF</userinput></screen>
179
180 </sect2>
181
182 <sect2 id="contents-systemd" role="content">
183 <title>Contents of Systemd</title>
184
185 <segmentedlist>
186 <segtitle>Installed programs</segtitle>
187 <segtitle>Installed libraries</segtitle>
188 <segtitle>Installed directories</segtitle>
189
190 <seglistitem>
191 <seg>bootctl, busctl, halt (link to systemctl), hostnamectl,
192 init (link to systemd), journalctl, kernel-install, localectl, loginctl,
193 machinectl, poweroff (link to systemctl), reboot (link to systemctl),
194 runlevel (link to systemctl), shutdown (link to systemctl),
195 systemctl, system-analyze, systemd-ask-password, systemd-cat,
196 systemd-cgls, systemd-cgtop, systemd-coredumpctl, systemd-delta,
197 systemd-detect-virt, systemd-inhibit, systemd-machine-id-setup,
198 systemd-notify, systemd-nspawn, systemd-run, systemd-stdio-bridge
199 (link to systemd-bus-proxyd), systemd-tmpfiles,
200 systemd-tty-ask-password-agent, telinit (link to systemctl),
201 timedatectl, udevadm</seg>
202 <seg>libnss_myhostname.so, libsystemd.so, libudev.so</seg>
203 <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
204 /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
205 /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
206 /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
207 /usr/lib/sysctl.d, /usr/lib/systemd,
208 /usr/share/doc-systemd-&systemd-version;, /usr/share/systemd,
209 /usr/share/zsh, /var/lib/systemd</seg>
210 </seglistitem>
211 </segmentedlist>
212
213 <variablelist>
214 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
215 <?dbfo list-presentation="list"?>
216 <?dbhtml list-presentation="table"?>
217
218 <varlistentry id="bootctl">
219 <term><command>bootctl</command></term>
220 <listitem>
221 <para>Controls the firmware and boot manager settings</para>
222 <indexterm zone="ch-system-systemd bootctl">
223 <primary sortas="b-bootctl">bootctl</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="busctl">
229 <term><command>busctl</command></term>
230 <listitem>
231 <para>Introspects and monitors the D-Bus bus</para>
232 <indexterm zone="ch-system-systemd busctl">
233 <primary sortas="b-busctl">busctl</primary>
234 </indexterm>
235 </listitem>
236 </varlistentry>
237
238 <varlistentry id="halt">
239 <term><command>halt</command></term>
240 <listitem>
241 <para>Halts, powers off, or reboots the machine</para>
242 <indexterm zone="ch-system-systemd halt">
243 <primary sortas="b-halt">halt</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
248 <varlistentry id="hostnamectl">
249 <term><command>hostnamectl</command></term>
250 <listitem>
251 <para>Controls the system hostname</para>
252 <indexterm zone="ch-system-systemd hostnamectl">
253 <primary sortas="b-hostnamectl">hostnamectl</primary>
254 </indexterm>
255 </listitem>
256 </varlistentry>
257
258 <varlistentry id="init">
259 <term><command>init</command></term>
260 <listitem>
261 <para>systemd system and service manager</para>
262 <indexterm zone="ch-system-systemd init">
263 <primary sortas="b-init">init</primary>
264 </indexterm>
265 </listitem>
266 </varlistentry>
267
268 <varlistentry id="journalctl">
269 <term><command>journalctl</command></term>
270 <listitem>
271 <para>Queries the systemd journal</para>
272 <indexterm zone="ch-system-systemd journalctl">
273 <primary sortas="b-journalctl">journalctl</primary>
274 </indexterm>
275 </listitem>
276 </varlistentry>
277
278 <varlistentry id="kernel-install">
279 <term><command>kernel-install</command></term>
280 <listitem>
281 <para>Adds and removes kernel and initramfs images to and from
282 <filename class="directory">/boot</filename></para>
283 <indexterm zone="ch-system-systemd kernel-install">
284 <primary sortas="b-kernel-install">kernel-install</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="localectl">
290 <term><command>localectl</command></term>
291 <listitem>
292 <para>Controls the system locale and keyboard layout settings</para>
293 <indexterm zone="ch-system-systemd localectl">
294 <primary sortas="b-localectl">localectl</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>
298
299 <varlistentry id="loginctl">
300 <term><command>loginctl</command></term>
301 <listitem>
302 <para>Controls the systemd login manager</para>
303 <indexterm zone="ch-system-systemd loginctl">
304 <primary sortas="b-loginctl">loginctl</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 <varlistentry id="machinectl">
310 <term><command>machinectl</command></term>
311 <listitem>
312 <para>Controls the systemd machine manager</para>
313 <indexterm zone="ch-system-systemd machinectl">
314 <primary sortas="b-machinectl">machinectl</primary>
315 </indexterm>
316 </listitem>
317 </varlistentry>
318
319 <varlistentry id="poweroff">
320 <term><command>poweroff</command></term>
321 <listitem>
322 <para>Halts, powers off, or reboots the machine</para>
323 <indexterm zone="ch-system-systemd poweroff">
324 <primary sortas="b-poweroff">poweroff</primary>
325 </indexterm>
326 </listitem>
327 </varlistentry>
328
329 <varlistentry id="reboot">
330 <term><command>reboot</command></term>
331 <listitem>
332 <para>Halts, powers off, or reboots the machine</para>
333 <indexterm zone="ch-system-systemd reboot">
334 <primary sortas="b-reboot">reboot</primary>
335 </indexterm>
336 </listitem>
337 </varlistentry>
338
339 <varlistentry id="runlevel">
340 <term><command>runlevel</command></term>
341 <listitem>
342 <para>Prints previous and current SysV runlevel</para>
343 <indexterm zone="ch-system-systemd runlevel">
344 <primary sortas="b-runlevel">runlevel</primary>
345 </indexterm>
346 </listitem>
347 </varlistentry>
348
349 <varlistentry id="shutdown">
350 <term><command>shutdown</command></term>
351 <listitem>
352 <para>Halts, powers off, or reboots the machine</para>
353 <indexterm zone="ch-system-systemd shutdown">
354 <primary sortas="b-shutdown">shutdown</primary>
355 </indexterm>
356 </listitem>
357 </varlistentry>
358
359 <varlistentry id="systemctl">
360 <term><command>systemctl</command></term>
361 <listitem>
362 <para>Control the systemd system and service manager</para>
363 <indexterm zone="ch-system-systemd systemctl">
364 <primary sortas="b-systemctl">systemctl</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368
369 <varlistentry id="systemd">
370 <term><command>systemd</command></term>
371 <listitem>
372 <para>System and service manager for Linux</para>
373 <indexterm zone="ch-system-systemd systemd">
374 <primary sortas="b-systemd">systemd</primary>
375 </indexterm>
376 </listitem>
377 </varlistentry>
378
379 <varlistentry id="systemd-analyze">
380 <term><command>systemd-analyze</command></term>
381 <listitem>
382 <para>Analyzes system boot-up permformance</para>
383 <indexterm zone="ch-system-systemd systemd-analyze">
384 <primary sortas="b-systemd-analyze">systemd-analyze</primary>
385 </indexterm>
386 </listitem>
387 </varlistentry>
388
389 <varlistentry id="systemd-ask-password">
390 <term><command>systemd-ask-password</command></term>
391 <listitem>
392 <para>Queries the user for a system passphrase, via the
393 TTY or an UI agent.</para>
394 <indexterm zone="ch-system-systemd systemd-ask-password">
395 <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
396 </indexterm>
397 </listitem>
398 </varlistentry>
399
400 <varlistentry id="systemd-cat">
401 <term><command>systemd-cat</command></term>
402 <listitem>
403 <para>Connects a pipeline or program's output with the journal</para>
404 <indexterm zone="ch-system-systemd systemd-cat">
405 <primary sortas="b-systemd-cat">systemd-cat</primary>
406 </indexterm>
407 </listitem>
408 </varlistentry>
409
410 <varlistentry id="systemd-cgls">
411 <term><command>systemd-cgls</command></term>
412 <listitem>
413 <para>Recursively shows control group contents</para>
414 <indexterm zone="ch-system-systemd systemd-cgls">
415 <primary sortas="b-systemd-cgls">systemd-cgls</primary>
416 </indexterm>
417 </listitem>
418 </varlistentry>
419
420 <varlistentry id="systemd-notify">
421 <term><command>systemd-notify</command></term>
422 <listitem>
423 <para>Notify init system about start-up completion and other daemon
424 status changes</para>
425 <indexterm zone="ch-system-systemd systemd-notify">
426 <primary sortas="b-systemd-notify">systemd-notify</primary>
427 </indexterm>
428 </listitem>
429 </varlistentry>
430
431 <varlistentry id="systemd-tty-ask-password-agent">
432 <term><command>systemd-tty-ask-password-agent</command></term>
433 <listitem>
434 <para>Process system password requests</para>
435 <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
436 <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
437 </indexterm>
438 </listitem>
439 </varlistentry>
440
441 <varlistentry id="telinit">
442 <term><command>telinit</command></term>
443 <listitem>
444 <para>Tells <command>init</command> which run-level to change to</para>
445 <indexterm zone="ch-system-systemd telinit">
446 <primary sortas="b-telinit">telinit</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry id="pam_systemd">
452 <term><filename class="libraryfile">pam_systemd</filename></term>
453 <listitem>
454 <para>Register user sessions in the systemd control group
455 hierarchy</para>
456 <indexterm zone="ch-system-systemd pam_systemd">
457 <primary sortas="c-pam_systemd">pam_systemd</primary>
458 </indexterm>
459 </listitem>
460 </varlistentry>
461
462 <varlistentry id="lib-systemd">
463 <term><filename class="directory">/lib/systemd</filename></term>
464 <listitem>
465 <para>Location of system units and configurations</para>
466 <indexterm zone="ch-system-systemd lib-systemd">
467 <primary sortas="e-/lib/systemd">/lib/systemd</primary>
468 </indexterm>
469 </listitem>
470 </varlistentry>
471
472 <varlistentry id="etc-systemd">
473 <term><filename class="directory">/etc/systemd</filename></term>
474 <listitem>
475 <para>Location of user units and configurations</para>
476 <indexterm zone="ch-system-systemd etc-systemd">
477 <primary sortas="e-/etc/systemd">/etc/systemd</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="etc-tmpfilesd">
483 <term><filename class="directory">/etc/tmpfiles.d</filename></term>
484 <listitem>
485 <para>Configuration for creation, deletion and cleaning of temporary
486 and volatile files</para>
487 <indexterm zone="ch-system-systemd etc-tmpfilesd">
488 <primary sortas="e-/etc/tmpfiles.d">/etc/tmpfiles.d</primary>
489 </indexterm>
490 </listitem>
491 </varlistentry>
492
493 <varlistentry id="usr-share-systemd">
494 <term><filename class="directory">/usr/share/systemd</filename></term>
495 <listitem>
496 <para>Location of session unit files</para>
497 <indexterm zone="ch-system-systemd usr-share-systemd">
498 <primary sortas="e-/usr/share/systemd">/usr/share/systemd</primary>
499 </indexterm>
500 </listitem>
501 </varlistentry>
502
503 </variablelist>
504
505 </sect2>
506
507</sect1>
Note: See TracBrowser for help on using the repository browser.