source: general/sysutils/systemd.xml@ b575134

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

second attempt at fixing url to lfs systemd on the systemd page

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/gnome@13437 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>sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h") &amp;&amp;
130patch -Np1 -i ../systemd-&systemd-version;-compat-patch; &amp;&amp;
131
132 ./configure --prefix=/usr \
133 --sysconfdir=/etc \
134 --localstatedir=/var \
135 --with-rootprefix= \
136 --with-rootlibdir=/lib \
137 --enable-split-usr \
138 --docdir=/usr/share/doc/systemd-&systemd-version; &amp;&amp;
139
140make</userinput></screen>
141
142 <para>First prevent a few broken test cases from being run:</para>
143
144<screen><userinput>sed -i s:test/udev-test.pl::g Makefile</userinput></screen>
145
146 <note>
147 <para>For full test coverage, the test suite should be run
148 from a system booted using systemd.
149 </para>
150 </note>
151
152 <para>To test the results, issue: <command>make -k check</command>.</para>
153
154 <warning>
155 <para>Installing the package will override all systemd components installed in LFS,
156 so it is advised that the re-installation is done in a rescue mode with no programs except basic
157 systemd ones running. To enter rescue mode with systemd, issue this as the <systemitem class="username">root</systemitem>
158 from a VT console:
159 </para>
160 </warning>
161
162<screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
163
164 <para>Now re-install as the <systemitem class="username">root</systemitem>
165 user:</para>
166
167<screen role="root">
168
169<userinput>make install</userinput></screen>
170
171 <para>Move NSS myhostname library to <filename class="directory">/lib</filename>
172 as the <systemitem class="username">root</systemitem> user:</para>
173
174<screen role="root"><userinput>mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
175
176 <para>Remove an unnecessary directory as the as the <systemitem class="username">root</systemitem> user:</para>
177
178<screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
179
180<para>Remove a reference to a non-existent group as the <systemitem class="username">root</systemitem> user:</para>
181
182<screen role="root"><userinput>sed -i "s:0775 root lock:0755 root root:g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
183
184 <note>
185 <para> If libxslt was present, the man pages were also installed by make install.
186 If not, the old man pages will remain and there's no need to reinstall
187 them since the same version of systemd was used. The same goes for the sysv compatibility links.
188 </para>
189 </note>
190
191 <warning>
192 <para>WARNING do NOT run the systemd-machine-id-setup command again,
193 UUID was generated once and as its name says,
194 it should be unique. Generating a new one might result in broken logs from
195 journald and who knows what else.
196 </para>
197 </warning>
198
199 <note>
200 <para>If libgcrypt was present at build time, make sure you move both libgpg-error and
201 libgcrypt versioned libraries to /lib so that they are
202 available in case of separate /usr by
203 issuing the following commands as the <systemitem class="username">root</systemitem>
204 user:
205
206<screen role="root"><userinput>mv -v /usr/lib/libgcrypt.so.* /usr/lib/libgpg-error.so.* /lib &amp;&amp;
207ln -sfv ../../lib/$(readlink /usr/lib/libgcrypt.so) /usr/lib/libgcrypt.so &amp;&amp;
208ln -sfv ../../lib/$(readlink /usr/lib/libgpg-error.so) /usr/lib/libgpg-error.so</userinput></screen></para></note>
209
210 <para>If the pam_systemd.so PAM module was built, the system-sesion
211 PAM file needs to be modified and a new file needs to be created in order
212 for systemd-logind to work correctly. Create the configuration file by
213 issuing the following commands as the <systemitem class="username">root</systemitem>
214 user:
215 </para>
216
217<screen role="root"><userinput>
218
219cat &gt; /etc/pam.d/system-session &lt;&lt; "EOF"
220# Begin Systemd addition
221
222session optional pam_loginuid.so
223session optional pam_systemd.so
224# End Systemd addition
225EOF &amp;&amp;
226
227cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
228# Begin /etc/pam.d/systemd-user
229
230account required pam_access.so
231account include system-account
232
233session required pam_env.so
234session required pam_limits.so
235session include system-session
236
237auth required pam_deny.so
238password required pam_deny.so
239
240# End /etc/pam.d/systemd-user
241EOF</userinput></screen>
242
243 <para>At this point it would be a nice idea to reboot, or rather restart the
244 systemd components in case of new dependencies as the <systemitem class="username">root</systemitem>
245 user:</para>
246
247<screen role="root"><userinput>systemctl daemon-reexec &amp;&amp;
248systemctl restart systemd-logind systemd-journald systemd-udevd</userinput></screen>
249
250 </sect2>
251
252 <sect2 role="commands">
253 <title>Command Explanations</title>
254
255 <para>
256 <parameter>--with-root*</parameter>: These switches ensure that core programs and
257 shared libraries are installed in the subdirectories
258 of the root partition.
259 </para>
260
261 <para>
262 <parameter>--enable-split-usr</parameter>: This switch ensures that systemd will work on
263 systems where /bin, /lib and /sbin directories are not
264 symlinks to their /usr counterparts.
265 </para>
266
267 </sect2>
268
269 <sect2 role="content">
270 <title>Contents</title>
271
272 <para>
273 A list of the installed files, along with their short descriptions can be
274 found at <ulink url="http://www.linuxfromscratch.org/lfs/view/systemd/chapter06/systemd.html#contents-systemd"/>.
275 </para>
276 </sect2>
277
278</sect1>
Note: See TracBrowser for help on using the repository browser.