source: general/sysutils/systemd.xml@ af8b2d9

systemd-13485
Last change on this file since af8b2d9 was af8b2d9, checked in by DJ Lucas <dj@…>, 7 years ago

Updated to systemd-230.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@17413 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 10.0 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-&lfs-systemd-version;.tar.xz">
8]>
9
10<sect1 id="systemd" xreflabel="Systemd-&lfs-systemd-version;">
11 <?dbhtml filename="systemd.html"?>
12
13 <sect1info>
14 <othername>$LastChangedBy$</othername>
15 <date>$Date$</date>
16 </sect1info>
17
18 <title>Systemd-&lfs-systemd-version;</title>
19
20 <indexterm zone="systemd">
21 <primary sortas="a-systemd">systemd</primary>
22 </indexterm>
23
24 <sect2 role="package">
25 <title>Introduction to systemd</title>
26
27 <para>
28 Even though <application>systemd</application> was installed while
29 building LFS, there are many features provided by the package that
30 were not included in the initial installation due to unmet dependencies.
31 The <application>systemd</application> package needs to be
32 rebuilt to provide a working <command>systemd-logind</command> service,
33 among many others.
34 </para>
35
36 &lfs79_checked;&gcc6_checked;
37
38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
41 <para>Systemd Download (HTTP): <ulink url="&systemd-download-http;"/></para>
42 </listitem>
43 </itemizedlist>
44
45 <bridgehead renderas="sect3">systemd Dependencies</bridgehead>
46
47 <bridgehead renderas="sect4">Required</bridgehead>
48 <para role="required">
49 <xref linkend="linux-pam"/>
50 </para>
51
52 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
53 <para role="recommended">
54 <xref linkend="polkit"/>
55 </para>
56
57 <bridgehead renderas="sect4">Optional</bridgehead>
58 <para role="optional">
59 <xref linkend="cacerts"/>,
60 <xref linkend="curl"/>,
61 <xref linkend="elfutils"/>,
62 <xref linkend="gnutls"/>,
63 <xref linkend="iptables"/>,
64 <xref linkend="libgcrypt"/>,
65 <xref linkend="libidn"/>,
66 <xref linkend="libxkbcommon"/>,
67 <xref linkend="python2"/> or
68 <xref linkend="python3"/>,
69 <xref linkend="qemu"/>,
70 <xref linkend="valgrind"/>,
71 <ulink url="https://www.kernel.org/pub/linux/utils/cryptsetup/">cryptsetup</ulink>,
72 <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
73 <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
74 <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
75 <ulink url="http://sourceforge.net/projects/libseccomp/">libseccomp</ulink>,
76 <ulink url="http://lxml.de/">lxml</ulink> (Python Module),
77 <ulink url="https://code.google.com/p/lz4/">lz4</ulink>,
78 <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
79 <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
80 <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
81 </para>
82
83 <note>
84 <para>
85 In order to build the <application>systemd</application>
86 <application>Python</application> module, lxml package
87 needs to be installed for the corresponding
88 <application>Python</application> version (2 or 3).
89 Note that <command>configure</command> defaults to
90 <application>Python 2</application>. In order to build
91 the module for <application>Python 3</application>,
92 make sure you pass the <envar>PYTHON=python3</envar>
93 environment variable to the <command>configure</command>
94 command below.
95 </para>
96 </note>
97
98 <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
99 <para role="optional">
100 <xref linkend="DocBook"/>,
101 <xref linkend="docbook-xsl"/> and
102 <xref linkend="libxslt"/>
103 </para>
104
105 <para condition="html" role="usernotes">User Notes:
106 <ulink url="&blfs-wiki;/systemd"/>
107 </para>
108 </sect2>
109
110 <sect2 role="installation">
111 <title>Installation of systemd</title>
112
113 <para>First, fix a potential security issue with framebuffer
114 devices:</para>
115
116<screen><userinput>sed -e 's@DRI and frame buffer@DRI@' \
117 -e '/SUBSYTEM==\"graphics\", KERNEL==\"fb\*\"/d' \
118 -i src/login/70-uaccess.rules</userinput></screen>
119
120 <para>
121 Disable two tests that always fail:
122 </para>
123
124<screen><userinput>sed -e 's:test/udev-test.pl ::g' \
125 -e 's:test-copy$(EXEEXT) ::g' \
126 -i Makefile.in</userinput></screen>
127
128 <para>
129 Rebuild <application>systemd</application> by running the
130 following commands:
131 </para>
132
133<screen><userinput>cc_cv_CFLAGS__flto=no \
134./configure --prefix=/usr \
135 --sysconfdir=/etc \
136 --localstatedir=/var \
137 --with-rootprefix= \
138 --with-rootlibdir=/lib \
139 --enable-split-usr \
140 --disable-firstboot \
141 --disable-ldconfig \
142 --disable-sysusers \
143 --without-python \
144 --with-default-dnssec=no \
145 --docdir=/usr/share/doc/systemd-&lfs-systemd-version; &amp;&amp;
146make</userinput></screen>
147
148 <note>
149 <para>
150 For the best results, make sure you run the testsuite from
151 a system that is booted by the same
152 <application>systemd</application> version you are rebuilding.
153 </para>
154 </note>
155
156 <para>
157 To test the results, issue: <command>make -k check</command>.
158 </para>
159
160 <warning>
161 <para>
162 Installing the package will override all files installed by
163 <application>systemd</application> in LFS. It is critical that
164 nothing uses either <application>systemd</application> or
165 <application>Udev</application> libraries or programs during
166 the installation phrase. Best way to achieve that is to do the
167 installation in the rescue mode. To switch to the rescue mode,
168 issue the following command as the
169 <systemitem class="username">root</systemitem> user from a TTY:
170 </para>
171
172<screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
173 </warning>
174
175 <para>
176 Now, as the <systemitem class="username">root</systemitem> user:
177 </para>
178
179<screen role="root"><userinput>make install</userinput></screen>
180
181 <para>
182 Move NSS libraries to <filename class="directory">/lib</filename>
183 by running the following command as the <systemitem
184 class="username">root</systemitem> user:
185 </para>
186
187<screen role="root"><userinput>mv -v /usr/lib/libnss_{myhostname,mymachines,resolve}.so.2 /lib</userinput></screen>
188
189 <para>
190 Remove an unnecessary directory by running the following command
191 as the <systemitem class="username">root</systemitem> user:
192 </para>
193
194<screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
195
196 </sect2>
197
198 <sect2 role="configuration">
199 <title>Configuring systemd</title>
200
201 <para>
202 The <filename>/etc/pam.d/system-sesion</filename> file needs to
203 be modified and a new file needs to be created in order for
204 <command>systemd-logind</command> to work correctly. To accomplish
205 that, run the following commands as the <systemitem
206 class="username">root</systemitem> user:
207 </para>
208
209<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
210<literal># Begin Systemd addition
211
212session required pam_loginuid.so
213session optional pam_systemd.so
214
215# End Systemd addition</literal>
216EOF
217
218cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
219<literal># Begin /etc/pam.d/systemd-user
220
221account required pam_access.so
222account include system-account
223
224session required pam_env.so
225session required pam_limits.so
226session include system-session
227
228auth required pam_deny.so
229password required pam_deny.so
230
231# End /etc/pam.d/systemd-user</literal>
232EOF</userinput></screen>
233
234 <para>
235 At this point, you should reload the systemd daemon, and reenter
236 multi-user mode with the following commands as the
237 <systemitem class="username">root</systemitem> user:
238 </para>
239
240<screen role="root"><userinput>systemctl daemon-reload
241systemctl start multi-user.target</userinput></screen>
242
243 <warning><para>If upgrading from a previous version of systemd and you
244 use an initrd, the system will hang during boot if you do not generate a
245 new initrd with systemd-root-device.target included.</para></warning>
246
247 </sect2>
248
249 <sect2 role="content">
250 <title>Contents</title>
251
252 <para>
253 A list of the installed files, along with their short
254 descriptions can be found at
255 <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
256 </para>
257
258 <para>
259 Below are listed newly installed libraries and directories
260 along with short descriptions.
261 </para>
262
263 <segmentedlist>
264 <segtitle>Installed Programs</segtitle>
265 <segtitle>Installed Libraries</segtitle>
266 <segtitle>Installed Directories</segtitle>
267
268 <seglistitem>
269 <seg>
270 None
271 </seg>
272 <seg>
273 pam_systemd.so
274 (in <filename class="directory">/lib/security</filename>)
275 </seg>
276 <seg>
277 None
278 </seg>
279 </seglistitem>
280 </segmentedlist>
281
282 <variablelist>
283 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
284 <?dbfo list-presentation="list"?>
285 <?dbhtml list-presentation="table"?>
286
287 <varlistentry id="pam_systemd">
288 <term><filename class="libraryfile">pam_systemd.so</filename></term>
289 <listitem>
290 <para>
291 is a PAM module used to register user sessions with the
292 <application>systemd</application> login manager,
293 <command>systemd-logind</command>.
294 </para>
295 <indexterm zone="systemd pam_systemd">
296 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
297 </indexterm>
298 </listitem>
299 </varlistentry>
300
301 </variablelist>
302
303 </sect2>
304
305</sect1>
Note: See TracBrowser for help on using the repository browser.