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.xml7
-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, 54 insertions, 61 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 63ae7e2eb..c4a25492c 100644
--- a/chapter08/binutils.xml
+++ b/chapter08/binutils.xml
@@ -57,9 +57,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-gold</parameter></term>
@@ -85,14 +87,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 ddde75490..8d0661b69 100644
--- a/chapter08/grub.xml
+++ b/chapter08/grub.xml
@@ -73,13 +73,10 @@
</warning>
<para>
- Fix an issue causing <command>grub-install</command> to fail when the
- <filename class='directory'>/boot</filename> partition (or the root
- partition if <filename class='directory'>/boot</filename> is not a
- separate partition) is created by e2fsprogs-1.47.0 or later:
+ Add a file missing from the release tarball:
</para>
-<screen><userinput remap='pre'>patch -Np1 -i ../grub-&grub-version;-upstream_fixes-1.patch</userinput></screen>
+<screen><userinput remap='pre'>echo <literal>depends bli part_gpt</literal> &gt; grub-core/extra_deps.lst</userinput></screen>
<!--https://git.savannah.gnu.org/cgit/grub.git/commit/?id=69edb312 -->
<para>Apply an upstream change so GRUB will be capable to load
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 761467acd..de5a668d1 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
@@ -62,13 +69,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>
@@ -139,7 +148,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>
@@ -187,6 +197,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>
@@ -214,12 +246,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 dd686f489..967b3dd84 100644
--- a/chapter08/udev.xml
+++ b/chapter08/udev.xml
@@ -125,11 +125,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>
@@ -147,8 +154,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 00f804842..8d4514094 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