diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 46bdfac0a..27a7e2a57 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -935,7 +935,7 @@ &dependencies; Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC, - Gettext, Glibc, GMP, Grep, Libxcrypt, M4, Make, MPC, MPFR, Patch, + Gettext, Glibc, GMP, Grep, M4, Make, MPC, MPFR, Patch, Perl, Sed, Tar, Texinfo, and Zstd @@ -1887,7 +1887,7 @@ &before; - GCC, Perl, Python, Shadow, and &systemd-udev; + Perl, Python, Shadow, and &systemd-udev; @@ -1934,9 +1934,11 @@ &external; - cpio and + cpio, LLVM - (with Clang) + (with Clang), and + Rust-bindgen @@ -3008,8 +3010,8 @@ - - Sysvinit + + SysVinit &dependencies; diff --git a/appendices/udev-rules.xml b/appendices/udev-rules.xml index 25f41033e..750205686 100644 --- a/appendices/udev-rules.xml +++ b/appendices/udev-rules.xml @@ -13,7 +13,7 @@ Udev configuration rules The rules in this appendix are listed for convenience. Installation is - normally done via instructions in . + normally done via instructions in 55-lfs.rules diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 37680aff5..558230238 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,11 @@ +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. + 2024-04-16 Bruce Dubbs * Remove blank output line generated in ifup script when bringing up wireless interface. 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/bootscripts/lfs/init.d/sysklogd b/bootscripts/lfs/init.d/sysklogd index e86b87b16..04662efd9 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 @@ -65,7 +60,6 @@ case "${1}" in status) statusproc /sbin/syslogd - statusproc klogd ;; *) 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/askforhelp.xml b/chapter01/askforhelp.xml index dd36b30fa..2dd5f85d0 100644 --- a/chapter01/askforhelp.xml +++ b/chapter01/askforhelp.xml @@ -15,7 +15,7 @@ In case you've hit an issue building one package with the LFS instruction, we strongly discourage posting the issue directly onto the upstream support channel before discussing via a LFS support - channel listed in . + channel listed in Doing so is often quite inefficient because the upstream maintainers are rarely familiar with LFS building procedure. Even if you've really hit an upstream issue, the LFS community can still help @@ -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 fd5645dc5..8f79339aa 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,232 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-08-01 + + + [bdubbs] - Update to gcc-14.2. Fixes + #5530. + + + [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-72.1.0. Fixes + #5531. + + + [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 + + + [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 + + + [bdubbs] - Update lfs-bootscripts to only output + escape sequences to a terminal. + + + + + + 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 + + + [bdubbs] - Update to vim-9.1.0478. Addresses + #4500. + + + [bdubbs] - Update to iana-etc-20240607. Addresses + #5006. + + + [bdubbs] - Update to systemd-256. Fixes + #5504. + + + [bdubbs] - Update to python3-3.12.4. Fixes + #5502. + + + [bdubbs] - Update to perl-5.40.0. Fixes + #5503. + + + [bdubbs] - Update to openssl-3.3.1 (Security fix). Fixes + #5500. + + + [bdubbs] - Update to linux-6.9.4. Fixes + #5505. + + + [bdubbs] - Update to findutils-4.10.0. Fixes + #5499. + + + + + + 2024-05-31 + + + [bdubbs] - Update to meson-1.4.1. Fixes + #5498. + + + [bdubbs] - Update to xz-5.6.2. Fixes + #5471. + + + [bdubbs] - Add linux-6.9.x compatibility instructions to + systemd + udev. + Fixes #5496. + + + [bdubbs] - Update to setuptools-70.0.0 (python module). Fixes + #5491. + + + [bdubbs] - Update to ninja-1.12.1. Fixes + #5489. + + + [bdubbs] - Update to man-pages-6.8. Fixes + #5494. + + + [bdubbs] - Update to linux-6.9.3. Fixes + #5491. + + + [bdubbs] - Update to libcap-2.70. Fixes + #5493. + + + [bdubbs] - Update to iproute2-6.9.0. Fixes + #5492. + + + [bdubbs] - Update to e2fsprogs-1.47.1. Fixes + #5495. + + + + 2024-05-13 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 2bd18a3e4..11bad5db3 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -35,15 +35,15 @@ - + - + @@ -68,9 +68,9 @@ - + Expat-&expat-version; @@ -80,9 +80,9 @@ - + @@ -95,15 +95,15 @@ GCC-&gcc-version; - + Gettext-&gettext-version; - + @@ -142,16 +142,16 @@ --> Kmod-&kmod-version; - - + - + Libelf from Elfutils-&elfutils-version; @@ -167,9 +167,9 @@ Linux-&linux-version; - + @@ -206,9 +206,9 @@ - + Pkgconf-&pkgconf-version; @@ -233,15 +233,15 @@ Shadow-&shadow-version; - - - + @@ -254,9 +254,9 @@ - + Util-linux-&util-linux-version; diff --git a/chapter02/stages.xml b/chapter02/stages.xml index aeee2588e..287aa43f4 100644 --- a/chapter02/stages.xml +++ b/chapter02/stages.xml @@ -86,7 +86,7 @@ and, as root, running the commands in and - . + diff --git a/chapter03/packages.xml b/chapter03/packages.xml index dbbb43eae..d58002ad2 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: @@ -730,7 +730,7 @@ - Sysvinit (&sysvinit-version;) - &sysvinit-size;: + SysVinit (&sysvinit-version;) - &sysvinit-size;: Home page: Download: diff --git a/chapter03/patches.xml b/chapter03/patches.xml index 87645f532..de4e0b529 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -77,6 +77,7 @@ --> + Glibc FHS Patch - &glibc-fhs-patch-size;: @@ -135,13 +136,13 @@ - Sysvinit Consolidated Patch - &sysvinit-consolidated-patch-size;: + SysVinit Consolidated Patch - &sysvinit-consolidated-patch-size;: Download: MD5 sum: &sysvinit-consolidated-patch-md5; - + The Glibc documentation recommends building Glibc in a dedicated build directory: @@ -356,8 +356,7 @@ install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service -mkdir -pv /usr/lib/locale -localedef -i C -f UTF-8 C.UTF-8 +localedef -i C -f UTF-8 C.UTF-8 localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8 localedef -i de_DE -f ISO-8859-1 de_DE localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro diff --git a/chapter08/grub.xml b/chapter08/grub.xml index 13c39b699..e82823453 100644 --- a/chapter08/grub.xml +++ b/chapter08/grub.xml @@ -121,7 +121,7 @@ mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions Making your LFS system bootable with GRUB will be discussed in - . + 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/readline.xml b/chapter08/readline.xml index 1fb7474c1..d1c385bbc 100644 --- a/chapter08/readline.xml +++ b/chapter08/readline.xml @@ -49,6 +49,13 @@ sed -i '/MV.*old/d' Makefile.in sed -i '/{OLDSUFF}/c:' support/shlib-install + Prevent hard coding library search paths (rpath) into + the shared libraries. This package does not need rpath for an + installation into the standard location, and rpath may sometimes cause + unwanted effects or even security issues: + +sed -i 's/-Wl,-rpath,[^ ]*//' support/shobj-conf + Now fix a problem identified upstream: patch -Np1 -i ../&readline-fixes-patch; diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml index 315e3cc5e..de6b05f75 100644 --- a/chapter08/shadow.xml +++ b/chapter08/shadow.xml @@ -242,7 +242,8 @@ useradd -D --gid 999 unknown GID 999, even though the account has been created correctly. That is why we created the group users - with this group ID in . + with this group ID in + 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 e5bcb2981..0e6762245 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -48,40 +48,31 @@ sed -i -e 's/GROUP="render"/GROUP="video"/' \ -e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in - - Now fix a security vulnerability in the DNSSEC verification of - systemd-resolved and a bug breaking running - systemd-analyze verify on an instantiated systemd - unit: - -patch -Np1 -i ../&systemd-upstream-patch; - Prepare systemd for compilation: mkdir -p build cd build CFLAGS+=" -Wno-format-overflow" \ -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: @@ -96,14 +87,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 @@ -113,14 +104,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 @@ -130,7 +121,7 @@ meson setup \ - -Dsysusers=false + -D sysusers=false This switch prevents installation of systemd services responsible for setting up the @@ -142,7 +133,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. @@ -150,8 +141,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. @@ -159,7 +150,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 @@ -168,7 +159,7 @@ meson setup \ - -Dmode=release + -D mode=release Disable some features considered experimental by upstream. @@ -176,7 +167,7 @@ meson setup \ - -Dpamconfdir=no + -D pamconfdir=no Prevent the installation of a PAM configuration file not functional on LFS. @@ -184,7 +175,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 @@ -193,7 +184,7 @@ meson setup \ - -Dnobody-group=nogroup + -D nobody-group=nogroup Tell the package the group name with GID 65534 is nogroup. @@ -201,7 +192,7 @@ meson setup \ - -Dsysupdate=disabled + -D sysupdate=disabled Do not install the systemd-sysupdate tool. It's designed for automatically upgrading binary distros, @@ -212,7 +203,7 @@ meson setup \ - -Dukify=disabled + -D ukify=disabled Do not install the systemd-ukify script. At runtime this script requires the @@ -233,7 +224,7 @@ meson setup \ echo 'NAME="Linux From Scratch"' > /etc/os-release ninja test - One test named systemd:core / test-namespace is known to fail in the LFS chroot environment. Some other tests may @@ -247,7 +238,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/sysvinit.xml b/chapter08/sysvinit.xml index 97bb9113c..20f6cf74a 100644 --- a/chapter08/sysvinit.xml +++ b/chapter08/sysvinit.xml @@ -14,16 +14,16 @@
&sysvinit-url;
- Sysvinit-&sysvinit-version; + SysVinit-&sysvinit-version; - Sysvinit + SysVinit - <para>The Sysvinit package contains programs for controlling the startup, + <para>The SysVinit package contains programs for controlling the startup, running, and shutdown of the system.</para> <segmentedlist> @@ -39,7 +39,7 @@ </sect2> <sect2 role="installation"> - <title>Installation of Sysvinit + Installation of SysVinit -General setup ---> +General setup ---> [ ] Compile the kernel with warnings as errors [WERROR] CPU/Task time and stats accounting ---> [*] Pressure stall information tracking [PSI] @@ -11,7 +11,10 @@ ... [PSI_DEFAULT_DISABLED] < > Enable kernel headers through /sys/kernel/kheaders.tar.xz [IKHEADERS] [*] Control Group support ---> [CGROUPS] - [*] Memory controller [MEMCG] + [*] Memory controller [MEMCG] + [ /*] CPU controller ---> [CGROUP_SCHED] + # This may cause some systemd features malfunction: + [ ] Group scheduling for SCHED_RR/FIFO [RT_GROUP_SCHED] [ ] Configure standard kernel features (expert users) ---> [EXPERT] Kernel type and options ---> diff --git a/lfs-latest-git.php b/lfs-latest-git.php index 52eb501b4..ce76e970e 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -135,12 +135,13 @@ 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"; 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/"; @@ -148,6 +149,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"; @@ -266,11 +268,11 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd"); if ( $package == "jinja" ) return find_max( $lines, "/Jinja/", "/^.*Jinja2 ([\d\.]+).*$/" ); - if ( $package == "lz" ) - return find_max( $lines, "/name.:/", '/^.*LZ4 v([\d\.]+)".*$/' ); + if ( $package == "lz4" ) + 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) .*$/" ); @@ -347,6 +349,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; diff --git a/packages.ent b/packages.ent index e78e6387c..26f0f3fb3 100644 --- a/packages.ent +++ b/packages.ent @@ -38,11 +38,11 @@ - - - + + + - + @@ -57,10 +57,10 @@ - - + + - + @@ -140,10 +140,10 @@ - - + + - + @@ -182,10 +182,10 @@ - - + + - + @@ -218,10 +218,10 @@ - - + + - + @@ -230,17 +230,17 @@ - + - - + + - + @@ -255,10 +255,10 @@ - - + + - + @@ -317,10 +317,10 @@ - + - + @@ -341,10 +341,10 @@ - - + + - + @@ -373,15 +373,15 @@ - - + + - + - + @@ -389,10 +389,10 @@ - - + + - + @@ -430,30 +430,31 @@ - - + + - + - + - - - + + + - - + + - + @@ -486,10 +487,10 @@ - - + + - + @@ -502,10 +503,10 @@ - - + + - + @@ -536,18 +537,18 @@ - + - + - - + + - + @@ -563,13 +564,13 @@ - - + + - + - + @@ -603,19 +604,19 @@ - + - + - + - - + + @@ -636,51 +637,51 @@ - - + + - + - - + + - + - - - - + + + + - + - + - + - - + + - + - - + + - + @@ -733,20 +734,20 @@ - - + + - + - + - + - + @@ -781,10 +782,10 @@ - - - - + + + + diff --git a/patches.ent b/patches.ent index 426cc36df..3dc18d14c 100644 --- a/patches.ent +++ b/patches.ent @@ -21,11 +21,11 @@ - + @@ -37,7 +37,8 @@ - + diff --git a/prologue/why.xml b/prologue/why.xml index e8fac1af4..287a61635 100644 --- a/prologue/why.xml +++ b/prologue/why.xml @@ -558,12 +558,12 @@ This package provides an init program and several additional boot and system control capabilities as an - alternative to Sysvinit. It is used by many Linux distributions. + alternative to SysVinit. It is used by many Linux distributions.
- Sysvinit + SysVinit This package provides the init program, the parent of all the other processes on a running Linux