source: general/sysutils/systemd.xml@ fbb96eb6

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.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 fbb96eb6 was fbb96eb6, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Update to systemd-244
Update to shadow-4.8
Add zstd as an optional dependency in libarchive (thanks to LM for the report on lfs-chat)

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

  • Property mode set to 100644
File size: 11.0 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 " ">
[fbb96eb6]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)">
[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 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
[4478c65a]25 <title>Systemd-&systemd-version;</title>
26 <!-- Whenever we switch back to stable backports, make sure to add the systemd-stable reference back. -->
[f852e706]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
[77a6d25]38 were not included in the initial installation because
[f852e706]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,
[77a6d25]42 which provides many additional features for dependent packages.
[f852e706]43 </para>
44
[0260f4b]45 &lfs90_checked;
[f852e706]46
47 <bridgehead renderas="sect3">Package Information</bridgehead>
48 <itemizedlist spacing="compact">
49 <listitem>
50 <para>Download (HTTP): <ulink url="&systemd-download-http;"/></para>
51 </listitem>
52 <listitem>
53 <para>Download (FTP): <ulink url="&systemd-download-ftp;"/></para>
54 </listitem>
55 <listitem>
56 <para>Download MD5 sum: &systemd-md5sum;</para>
57 </listitem>
58 <listitem>
59 <para>Download size: &systemd-size;</para>
60 </listitem>
61 <listitem>
62 <para>Estimated disk space required: &systemd-buildsize;</para>
63 </listitem>
64 <listitem>
65 <para>Estimated build time: &systemd-time;</para>
66 </listitem>
67 </itemizedlist>
[fbb96eb6]68
69 <!--
[b5d17476]70 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
71 <itemizedlist spacing="compact">
72 <listitem>
73 <para>
74 Required patch:
[57feeb5]75 <ulink url="&patch-root;/systemd-&systemd-version;-consolidated_fixes-2.patch"/>
[b5d17476]76 </para>
77 </listitem>
78 </itemizedlist>
[fbb96eb6]79 -->
[f852e706]80 <bridgehead renderas="sect3">systemd Dependencies</bridgehead>
81
82 <bridgehead renderas="sect4">Required</bridgehead>
83 <para role="required">
84 <xref linkend="linux-pam"/>
85 </para>
86
[c7ab75e8]87 <bridgehead renderas="sect4">Recommended Runtime Dependencies</bridgehead>
[f852e706]88 <para role="recommended">
[60ddbaf]89 <xref role="runtime" linkend="polkit"/>
[f852e706]90 </para>
91
92 <bridgehead renderas="sect4">Optional</bridgehead>
93 <para role="optional">
94 <xref linkend="curl"/>,
[b1be08a]95 <xref linkend="cryptsetup"/>,
[5fff3896]96 <xref linkend="git"/>,
[f852e706]97 <xref linkend="gnutls"/>,
98 <xref linkend="iptables"/>,
99 <xref linkend="libgcrypt"/>,
[531f138]100 <xref linkend="libidn2"/>,
[11f3b7e]101 <xref linkend="libseccomp"/>,
[f852e706]102 <xref linkend="libxkbcommon"/>,
[b1be08a]103 <xref linkend="make-ca"/>,
[ebb31dbd]104 <xref linkend="pcre2"/>,
[f852e706]105 <xref linkend="qemu"/>,
106 <xref linkend="valgrind"/>,
[7c99c52]107 <xref linkend="zsh"/> (for the zsh completions),
[f852e706]108 <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
109 <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
110 <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
[331a2b7]111 <ulink url="http://lz4.github.io/lz4/">lz4</ulink>,
[f852e706]112 <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
113 <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
114 <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
115 </para>
116
117 <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
118 <para role="optional">
119 <xref linkend="DocBook"/>,
[6f8d4ed]120 <xref linkend="docbook-xsl"/>,
121 <xref linkend="libxslt"/>, and
122 <xref linkend="lxml"/> (to build the index of systemd manual pages)
[f852e706]123 </para>
124
125 <para condition="html" role="usernotes">User Notes:
126 <ulink url="&blfs-wiki;/systemd"/>
127 </para>
128 </sect2>
129
130 <sect2 role="installation">
131 <title>Installation of systemd</title>
[fbb96eb6]132 <!-- 243-244 is now supported, so let's comment this for now.
[0dccf0ff]133 <warning><para>This version of systemd is incompatible with all previous
134 releases. The BLFS team does not recommend updating in place, and suggests
135 that you do a rebuild instead.</para></warning>
[fbb96eb6]136 -->
[93caa46]137
[fbb96eb6]138 <!-- No longer needed -->
139 <!--
[0dccf0ff]140 <para>Apply a patch to fix several bugs discovered after release:</para>
[93caa46]141
[57feeb5]142<screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-consolidated_fixes-2.patch</userinput></screen>
[fbb96eb6]143 -->
[93caa46]144
[b4e1b81]145 <para>Remove an unneeded group,
146 <systemitem class="groupname">render</systemitem>, from the default udev
147 rules:</para>
148
[fbb96eb6]149<screen><userinput remap="pre">sed -i 's/GROUP="render", //' rules.d/50-udev-default.rules.in</userinput></screen>
[b4e1b81]150
[f852e706]151 <para>
152 Rebuild <application>systemd</application> by running the
153 following commands:
154 </para>
155
[e1a8598d]156<screen><userinput>mkdir build &amp;&amp;
157cd build &amp;&amp;
158
159meson --prefix=/usr \
160 --sysconfdir=/etc \
161 --localstatedir=/var \
162 -Dblkid=true \
163 -Dbuildtype=release \
164 -Ddefault-dnssec=no \
165 -Dfirstboot=false \
166 -Dinstall-tests=false \
167 -Dldconfig=false \
[57feeb5]168 -Dman=auto \
[e1a8598d]169 -Drootprefix= \
170 -Drootlibdir=/lib \
171 -Dsplit-usr=true \
172 -Dsysusers=false \
[1dbb694f]173 -Drpmmacrosdir=no \
[e1a8598d]174 -Db_lto=false \
175 .. &amp;&amp;
176
[71becb2]177ninja</userinput></screen>
[f852e706]178
179 <note>
180 <para>
[e1a8598d]181 For the best test results, make sure you run the testsuite from
[f852e706]182 a system that is booted by the same
183 <application>systemd</application> version you are rebuilding.
184 </para>
185 </note>
186
187 <para>
[fbb96eb6]188 To test the results, issue: <command>ninja test</command>. <!--One test,
[0dccf0ff]189 <filename>udev-test</filename> (test 273) fails due to changes in
190 the Linux 5.3+ kernel. It does not affect the package's
[fbb96eb6]191 functionality. NO LONGER APPLICABLE AS OF 244 -->
[f852e706]192 </para>
193
194 <warning>
195 <para>
196 Installing the package will overwrite all files installed by
197 <application>systemd</application> in LFS. It is critical that
198 nothing uses either <application>systemd</application> or
199 <application>Udev</application> libraries during the installation.
200 The best way to ensure that these libraries are not being used is to
201 run the installation in rescue mode. To switch to rescue mode,
202 run the following command as the
203 <systemitem class="username">root</systemitem> user (from a TTY):
204 </para>
205
206<screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
207 </warning>
208
209 <para>
210 Now, as the <systemitem class="username">root</systemitem> user:
211 </para>
212
[71becb2]213<screen role="root"><userinput>ninja install</userinput></screen>
[f852e706]214
[0dccf0ff]215 <para>
216 Remove a configuration file that causes some problems with PID files:
217 </para>
218
219<screen role="root"><userinput>rm -fv /etc/sysctl.d/50-pid-max.conf</userinput></screen>
220
[f852e706]221 </sect2>
222
223 <sect2 role="configuration">
224 <title>Configuring systemd</title>
225
226 <para>
[325d88d6]227 The <filename>/etc/pam.d/system-session</filename> file needs to
[f852e706]228 be modified and a new file needs to be created in order for
229 <command>systemd-logind</command> to work correctly. Run the following
230 commands as the <systemitem class="username">root</systemitem> user:
231 </para>
232
233<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
234<literal># Begin Systemd addition
235
[d267a13]236session required pam_loginuid.so
237session optional pam_systemd.so
[f852e706]238
239# End Systemd addition</literal>
240EOF
241
242cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
243<literal># Begin /etc/pam.d/systemd-user
244
[d267a13]245account required pam_access.so
246account include system-account
[f852e706]247
[d267a13]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_systemd.so
[f852e706]254
[d267a13]255auth required pam_deny.so
256password required pam_deny.so
[f852e706]257
258# End /etc/pam.d/systemd-user</literal>
259EOF</userinput></screen>
260
261 <para>
262 At this point, you should reload the systemd daemon, and reenter
263 multi-user mode with the following commands (as the
264 <systemitem class="username">root</systemitem> user):
265 </para>
266
267<screen role="root"><userinput>systemctl daemon-reload
268systemctl start multi-user.target</userinput></screen>
269
270 <warning><para>If upgrading from a previous version of systemd and an
271 initrd is used for system boot, you should generate a new initrd before
272 rebooting the system.</para></warning>
273
274 </sect2>
275
276 <sect2 role="content">
277 <title>Contents</title>
278
279 <para>
280 A list of the installed files, along with their short
281 descriptions can be found at
282 <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
283 </para>
284
285 <para>
286 Listed below are the newly installed libraries and directories
287 along with short descriptions.
288 </para>
289
290 <segmentedlist>
291 <segtitle>Installed Programs</segtitle>
292 <segtitle>Installed Libraries</segtitle>
293 <segtitle>Installed Directories</segtitle>
294
295 <seglistitem>
296 <seg>
297 None
298 </seg>
299 <seg>
300 pam_systemd.so
301 (in <filename class="directory">/lib/security</filename>)
302 </seg>
303 <seg>
304 None
305 </seg>
306 </seglistitem>
307 </segmentedlist>
308
309 <variablelist>
310 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
311 <?dbfo list-presentation="list"?>
312 <?dbhtml list-presentation="table"?>
313
314 <varlistentry id="pam_systemd">
315 <term><filename class="libraryfile">pam_systemd.so</filename></term>
316 <listitem>
317 <para>
318 is a PAM module used to register user sessions with the
319 <application>systemd</application> login manager,
320 <command>systemd-logind</command>.
321 </para>
322 <indexterm zone="systemd pam_systemd">
323 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
324 </indexterm>
325 </listitem>
326 </varlistentry>
327
328 </variablelist>
329
330 </sect2>
331
332</sect1>
Note: See TracBrowser for help on using the repository browser.