source: general/sysutils/systemd.xml@ b1532549

10.0 10.1 11.0 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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since b1532549 was b1532549, checked in by Pierre Labastie <pieere@…>, 4 years ago

Format sysutils

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

  • Property mode set to 100644
File size: 11.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 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">
9 <!ENTITY systemd-download-ftp " ">
10 <!ENTITY systemd-md5sum "413121fe918b252ae62310f6fc7c4b32">
11 <!ENTITY systemd-size "8.1 MB">
12 <!ENTITY systemd-buildsize "240 MB (with tests)">
13 <!ENTITY systemd-time "2.0 SBU (with tests)">
14
15]>
16
17<sect1 id="systemd" xreflabel="Systemd-&systemd-version;" revision="systemd">
18 <?dbhtml filename="systemd.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>Systemd-&systemd-version;</title>
26 <!-- Whenever we switch back to stable backports, make sure to add the systemd-stable reference back. -->
27
28 <indexterm zone="systemd">
29 <primary sortas="a-systemd">systemd</primary>
30 </indexterm>
31
32 <sect2 role="package">
33 <title>Introduction to systemd</title>
34
35 <para>
36 While <application>systemd</application> was installed when
37 building LFS, there are many features provided by the package that
38 were not included in the initial installation because
39 <application>Linux-PAM</application> was not yet installed.
40 The <application>systemd</application> package needs to be
41 rebuilt to provide a working <command>systemd-logind</command> service,
42 which provides many additional features for dependent packages.
43 </para>
44
45 &lfs91_checked;
46
47 <bridgehead renderas="sect3">Package Information</bridgehead>
48 <itemizedlist spacing="compact">
49 <listitem>
50 <para>
51 Download (HTTP): <ulink url="&systemd-download-http;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download (FTP): <ulink url="&systemd-download-ftp;"/>
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download MD5 sum: &systemd-md5sum;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download size: &systemd-size;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated disk space required: &systemd-buildsize;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Estimated build time: &systemd-time;
77 </para>
78 </listitem>
79 </itemizedlist>
80
81 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
82 <itemizedlist spacing="compact">
83 <listitem>
84 <para>
85 Required patch:
86 <ulink url="&patch-root;/systemd-&systemd-version;-seccomp_and_cpuaffinity_fix-1.patch"/>
87 </para>
88 </listitem>
89 </itemizedlist>
90
91 <bridgehead renderas="sect3">systemd Dependencies</bridgehead>
92
93 <bridgehead renderas="sect4">Required</bridgehead>
94 <para role="required">
95 <xref linkend="linux-pam"/>
96 </para>
97
98 <bridgehead renderas="sect4">Recommended Runtime Dependencies</bridgehead>
99 <para role="recommended">
100 <xref role="runtime" linkend="polkit"/>
101 </para>
102
103 <bridgehead renderas="sect4">Optional</bridgehead>
104 <para role="optional">
105 <xref linkend="curl"/>,
106 <xref linkend="cryptsetup"/>,
107 <xref linkend="git"/>,
108 <xref linkend="gnutls"/>,
109 <xref linkend="iptables"/>,
110 <xref linkend="libgcrypt"/>,
111 <xref linkend="libidn2"/>,
112 <xref linkend="libseccomp"/>,
113 <xref linkend="libxkbcommon"/>,
114 <xref linkend="make-ca"/>,
115 <xref linkend="pcre2"/>,
116 <xref linkend="qemu"/>,
117 <xref linkend="valgrind"/>,
118 <xref linkend="zsh"/> (for the zsh completions),
119 <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
120 <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
121 <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
122 <ulink url="http://lz4.github.io/lz4/">lz4</ulink>,
123 <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
124 <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
125 <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
126 </para>
127
128 <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
129 <para role="optional">
130 <xref linkend="DocBook"/>,
131 <xref linkend="docbook-xsl"/>,
132 <xref linkend="libxslt"/>, and
133 <xref linkend="lxml"/> (to build the index of systemd manual pages)
134 </para>
135
136 <para condition="html" role="usernotes">User Notes:
137 <ulink url="&blfs-wiki;/systemd"/>
138 </para>
139 </sect2>
140
141 <sect2 role="installation">
142 <title>Installation of systemd</title>
143 <!-- 243-244 is now supported, so let's comment this for now.
144 <warning>
145 <para>
146 This version of systemd is incompatible with all previous
147 releases. The BLFS team does not recommend updating in place, and
148 suggests that you do a rebuild instead.
149 </para>
150 </warning>
151 -->
152
153 <para>
154 Apply a patch to fix problems with libseccomp-2.4.2+ and Linux-5.4+:
155 </para>
156
157<screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-seccomp_and_cpuaffinity_fix-1.patch</userinput></screen>
158
159 <!-- The above is only needed on systems with Linux 5.4+ and libseccomp-2.4.2+
160 This fix is due to syscall changes in libseccomp+Linux 5.4+.
161 The affected syscall is shmat(), which isn't implemented properly on
162 i686, and intermittently fails on x86_64. Also, there is a problem with
163 CPU Affinity + CGroups on Linux-5.4+ that causes issues with the
164 "test-execute" test. -->
165
166 <para>
167 Remove an unneeded group,
168 <systemitem class="groupname">render</systemitem>, from the default udev
169 rules:
170 </para>
171
172<screen><userinput remap="pre">sed -i 's/GROUP="render", //' rules.d/50-udev-default.rules.in</userinput></screen>
173
174 <para>
175 Rebuild <application>systemd</application> by running the
176 following commands:
177 </para>
178
179<screen><userinput>mkdir build &amp;&amp;
180cd build &amp;&amp;
181
182meson --prefix=/usr \
183 --sysconfdir=/etc \
184 --localstatedir=/var \
185 -Dblkid=true \
186 -Dbuildtype=release \
187 -Ddefault-dnssec=no \
188 -Dfirstboot=false \
189 -Dinstall-tests=false \
190 -Dldconfig=false \
191 -Dman=auto \
192 -Drootprefix= \
193 -Drootlibdir=/lib \
194 -Dsplit-usr=true \
195 -Dsysusers=false \
196 -Drpmmacrosdir=no \
197 -Db_lto=false \
198 .. &amp;&amp;
199
200ninja</userinput></screen>
201
202 <note>
203 <para>
204 For the best test results, make sure you run the testsuite from
205 a system that is booted by the same
206 <application>systemd</application> version you are rebuilding.
207 </para>
208 </note>
209
210 <para>
211 To test the results, issue: <command>ninja test</command>. <!--One test,
212 <filename>udev-test</filename> (test 273) fails due to changes in
213 the Linux 5.3+ kernel. It does not affect the package's
214 functionality. NO LONGER APPLICABLE AS OF 244 -->
215 </para>
216
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
229<screen role="root"><userinput>systemctl isolate rescue.target</userinput></screen>
230 </warning>
231
232 <para>
233 Now, as the <systemitem class="username">root</systemitem> user:
234 </para>
235
236<screen role="root"><userinput>ninja install</userinput></screen>
237 <!-- No longer needed as of systemd-244.
238 <para>
239 Remove a configuration file that causes some problems with PID files:
240 </para>
241
242<screen role="root"><userinput>rm -fv /etc/sysctl.d/50-pid-max.conf</userinput></screen>
243 -->
244 </sect2>
245
246 <sect2 role="configuration">
247 <title>Configuring systemd</title>
248
249 <para>
250 The <filename>/etc/pam.d/system-session</filename> file needs to
251 be modified and a new file needs to be created in order for
252 <command>systemd-logind</command> to work correctly. Run the following
253 commands as the <systemitem class="username">root</systemitem> user:
254 </para>
255
256<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
257<literal># Begin Systemd addition
258
259session required pam_loginuid.so
260session optional pam_systemd.so
261
262# End Systemd addition</literal>
263EOF
264
265cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
266<literal># Begin /etc/pam.d/systemd-user
267
268account required pam_access.so
269account include system-account
270
271session required pam_env.so
272session required pam_limits.so
273session required pam_unix.so
274session required pam_loginuid.so
275session optional pam_keyinit.so force revoke
276session optional pam_systemd.so
277
278auth required pam_deny.so
279password required pam_deny.so
280
281# End /etc/pam.d/systemd-user</literal>
282EOF</userinput></screen>
283
284 <para>
285 At this point, you should reload the systemd daemon, and reenter
286 multi-user mode with the following commands (as the
287 <systemitem class="username">root</systemitem> user). If a desktop
288 manager is installed and you wish to reenter the graphical mode,
289 replace <userinput>multi-user.target</userinput> with
290 <userinput>graphical.target</userinput>:
291 </para>
292
293<screen role="root"><userinput>systemctl daemon-reexec
294systemctl start multi-user.target</userinput></screen>
295
296 <warning>
297 <para>
298 If upgrading from a previous version of systemd and an
299 initrd is used for system boot, you should generate a new initrd before
300 rebooting the system.
301 </para>
302 </warning>
303
304 </sect2>
305
306 <sect2 role="content">
307 <title>Contents</title>
308
309 <para>
310 A list of the installed files, along with their short
311 descriptions can be found at
312 <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
313 </para>
314
315 <para>
316 Listed below are the newly installed libraries and directories
317 along with short descriptions.
318 </para>
319
320 <segmentedlist>
321 <segtitle>Installed Programs</segtitle>
322 <segtitle>Installed Libraries</segtitle>
323 <segtitle>Installed Directories</segtitle>
324
325 <seglistitem>
326 <seg>
327 None
328 </seg>
329 <seg>
330 pam_systemd.so
331 (in <filename class="directory">/lib/security</filename>)
332 </seg>
333 <seg>
334 None
335 </seg>
336 </seglistitem>
337 </segmentedlist>
338
339 <variablelist>
340 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
341 <?dbfo list-presentation="list"?>
342 <?dbhtml list-presentation="table"?>
343
344 <varlistentry id="pam_systemd">
345 <term><filename class="libraryfile">pam_systemd.so</filename></term>
346 <listitem>
347 <para>
348 is a PAM module used to register user sessions with the
349 <application>systemd</application> login manager,
350 <command>systemd-logind</command>.
351 </para>
352 <indexterm zone="systemd pam_systemd">
353 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
354 </indexterm>
355 </listitem>
356 </varlistentry>
357
358 </variablelist>
359
360 </sect2>
361
362</sect1>
Note: See TracBrowser for help on using the repository browser.