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