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