source: general/sysutils/systemd.xml@ 9db77dd

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 8.0 8.1 8.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 nosym 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 9db77dd was 9db77dd, checked in by DJ Lucas <dj@…>, 8 years ago

Update to systemd-232. Fixes #8549.

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

  • Property mode set to 100644
File size: 10.6 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/sources/other/systemd/systemd-&systemd-version;.tar.xz">
8 <!ENTITY systemd-download-ftp " ">
9 <!ENTITY systemd-md5sum "281604885d5a87f0359244f6f84037cb">
10 <!ENTITY systemd-size "3.9 MB">
11 <!ENTITY systemd-buildsize "429 MB (an additional 89 MB for tests)">
12 <!ENTITY systemd-time "7.7 SBU (an additional 0.5 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 &lfs7a_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
67 <bridgehead renderas="sect3">systemd Dependencies</bridgehead>
68
69 <bridgehead renderas="sect4">Required</bridgehead>
70 <para role="required">
71 <xref linkend="linux-pam"/>
72 </para>
73
74 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
75 <para role="recommended">
76 <xref linkend="polkit"/>
77 </para>
78
79 <bridgehead renderas="sect4">Optional</bridgehead>
80 <para role="optional">
81 <xref linkend="cacerts"/>,
82 <xref linkend="curl"/>,
83 <xref linkend="elfutils"/>,
84 <xref linkend="gnutls"/>,
85 <xref linkend="iptables"/>,
86 <xref linkend="libgcrypt"/>,
87 <xref linkend="libidn"/>,
88 <xref linkend="libxkbcommon"/>,
89 <xref linkend="lxml"/>,
90 <xref linkend="qemu"/>,
91 <xref linkend="valgrind"/>,
92 <xref linkend="zsh"/> (for the zsh completions),
93 <ulink url="https://www.kernel.org/pub/linux/utils/cryptsetup/">cryptsetup</ulink>,
94 <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
95 <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
96 <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
97 <ulink url="http://sourceforge.net/projects/libseccomp/">libseccomp</ulink>,
98 <ulink url="https://github.com/Cyan4973/lz4">lz4</ulink>,
99 <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
100 <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
101 <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
102 </para>
103
104 <note>
105 <para>
106 In order to build the <application>systemd</application>
107 <application>Python</application> module, the
108 <application>lxml</application> package
109 needs to be installed for the corresponding
110 <application>Python</application> version (2 or 3).
111 Note that <command>configure</command> defaults to
112 <application>Python 2</application>. In order to build
113 the module for <application>Python 3</application>,
114 make sure you pass the <envar>PYTHON=python3</envar>
115 environment variable to the <command>configure</command>
116 command below.
117 </para>
118 </note>
119
120 <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
121 <para role="optional">
122 <xref linkend="DocBook"/>,
123 <xref linkend="docbook-xsl"/> and
124 <xref linkend="libxslt"/>
125 </para>
126
127 <para condition="html" role="usernotes">User Notes:
128 <ulink url="&blfs-wiki;/systemd"/>
129 </para>
130 </sect2>
131
132 <sect2 role="installation">
133 <title>Installation of systemd</title>
134
135<!-- Not needed as of v231 -renodr
136 <para>First, fix a potential security issue with framebuffer
137 devices:</para>
138
139<screen><userinput>sed -e 's@DRI and frame buffer@DRI@' \
140 -e '/SUBSYSTEM==\"graphics\", KERNEL==\"fb\*\"/d' \
141 -i src/login/70-uaccess.rules</userinput></screen>
142-->
143
144 <para>
145 Disable two tests that always fail:
146 </para>
147
148<screen><userinput>sed -e 's:test/udev-test.pl ::g' \
149 -e 's:test-copy$(EXEEXT) ::g' \
150 -i Makefile.in</userinput></screen>
151
152 <para>
153 Rebuild <application>systemd</application> by running the
154 following commands:
155 </para>
156
157<screen><userinput>cc_cv_CFLAGS__flto=no \
158XSLTPROC="/usr/bin/xsltproc" \
159./configure --prefix=/usr \
160 --sysconfdir=/etc \
161 --localstatedir=/var \
162 --with-rootprefix= \
163 --with-rootlibdir=/lib \
164 --enable-split-usr \
165 --disable-firstboot \
166 --disable-ldconfig \
167 --disable-sysusers \
168 --without-python \
169 --with-default-dnssec=no \
170 --docdir=/usr/share/doc/systemd-&systemd-version; &amp;&amp;
171make</userinput></screen>
172
173 <note>
174 <para>
175 For the best results, make sure you run the testsuite from
176 a system that is booted by the same
177 <application>systemd</application> version you are rebuilding.
178 </para>
179 </note>
180
181 <para>
182 To test the results, issue: <command>make -k check</command>.
183 </para>
184
185 <warning>
186 <para>
187 Installing the package will overwrite all files installed by
188 <application>systemd</application> in LFS. It is critical that
189 nothing uses either <application>systemd</application> or
190 <application>Udev</application> libraries during the installation.
191 The best way to ensure that these libraries are not being used is to
192 run the installation in rescue mode. To switch to rescue mode,
193 run the following command as the
194 <systemitem class="username">root</systemitem> user (from a TTY):
195 </para>
196
197<screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
198 </warning>
199
200 <para>
201 Now, as the <systemitem class="username">root</systemitem> user:
202 </para>
203
204<screen role="root"><userinput>make install</userinput></screen>
205
206 <para>
207 If <application>RPM</application> is not installed, remove an
208 unnecessary directory by running the following command as the
209 <systemitem class="username">root</systemitem> user:
210 </para>
211
212<screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
213
214 </sect2>
215
216 <sect2 role="configuration">
217 <title>Configuring systemd</title>
218
219 <para>
220 The <filename>/etc/pam.d/system-sesion</filename> file needs to
221 be modified and a new file needs to be created in order for
222 <command>systemd-logind</command> to work correctly. Run the following
223 commands as the <systemitem class="username">root</systemitem> user:
224 </para>
225
226<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
227<literal># Begin Systemd addition
228
229session required pam_loginuid.so
230session optional pam_systemd.so
231
232# End Systemd addition</literal>
233EOF
234
235cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
236<literal># Begin /etc/pam.d/systemd-user
237
238account required pam_access.so
239account include system-account
240
241session required pam_env.so
242session required pam_limits.so
243session include system-session
244
245auth required pam_deny.so
246password required pam_deny.so
247
248# End /etc/pam.d/systemd-user</literal>
249EOF</userinput></screen>
250
251 <para>
252 At this point, you should reload the systemd daemon, and reenter
253 multi-user mode with the following commands (as the
254 <systemitem class="username">root</systemitem> user):
255 </para>
256
257<screen role="root"><userinput>systemctl daemon-reload
258systemctl start multi-user.target</userinput></screen>
259
260 <warning><para>If upgrading from a previous version of systemd and an
261 initrd is used for system boot, you should generate a new initrd before
262 rebooting the system.</para></warning>
263
264 </sect2>
265
266 <sect2 role="content">
267 <title>Contents</title>
268
269 <para>
270 A list of the installed files, along with their short
271 descriptions can be found at
272 <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
273 </para>
274
275 <para>
276 Listed below are the newly installed libraries and directories
277 along with short descriptions.
278 </para>
279
280 <segmentedlist>
281 <segtitle>Installed Programs</segtitle>
282 <segtitle>Installed Libraries</segtitle>
283 <segtitle>Installed Directories</segtitle>
284
285 <seglistitem>
286 <seg>
287 None
288 </seg>
289 <seg>
290 pam_systemd.so
291 (in <filename class="directory">/lib/security</filename>)
292 </seg>
293 <seg>
294 None
295 </seg>
296 </seglistitem>
297 </segmentedlist>
298
299 <variablelist>
300 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
301 <?dbfo list-presentation="list"?>
302 <?dbhtml list-presentation="table"?>
303
304 <varlistentry id="pam_systemd">
305 <term><filename class="libraryfile">pam_systemd.so</filename></term>
306 <listitem>
307 <para>
308 is a PAM module used to register user sessions with the
309 <application>systemd</application> login manager,
310 <command>systemd-logind</command>.
311 </para>
312 <indexterm zone="systemd pam_systemd">
313 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
314 </indexterm>
315 </listitem>
316 </varlistentry>
317
318 </variablelist>
319
320 </sect2>
321
322</sect1>
Note: See TracBrowser for help on using the repository browser.