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