source: general/sysutils/systemd.xml@ 111038b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind 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/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 111038b was 4747091, checked in by DJ Lucas <dj@…>, 8 years ago

Fix systemd rebuild if xsltproc is not installed.

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