source: general/sysutils/systemd.xml@ 1a8040a

11.1 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/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 1a8040a was 7cc0c9d, checked in by Douglas R. Reno <renodr@…>, 3 years ago

Package updates:

Update to Mesa-21.3.3
Update to systemd-250

  • Property mode set to 100644
File size: 16.1 KB
RevLine 
[f852e706]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
[4478c65a]7 <!-- <!ENTITY systemd-download-http "http://anduin.linuxfromscratch.org/LFS/systemd-&systemd-version;-&systemd-stable;.tar.xz"> For whenever we move to a stable snapshot for backports -->
8 <!ENTITY systemd-download-http "https://github.com/systemd/systemd/archive/v&systemd-version;/systemd-&systemd-version;.tar.gz">
[f852e706]9 <!ENTITY systemd-download-ftp " ">
[7cc0c9d]10 <!ENTITY systemd-md5sum "8929beb037c587ada4ed201f19756fe2">
11 <!ENTITY systemd-size "11 MB">
12 <!ENTITY systemd-buildsize "307 MB (with tests)">
[4f60bf0]13 <!ENTITY systemd-time "2.5 SBU (with tests)">
[f852e706]14
15]>
16
[4478c65a]17<sect1 id="systemd" xreflabel="Systemd-&systemd-version;" revision="systemd">
[f852e706]18 <?dbhtml filename="systemd.html"?>
19
20 <sect1info>
21 <date>$Date$</date>
22 </sect1info>
23
[4478c65a]24 <title>Systemd-&systemd-version;</title>
25 <!-- Whenever we switch back to stable backports, make sure to add the systemd-stable reference back. -->
[f852e706]26
27 <indexterm zone="systemd">
28 <primary sortas="a-systemd">systemd</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to systemd</title>
33
34 <para>
35 While <application>systemd</application> was installed when
36 building LFS, there are many features provided by the package that
[77a6d25]37 were not included in the initial installation because
[f852e706]38 <application>Linux-PAM</application> was not yet installed.
39 The <application>systemd</application> package needs to be
40 rebuilt to provide a working <command>systemd-logind</command> service,
[77a6d25]41 which provides many additional features for dependent packages.
[f852e706]42 </para>
[8558044]43
[34a6571]44 &lfs110a_checked;
[f852e706]45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
[b1532549]49 <para>
50 Download (HTTP): <ulink url="&systemd-download-http;"/>
51 </para>
[f852e706]52 </listitem>
53 <listitem>
[b1532549]54 <para>
55 Download (FTP): <ulink url="&systemd-download-ftp;"/>
56 </para>
[f852e706]57 </listitem>
58 <listitem>
[b1532549]59 <para>
60 Download MD5 sum: &systemd-md5sum;
61 </para>
[f852e706]62 </listitem>
63 <listitem>
[b1532549]64 <para>
65 Download size: &systemd-size;
66 </para>
[f852e706]67 </listitem>
68 <listitem>
[b1532549]69 <para>
70 Estimated disk space required: &systemd-buildsize;
71 </para>
[f852e706]72 </listitem>
73 <listitem>
[b1532549]74 <para>
75 Estimated build time: &systemd-time;
76 </para>
[f852e706]77 </listitem>
78 </itemizedlist>
[c130abf]79
[7cc0c9d]80<!--
[b5d17476]81 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
82 <itemizedlist spacing="compact">
83 <listitem>
84 <para>
85 Required patch:
[229d069]86 <ulink url="&patch-root;/systemd-&systemd-version;-upstream_fixes-1.patch"/>
[b5d17476]87 </para>
88 </listitem>
89 </itemizedlist>
[7cc0c9d]90-->
[c130abf]91
[f852e706]92 <bridgehead renderas="sect3">systemd Dependencies</bridgehead>
93
94 <bridgehead renderas="sect4">Required</bridgehead>
95 <para role="required">
[4f60bf0]96 <xref linkend="Jinja2"/> and
[f852e706]97 <xref linkend="linux-pam"/>
98 </para>
99
[c7ab75e8]100 <bridgehead renderas="sect4">Recommended Runtime Dependencies</bridgehead>
[f852e706]101 <para role="recommended">
[8558044]102 <xref role="runtime" linkend="polkit"/>
[f852e706]103 </para>
104
105 <bridgehead renderas="sect4">Optional</bridgehead>
106 <para role="optional">
[81e5e5a]107 <xref linkend="btrfs-progs"/>, <!-- homed may support it, see the C.E.-->
[f852e706]108 <xref linkend="curl"/>,
[b1be08a]109 <xref linkend="cryptsetup"/>,
[5fff3896]110 <xref linkend="git"/>,
[f852e706]111 <xref linkend="gnutls"/>,
112 <xref linkend="iptables"/>,
113 <xref linkend="libgcrypt"/>,
[531f138]114 <xref linkend="libidn2"/>,
[c130abf]115 <xref linkend="libpwquality"/>,
[11f3b7e]116 <xref linkend="libseccomp"/>,
[f852e706]117 <xref linkend="libxkbcommon"/>,
[b1be08a]118 <xref linkend="make-ca"/>,
[58ab63b9]119 <xref linkend="p11-kit"/>,
[ebb31dbd]120 <xref linkend="pcre2"/>,
[f852e706]121 <xref linkend="qemu"/>,
[206e0be]122 <xref linkend="qrencode"/>,
[115de74]123 <xref linkend="rsync"/>,
[f852e706]124 <xref linkend="valgrind"/>,
[7c99c52]125 <xref linkend="zsh"/> (for the zsh completions),
[c6b192c]126 <ulink url="https://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
[f852e706]127 <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
[7cc0c9d]128 <ulink url="https://github.com/libbpf/libbpf">libbpf</ulink>,
[229d069]129 <ulink url="https://sourceware.org/elfutils/">libdw</ulink>,
[ae0944a3]130 <ulink url="https://developers.yubico.com/libfido2/">libfido2</ulink>,
[f852e706]131 <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
[331a2b7]132 <ulink url="http://lz4.github.io/lz4/">lz4</ulink>,
[206e0be]133 <!--<ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,-->
[229d069]134 <ulink url="https://sourceforge.net/projects/linuxquota/">quota-tools</ulink>,
135 <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>, and
136 <ulink url="https://tpm2-tss.readthedocs.io/en/latest/">tpm2-tss</ulink>
[f852e706]137 </para>
138
139 <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
140 <para role="optional">
141 <xref linkend="DocBook"/>,
[6f8d4ed]142 <xref linkend="docbook-xsl"/>,
143 <xref linkend="libxslt"/>, and
144 <xref linkend="lxml"/> (to build the index of systemd manual pages)
[f852e706]145 </para>
146
147 <para condition="html" role="usernotes">User Notes:
148 <ulink url="&blfs-wiki;/systemd"/>
149 </para>
150 </sect2>
151
152 <sect2 role="installation">
153 <title>Installation of systemd</title>
[ccc69593]154
[7cc0c9d]155<!--
[b1532549]156 <para>
[1fb59138]157 Apply a patch to fix a security vulnerability:
[b1532549]158 </para>
[93caa46]159
[229d069]160<screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-upstream_fixes-1.patch</userinput></screen>
[7cc0c9d]161-->
[b29b596]162
[b1532549]163 <para>
[4f60bf0]164 Remove two unneeded groups,
165 <systemitem class="groupname">render</systemitem> and
166 <systemitem class="groupname">sgx</systemitem>, from the default udev
[b1532549]167 rules:
168 </para>
[b4e1b81]169
[4f60bf0]170<screen><userinput remap="pre">sed -i -e 's/GROUP="render"/GROUP="video"/' \
171 -e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in</userinput></screen>
[b4e1b81]172
[f852e706]173 <para>
174 Rebuild <application>systemd</application> by running the
175 following commands:
176 </para>
177
[e1a8598d]178<screen><userinput>mkdir build &amp;&amp;
179cd build &amp;&amp;
180
[110854d]181meson --prefix=/usr \
[3918112a]182 --buildtype=release \
[110854d]183 -Dblkid=true \
184 -Ddefault-dnssec=no \
185 -Dfirstboot=false \
186 -Dinstall-tests=false \
187 -Dldconfig=false \
188 -Dman=auto \
189 -Dsysusers=false \
190 -Drpmmacrosdir=no \
191 -Db_lto=false \
192 -Dhomed=false \
193 -Duserdb=false \
[ae0944a3]194 -Dmode=release \
195 -Dpamconfdir=/etc/pam.d \
[ec0f2a5]196 -Ddocdir=/usr/share/doc/systemd-&systemd-version; \
[110854d]197 .. &amp;&amp;
[e1a8598d]198
[71becb2]199ninja</userinput></screen>
[bdfc854]200<!-- Regarding homed and userdb, see the note below in Command Explanations-->
[f852e706]201
202 <note>
203 <para>
[e1a8598d]204 For the best test results, make sure you run the testsuite from
[f852e706]205 a system that is booted by the same
206 <application>systemd</application> version you are rebuilding.
207 </para>
208 </note>
209
210 <para>
[df6f75d8]211 To test the results, issue:
212 <command>PATH+=:/usr/sbin ninja test</command>.
213 <!-- One test named test-repart needs sfdisk, which is in /usr/sbin. -->
[f852e706]214 </para>
215
[a761478]216<!--
[f852e706]217 <warning>
218 <para>
219 Installing the package will overwrite all files installed by
220 <application>systemd</application> in LFS. It is critical that
221 nothing uses either <application>systemd</application> or
222 <application>Udev</application> libraries during the installation.
223 The best way to ensure that these libraries are not being used is to
224 run the installation in rescue mode. To switch to rescue mode,
225 run the following command as the
226 <systemitem class="username">root</systemitem> user (from a TTY):
227 </para>
228
[004a11fc]229<screen role="root"><userinput>systemctl isolate rescue.target</userinput></screen>
[f852e706]230 </warning>
[a761478]231 Nobody has reported problems with this in years. Let's comment it. -->
[f852e706]232
233 <para>
234 Now, as the <systemitem class="username">root</systemitem> user:
235 </para>
236
[71becb2]237<screen role="root"><userinput>ninja install</userinput></screen>
[7cc0c9d]238
239 <para>
240 Fix a problem in a systemd unit that can cause extra delays when
241 changing TTYs:
242 </para>
243
244<screen role="root"><userinput>sed -i 's/idle/simple/' /usr/lib/systemd/system/getty@.service</userinput></screen>
245
[3c7458ca]246 <!-- No longer needed as of systemd-244.
[b1532549]247 <para>
248 Remove a configuration file that causes some problems with PID files:
249 </para>
[0dccf0ff]250
251<screen role="root"><userinput>rm -fv /etc/sysctl.d/50-pid-max.conf</userinput></screen>
[3c7458ca]252 -->
[f852e706]253 </sect2>
254
[bdfc854]255 <sect2 role="commands">
256 <title>Command Explanations</title>
257
[6742509c]258<!-- Not needed with the patch
[110854d]259 <para>
260 <parameter>-Dc_args=-Wno-format-overflow</parameter>: Prevents an error
261 when building with <application>GCC 10</application>. The default is
[8558044]262 <option>-Werror=format-overflow</option>,
[110854d]263 which generates false positives. This switch may be used with previous
264 versions of GCC too.
265 </para>
[6742509c]266-->
[110854d]267
[3918112a]268 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
269 href="../../xincludes/meson-buildtype-release.xml"/>
270
[ae0944a3]271 <para>
272 <parameter>-Dpamconfdir=/etc/pam.d</parameter>: Forces the PAM files to
273 be installed in /etc/pam.d rather than /usr/lib/pam.d.
274 </para>
275
[bdfc854]276 <para>
277 <parameter>-Duserdb=false</parameter>: Removes a daemon that does not
278 offer any use under a BLFS configuration. If you wish to enable the
279 <application>userdbd</application> daemon, replace "false" with "true"
280 in the above meson command.
281 </para>
282
283 <para>
[229d069]284 <parameter>-Dhomed=false</parameter>: Removes a daemon that does not offer
[bdfc854]285 any use under a traditional BLFS configuration, especially using accounts
286 created with useradd. To enable systemd-homed, first ensure that you have
287 <xref linkend="cryptsetup"/> and <xref linkend="libpwquality"/>, and then
288 change "false" to "true" in the above meson command.
289 </para>
290
291 <!-- EDITORS NOTE: Explanation on removing userdbd and homed:
292 In BLFS, we do not fully support disk encryption. We offer instructions for
293 building 'cryptsetup' as a dependency, but we do not offer instructions for
294 actually configuring it. In addition, we generally do not include
295 functionality that could potentially conflict with other packages, or that
296 is not of any use to us (in an enterprise configuration using Thin Clients
297 or laptops with LUKS encryption, it could make sense though, but that isn't
298 the configuration that we natively support).
299
300 A few of the complications of systemd-homed include:
301 - SSH Logins
302 - Disk Space Assignments
303 - UID Assignments (chown() on login)
304 (See https://cfp.all-systems-go.io/media/homed-asg2019.pdf)
305
306 In an article I read when systemd-homed was originally unveiled, I remember
307 reading about systemd-homed causing problems with OpenSSH Private Key Auth
308 because the user would have to login at the console in order to unlock
309 their home directory, thus allowing the private key to be unlocked and
310 processed by OpenSSH. Since BLFS does not fully support encrypted disks,
311 and because systemd-homed is incompatible with our usage of useradd /
312 traditional UNIX users and groups, I advise that we take the following
313 approach to avoid any confusion:
314
315 - Leave the added Short Descriptions for homectl and userdbctl
316 - Add the above command explanations and restore the previous behavior
317
[8558044]318 Should we decide to enable homed by default anytime in the future,
[bdfc854]319 let's move cryptsetup to recommended or required.
320
321 I would be open to discussing this after the next systemd version when
322 systemd-homed has matured a bit more. -renodr -->
323
324 </sect2>
325
[f852e706]326 <sect2 role="configuration">
327 <title>Configuring systemd</title>
328
329 <para>
[325d88d6]330 The <filename>/etc/pam.d/system-session</filename> file needs to
[f852e706]331 be modified and a new file needs to be created in order for
332 <command>systemd-logind</command> to work correctly. Run the following
333 commands as the <systemitem class="username">root</systemitem> user:
334 </para>
335
[cb8d788]336<screen role="root"><userinput>grep 'pam_systemd' /etc/pam.d/system-session ||
337cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
[f852e706]338<literal># Begin Systemd addition
[8558044]339
[d267a13]340session required pam_loginuid.so
341session optional pam_systemd.so
[f852e706]342
343# End Systemd addition</literal>
344EOF
345
346cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
347<literal># Begin /etc/pam.d/systemd-user
348
[d267a13]349account required pam_access.so
350account include system-account
[f852e706]351
[d267a13]352session required pam_env.so
353session required pam_limits.so
354session required pam_unix.so
355session required pam_loginuid.so
356session optional pam_keyinit.so force revoke
357session optional pam_systemd.so
[f852e706]358
[d267a13]359auth required pam_deny.so
360password required pam_deny.so
[f852e706]361
362# End /etc/pam.d/systemd-user</literal>
363EOF</userinput></screen>
364
[a761478]365<!--
[f852e706]366 <para>
367 At this point, you should reload the systemd daemon, and reenter
368 multi-user mode with the following commands (as the
[004a11fc]369 <systemitem class="username">root</systemitem> user). If a desktop
370 manager is installed and you wish to reenter the graphical mode,
371 replace <userinput>multi-user.target</userinput> with
372 <userinput>graphical.target</userinput>:
[f852e706]373 </para>
374
[004a11fc]375<screen role="root"><userinput>systemctl daemon-reexec
[a761478]376systemctl start multi-user.target</userinput></screen>-->
[f852e706]377
[b1532549]378 <warning>
379 <para>
380 If upgrading from a previous version of systemd and an
381 initrd is used for system boot, you should generate a new initrd before
382 rebooting the system.
383 </para>
384 </warning>
[f852e706]385
386 </sect2>
387
388 <sect2 role="content">
389 <title>Contents</title>
390
391 <para>
392 A list of the installed files, along with their short
393 descriptions can be found at
[f0dc9578]394 <ulink url="&lfs-root;/chapter08/systemd.html#contents-systemd"/>.
[f852e706]395 </para>
396
397 <para>
[a17c33d]398 Listed below are the newly installed programs
[f852e706]399 along with short descriptions.
400 </para>
401
402 <segmentedlist>
403 <segtitle>Installed Programs</segtitle>
404
405 <seglistitem>
406 <seg>
[6a609bd7]407 <!-- maybe userdbd/userdbctl can go in LFS, try at next time -->
408 homectl (if <xref linkend="cryptsetup"/> is installed)
[bdfc854]409 and userdbctl (optionally)
[f852e706]410 </seg>
411 </seglistitem>
412 </segmentedlist>
413
414 <variablelist>
415 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
416 <?dbfo list-presentation="list"?>
417 <?dbhtml list-presentation="table"?>
418
[6a609bd7]419 <varlistentry id="homectl">
420 <term><command>homectl</command></term>
421 <listitem>
422 <para>
423 is a tool to create, remove, change, or inspect a home directory
424 managed by <command>systemd-homed</command>; note that it's
425 useless for the classic UNIX users and home directories which
426 we are using in LFS/BLFS book
427 </para>
428 <indexterm zone="systemd homectl">
429 <primary sortas="b-homectl">homectl</primary>
430 </indexterm>
431 </listitem>
432 </varlistentry>
433
434 <varlistentry id="userdbctl">
435 <term><command>userdbctl</command></term>
436 <listitem>
437 <para>
[ccc69593]438 inspects users, groups, and group memberships
[6a609bd7]439 </para>
440 <indexterm zone="systemd userdbctl">
441 <primary sortas="b-userdbctl">userdbctl</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
[f852e706]446 <varlistentry id="pam_systemd">
447 <term><filename class="libraryfile">pam_systemd.so</filename></term>
448 <listitem>
449 <para>
450 is a PAM module used to register user sessions with the
451 <application>systemd</application> login manager,
[4c24eb0a]452 <command>systemd-logind</command>
[f852e706]453 </para>
454 <indexterm zone="systemd pam_systemd">
455 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
456 </indexterm>
457 </listitem>
458 </varlistentry>
459
460 </variablelist>
461
462 </sect2>
463
464</sect1>
Note: See TracBrowser for help on using the repository browser.