source: general/sysutils/systemd.xml@ 01dfd54

gnome
Last change on this file since 01dfd54 was 0ea8be75, checked in by Christopher Gregory <cjg@…>, 10 years ago

Fixed line spacing on systemd page

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

  • Property mode set to 100644
File size: 9.2 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/systemd-&systemd-version;.tar.xz">
8 <!ENTITY systemd-download-ftp " ">
9 <!ENTITY systemd-md5sum "eac4f9fc5bd18a0efc3fc20858baacf3">
10 <!ENTITY systemd-size "2.7 MB">
11 <!ENTITY systemd-buildsize "23 MB">
12 <!ENTITY systemd-time "0.3 SBU">
13]>
14
15<sect1 id="systemd" xreflabel="systemd">
16 <?dbhtml filename="systemd.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Systemd-&systemd-version;</title>
24
25 <indexterm zone="systemd">
26 <primary sortas="a-systemd"></primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Systemd</title>
31
32 <para>This part contains instructions on how to build systemd package with
33 more features and why some features are required.
34 </para>
35
36 &lfs75_checked;
37
38 <bridgehead renderas="sect3">Package Information</bridgehead>
39
40
41 <warning>
42 <para>
43 It is important that you use the _same_ version of systemd as it was used in LFS build.
44 </para>
45 </warning>
46
47
48 <itemizedlist spacing="compact">
49 <listitem>
50 <para>Download (HTTP): <ulink url="&systemd-download-http;"/></para>
51 </listitem>
52 <listitem>
53 <para>Download (FTP): <ulink url="&systemd-download-ftp;"/></para>
54 </listitem>
55 <listitem>
56 <para>Download MD5 sum: &systemd-md5sum;</para>
57 </listitem>
58 <listitem>
59 <para>Download size: &systemd-size;</para>
60 </listitem>
61 <listitem>
62 <para>Estimated disk space required: &systemd-buildsize;</para>
63 </listitem>
64 <listitem>
65 <para>Estimated build time: &systemd-time;</para>
66 </listitem>
67 </itemizedlist>
68
69
70 <bridgehead renderas="sect3">Systemd Dependencies</bridgehead>
71
72 <bridgehead renderas="sect4">Required</bridgehead>
73 <para role="required">
74 <xref linkend="glib2"/>,
75 <xref linkend="gobject-introspection"/>, and
76 <xref linkend="linux-pam"/>
77 </para>
78
79 <bridgehead renderas="sect4">Optional Dependencies</bridgehead>
80 <para role="optional">
81 <xref linkend="libgcrypt"/> (see note below)
82 </para>
83
84 <bridgehead renderas="sect4">Optional for rebuilding manual pages</bridgehead>
85 <para role="optional">
86 <xref linkend="libxslt"/>,
87 <xref linkend="DocBook"/>,
88 <xref linkend="docbook-xsl"/>, and
89 <xref linkend="gtk-doc"/> (for rebuilding UDev API docs)
90 </para>
91
92 <bridgehead renderas="sect4">Optional Runtime Dependencies</bridgehead>
93 <para role="optional">
94 <xref linkend="pciutils"/> and
95 <xref linkend="usbutils"/>
96 </para>
97
98 <note>
99 <para>
100 Having the first two packages at build time results in:
101
102 libgudev-1.0.so in /usr/lib, /usr/include/gudev-1.0 directory, GUdev-1.0.
103 {typelib,gir} GObject-Introspection bindings in /usr/lib/girepository-1.0
104 and /usr/share/gir-1.0 respectively.
105
106 Since GLib2 has a dependency on Python, systemd Python bindings were also installed in:
107
108 /usr/lib/python2.7/site-packages/systemd
109
110 Having the Linux-PAM package at build time results in:
111
112 pam_systemd.so in /lib/security, a PAM module used to register logins/logouts with systemd-logind component.
113
114 This is required by anything that now requires ConsoleKit (desktops, mostly), as well as some other software.
115 </para>
116 </note>
117
118 <para condition="html" role="usernotes">User Notes:
119 <ulink url="&blfs-wiki;/systemd"/></para>
120
121 </sect2>
122
123 <sect2 role="installation">
124
125 <title>Installation of Systemd</title>
126
127 <para>First, re-build systemd:</para>
128
129<screen><userinput>
130
131sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h") &amp;&amp;
132patch -Np1 -i ../systemd-&systemd-version;-compat-patch; &amp;&amp;
133
134 ./configure --prefix=/usr \
135 --sysconfdir=/etc \
136 --localstatedir=/var \
137 --with-rootprefix= \
138 --with-rootlibdir=/lib \
139 --enable-split-usr \
140 --docdir=/usr/share/doc/systemd-&systemd-version; &amp;&amp;
141
142make</userinput></screen>
143
144 <para>First prevent a few broken test cases from being run:</para>
145
146<screen><userinput>
147
148sed -i s:test/udev-test.pl::g Makefile</userinput></screen>
149
150 <note>
151 <para>For full test coverage, the test suite should be run
152 from a system booted using systemd.
153 </para>
154 </note>
155
156 <para>To test the results, issue: <command>make -k check</command>.</para>
157
158 <warning>
159 <para>Installing the package will override all systemd components installed in LFS,
160 so it is advised that the re-installation is done in a rescue mode with no programs except basic
161 systemd ones running. To enter rescue mode with systemd, issue this as the <systemitem class="username">root</systemitem>
162 from a VT console:
163 </para>
164 </warning>
165
166<screen role="root">
167
168<userinput>systemctl start rescue.target</userinput></screen>
169
170 <para>Now re-install as the <systemitem class="username">root</systemitem>
171 user:</para>
172
173<screen role="root">
174
175<userinput>make install</userinput></screen>
176
177 <para>Move NSS myhostname library to <filename class="directory">/lib</filename>
178 as the <systemitem class="username">root</systemitem> user:</para>
179
180<screen role="root">
181
182<userinput>mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
183
184 <para>Remove an unnecessary directory as the as the <systemitem class="username">root</systemitem> user:</para>
185
186<screen role="root">
187
188<userinput>rm -rfv /usr/lib/rpm</userinput></screen>
189
190<para>Remove a reference to a non-existent group as the <systemitem class="username">root</systemitem> user:</para>
191
192<screen role="root">
193
194<userinput>sed -i "s:0775 root lock:0755 root root:g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
195
196 <note>
197 <para> If libxslt was present, the man pages were also installed by make install.
198 If not, the old man pages will remain and there's no need to reinstall
199 them since the same version of systemd was used. The same goes for the sysv compatibility links.
200 </para>
201 </note>
202
203 <warning>
204 <para>WARNING do NOT run the systemd-machine-id-setup command again,
205 UUID was generated once and as its name says,
206 it should be unique. Generating a new one might result in broken logs from
207 journald and who knows what else.
208 </para>
209 </warning>
210
211 <note>
212 <para>If libgcrypt was present at build time, make sure you move both libgpg-error and
213 libgcrypt versioned libraries to /lib so that they are
214 available in case of separate /usr by
215 issuing the following commands as the <systemitem class="username">root</systemitem>
216 user:
217
218<screen role="root"><userinput>
219
220mv -v /usr/lib/libgcrypt.so.* /usr/lib/libgpg-error.so.* /lib &amp;&amp;
221ln -sfv ../../lib/$(readlink /usr/lib/libgcrypt.so) /usr/lib/libgcrypt.so &amp;&amp;
222ln -sfv ../../lib/$(readlink /usr/lib/libgpg-error.so) /usr/lib/libgpg-error.so</userinput></screen></para></note>
223
224 <para>If the pam_systemd.so PAM module was built, the system-sesion
225 PAM file needs to be modified and a new file needs to be created in order
226 for systemd-logind to work correctly. Create the configuration file by
227 issuing the following commands as the <systemitem class="username">root</systemitem>
228 user:
229 </para>
230
231<screen role="root"><userinput>
232
233cat &gt; /etc/pam.d/system-session &lt;&lt; "EOF"
234# Begin Systemd addition
235
236session optional pam_loginuid.so
237session optional pam_systemd.so
238# End Systemd addition
239EOF &amp;&amp;
240
241cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
242# Begin /etc/pam.d/systemd-user
243
244account required pam_access.so
245account include system-account
246
247session required pam_env.so
248session required pam_limits.so
249session include system-session
250
251auth required pam_deny.so
252password required pam_deny.so
253
254# End /etc/pam.d/systemd-user
255EOF</userinput></screen>
256
257 <para>At this point it would be a nice idea to reboot, or rather restart the
258 systemd components in case of new dependencies as the <systemitem class="username">root</systemitem>
259 user:</para>
260
261<screen role="root">
262
263<userinput>systemctl daemon-reexec &amp;&amp;
264systemctl restart systemd-logind systemd-journald systemd-udevd</userinput></screen>
265
266 </sect2>
267
268 <sect2 role="commands">
269 <title>Command Explanations</title>
270
271 <para>
272 <parameter>--with-root*</parameter>: These switches ensure that core programs and
273 shared libraries are installed in the subdirectories
274 of the root partition.
275 </para>
276
277 <para>
278 <parameter>--enable-split-usr</parameter>: This switch ensures that systemd will work on
279 systems where /bin, /lib and /sbin directories are not
280 symlinks to their /usr counterparts.
281 </para>
282
283 </sect2>
284
285 <sect2 role="content">
286 <title>Contents</title>
287
288 <para>
289 A list of the installed files, along with their short descriptions can be
290 found at <ulink url="http://www.linuxfromscratch.org/lfs/view/&lfs-version;/chapter06/systemd.html#contents-systemd"/>.
291 </para>
292 </sect2>
293
294</sect1>
Note: See TracBrowser for help on using the repository browser.