From e91edadd00517fe2c7d00b6bef1ca870ce2dcbaf Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 30 Jun 2024 10:40:41 -0500 Subject: [PATCH 01/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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/16] 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) .*$/" );