source: general/sysutils/systemd.xml@ 5fff3896

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gimp3 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 5fff3896 was 5fff3896, checked in by Douglas R. Reno <renodr@…>, 6 years ago

Update to xorg-server-1.20.1
Update to libxkbcommon-0.8.2
Update to systemd-239

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

  • Property mode set to 100644
File size: 10.3 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 "https://github.com/systemd/systemd/archive/v&systemd-version;/systemd-&systemd-version;.tar.gz">
8 <!ENTITY systemd-download-ftp " ">
9 <!ENTITY systemd-md5sum "6137e3f50390391cf34521d071a1a078">
10 <!ENTITY systemd-size "6.9 MB">
11 <!ENTITY systemd-buildsize "206 MB (with tests)">
12 <!ENTITY systemd-time "0.6 SBU at -j4 (&lt; 0.1 SBU for tests)">
13
14]>
15
16<sect1 id="systemd" xreflabel="Systemd-&systemd-version;" revision="systemd">
17 <?dbhtml filename="systemd.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>Systemd-&systemd-version;</title>
25
26 <indexterm zone="systemd">
27 <primary sortas="a-systemd">systemd</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to systemd</title>
32
33 <para>
34 While <application>systemd</application> was installed when
35 building LFS, there are many features provided by the package that
36 were not included in the initial installation because
37 <application>Linux-PAM</application> was not yet installed.
38 The <application>systemd</application> package needs to be
39 rebuilt to provide a working <command>systemd-logind</command> service,
40 which provides many additional features for dependent packages.
41 </para>
42
43 &lfs82_checked;
44
45 <bridgehead renderas="sect3">Package Information</bridgehead>
46 <itemizedlist spacing="compact">
47 <listitem>
48 <para>Download (HTTP): <ulink url="&systemd-download-http;"/></para>
49 </listitem>
50 <listitem>
51 <para>Download (FTP): <ulink url="&systemd-download-ftp;"/></para>
52 </listitem>
53 <listitem>
54 <para>Download MD5 sum: &systemd-md5sum;</para>
55 </listitem>
56 <listitem>
57 <para>Download size: &systemd-size;</para>
58 </listitem>
59 <listitem>
60 <para>Estimated disk space required: &systemd-buildsize;</para>
61 </listitem>
62 <listitem>
63 <para>Estimated build time: &systemd-time;</para>
64 </listitem>
65 </itemizedlist>
66 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
67
68 <itemizedlist spacing="compact">
69 <listitem>
70 <para>
71 Required patch:
72 <ulink url="&patch-root;/systemd-&systemd-version;-glibc_statx_fix-1.patch"/>
73 </para>
74 </listitem>
75 </itemizedlist>
76
77 <bridgehead renderas="sect3">systemd Dependencies</bridgehead>
78
79 <bridgehead renderas="sect4">Required</bridgehead>
80 <para role="required">
81 <xref linkend="linux-pam"/>
82 </para>
83
84 <bridgehead renderas="sect4">Recommended Runtime Dependencies</bridgehead>
85 <para role="recommended">
86 <xref role="runtime" linkend="polkit"/>
87 </para>
88
89 <bridgehead renderas="sect4">Optional</bridgehead>
90 <para role="optional">
91 <xref linkend="make-ca"/>,
92 <xref linkend="curl"/>,
93 <xref linkend="git"/>,
94 <xref linkend="gnutls"/>,
95 <xref linkend="iptables"/>,
96 <xref linkend="libgcrypt"/>,
97 <xref linkend="libidn2"/>,
98 <xref linkend="libseccomp"/>,
99 <xref linkend="libxkbcommon"/>,
100 <xref linkend="qemu"/>,
101 <xref linkend="valgrind"/>,
102 <xref linkend="zsh"/> (for the zsh completions),
103 <ulink url="https://www.kernel.org/pub/linux/utils/cryptsetup/">cryptsetup</ulink>,
104 <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
105 <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
106 <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
107 <ulink url="http://lz4.github.io/lz4/">lz4</ulink>,
108 <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
109 <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
110 <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
111 </para>
112
113 <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
114 <para role="optional">
115 <xref linkend="DocBook"/>,
116 <xref linkend="docbook-xsl"/>, and
117 <xref linkend="libxslt"/>
118 </para>
119
120 <para condition="html" role="usernotes">User Notes:
121 <ulink url="&blfs-wiki;/systemd"/>
122 </para>
123 </sect2>
124
125 <sect2 role="installation">
126 <title>Installation of systemd</title>
127
128 <para>First, apply a fix for glibc-2.28:</para>
129
130<screen><userinput remap="pre">patch -Np1 -i ../systemd-238-glibc_statx_fix-1.patch</userinput></screen>
131
132<!--
133 <para>Fix an issue with newer headers:</para>
134
135<screen><userinput remap="pre">sed -i '527,565 d' src/basic/missing.h
136sed -i '24 d' src/core/load-fragment.c
137sed -i '53 a#include &lt;sys/mount.h&gt;' src/shared/bus-unit-util.c</userinput></screen>
138-->
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 -Db_lto=false \
168 .. &amp;&amp;
169
170ninja</userinput></screen>
171
172 <note>
173 <para>
174 For the best test results, make sure you run the testsuite from
175 a system that is booted by the same
176 <application>systemd</application> version you are rebuilding.
177 </para>
178 </note>
179
180 <para>
181 To test the results, issue: <command>ninja test</command>.
182 </para>
183
184 <warning>
185 <para>
186 Installing the package will overwrite all files installed by
187 <application>systemd</application> in LFS. It is critical that
188 nothing uses either <application>systemd</application> or
189 <application>Udev</application> libraries during the installation.
190 The best way to ensure that these libraries are not being used is to
191 run the installation in rescue mode. To switch to rescue mode,
192 run the following command as the
193 <systemitem class="username">root</systemitem> user (from a TTY):
194 </para>
195
196<screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
197 </warning>
198
199 <para>
200 Now, as the <systemitem class="username">root</systemitem> user:
201 </para>
202
203<screen role="root"><userinput>ninja install</userinput></screen>
204
205 <para>
206 If <application>RPM</application> is not installed, remove an
207 unnecessary directory by running the following command as the
208 <systemitem class="username">root</systemitem> user:
209 </para>
210
211<screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
212
213 </sect2>
214
215 <sect2 role="configuration">
216 <title>Configuring systemd</title>
217
218 <para>
219 The <filename>/etc/pam.d/system-session</filename> file needs to
220 be modified and a new file needs to be created in order for
221 <command>systemd-logind</command> to work correctly. Run the following
222 commands as the <systemitem class="username">root</systemitem> user:
223 </para>
224
225<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
226<literal># Begin Systemd addition
227
228session required pam_loginuid.so
229session optional pam_systemd.so
230
231# End Systemd addition</literal>
232EOF
233
234cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
235<literal># Begin /etc/pam.d/systemd-user
236
237account required pam_access.so
238account include system-account
239
240session required pam_env.so
241session required pam_limits.so
242session include system-session
243
244auth required pam_deny.so
245password required pam_deny.so
246
247# End /etc/pam.d/systemd-user</literal>
248EOF</userinput></screen>
249
250 <para>
251 At this point, you should reload the systemd daemon, and reenter
252 multi-user mode with the following commands (as the
253 <systemitem class="username">root</systemitem> user):
254 </para>
255
256<screen role="root"><userinput>systemctl daemon-reload
257systemctl start multi-user.target</userinput></screen>
258
259 <warning><para>If upgrading from a previous version of systemd and an
260 initrd is used for system boot, you should generate a new initrd before
261 rebooting the system.</para></warning>
262
263 </sect2>
264
265 <sect2 role="content">
266 <title>Contents</title>
267
268 <para>
269 A list of the installed files, along with their short
270 descriptions can be found at
271 <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
272 </para>
273
274 <para>
275 Listed below are the newly installed libraries and directories
276 along with short descriptions.
277 </para>
278
279 <segmentedlist>
280 <segtitle>Installed Programs</segtitle>
281 <segtitle>Installed Libraries</segtitle>
282 <segtitle>Installed Directories</segtitle>
283
284 <seglistitem>
285 <seg>
286 None
287 </seg>
288 <seg>
289 pam_systemd.so
290 (in <filename class="directory">/lib/security</filename>)
291 </seg>
292 <seg>
293 None
294 </seg>
295 </seglistitem>
296 </segmentedlist>
297
298 <variablelist>
299 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
300 <?dbfo list-presentation="list"?>
301 <?dbhtml list-presentation="table"?>
302
303 <varlistentry id="pam_systemd">
304 <term><filename class="libraryfile">pam_systemd.so</filename></term>
305 <listitem>
306 <para>
307 is a PAM module used to register user sessions with the
308 <application>systemd</application> login manager,
309 <command>systemd-logind</command>.
310 </para>
311 <indexterm zone="systemd pam_systemd">
312 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
313 </indexterm>
314 </listitem>
315 </varlistentry>
316
317 </variablelist>
318
319 </sect2>
320
321</sect1>
Note: See TracBrowser for help on using the repository browser.