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