aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06
diff options
context:
space:
mode:
authorDJ Lucas <dj@linuxfromscratch.org>2014-06-14 19:51:45 +0000
committerDJ Lucas <dj@linuxfromscratch.org>2014-06-14 19:51:45 +0000
commit61ce0b1fe4ffbf86ef3189e733f9f372cac419aa (patch)
tree4d470e322c309bbd743befe34f84f06d4c95b040 /chapter06
parent6f34f438e62ee95fd8b9025984ecc0a0bafd1f32 (diff)
Synchronized with LFS-SVN-20140611.
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10576 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r--chapter06/acl.xml6
-rw-r--r--chapter06/automake.xml12
-rw-r--r--chapter06/bash.xml4
-rw-r--r--chapter06/bc.xml4
-rw-r--r--chapter06/binutils.xml18
-rw-r--r--chapter06/coreutils.xml8
-rw-r--r--chapter06/createfiles.xml92
-rw-r--r--chapter06/dbus.xml7
-rw-r--r--chapter06/e2fsprogs.xml17
-rw-r--r--chapter06/gcc.xml31
-rw-r--r--chapter06/gdbm.xml49
-rw-r--r--chapter06/glibc.xml6
-rw-r--r--chapter06/groff.xml6
-rw-r--r--chapter06/mpfr.xml5
-rw-r--r--chapter06/perl.xml4
-rw-r--r--chapter06/readline.xml7
-rw-r--r--chapter06/shadow.xml5
-rw-r--r--chapter06/systemd.xml7
18 files changed, 217 insertions, 71 deletions
diff --git a/chapter06/acl.xml b/chapter06/acl.xml
index 4da5e353b..e89bee48b 100644
--- a/chapter06/acl.xml
+++ b/chapter06/acl.xml
@@ -51,6 +51,12 @@
<screen><userinput remap="pre">sed -i "s:| sed.*::g" test/{sbits-restore,cp,misc}.test</userinput></screen>
+ <para>Additionally, fix a bug that causes <command>getfacl -e</command>
+ to segfault on overly long group name:</para>
+
+<screen><userinput remap="pre">sed -i -e "/TABS-1;/a if (x > (TABS-1)) x = (TABS-1);" \
+ libacl/__acl_to_any_text.c</userinput></screen>
+
<para>Prepare Acl for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr --libexecdir=/usr/lib</userinput></screen>
diff --git a/chapter06/automake.xml b/chapter06/automake.xml
index d02700a27..117f9c48b 100644
--- a/chapter06/automake.xml
+++ b/chapter06/automake.xml
@@ -73,7 +73,7 @@ make -j4 check</userinput></screen>
<segtitle>Installed directories</segtitle>
<seglistitem>
- <seg>acinstall, aclocal, aclocal-&am-minor-version;, automake,
+ <seg>aclocal, aclocal-&am-minor-version;, automake,
automake-&am-minor-version;, compile, config.guess, config.sub,
depcomp, install-sh, mdate-sh, missing, mkinstalldirs,
py-compile, and ylwrap</seg>
@@ -87,16 +87,6 @@ make -j4 check</userinput></screen>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
- <varlistentry id="acinstall">
- <term><command>acinstall</command></term>
- <listitem>
- <para>A script that installs aclocal-style M4 files</para>
- <indexterm zone="ch-system-automake acinstall">
- <primary sortas="b-acinstall">acinstall</primary>
- </indexterm>
- </listitem>
- </varlistentry>
-
<varlistentry id="aclocal">
<term><command>aclocal</command></term>
<listitem>
diff --git a/chapter06/bash.xml b/chapter06/bash.xml
index d19ea1a25..12f063c1b 100644
--- a/chapter06/bash.xml
+++ b/chapter06/bash.xml
@@ -39,12 +39,12 @@
<sect2 role="installation">
<title>Installation of Bash</title>
-<!--
+
<para>First, apply the following patch to fix various bugs that have been
addressed upstream:</para>
<screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen>
--->
+
<para>Prepare Bash for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
diff --git a/chapter06/bc.xml b/chapter06/bc.xml
index 0957421bd..17be4bfcf 100644
--- a/chapter06/bc.xml
+++ b/chapter06/bc.xml
@@ -41,6 +41,10 @@
<sect2 role="installation">
<title>Installation of Bc</title>
+ <para>First, fix some minor memory leaks in the code:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&bc-memory-leak-patch;</userinput></screen>
+
<para>Prepare Bc for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
diff --git a/chapter06/binutils.xml b/chapter06/binutils.xml
index d54cbe45e..dc3904c9e 100644
--- a/chapter06/binutils.xml
+++ b/chapter06/binutils.xml
@@ -64,6 +64,11 @@ Ask your system administrator to create more.</computeroutput></screen>
<screen><userinput remap="pre">rm -fv etc/standards.info
sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in</userinput></screen>
+ <para>Add an upstream patch to use gcc's link time optimization (LTO)
+ the default:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&binutils-lto-patch;</userinput></screen>
+
<para>The Binutils documentation recommends building Binutils outside of the
source directory in a dedicated build directory:</para>
@@ -72,7 +77,9 @@ cd ../binutils-build</userinput></screen>
<para>Prepare Binutils for compilation:</para>
-<screen><userinput remap="configure">../binutils-&binutils-version;/configure --prefix=/usr --enable-shared</userinput></screen>
+<screen><userinput remap="configure">../binutils-&binutils-version;/configure --prefix=/usr \
+ --enable-shared \
+ --disable-werror</userinput></screen>
<para>Compile the package:</para>
@@ -109,18 +116,15 @@ cd ../binutils-build</userinput></screen>
<screen><userinput remap="test">make check</userinput></screen>
+ <para>Six tests in the lto.exp testsuite are known to fail due
+ to changes in the most recent version of gcc.</para>
+
<para>Install the package:</para>
<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
-<!--
- <para>Install the <filename class="headerfile">libiberty</filename> header
- file that is needed by some packages:</para>
-<screen><userinput remap="install">cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
--->
</sect2>
-
<sect2 id="contents-binutils" role="content">
<title>Contents of Binutils</title>
diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml
index b1e5199a2..d7577694f 100644
--- a/chapter06/coreutils.xml
+++ b/chapter06/coreutils.xml
@@ -40,11 +40,11 @@
<sect2 role="installation">
<title>Installation of Coreutils</title>
-<!--
- <para>Fix a couple of test failures:</para>
-<screen><userinput remap="pre">patch -Np1 -i ../&coreutils-test-patch;</userinput></screen>
--->
+ <para>First, fix a segfault in <command>shuf</command> program:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&coreutils-shuf-segfault-patch;</userinput></screen>
+
<para>POSIX requires that programs from Coreutils recognize character
boundaries correctly even in multibyte locales. The following patch
fixes this non-compliance and other internationalization-related bugs:</para>
diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml
index 5161d6505..1aa193ec8 100644
--- a/chapter06/createfiles.xml
+++ b/chapter06/createfiles.xml
@@ -46,6 +46,89 @@ ln -sv /tools/lib/libstdc++.so{,.6} /usr/lib
sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la
ln -sv bash /bin/sh</userinput></screen>
+ <variablelist>
+ <title>The purpose of each link:</title>
+
+ <varlistentry>
+ <term><parameter><filename>/bin/bash</filename></parameter></term>
+ <listitem>
+ <para>Many <command>bash</command> scripts specify
+ <filename>/bin/bash</filename>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter><filename>/bin/cat</filename></parameter></term>
+ <listitem>
+ <para>This pathname is hard-coded into Glibc's configure script.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter><filename>/bin/echo</filename></parameter></term>
+ <listitem>
+ <para>This is to satisfy one of the tests in Glibc's test suite, which
+ expects <filename>/bin/echo</filename>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter><filename>/bin/pwd</filename></parameter></term>
+ <listitem>
+ <para>Some <command>configure</command> scripts, particularly Glibc's,
+ have this pathname hard-coded.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter><filename>/bin/stty</filename></parameter></term>
+ <listitem>
+ <para>This pathname is hard-coded into Expect, therefore it is needed
+ for Binutils and GCC test suites to pass.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter><filename>/usr/bin/perl</filename></parameter></term>
+ <listitem>
+ <para>Many Perl scripts hard-code this path to the
+ <command>perl</command> program.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter><filename>/usr/lib/libgcc_s.so{,.1}</filename></parameter></term>
+ <listitem>
+ <para>Glibc needs this for the pthreads library to work.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter><filename>/usr/lib/libstdc++{,.6}</filename></parameter></term>
+ <listitem>
+ <para>This is needed by several tests in Glibc's test suite, as well as
+ for C++ support in GMP.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter><filename>/usr/lib/libstdc++.la</filename></parameter></term>
+ <listitem>
+ <para>This prevents a <filename class="directory">/tools</filename>
+ reference that would otherwise be in
+ <filename>/usr/lib/libstdc++.la</filename> after GCC is installed.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter><filename>/bin/sh</filename></parameter></term>
+ <listitem>
+ <para>Many shell scripts hard-code <filename>/bin/sh</filename>.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
<para>Historically, Linux maintains a list of the mounted file systems in the
file <filename>/etc/mtab</filename>. Modern kernels maintain this list
internally and exposes it to the user via the <filename
@@ -66,6 +149,7 @@ ln -sv bash /bin/sh</userinput></screen>
<screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
<literal>root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/dev/null:/bin/false
+daemon:x:6:6:Daemon User:/dev/null:/bin/false
messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>
EOF</userinput></screen>
@@ -78,7 +162,7 @@ EOF</userinput></screen>
<screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
<literal>root:x:0:
-bin:x:1:
+bin:x:1:daemon
sys:x:2:
kmem:x:3:
tape:x:4:
@@ -97,13 +181,15 @@ adm:x:16:
messagebus:x:18:
systemd-journal:x:23:
mail:x:34:
-nogroup:x:99:</literal>
+nogroup:x:99:
+users:x:999:</literal>
EOF</userinput></screen>
<para>The created groups are not part of any standard&mdash;they are groups
decided on in part by the requirements of the Udev configuration in this
chapter, and in part by common convention employed by a number of existing
- Linux distributions. The Linux Standard Base (LSB, available at <ulink
+ Linux distributions. In addition, some test suites rely on specific users
+ or groups. The Linux Standard Base (LSB, available at <ulink
url="http://www.linuxbase.org"/>) recommends only that, besides the group
<systemitem class="groupname">root</systemitem> with a Group ID (GID) of 0,
a group <systemitem class="groupname">bin</systemitem> with a GID of 1 be
diff --git a/chapter06/dbus.xml b/chapter06/dbus.xml
index 476baf41d..9ed4e5b6b 100644
--- a/chapter06/dbus.xml
+++ b/chapter06/dbus.xml
@@ -74,7 +74,7 @@
<para>This package does come with a testsuite, but it requires several
packages that are not included in LFS. Instructions for running the
testsuite can be found in the BLFS book at
- <ulink url="&blfs-root;/view/svn/general/dbus.html"/>.</para>
+ <ulink url="&blfs-root;/view/&short-version;/general/dbus.html"/>.</para>
<para>Install the package:</para>
@@ -93,6 +93,11 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri
<screen><userinput remap="install">ln -sv /etc/machine-id /var/lib/dbus</userinput></screen>
+ <para>Finally, generate a D-Bus UUID to avoid possible warnings
+ when building some packages in BLFS:</para>
+
+<screen><userinput remap="install">dbus-uuidgen --ensure</userinput></screen>
+
</sect2>
<sect2 id="contents-dbus" role="content">
diff --git a/chapter06/e2fsprogs.xml b/chapter06/e2fsprogs.xml
index 7aca00f9e..ca9268d48 100644
--- a/chapter06/e2fsprogs.xml
+++ b/chapter06/e2fsprogs.xml
@@ -44,10 +44,11 @@
<sect2 role="installation">
<title>Installation of E2fsprogs</title>
- <para>First fix a problem with running regression tests in the LFS chroot
+ <para>First fix some problems with running regression tests in the LFS chroot
environment:</para>
-<screen><userinput remap="pre">sed -i -e 's|^LD_LIBRARY_PATH.*|&amp;:/tools/lib|' tests/test_config</userinput></screen>
+<screen><userinput remap="pre">patch -Np1 -i ../&e2fsprogs-fix-test-patch;
+sed -i -e 's|^LD_LIBRARY_PATH.*|&amp;:/tools/lib|' tests/test_config</userinput></screen>
<para>The E2fsprogs documentation recommends that the package be built in
a subdirectory of the source tree: </para>
@@ -121,17 +122,19 @@ PKG_CONFIG_PATH=/tools/lib/pkgconfig \
<screen><userinput remap="make">make</userinput></screen>
- <para>To test the results, issue:</para>
+ <para>To set up the test suite we need to temporarily copy
+ a library from /tools/lib so the test programs can find it.
+ To run the tests, issue:</para>
-<screen><userinput remap="test">make check</userinput></screen>
+<screen><userinput remap="test">cp -v /tools/lib/libblkid.so.1 /lib
+make check
+rm -v /lib/libblkid.so.1</userinput></screen>
<para>One of the E2fsprogs tests will attempt to allocate 256 MB of memory.
If you do not have significantly more RAM than this, be sure to enable
sufficient swap space for the test. See <xref
linkend="space-creatingfilesystem"/> and <xref linkend="space-mounting"/>
- for details on creating and enabling swap space. Additionally,
- three tests try to allocate a two terabyte partition and will fail
- unless you have at least that much unused disk space available.</para>
+ for details on creating and enabling swap space.</para>
<para>Install the binaries, documentation, and shared libraries:</para>
diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml
index 063e0146a..9ab97ea22 100644
--- a/chapter06/gcc.xml
+++ b/chapter06/gcc.xml
@@ -41,6 +41,11 @@
<sect2 role="installation">
<title>Installation of GCC</title>
+ <para>First fix a problem identified upstream that causes some
+ programs to fail:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-patch;</userinput></screen>
+<!--
<para>As in <xref linkend="ch-tools-gcc-pass2"/>, apply the following
<command>sed</command> to force the build to use the
<option>-fomit-frame-pointer</option> compiler flag in order to ensure
@@ -49,19 +54,7 @@
<screen><userinput remap="pre">case `uname -m` in
i?86) sed -i 's/^T_CFLAGS =$/&amp; -fomit-frame-pointer/' gcc/Makefile.in ;;
esac</userinput></screen>
-<!--
- <para>Workaround a bug so that GCC doesn't install
- <filename class="libraryfile">libiberty.a</filename>, which is already
- provided by Binutils:</para>
-
-<screen><userinput remap="pre">sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
-->
- <para>Also fix an error in one of the check Makefiles and disable one test in
- the g++ libmudflap test suite:</para>
-
-<screen><userinput remap="pre">sed -i -e /autogen/d -e /check.sh/d fixincludes/Makefile.in
-mv -v libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx{,.disable}</userinput></screen>
-
<para>The GCC documentation recommends building GCC outside of the source
directory in a dedicated build directory:</para>
@@ -157,6 +150,20 @@ cd ../gcc-build</userinput></screen>
<screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen>
+ <para>Add a compatibility symlink to enable building programs with
+ Link Time Optimization (LTO):</para>
+
+<screen><userinput remap="install">install -dm755 /usr/lib/bfd-plugins
+pushd /usr/lib/bfd-plugins
+
+if [ $(uname -m) == "i686" ]; then
+ ln -sfv ../../libexec/gcc/i686-pc-linux-gnu/&gcc-version;/liblto_plugin.so
+else
+ ln -sfv ../../libexec/gcc/x86_64-unknown-linux-gnu/&gcc-version;/liblto_plugin.so
+fi
+
+popd</userinput></screen>
+
<para>Now that our final toolchain is in place, it is important to again ensure
that compiling and linking will work as expected. We do this by performing
the same sanity checks as we did earlier in the chapter:</para>
diff --git a/chapter06/gdbm.xml b/chapter06/gdbm.xml
index 051207671..a5dacdbcc 100644
--- a/chapter06/gdbm.xml
+++ b/chapter06/gdbm.xml
@@ -23,10 +23,11 @@
<sect2 role="package">
<title/>
- <para>The GDBM package contains the GNU Database Manager. This is a disk
- file format database which stores key/data-pairs in single files. The
- actual data of any record being stored is indexed by a unique key, which can
- be retrieved in less time than if it was stored in a text file.</para>
+ <para>The GDBM package contains the GNU Database Manager. It is a library
+ of database functions that use extensible hashing and work similar to the
+ standard UNIX dbm. The library provides primitives for storing key/data
+ pairs, searching and retrieving the data by its key and deleting a key
+ along with its data. </para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -82,7 +83,7 @@
<segtitle>Installed libraries</segtitle>
<seglistitem>
- <seg>testgdbm</seg>
+ <seg>gdbm_dump, gdbm_load, and gdbmtool</seg>
<seg>libgdbm.{a,so} and libgdbm_compat.{a,so}</seg>
</seglistitem>
</segmentedlist>
@@ -92,12 +93,32 @@
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
- <varlistentry id="testgdbm">
- <term><command>testgdbm</command></term>
+ <varlistentry id="gdbm_dump">
+ <term><command>gdbm_dump</command></term>
+ <listitem>
+ <para>Dumps a GDBM database to a file.</para>
+ <indexterm zone="ch-system-gdbm gdbm_dump">
+ <primary sortas="b-gdbm_dump">gdbm_dump</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="gdbm_load">
+ <term><command>gdbm_load</command></term>
+ <listitem>
+ <para>Recreates a GDBM database from a dump file.</para>
+ <indexterm zone="ch-system-gdbm gdbm_load">
+ <primary sortas="b-gdbm_load">gdbm_load</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="gdbmtool">
+ <term><command>gdbmtool</command></term>
<listitem>
<para>Tests and modifies a GDBM database</para>
- <indexterm zone="ch-system-gdbm testgdbm">
- <primary sortas="b-testgdbm">testgdbm</primary>
+ <indexterm zone="ch-system-gdbm gdbmtool">
+ <primary sortas="b-gdbmtool">gdbmtool</primary>
</indexterm>
</listitem>
</varlistentry>
@@ -112,6 +133,16 @@
</listitem>
</varlistentry>
+ <varlistentry id="libgdbm_compat">
+ <term><filename class="libraryfile">libgdbm_compat</filename></term>
+ <listitem>
+ <para>Compatibility library containing older DBM functions</para>
+ <indexterm zone="ch-system-gdbm libgdbm_compat">
+ <primary sortas="c-libgdbm_compat">libgdbm_compat</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>
diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml
index 114409670..637d28c4b 100644
--- a/chapter06/glibc.xml
+++ b/chapter06/glibc.xml
@@ -417,7 +417,7 @@ mkdir -pv /etc/ld.so.conf.d</userinput></screen>
ldd, lddlibc4, locale, localedef, makedb, mtrace, nscd, pcprofiledump,
pldd, rpcgen, sln, sotruss, sprof, tzselect, xtrace,
zdump, and zic</seg>
- <seg>ld.so, libBrokenLocale.{a,so}, libSegFault.so, libanl.{a,so},
+ <seg>ld-&glibc-version;.so, libBrokenLocale.{a,so}, libSegFault.so, libanl.{a,so},
libc.{a,so}, libc_nonshared.a, libcidn.so,
libcrypt.{a,so}, libdl.{a,so}, libg.a, libieee.a, libm.{a,so},
libmcheck.a, libmemusage.so, libnsl.{a,so}, libnss_compat.so,
@@ -703,11 +703,11 @@ mkdir -pv /etc/ld.so.conf.d</userinput></screen>
</varlistentry>
<varlistentry id="ld.so">
- <term><filename class="libraryfile">ld.so</filename></term>
+ <term><filename class="libraryfile">ld-&glibc-version;.so</filename></term>
<listitem>
<para>The helper program for shared library executables</para>
<indexterm zone="ch-system-glibc ld.so">
- <primary sortas="c-ld.so">ld.so</primary>
+ <primary sortas="c-ld.so">ld-&glibc-version;.so</primary>
</indexterm>
</listitem>
</varlistentry>
diff --git a/chapter06/groff.xml b/chapter06/groff.xml
index 69a51a36c..9e837f5fc 100644
--- a/chapter06/groff.xml
+++ b/chapter06/groff.xml
@@ -63,12 +63,6 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>Some documentation programs, such as <command>xman</command>,
- will not work properly without the following symlinks:</para>
-
-<screen><userinput remap="install">ln -sv eqn /usr/bin/geqn
-ln -sv tbl /usr/bin/gtbl</userinput></screen>
-
</sect2>
<sect2 id="contents-groff" role="content">
diff --git a/chapter06/mpfr.xml b/chapter06/mpfr.xml
index 708101891..517baf755 100644
--- a/chapter06/mpfr.xml
+++ b/chapter06/mpfr.xml
@@ -41,6 +41,11 @@
<sect2 role="installation">
<title>Installation of MPFR</title>
+ <para>First, apply the following patch to fix various bugs that have been
+ addressed upstream:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&mpfr-fixes-patch;</userinput></screen>
+
<para>Prepare MPFR for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
diff --git a/chapter06/perl.xml b/chapter06/perl.xml
index 24f99adf0..645016932 100644
--- a/chapter06/perl.xml
+++ b/chapter06/perl.xml
@@ -83,8 +83,8 @@
<varlistentry>
<term><parameter>-Dpager="/usr/bin/less -isR"</parameter></term>
<listitem>
- <para>This corrects an error in the way that <command>perldoc</command>
- invokes the <command>less</command> program.</para>
+ <para>This ensures that <userinput>less</userinput> is used instead
+ of <userinput>more</userinput>.</para>
</listitem>
</varlistentry>
diff --git a/chapter06/readline.xml b/chapter06/readline.xml
index 5c0e3caf2..b17380a98 100644
--- a/chapter06/readline.xml
+++ b/chapter06/readline.xml
@@ -41,6 +41,11 @@
<sect2 role="installation">
<title>Installation of Readline</title>
+ <para>First install some patches to fix various bugs that have been
+ addressed upstream:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&readline-fixes-patch;</userinput></screen>
+
<para>Reinstalling Readline will cause the old libraries to be moved to
&lt;libraryname&gt;.old. While this is normally not a problem, in some cases
it can trigger a linking bug in <command>ldconfig</command>. This can be
@@ -75,7 +80,7 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
<para>Install the package:</para>
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput remap="install">make SHLIB_LIBS=-lncurses install</userinput></screen>
<para>Now move the dynamic libraries to a more appropriate location
and fix up some symbolic links:</para>
diff --git a/chapter06/shadow.xml b/chapter06/shadow.xml
index 0f30426d8..8742bda28 100644
--- a/chapter06/shadow.xml
+++ b/chapter06/shadow.xml
@@ -72,6 +72,11 @@ find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;</userinput></scr
<screen role="nodump"><userinput>sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' etc/login.defs</userinput></screen>
</note>
+ <para>Make a minor change to make the default useradd consistent with the LFS
+ groups file:</para>
+
+<screen><userinput remap="pre">sed -i 's/1000/999/' etc/useradd</userinput></screen>
+
<para>Prepare Shadow for compilation:</para>
<screen><userinput remap="configure">./configure --sysconfdir=/etc</userinput></screen>
diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml
index 1229318fb..3961d5a53 100644
--- a/chapter06/systemd.xml
+++ b/chapter06/systemd.xml
@@ -47,10 +47,11 @@
<literal>KILL=/bin/kill
HAVE_BLKID=1
BLKID_LIBS="-lblkid"
-BLKID_CFLAGS="-I/tools/include/blkid"</literal>
+BLKID_CFLAGS="-I/tools/include/blkid"
+cc_cv_CFLAGS__flto=no</literal>
EOF</userinput></screen>
- <para>Aditionally, fix a build error when using Util-Linux built in
+ <para>Additionally, fix a build error when using Util-Linux built in
Chapter 5:</para>
<screen><userinput remap="pre">sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h")</userinput></screen>
@@ -62,7 +63,7 @@ EOF</userinput></screen>
<para>Prepare Systemd for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr \
+<screen><userinput remap="configure">CFLAGS="-fno-lto" ./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--config-cache \