[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 |
|
---|
[18f18c2] | 7 | <!ENTITY systemd-download-http "http://anduin.linuxfromscratch.org/LFS/systemd-&systemd-version;-&systemd-stable;.tar.xz">
|
---|
[f852e706] | 8 | <!ENTITY systemd-download-ftp " ">
|
---|
[2a9e001] | 9 | <!ENTITY systemd-md5sum "0d0a6752b2199aca4de0de3eea5db788">
|
---|
| 10 | <!ENTITY systemd-size "4.7 MB">
|
---|
| 11 | <!ENTITY systemd-buildsize "314 MB (an additonal 11 MB for tests)">
|
---|
| 12 | <!ENTITY systemd-time "0.3 SBU (< 0.1 SBU for tests)">
|
---|
[f852e706] | 13 |
|
---|
| 14 | ]>
|
---|
| 15 |
|
---|
[2a9e001] | 16 | <sect1 id="systemd" xreflabel="Systemd-&systemd-version;-&systemd-stable;" revision="systemd">
|
---|
[f852e706] | 17 | <?dbhtml filename="systemd.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
| 20 | <othername>$LastChangedBy$</othername>
|
---|
| 21 | <date>$Date$</date>
|
---|
| 22 | </sect1info>
|
---|
| 23 |
|
---|
[2a9e001] | 24 | <title>Systemd-&systemd-version;-&systemd-stable;</title>
|
---|
[f852e706] | 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 |
|
---|
[a509a18] | 43 | &lfs83_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>
|
---|
[e1a8598d] | 66 |
|
---|
[f852e706] | 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">
|
---|
[60ddbaf] | 76 | <xref role="runtime" linkend="polkit"/>
|
---|
[f852e706] | 77 | </para>
|
---|
| 78 |
|
---|
| 79 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 80 | <para role="optional">
|
---|
| 81 | <xref linkend="curl"/>,
|
---|
[b1be08a] | 82 | <xref linkend="cryptsetup"/>,
|
---|
[5fff3896] | 83 | <xref linkend="git"/>,
|
---|
[f852e706] | 84 | <xref linkend="gnutls"/>,
|
---|
| 85 | <xref linkend="iptables"/>,
|
---|
| 86 | <xref linkend="libgcrypt"/>,
|
---|
[531f138] | 87 | <xref linkend="libidn2"/>,
|
---|
[11f3b7e] | 88 | <xref linkend="libseccomp"/>,
|
---|
[f852e706] | 89 | <xref linkend="libxkbcommon"/>,
|
---|
[b1be08a] | 90 | <xref linkend="make-ca"/>,
|
---|
[f852e706] | 91 | <xref linkend="qemu"/>,
|
---|
| 92 | <xref linkend="valgrind"/>,
|
---|
[7c99c52] | 93 | <xref linkend="zsh"/> (for the zsh completions),
|
---|
[f852e706] | 94 | <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
|
---|
| 95 | <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
|
---|
| 96 | <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
|
---|
[331a2b7] | 97 | <ulink url="http://lz4.github.io/lz4/">lz4</ulink>,
|
---|
[f852e706] | 98 | <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
|
---|
| 99 | <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
|
---|
| 100 | <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
|
---|
| 101 | </para>
|
---|
| 102 |
|
---|
| 103 | <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
|
---|
| 104 | <para role="optional">
|
---|
| 105 | <xref linkend="DocBook"/>,
|
---|
[192b967] | 106 | <xref linkend="docbook-xsl"/>, and
|
---|
| 107 | <xref linkend="libxslt"/>
|
---|
[f852e706] | 108 | </para>
|
---|
| 109 |
|
---|
| 110 | <para condition="html" role="usernotes">User Notes:
|
---|
| 111 | <ulink url="&blfs-wiki;/systemd"/>
|
---|
| 112 | </para>
|
---|
| 113 | </sect2>
|
---|
| 114 |
|
---|
| 115 | <sect2 role="installation">
|
---|
| 116 | <title>Installation of systemd</title>
|
---|
| 117 |
|
---|
[b4e1b81] | 118 | <para>Remove an unneeded group,
|
---|
| 119 | <systemitem class="groupname">render</systemitem>, from the default udev
|
---|
| 120 | rules:</para>
|
---|
| 121 |
|
---|
| 122 | <screen><userinput remap="pre">sed -i 's/GROUP="render", //' rules/50-udev-default.rules.in</userinput></screen>
|
---|
| 123 |
|
---|
[f852e706] | 124 | <para>
|
---|
| 125 | Rebuild <application>systemd</application> by running the
|
---|
| 126 | following commands:
|
---|
| 127 | </para>
|
---|
| 128 |
|
---|
[e1a8598d] | 129 | <screen><userinput>mkdir build &&
|
---|
| 130 | cd build &&
|
---|
| 131 |
|
---|
| 132 | meson --prefix=/usr \
|
---|
| 133 | --sysconfdir=/etc \
|
---|
| 134 | --localstatedir=/var \
|
---|
| 135 | -Dblkid=true \
|
---|
| 136 | -Dbuildtype=release \
|
---|
| 137 | -Ddefault-dnssec=no \
|
---|
| 138 | -Dfirstboot=false \
|
---|
| 139 | -Dinstall-tests=false \
|
---|
| 140 | -Dldconfig=false \
|
---|
| 141 | -Drootprefix= \
|
---|
| 142 | -Drootlibdir=/lib \
|
---|
| 143 | -Dsplit-usr=true \
|
---|
| 144 | -Dsysusers=false \
|
---|
| 145 | -Db_lto=false \
|
---|
| 146 | .. &&
|
---|
| 147 |
|
---|
[71becb2] | 148 | ninja</userinput></screen>
|
---|
[f852e706] | 149 |
|
---|
| 150 | <note>
|
---|
| 151 | <para>
|
---|
[e1a8598d] | 152 | For the best test results, make sure you run the testsuite from
|
---|
[f852e706] | 153 | a system that is booted by the same
|
---|
| 154 | <application>systemd</application> version you are rebuilding.
|
---|
| 155 | </para>
|
---|
| 156 | </note>
|
---|
| 157 |
|
---|
| 158 | <para>
|
---|
[2a9e001] | 159 | To test the results, issue: <command>ninja test</command>. One test,
|
---|
| 160 | <filename>test-fs-util</filename>, is known to fail.
|
---|
| 161 | <!-- https://github.com/systemd/systemd/pull/10263/commits -->
|
---|
[f852e706] | 162 | </para>
|
---|
| 163 |
|
---|
| 164 | <warning>
|
---|
| 165 | <para>
|
---|
| 166 | Installing the package will overwrite all files installed by
|
---|
| 167 | <application>systemd</application> in LFS. It is critical that
|
---|
| 168 | nothing uses either <application>systemd</application> or
|
---|
| 169 | <application>Udev</application> libraries during the installation.
|
---|
| 170 | The best way to ensure that these libraries are not being used is to
|
---|
| 171 | run the installation in rescue mode. To switch to rescue mode,
|
---|
| 172 | run the following command as the
|
---|
| 173 | <systemitem class="username">root</systemitem> user (from a TTY):
|
---|
| 174 | </para>
|
---|
| 175 |
|
---|
| 176 | <screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
|
---|
| 177 | </warning>
|
---|
| 178 |
|
---|
| 179 | <para>
|
---|
| 180 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 181 | </para>
|
---|
| 182 |
|
---|
[71becb2] | 183 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
[f852e706] | 184 |
|
---|
| 185 | <para>
|
---|
[9db77dd] | 186 | If <application>RPM</application> is not installed, remove an
|
---|
| 187 | unnecessary directory by running the following command as the
|
---|
| 188 | <systemitem class="username">root</systemitem> user:
|
---|
[f852e706] | 189 | </para>
|
---|
| 190 |
|
---|
| 191 | <screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
|
---|
| 192 |
|
---|
| 193 | </sect2>
|
---|
| 194 |
|
---|
| 195 | <sect2 role="configuration">
|
---|
| 196 | <title>Configuring systemd</title>
|
---|
| 197 |
|
---|
| 198 | <para>
|
---|
[325d88d6] | 199 | The <filename>/etc/pam.d/system-session</filename> file needs to
|
---|
[f852e706] | 200 | be modified and a new file needs to be created in order for
|
---|
| 201 | <command>systemd-logind</command> to work correctly. Run the following
|
---|
| 202 | commands as the <systemitem class="username">root</systemitem> user:
|
---|
| 203 | </para>
|
---|
| 204 |
|
---|
| 205 | <screen role="root"><userinput>cat >> /etc/pam.d/system-session << "EOF"
|
---|
| 206 | <literal># Begin Systemd addition
|
---|
| 207 |
|
---|
[d267a13] | 208 | session required pam_loginuid.so
|
---|
| 209 | session optional pam_systemd.so
|
---|
[f852e706] | 210 |
|
---|
| 211 | # End Systemd addition</literal>
|
---|
| 212 | EOF
|
---|
| 213 |
|
---|
| 214 | cat > /etc/pam.d/systemd-user << "EOF"
|
---|
| 215 | <literal># Begin /etc/pam.d/systemd-user
|
---|
| 216 |
|
---|
[d267a13] | 217 | account required pam_access.so
|
---|
| 218 | account include system-account
|
---|
[f852e706] | 219 |
|
---|
[d267a13] | 220 | session required pam_env.so
|
---|
| 221 | session required pam_limits.so
|
---|
| 222 | session required pam_unix.so
|
---|
| 223 | session required pam_loginuid.so
|
---|
| 224 | session optional pam_keyinit.so force revoke
|
---|
| 225 | session optional pam_systemd.so
|
---|
[f852e706] | 226 |
|
---|
[d267a13] | 227 | auth required pam_deny.so
|
---|
| 228 | password required pam_deny.so
|
---|
[f852e706] | 229 |
|
---|
| 230 | # End /etc/pam.d/systemd-user</literal>
|
---|
| 231 | EOF</userinput></screen>
|
---|
| 232 |
|
---|
| 233 | <para>
|
---|
| 234 | At this point, you should reload the systemd daemon, and reenter
|
---|
| 235 | multi-user mode with the following commands (as the
|
---|
| 236 | <systemitem class="username">root</systemitem> user):
|
---|
| 237 | </para>
|
---|
| 238 |
|
---|
| 239 | <screen role="root"><userinput>systemctl daemon-reload
|
---|
| 240 | systemctl start multi-user.target</userinput></screen>
|
---|
| 241 |
|
---|
| 242 | <warning><para>If upgrading from a previous version of systemd and an
|
---|
| 243 | initrd is used for system boot, you should generate a new initrd before
|
---|
| 244 | rebooting the system.</para></warning>
|
---|
| 245 |
|
---|
| 246 | </sect2>
|
---|
| 247 |
|
---|
| 248 | <sect2 role="content">
|
---|
| 249 | <title>Contents</title>
|
---|
| 250 |
|
---|
| 251 | <para>
|
---|
| 252 | A list of the installed files, along with their short
|
---|
| 253 | descriptions can be found at
|
---|
| 254 | <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
|
---|
| 255 | </para>
|
---|
| 256 |
|
---|
| 257 | <para>
|
---|
| 258 | Listed below are the newly installed libraries and directories
|
---|
| 259 | along with short descriptions.
|
---|
| 260 | </para>
|
---|
| 261 |
|
---|
| 262 | <segmentedlist>
|
---|
| 263 | <segtitle>Installed Programs</segtitle>
|
---|
| 264 | <segtitle>Installed Libraries</segtitle>
|
---|
| 265 | <segtitle>Installed Directories</segtitle>
|
---|
| 266 |
|
---|
| 267 | <seglistitem>
|
---|
| 268 | <seg>
|
---|
| 269 | None
|
---|
| 270 | </seg>
|
---|
| 271 | <seg>
|
---|
| 272 | pam_systemd.so
|
---|
| 273 | (in <filename class="directory">/lib/security</filename>)
|
---|
| 274 | </seg>
|
---|
| 275 | <seg>
|
---|
| 276 | None
|
---|
| 277 | </seg>
|
---|
| 278 | </seglistitem>
|
---|
| 279 | </segmentedlist>
|
---|
| 280 |
|
---|
| 281 | <variablelist>
|
---|
| 282 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 283 | <?dbfo list-presentation="list"?>
|
---|
| 284 | <?dbhtml list-presentation="table"?>
|
---|
| 285 |
|
---|
| 286 | <varlistentry id="pam_systemd">
|
---|
| 287 | <term><filename class="libraryfile">pam_systemd.so</filename></term>
|
---|
| 288 | <listitem>
|
---|
| 289 | <para>
|
---|
| 290 | is a PAM module used to register user sessions with the
|
---|
| 291 | <application>systemd</application> login manager,
|
---|
| 292 | <command>systemd-logind</command>.
|
---|
| 293 | </para>
|
---|
| 294 | <indexterm zone="systemd pam_systemd">
|
---|
| 295 | <primary sortas="c-pam_systemd">pam_systemd.so</primary>
|
---|
| 296 | </indexterm>
|
---|
| 297 | </listitem>
|
---|
| 298 | </varlistentry>
|
---|
| 299 |
|
---|
| 300 | </variablelist>
|
---|
| 301 |
|
---|
| 302 | </sect2>
|
---|
| 303 |
|
---|
| 304 | </sect1>
|
---|