source: general/sysutils/systemd.xml@ c130abf

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 c130abf was c130abf, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Update to systemd-245

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

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