source: general/sysutils/systemd.xml@ 729e458

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 729e458 was 729e458, checked in by DJ Lucas <dj@…>, 6 years ago

Update to make-ca-0.8. Fixes #10794.
Added header seds from LFS for systemd-238.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@20162 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 "76db8004647283b779234364cd637d3c">
10 <!ENTITY systemd-size "6.6 MB">
11 <!ENTITY systemd-buildsize "250 MB (an additional 3 MB for 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;-upstream_fixes-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="elfutils"/>, -->
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, add in upstream fixes:</para>
129
130<screen><userinput remap="pre">patch -Np1 -i ../systemd-238-upstream_fixes-1.patch</userinput></screen>
131
132 <para>Fix an issue with newer headers:</para>
133
134<screen><userinput remap="pre">sed -i '527,565 d' src/basic/missing.h
135sed -i '24 d' src/core/load-fragment.c
136sed -i '53 a#include &lt;sys/mount.h&gt;' src/shared/bus-unit-util.c</userinput></screen>
137
138 <para>Remove an unneeded group,
139 <systemitem class="groupname">render</systemitem>, from the default udev
140 rules:</para>
141
142<screen><userinput remap="pre">sed -i 's/GROUP="render", //' rules/50-udev-default.rules.in</userinput></screen>
143
144 <para>
145 Rebuild <application>systemd</application> by running the
146 following commands:
147 </para>
148
149<screen><userinput>mkdir build &amp;&amp;
150cd build &amp;&amp;
151
152meson --prefix=/usr \
153 --sysconfdir=/etc \
154 --localstatedir=/var \
155 -Dblkid=true \
156 -Dbuildtype=release \
157 -Ddefault-dnssec=no \
158 -Dfirstboot=false \
159 -Dinstall-tests=false \
160 -Dldconfig=false \
161 -Drootprefix= \
162 -Drootlibdir=/lib \
163 -Dsplit-usr=true \
164 -Dsysusers=false \
165 -Db_lto=false \
166 .. &amp;&amp;
167
168ninja</userinput></screen>
169
170 <note>
171 <para>
172 For the best test results, make sure you run the testsuite from
173 a system that is booted by the same
174 <application>systemd</application> version you are rebuilding.
175 </para>
176 </note>
177
178 <para>
179 To test the results, issue: <command>ninja test</command>.
180 </para>
181
182 <warning>
183 <para>
184 Installing the package will overwrite all files installed by
185 <application>systemd</application> in LFS. It is critical that
186 nothing uses either <application>systemd</application> or
187 <application>Udev</application> libraries during the installation.
188 The best way to ensure that these libraries are not being used is to
189 run the installation in rescue mode. To switch to rescue mode,
190 run the following command as the
191 <systemitem class="username">root</systemitem> user (from a TTY):
192 </para>
193
194<screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
195 </warning>
196
197 <para>
198 Now, as the <systemitem class="username">root</systemitem> user:
199 </para>
200
201<screen role="root"><userinput>ninja install</userinput></screen>
202
203 <para>
204 If <application>RPM</application> is not installed, remove an
205 unnecessary directory by running the following command as the
206 <systemitem class="username">root</systemitem> user:
207 </para>
208
209<screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
210
211 </sect2>
212
213 <sect2 role="configuration">
214 <title>Configuring systemd</title>
215
216 <para>
217 The <filename>/etc/pam.d/system-session</filename> file needs to
218 be modified and a new file needs to be created in order for
219 <command>systemd-logind</command> to work correctly. Run the following
220 commands as the <systemitem class="username">root</systemitem> user:
221 </para>
222
223<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
224<literal># Begin Systemd addition
225
226session required pam_loginuid.so
227session optional pam_systemd.so
228
229# End Systemd addition</literal>
230EOF
231
232cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
233<literal># Begin /etc/pam.d/systemd-user
234
235account required pam_access.so
236account include system-account
237
238session required pam_env.so
239session required pam_limits.so
240session include system-session
241
242auth required pam_deny.so
243password required pam_deny.so
244
245# End /etc/pam.d/systemd-user</literal>
246EOF</userinput></screen>
247
248 <para>
249 At this point, you should reload the systemd daemon, and reenter
250 multi-user mode with the following commands (as the
251 <systemitem class="username">root</systemitem> user):
252 </para>
253
254<screen role="root"><userinput>systemctl daemon-reload
255systemctl start multi-user.target</userinput></screen>
256
257 <warning><para>If upgrading from a previous version of systemd and an
258 initrd is used for system boot, you should generate a new initrd before
259 rebooting the system.</para></warning>
260
261 </sect2>
262
263 <sect2 role="content">
264 <title>Contents</title>
265
266 <para>
267 A list of the installed files, along with their short
268 descriptions can be found at
269 <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
270 </para>
271
272 <para>
273 Listed below are the newly installed libraries and directories
274 along with short descriptions.
275 </para>
276
277 <segmentedlist>
278 <segtitle>Installed Programs</segtitle>
279 <segtitle>Installed Libraries</segtitle>
280 <segtitle>Installed Directories</segtitle>
281
282 <seglistitem>
283 <seg>
284 None
285 </seg>
286 <seg>
287 pam_systemd.so
288 (in <filename class="directory">/lib/security</filename>)
289 </seg>
290 <seg>
291 None
292 </seg>
293 </seglistitem>
294 </segmentedlist>
295
296 <variablelist>
297 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
298 <?dbfo list-presentation="list"?>
299 <?dbhtml list-presentation="table"?>
300
301 <varlistentry id="pam_systemd">
302 <term><filename class="libraryfile">pam_systemd.so</filename></term>
303 <listitem>
304 <para>
305 is a PAM module used to register user sessions with the
306 <application>systemd</application> login manager,
307 <command>systemd-logind</command>.
308 </para>
309 <indexterm zone="systemd pam_systemd">
310 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 </variablelist>
316
317 </sect2>
318
319</sect1>
Note: See TracBrowser for help on using the repository browser.