source: general/sysutils/systemd.xml@ ebb31dbd

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

systemd: Add optional dependency on pcre2 for pattern matching in journalctl

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