aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08
diff options
context:
space:
mode:
authorDouglas R. Reno <renodr@linuxfromscratch.org>2021-05-11 23:24:11 -0500
committerDouglas R. Reno <renodr@linuxfromscratch.org>2021-05-11 23:24:11 -0500
commitd7a942197e713339d4dc1eedab4dafd4179a5cd8 (patch)
tree48aba90323070adb9a54e83ce1ebed902d0b19c3 /chapter08
parent0f7d4cb8a734227ea85f46c5b934ed1b85a51b3c (diff)
Merge Xi's changes into trunk
Update to meson-0.58.0 Update to systemd-248 Update to gcc-11.1.0 Update to linux-5.12.1 Update to iproute2-5.12.0 Update to Python-3.9.5 Make /bin, /sbin, and /lib symlinks to their counterparts in /usr. Thanks again for a significant portion of this work goes to Xi, I only really merged it and made a couple of modifications for my updates. To LFS 11.x we go!
Diffstat (limited to 'chapter08')
-rw-r--r--chapter08/acl.xml17
-rw-r--r--chapter08/adjusting.xml4
-rw-r--r--chapter08/attr.xml16
-rw-r--r--chapter08/bash.xml6
-rw-r--r--chapter08/bzip2.xml16
-rw-r--r--chapter08/coreutils.xml14
-rw-r--r--chapter08/dbus.xml8
-rw-r--r--chapter08/e2fsprogs.xml17
-rw-r--r--chapter08/eudev.xml14
-rw-r--r--chapter08/file.xml10
-rw-r--r--chapter08/findutils.xml14
-rw-r--r--chapter08/gcc.xml7
-rw-r--r--chapter08/glibc.xml10
-rw-r--r--chapter08/grep.xml2
-rw-r--r--chapter08/gzip.xml4
-rw-r--r--chapter08/inetutils.xml6
-rw-r--r--chapter08/kmod.xml10
-rw-r--r--chapter08/libcap.xml16
-rw-r--r--chapter08/libelf.xml5
-rw-r--r--chapter08/man-db.xml13
-rw-r--r--chapter08/ncurses.xml11
-rw-r--r--chapter08/procps.xml10
-rw-r--r--chapter08/psmisc.xml6
-rw-r--r--chapter08/readline.xml7
-rw-r--r--chapter08/revisedchroot.xml2
-rw-r--r--chapter08/sed.xml2
-rw-r--r--chapter08/shadow.xml26
-rw-r--r--chapter08/strippingagain.xml19
-rw-r--r--chapter08/systemd.xml91
-rw-r--r--chapter08/tar.xml3
-rw-r--r--chapter08/util-linux.xml2
-rw-r--r--chapter08/xz.xml8
-rw-r--r--chapter08/zlib.xml8
-rw-r--r--chapter08/zstd.xml10
34 files changed, 116 insertions, 298 deletions
diff --git a/chapter08/acl.xml b/chapter08/acl.xml
index a71f964cb..48bf73a75 100644
--- a/chapter08/acl.xml
+++ b/chapter08/acl.xml
@@ -44,15 +44,8 @@
<para>Prepare Acl for compilation:</para>
-<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
- --bindir=/bin \
+<screen><userinput remap="configure">./configure --prefix=/usr \
--disable-static \
- --libexecdir=/usr/lib \
- --docdir=/usr/share/doc/acl-&acl-version;</userinput></screen>
-
-<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
- --disable-static \
- --libexecdir=/usr/lib \
--docdir=/usr/share/doc/acl-&acl-version;</userinput></screen>
<para>Compile the package:</para>
@@ -69,14 +62,6 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>The shared library needs to be moved to
- <filename class="directory">/lib</filename>, and as a result the
- <filename class="extension">.so</filename> file in
- <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/libacl.so.* /lib
-ln -sfv ../../lib/$(readlink /usr/lib/libacl.so) /usr/lib/libacl.so</userinput></screen>
-
</sect2>
<sect2 id="contents-acl" role="content">
diff --git a/chapter08/adjusting.xml b/chapter08/adjusting.xml
index 4bd8a85cc..7d01dcfb6 100644
--- a/chapter08/adjusting.xml
+++ b/chapter08/adjusting.xml
@@ -102,7 +102,7 @@ SEARCH_DIR("/lib")</computeroutput></screen>
<para os="n">The output of the last command should be:</para>
-<screen os="o"><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen>
+<screen os="o"><computeroutput>attempt to open /usr/lib/libc.so.6 succeeded</computeroutput></screen>
<para os="p">Make sure GCC is using the correct dynamic linker:</para>
@@ -111,7 +111,7 @@ SEARCH_DIR("/lib")</computeroutput></screen>
<para os="r">The output of the last command should be (allowing for
platform-specific differences in dynamic linker name):</para>
-<screen os="s"><computeroutput>found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2</computeroutput></screen>
+<screen os="s"><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
<para os="t">If the output does not appear as shown above or is not received
at all, then something is seriously wrong. Investigate and retrace the
diff --git a/chapter08/attr.xml b/chapter08/attr.xml
index 526852b6d..122781f27 100644
--- a/chapter08/attr.xml
+++ b/chapter08/attr.xml
@@ -43,13 +43,7 @@
<para>Prepare Attr for compilation:</para>
-<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
- --bindir=/bin \
- --disable-static \
- --sysconfdir=/etc \
- --docdir=/usr/share/doc/attr-&attr-version;</userinput></screen>
-
-<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
+<screen><userinput remap="configure">./configure --prefix=/usr \
--disable-static \
--sysconfdir=/etc \
--docdir=/usr/share/doc/attr-&attr-version;</userinput></screen>
@@ -68,14 +62,6 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>The shared library needs to be moved to
- <filename class="directory">/lib</filename>, and as a result the
- <filename class="extension">.so</filename> file in
- <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/libattr.so.* /lib
-ln -sfv ../../lib/$(readlink /usr/lib/libattr.so) /usr/lib/libattr.so</userinput></screen>
-
</sect2>
<sect2 id="contents-attr" role="content">
diff --git a/chapter08/bash.xml b/chapter08/bash.xml
index 4ab6f7d81..e4960efcc 100644
--- a/chapter08/bash.xml
+++ b/chapter08/bash.xml
@@ -84,11 +84,9 @@
PATH=$PATH make tests &lt; $(tty)
EOF</userinput></screen>
- <para>Install the package and move the main executable to
- <filename class='directory'>/bin</filename>:</para>
+ <para>Install the package:</para>
-<screen><userinput remap="install">make install
-mv -vf /usr/bin/bash /bin</userinput></screen>
+<screen><userinput remap="install">make install</userinput></screen>
<para>Run the newly compiled <command>bash</command> program (replacing the one that is
currently being executed):</para>
diff --git a/chapter08/bzip2.xml b/chapter08/bzip2.xml
index c842e5cd9..d3b7d42c4 100644
--- a/chapter08/bzip2.xml
+++ b/chapter08/bzip2.xml
@@ -84,16 +84,14 @@ make clean</userinput></screen>
<screen><userinput remap="install">make PREFIX=/usr install</userinput></screen>
+ <para>Install the shared library:</para>
+<screen><userinput remap="install">cp -av libbz2.so.* /usr/lib
+ln -sv libbz2.so.&bzip2-version; /usr/lib/libbz2.so</userinput></screen>
+
<para>Install the shared <command>bzip2</command> binary into the
- <filename class="directory">/bin</filename> directory, make
- some necessary symbolic links, and clean up:</para>
-
-<screen><userinput remap="install">cp -v bzip2-shared /bin/bzip2
-cp -av libbz2.so* /lib
-ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
-rm -v /usr/bin/{bunzip2,bzcat,bzip2}
-ln -sv bzip2 /bin/bunzip2
-ln -sv bzip2 /bin/bzcat</userinput></screen>
+ <filename class="directory">/bin</filename> directory:</para>
+
+<screen><userinput remap="install">cp -v bzip2-shared /bin/bzip2</userinput></screen>
<para>Remove an useless static library:</para>
diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml
index 48572eef0..c5d2a5032 100644
--- a/chapter08/coreutils.xml
+++ b/chapter08/coreutils.xml
@@ -142,22 +142,10 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \
<para>Move programs to the locations specified by the FHS:</para>
-<screen><userinput remap="install">mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
-mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin
-mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
-mv -v /usr/bin/chroot /usr/sbin
+<screen><userinput remap="install">mv -v /usr/bin/chroot /usr/sbin
mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8
sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8</userinput></screen>
- <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
- depend on <command>head</command>, <command>nice</command>,
- <command>sleep</command>, and <command>touch</command>. As <filename
- class="directory">/usr</filename> may not be available during the early and
- late stages of booting, those binaries need to be on the root partition to
- maintain FHS compliance:</para>
-
-<screen><userinput remap="install">mv -v /usr/bin/{head,nice,sleep,touch} /bin</userinput></screen>
-
</sect2>
<sect2 id="contents-coreutils" role="content">
diff --git a/chapter08/dbus.xml b/chapter08/dbus.xml
index 5f51900cc..94d348d2d 100644
--- a/chapter08/dbus.xml
+++ b/chapter08/dbus.xml
@@ -97,14 +97,6 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>The shared library needs to be moved to
- <filename class="directory">/lib</filename>, and as a result the
- <filename class="extension">.so</filename> file in
- <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/libdbus-1.so.* /lib
-ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen>
-
<para>Create a symlink so that D-Bus and systemd can use the same
<filename>machine-id</filename> file:</para>
diff --git a/chapter08/e2fsprogs.xml b/chapter08/e2fsprogs.xml
index 40544e782..d7ff53a82 100644
--- a/chapter08/e2fsprogs.xml
+++ b/chapter08/e2fsprogs.xml
@@ -53,8 +53,6 @@ cd build</userinput></screen>
<para>Prepare e2fsprogs for compilation:</para>
<screen><userinput remap="configure">../configure --prefix=/usr \
- --bindir=/bin \
- --with-root-prefix="" \
--enable-elf-shlibs \
--disable-libblkid \
--disable-libuuid \
@@ -65,21 +63,6 @@ cd build</userinput></screen>
<title>The meaning of the configure options:</title>
<varlistentry>
- <term><parameter>--with-root-prefix=""</parameter> and
- <parameter>--bindir=/bin</parameter></term>
- <listitem>
- <para>Certain programs (such as the <command>e2fsck</command>
- program) are considered essential programs. When, for example,
- <filename class="directory">/usr</filename> is not mounted, these
- programs still need to be available. They belong in directories
- like <filename class="directory">/lib</filename> and <filename
- class="directory">/sbin</filename>. If this option is not passed
- to configure, the programs are installed into the
- <filename class="directory">/usr</filename> directory.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><parameter>--enable-elf-shlibs</parameter></term>
<listitem>
<para>This creates the shared libraries which some programs
diff --git a/chapter08/eudev.xml b/chapter08/eudev.xml
index 39c86ef1f..0dee78d68 100644
--- a/chapter08/eudev.xml
+++ b/chapter08/eudev.xml
@@ -53,13 +53,7 @@
<para>Prepare Eudev for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
- --bindir=/sbin \
- --sbindir=/sbin \
- --libdir=/usr/lib \
--sysconfdir=/etc \
- --libexecdir=/lib \
- --with-rootprefix= \
- --with-rootlibdir=/lib \
--enable-manpages \
--disable-static</userinput></screen>
@@ -70,7 +64,7 @@
<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
+<screen><userinput remap="test">mkdir -pv /usr/lib/udev/rules.d
mkdir -pv /etc/udev/rules.d</userinput></screen>
<para>To test the results, issue:</para>
@@ -103,7 +97,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<para>Information about hardware devices is maintained in the
<filename class="directory">/etc/udev/hwdb.d</filename> and
- <filename class="directory">/lib/udev/hwdb.d</filename> directories.
+ <filename class="directory">/usr/lib/udev/hwdb.d</filename> directories.
<application>Eudev</application> needs that information to be compiled
into a binary database <filename>/etc/udev/hwdb.bin</filename>. Create the
initial database:</para>
@@ -124,13 +118,13 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<segtitle>Installed directories</segtitle>
<seglistitem>
- <seg><!-- These are in /lib/udev and not to be called by the user:
+ <seg><!-- These are in /usr/lib/udev and not to be called by the user:
accelerometer, ata_id, cdrom_id, collect, mtd_probe,
scsi_id, v4l_id,--> udevadm and udevd</seg>
<seg>libudev.so</seg>
- <seg>/etc/udev, /lib/udev, and /usr/share/doc/udev-&udev-lfs-version;</seg>
+ <seg>/etc/udev, /usr/lib/udev, and /usr/share/doc/udev-&udev-lfs-version;</seg>
</seglistitem>
</segmentedlist>
diff --git a/chapter08/file.xml b/chapter08/file.xml
index 326f99eeb..eb9f41a2b 100644
--- a/chapter08/file.xml
+++ b/chapter08/file.xml
@@ -57,16 +57,6 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para><command>/bin/more</command> from util-linux will link to
- <filename class="libraryfile">libmagic.so</filename>, so the shared
- library should be moved to <filename class="directory">/lib</filename>,
- and as a result the
- <filename class="extension">.so</filename> file in
- <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/libmagic.so.* /lib
-ln -sfv ../../lib/$(readlink /usr/lib/libmagic.so) /usr/lib/libmagic.so</userinput></screen>
-
</sect2>
diff --git a/chapter08/findutils.xml b/chapter08/findutils.xml
index f55e5cbb1..092be0c96 100644
--- a/chapter08/findutils.xml
+++ b/chapter08/findutils.xml
@@ -74,20 +74,6 @@ su tester -c "PATH=$PATH make check"</userinput></screen>
<screen><userinput remap="install">make install</userinput></screen>
- <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
- depend on <command>find</command>. As <filename
- class="directory">/usr</filename> may not be available during the early
- stages of booting, this program needs to be on the root partition. The
- <command>updatedb</command> script also needs to be modified to correct an
- explicit path:</para>
-
- <para revision="systemd"> Some packages in BLFS and beyond expect the
- <command>find</command> program in <filename
- class="directory">/bin</filename>, so make sure it's placed there:</para>
-
-<screen><userinput remap="install">mv -v /usr/bin/find /bin
-sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
-
</sect2>
<sect2 id="contents-findutils" role="content">
diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml
index 5090029a5..6b5163fce 100644
--- a/chapter08/gcc.xml
+++ b/chapter08/gcc.xml
@@ -124,9 +124,12 @@ su tester -c "PATH=$PATH make -k check"</userinput></screen>
<para>Six tests related to get_time are known to fail. These are
apparently related to the en_HK locale.</para>
- <para>Additionally the following tests related to the following files
+ <para>Additionally, the test constexpr-52830 is known to fail.</para>
+
+<!--<para>Additionally the following tests related to the following files
are known to fail with glibc-2.33: asan_test.C, co-ret-17-void-ret-coro.C,
pr95519-05-gro.C, pr80166.c.</para>
+-->
<!-- don't fail anymore after the move of iana-etc and /etc/hosts
<para>Two tests named lookup.cc and reverse.cc in experimental/net
@@ -164,7 +167,7 @@ rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</useri
url="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s09.html">FHS</ulink>
for "historical" reasons.</para>
-<screen><userinput remap="install">ln -sv ../usr/bin/cpp /lib</userinput></screen>
+<screen><userinput remap="install">ln -svr /usr/bin/cpp /lib</userinput></screen>
<!-- already done earlier
<para>Many packages use the name <command>cc</command> to call the C
compiler. To satisfy those packages, create a symlink:</para>
diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml
index 7fc661dc2..3b51906b5 100644
--- a/chapter08/glibc.xml
+++ b/chapter08/glibc.xml
@@ -55,6 +55,10 @@
<screen><userinput remap="pre">sed -e '402a\ *result = local->data.services[database_index];' \
-i nss/nss_database.c</userinput></screen>
+ <para>Fix a build issue with gcc-11.1:</para>
+
+<screen><userinput remap="pre">sed 's/amx_/amx-/' -i sysdeps/x86/tst-cpu-features-supports.c</userinput></screen>
+
<para>The Glibc documentation recommends building Glibc
in a dedicated build directory:</para>
@@ -68,7 +72,7 @@ cd build</userinput></screen>
--enable-kernel=&min-kernel; \
--enable-stack-protector=strong \
--with-headers=/usr/include \
- libc_cv_slibdir=/lib</userinput></screen>
+ libc_cv_slibdir=/usr/lib</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
@@ -109,7 +113,7 @@ cd build</userinput></screen>
</varlistentry>
<varlistentry>
- <term><parameter>libc_cv_slibdir=/lib</parameter></term>
+ <term><parameter>libc_cv_slibdir=/usr/lib</parameter></term>
<listitem>
<para>This variable sets the correct library for all
systems. We do not want lib64 to be used.</para>
@@ -221,7 +225,7 @@ mkdir -pv /var/cache/nscd</userinput></screen>
<command>nscd</command>:</para>
<screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
-install -v -Dm644 ../nscd/nscd.service /lib/systemd/system/nscd.service</userinput></screen>
+install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service</userinput></screen>
<para>Next, install the locales that can make the system respond in a
different language. None of the locales are required, but if some of them
diff --git a/chapter08/grep.xml b/chapter08/grep.xml
index ef6357281..d06a1ba85 100644
--- a/chapter08/grep.xml
+++ b/chapter08/grep.xml
@@ -42,7 +42,7 @@
<para>Prepare Grep for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
<para>Compile the package:</para>
diff --git a/chapter08/gzip.xml b/chapter08/gzip.xml
index 5040f2e0b..afbfa36a0 100644
--- a/chapter08/gzip.xml
+++ b/chapter08/gzip.xml
@@ -57,10 +57,6 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>Move a program that needs to be on the root filesystem:</para>
-
-<screen><userinput remap="install">mv -v /usr/bin/gzip /bin</userinput></screen>
-
</sect2>
<sect2 id="contents-gzip" role="content">
diff --git a/chapter08/inetutils.xml b/chapter08/inetutils.xml
index bbdc54955..b79a0b782 100644
--- a/chapter08/inetutils.xml
+++ b/chapter08/inetutils.xml
@@ -114,11 +114,9 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>Move some programs so they are available if <filename
- class='directory'>/usr</filename> is not accessible:</para>
+ <para>Move a program to the proper location:</para>
-<screen><userinput remap="install">mv -v /usr/bin/{hostname,ping,ping6,traceroute} /bin
-mv -v /usr/bin/ifconfig /sbin</userinput></screen>
+<screen><userinput remap="install">mv -v /{,s}bin/ifconfig</userinput></screen>
</sect2>
diff --git a/chapter08/kmod.xml b/chapter08/kmod.xml
index 58c9ba995..4f454ff69 100644
--- a/chapter08/kmod.xml
+++ b/chapter08/kmod.xml
@@ -44,9 +44,7 @@
<para>Prepare Kmod for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
- --bindir=/bin \
--sysconfdir=/etc \
- --with-rootlibdir=/lib \
--with-xz \
--with-zstd \
--with-zlib</userinput></screen>
@@ -61,14 +59,6 @@
</listitem>
</varlistentry>
- <varlistentry>
- <term><parameter>--with-rootlibdir=/lib</parameter></term>
- <listitem>
- <para>This option ensures different library related files are placed
- in the correct directories.</para>
- </listitem>
- </varlistentry>
-
</variablelist>
<para>Compile the package:</para>
diff --git a/chapter08/libcap.xml b/chapter08/libcap.xml
index f3b6c0074..d8fc15175 100644
--- a/chapter08/libcap.xml
+++ b/chapter08/libcap.xml
@@ -69,15 +69,13 @@
<screen><userinput remap="test">make test</userinput></screen>
- <para>Install the package and make sure the essential libraries are in
- the correct directory:</para>
-
-<screen><userinput remap="install">make prefix=/usr lib=lib install
-for libname in cap psx; do
- mv -v /usr/lib/lib${libname}.so.* /lib
- ln -sfv ../../lib/lib${libname}.so.2 /usr/lib/lib${libname}.so
- chmod -v 755 /lib/lib${libname}.so.&libcap-version;
-done</userinput></screen>
+ <para>Install the package:</para>
+
+<screen><userinput remap="install">make prefix=/usr lib=lib install</userinput></screen>
+
+ <para>Adjust the permission of the shared libraries:</para>
+
+<screen><userinput remap="install">chmod -v 755 /usr/lib/lib{cap,psx}.so.&libcap-version;</userinput></screen>
</sect2>
diff --git a/chapter08/libelf.xml b/chapter08/libelf.xml
index 41e1ae476..3465531a1 100644
--- a/chapter08/libelf.xml
+++ b/chapter08/libelf.xml
@@ -48,8 +48,7 @@
<screen><userinput remap="configure">./configure --prefix=/usr \
--disable-debuginfod \
- --enable-libdebuginfod=dummy \
- --libdir=/lib</userinput></screen>
+ --enable-libdebuginfod=dummy</userinput></screen>
<para>Compile the package:</para>
@@ -65,7 +64,7 @@
<screen><userinput remap="install">make -C libelf install
install -vm644 config/libelf.pc /usr/lib/pkgconfig
-rm /lib/libelf.a</userinput></screen>
+rm /usr/lib/libelf.a</userinput></screen>
</sect2>
diff --git a/chapter08/man-db.xml b/chapter08/man-db.xml
index 45b1f4fa2..8afadffaf 100644
--- a/chapter08/man-db.xml
+++ b/chapter08/man-db.xml
@@ -43,9 +43,7 @@
<para>Prepare Man-DB for compilation:</para>
-<screen revision="systemd"><userinput remap="configure">sed -i '/find/s@/usr@@' init/systemd/man-db.service.in
-
-./configure --prefix=/usr \
+<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
--docdir=/usr/share/doc/man-db-&man-db-version; \
--sysconfdir=/etc \
--disable-setuid \
@@ -68,15 +66,6 @@
<variablelist>
<title>The meaning of the configure options:</title>
- <varlistentry revision="systemd">
- <term><command>sed -i '/find/s@/usr@@' init/systemd/man-db.service.in</command></term>
- <listitem>
- <para>This changes a harcoded path to the <command>find</command>
- utility, which we install in
- <filename class="directory">/bin</filename>.</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term><parameter>--disable-setuid</parameter></term>
<listitem>
diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml
index 53527003d..3fbca0c3c 100644
--- a/chapter08/ncurses.xml
+++ b/chapter08/ncurses.xml
@@ -100,17 +100,6 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>Move the shared libraries to the
- <filename class="directory">/lib</filename> directory, where they are
- expected to reside:</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6* /lib</userinput></screen>
-
- <para>Because the libraries have been moved, one symlink points to
- a non-existent file. Recreate it:</para>
-
-<screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen>
-
<para>Many applications still expect the linker to be able to find
non-wide-character Ncurses libraries. Trick such applications into linking with
wide-character libraries by means of symlinks and linker scripts:</para>
diff --git a/chapter08/procps.xml b/chapter08/procps.xml
index b026d0538..8d49b60b4 100644
--- a/chapter08/procps.xml
+++ b/chapter08/procps.xml
@@ -51,15 +51,11 @@
<para>Prepare procps-ng for compilation:</para>
<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
- --exec-prefix= \
- --libdir=/usr/lib \
--docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
--disable-static \
--disable-kill</userinput></screen>
<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
- --exec-prefix= \
- --libdir=/usr/lib \
--docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
--disable-static \
--disable-kill \
@@ -102,12 +98,6 @@ make check</userinput></screen>
<screen><userinput remap="install">make install</userinput></screen>
- <para>Finally, move essential libraries to a location that can be found
- if <filename class="directory">/usr</filename> is not mounted.</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/libprocps.so.* /lib
-ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</userinput></screen>
-
</sect2>
<sect2 id="contents-procps" role="content">
diff --git a/chapter08/psmisc.xml b/chapter08/psmisc.xml
index febf90748..6a826202d 100644
--- a/chapter08/psmisc.xml
+++ b/chapter08/psmisc.xml
@@ -55,12 +55,6 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>Finally, move the <command>killall</command> and <command>fuser</command>
- programs to the location specified by the FHS:</para>
-
-<screen><userinput remap="install">mv -v /usr/bin/fuser /bin
-mv -v /usr/bin/killall /bin</userinput></screen>
-
</sect2>
<sect2 id="contents-psmisc" role="content">
diff --git a/chapter08/readline.xml b/chapter08/readline.xml
index cd105c164..72608ac94 100644
--- a/chapter08/readline.xml
+++ b/chapter08/readline.xml
@@ -94,13 +94,6 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
<screen><userinput remap="install">make SHLIB_LIBS="-lncursesw" install</userinput></screen>
- <para>Now move the dynamic libraries to a more appropriate location
- and fix up symbolic links:</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/lib{readline,history}.so.* /lib
-ln -sfv ../../lib/$(readlink /usr/lib/libreadline.so) /usr/lib/libreadline.so
-ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</userinput></screen>
-
<para>If desired, install the documentation:</para>
<screen><userinput remap="install">install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-&readline-version;</userinput></screen>
diff --git a/chapter08/revisedchroot.xml b/chapter08/revisedchroot.xml
index 3a2defb07..3627cd603 100644
--- a/chapter08/revisedchroot.xml
+++ b/chapter08/revisedchroot.xml
@@ -23,7 +23,7 @@
chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" \
PS1='(lfs chroot) \u:\w\$ ' \
- PATH=/bin:/usr/bin:/sbin:/usr/sbin \
+ PATH=/usr/bin:/usr/sbin \
/bin/bash --login</userinput></screen>
<para>Here the <parameter>+h</parameter> option is not used anymore, since
diff --git a/chapter08/sed.xml b/chapter08/sed.xml
index 77d30479b..629b83465 100644
--- a/chapter08/sed.xml
+++ b/chapter08/sed.xml
@@ -42,7 +42,7 @@
<para>Prepare Sed for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
<para>Compile the package and generate the HTML documentation:</para>
diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml
index 3ccbfbb58..3471b347b 100644
--- a/chapter08/shadow.xml
+++ b/chapter08/shadow.xml
@@ -65,10 +65,23 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;</userinput></s
allows passwords longer than 8 characters. It is also necessary to change
the obsolete <filename class="directory">/var/spool/mail</filename> location
for user mailboxes that Shadow uses by default to the <filename
- class="directory">/var/mail</filename> location used currently:</para>
+ class="directory">/var/mail</filename> location used currently. And,
+ get rid of <filename class="directory">/bin</filename> and
+ <filename class="directory">/sbin</filename> from <envar>PATH</envar>,
+ since they are simply symlinks to their counterpart in
+ <filename class="directory">/usr</filename>.</para>
+
+ <note>
+ <para>If <filename class="directory">/bin</filename> and/or
+ <filename class="directory">/sbin</filename> are prefereed to be
+ left over in <envar>PATH</envar> for some reason, modify
+ <envar>PATH</envar> in <filename>.bashrc</filename> after LFS is
+ built.</para>
+ </note>
<screen><userinput remap="pre">sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \
-e 's:/var/spool/mail:/var/mail:' \
+ -e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
-i etc/login.defs</userinput></screen>
<note>
@@ -118,17 +131,6 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;</userinput></s
<para>Install the package:</para>
<screen><userinput remap="install">make install</userinput></screen>
- <!--
- <para>Move a misplaced program to its proper location:</para>
-
-<screen><userinput remap="install">mv -v /usr/bin/passwd /bin</userinput></screen>
- -->
-
- <!-- <para>Move Shadow's libraries to more appropriate locations:</para>
-
-<screen><userinput remap="install">mv -v /lib/libshadow.*a /usr/lib
-rm -v /lib/libshadow.so
-ln -sfv ../../lib/libshadow.so.0 /usr/lib/libshadow.so</userinput></screen> -->
</sect2>
diff --git a/chapter08/strippingagain.xml b/chapter08/strippingagain.xml
index 891d2e000..8f5743b51 100644
--- a/chapter08/strippingagain.xml
+++ b/chapter08/strippingagain.xml
@@ -33,17 +33,8 @@
<!-- also of interest are libgfortan, libgo, libgomp, and libobjc from GCC -->
<!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"-->
-<screen><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so"
-
-cd /lib
-
-for LIB in $save_lib; do
- objcopy --only-keep-debug $LIB $LIB.dbg
- strip --strip-unneeded $LIB
- objcopy --add-gnu-debuglink=$LIB.dbg $LIB
-done
-
-save_usrlib="libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;
+<screen><userinput>save_usrlib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so
+ libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;
libitm.so.&libitm-version; libatomic.so.&libatomic-version;" <!-- libcilkrts.so.&libcilkrts-version;-->
cd /usr/lib
@@ -54,7 +45,7 @@ for LIB in $save_usrlib; do
objcopy --add-gnu-debuglink=$LIB.dbg $LIB
done
-unset LIB save_lib save_usrlib</userinput></screen>
+unset LIB save_usrlib</userinput></screen>
<!-- <para>Before performing the stripping, take special care to ensure that
none of the binaries that are about to be stripped are running:</para>
@@ -67,10 +58,10 @@ unset LIB save_lib save_usrlib</userinput></screen>
<screen><userinput>find /usr/lib -type f -name \*.a \
-exec strip --strip-debug {} ';'
-find /lib /usr/lib -type f -name \*.so* ! -name \*dbg \
+find /usr/lib -type f -name \*.so* ! -name \*dbg \
-exec strip --strip-unneeded {} ';'
-find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \
+find /usr/{bin,sbin,libexec} -type f \
-exec strip --strip-all {} ';'</userinput></screen>
<para>A large number of files will be reported as having their file
diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml
index d5a9f6bd1..c5df6bf78 100644
--- a/chapter08/systemd.xml
+++ b/chapter08/systemd.xml
@@ -47,14 +47,13 @@
-->
<!-- For linux-5.11's API headers changing the rfkill_event structure -->
- <para>First, apply a patch to fix some regressions and fix functionality
- with future versions of the kernel:</para>
+ <para>First, apply a patch to fix some build issues:</para>
-<screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-upstream_fixes-3.patch</userinput></screen>
+<screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-upstream_fixes-1.patch</userinput></screen>
<para>Remove tests that cannot be built in chroot:</para>
-<screen><userinput remap="pre">sed '181,$ d' -i src/resolve/meson.build</userinput></screen>
+<screen><userinput remap="pre">sed '177,$ d' -i src/resolve/meson.build</userinput></screen>
<para>Remove an unneeded group,
<systemitem class="groupname">render</systemitem>, from the default udev
@@ -76,15 +75,8 @@ meson --prefix=/usr \
-Ddefault-dnssec=no \
-Dfirstboot=false \
-Dinstall-tests=false \
- -Dkmod-path=/bin/kmod \
-Dldconfig=false \
- -Dmount-path=/bin/mount \
- -Drootprefix= \
- -Drootlibdir=/lib \
- -Dsplit-usr=true \
- -Dsulogin-path=/sbin/sulogin \
-Dsysusers=false \
- -Dumount-path=/bin/umount \
-Db_lto=false \
-Drpmmacrosdir=no \
-Dhomed=false \
@@ -98,14 +90,6 @@ meson --prefix=/usr \
<title>The meaning of the meson options:</title>
<varlistentry>
- <term><parameter>-D*-path=*</parameter></term>
- <listitem>
- <para>These switches provide the location of binaries needed by
- systemd at runtime that have not yet been installed.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><parameter>-Ddefault-dnssec=no</parameter></term>
<listitem>
<para>This switch turns off the experimental DNSSEC support.</para>
@@ -140,24 +124,6 @@ meson --prefix=/usr \
</varlistentry>
<varlistentry>
- <term><parameter>-Droot*</parameter></term>
- <listitem>
- <para>These switches ensure that core programs and
- shared libraries are installed in subdirectories
- of the root partition.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><parameter>-Dsplit-usr=true</parameter></term>
- <listitem>
- <para>This switch ensures that systemd will work on
- systems where /bin, /lib and /sbin directories are not
- symlinks to their /usr counterparts.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><parameter>-Dsysusers=false</parameter></term>
<listitem>
<para>This switch prevents installation of systemd
@@ -257,26 +223,27 @@ meson --prefix=/usr \
<seglistitem>
<seg>bootctl, busctl, coredumpctl, halt (symlink to systemctl),
hostnamectl, init, journalctl, kernel-install, localectl, loginctl,
- machinectl, networkctl, portablectl, poweroff (symlink to
+ machinectl, networkctl, oomctl, portablectl, poweroff (symlink to
systemctl), reboot (symlink to systemctl), resolvconf (symlink to
resolvectl), resolvectl, runlevel (symlink to systemctl), shutdown
(symlink to systemctl), systemctl, systemd-analyze,
systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop,
- systemd-delta, systemd-detect-virt, systemd-dissect, systemd-escape,
- systemd-hwdb, systemd-id128, systemd-inhibit, systemd-machine-id-setup,
+ systemd-cryptenroll, systemd-delta, systemd-detect-virt,
+ systemd-dissect, systemd-escape, systemd-hwdb, systemd-id128,
+ systemd-inhibit, systemd-machine-id-setup,
systemd-mount, systemd-notify, systemd-nspawn, systemd-path,
systemd-repart, systemd-resolve (symlink to resolvectl), systemd-run,
- systemd-socket-activate, systemd-stdio-bridge, systemd-tmpfiles,
- systemd-tty-ask-password-agent, systemd-umount (symlink to
- systemd-mount), telinit (symlink to systemctl), timedatectl, and
- udevadm</seg>
+ systemd-socket-activate, systemd-stdio-bridge, systemd-sysext,
+ systemd-tmpfiles, systemd-tty-ask-password-agent,
+ systemd-umount (symlink to systemd-mount),
+ telinit (symlink to systemctl), timedatectl, and udevadm</seg>
<seg>libnss_myhostname.so.2, libnss_mymachines.so.2,
libnss_resolve.so.2, libnss_systemd.so.2,
- libsystemd.so, libsystemd-shared-&systemd-version;.so (in /lib/systemd),
+ libsystemd.so, libsystemd-shared-&systemd-version;.so (in /usr/lib/systemd),
and libudev.so</seg>
<seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
/etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
- /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
+ /etc/xdg/systemd, /usr/lib/systemd, /usr/lib/udev, /usr/include/systemd,
/usr/lib/binfmt.d, /usr/lib/environment.d, /usr/lib/kernel,
/usr/lib/modules-load.d, /usr/lib/sysctl.d, /usr/lib/systemd,
/usr/lib/tmpfiles.d,
@@ -423,6 +390,16 @@ meson --prefix=/usr \
</listitem>
</varlistentry>
+ <varlistentry id="oomctl">
+ <term><command>oomctl</command></term>
+ <listitem>
+ <para>Controls the systemd Out Of Memory daemon</para>
+ <indexterm zone="ch-system-systemd oomctl">
+ <primary sortas="b-oomctl">oomctl</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="portablectl">
<term><command>portablectl</command></term>
<listitem>
@@ -568,6 +545,17 @@ meson --prefix=/usr \
</listitem>
</varlistentry>
+ <varlistentry id="systemd-cryptenroll">
+ <term><command>systemd-cryptenroll</command></term>
+ <listitem>
+ <para>Is used to enroll or remove a system from full disk encryption,
+ as well as set and query private keys and recovery keys</para>
+ <indexterm zone="ch-system-systemd systemd-cryptenroll">
+ <primary sortas="b-systemd-cryptenroll">systemd-cryptenroll</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="systemd-delta">
<term><command>systemd-delta</command></term>
<listitem>
@@ -743,6 +731,17 @@ meson --prefix=/usr \
</listitem>
</varlistentry>
+ <varlistentry id="systemd-sysext">
+ <term><command>systemd-sysext</command></term>
+ <listitem>
+ <para>Creates, deletes, and manages system extensions through the
+ systemd-sysextd daemon</para>
+ <indexterm zone="ch-system-systemd systemd-sysext">
+ <primary sortas="b-systemd-sysext">systemd-sysext</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="systemd-tmpfiles">
<term><command>systemd-tmpfiles</command></term>
<listitem>
diff --git a/chapter08/tar.xml b/chapter08/tar.xml
index 6f37ce888..e638221c6 100644
--- a/chapter08/tar.xml
+++ b/chapter08/tar.xml
@@ -46,8 +46,7 @@
<para>Prepare Tar for compilation:</para>
<screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1 \
-./configure --prefix=/usr \
- --bindir=/bin</userinput></screen>
+./configure --prefix=/usr</userinput></screen>
<variablelist>
<title>The meaning of the configure option:</title>
diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml
index a7d3d61f4..310705c1a 100644
--- a/chapter08/util-linux.xml
+++ b/chapter08/util-linux.xml
@@ -45,6 +45,7 @@
<para>Prepare Util-linux for compilation:</para>
<screen revision="sysv"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
+ --libdir=/usr/lib \
--docdir=/usr/share/doc/util-linux-&util-linux-version; \
--disable-chfn-chsh \
--disable-login \
@@ -60,6 +61,7 @@
runstatedir=/run</userinput></screen>
<screen revision="systemd"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
+ --libdir=/usr/lib \
--docdir=/usr/share/doc/util-linux-&util-linux-version; \
--disable-chfn-chsh \
--disable-login \
diff --git a/chapter08/xz.xml b/chapter08/xz.xml
index b8a9f9206..7f723482a 100644
--- a/chapter08/xz.xml
+++ b/chapter08/xz.xml
@@ -58,13 +58,9 @@
<screen><userinput remap="test">make check</userinput></screen>
- <para>Install the package and make sure that all essential files are in the
- correct directory:</para>
+ <para>Install the package:</para>
-<screen><userinput remap="install">make install
-mv -v /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin
-mv -v /usr/lib/liblzma.so.* /lib
-ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so</userinput></screen>
+<screen><userinput remap="install">make install</userinput></screen>
</sect2>
diff --git a/chapter08/zlib.xml b/chapter08/zlib.xml
index f00988468..86b9ad16e 100644
--- a/chapter08/zlib.xml
+++ b/chapter08/zlib.xml
@@ -57,14 +57,6 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>The shared library needs to be moved to
- <filename class="directory">/lib</filename>, and as a result the
- <filename class="extension">.so</filename> file in
- <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/libz.so.* /lib
-ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></screen>
-
<para>Remove an useless static library:</para>
<screen><userinput remap="install">rm -fv /usr/lib/libz.a</userinput></screen>
diff --git a/chapter08/zstd.xml b/chapter08/zstd.xml
index 0ec1a3c1b..8edf9ebad 100644
--- a/chapter08/zstd.xml
+++ b/chapter08/zstd.xml
@@ -54,14 +54,8 @@
<screen><userinput remap="install">make prefix=/usr install</userinput></screen>
- <para>Remove the static library and move the shared library to
- <filename class="directory">/lib</filename>. Also, the
- <filename class="extension">.so</filename> file in
- <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
-
-<screen><userinput remap="install">rm -v /usr/lib/libzstd.a
-mv -v /usr/lib/libzstd.so.* /lib
-ln -sfv ../../lib/$(readlink /usr/lib/libzstd.so) /usr/lib/libzstd.so</userinput></screen>
+ <para>Remove the static library:</para>
+<screen><userinput remap="install">rm -v /usr/lib/libzstd.a</userinput></screen>
</sect2>