From e91edadd00517fe2c7d00b6bef1ca870ce2dcbaf Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 30 Jun 2024 10:40:41 -0500 Subject: [PATCH 01/52] Package and format updates. Update to iana-etc-20240612. Update to bc-6.7.6. Update to man-pages-6.9.1. Update to linux-6.9.7. Update to sysklogd-2.5.2. Update to shadow-4.16.0. Update to systemd-256.1. Update to setuptools-70.1.1. Also change the formatting of options '-Dsomething' to '-D something'. --- bootscripts/lfs/init.d/sysklogd | 15 +++---- chapter01/askforhelp.xml | 8 ++-- chapter01/changelog.xml | 40 +++++++++++++++++- chapter01/whatsnew.xml | 8 ++-- chapter07/perl.xml | 26 ++++++------ chapter08/perl.xml | 36 ++++++++-------- chapter08/sysklogd.xml | 23 ++++------ chapter08/systemd.xml | 74 ++++++++++++++++----------------- chapter08/udev.xml | 25 ++++++----- chapter09/systemd-custom.xml | 2 +- packages.ent | 50 +++++++++++----------- 11 files changed, 165 insertions(+), 142 deletions(-) diff --git a/bootscripts/lfs/init.d/sysklogd b/bootscripts/lfs/init.d/sysklogd index e86b87b16..b9c782040 100644 --- a/bootscripts/lfs/init.d/sysklogd +++ b/bootscripts/lfs/init.d/sysklogd @@ -7,6 +7,9 @@ # Authors : Gerard Beekmans - gerard@linuxfromscratch.org # DJ Lucas - dj@linuxfromscratch.org # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org +# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org LFS12.1 +# Remove kernel log daemon. The functionality has been +# merged with syslogd. # # Version : LFS 7.0 # @@ -20,8 +23,8 @@ # Should-Stop: sendsignals # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: Starts kernel and system log daemons. -# Description: Starts kernel and system log daemons. +# Short-Description: Starts system log daemon. +# Description: Starts system log daemon. # /etc/fstab. # X-LFS-Provided-By: LFS ### END INIT INFO @@ -34,17 +37,9 @@ case "${1}" in parms=${SYSKLOGD_PARMS-'-m 0'} start_daemon /sbin/syslogd $parms evaluate_retval - - log_info_msg "Starting kernel log daemon..." - start_daemon /sbin/klogd - evaluate_retval ;; stop) - log_info_msg "Stopping kernel log daemon..." - killproc /sbin/klogd - evaluate_retval - log_info_msg "Stopping system log daemon..." killproc /sbin/syslogd evaluate_retval diff --git a/chapter01/askforhelp.xml b/chapter01/askforhelp.xml index 7c6032389..2dd5f85d0 100644 --- a/chapter01/askforhelp.xml +++ b/chapter01/askforhelp.xml @@ -110,10 +110,10 @@ type of information to include from the make screen output. -gcc -DALIASPATH=\"/mnt/lfs/usr/share/locale:.\" --DLOCALEDIR=\"/mnt/lfs/usr/share/locale\" --DLIBDIR=\"/mnt/lfs/usr/lib\" --DINCLUDEDIR=\"/mnt/lfs/usr/include\" -DHAVE_CONFIG_H -I. -I. +gcc -D ALIASPATH=\"/mnt/lfs/usr/share/locale:.\" +-D LOCALEDIR=\"/mnt/lfs/usr/share/locale\" +-D LIBDIR=\"/mnt/lfs/usr/lib\" +-D INCLUDEDIR=\"/mnt/lfs/usr/include\" -D HAVE_CONFIG_H -I. -I. -g -O2 -c getopt1.c gcc -g -O2 -static -o make ar.o arscan.o commands.o dir.o expand.o file.o function.o getopt.o implicit.o job.o main.o diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index f42fdf445..6cf5816cc 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,44 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-07-01 + + + [bdubbs] - Update to iana-etc-20240612. Addresses + #5006. + + + [bdubbs] - Update to bc-6.7.6. Fixes + #5506. + + + [bdubbs] - Update to man-pages-6.9.1. Fixes + #5507. + + + [bdubbs] - Update to linux-6.9.7. Fixes + #5508. + + + [bdubbs] - Update to sysklogd-2.5.2. Fixes + #5509. + + + [bdubbs] - Update to shadow-4.16.0. Fixes + #5510. + + + [bdubbs] - Update to systemd-256.1. Fixes + #5511. + + + [bdubbs] - Update to setuptools-70.1.1. Fixes + #5512. + + + + 2024-06-15 @@ -69,7 +107,7 @@ [bdubbs] - Update to linux-6.9.4. Fixes - #5505. + #5505. [bdubbs] - Update to findutils-4.10.0. Fixes diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 315a03bea..6a12dd5cb 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -41,9 +41,9 @@ - + @@ -233,9 +233,9 @@ Shadow-&shadow-version; - + Systemd-&systemd-version; diff --git a/chapter07/perl.xml b/chapter07/perl.xml index 0c400bf12..7d31677a5 100644 --- a/chapter07/perl.xml +++ b/chapter07/perl.xml @@ -45,16 +45,16 @@ Prepare Perl for compilation: - sh Configure -des \ - -Dprefix=/usr \ - -Dvendorprefix=/usr \ - -Duseshrplib \ - -Dprivlib=/usr/lib/perl5/&perl-version-min;/core_perl \ - -Darchlib=/usr/lib/perl5/&perl-version-min;/core_perl \ - -Dsitelib=/usr/lib/perl5/&perl-version-min;/site_perl \ - -Dsitearch=/usr/lib/perl5/&perl-version-min;/site_perl \ - -Dvendorlib=/usr/lib/perl5/&perl-version-min;/vendor_perl \ - -Dvendorarch=/usr/lib/perl5/&perl-version-min;/vendor_perl + sh Configure -des \ + -D prefix=/usr \ + -D vendorprefix=/usr \ + -D useshrplib \ + -D privlib=/usr/lib/perl5/&perl-version-min;/core_perl \ + -D archlib=/usr/lib/perl5/&perl-version-min;/core_perl \ + -D sitelib=/usr/lib/perl5/&perl-version-min;/site_perl \ + -D sitearch=/usr/lib/perl5/&perl-version-min;/site_perl \ + -D vendorlib=/usr/lib/perl5/&perl-version-min;/vendor_perl \ + -D vendorarch=/usr/lib/perl5/&perl-version-min;/vendor_perl The meaning of the Configure options: @@ -69,7 +69,7 @@ - -Dvendorprefix=/usr + -D vendorprefix=/usr This ensures perl knows how to tell packages where they should install their Perl modules. @@ -77,7 +77,7 @@ - -Duseshrplib + -D useshrplib Build libperl needed by some Perl modules as a shared library, instead of @@ -86,7 +86,7 @@ - -Dprivlib,-Darchlib,-Dsitelib,... + -D privlib,-D archlib,-D sitelib,... These settings define where Perl looks for installed modules. The LFS editors chose to put them in a directory structure diff --git a/chapter08/perl.xml b/chapter08/perl.xml index 34c6ed32a..df9489d37 100644 --- a/chapter08/perl.xml +++ b/chapter08/perl.xml @@ -60,26 +60,26 @@ export BUILD_BZIP2=0 this package is built. Alternatively, use the command exactly as shown below to use the defaults that Perl auto-detects: - sh Configure -des \ - -Dprefix=/usr \ - -Dvendorprefix=/usr \ - -Dprivlib=/usr/lib/perl5/&perl-version-min;/core_perl \ - -Darchlib=/usr/lib/perl5/&perl-version-min;/core_perl \ - -Dsitelib=/usr/lib/perl5/&perl-version-min;/site_perl \ - -Dsitearch=/usr/lib/perl5/&perl-version-min;/site_perl \ - -Dvendorlib=/usr/lib/perl5/&perl-version-min;/vendor_perl \ - -Dvendorarch=/usr/lib/perl5/&perl-version-min;/vendor_perl \ - -Dman1dir=/usr/share/man/man1 \ - -Dman3dir=/usr/share/man/man3 \ - -Dpager="/usr/bin/less -isR" \ - -Duseshrplib \ - -Dusethreads + sh Configure -des \ + -D prefix=/usr \ + -D vendorprefix=/usr \ + -D privlib=/usr/lib/perl5/&perl-version-min;/core_perl \ + -D archlib=/usr/lib/perl5/&perl-version-min;/core_perl \ + -D sitelib=/usr/lib/perl5/&perl-version-min;/site_perl \ + -D sitearch=/usr/lib/perl5/&perl-version-min;/site_perl \ + -D vendorlib=/usr/lib/perl5/&perl-version-min;/vendor_perl \ + -D vendorarch=/usr/lib/perl5/&perl-version-min;/vendor_perl \ + -D man1dir=/usr/share/man/man1 \ + -D man3dir=/usr/share/man/man3 \ + -D pager="/usr/bin/less -isR" \ + -D useshrplib \ + -D usethreads The meaning of the new Configure options: - -Dpager="/usr/bin/less -isR" + -D pager="/usr/bin/less -isR" This ensures that less is used instead of more. @@ -87,8 +87,8 @@ export BUILD_BZIP2=0 - -Dman1dir=/usr/share/man/man1 - -Dman3dir=/usr/share/man/man3 + -D man1dir=/usr/share/man/man1 + -D man3dir=/usr/share/man/man3 Since Groff is not installed yet, Configure will not create man pages for Perl. These @@ -97,7 +97,7 @@ export BUILD_BZIP2=0 - -Dusethreads + -D usethreads Build Perl with support for threads. diff --git a/chapter08/sysklogd.xml b/chapter08/sysklogd.xml index 26382f8c1..c66d5d455 100644 --- a/chapter08/sysklogd.xml +++ b/chapter08/sysklogd.xml @@ -41,11 +41,12 @@ Installation of Sysklogd - First, fix a problem that causes a segmentation fault in klogd - under some conditions, and fix an obsolete program construct: + Prepare the package for compilation: -sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c -sed -i 's/union wait/int/' syslogd.c +./configure --prefix=/usr \ + --sysconfdir=/etc \ + --runstatedir=/run \ + --without-logger Compile the package: @@ -94,10 +95,10 @@ EOF Contents of Sysklogd - Installed programs + Installed program - klogd and syslogd + syslogd @@ -106,16 +107,6 @@ EOF - - klogd - - A system daemon for intercepting and logging kernel messages - - klogd - - - - syslogd diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index afc274f4f..275e92932 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -53,26 +53,25 @@ mkdir -p build cd build -meson setup \ - --prefix=/usr \ - --buildtype=release \ - -Ddefault-dnssec=no \ - -Dfirstboot=false \ - -Dinstall-tests=false \ - -Dldconfig=false \ - -Dsysusers=false \ - -Drpmmacrosdir=no \ - -Dhomed=disabled \ - -Duserdb=false \ - -Dman=disabled \ - -Dmode=release \ - -Dpamconfdir=no \ - -Ddev-kvm-mode=0660 \ - -Dnobody-group=nogroup \ - -Dsysupdate=disabled \ - -Dukify=disabled \ - -Ddocdir=/usr/share/doc/systemd-&systemd-version; \ - .. +meson setup .. \ + --prefix=/usr \ + --buildtype=release \ + -D default-dnssec=no \ + -D firstboot=false \ + -D install-tests=false \ + -D ldconfig=false \ + -D sysusers=false \ + -D rpmmacrosdir=no \ + -D homed=disabled \ + -D userdb=false \ + -D man=disabled \ + -D mode=release \ + -D pamconfdir=no \ + -D dev-kvm-mode=0660 \ + -D nobody-group=nogroup \ + -D sysupdate=disabled \ + -D ukify=disabled \ + -D docdir=/usr/share/doc/systemd-&systemd-version; The meaning of the meson options: @@ -87,14 +86,14 @@ meson setup \ - -Ddefault-dnssec=no + -D default-dnssec=no This switch turns off the experimental DNSSEC support. - -Dfirstboot=false + -D firstboot=false This switch prevents installation of systemd services responsible for setting up the system for @@ -104,14 +103,14 @@ meson setup \ - -Dinstall-tests=false + -D install-tests=false This switch prevents installation of the compiled tests. - -Dldconfig=false + -D ldconfig=false This switch prevents installation of a systemd unit that runs ldconfig at boot; this is not useful for source @@ -121,7 +120,7 @@ meson setup \ - -Dsysusers=false + -D sysusers=false This switch prevents installation of systemd services responsible for setting up the @@ -133,7 +132,7 @@ meson setup \ - -Drpmmacrosdir=no + -D rpmmacrosdir=no This switch disables installation of RPM Macros for use with systemd, because LFS does not support RPM. @@ -141,8 +140,8 @@ meson setup \ - -Dhomed=disabled and - -Duserdb=false + -D homed=disabled and + -D userdb=false Remove two daemons with dependencies that do not fit within the scope of LFS. @@ -150,7 +149,7 @@ meson setup \ - -Dman=disabled + -D man=disabled Prevent the generation of man pages to avoid extra dependencies. We will install pre-generated man pages for systemd @@ -159,7 +158,7 @@ meson setup \ - -Dmode=release + -D mode=release Disable some features considered experimental by upstream. @@ -167,7 +166,7 @@ meson setup \ - -Dpamconfdir=no + -D pamconfdir=no Prevent the installation of a PAM configuration file not functional on LFS. @@ -175,7 +174,7 @@ meson setup \ - -Ddev-kvm-mode=0660 + -D dev-kvm-mode=0660 The default udev rule would allow all users to access /dev/kvm. The editors @@ -184,7 +183,7 @@ meson setup \ - -Dnobody-group=nogroup + -D nobody-group=nogroup Tell the package the group name with GID 65534 is nogroup. @@ -192,7 +191,7 @@ meson setup \ - -Dsysupdate=disabled + -D sysupdate=disabled Do not install the systemd-sysupdate tool. It's designed for automatically upgrading binary distros, @@ -203,7 +202,7 @@ meson setup \ - -Dukify=disabled + -D ukify=disabled Do not install the systemd-ukify script. At runtime this script requires the @@ -227,7 +226,8 @@ ninja test Three tests: systemd:core / test-namespace, - test-chase, and test-systemd-tmpfiles, + test-loopback, and + test-copy, are known to fail in the LFS chroot environment. Some other tests may fail because they depend on various kernel configuration options. @@ -239,7 +239,7 @@ ninja test -tar -xf ../../systemd-man-pages-&systemd-version;.tar.xz \ +tar -xf ../../systemd-man-pages-&systemd-man-version;.tar.xz \ --no-same-owner --strip-components=1 \ -C /usr/share/man diff --git a/chapter08/udev.xml b/chapter08/udev.xml index 98ee48cf2..b3c318a0b 100644 --- a/chapter08/udev.xml +++ b/chapter08/udev.xml @@ -65,15 +65,14 @@ mkdir -p build cd build -meson setup \ - --prefix=/usr \ - --buildtype=release \ - -Dmode=release \ - -Ddev-kvm-mode=0660 \ - -Dlink-udev-shared=false \ - -Dlogind=false \ - -Dvconsole=false \ - .. +meson setup .. \ + --prefix=/usr \ + --buildtype=release \ + -D mode=release \ + -D dev-kvm-mode=0660 \ + -D link-udev-shared=false \ + -D logind=false \ + -D vconsole=false The meaning of the meson options: @@ -88,7 +87,7 @@ meson setup \ - -Dmode=release + -D mode=release Disable some features considered experimental by upstream. @@ -96,7 +95,7 @@ meson setup \ - -Ddev-kvm-mode=0660 + -D dev-kvm-mode=0660 The default udev rule would allow all users to access /dev/kvm. The editors @@ -105,7 +104,7 @@ meson setup \ - -Dlink-udev-shared=false + -D link-udev-shared=false This option prevents udev from linking to the internal systemd shared library, @@ -116,7 +115,7 @@ meson setup \ - -Dlogind=false -Dvconsole=false + -D logind=false -D vconsole=false These options prevent the generation of several udev rule files belonging to the other Systemd components that we won't diff --git a/chapter09/systemd-custom.xml b/chapter09/systemd-custom.xml index ffca1a76f..742983e44 100644 --- a/chapter09/systemd-custom.xml +++ b/chapter09/systemd-custom.xml @@ -305,7 +305,7 @@ EOF Disable at build-time: You can disable lingering by default while building systemd by adding the switch - -Ddefault-kill-user-processes=false to the + -D default-kill-user-processes=false to the meson command for systemd. This completely disables the ability of systemd to kill user processes at session end. diff --git a/packages.ent b/packages.ent index 567726db5..b89b737bf 100644 --- a/packages.ent +++ b/packages.ent @@ -57,10 +57,10 @@ - - + + - + @@ -317,10 +317,10 @@ - + - + @@ -381,7 +381,7 @@ - + @@ -431,12 +431,12 @@ - + - + - + - + - + From ba0723a402ab449e56cadf25eac83428371159b3 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 30 Jun 2024 14:51:53 -0500 Subject: [PATCH 02/52] Tweak sysklogd bootscript for latest version. --- bootscripts/lfs/init.d/sysklogd | 1 - 1 file changed, 1 deletion(-) diff --git a/bootscripts/lfs/init.d/sysklogd b/bootscripts/lfs/init.d/sysklogd index b9c782040..04662efd9 100644 --- a/bootscripts/lfs/init.d/sysklogd +++ b/bootscripts/lfs/init.d/sysklogd @@ -60,7 +60,6 @@ case "${1}" in status) statusproc /sbin/syslogd - statusproc klogd ;; *) From f01d1e3597c514f6d81eff13719aa0117592056e Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Mon, 1 Jul 2024 08:01:10 -0500 Subject: [PATCH 03/52] Fix sysklogd currency --- lfs-latest-git.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lfs-latest-git.php b/lfs-latest-git.php index 52eb501b4..de1683c63 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -148,6 +148,7 @@ if ( $package == "shadow" ) $dirpath = github("shadow-maint/shadow"); if ( $package == "sysvinit" ) $dirpath = github("slicer69/sysvinit"); if ( $package == "MarkupSafe" ) $dirpath = "https://pypi.python.org/pypi/MarkupSafe/"; if ( $package == "jinja" ) $dirpath = "https://pypi.python.org/pypi/Jinja2/"; +if ( $package == "sysklogd" ) $dirpath = github("troglobit/sysklogd"); if ( $package == "systemd" ) $dirpath = github("systemd/systemd"); //if ( $package == "tcl" ) $dirpath = "https://sourceforge.net/projects/tcl/files"; if ( $package == "tcl" ) $dirpath = "https://www.tcl.tk/software/tcltk/download.html"; From 6ee537a8938af2a4ba24af6f82c7aa8cb06d610a Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Tue, 2 Jul 2024 15:59:25 -0500 Subject: [PATCH 04/52] Update systemd man pages. --- packages.ent | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages.ent b/packages.ent index b89b737bf..3f706f532 100644 --- a/packages.ent +++ b/packages.ent @@ -669,11 +669,11 @@ - - + + - + From e872712e9a8688334cddd387f3c6228c9bcd47ed Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 3 Jul 2024 18:13:46 +0800 Subject: [PATCH 05/52] dependencies: List rust-bindgen as Linux external dependency It's needed to enable Rust-based features in the kernel. Rustc is also needed but it's required by rust-bindgen so I'm skipping it (like BLFS). LLVM (Clang) is also a required dependency of rust-bindgen but it's listed here for different purposes (LTO and CFI). --- appendices/dependencies.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index c48238a8b..6de2de8b7 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -1934,9 +1934,11 @@ &external; - cpio and + cpio, LLVM - (with Clang) + (with Clang), and + Rust-bindgen From e7b6af1037a3713ff3deac3d1e7cc742bb29e7f1 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sat, 6 Jul 2024 17:12:29 -0500 Subject: [PATCH 06/52] Update lfs-bootscripts to only output escape sequences to a terminal. --- bootscripts/ChangeLog | 4 + bootscripts/lfs/lib/services/init-functions | 95 ++++++++++++++++----- chapter01/changelog.xml | 10 +++ packages.ent | 2 +- 4 files changed, 90 insertions(+), 21 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 37680aff5..129fbd454 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,7 @@ +2024-07-06 Bruce Dubbs + * Add logic to init-functions to only print escape sequences + if stdin and stdout are connected to a terminal. + 2024-04-16 Bruce Dubbs * Remove blank output line generated in ifup script when bringing up wireless interface. diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions index a86a23d86..2bcadaa30 100644 --- a/bootscripts/lfs/lib/services/init-functions +++ b/bootscripts/lfs/lib/services/init-functions @@ -58,11 +58,21 @@ SCRIPT_STAT="0" # Set any user specified environment variables e.g. HEADLESS [ -r /etc/sysconfig/rc.site ] && . /etc/sysconfig/rc.site -## Screen Dimensions -# Find current screen size -if [ -z "${COLUMNS}" ]; then - COLUMNS=$(stty size) - COLUMNS=${COLUMNS##* } +# If HEADLESS is set, use that. +# If file descriptor 1 or 2 (stdout and stderr) is not open or +# does not refer to a terminal, consider the script headless. +[ ! -t 1 -o ! -t 2 ] && HEADLESS=${HEADLESS:-yes} + +if [ "x$HEADLESS" != "xyes" ] +then + ## Screen Dimensions + # Find current screen size + if [ -z "${COLUMNS}" ]; then + COLUMNS=$(stty size) + COLUMNS=${COLUMNS##* } + fi +else + COLUMNS=80 fi # When using remote connections, such as a serial port, stty size returns 0 @@ -575,9 +585,14 @@ timespec() ################################################################################ log_success_msg() { - /bin/echo -n -e "${BMPREFIX}${@}" - /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}" - + if [ "x$HEADLESS" != "xyes" ] + then + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}" + else + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + /bin/echo -e "${logmessage} OK" + fi # Strip non-printable characters from log file logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` @@ -589,8 +604,13 @@ log_success_msg() log_success_msg2() { - /bin/echo -n -e "${BMPREFIX}${@}" - /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}" + if [ "x$HEADLESS" != "xyes" ] + then + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}" + else + echo " OK" + fi echo " OK" >> ${BOOTLOG} @@ -610,8 +630,14 @@ log_success_msg2() ################################################################################ log_failure_msg() { - /bin/echo -n -e "${BMPREFIX}${@}" - /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}" + if [ "x$HEADLESS" != "xyes" ] + then + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}" + else + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + /bin/echo -e "${logmessage} FAIL" + fi # Strip non-printable characters from log file @@ -624,8 +650,13 @@ log_failure_msg() log_failure_msg2() { - /bin/echo -n -e "${BMPREFIX}${@}" - /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}" + if [ "x$HEADLESS" != "xyes" ] + then + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}" + else + echo "FAIL" + fi echo "FAIL" >> ${BOOTLOG} @@ -643,8 +674,14 @@ log_failure_msg2() ################################################################################ log_warning_msg() { - /bin/echo -n -e "${BMPREFIX}${@}" - /bin/echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${WARNING_SUFFIX}" + if [ "x$HEADLESS" != "xyes" ] + then + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${WARNING_SUFFIX}" + else + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + /bin/echo -e "${logmessage} WARN" + fi # Strip non-printable characters from log file logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` @@ -656,8 +693,14 @@ log_warning_msg() log_skip_msg() { - /bin/echo -n -e "${BMPREFIX}${@}" - /bin/echo -e "${CURS_ZERO}${SKIP_PREFIX}${SET_COL}${SKIP_SUFFIX}" + if [ "x$HEADLESS" != "xyes" ] + then + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${SKIP_PREFIX}${SET_COL}${SKIP_SUFFIX}" + else + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + /bin/echo "SKIP" + fi # Strip non-printable characters from log file logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` @@ -677,7 +720,13 @@ log_skip_msg() ################################################################################ log_info_msg() { - /bin/echo -n -e "${BMPREFIX}${@}" + if [ "x$HEADLESS" != "xyes" ] + then + /bin/echo -n -e "${BMPREFIX}${@}" + else + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + /bin/echo -n -e "${logmessage}" + fi # Strip non-printable characters from log file logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` @@ -689,7 +738,13 @@ log_info_msg() log_info_msg2() { - /bin/echo -n -e "${@}" + if [ "x$HEADLESS" != "xyes" ] + then + /bin/echo -n -e "${@}" + else + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + /bin/echo -n -e "${logmessage}" + fi # Strip non-printable characters from log file logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 6cf5816cc..240e52b98 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,16 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-07-01 + + + [bdubbs] - Update lfs-bootscripts to only output + escape sequences to a terminal. + + + + 2024-07-01 diff --git a/packages.ent b/packages.ent index 3f706f532..342641d35 100644 --- a/packages.ent +++ b/packages.ent @@ -381,7 +381,7 @@ - + From f1054497241c55d994840173ed6852d93b88254a Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Mon, 15 Jul 2024 11:00:12 -0500 Subject: [PATCH 07/52] Package updates. Update to iana-etc-20240701. Update to vim-9.1.0580. Update to automake-1.17. Update to gdbm-1.24. Update to linux-6.9.9. Update to less-661. Update to meson-1.5.0. Update to setuptools-70.3.0. Update to util-linux-2.40.2. --- chapter01/changelog.xml | 42 ++++++++++++++++++++++++++++++++ chapter01/whatsnew.xml | 14 +++++------ packages.ent | 54 ++++++++++++++++++++--------------------- 3 files changed, 76 insertions(+), 34 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 240e52b98..2a6c247ad 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,48 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-07-15 + + + [bdubbs] - Update to iana-etc-20240701. Addresses + #5006. + + + [bdubbs] - Update to vim-9.1.0580. Addresses + #4500. + + + [bdubbs] - Update to automake-1.17. Fixes + #5520. + + + [bdubbs] - Update to gdbm-1.24. Fixes + #5515. + + + [bdubbs] - Update to linux-6.9.9. Fixes + #5517. + + + [bdubbs] - Update to less-661. Fixes + #5513. + + + [bdubbs] - Update to meson-1.5.0. Fixes + #5519. + + + [bdubbs] - Update to setuptools-70.3.0. Fixes + #5514. + + + [bdubbs] - Update to util-linux-2.40.2. Fixes + #5516. + + + + 2024-07-01 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 6a12dd5cb..728396d0a 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -35,9 +35,9 @@ - + @@ -95,9 +95,9 @@ GCC-&gcc-version; - + Gettext-&gettext-version; @@ -142,10 +142,10 @@ --> Kmod-&kmod-version; - - + diff --git a/packages.ent b/packages.ent index 342641d35..bc117fc85 100644 --- a/packages.ent +++ b/packages.ent @@ -38,11 +38,11 @@ - - - + + + - + @@ -237,10 +237,10 @@ - - + + - + @@ -317,10 +317,10 @@ - + - + @@ -373,10 +373,10 @@ - - + + - + @@ -431,12 +431,12 @@ - + - + - + - + + - + - + - + - + From 6e6641f9b784b371fc8a39d389753895209bd82a Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 12 Jul 2024 13:09:46 +0800 Subject: [PATCH 08/52] binutils: Add --enable-new-dtags This option makes ld use DT_RUNPATH instead of DT_RPATH. DT_RPATH is generally considered bad because it takes precedence over LD_LIBRARY_PATH. For example, eog is linked with -rpath /usr/lib/eog, and with DT_RPATH if an old eog is already installed we are basically impossible to debug a new eog build w/o overwriting the system installation first or explicitly using "ld.so --inhibit-rpath" to invoke it. This "new" actually means "new in 2000," it's 24 years ago and all other distros has enabled it. Thus I guess some unexplainable "test suite uses installed library instead of the just built one" issues in BLFS are actually caused by this difference: the package author just assumes everyone is using DT_RUNPATH thus they just set LD_LIBRARY_PATH and consider it enough to test with the just built libraries, but DT_RPATH breaks this expectation. Let's eliminate the difference as it seems not doing anything good and doing so just takes one switch. --- chapter05/binutils-pass1.xml | 12 ++++++++++++ chapter06/binutils-pass2.xml | 1 + chapter08/binutils.xml | 1 + 3 files changed, 14 insertions(+) diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index ef9f3948c..39365477d 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -76,6 +76,7 @@ cd build --disable-nls \ --enable-gprofng=no \ --disable-werror \ + --enable-new-dtags \ --enable-default-hash-style=gnu @@ -133,6 +134,17 @@ cd build + + --enable-new-dtags + + This makes the linker use the runpath tag for + embedding library search paths into executables and shared libraries, + instead of the traditional rpath tag. It makes + debugging dynamically linked executables easier and works around + potential issues in the test suite of some packages. + + + --enable-default-hash-style=gnu diff --git a/chapter06/binutils-pass2.xml b/chapter06/binutils-pass2.xml index 9832e154d..fb54becb0 100644 --- a/chapter06/binutils-pass2.xml +++ b/chapter06/binutils-pass2.xml @@ -73,6 +73,7 @@ cd build --enable-gprofng=no \ --disable-werror \ --enable-64-bit-bfd \ + --enable-new-dtags \ --enable-default-hash-style=gnu diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml index 0d770a6c8..629c698c3 100644 --- a/chapter08/binutils.xml +++ b/chapter08/binutils.xml @@ -57,6 +57,7 @@ cd build --enable-shared \ --disable-werror \ --enable-64-bit-bfd \ + --enable-new-dtags \ --with-system-zlib \ --enable-default-hash-style=gnu From 0808f2861979f4b97ea8f80d9427f34bf2f2224f Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 12 Jul 2024 13:39:23 +0800 Subject: [PATCH 09/52] bootscripts: Add -n to the ln command, for recreating /dev/fd correctly if the initramfs has already created one --- bootscripts/ChangeLog | 4 ++++ bootscripts/lfs/init.d/mountvirtfs | 2 +- packages.ent | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 129fbd454..558230238 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,7 @@ +2024-07-12 Xi Ruoyao + * In mountvirtfs, recreate /dev/fd correctly if it's already created + by the initramfs. + 2024-07-06 Bruce Dubbs * Add logic to init-functions to only print escape sequences if stdin and stdout are connected to a terminal. diff --git a/bootscripts/lfs/init.d/mountvirtfs b/bootscripts/lfs/init.d/mountvirtfs index fd797787a..de6b2de62 100644 --- a/bootscripts/lfs/init.d/mountvirtfs +++ b/bootscripts/lfs/init.d/mountvirtfs @@ -83,7 +83,7 @@ case "${1}" in ln -sf /proc/self/fd/2 /dev/stderr || failed=1 log_info_msg2 " ${INFO}/dev/fd" - ln -sf /proc/self/fd /dev/fd || failed=1 + ln -sfn /proc/self/fd /dev/fd || failed=1 if [ -e /proc/kcore ]; then log_info_msg2 " ${INFO}/dev/core" diff --git a/packages.ent b/packages.ent index bc117fc85..7220b22e4 100644 --- a/packages.ent +++ b/packages.ent @@ -381,7 +381,7 @@ - + From a7596d8cc0dc2e9d73a6a5226922c217e3207138 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 12 Jul 2024 14:01:11 +0800 Subject: [PATCH 10/52] packages: Add a space between "Systemd Man Pages" and the version To be consistent with other packages. --- chapter03/packages.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter03/packages.xml b/chapter03/packages.xml index dbbb43eae..9e5d4c14e 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -714,7 +714,7 @@ - Systemd Man Pages(&systemd-version;) - &systemd-man-size;: + Systemd Man Pages (&systemd-version;) - &systemd-man-size;: Home page: Download: From 86e276279ad452f4671f4374754124a627b8e4ed Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 13 Jul 2024 21:49:14 +0800 Subject: [PATCH 11/52] systemd: Update known failures I can only reproduce test-namespace failure now with 256.1. --- chapter08/systemd.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index 275e92932..c2fc9dc6d 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -225,10 +225,8 @@ ninja test - Three tests: systemd:core / test-namespace, - test-loopback, and - test-copy, - are known to fail in the LFS chroot environment. Some other tests may + One test named systemd:core / test-namespace + is known to fail in the LFS chroot environment. Some other tests may fail because they depend on various kernel configuration options. Install the package: From 5b7b80511cb673a79d041272121bf0477073ffe2 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 14 Jul 2024 11:14:20 +0800 Subject: [PATCH 12/52] cleanup: Remove hidden files in /tmp Some test suite may create files of which the name starts with a dot. These files are "hidden" and they won't be matched with the /tmp/* wildcard. --- chapter08/cleanup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/cleanup.xml b/chapter08/cleanup.xml index da1c61afc..0997fbbd8 100644 --- a/chapter08/cleanup.xml +++ b/chapter08/cleanup.xml @@ -12,7 +12,7 @@ Finally, clean up some extra files left over from running tests: -rm -rf /tmp/* + rm -rf /tmp/{*,.*} There are also several files in the /usr/lib and /usr/libexec directories with a file name extension of .la. These are "libtool archive" From eeee07494266a8efd94a7dc0637b026dcb683c27 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 17 Jul 2024 22:43:43 -0500 Subject: [PATCH 13/52] Update bootscripts version. --- packages.ent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.ent b/packages.ent index 7220b22e4..26fcf7f5f 100644 --- a/packages.ent +++ b/packages.ent @@ -381,7 +381,7 @@ - + From b56430b6918bb03101b86c387923a3cdce90ef39 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 24 Jul 2024 09:41:55 -0500 Subject: [PATCH 14/52] Update currency for lz. --- lfs-latest-git.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lfs-latest-git.php b/lfs-latest-git.php index de1683c63..0d82e9b3e 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -268,7 +268,7 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd"); return find_max( $lines, "/Jinja/", "/^.*Jinja2 ([\d\.]+).*$/" ); if ( $package == "lz" ) - return find_max( $lines, "/name.:/", '/^.*LZ4 v([\d\.]+)".*$/' ); + return find_max( $lines, "/tag_name/", '/^.*v([\d\.]+).*$/' ); if ( $package == "openssl" ) return find_max( $lines, "/openssl/", "/^.*openssl-([\d\.p]*\d.?).tar.*$/" ); From 0d6c94f1bf8eef0364ef1d3833ad3764a0fdbc40 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 24 Jul 2024 23:05:08 -0500 Subject: [PATCH 15/52] Fix name and currency for lz4. --- lfs-latest-git.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lfs-latest-git.php b/lfs-latest-git.php index 0d82e9b3e..318d06ad8 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -135,7 +135,7 @@ if ( $package == "iana-etc" ) $dirpath = github("Mic92/iana-etc"); if ( $package == "intltool" ) $dirpath = "https://launchpad.net/intltool/trunk"; if ( $package == "libffi" ) $dirpath = github("libffi/libffi"); if ( $package == "libxcrypt" ) $dirpath = github("besser82/libxcrypt"); -if ( $package == "lz" ) $dirpath = github("lz4/lz4"); +if ( $package == "lz4" ) $dirpath = github("lz4/lz4"); if ( $package == "meson" ) $dirpath = github("mesonbuild/meson"); if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc"; if ( $package == "mpfr" ) $dirpath = "https://mpfr.loria.fr/mpfr-current"; @@ -267,7 +267,7 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd"); if ( $package == "jinja" ) return find_max( $lines, "/Jinja/", "/^.*Jinja2 ([\d\.]+).*$/" ); - if ( $package == "lz" ) + if ( $package == "lz4" ) return find_max( $lines, "/tag_name/", '/^.*v([\d\.]+).*$/' ); if ( $package == "openssl" ) @@ -348,6 +348,11 @@ function get_current() $pattern = "/\D*(\d.*[a-z]*)\.tar\D*/"; } + else if ( preg_match( "/lz4/", $file ) ) + { + $pkg_pattern= "/(\D*4).*/"; + } + else if ( preg_match( "/systemd-man-pages/", $file ) ) continue; else if ( preg_match( "/python/" , $file ) ) continue; From d2ac7026343b65708ad06880cee908548f890f6f Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Thu, 25 Jul 2024 11:17:54 -0500 Subject: [PATCH 16/52] Update currency for openssl. --- lfs-latest-git.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lfs-latest-git.php b/lfs-latest-git.php index 318d06ad8..ce76e970e 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -141,6 +141,7 @@ if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc"; if ( $package == "mpfr" ) $dirpath = "https://mpfr.loria.fr/mpfr-current"; if ( $package == "ncurses" ) $dirpath = "https://invisible-mirror.net/archives/ncurses"; if ( $package == "ninja" ) $dirpath = github("ninja-build/ninja"); +if ( $package == "openssl" ) $dirpath = github("openssl/openssl"); if ( $package == "procps-ng" ) $dirpath = "https://gitlab.com/procps-ng/procps/-/tags"; if ( $package == "psmisc" ) $dirpath = "https://gitlab.com/psmisc/psmisc/-/tags"; if ( $package == "Python" ) $dirpath = "https://www.python.org/downloads/source/"; @@ -271,7 +272,7 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd"); return find_max( $lines, "/tag_name/", '/^.*v([\d\.]+).*$/' ); if ( $package == "openssl" ) - return find_max( $lines, "/openssl/", "/^.*openssl-([\d\.p]*\d.?).tar.*$/" ); + return find_max( $lines, "/name.:/", "/^.*OpenSSL ([\d\.]+\d).*$/" ); if ( $package == "Python" ) return find_max( $lines, "/Python 3/", "/^.*Python (3[\d\.]*\d) .*$/" ); From 44c33588fd45ef0d632dcf87274faebace6c991b Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 31 Jul 2024 10:36:46 -0500 Subject: [PATCH 17/52] Package updates Update to iana-etc-20240723. Update to glibc-2.40. Update to iproute2-6.10.0. Update to linux-6.10.2. Update to lz4-1.10.0. Update to meson-1.5.1. Update to setuptools-71.1.0. Update to sysklogd-2.6.1. Update to systemd-256.4. Update to sysvinit-3.10. --- chapter01/changelog.xml | 46 +++++++++++++++++++++++++ chapter01/whatsnew.xml | 16 ++++----- chapter03/patches.xml | 3 +- chapter08/glibc.xml | 4 +-- packages.ent | 75 +++++++++++++++++++++-------------------- patches.ent | 4 +-- 6 files changed, 98 insertions(+), 50 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 2a6c247ad..12d2f79f4 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,52 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-08-01 + + + [bdubbs] - Update to iana-etc-20240723. Addresses + #5006. + + + [bdubbs] - Update to glibc-2.40. Fixes + #5529. + + + [bdubbs] - Update to iproute2-6.10.0. Fixes + #5523. + + + [bdubbs] - Update to linux-6.10.2. Fixes + #5521. + + + [bdubbs] - Update to lz4-1.10.0. Fixes + #5526. + + + [bdubbs] - Update to meson-1.5.1. Fixes + #5527. + + + [bdubbs] - Update to setuptools-71.1.0. Fixes + #5524. + + + [bdubbs] - Update to sysklogd-2.6.1. Fixes + #5522. + + + [bdubbs] - Update to systemd-256.4. Fixes + #5518. + + + [bdubbs] - Update to sysvinit-3.10. Fixes + #5528. + + + + 2024-07-15 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 728396d0a..11bad5db3 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -101,9 +101,9 @@ Gettext-&gettext-version; - + @@ -167,9 +167,9 @@ Linux-&linux-version; - + @@ -239,9 +239,9 @@ Systemd-&systemd-version; - + @@ -254,9 +254,9 @@ - + Util-linux-&util-linux-version; diff --git a/chapter03/patches.xml b/chapter03/patches.xml index 95d81b1de..b807d76f9 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -77,6 +77,7 @@ --> + Glibc FHS Patch - &glibc-fhs-patch-size;: diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index 21a73a35d..1f12e915a 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -49,11 +49,11 @@ store their runtime data in the FHS-compliant locations: patch -Np1 -i ../&glibc-fhs-patch; - + The Glibc documentation recommends building Glibc in a dedicated build directory: diff --git a/packages.ent b/packages.ent index 26fcf7f5f..b02018b31 100644 --- a/packages.ent +++ b/packages.ent @@ -255,10 +255,10 @@ - - + + - + @@ -317,10 +317,10 @@ - + - + @@ -341,10 +341,10 @@ - - + + - + @@ -430,30 +430,31 @@ - - + + - + - + - - - + + + - - + + - + @@ -502,10 +503,10 @@ - + - + @@ -636,10 +637,10 @@ - - + + - + @@ -652,22 +653,22 @@ - - + + - + - + - + - + @@ -677,10 +678,10 @@ - - + + - + diff --git a/patches.ent b/patches.ent index 8b29af8a5..3dc18d14c 100644 --- a/patches.ent +++ b/patches.ent @@ -21,11 +21,11 @@ - + From f6eb3399d57d91dc472971e0a09b8e07debda3a9 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 1 Aug 2024 00:17:10 +0800 Subject: [PATCH 18/52] automake: Remove outdated test failure notice These failures are fixed in automake-1.17 release. --- chapter08/automake.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/chapter08/automake.xml b/chapter08/automake.xml index 6c7aa2582..86e800be7 100644 --- a/chapter08/automake.xml +++ b/chapter08/automake.xml @@ -62,9 +62,6 @@ Replace $((...)) with the number of logical cores you want to use if you don't want to use all. - Out of 2926 tests, 52 are known to fail due to incompatibilities in the - test scripts with gcc-14.1 or later. - Install the package: make install From 39bdcbafb21578e6b2fb0a011e0cb751cd5d96d8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 1 Aug 2024 00:29:32 +0800 Subject: [PATCH 19/52] whatsnew: Make Sysvinit entry same as the section title Make them consistent and reduce one string for the translators. --- chapter01/whatsnew.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 11bad5db3..b62a840a3 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -240,7 +240,7 @@ Systemd-&systemd-version; - SysVinit-&sysvinit-version; + Sysvinit-&sysvinit-version; - + - + From 8aa80e434d14f76267f7133b3b234355ccf9aab8 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 31 Jul 2024 16:59:30 -0500 Subject: [PATCH 21/52] Make capitalization os SysVinit consistent. --- appendices/dependencies.xml | 4 ++-- chapter01/whatsnew.xml | 2 +- chapter03/packages.xml | 2 +- chapter03/patches.xml | 2 +- chapter08/sysvinit.xml | 12 ++++++------ chapter09/usage.xml | 4 ++-- prologue/why.xml | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 6de2de8b7..27a7e2a57 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -3010,8 +3010,8 @@ - - Sysvinit + + SysVinit &dependencies; diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index b62a840a3..11bad5db3 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -240,7 +240,7 @@ Systemd-&systemd-version; - Sysvinit-&sysvinit-version; + SysVinit-&sysvinit-version; + + 2024-08-05 + + + [bdubbs] - Update to bash-5.2.32. Fixes + #5532. + + + [bdubbs] - Update to iana-etc-20240801. Addresses + #5006. + + + [bdubbs] - Update to vim-9.1.0660. Addresses + #4500. + + + [bdubbs] - Update to binutils-2.43. Fixes + #5535. + + + [bdubbs] - Update to linux-6.10.3. Fixes + #5534. + + + [bdubbs] - Update to readline-8.2.13. Fixes + #5533. + + + [bdubbs] - Update to wheel-0.44.0. Fixes + #5536. + + + + 2024-08-01 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 11bad5db3..614ea5c9d 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -38,15 +38,15 @@ Automake-&automake-version; - + Bc-&bc-version; - + @@ -221,9 +221,9 @@ Python-&python-version; - + @@ -301,8 +301,12 @@ Removed: - - + + bash-5.2.21-upstream_fixes-1.patch + + + readline-8.2-upstream_fixes-3.patch + diff --git a/chapter03/patches.xml b/chapter03/patches.xml index de4e0b529..ef00fbe5a 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -26,7 +26,7 @@ --> - + + SysVinit Consolidated Patch - &sysvinit-consolidated-patch-size;: diff --git a/chapter08/bash.xml b/chapter08/bash.xml index c217d5576..9dbcf7863 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -40,10 +40,6 @@ Installation of Bash - First, fix some issues identified upstream: - -patch -Np1 -i ../&bash-upstream-fixes-patch; - Prepare Bash for compilation: ./configure --prefix=/usr \ diff --git a/chapter08/readline.xml b/chapter08/readline.xml index d1c385bbc..882391cae 100644 --- a/chapter08/readline.xml +++ b/chapter08/readline.xml @@ -56,10 +56,6 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install sed -i 's/-Wl,-rpath,[^ ]*//' support/shobj-conf - Now fix a problem identified upstream: - -patch -Np1 -i ../&readline-fixes-patch; - Prepare Readline for compilation: ./configure --prefix=/usr \ diff --git a/packages.ent b/packages.ent index 26f0f3fb3..f583b777c 100644 --- a/packages.ent +++ b/packages.ent @@ -47,10 +47,10 @@ - - + + - + @@ -65,10 +65,10 @@ - - + + - + @@ -317,10 +317,10 @@ - + - + @@ -431,12 +431,12 @@ - + - + - + - + - + @@ -744,10 +744,10 @@ - + - + - + - - + + - + diff --git a/patches.ent b/patches.ent index 3dc18d14c..fbb773577 100644 --- a/patches.ent +++ b/patches.ent @@ -2,10 +2,11 @@ + @@ -29,11 +30,11 @@ - + From 079ced733c5184d6c98e0ca12483cdf9cdb6342e Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 6 Aug 2024 11:10:46 +0800 Subject: [PATCH 28/52] pkgconf: Switch home page to GitHub The upstream maintainer told me (s)he is not controlling pkgconf.org as at now. --- packages.ent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.ent b/packages.ent index f583b777c..843d8d0a5 100644 --- a/packages.ent +++ b/packages.ent @@ -581,7 +581,7 @@ - + From 93bffa3abf3ea177e1eed0d1461388de1c967651 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 9 Aug 2024 15:49:05 +0800 Subject: [PATCH 29/52] Regenerate kernel configuration with Linux 6.10.2 source Now all DRM drivers are entries in the DRM submenu. --- chapter10/kernel/kernel.version | 2 +- chapter10/kernel/systemd.xml | 4 ++-- chapter10/kernel/sysv.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chapter10/kernel/kernel.version b/chapter10/kernel/kernel.version index dd0026fc1..22cb9e553 100644 --- a/chapter10/kernel/kernel.version +++ b/chapter10/kernel/kernel.version @@ -1 +1 @@ -6.8.9 +6.10.2 diff --git a/chapter10/kernel/systemd.xml b/chapter10/kernel/systemd.xml index 4960796ef..271744b65 100644 --- a/chapter10/kernel/systemd.xml +++ b/chapter10/kernel/systemd.xml @@ -45,8 +45,8 @@ Graphics support ---> < /*/M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> ... [DRM] - # If [DRM] is selected as * or M, this must be selected: - [ /*] Enable legacy fbdev support for your modesetting driver + # If [DRM] is selected as * or M, this must be selected: + [ /*] Enable legacy fbdev support for your modesetting driver ... [DRM_FBDEV_EMULATION] Console display driver support ---> # If [DRM] is selected as * or M, this must be selected: diff --git a/chapter10/kernel/sysv.xml b/chapter10/kernel/sysv.xml index 25cb0c2a6..451898a21 100644 --- a/chapter10/kernel/sysv.xml +++ b/chapter10/kernel/sysv.xml @@ -31,8 +31,8 @@ Graphics support ---> < /*/M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> ... [DRM] - # If [DRM] is selected as * or M, this must be selected: - [ /*] Enable legacy fbdev support for your modesetting driver + # If [DRM] is selected as * or M, this must be selected: + [ /*] Enable legacy fbdev support for your modesetting driver ... [DRM_FBDEV_EMULATION] Console display driver support ---> # If [DRM] is selected as * or M, this must be selected: From a18957940ced92d374e4e41e7eefb982d5c55749 Mon Sep 17 00:00:00 2001 From: Andrew Kreimer Date: Fri, 9 Aug 2024 17:01:15 +0300 Subject: [PATCH 30/52] docs: fix a typo In section "5.3. GCC-13.2.0 - Pass 1", the string "The are not strictly needed" should have "They". Fix that. --- chapter05/gcc-pass1.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 7f33e5215..6ea6d48b6 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -139,7 +139,7 @@ cd build Those switches allow GCC to compile programs with some hardening security features (more information on those in - the in chapter 8) by default. The + the in chapter 8) by default. They are not strictly needed at this stage, since the compiler will only produce temporary executables. But it is cleaner to have the temporary packages be as close as possible to the final ones. From aa00b47601b96634dff68eb62242d8c7eda4ac79 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 12 Aug 2024 19:19:32 +0800 Subject: [PATCH 31/52] build: Use -r for git ls-tree in make dist Without this we may pack things like *.swp into the tarball. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6247b294d..52034319c 100644 --- a/Makefile +++ b/Makefile @@ -212,7 +212,7 @@ dist: $(Q)DIST=/tmp/LFS-RELEASE ./git-version.sh $(REV) $(Q)rm -f lfs-$$( Date: Tue, 13 Aug 2024 09:16:25 +0200 Subject: [PATCH 32/52] Fix missing attribute 'revision' --- chapter10/kernel/systemd.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter10/kernel/systemd.xml b/chapter10/kernel/systemd.xml index 271744b65..a03c67402 100644 --- a/chapter10/kernel/systemd.xml +++ b/chapter10/kernel/systemd.xml @@ -3,7 +3,7 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> -General setup ---> +General setup ---> [ ] Compile the kernel with warnings as errors [WERROR] CPU/Task time and stats accounting ---> [*] Pressure stall information tracking [PSI] From 1e2c41871f37792e59ea5d3ca823bee9536edd3d Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 13 Aug 2024 16:52:16 +0800 Subject: [PATCH 33/52] kernel: Really fix missing revision attribute --- chapter10/kernel/systemd.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter10/kernel/systemd.toml b/chapter10/kernel/systemd.toml index cfb8bf8f1..bfe7a1b40 100644 --- a/chapter10/kernel/systemd.toml +++ b/chapter10/kernel/systemd.toml @@ -25,12 +25,12 @@ TMPFS='*' TMPFS_POSIX_ACL='*' CGROUP_SCHED='* ' +revision='systemd' + [RT_GROUP_SCHED] value = ' ' comment = 'This may cause some systemd features malfunction' -revision='systemd' - [DRM_FBDEV_EMULATION] value = ' *' comment = 'If [DRM] is selected as * or M, this must be selected' From a1a1f9f4debaf5d10083a55d6c67d5b99eec3097 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 14 Aug 2024 10:34:56 -0500 Subject: [PATCH 34/52] Package updates. Update to iana-etc-20240806. Update to pkgconf-2.3.0. Update to python3-3.12.5. Update to linux-6.10.4. --- chapter01/changelog.xml | 22 +++++ chapter08/coreutils.xml | 2 +- packages.ent | 209 ++++++++++++++++++++-------------------- 3 files changed, 128 insertions(+), 105 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index f3eafe40d..daa0d45cb 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,28 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-08-15 + + + [bdubbs] - Update to iana-etc-20240806. Addresses + #5006. + + + [bdubbs] - Update to pkgconf-2.3.0. Fixes + #5537. + + + [bdubbs] - Update to python3-3.12.5. Fixes + #5538. + + + [bdubbs] - Update to linux-6.10.4. Fixes + #5539. + + + + 2024-08-05 diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml index ca02058b5..181153d1d 100644 --- a/chapter08/coreutils.xml +++ b/chapter08/coreutils.xml @@ -122,7 +122,7 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ remove < /dev/null. --> Now run the tests (using /dev/null for the standard input, or two tests may be broken if building LFS in a - graphical terminal or a session in SSH or GNU Screen etc. because the + graphical terminal or a session in SSH or GNU Screen because the standard input is connected to a PTY from host distro, and the device node for such a PTY cannot be accessed from the LFS chroot environment): diff --git a/packages.ent b/packages.ent index 843d8d0a5..a7f30cf39 100644 --- a/packages.ent +++ b/packages.ent @@ -26,7 +26,7 @@ - + @@ -35,7 +35,7 @@ - + @@ -44,8 +44,8 @@ - - + + @@ -55,7 +55,7 @@ - + @@ -70,12 +70,12 @@ - + - - + + - + @@ -86,7 +86,7 @@ - + @@ -101,18 +101,18 @@ - - + + - + - - + + @@ -128,7 +128,7 @@ - + @@ -137,7 +137,7 @@ - + @@ -145,15 +145,15 @@ - - + + - + @@ -187,10 +187,10 @@ - - - - + + + + @@ -216,25 +216,25 @@ - + - - - - - - + + + + + + - + @@ -243,25 +243,25 @@ - + - + - - + + - - + + @@ -317,10 +317,10 @@ - + - + @@ -354,7 +354,7 @@ - + @@ -370,7 +370,7 @@ - + @@ -378,7 +378,7 @@ - + @@ -403,14 +403,14 @@ - + - + @@ -419,24 +419,24 @@ - + - + - + - + - + - + - + - + - - - - + + + + - - + + @@ -642,7 +642,7 @@ - + @@ -650,7 +650,7 @@ - + @@ -658,13 +658,14 @@ - + - + @@ -683,7 +684,7 @@ - + @@ -694,7 +695,7 @@ - + @@ -705,8 +706,8 @@ - - + + @@ -739,9 +740,9 @@ - + - + @@ -763,8 +764,8 @@ - - + + @@ -787,9 +788,9 @@ - + - + @@ -809,6 +810,6 @@ - - + + From 4c522f377577a217106d9b3fcd2ab63c9fbf8823 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sat, 17 Aug 2024 16:08:56 -0500 Subject: [PATCH 35/52] Package updates. Update to setuptools-72.2.0. Update to kmod-33. Update to binutils-2.43.1. Update to linux-6.10.5. --- appendices/dependencies.xml | 4 +++- chapter01/changelog.xml | 22 ++++++++++++++++++++++ chapter08/kmod.xml | 23 +++++++++++++++++------ packages.ent | 22 +++++++++++----------- 4 files changed, 53 insertions(+), 18 deletions(-) diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 27a7e2a57..fdd1f0f05 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -1615,7 +1615,9 @@ &external; - None + + scdoc (for man pages) + diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index daa0d45cb..4e420b168 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,28 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-08-17 + + + [bdubbs] - Update to setuptools-72.2.0. Fixes + #5542. + + + [bdubbs] - Update to kmod-33. Fixes + #5540. + + + [bdubbs] - Update to binutils-2.43.1. Fixes + #5543. + + + [bdubbs] - Update to linux-6.10.5. Fixes + #5541. + + + + 2024-08-15 diff --git a/chapter08/kmod.xml b/chapter08/kmod.xml index 6c875caed..912fe07a0 100644 --- a/chapter08/kmod.xml +++ b/chapter08/kmod.xml @@ -43,12 +43,13 @@ Prepare Kmod for compilation: -./configure --prefix=/usr \ - --sysconfdir=/etc \ - --with-openssl \ - --with-xz \ - --with-zstd \ - --with-zlib +./configure --prefix=/usr \ + --sysconfdir=/etc \ + --with-openssl \ + --with-xz \ + --with-zstd \ + --with-zlib \ + --disable-manpages The meaning of the configure options: @@ -74,6 +75,16 @@ + + + --disable-manpages + + + This option disables generating the manpages which + requires an external program. + + + Compile the package: diff --git a/packages.ent b/packages.ent index a7f30cf39..022333993 100644 --- a/packages.ent +++ b/packages.ent @@ -65,10 +65,10 @@ - - + + - + @@ -365,10 +365,10 @@ - - + + - + @@ -431,12 +431,12 @@ - + - + - + - - + + From 10aa6482f7121b12c7c6d2ca415e687a5e6c3d0a Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 18 Aug 2024 14:47:14 -0500 Subject: [PATCH 37/52] Move glibc-2.39-upstream_fix patch in what's new from Added: to Removed: --- chapter01/whatsnew.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 614ea5c9d..14cc9fe47 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -294,9 +294,6 @@ Lz4-&lz4-version; - - glibc-2.39-upstream_fix-1.patch - @@ -304,6 +301,9 @@ bash-5.2.21-upstream_fixes-1.patch + + glibc-2.39-upstream_fix-1.patch + readline-8.2-upstream_fixes-3.patch From 837731717d2a62c84fc2bfb81f8ae61e1c8e7396 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 18 Aug 2024 20:02:08 -0500 Subject: [PATCH 38/52] Minor grammar change. --- chapter08/kmod.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/kmod.xml b/chapter08/kmod.xml index 912fe07a0..5b4ab4fb3 100644 --- a/chapter08/kmod.xml +++ b/chapter08/kmod.xml @@ -80,7 +80,7 @@ --disable-manpages - This option disables generating the manpages which + This option disables generating the man pages which requires an external program. From 217802b9c0b9115c508ade1fe541d9c895d47328 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 18 Aug 2024 21:03:47 +0800 Subject: [PATCH 39/52] gcc-pass2: Fix description of LDFLAGS_FOR_TARGET= Pass 2 libstdc++ still links to libgcc.a even with LDFLAGS_FOR_TARGET=, despite this libgcc.a is from pass 2 instead of pass 1. The difference between pass 2 libgcc and pass 1 libgcc is Glibc wasn't installed when the pass 1 libgcc was built. This difference causes both consequences (1) pass 1 libgcc lacks shared library and (2) pass 1 libgcc cannot support C++ EH, but it's not (1) causing (2). --- chapter06/gcc-pass2.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml index 6ca5a0fa2..6d0098c80 100644 --- a/chapter06/gcc-pass2.xml +++ b/chapter06/gcc-pass2.xml @@ -138,10 +138,11 @@ cd build LDFLAGS_FOR_TARGET=... Allow libstdc++ to - use the shared libgcc being - built in this pass, instead of the static version that was built in GCC - pass 1. This is necessary to support C++ exception - handling. + use the libgcc being + built in this pass, instead of the previous version built in + . The previous version cannot + properly support C++ exception handling because it was built + without libc support. From d1ccec207ff286042f513e6bd591ea90c68ae933 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 19 Aug 2024 13:56:23 +0800 Subject: [PATCH 40/52] whatsnew: Remove glibc-2.39-upstream_fixes-1.patch entry It's added after 12.1 release and removed before 12.2 release, so when we compare 12.1 and 12.2 it's neither added nor removed and it just seems never existed. --- chapter01/whatsnew.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 14cc9fe47..c807fa15d 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -301,9 +301,6 @@ bash-5.2.21-upstream_fixes-1.patch - - glibc-2.39-upstream_fix-1.patch - readline-8.2-upstream_fixes-3.patch From db7bf1f8e956146af90bd17631b2d702a120a11a Mon Sep 17 00:00:00 2001 From: "Douglas R. Reno" Date: Mon, 19 Aug 2024 09:55:19 -0500 Subject: [PATCH 41/52] systemd configuration: adjust some wording --- chapter09/systemd-custom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter09/systemd-custom.xml b/chapter09/systemd-custom.xml index 742983e44..bb8285b31 100644 --- a/chapter09/systemd-custom.xml +++ b/chapter09/systemd-custom.xml @@ -102,7 +102,7 @@ EOF q /tmp 1777 root root 10d - The type field, q, discusses creating a subvolume with quotas which + The type field, q, indicates the creation of a subvolume with quotas which is really only applicable to btrfs filesystems. It references type v which in turn references type d (directory). This then creates the specified directory if it is not present and adjusts the permissions From 54c0a86cd0018e94b4db71caf36ca09f84154aa0 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 23 Aug 2024 19:23:13 +0800 Subject: [PATCH 42/52] bootscripts: console: Fix fb console detection If CONFIG_FB is not set but CONFIG_DRM_FBDEV_EMULATION is set to y, on a DRM-drived graphic card (anything from AMD/ATI, Intel, or NVIDIA in recent 20 years) we'd be using a fb console but without /sys/class/graphics/fb0. Then the script won't run setfont for VT 2-6. Check /sys/class/graphics/fbcon instead of /sys/class/graphics/fb0 to fix the issue. Closes: https://lists.linuxfromscratch.org/sympa/arc/lfs-support/2024-08/msg00001.html Reported-by: Alan Ianson --- bootscripts/ChangeLog | 6 ++++++ bootscripts/lfs/init.d/console | 2 +- chapter01/changelog.xml | 11 +++++++++++ packages.ent | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 558230238..d3a7ed661 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,9 @@ +2024-08-23 Xi Ruoyao + * In console, detect FB console by checking /sys/class/graphics/fbcon + instead of fb0. The latter does not exist if CONFIG_FB=n, but + CONFIG_DRM_FBDEV_EMULATION=y can support a FB console without + CONFIG_FB. + 2024-07-12 Xi Ruoyao * In mountvirtfs, recreate /dev/fd correctly if it's already created by the initramfs. diff --git a/bootscripts/lfs/init.d/console b/bootscripts/lfs/init.d/console index a5338cc71..9409e4757 100644 --- a/bootscripts/lfs/init.d/console +++ b/bootscripts/lfs/init.d/console @@ -47,7 +47,7 @@ case "${1}" in log_info_msg "Setting up Linux console..." # Figure out if a framebuffer console is used - [ -d /sys/class/graphics/fb0 ] && use_fb=1 || use_fb=0 + [ -d /sys/class/graphics/fbcon ] && use_fb=1 || use_fb=0 # Figure out the command to set the console into the # desired mode diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 4e420b168..7f58d2d3b 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,17 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-08-23 + + + [xry111] - Update to lfs-bootscripts-20240823, to fix an + issue causing VT 2-6 not affected by the FONT= setting in + /etc/sysconfig/console. + + + + 2024-08-17 diff --git a/packages.ent b/packages.ent index d95e49225..86242dd7d 100644 --- a/packages.ent +++ b/packages.ent @@ -381,7 +381,7 @@ - + From 872a378f5e0b75229d2adffad621dcf95cbe5ab4 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Fri, 23 Aug 2024 13:59:56 -0500 Subject: [PATCH 43/52] Typos on comments. These changes are all in comments that do not affect the books in any way. --- aux-file-data.sh | 2 +- git-version.sh | 2 +- lfs-latest-git.php | 2 +- packages.ent | 2 +- stylesheets/lfs-xsl/chunkfast.xsl | 2 +- stylesheets/lfs-xsl/common.xsl | 4 ++-- stylesheets/lfs-xsl/pdf.xsl | 4 ++-- stylesheets/lfs-xsl/pdf/lfs-lists.xsl | 6 +++--- stylesheets/lfs-xsl/pdf/lfs-mixed.xsl | 4 ++-- stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl | 2 +- stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl | 8 ++++---- stylesheets/lfs-xsl/xhtml/lfs-sections.xsl | 4 ++-- stylesheets/lfs-xsl/xhtml/lfs-toc.xsl | 2 +- stylesheets/patcheslist.xsl | 2 +- stylesheets/wget-list.xsl | 2 +- udev-lfs/README | 2 +- udev-lfs/init-net-rules.sh | 2 +- 17 files changed, 26 insertions(+), 26 deletions(-) diff --git a/aux-file-data.sh b/aux-file-data.sh index 8be1b1d15..01539fef6 100755 --- a/aux-file-data.sh +++ b/aux-file-data.sh @@ -15,7 +15,7 @@ base=$(basename $bootscripts .tar.xz) bootsize=$(ls -l --block-size=1024 $bootscripts | cut -f5 -d" ") bootmd5=$(md5sum $bootscripts | cut -f1 -d" ") -# Figure intalled size of bootscripts +# Figure installed size of bootscripts TOPDIR=$(pwd) TMP_DIR=$(mktemp -d /tmp/lfsbootfiles.XXXXXX) pushd $TMP_DIR > /dev/null diff --git a/git-version.sh b/git-version.sh index 09a8fadd7..9d6c3fe0a 100755 --- a/git-version.sh +++ b/git-version.sh @@ -19,7 +19,7 @@ if [ -e LFS-RELEASE ]; then fi if ! git status > /dev/null; then - # Either it's not a git repository, or git is unavaliable. + # Either it's not a git repository or git is unavaliable. # Just workaround. echo " version.ent echo "" >> version.ent diff --git a/lfs-latest-git.php b/lfs-latest-git.php index ce76e970e..55c634e0b 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -322,7 +322,7 @@ function get_current() $file = basename( $line ) . "\n"; if ( preg_match( "/patch$/", $file ) ) { continue; } // Skip patches - $file = preg_replace( "/bz2/", '', $file ); // The 2 confusses the regex + $file = preg_replace( "/bz2/", '', $file ); // The 2 confuses the regex $file = rtrim( $file ); $pkg_pattern = "/(\D*).*/"; diff --git a/packages.ent b/packages.ent index 86242dd7d..e21d6b718 100644 --- a/packages.ent +++ b/packages.ent @@ -2,7 +2,7 @@ + Dropping unneeded anchors and fo:wrapper elemments. --> @@ -111,7 +111,7 @@ - + diff --git a/stylesheets/lfs-xsl/pdf.xsl b/stylesheets/lfs-xsl/pdf.xsl index ea247f5db..e1c03147c 100644 --- a/stylesheets/lfs-xsl/pdf.xsl +++ b/stylesheets/lfs-xsl/pdf.xsl @@ -27,7 +27,7 @@ - + @@ -93,7 +93,7 @@ + Addibg a bullet, left alignment, and @kepp-*.* attributes + for packages and patches list. --> @@ -135,7 +135,7 @@ diff --git a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl index e5c7ae090..f38699e9c 100644 --- a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl +++ b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl @@ -128,7 +128,7 @@ + Be sure that literal will use always normal font weight. --> @@ -139,7 +139,7 @@ + literal, option, prompt, systemitem, varname, sgmltag, tag, and uri --> diff --git a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl b/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl index 7ec85ddf4..5578fd661 100644 --- a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl +++ b/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl @@ -176,7 +176,7 @@ + Small font size and left alignment. --> - + and that do not affect the chunk algorithm. --> @@ -187,7 +187,7 @@ @@ -208,7 +208,7 @@ - + diff --git a/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl b/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl index 36c4ba3fe..5dbe2136e 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl @@ -65,7 +65,7 @@ diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl index f863edc1f..94e33b70b 100644 --- a/stylesheets/patcheslist.xsl +++ b/stylesheets/patcheslist.xsl @@ -51,7 +51,7 @@ exit - + diff --git a/stylesheets/wget-list.xsl b/stylesheets/wget-list.xsl index eca53a4c9..09f99cd22 100644 --- a/stylesheets/wget-list.xsl +++ b/stylesheets/wget-list.xsl @@ -15,7 +15,7 @@ + duplicated URLs due that may be split for PDF output --> version.ent echo "" >> version.ent diff --git a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl index f38699e9c..834b7057c 100644 --- a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl +++ b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl @@ -5,7 +5,7 @@ version="1.0"> From 948cd148be899247236e1ab8e5a9be8e0be97e29 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 25 Aug 2024 15:32:24 +0800 Subject: [PATCH 46/52] Update to lfs-bootscripts-20240825 Co-authored-by: Andrew Kreimer --- bootscripts/ChangeLog | 7 +++++++ bootscripts/lfs/lib/services/init-functions | 3 --- bootscripts/lfs/sbin/ifup.8 | 8 ++++---- chapter01/changelog.xml | 10 ++++++++++ packages.ent | 2 +- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index d3a7ed661..41576792f 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,10 @@ +2024-08-25 Xi Ruoyao + * Remove an empty line and an outdated comment (not valid anymore after + /usr merge) from init-functions. + +2024-08-24 Andrew Kreimer + * Fix typos. + 2024-08-23 Xi Ruoyao * In console, detect FB console by checking /sys/class/graphics/fbcon instead of fb0. The latter does not exist if CONFIG_FB=n, but diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions index 2bcadaa30..e13bb8a5d 100644 --- a/bootscripts/lfs/lib/services/init-functions +++ b/bootscripts/lfs/lib/services/init-functions @@ -457,11 +457,8 @@ pidofproc() # If a PID file is set and exists, use it. if [ -n "${pidfile}" -a -e "${pidfile}" ]; then - # Use the value in the first line of the pidfile pidlist=`/bin/head -n1 "${pidfile}"` - # This can optionally be written as 'sed 1q' to repalce 'head -n1' - # should LFS move /bin/head to /usr/bin/head else # Use pidof pidlist=`pidof "${program}"` diff --git a/bootscripts/lfs/sbin/ifup.8 b/bootscripts/lfs/sbin/ifup.8 index 2fb7873ec..8d08d8c14 100644 --- a/bootscripts/lfs/sbin/ifup.8 +++ b/bootscripts/lfs/sbin/ifup.8 @@ -94,7 +94,7 @@ NOTES compound device such as a bridge. ONBOOT - If set to 'yes', the specified interface is - configured by the netowrk boot script. + configured by the network boot script. GATEWAY - The default IP address to use for routing if the destination IP address is not in a static @@ -112,7 +112,7 @@ NOTES This list is normally a single value, e.g. eth0, for use with a virtual host such as kvm. - Other paramters that are service specific include: + Other parameters that are service specific include: ipv4-static @@ -128,7 +128,7 @@ NOTES additional IP addresses to a network device. Example: eth0:2 (optional) - BROADCAST - The brodcast address for this interface, + BROADCAST - The broadcast address for this interface, e.g 192.168.1.255. If not specified, the broadcast address will be calculated from the IP and PREFIX. @@ -154,7 +154,7 @@ NOTES DHCP_START - Optional parameters to pass to the dhcp client at startup. - DHCP_STOP - Optional paremeters to pass to the dhcp client + DHCP_STOP - Optional parameters to pass to the dhcp client at shutdown. PRINTIP - Flag to print the dhcp address to stdout diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 7f58d2d3b..d0cf45003 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,16 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-08-23 + + + [xry111] - Update to lfs-bootscripts-20240825. Only trivial + non-functional changes. + + + + 2024-08-23 diff --git a/packages.ent b/packages.ent index e21d6b718..e8108cfbd 100644 --- a/packages.ent +++ b/packages.ent @@ -381,7 +381,7 @@ - + From 04befc5e3cb597dca8f39a79e70b44a1ac5c019b Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 26 Aug 2024 02:49:01 +0800 Subject: [PATCH 47/52] aboutsbus: Add power profile info --- chapter04/aboutsbus.xml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index dccf59fe7..7139cb3a8 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -36,6 +36,32 @@ to give an estimate of how long it might take to install a package, but the numbers can vary by as much as dozens of minutes in some cases. + Before measuring the build time of any package (no matter Binutils + pass 1 or a package of which the SBU is being measured), make sure a + system power profile suitable to make the system running with the + maximum performance (and the maximum power consumption) is selected. Or + the measured SBU value may be severly inaccurate because the system may be + operated differently building Binutils pass 1 and the other package. + Be aware that a significant inaccuracy can still show up even if the same + profile (except one maximizing the performance) is used for both packages: + the system may respond slower for saving the power building + Binutils pass 1, because the system load seems only about 25% of the load + building the other package (with -j4). + + On most distros the power profile can be managed with either + power-profiles-daemon or tuned. + If the distro runs power-profiles-daemon, issue the + powerprofilesctl set performance command to select + the performance profile. If the distro runs + tuned, issue the tuned-adm profile + throughput-performance command to select the + throughput-performance profile. + + Even if you are not measuring the SBU values, it's still better to + select the power profile for maximum performance before building LFS, as + doing so can (obviously) make the system faster to build LFS + packages. + When multiple processors are used in this way, the SBU units in the book will vary even more than they normally would. In some cases, the make @@ -47,7 +73,6 @@ The times presented here are based upon using four cores (-j4). The times in Chapter 8 also include the time to run the regression tests for the package unless specified otherwise. - From eae9237225b67996f68e473b5241c0d349f3d1f2 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Mon, 26 Aug 2024 17:59:31 -0500 Subject: [PATCH 48/52] Add more detail to the About SBUs page. --- chapter04/aboutsbus.xml | 37 +++++++++++++++++++++++------------- chapter05/binutils-pass1.xml | 2 +- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index 7139cb3a8..b65b30950 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -26,9 +26,9 @@ unit of time. For example, consider a package whose compilation time is 4.5 - SBUs. This means that if your system took 10 minutes to compile and + SBUs. This means that if your system took 4 minutes to compile and install the first pass of binutils, it will take - approximately 45 minutes to build the example package. + approximately 18 minutes to build the example package. Fortunately, most build times are shorter than one SBU. SBUs are not entirely accurate because they depend on many @@ -36,17 +36,26 @@ to give an estimate of how long it might take to install a package, but the numbers can vary by as much as dozens of minutes in some cases. - Before measuring the build time of any package (no matter Binutils - pass 1 or a package of which the SBU is being measured), make sure a - system power profile suitable to make the system running with the - maximum performance (and the maximum power consumption) is selected. Or - the measured SBU value may be severly inaccurate because the system may be - operated differently building Binutils pass 1 and the other package. + On some newer systems, the motherboard is capable of contolling + the system clock speed. This can be controlled with a command such as + powerprofilesctl. This is not available in LFS, but + may be available on the host system. After LFS is complete, it can be + added to a system with the procedures at the + + BLFS power-profiles-daemon page. + + Before measuring the build time of any package it is advisable to use a + system power profile set for maximum performance (and maximum power + consumption). + + Otherwise the measured SBU value may be inaccurate because the + system may react differently when building + or other packages. + Be aware that a significant inaccuracy can still show up even if the same - profile (except one maximizing the performance) is used for both packages: - the system may respond slower for saving the power building - Binutils pass 1, because the system load seems only about 25% of the load - building the other package (with -j4). + profile is used for both packages because the system may respond slower if + the system is idle when starting the build procedure. Setting the power + profile to "performance" will minimize this problem. On most distros the power profile can be managed with either power-profiles-daemon or tuned. @@ -70,7 +79,9 @@ interleaved. If you run into a problem with a build step, revert to a single processor build to properly analyze the error messages. - The times presented here are based upon using four cores (-j4). The + The times presented here for all packages + (except which is based on one core) + are based upon using four cores (-j4). The times in Chapter 8 also include the time to run the regression tests for the package unless specified otherwise. diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index 39365477d..f6b7f0f90 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -5,7 +5,7 @@ %general-entities; ]> - + From 68c63ae3af63a55b0268c9c4802df3efff322562 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 27 Aug 2024 12:31:04 +0800 Subject: [PATCH 49/52] Some About SBUs page reword --- chapter04/aboutsbus.xml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index b65b30950..a442c20ab 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -39,7 +39,7 @@ On some newer systems, the motherboard is capable of contolling the system clock speed. This can be controlled with a command such as powerprofilesctl. This is not available in LFS, but - may be available on the host system. After LFS is complete, it can be + may be available on the host distro. After LFS is complete, it can be added to a system with the procedures at the BLFS power-profiles-daemon page. @@ -55,21 +55,16 @@ Be aware that a significant inaccuracy can still show up even if the same profile is used for both packages because the system may respond slower if the system is idle when starting the build procedure. Setting the power - profile to "performance" will minimize this problem. + profile to performance will minimize this problem. And + obviously doing so will also make the system build LFS faster. - On most distros the power profile can be managed with either - power-profiles-daemon or tuned. - If the distro runs power-profiles-daemon, issue the + If powerprofilesctl is available, issue the powerprofilesctl set performance command to select - the performance profile. If the distro runs - tuned, issue the tuned-adm profile - throughput-performance command to select the - throughput-performance profile. - - Even if you are not measuring the SBU values, it's still better to - select the power profile for maximum performance before building LFS, as - doing so can (obviously) make the system faster to build LFS - packages. + the performance profile. Some distros provides the + tuned-adm command for managing the profiles instead of + powerprofilesctl, on these distros issue the + tuned-adm profile throughput-performance command to + select the throughput-performance profile. When multiple processors are used in this way, the SBU units in the From 2ca7fca7998c2ac7ebfa36af7d2ef15eae9a33e9 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 27 Aug 2024 16:37:07 +0800 Subject: [PATCH 50/52] gcc: Don't decrease the stack limit I've had doubts on this "ulimit -s 32768" command for years. After reading GCC code (libiberty/stack-limit.c) I'm pretty sure this command is not doing what we expected. In a typical Linux distro, the default "soft" stack limit is 8 MiB and the default "hard" stack limit is infinite. And GCC will automatically increase the soft limit to 64 MiB if the original soft limit is smaller than 64 MiB, and the hard limit is at least 64 MiB. So with a typical default configuration, the real stack limit of GCC is 64 MiB. But our "ulimit -s 32768" command sets both the soft limit and the hard limit to 32 MiB. Thus we are actually *decreasing* the real stack limit. Fortunately this has not caused any test failures, but it's just wrong (contradicting with the explanation of the command). Thus just raise the hard limit to infinite in case the host distro uses a not so typical configuration where the hard limit is tight, and let GCC to set up the soft limit to the expected value on its own. It's more future-proof than "ulimit -s 65536" in case GCC changes the expected stack limit in the future. It should be safe to make the change in freeze because in jhalfs it only affects the test suite, and even in a manual build the user can skip this command if not running the GCC test suite. --- chapter08/gcc.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 971394527..ad60089b8 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -139,10 +139,16 @@ cd build command below, where x is the number of CPU cores on your system. - One set of tests in the GCC test suite is known to exhaust the default - stack, so increase the stack size prior to running the tests: + GCC may need more stack space compiling some extremely complex + code patterns. As a precaution for the host distros with a tight stack + limit, explicitly set the stack size hard limit to infinite. + On most host distros (and the final LFS system) the hard limit is + infinite by default, but there's no harm to set it explicitly anyway. + It's not needed to change the stack size soft limit because GCC will + automatically set it to an appropriate value, as long as the value does + not exceed the hard limit: -ulimit -s 32768 +ulimit -s -H unlimited Now remove/fix several known test failures: From 2b76c898f59d78f414e5d02f9c3cf14b51cc1471 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Tue, 27 Aug 2024 10:44:59 -0500 Subject: [PATCH 51/52] Minor wording change. --- chapter08/gcc.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index ad60089b8..b3397d8be 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -143,8 +143,8 @@ cd build code patterns. As a precaution for the host distros with a tight stack limit, explicitly set the stack size hard limit to infinite. On most host distros (and the final LFS system) the hard limit is - infinite by default, but there's no harm to set it explicitly anyway. - It's not needed to change the stack size soft limit because GCC will + infinite by default, but there is no harm done by setting it explicitly. + It's not necessary to change the stack size soft limit because GCC will automatically set it to an appropriate value, as long as the value does not exceed the hard limit: From 73f24adb274184322b84e717f2b83405a7d03f34 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 29 Aug 2024 14:52:38 +0800 Subject: [PATCH 52/52] changelog: Hide sysklogd and bootscript change for systemd revision --- chapter01/changelog.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index d0cf45003..69860723f 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,7 +40,7 @@ appropriate for the entry or if needed the entire day's listitem. --> - + 2024-08-23 @@ -50,7 +50,7 @@ - + 2024-08-23 @@ -174,7 +174,7 @@ [bdubbs] - Update to setuptools-72.1.0. Fixes #5531. - + [bdubbs] - Update to sysklogd-2.6.1. Fixes #5522. @@ -231,7 +231,7 @@ - + 2024-07-01 @@ -260,7 +260,7 @@ [bdubbs] - Update to linux-6.9.7. Fixes #5508. - + [bdubbs] - Update to sysklogd-2.5.2. Fixes #5509.