source: general/sysutils/systemd.xml.next@ b694dc9a

systemd-11177
Last change on this file since b694dc9a was b694dc9a, checked in by Krejzi <krejzi@…>, 10 years ago

Switch to configure switches in blfs too.

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

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