[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 |
|
---|
[eb31fb51] | 7 | <!ENTITY systemd-download-http "https://github.com/systemd/systemd/archive/v&systemd-version;/systemd-&systemd-version;.tar.xz">
|
---|
[f852e706] | 8 | <!ENTITY systemd-download-ftp " ">
|
---|
[71becb2] | 9 | <!ENTITY systemd-md5sum "2d8f6ebded3462ac0d1a6275e54db561">
|
---|
| 10 | <!ENTITY systemd-size "4.6 MB">
|
---|
| 11 | <!ENTITY systemd-buildsize "225 MB (an additional 8 MB for tests)">
|
---|
[4c54ce8] | 12 | <!ENTITY systemd-time "2.1 SBU (an additional 0.2 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>
|
---|
| 120 |
|
---|
| 121 | <para>
|
---|
| 122 | Rebuild <application>systemd</application> by running the
|
---|
| 123 | following commands:
|
---|
| 124 | </para>
|
---|
| 125 |
|
---|
[71becb2] | 126 | <screen><userinput>meson --prefix /usr \
|
---|
| 127 | --sysconfdir /etc \
|
---|
| 128 | --localstatedir /var \
|
---|
| 129 | -Dblkid=true \
|
---|
| 130 | -Dbuildtype=release \
|
---|
| 131 | -Ddefault-dnssec=no \
|
---|
| 132 | -Dfirstboot=false \
|
---|
| 133 | -Dldconfig=false \
|
---|
| 134 | -Drootprefix= \
|
---|
| 135 | -Drootlibdir=/lib \
|
---|
| 136 | -Dsplit-usr=true \
|
---|
| 137 | -Dsysusers=false \
|
---|
| 138 | -Db_lto=false \
|
---|
| 139 | $PWD build &&
|
---|
| 140 | cd build &&
|
---|
| 141 | ninja</userinput></screen>
|
---|
[f852e706] | 142 |
|
---|
| 143 | <note>
|
---|
| 144 | <para>
|
---|
| 145 | For the best results, make sure you run the testsuite from
|
---|
| 146 | a system that is booted by the same
|
---|
| 147 | <application>systemd</application> version you are rebuilding.
|
---|
| 148 | </para>
|
---|
| 149 | </note>
|
---|
| 150 |
|
---|
| 151 | <para>
|
---|
[71becb2] | 152 | To test the results, issue: <command>ninja test</command>.
|
---|
[f852e706] | 153 | </para>
|
---|
| 154 |
|
---|
| 155 | <warning>
|
---|
| 156 | <para>
|
---|
| 157 | Installing the package will overwrite all files installed by
|
---|
| 158 | <application>systemd</application> in LFS. It is critical that
|
---|
| 159 | nothing uses either <application>systemd</application> or
|
---|
| 160 | <application>Udev</application> libraries during the installation.
|
---|
| 161 | The best way to ensure that these libraries are not being used is to
|
---|
| 162 | run the installation in rescue mode. To switch to rescue mode,
|
---|
| 163 | run the following command as the
|
---|
| 164 | <systemitem class="username">root</systemitem> user (from a TTY):
|
---|
| 165 | </para>
|
---|
| 166 |
|
---|
| 167 | <screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
|
---|
| 168 | </warning>
|
---|
| 169 |
|
---|
| 170 | <para>
|
---|
| 171 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 172 | </para>
|
---|
| 173 |
|
---|
[71becb2] | 174 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
[f852e706] | 175 |
|
---|
| 176 | <para>
|
---|
[9db77dd] | 177 | If <application>RPM</application> is not installed, remove an
|
---|
| 178 | unnecessary directory by running the following command as the
|
---|
| 179 | <systemitem class="username">root</systemitem> user:
|
---|
[f852e706] | 180 | </para>
|
---|
| 181 |
|
---|
| 182 | <screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
|
---|
| 183 |
|
---|
| 184 | </sect2>
|
---|
| 185 |
|
---|
| 186 | <sect2 role="configuration">
|
---|
| 187 | <title>Configuring systemd</title>
|
---|
| 188 |
|
---|
| 189 | <para>
|
---|
[325d88d6] | 190 | The <filename>/etc/pam.d/system-session</filename> file needs to
|
---|
[f852e706] | 191 | be modified and a new file needs to be created in order for
|
---|
| 192 | <command>systemd-logind</command> to work correctly. Run the following
|
---|
| 193 | commands as the <systemitem class="username">root</systemitem> user:
|
---|
| 194 | </para>
|
---|
| 195 |
|
---|
| 196 | <screen role="root"><userinput>cat >> /etc/pam.d/system-session << "EOF"
|
---|
| 197 | <literal># Begin Systemd addition
|
---|
| 198 |
|
---|
| 199 | session required pam_loginuid.so
|
---|
| 200 | session optional pam_systemd.so
|
---|
| 201 |
|
---|
| 202 | # End Systemd addition</literal>
|
---|
| 203 | EOF
|
---|
| 204 |
|
---|
| 205 | cat > /etc/pam.d/systemd-user << "EOF"
|
---|
| 206 | <literal># Begin /etc/pam.d/systemd-user
|
---|
| 207 |
|
---|
| 208 | account required pam_access.so
|
---|
| 209 | account include system-account
|
---|
| 210 |
|
---|
| 211 | session required pam_env.so
|
---|
| 212 | session required pam_limits.so
|
---|
| 213 | session include system-session
|
---|
| 214 |
|
---|
| 215 | auth required pam_deny.so
|
---|
| 216 | password required pam_deny.so
|
---|
| 217 |
|
---|
| 218 | # End /etc/pam.d/systemd-user</literal>
|
---|
| 219 | EOF</userinput></screen>
|
---|
| 220 |
|
---|
| 221 | <para>
|
---|
| 222 | At this point, you should reload the systemd daemon, and reenter
|
---|
| 223 | multi-user mode with the following commands (as the
|
---|
| 224 | <systemitem class="username">root</systemitem> user):
|
---|
| 225 | </para>
|
---|
| 226 |
|
---|
| 227 | <screen role="root"><userinput>systemctl daemon-reload
|
---|
| 228 | systemctl start multi-user.target</userinput></screen>
|
---|
| 229 |
|
---|
| 230 | <warning><para>If upgrading from a previous version of systemd and an
|
---|
| 231 | initrd is used for system boot, you should generate a new initrd before
|
---|
| 232 | rebooting the system.</para></warning>
|
---|
| 233 |
|
---|
| 234 | </sect2>
|
---|
| 235 |
|
---|
| 236 | <sect2 role="content">
|
---|
| 237 | <title>Contents</title>
|
---|
| 238 |
|
---|
| 239 | <para>
|
---|
| 240 | A list of the installed files, along with their short
|
---|
| 241 | descriptions can be found at
|
---|
| 242 | <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
|
---|
| 243 | </para>
|
---|
| 244 |
|
---|
| 245 | <para>
|
---|
| 246 | Listed below are the newly installed libraries and directories
|
---|
| 247 | along with short descriptions.
|
---|
| 248 | </para>
|
---|
| 249 |
|
---|
| 250 | <segmentedlist>
|
---|
| 251 | <segtitle>Installed Programs</segtitle>
|
---|
| 252 | <segtitle>Installed Libraries</segtitle>
|
---|
| 253 | <segtitle>Installed Directories</segtitle>
|
---|
| 254 |
|
---|
| 255 | <seglistitem>
|
---|
| 256 | <seg>
|
---|
| 257 | None
|
---|
| 258 | </seg>
|
---|
| 259 | <seg>
|
---|
| 260 | pam_systemd.so
|
---|
| 261 | (in <filename class="directory">/lib/security</filename>)
|
---|
| 262 | </seg>
|
---|
| 263 | <seg>
|
---|
| 264 | None
|
---|
| 265 | </seg>
|
---|
| 266 | </seglistitem>
|
---|
| 267 | </segmentedlist>
|
---|
| 268 |
|
---|
| 269 | <variablelist>
|
---|
| 270 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 271 | <?dbfo list-presentation="list"?>
|
---|
| 272 | <?dbhtml list-presentation="table"?>
|
---|
| 273 |
|
---|
| 274 | <varlistentry id="pam_systemd">
|
---|
| 275 | <term><filename class="libraryfile">pam_systemd.so</filename></term>
|
---|
| 276 | <listitem>
|
---|
| 277 | <para>
|
---|
| 278 | is a PAM module used to register user sessions with the
|
---|
| 279 | <application>systemd</application> login manager,
|
---|
| 280 | <command>systemd-logind</command>.
|
---|
| 281 | </para>
|
---|
| 282 | <indexterm zone="systemd pam_systemd">
|
---|
| 283 | <primary sortas="c-pam_systemd">pam_systemd.so</primary>
|
---|
| 284 | </indexterm>
|
---|
| 285 | </listitem>
|
---|
| 286 | </varlistentry>
|
---|
| 287 |
|
---|
| 288 | </variablelist>
|
---|
| 289 |
|
---|
| 290 | </sect2>
|
---|
| 291 |
|
---|
| 292 | </sect1>
|
---|