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