Преглед на файлове

MultiLib: Merge changes from trunk

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11821 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Thomas Trepl преди 5 години
родител
ревизия
15f39ffebb

+ 55 - 0
chapter01/changelog.xml

@@ -44,6 +44,61 @@
     <listitem revision="sysv"> or <listitem revision="systemd"> as
     appropriate for the entry or if needed the entire day's listitem.
     -->
+    <listitem>
+      <para>2020-04-20</para>
+      <itemizedlist>
+        <listitem>
+          <para>[pierre] - Change -isystem to -idirafter in "Adjusting the
+          toolchain". This allows to search g++ private headers before
+          the public ones, which is the normal search order, with the
+	  drawback that it includes the headers in /tools if they exist
+	  in both /usr and /tools. Fix most of
+          <ulink url="&lfs-ticket-root;4641">#4641</ulink>.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>2020-04-19</para>
+      <itemizedlist>
+        <listitem>
+          <para>[pierre] - Build util-linux in chapter 5 for both books.
+          link util-linux libraries and headers from /usr to /tools.
+          Copy util-linux pkg-config files from /tools to /usr, changing
+          any occurence of /tools to /usr. Also move eudev before util-linux.
+          Fixes <ulink url="&lfs-ticket-root;4637">#4637</ulink>,
+          <ulink url="&lfs-ticket-root;4638">#4638</ulink>, and
+          <ulink url="&lfs-ticket-root;4642">#4642</ulink>.</para>
+        </listitem>
+        <listitem>
+          <para>[pierre] - Reinstate flex in chapter 5, so that ar and ranlib
+          (binutils) link against libfl. This allows to run tests for bison,
+          too. Fixes
+          <ulink url="&lfs-ticket-root;4631">#4631</ulink>.</para>
+        </listitem>
+        <listitem>
+          <para>[pierre] - Prevent readline.pc from referencing termcap as
+          a private library by adding --with-curses to configure switches.
+          Fixes <ulink url="&lfs-ticket-root;4635">#4635</ulink>.</para>
+        </listitem>
+        <listitem>
+          <para>[pierre] - Allow bison to use the libtextstyle.so library from
+          gettext, by moving gettext before bison. Fixes
+          <ulink url="&lfs-ticket-root;4634">#4634</ulink>.</para>
+        </listitem>
+        <listitem>
+          <para>[pierre] - Allow some shadow programs to use "setcap" by
+          moving libcap before shadow. Fixes
+          <ulink url="&lfs-ticket-root;4633">#4633</ulink>.</para>
+        </listitem>
+        <listitem>
+          <para>[pierre] - Fix a wrong hardcoded path in some programs
+          from the shadow package. Fixes
+          <ulink url="&lfs-ticket-root;4632">#4632</ulink>.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
     <listitem>
       <para>2020-04-15</para>
       <itemizedlist>

+ 1 - 0
chapter05/chapter05.xml

@@ -29,6 +29,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/>

+ 72 - 0
chapter05/flex.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-flex" role="wrap">
+  <?dbhtml filename="flex.html"?>
+
+  <sect1info condition="script">
+    <productname>flex</productname>
+    <productnumber>&flex-version;</productnumber>
+    <address>&flex-url;</address>
+  </sect1info>
+
+  <title>Flex-&flex-version;</title>
+
+  <indexterm zone="ch-tools-flex">
+    <primary sortas="a-Flex">Flex</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+    href="../chapter06/flex.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&flex-ch5-sbu;</seg>
+        <seg>&flex-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Flex</title>
+
+    <para>Prepare Flex for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>To test the results, issue:</para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-flex" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 4 - 1
chapter05/stripping.xml

@@ -38,7 +38,10 @@
 
 <screen><userinput>rm -rf /tools/{,share}/{info,man,doc}</userinput></screen>
 
-  <para>Remove unneeded files:</para>
+  <para>The libtool .la files are only useful when linking with static
+  libraries. They are unneeded, and potentially harmful, when using dynamic
+  shared libraries, specially when using also non-autotools build systems.
+  Remove those files now:</para>
 
 <screen arch="default"><userinput>find /tools/{lib,libexec} -name \*.la -delete</userinput></screen>
 

+ 1 - 1
chapter05/util-linux.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<sect1 id="ch-tools-util-linux" role="wrap" revision="systemd">
+<sect1 id="ch-tools-util-linux" role="wrap">
   <?dbhtml filename="util-linux.html"?>
 
   <sect1info condition="script">

+ 13 - 6
chapter06/adjusting.xml

@@ -24,15 +24,17 @@ mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old}
 mv -v /tools/bin/{ld-new,ld}
 ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput></screen>
 
-  <para>Next, amend the GCC specs file so that it points to the new
-  dynamic linker. Simply deleting all instances of <quote>/tools</quote> should
-  leave us with the correct path to the dynamic linker. Also adjust the specs file
-  so that GCC knows where to find the correct headers and Glibc start files.
+  <para>the next command amends the GCC specs file to achieve three goals:
+  first point GCC to the new dynamic linker. Simply deleting all instances of
+  <quote>/tools</quote> should leave us with the correct path to the dynamic
+  linker. Second, let GCC know where to find the Glibc start files. Third,
+  add the /usr/include directory at the end of the default search path, so
+  that header files added in chapter 6 are found.
   A <command>sed</command> command accomplishes this:</para>
 
 <screen><userinput>gcc -dumpspecs | sed -e 's@/tools@@g'                   \
     -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
-    -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' &gt;      \
+    -e '/\*cpp:/{n;s@$@ -idirafter /usr/include@}' &gt;      \
     `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen>
 
   <para>It is a good idea to visually inspect the specs file to verify the
@@ -72,13 +74,18 @@ readelf -l a.out | grep ': /lib'</userinput></screen>
   <para os="g">Verify that the compiler is searching for the correct header
   files:</para>
 
-<screen><userinput>grep -B1 '^ /usr/include' dummy.log</userinput></screen>
+<screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen>
 
   <para os="h">This command should return the following output:</para>
 
 <screen><computeroutput>#include &lt;...&gt; search starts here:
+ /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
+ /tools/include
+ /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
  /usr/include</computeroutput></screen>
 
+  <note><para>On a 32 bit system, x86_64 is replaced with i686.</para></note>
+
   <para os="i">Next, verify that the new linker is being used with the correct search paths:</para>
 
 <screen os="j"><userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'</userinput></screen>

+ 6 - 3
chapter06/bison.xml

@@ -58,16 +58,19 @@
 
 <screen><userinput remap="make">make</userinput></screen>
 
-<!--
-    <para>To test the results (about 2.2 SBU), issue:</para>
+    <para>To test the results (about 5.5 SBU), issue:</para>
 
 <screen><userinput remap="test">make check</userinput></screen>
--->
 
+    <para>13 tests fail in the "Diagnostics" section, probably because of
+    missing locales.</para>
+
+<!--
     <para>There is a circular dependency between bison and flex with regard to
     the checks.  If desired, after installing flex in the next section, the
     bison package can be rebuilt and the bison checks can be run with 
     <command>make check</command>.</para>
+-->
 
     <para>Install the package:</para>
 

+ 5 - 5
chapter06/chapter06.xml

@@ -39,14 +39,15 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="isl.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/>
@@ -62,7 +63,6 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/>
@@ -93,13 +93,13 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/>
 
+  <!-- sysv only -->
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/>
+
   <!-- Both sysv on systemd builds -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/>
 
-  <!-- sysv only -->
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/>
-
   <!-- Both sysv and systemd builds -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/>
 

+ 38 - 30
chapter06/createfiles.xml

@@ -43,32 +43,31 @@
 ln -sv /tools/bin/{env,install,perl,printf}         /usr/bin
 ln -sv /tools/lib/libgcc_s.so{,.1}                  /usr/lib
 ln -sv /tools/lib/libstdc++.{a,so{,.6}}             /usr/lib
+ln -sv /tools/lib/libfl.so*                         /usr/lib
 
-ln -sv bash /bin/sh</userinput></screen>
+ln -sv bash /bin/sh
+for lib in blkid mount uuid fdisk
+do
+    ln -sv /tools/lib/lib$lib.so* /usr/lib
+    sed 's|/tools|/usr|' /tools/lib/pkgconfig/${lib}.pc \
+        &gt; /usr/lib/pkgconfig/${lib}.pc
+done
+for incdir in blkid libmount uuid libfdisk
+do
+    ln -svf /tools/include/$incdir    /usr/include
+done</userinput></screen>
 
   <para arch="ml_32,ml_all">32-bit builds also require these links:</para>
 
-<screen arch="ml_32,ml_all"><userinput arch="ml_32,ml_all">ln -sv /tools/lib32/libgcc_s.so{,.1}               /usr/lib32
+<screen arch="ml_32,ml_all"><userinput>ln -sv /tools/lib32/libgcc_s.so{,.1}               /usr/lib32
 ln -sv /tools/lib32/libstdc++.{a,so{,.6}}          /usr/lib32</userinput></screen>
 
   <para arch="ml_x32,ml_all">x32-bit builds also require these links:</para>
 
-<screen arch="ml_x32,ml_all"><userinput arch="ml_x32,ml_all">ln -sv /tools/libx32/libgcc_s.so{,.1}              /usr/libx32
+<screen arch="ml_x32,ml_all"><userinput>ln -sv /tools/libx32/libgcc_s.so{,.1}              /usr/libx32
 ln -sv /tools/libx32/libstdc++.{a,so{,.6}}         /usr/libx32
 ln -sv /usr/libx32 /</userinput></screen>
 
-<!--for lib in blkid lzma mount uuid
-do
-    ln -sv /tools/lib/lib$lib.so* /usr/lib
-done-->
-<!--ln -svf /tools/include/blkid    /usr/include
-ln -svf /tools/include/libmount /usr/include
-ln -svf /tools/include/uuid     /usr/include-->
-<!--for pc in blkid mount uuid
-do
-    sed 's@tools@usr@g' /tools/lib/pkgconfig/${pc}.pc \
-        > /usr/lib/pkgconfig/${pc}.pc
-done-->
   <variablelist>
     <title>The purpose of each link:</title>
 
@@ -175,30 +174,39 @@ done-->
         for C++ support in GMP.</para>
       </listitem>
     </varlistentry>
-<!--
+
     <varlistentry>
-      <term><parameter><filename>/usr/lib/libstdc++.la</filename></parameter></term>
+      <term><parameter><filename>/bin/sh</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>
+        <para>Many shell scripts hard-code <filename>/bin/sh</filename>.</para>
       </listitem>
     </varlistentry>
--->
-    <!--<varlistentry revision="systemd">-->
-<!--    <varlistentry>
-      <term><parameter><filename>/usr/lib/lib{blkid,lzma,mount,uuid}.{a,la,so*}</filename></parameter></term>
+
+    <varlistentry>
+      <term>
+        <parameter><filename>/usr/lib/libfl.so*</filename></parameter>
+      </term>
       <listitem>
-        <para>These links prevent utilities from acquiring an
-        unnecessary reference to the
-        <filename class="directory">/tools</filename> directory.</para>
+        <para>This link allows binutils to find the flex library, and to
+	build enhanced versions of ar and ranlib.</para>
       </listitem>
-    </varlistentry>-->
+    </varlistentry>
 
     <varlistentry>
-      <term><parameter><filename>/bin/sh</filename></parameter></term>
+      <term>
+        <parameter>
+          <filename>/usr/lib/lib{blkid,fdisk,mount,uuid}.so*</filename>,
+          <filename>/usr/include/{blkid,libfdisk,libmount,uuid}</filename>,
+          <filename>/usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc</filename>
+        </parameter>
+      </term>
       <listitem>
-        <para>Many shell scripts hard-code <filename>/bin/sh</filename>.</para>
+        <para>These links and files allow
+        <phrase revision="sysv">eudev</phrase>
+        <phrase revision="systemd">systemd</phrase> to find the
+        util-linux libraries installed in chapter 5, without creating
+        wrong references to /tools. The uuid library is also needed for
+        building a python module.</para>
       </listitem>
     </varlistentry>
 

+ 6 - 27
chapter06/eudev.xml

@@ -49,17 +49,8 @@
 
 <screen><userinput remap="pre">sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c</userinput></screen>
 -->
-<!--
-    <para>First, add a workaround to prevent the /tools directory from being 
-    hard coded into Eudev binary files library locations:</para>
-
-<screen><userinput remap="pre">cat &gt; config.cache &lt;&lt; "EOF"
-HAVE_BLKID=1
-BLKID_LIBS="-lblkid"
-BLKID_CFLAGS="-I/tools/include"
-EOF</userinput></screen>
--->
-<para>Prepare Eudev for compilation:</para>
+
+    <para>Prepare Eudev for compilation:</para>
 
 <screen><userinput remap="configure">./configure --prefix=/usr           \
             --bindir=/sbin          \
@@ -71,35 +62,24 @@ EOF</userinput></screen>
             --with-rootlibdir=/lib  \
             --enable-manpages       \
             --disable-static</userinput></screen>
-<!--           - -config-cache</userinput></screen> -->
 
-<para>Compile the package:</para>
+    <para>Compile the package:</para>
 
 <screen><userinput remap="make">make</userinput></screen>
-<!--
-<screen><userinput remap="make">LIBRARY_PATH=/tools/lib make</userinput></screen>
 
-<note><para>The LIBRARY_PATH variable here and the LD_LIBRARY_PATH variable
-below are needed to allow the use of libraries that were installed in /tools,
-but have not yet been installed in the main system.  LIBRARY_PATH is
-used to find libraries during the linking process.  LD_LIBRARY_PATH is
-used to find libraries during program execution.</para></note>
--->
-<para>Create some directories now that are needed for tests, but
-will also be used as a part of installation:</para>
+    <para>Create some directories now that are needed for tests, but
+    will also be used as a part of installation:</para>
 
 <screen><userinput remap="test">mkdir -pv /lib/udev/rules.d
 mkdir -pv /etc/udev/rules.d</userinput></screen>
 
-<para>To test the results, issue:</para>
+    <para>To test the results, issue:</para>
 
 <screen><userinput remap="test">make check</userinput></screen>
-<!--<screen><userinput remap="test">make LD_LIBRARY_PATH=/tools/lib check</userinput></screen>-->
 
     <para>Install the package:</para>
 
 <screen><userinput remap="install">make install</userinput></screen>
-<!--<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>-->
 
     <para>Install some custom rules and support files useful in an LFS 
     environment:</para>
@@ -201,7 +181,6 @@ rm -rf DESTDIR</userinput></screen>
     into a binary database <filename>/etc/udev/hwdb.bin</filename>. Create the
     initial database:</para>
 
-<!--<screen><userinput>LD_LIBRARY_PATH=/tools/lib udevadm hwdb - -update</userinput></screen>-->
 <screen><userinput>udevadm hwdb --update</userinput></screen>
 
     <para>This command needs to be run each time the hardware information is

+ 16 - 1
chapter06/gettext.xml

@@ -76,7 +76,22 @@ sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinpu
 
     <para>Compile the package:</para>
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput remap="make">make BISON_LOCALEDIR=/usr/share/locale</userinput></screen>
+
+   <variablelist>
+      <title>The meaning of the make parameter:</title>
+
+      <varlistentry>
+        <term><parameter>BISON_LOCALEDIR=/usr/share/locale</parameter></term>
+        <listitem>
+          <para>Since bison is not yet installed in /usr, configure hardcodes
+          the directory containing translations for the bison program (the
+	  "locale" directory) as /tools/share/locale. Passing this variable
+           to make allows overriding the choice made by configure.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
 
     <para>To test the results (this takes a long time, around 3 SBUs),
     issue:</para>

+ 16 - 0
chapter06/readline.xml

@@ -53,8 +53,24 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
 
 <screen><userinput remap="configure">./configure --prefix=/usr    \
             --disable-static \
+            --with-curses    \
             --docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
 
+     <variablelist>
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry>
+        <term><parameter>--with-curses"</parameter></term>
+        <listitem>
+          <para>This option tells Readline that it can find the termcap
+	   library functions in the curses library, rather than a separate
+	   termcap library. It allows generating a correct
+	   <filename>readline.pc</filename> file.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
     <para>Compile the package:</para>
 
 <screen><userinput remap="make">make SHLIB_LIBS="-L/tools/lib -lncursesw"</userinput></screen>

+ 4 - 2
chapter06/revisedchroot.xml

@@ -59,8 +59,10 @@ rm -f /usr/lib/libz.a</userinput></screen>
 
   <para>There are also several files installed in the /usr/lib and /usr/libexec
   directories with a file name extention of .la. These are "libtool archive"
-  files and generally unneeded on a linux system. None of these are necessary
-  at this point. To remove them, run:</para>
+  files. As already said, they are only useful when linking with static
+  libraries. They are unneeded, and potentially harmful, when using dynamic
+  shared libraries, specially when using also non-autotools build systems.
+  To remove them, run:</para>
 
   <screen arch="default"><userinput>find /usr/lib /usr/libexec -name \*.la -delete</userinput></screen>
  <screen arch="ml_32"><userinput>find /usr/lib{,32} /usr/libexec -name \*.la -delete</userinput></screen>

+ 10 - 1
chapter06/shadow.xml

@@ -83,11 +83,20 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /'   {} \;</userinput></s
 
     <para>Prepare Shadow for compilation:</para>
 
-<screen><userinput remap="configure">./configure --sysconfdir=/etc --with-group-name-max-length=32</userinput></screen>
+<screen><userinput remap="configure">touch /usr/bin/passwd
+./configure --sysconfdir=/etc --with-group-name-max-length=32</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure option:</title>
 
+      <varlistentry>
+        <term><command>touch /usr/bin/passwd</command></term>
+        <listitem>
+          <para>The file <filename>/usr/bin/passwd</filename> needs
+          to exist because its location is harcoded in some programs, and
+          the default location if it does not exist is not right.</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term><parameter>--with-group-name-max-length=32</parameter></term>
         <listitem>

+ 0 - 11
chapter06/systemd.xml

@@ -50,13 +50,6 @@
 
 <screen><userinput remap="pre">ln -sf /tools/bin/true /usr/bin/xsltproc</userinput></screen>
 
-    <para>Because we have not yet installed the final version of Util-Linux,
-    create links to the libraries in the appropriate location:</para>
-
-<screen><userinput remap="pre">for file in /tools/lib/lib{blkid,mount,uuid}.so*; do
-    ln -sf $file /usr/lib/
-done</userinput></screen>
-
     <para>Set up the man pages:</para>
 
 <screen><userinput remap="pre">tar -xf ../systemd-man-pages-&systemd-version;.tar.xz</userinput></screen>
@@ -76,7 +69,6 @@ done</userinput></screen>
 <screen><userinput remap="configure">mkdir -p build
 cd       build
 
-PKG_CONFIG_PATH="/usr/lib/pkgconfig:/tools/lib/pkgconfig" \
 LANG=en_US.UTF-8                   \
 meson --prefix=/usr                \
       --sysconfdir=/etc            \
@@ -234,9 +226,6 @@ meson --prefix=/usr                \
 
 <screen><userinput remap="adjust">rm -f /usr/lib/sysctl.d/50-pid-max.conf</userinput></screen>
 
-    <para>Cleanup symbolic links to Util-Linux libraries:</para>
-
-<screen><userinput remap="adjust">rm -fv /usr/lib/lib{blkid,uuid,mount}.so*</userinput></screen>
     <!--
     <para>Prevent systemd from creating <filename>/run/nologin</filename>
     to allow unprivileged user logins without

+ 7 - 5
chapter06/util-linux.xml

@@ -60,11 +60,13 @@
 <screen><userinput remap="pre">sed -e 's/2^64/(2^64/' -e 's/E &lt;/E) &lt;=/' -e 's/ne /eq /' \
     -i tests/ts/ipcs/limits2</userinput></screen>
 -->
-<!-- those symlinks are not created anymore
-    <para revision="systemd">Remove the earlier created symlinks:</para>
 
-<screen revision="systemd"><userinput remap="pre">rm -vf /usr/include/{blkid,libmount,uuid}</userinput></screen>
--->
+    <para>Remove the earlier created symlinks and files:</para>
+
+<screen><userinput remap="pre">rm -vf /usr/include/{blkid,libfdisk,libmount,uuid}
+rm -vf /usr/lib/lib{blkid,fdisk,mount,uuid}.so*
+rm -vf /usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc</userinput></screen>
+
     <para>Prepare Util-linux for compilation:</para>
 
 <screen revision="sysv"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime   \
@@ -110,7 +112,7 @@
     coverage, other BLFS packages must be installed.  If desired, this test can
     be run after rebooting into the completed LFS system and running:</para>
 
-<screen role="nodump"><userinput>bash tests/run.sh --srcdir=$PWD --builddir=$PWD</userinput></screen> 
+<screen role="nodump"><userinput>bash tests/run.sh --srcdir=$PWD --builddir=$PWD</userinput></screen>
     </warning>
 
 <screen><userinput remap="test">chown -Rv nobody .

+ 3 - 3
general.ent

@@ -1,13 +1,13 @@
-<!ENTITY version         "SVN-20200415">
+<!ENTITY version         "SVN-20200420">
 <!ENTITY short-version   "svn">  <!-- Used below in &blfs-book; 
                                       Change to x.y for release but not -rc releases -->
 <!ENTITY generic-version "development"> <!-- Use "development"  or "x.y[-pre{x}]" -->
 
-<!ENTITY versiond        "20200415-systemd">
+<!ENTITY versiond        "20200420-systemd">
 <!ENTITY short-versiond  "systemd">
 <!ENTITY generic-versiond "systemd"> 
 
-<!ENTITY releasedate     "April 15th, 2020">
+<!ENTITY releasedate     "April 20th, 2020">
 
 <!ENTITY copyrightdate   "1999-2020"><!-- jhalfs needs a literal dash, not &ndash; -->
 

+ 4 - 2
packages.ent

@@ -77,8 +77,8 @@
 <!ENTITY bison-home "&gnu-software;bison/">
 <!ENTITY bison-ch5-du "43 MB">
 <!ENTITY bison-ch5-sbu "0.3 SBU">
-<!ENTITY bison-ch6-du "43 MB">
-<!ENTITY bison-ch6-sbu "0.3 SBU">
+<!ENTITY bison-ch6-du "52 MB">
+<!ENTITY bison-ch6-sbu "5.8 SBU">
 
 <!ENTITY bzip2-version "1.0.8">
 <!ENTITY bzip2-size "792 KB">
@@ -209,6 +209,8 @@
 <!ENTITY flex-url "&github;/westes/flex/releases/download/v&flex-version;/flex-&flex-version;.tar.gz">
 <!ENTITY flex-md5 "2882e3179748cc9f9c23ec593d6adc8d">
 <!ENTITY flex-home "&github;/westes/flex">
+<!ENTITY flex-ch5-du "15 MB">
+<!ENTITY flex-ch5-sbu "0.1 SBU">
 <!ENTITY flex-ch6-du "36 MB">
 <!ENTITY flex-ch6-sbu "0.4 SBU">