source: general/sysutils/systemd.xml@ 57977df

systemd-13485
Last change on this file since 57977df was ab88249, checked in by DJ Lucas <dj@…>, 8 years ago

Update to systemd-229 (LFS).

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

  • Property mode set to 100644
File size: 11.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-&lfs-systemd-version;.tar.xz">
8 <!ENTITY systemd-patch-download-http "http://www.linuxfromscratch.org/patches/downloads/systemd/systemd-&lfs-systemd-version;-compat-1.patch">
9]>
10
11<sect1 id="systemd" xreflabel="Systemd-&lfs-systemd-version;">
12 <?dbhtml filename="systemd.html"?>
13
14 <sect1info>
15 <othername>$LastChangedBy$</othername>
16 <date>$Date$</date>
17 </sect1info>
18
19 <title>Systemd-&lfs-systemd-version;</title>
20
21 <indexterm zone="systemd">
22 <primary sortas="a-systemd">systemd</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to systemd</title>
27
28 <para>
29 Even though <application>systemd</application> was built in
30 LFS, there are some features provided by the package that
31 some BLFS packages need, but their dependencies didn't fit
32 into LFS.
33 </para>
34
35 <para>
36 The main reason why <application>systemd</application>
37 needs to be rebuilt is that some packages expect
38 working <command>systemd-logind</command> service
39 which requires a PAM module from the
40 <application>systemd</application> source that
41 couldn't be built in LFS.
42 </para>
43<!--
44 <para>
45 Unlike other packages in BLFS, there is no set version of
46 <application>systemd</application> in this page's title and
47 no set version specified for download. Version updates to
48 <application>systemd</application> make it possible that the
49 user's system may have a <application>systemd</application>
50 version different from the one in the current LFS book.
51 Therefore, users should use the version of
52 <application>systemd</application> that is currently
53 installed on their system.
54 </para>
55-->
56 <para>
57 This package is known to build and work properly using an
58 LFS-&lfs-version; platform using systemd-&lfs-systemd-version; source.
59 </para>
60
61 <bridgehead renderas="sect3">Package Information</bridgehead>
62 <itemizedlist spacing="compact">
63 <listitem>
64 <para>Systemd Download (HTTP): <ulink url="&systemd-download-http;"/></para>
65 </listitem>
66 <listitem>
67 <para>Systemd Patch Download (HTTP): <ulink url="&systemd-patch-download-http;"/></para>
68 </listitem>
69 </itemizedlist>
70<!--
71 <para>
72 Make sure you download the "compat" patch whose version matches
73 the <application>systemd</application> version you are building.
74 </para>
75
76 <note>
77 <para>
78 If you are unsure which version needs to be downloaded, issue
79 <command>systemctl - -version</command> in order to find out.
80 Some of the commands below might need the version information.
81 Issue the following command to store the
82 <application>systemd</application> version number into an
83 environment variable:
84 </para>
85
86<screen><userinput>export SYSTEMD_VERSION=$(systemctl - -version | head -n1 | awk '{print $2}')</userinput></screen>
87 </note>
88-->
89 <bridgehead renderas="sect3">systemd Dependencies</bridgehead>
90
91 <bridgehead renderas="sect4">Required</bridgehead>
92 <para role="required">
93 <xref linkend="linux-pam"/>
94 </para>
95
96 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
97 <para role="recommended">
98 <xref linkend="polkit"/>
99 </para>
100
101 <bridgehead renderas="sect4">Optional</bridgehead>
102 <para role="optional">
103 <xref linkend="cacerts"/>,
104 <xref linkend="curl"/>,
105 <xref linkend="elfutils"/>,
106 <xref linkend="gnutls"/>,
107 <xref linkend="iptables"/>,
108 <xref linkend="libgcrypt"/>,
109 <xref linkend="libidn"/>,
110 <xref linkend="libxkbcommon"/>,
111 <xref linkend="python2"/> or
112 <xref linkend="python3"/>,
113 <xref linkend="qemu"/>,
114 <xref linkend="valgrind"/>,
115 <ulink url="https://www.kernel.org/pub/linux/utils/cryptsetup/">cryptsetup</ulink>,
116 <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
117 <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
118 <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
119 <ulink url="http://sourceforge.net/projects/libseccomp/">libseccomp</ulink>,
120 <ulink url="http://lxml.de/">lxml</ulink> (Python Module),
121 <ulink url="https://code.google.com/p/lz4/">lz4</ulink>,
122 <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
123 <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
124 <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
125 </para>
126
127 <note>
128 <para>
129 In order to build the <application>systemd</application>
130 <application>Python</application> module, lxml package
131 needs to be installed for the corresponding
132 <application>Python</application> version (2 or 3).
133 Note that <command>configure</command> defaults to
134 <application>Python 2</application>. In order to build
135 the module for <application>Python 3</application>,
136 make sure you pass the <envar>PYTHON=python3</envar>
137 environment variable to the <command>configure</command>
138 command below.
139 </para>
140 </note>
141
142 <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
143 <para role="optional">
144 <xref linkend="DocBook"/>,
145 <xref linkend="docbook-xsl"/> and
146 <xref linkend="libxslt"/>
147 </para>
148
149 <para condition="html" role="usernotes">User Notes:
150 <ulink url="&blfs-wiki;/systemd"/>
151 </para>
152 </sect2>
153
154 <sect2 role="installation">
155 <title>Installation of systemd</title>
156
157 <para>
158 First, apply the required patch:
159 </para>
160
161<screen><userinput>patch -Np1 -i ../systemd-&lfs-systemd-version;-compat-1.patch &amp;&amp;
162autoreconf -fi</userinput></screen>
163<!--
164 <para>
165 Additionally, apply any patch that is also applied in LFS.
166 </para>
167-->
168 <para>
169 Disable two tests that always fail:
170 </para>
171
172<screen><userinput>sed -e 's:test/udev-test.pl ::g' \
173 -e 's:test-copy$(EXEEXT) ::g' \
174 -i Makefile.in</userinput></screen>
175
176 <para>
177 Rebuild <application>systemd</application> by running the
178 following commands:
179 </para>
180
181<screen><userinput>cc_cv_CFLAGS__flto=no \
182./configure --prefix=/usr \
183 --sysconfdir=/etc \
184 --localstatedir=/var \
185 --with-rootprefix= \
186 --with-rootlibdir=/lib \
187 --enable-split-usr \
188 --disable-firstboot \
189 --disable-ldconfig \
190 --disable-sysusers \
191 --without-python \
192 --docdir=/usr/share/doc/systemd-&lfs-systemd-version; &amp;&amp;
193make</userinput></screen>
194
195 <note>
196 <para>
197 For the best results, make sure you run the testsuite from
198 a system that is booted by the same
199 <application>systemd</application> version you are rebuilding.
200 </para>
201 </note>
202
203 <para>
204 To test the results, issue: <command>make -k check</command>.
205 </para>
206
207 <warning>
208 <para>
209 Installing the package will override all files installed by
210 <application>systemd</application> in LFS. It is critical that
211 nothing uses either <application>systemd</application> or
212 <application>Udev</application> libraries or programs during
213 the installation phrase. Best way to achieve that is to do the
214 installation in the rescue mode. To switch to the rescue mode,
215 issue the following command as the
216 <systemitem class="username">root</systemitem> user from a TTY:
217 </para>
218
219<screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
220 </warning>
221
222 <para>
223 Now, as the <systemitem class="username">root</systemitem> user:
224 </para>
225
226<screen role="root"><userinput>make install</userinput></screen>
227
228 <para>
229 Move NSS libraries to <filename class="directory">/lib</filename>
230 by running the following command as the <systemitem
231 class="username">root</systemitem> user:
232 </para>
233
234<screen role="root"><userinput>mv -v /usr/lib/libnss_{myhostname,mymachines,resolve}.so.2 /lib</userinput></screen>
235
236 <para>
237 Remove an unnecessary directory by running the following command
238 as the <systemitem class="username">root</systemitem> user:
239 </para>
240
241<screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
242
243<!--
244 <para>
245 Remove a reference to a non-existent group by running the following
246 command as the <systemitem class="username">root</systemitem> user:
247 </para>
248
249<screen role="root"><userinput>sed -i "s:0775 root lock:0755 root root:g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
250-->
251
252 </sect2>
253
254 <sect2 role="configuration">
255 <title>Configuring systemd</title>
256
257 <para>
258 The <filename>/etc/pam.d/system-sesion</filename> file needs to
259 be modified and a new file needs to be created in order for
260 <command>systemd-logind</command> to work correctly. To accomplish
261 that, run the following commands as the <systemitem
262 class="username">root</systemitem> user:
263 </para>
264
265<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF" &amp;&amp;
266<literal># Begin Systemd addition
267
268session required pam_loginuid.so
269session optional pam_systemd.so
270
271# End Systemd addition</literal>
272EOF
273
274cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
275<literal># Begin /etc/pam.d/systemd-user
276
277account required pam_access.so
278account include system-account
279
280session required pam_env.so
281session required pam_limits.so
282session include system-session
283
284auth required pam_deny.so
285password required pam_deny.so
286
287# End /etc/pam.d/systemd-user</literal>
288EOF</userinput></screen>
289
290 <para>
291 At this point it would be a nice idea to reboot to
292 test if the reinstallation was successful.
293 </para>
294
295 </sect2>
296
297 <sect2 role="content">
298 <title>Contents</title>
299
300 <para>
301 A list of the installed files, along with their short
302 descriptions can be found at
303 <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
304 </para>
305
306 <para>
307 Below are listed newly installed libraries and directories
308 along with short descriptions.
309 </para>
310
311 <segmentedlist>
312 <segtitle>Installed Programs</segtitle>
313 <segtitle>Installed Libraries</segtitle>
314 <segtitle>Installed Directories</segtitle>
315
316 <seglistitem>
317 <seg>
318 None
319 </seg>
320 <seg>
321 pam_systemd.so
322 (in <filename class="directory">/lib/security</filename>)
323 </seg>
324 <seg>
325 None
326 </seg>
327 </seglistitem>
328 </segmentedlist>
329
330 <variablelist>
331 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
332 <?dbfo list-presentation="list"?>
333 <?dbhtml list-presentation="table"?>
334
335 <varlistentry id="pam_systemd">
336 <term><filename class="libraryfile">pam_systemd.so</filename></term>
337 <listitem>
338 <para>
339 is a PAM module used to register user sessions with the
340 <application>systemd</application> login manager,
341 <command>systemd-logind</command>.
342 </para>
343 <indexterm zone="systemd pam_systemd">
344 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
345 </indexterm>
346 </listitem>
347 </varlistentry>
348
349 </variablelist>
350
351 </sect2>
352
353</sect1>
Note: See TracBrowser for help on using the repository browser.