source: general/sysutils/systemd.xml@ 62fb0eea

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 62fb0eea was 0dccf0ff, checked in by Douglas R. Reno <renodr@…>, 5 years ago

Update to systemd-243

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

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