aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08
diff options
context:
space:
mode:
Diffstat (limited to 'chapter08')
-rw-r--r--chapter08/autoconf.xml17
-rw-r--r--chapter08/binutils.xml14
-rw-r--r--chapter08/grub.xml6
-rw-r--r--chapter08/libtool.xml6
-rw-r--r--chapter08/systemd.xml42
-rw-r--r--chapter08/tar.xml7
-rw-r--r--chapter08/udev.xml12
-rw-r--r--chapter08/util-linux.xml10
8 files changed, 58 insertions, 56 deletions
diff --git a/chapter08/autoconf.xml b/chapter08/autoconf.xml
index 38375665f..120f31632 100644
--- a/chapter08/autoconf.xml
+++ b/chapter08/autoconf.xml
@@ -41,12 +41,6 @@
<sect2 role="installation">
<title>Installation of Autoconf</title>
- <para>First, fix several problems with the tests caused by bash-5.2 and later:</para>
-
- <screen><userinput remap="pre">sed -e 's/SECONDS|/&amp;SHLVL|/' \
- -e '/BASH_ARGV=/a\ /^SHLVL=/ d' \
- -i.orig tests/local.at</userinput></screen>
-
<para>Prepare Autoconf for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
@@ -61,17 +55,6 @@
To run the tests anyway, issue:</para>
-->
<screen><userinput remap="test">make check</userinput></screen>
-<!--
- <para>This takes a long time, about &autoconf-fin-sbu-tests; SBUs. In addition,
- several tests are skipped that use Automake. For full test coverage,
- Autoconf can be re-tested after Automake has been installed. In addition,
- two tests fail due to changes in libtool-2.4.3 and later.</para>
--->
- <note><para>The test time for autoconf can be reduced significantly on a
- system with multiple cores. To do this, append
- <command>TESTSUITEFLAGS=-j&lt;N&gt;</command> to the line above. For
- instance, using -j4 can reduce the test time by over 60
- percent.</para></note>
<para>Install the package:</para>
diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml
index e2650218a..681c3cdc8 100644
--- a/chapter08/binutils.xml
+++ b/chapter08/binutils.xml
@@ -56,9 +56,11 @@ cd build</userinput></screen>
--enable-shared \
--disable-werror \
--enable-64-bit-bfd \
- --with-system-zlib</userinput></screen>
+ --with-system-zlib \
+ --enable-default-hash-style=gnu</userinput></screen>
+
<variablelist>
- <title>The meaning of the configure parameters:</title>
+ <title>The meaning of the new configure parameters:</title>
<varlistentry>
<term><parameter>--enable-ld=default</parameter></term>
@@ -76,14 +78,6 @@ cd build</userinput></screen>
</varlistentry>
<varlistentry>
- <term><parameter>--enable-64-bit-bfd</parameter></term>
- <listitem>
- <para>Enables 64-bit support (on hosts with narrower word sizes).
- May not be needed on 64-bit systems, but does no harm.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><parameter>--with-system-zlib</parameter></term>
<listitem>
<para>Use the installed zlib library instead of building the
diff --git a/chapter08/grub.xml b/chapter08/grub.xml
index 63a4e13c0..800a9c568 100644
--- a/chapter08/grub.xml
+++ b/chapter08/grub.xml
@@ -72,6 +72,12 @@
aggressive optimization.</para>
</warning>
+ <para>
+ Add a file missing from the release tarball:
+ </para>
+
+<screen><userinput remap='pre'>echo <literal>depends bli part_gpt</literal> &gt; grub-core/extra_deps.lst</userinput></screen>
+
<para>Prepare GRUB for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
diff --git a/chapter08/libtool.xml b/chapter08/libtool.xml
index d21d0b751..d73bd6efb 100644
--- a/chapter08/libtool.xml
+++ b/chapter08/libtool.xml
@@ -54,12 +54,6 @@
<screen><userinput remap="test">make -k check</userinput></screen>
- <note><para>The test time for Libtool can be reduced significantly on a
- system with multiple cores. To do this, append
- <command>TESTSUITEFLAGS=-j&lt;N&gt;</command> to the line above. For
- instance, using -j4 can reduce the test time by over 60
- percent.</para></note>
-
<para>Five tests are known to fail in the LFS build environment due
to a circular dependency, but these tests pass if rechecked after
automake has been installed. Additionally, with grep-3.8, two tests will
diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml
index f14bc6c72..8af4c2c86 100644
--- a/chapter08/systemd.xml
+++ b/chapter08/systemd.xml
@@ -48,6 +48,13 @@
<screen><userinput remap="pre">sed -i -e 's/GROUP="render"/GROUP="video"/' \
-e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in</userinput></screen>
+ <!-- https://github.com/systemd/systemd/pull/30549 -->
+ <para>Now fix a security vulnerability in the DNSSEC verification of
+ <command>systemd-resolved</command>:</para>
+
+<screen><userinput remap='pre'>sed -e '/return FLAGS_SET.*AUTHENTICATED/s/(t/(dt/' \
+ -i src/resolve/resolved-dns-transaction.c</userinput></screen>
+
<para>Prepare systemd for compilation:</para>
<screen><userinput remap="configure">mkdir -p build
@@ -63,13 +70,15 @@ meson setup \
-Dldconfig=false \
-Dsysusers=false \
-Drpmmacrosdir=no \
- -Dhomed=false \
+ -Dhomed=disabled \
-Duserdb=false \
-Dman=false \
-Dmode=release \
-Dpamconfdir=no \
-Ddev-kvm-mode=0660 \
-Dnobody-group=nogroup \
+ -Dsysupdate=disabled \
+ -Dukify=disabled \
-Ddocdir=/usr/share/doc/systemd-&systemd-version; \
..</userinput></screen>
@@ -140,7 +149,8 @@ meson setup \
</varlistentry>
<varlistentry>
- <term><parameter>-D{userdb,homed}=false</parameter></term>
+ <term><parameter>-Dhomed=disabled</parameter> and
+ <parameter>-Duserdb=false</parameter></term>
<listitem>
<para>Remove two daemons with dependencies that do not fit
within the scope of LFS.</para>
@@ -188,6 +198,28 @@ meson setup \
<systemitem class='groupname'>nogroup</systemitem>.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><parameter>-Dsysupdate=disabled</parameter></term>
+ <listitem>
+ <para>Do not install the <command>systemd-sysupdate</command>
+ tool. It's designed for automatically upgrading binary distros,
+ so it's useless for a basic Linux system built from source.
+ And it will report errors on boot if it's enabled but not properly
+ configured.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter>-Dukify=disabled</parameter></term>
+ <listitem>
+ <para>Do not install the <command>systemd-ukify</command> script.
+ At runtime this script requires the
+ <application>pefile</application> Python module that neither LFS
+ nor BLFS provides.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
<para>Compile the package:</para>
@@ -215,12 +247,6 @@ meson setup \
<screen><userinput remap="adjust">systemctl preset-all</userinput></screen>
- <para>Disable two services for upgrading binary distros. They are useless for
- a basic Linux system built from source, and each one will report an error if
- it's enabled but not configured:</para>
-
-<screen><userinput remap="adjust">systemctl disable systemd-sysupdate{,-reboot}</userinput></screen>
-
<!-- dev: 50-pid-max.conf is not removed in BLFS, so I commented the following out.
If it causes any trouble, we can add this back and also copy it into BLFS -->
<!--
diff --git a/chapter08/tar.xml b/chapter08/tar.xml
index ea5f44ebb..802f04d2e 100644
--- a/chapter08/tar.xml
+++ b/chapter08/tar.xml
@@ -72,13 +72,6 @@
<screen><userinput remap="test">make check</userinput></screen>
- <!-- On one system the -j4 improvement is 167s - 46s = 121s (72.46%) -->
- <note><para>The test time for Tar can be reduced significantly on a
- system with multiple cores. To do this, append
- <command>TESTSUITEFLAGS=-j&lt;N&gt;</command> to the line above. For
- instance, using -j4 can reduce the test time by over 70
- percent.</para></note>
-
<para>One test, capabilities: binary store/restore, is known to fail if it is
run because LFS lacks selinux, but will be skipped if the host kernel does
not support extended attributes or security labels on the filesystem
diff --git a/chapter08/udev.xml b/chapter08/udev.xml
index 580c78203..6ec0ed458 100644
--- a/chapter08/udev.xml
+++ b/chapter08/udev.xml
@@ -126,11 +126,18 @@ meson setup \
</varlistentry>
</variablelist>
+ <para>Get the list of the shipped udev helpers and save it into an
+ environment variable:</para>
+
+ <screen><userinput remap="make">udev_helpers=$(grep "'name' :" ../src/udev/meson.build | \
+ awk '{print $3}' | tr -d ",'" | grep -v 'udevadm')</userinput></screen>
+
<para>Only build the components needed for udev:</para>
<screen><userinput remap="make">ninja udevadm systemd-hwdb \
$(ninja -n | grep -Eo '(src/(lib)?udev|rules.d|hwdb.d)/[^ ]*') \
- $(realpath libudev.so --relative-to .)</userinput></screen>
+ $(realpath libudev.so --relative-to .) \
+ $udev_helpers udevadm</userinput></screen>
<para>Install the package:</para>
@@ -148,8 +155,7 @@ install -vm644 rules.d/* ../rules.d/README /usr/lib/udev/rules.d/
install -vm644 $(find ../rules.d/*.rules \
-not -name '*power-switch*') /usr/lib/udev/rules.d/
install -vm644 hwdb.d/* ../hwdb.d/{*.hwdb,README} /usr/lib/udev/hwdb.d/
-install -vm755 $(find src/udev \
- -type f -not -name '*.*') /usr/lib/udev
+install -vm755 $udev_helpers /usr/lib/udev
install -vm644 ../network/99-default.link /usr/lib/udev/network</userinput></screen>
<para>Install some custom rules and support files useful in an LFS
diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml
index 49e195b3f..bb24f1e59 100644
--- a/chapter08/util-linux.xml
+++ b/chapter08/util-linux.xml
@@ -48,8 +48,7 @@
<para>Prepare Util-linux for compilation:</para>
-<screen revision="sysv"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
- --bindir=/usr/bin \
+<screen revision="sysv"><userinput remap="configure">./configure --bindir=/usr/bin \
--libdir=/usr/lib \
--runstatedir=/run \
--sbindir=/usr/sbin \
@@ -63,11 +62,11 @@
--disable-static \
--without-python \
--without-systemd \
- --without-systemdsystemunitdir \
+ --without-systemdsystemunitdir \
+ ADJTIME_PATH=/var/lib/hwclock/adjtime \
--docdir=/usr/share/doc/util-linux-&util-linux-version;</userinput></screen>
-<screen revision="systemd"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
- --bindir=/usr/bin \
+<screen revision="systemd"><userinput remap="configure">./configure --bindir=/usr/bin \
--libdir=/usr/lib \
--runstatedir=/run \
--sbindir=/usr/sbin \
@@ -80,6 +79,7 @@
--disable-pylibmount \
--disable-static \
--without-python \
+ ADJTIME_PATH=/var/lib/hwclock/adjtime \
--docdir=/usr/share/doc/util-linux-&util-linux-version;</userinput></screen>
<para>The --disable and --without options prevent warnings about