[f852e706] | 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 |
|
---|
[d5b408c3] | 7 | <!ENTITY systemd-download-http "http://anduin.linuxfromscratch.org/sources/other/systemd/systemd-&systemd-version;-lfs.tar.xz">
|
---|
[f852e706] | 8 | <!ENTITY systemd-download-ftp " ">
|
---|
[d5b408c3] | 9 | <!ENTITY systemd-md5sum "be1338f2775713dc33da74ac0146e37b">
|
---|
| 10 | <!ENTITY systemd-size "4.0 MB">
|
---|
| 11 | <!ENTITY systemd-buildsize "371 MB (an additional 29 MB for tests)">
|
---|
[9db77dd] | 12 | <!ENTITY systemd-time "7.7 SBU (an additional 0.5 SBU for tests)">
|
---|
[f852e706] | 13 |
|
---|
| 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="systemd" xreflabel="Systemd-&systemd-version;" revision="systemd">
|
---|
| 17 | <?dbhtml filename="systemd.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
| 20 | <othername>$LastChangedBy$</othername>
|
---|
| 21 | <date>$Date$</date>
|
---|
| 22 | </sect1info>
|
---|
| 23 |
|
---|
| 24 | <title>Systemd-&systemd-version;</title>
|
---|
| 25 |
|
---|
| 26 | <indexterm zone="systemd">
|
---|
| 27 | <primary sortas="a-systemd">systemd</primary>
|
---|
| 28 | </indexterm>
|
---|
| 29 |
|
---|
| 30 | <sect2 role="package">
|
---|
| 31 | <title>Introduction to systemd</title>
|
---|
| 32 |
|
---|
| 33 | <para>
|
---|
| 34 | While <application>systemd</application> was installed when
|
---|
| 35 | building LFS, there are many features provided by the package that
|
---|
[77a6d25] | 36 | were not included in the initial installation because
|
---|
[f852e706] | 37 | <application>Linux-PAM</application> was not yet installed.
|
---|
| 38 | The <application>systemd</application> package needs to be
|
---|
| 39 | rebuilt to provide a working <command>systemd-logind</command> service,
|
---|
[77a6d25] | 40 | which provides many additional features for dependent packages.
|
---|
[f852e706] | 41 | </para>
|
---|
| 42 |
|
---|
[975f600b] | 43 | &lfs81_checked;
|
---|
[f852e706] | 44 |
|
---|
| 45 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 46 | <itemizedlist spacing="compact">
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download (HTTP): <ulink url="&systemd-download-http;"/></para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Download (FTP): <ulink url="&systemd-download-ftp;"/></para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Download MD5 sum: &systemd-md5sum;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Download size: &systemd-size;</para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>Estimated disk space required: &systemd-buildsize;</para>
|
---|
| 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>Estimated build time: &systemd-time;</para>
|
---|
| 64 | </listitem>
|
---|
| 65 | </itemizedlist>
|
---|
| 66 |
|
---|
| 67 | <bridgehead renderas="sect3">systemd Dependencies</bridgehead>
|
---|
| 68 |
|
---|
| 69 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 70 | <para role="required">
|
---|
| 71 | <xref linkend="linux-pam"/>
|
---|
| 72 | </para>
|
---|
| 73 |
|
---|
[c7ab75e8] | 74 | <bridgehead renderas="sect4">Recommended Runtime Dependencies</bridgehead>
|
---|
[f852e706] | 75 | <para role="recommended">
|
---|
[572553b] | 76 | <xref role="runtime" linkend="polkit"/> and
|
---|
| 77 | <xref role="runtime" linkend="python3"/> (also required for the
|
---|
[d5b408c3] | 78 | test suite)<!-- hwdb and tests -->
|
---|
[f852e706] | 79 | </para>
|
---|
| 80 |
|
---|
| 81 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 82 | <para role="optional">
|
---|
| 83 | <xref linkend="cacerts"/>,
|
---|
| 84 | <xref linkend="curl"/>,
|
---|
| 85 | <xref linkend="elfutils"/>,
|
---|
| 86 | <xref linkend="gnutls"/>,
|
---|
| 87 | <xref linkend="iptables"/>,
|
---|
| 88 | <xref linkend="libgcrypt"/>,
|
---|
[531f138] | 89 | <xref linkend="libidn2"/>,
|
---|
[11f3b7e] | 90 | <xref linkend="libseccomp"/>,
|
---|
[f852e706] | 91 | <xref linkend="libxkbcommon"/>,
|
---|
| 92 | <xref linkend="qemu"/>,
|
---|
| 93 | <xref linkend="valgrind"/>,
|
---|
[7c99c52] | 94 | <xref linkend="zsh"/> (for the zsh completions),
|
---|
[f852e706] | 95 | <ulink url="https://www.kernel.org/pub/linux/utils/cryptsetup/">cryptsetup</ulink>,
|
---|
| 96 | <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
|
---|
| 97 | <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
|
---|
| 98 | <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
|
---|
[331a2b7] | 99 | <ulink url="http://lz4.github.io/lz4/">lz4</ulink>,
|
---|
[f852e706] | 100 | <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
|
---|
| 101 | <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
|
---|
| 102 | <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
|
---|
| 103 | </para>
|
---|
| 104 |
|
---|
| 105 | <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
|
---|
| 106 | <para role="optional">
|
---|
| 107 | <xref linkend="DocBook"/>,
|
---|
[d5b408c3] | 108 | <xref linkend="docbook-xsl"/>,
|
---|
| 109 | <xref linkend="libxslt"/>, and
|
---|
| 110 | <xref linkend="lxml"/>
|
---|
[f852e706] | 111 | </para>
|
---|
| 112 |
|
---|
| 113 | <para condition="html" role="usernotes">User Notes:
|
---|
| 114 | <ulink url="&blfs-wiki;/systemd"/>
|
---|
| 115 | </para>
|
---|
| 116 | </sect2>
|
---|
| 117 |
|
---|
| 118 | <sect2 role="installation">
|
---|
| 119 | <title>Installation of systemd</title>
|
---|
[975f600b] | 120 | <!--
|
---|
[f852e706] | 121 | <para>
|
---|
| 122 | Disable two tests that always fail:
|
---|
| 123 | </para>
|
---|
[975f600b] | 124 | We didn't remove this? -->
|
---|
[f852e706] | 125 |
|
---|
| 126 | <para>
|
---|
| 127 | Rebuild <application>systemd</application> by running the
|
---|
| 128 | following commands:
|
---|
| 129 | </para>
|
---|
| 130 |
|
---|
[c7ab75e8] | 131 | <!-- The logic behind - -disable-manpages is that you will already have the
|
---|
| 132 | manpages from this version of systemd installed. This is a rebuild, not
|
---|
| 133 | a fresh installation of a new version, and previous versions manpages
|
---|
| 134 | generally apply. This may change in a future update. -->
|
---|
| 135 |
|
---|
| 136 | <screen><userinput>./configure --prefix=/usr \
|
---|
[f852e706] | 137 | --sysconfdir=/etc \
|
---|
| 138 | --localstatedir=/var \
|
---|
| 139 | --with-rootprefix= \
|
---|
| 140 | --with-rootlibdir=/lib \
|
---|
| 141 | --enable-split-usr \
|
---|
| 142 | --disable-firstboot \
|
---|
| 143 | --disable-ldconfig \
|
---|
| 144 | --disable-sysusers \
|
---|
[c7ab75e8] | 145 | --disable-manpages \
|
---|
[f852e706] | 146 | --with-default-dnssec=no \
|
---|
| 147 | --docdir=/usr/share/doc/systemd-&systemd-version; &&
|
---|
| 148 | make</userinput></screen>
|
---|
| 149 |
|
---|
| 150 | <note>
|
---|
| 151 | <para>
|
---|
| 152 | For the best results, make sure you run the testsuite from
|
---|
| 153 | a system that is booted by the same
|
---|
| 154 | <application>systemd</application> version you are rebuilding.
|
---|
| 155 | </para>
|
---|
| 156 | </note>
|
---|
| 157 |
|
---|
| 158 | <para>
|
---|
[d5b408c3] | 159 | To test the results, issue: <command>make check</command>.
|
---|
[f852e706] | 160 | </para>
|
---|
| 161 |
|
---|
| 162 | <warning>
|
---|
| 163 | <para>
|
---|
| 164 | Installing the package will overwrite all files installed by
|
---|
| 165 | <application>systemd</application> in LFS. It is critical that
|
---|
| 166 | nothing uses either <application>systemd</application> or
|
---|
| 167 | <application>Udev</application> libraries during the installation.
|
---|
| 168 | The best way to ensure that these libraries are not being used is to
|
---|
| 169 | run the installation in rescue mode. To switch to rescue mode,
|
---|
| 170 | run the following command as the
|
---|
| 171 | <systemitem class="username">root</systemitem> user (from a TTY):
|
---|
| 172 | </para>
|
---|
| 173 |
|
---|
| 174 | <screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
|
---|
| 175 | </warning>
|
---|
| 176 |
|
---|
| 177 | <para>
|
---|
| 178 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 179 | </para>
|
---|
| 180 |
|
---|
| 181 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 182 |
|
---|
| 183 | <para>
|
---|
[9db77dd] | 184 | If <application>RPM</application> is not installed, remove an
|
---|
| 185 | unnecessary directory by running the following command as the
|
---|
| 186 | <systemitem class="username">root</systemitem> user:
|
---|
[f852e706] | 187 | </para>
|
---|
| 188 |
|
---|
| 189 | <screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
|
---|
| 190 |
|
---|
| 191 | </sect2>
|
---|
| 192 |
|
---|
| 193 | <sect2 role="configuration">
|
---|
| 194 | <title>Configuring systemd</title>
|
---|
| 195 |
|
---|
| 196 | <para>
|
---|
[325d88d6] | 197 | The <filename>/etc/pam.d/system-session</filename> file needs to
|
---|
[f852e706] | 198 | be modified and a new file needs to be created in order for
|
---|
| 199 | <command>systemd-logind</command> to work correctly. Run the following
|
---|
| 200 | commands as the <systemitem class="username">root</systemitem> user:
|
---|
| 201 | </para>
|
---|
| 202 |
|
---|
| 203 | <screen role="root"><userinput>cat >> /etc/pam.d/system-session << "EOF"
|
---|
| 204 | <literal># Begin Systemd addition
|
---|
| 205 |
|
---|
| 206 | session required pam_loginuid.so
|
---|
| 207 | session optional pam_systemd.so
|
---|
| 208 |
|
---|
| 209 | # End Systemd addition</literal>
|
---|
| 210 | EOF
|
---|
| 211 |
|
---|
| 212 | cat > /etc/pam.d/systemd-user << "EOF"
|
---|
| 213 | <literal># Begin /etc/pam.d/systemd-user
|
---|
| 214 |
|
---|
| 215 | account required pam_access.so
|
---|
| 216 | account include system-account
|
---|
| 217 |
|
---|
| 218 | session required pam_env.so
|
---|
| 219 | session required pam_limits.so
|
---|
| 220 | session include system-session
|
---|
| 221 |
|
---|
| 222 | auth required pam_deny.so
|
---|
| 223 | password required pam_deny.so
|
---|
| 224 |
|
---|
| 225 | # End /etc/pam.d/systemd-user</literal>
|
---|
| 226 | EOF</userinput></screen>
|
---|
| 227 |
|
---|
| 228 | <para>
|
---|
| 229 | At this point, you should reload the systemd daemon, and reenter
|
---|
| 230 | multi-user mode with the following commands (as the
|
---|
| 231 | <systemitem class="username">root</systemitem> user):
|
---|
| 232 | </para>
|
---|
| 233 |
|
---|
| 234 | <screen role="root"><userinput>systemctl daemon-reload
|
---|
| 235 | systemctl start multi-user.target</userinput></screen>
|
---|
| 236 |
|
---|
| 237 | <warning><para>If upgrading from a previous version of systemd and an
|
---|
| 238 | initrd is used for system boot, you should generate a new initrd before
|
---|
| 239 | rebooting the system.</para></warning>
|
---|
| 240 |
|
---|
| 241 | </sect2>
|
---|
| 242 |
|
---|
| 243 | <sect2 role="content">
|
---|
| 244 | <title>Contents</title>
|
---|
| 245 |
|
---|
| 246 | <para>
|
---|
| 247 | A list of the installed files, along with their short
|
---|
| 248 | descriptions can be found at
|
---|
| 249 | <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
|
---|
| 250 | </para>
|
---|
| 251 |
|
---|
| 252 | <para>
|
---|
| 253 | Listed below are the newly installed libraries and directories
|
---|
| 254 | along with short descriptions.
|
---|
| 255 | </para>
|
---|
| 256 |
|
---|
| 257 | <segmentedlist>
|
---|
| 258 | <segtitle>Installed Programs</segtitle>
|
---|
| 259 | <segtitle>Installed Libraries</segtitle>
|
---|
| 260 | <segtitle>Installed Directories</segtitle>
|
---|
| 261 |
|
---|
| 262 | <seglistitem>
|
---|
| 263 | <seg>
|
---|
| 264 | None
|
---|
| 265 | </seg>
|
---|
| 266 | <seg>
|
---|
| 267 | pam_systemd.so
|
---|
| 268 | (in <filename class="directory">/lib/security</filename>)
|
---|
| 269 | </seg>
|
---|
| 270 | <seg>
|
---|
| 271 | None
|
---|
| 272 | </seg>
|
---|
| 273 | </seglistitem>
|
---|
| 274 | </segmentedlist>
|
---|
| 275 |
|
---|
| 276 | <variablelist>
|
---|
| 277 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 278 | <?dbfo list-presentation="list"?>
|
---|
| 279 | <?dbhtml list-presentation="table"?>
|
---|
| 280 |
|
---|
| 281 | <varlistentry id="pam_systemd">
|
---|
| 282 | <term><filename class="libraryfile">pam_systemd.so</filename></term>
|
---|
| 283 | <listitem>
|
---|
| 284 | <para>
|
---|
| 285 | is a PAM module used to register user sessions with the
|
---|
| 286 | <application>systemd</application> login manager,
|
---|
| 287 | <command>systemd-logind</command>.
|
---|
| 288 | </para>
|
---|
| 289 | <indexterm zone="systemd pam_systemd">
|
---|
| 290 | <primary sortas="c-pam_systemd">pam_systemd.so</primary>
|
---|
| 291 | </indexterm>
|
---|
| 292 | </listitem>
|
---|
| 293 | </varlistentry>
|
---|
| 294 |
|
---|
| 295 | </variablelist>
|
---|
| 296 |
|
---|
| 297 | </sect2>
|
---|
| 298 |
|
---|
| 299 | </sect1>
|
---|