[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 |
|
---|
| 7 | <!ENTITY systemd-download-http "http://anduin.linuxfromscratch.org/sources/other/systemd/systemd-&systemd-version;.tar.xz">
|
---|
| 8 | <!ENTITY systemd-download-ftp " ">
|
---|
[9db77dd] | 9 | <!ENTITY systemd-md5sum "281604885d5a87f0359244f6f84037cb">
|
---|
| 10 | <!ENTITY systemd-size "3.9 MB">
|
---|
| 11 | <!ENTITY systemd-buildsize "429 MB (an additional 89 MB for tests)">
|
---|
| 12 | <!ENTITY systemd-time "7.7 SBU (an additional 0.5 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 |
|
---|
[78295629] | 43 | &lfs80_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 |
|
---|
| 74 | <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
|
---|
| 75 | <para role="recommended">
|
---|
[6bb16f7] | 76 | <xref linkend="polkit"/> and <xref linkend="python3"/> <!-- hwdb -->
|
---|
[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"/>,
|
---|
| 87 | <xref linkend="libidn"/>,
|
---|
| 88 | <xref linkend="libxkbcommon"/>,
|
---|
| 89 | <xref linkend="qemu"/>,
|
---|
| 90 | <xref linkend="valgrind"/>,
|
---|
[7c99c52] | 91 | <xref linkend="zsh"/> (for the zsh completions),
|
---|
[f852e706] | 92 | <ulink url="https://www.kernel.org/pub/linux/utils/cryptsetup/">cryptsetup</ulink>,
|
---|
| 93 | <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
|
---|
| 94 | <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
|
---|
| 95 | <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
|
---|
| 96 | <ulink url="http://sourceforge.net/projects/libseccomp/">libseccomp</ulink>,
|
---|
[1ac8b4c6] | 97 | <ulink url="https://github.com/Cyan4973/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"/>,
|
---|
| 106 | <xref linkend="docbook-xsl"/> and
|
---|
| 107 | <xref linkend="libxslt"/>
|
---|
| 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 |
|
---|
[7c99c52] | 118 | <!-- Not needed as of v231 -renodr
|
---|
[f852e706] | 119 | <para>First, fix a potential security issue with framebuffer
|
---|
| 120 | devices:</para>
|
---|
| 121 |
|
---|
| 122 | <screen><userinput>sed -e 's@DRI and frame buffer@DRI@' \
|
---|
[1552ac8] | 123 | -e '/SUBSYSTEM==\"graphics\", KERNEL==\"fb\*\"/d' \
|
---|
[f852e706] | 124 | -i src/login/70-uaccess.rules</userinput></screen>
|
---|
[7c99c52] | 125 | -->
|
---|
[f852e706] | 126 |
|
---|
| 127 | <para>
|
---|
| 128 | Disable two tests that always fail:
|
---|
| 129 | </para>
|
---|
| 130 |
|
---|
| 131 | <screen><userinput>sed -e 's:test/udev-test.pl ::g' \
|
---|
| 132 | -e 's:test-copy$(EXEEXT) ::g' \
|
---|
| 133 | -i Makefile.in</userinput></screen>
|
---|
| 134 |
|
---|
| 135 | <para>
|
---|
| 136 | Rebuild <application>systemd</application> by running the
|
---|
| 137 | following commands:
|
---|
| 138 | </para>
|
---|
| 139 |
|
---|
[4747091] | 140 | <screen><userinput>cc_cv_CFLAGS__flto=no \
|
---|
| 141 | XSLTPROC="/usr/bin/xsltproc" \
|
---|
[f852e706] | 142 | ./configure --prefix=/usr \
|
---|
| 143 | --sysconfdir=/etc \
|
---|
| 144 | --localstatedir=/var \
|
---|
| 145 | --with-rootprefix= \
|
---|
| 146 | --with-rootlibdir=/lib \
|
---|
| 147 | --enable-split-usr \
|
---|
| 148 | --disable-firstboot \
|
---|
| 149 | --disable-ldconfig \
|
---|
| 150 | --disable-sysusers \
|
---|
| 151 | --without-python \
|
---|
| 152 | --with-default-dnssec=no \
|
---|
| 153 | --docdir=/usr/share/doc/systemd-&systemd-version; &&
|
---|
| 154 | make</userinput></screen>
|
---|
| 155 |
|
---|
| 156 | <note>
|
---|
| 157 | <para>
|
---|
| 158 | For the best results, make sure you run the testsuite from
|
---|
| 159 | a system that is booted by the same
|
---|
| 160 | <application>systemd</application> version you are rebuilding.
|
---|
| 161 | </para>
|
---|
| 162 | </note>
|
---|
| 163 |
|
---|
| 164 | <para>
|
---|
| 165 | To test the results, issue: <command>make -k check</command>.
|
---|
| 166 | </para>
|
---|
| 167 |
|
---|
| 168 | <warning>
|
---|
| 169 | <para>
|
---|
| 170 | Installing the package will overwrite all files installed by
|
---|
| 171 | <application>systemd</application> in LFS. It is critical that
|
---|
| 172 | nothing uses either <application>systemd</application> or
|
---|
| 173 | <application>Udev</application> libraries during the installation.
|
---|
| 174 | The best way to ensure that these libraries are not being used is to
|
---|
| 175 | run the installation in rescue mode. To switch to rescue mode,
|
---|
| 176 | run the following command as the
|
---|
| 177 | <systemitem class="username">root</systemitem> user (from a TTY):
|
---|
| 178 | </para>
|
---|
| 179 |
|
---|
| 180 | <screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
|
---|
| 181 | </warning>
|
---|
| 182 |
|
---|
| 183 | <para>
|
---|
| 184 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 185 | </para>
|
---|
| 186 |
|
---|
| 187 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 188 |
|
---|
| 189 | <para>
|
---|
[9db77dd] | 190 | If <application>RPM</application> is not installed, remove an
|
---|
| 191 | unnecessary directory by running the following command as the
|
---|
| 192 | <systemitem class="username">root</systemitem> user:
|
---|
[f852e706] | 193 | </para>
|
---|
| 194 |
|
---|
| 195 | <screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
|
---|
| 196 |
|
---|
| 197 | </sect2>
|
---|
| 198 |
|
---|
| 199 | <sect2 role="configuration">
|
---|
| 200 | <title>Configuring systemd</title>
|
---|
| 201 |
|
---|
| 202 | <para>
|
---|
| 203 | The <filename>/etc/pam.d/system-sesion</filename> file needs to
|
---|
| 204 | be modified and a new file needs to be created in order for
|
---|
| 205 | <command>systemd-logind</command> to work correctly. Run the following
|
---|
| 206 | commands as the <systemitem class="username">root</systemitem> user:
|
---|
| 207 | </para>
|
---|
| 208 |
|
---|
| 209 | <screen role="root"><userinput>cat >> /etc/pam.d/system-session << "EOF"
|
---|
| 210 | <literal># Begin Systemd addition
|
---|
| 211 |
|
---|
| 212 | session required pam_loginuid.so
|
---|
| 213 | session optional pam_systemd.so
|
---|
| 214 |
|
---|
| 215 | # End Systemd addition</literal>
|
---|
| 216 | EOF
|
---|
| 217 |
|
---|
| 218 | cat > /etc/pam.d/systemd-user << "EOF"
|
---|
| 219 | <literal># Begin /etc/pam.d/systemd-user
|
---|
| 220 |
|
---|
| 221 | account required pam_access.so
|
---|
| 222 | account include system-account
|
---|
| 223 |
|
---|
| 224 | session required pam_env.so
|
---|
| 225 | session required pam_limits.so
|
---|
| 226 | session include system-session
|
---|
| 227 |
|
---|
| 228 | auth required pam_deny.so
|
---|
| 229 | password required pam_deny.so
|
---|
| 230 |
|
---|
| 231 | # End /etc/pam.d/systemd-user</literal>
|
---|
| 232 | EOF</userinput></screen>
|
---|
| 233 |
|
---|
| 234 | <para>
|
---|
| 235 | At this point, you should reload the systemd daemon, and reenter
|
---|
| 236 | multi-user mode with the following commands (as the
|
---|
| 237 | <systemitem class="username">root</systemitem> user):
|
---|
| 238 | </para>
|
---|
| 239 |
|
---|
| 240 | <screen role="root"><userinput>systemctl daemon-reload
|
---|
| 241 | systemctl start multi-user.target</userinput></screen>
|
---|
| 242 |
|
---|
| 243 | <warning><para>If upgrading from a previous version of systemd and an
|
---|
| 244 | initrd is used for system boot, you should generate a new initrd before
|
---|
| 245 | rebooting the system.</para></warning>
|
---|
| 246 |
|
---|
| 247 | </sect2>
|
---|
| 248 |
|
---|
| 249 | <sect2 role="content">
|
---|
| 250 | <title>Contents</title>
|
---|
| 251 |
|
---|
| 252 | <para>
|
---|
| 253 | A list of the installed files, along with their short
|
---|
| 254 | descriptions can be found at
|
---|
| 255 | <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
|
---|
| 256 | </para>
|
---|
| 257 |
|
---|
| 258 | <para>
|
---|
| 259 | Listed below are the newly installed libraries and directories
|
---|
| 260 | along with short descriptions.
|
---|
| 261 | </para>
|
---|
| 262 |
|
---|
| 263 | <segmentedlist>
|
---|
| 264 | <segtitle>Installed Programs</segtitle>
|
---|
| 265 | <segtitle>Installed Libraries</segtitle>
|
---|
| 266 | <segtitle>Installed Directories</segtitle>
|
---|
| 267 |
|
---|
| 268 | <seglistitem>
|
---|
| 269 | <seg>
|
---|
| 270 | None
|
---|
| 271 | </seg>
|
---|
| 272 | <seg>
|
---|
| 273 | pam_systemd.so
|
---|
| 274 | (in <filename class="directory">/lib/security</filename>)
|
---|
| 275 | </seg>
|
---|
| 276 | <seg>
|
---|
| 277 | None
|
---|
| 278 | </seg>
|
---|
| 279 | </seglistitem>
|
---|
| 280 | </segmentedlist>
|
---|
| 281 |
|
---|
| 282 | <variablelist>
|
---|
| 283 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 284 | <?dbfo list-presentation="list"?>
|
---|
| 285 | <?dbhtml list-presentation="table"?>
|
---|
| 286 |
|
---|
| 287 | <varlistentry id="pam_systemd">
|
---|
| 288 | <term><filename class="libraryfile">pam_systemd.so</filename></term>
|
---|
| 289 | <listitem>
|
---|
| 290 | <para>
|
---|
| 291 | is a PAM module used to register user sessions with the
|
---|
| 292 | <application>systemd</application> login manager,
|
---|
| 293 | <command>systemd-logind</command>.
|
---|
| 294 | </para>
|
---|
| 295 | <indexterm zone="systemd pam_systemd">
|
---|
| 296 | <primary sortas="c-pam_systemd">pam_systemd.so</primary>
|
---|
| 297 | </indexterm>
|
---|
| 298 | </listitem>
|
---|
| 299 | </varlistentry>
|
---|
| 300 |
|
---|
| 301 | </variablelist>
|
---|
| 302 |
|
---|
| 303 | </sect2>
|
---|
| 304 |
|
---|
| 305 | </sect1>
|
---|