From fb66c4c583c51e75d917dbaab1a3ccde2b983a5e Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 5 Sep 2022 09:52:05 +0800 Subject: [PATCH 01/49] some http -> https changes --- appendices/acknowledgments.xml | 4 ++-- appendices/dependencies.xml | 6 +++--- chapter02/creatingfilesystem.xml | 2 +- chapter03/introduction.xml | 2 +- chapter07/createfiles.xml | 2 +- chapter08/pkgmgt.xml | 4 ++-- chapter09/consoled.xml | 2 +- chapter09/udev.xml | 2 +- chapter09/usage.xml | 2 +- chapter11/whatnow.xml | 4 ++-- packages.ent | 4 ++-- prologue/prerequisites.xml | 4 ++-- prologue/standards.xml | 6 +++--- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/appendices/acknowledgments.xml b/appendices/acknowledgments.xml index 53c384dd7..3db526641 100644 --- a/appendices/acknowledgments.xml +++ b/appendices/acknowledgments.xml @@ -247,12 +247,12 @@ Shizunet Co.,Ltd. <info@shizu-net.jp> – lfs.mirror.shizu-net.jp mirror - + Australian Mirrors diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 3ad5c0097..b59c93f93 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -948,7 +948,7 @@ &external; - GNAT + GNAT and ISL @@ -2813,7 +2813,7 @@ Linux-PAM, lxml, - LZ4, + LZ4, make-ca, p11-kit, PCRE2, @@ -3266,7 +3266,7 @@ &external; - LZ4 + LZ4 diff --git a/chapter02/creatingfilesystem.xml b/chapter02/creatingfilesystem.xml index 12529ce8c..1996f1cee 100644 --- a/chapter02/creatingfilesystem.xml +++ b/chapter02/creatingfilesystem.xml @@ -44,7 +44,7 @@ Other file systems, including FAT32, NTFS, ReiserFS, JFS, and XFS are useful for specialized purposes. More information about these file systems can be found at . + url="https://en.wikipedia.org/wiki/Comparison_of_file_systems"/>. LFS assumes that the root file system (/) is of type ext4. To create an ext4 file system on the LFS diff --git a/chapter03/introduction.xml b/chapter03/introduction.xml index 76fd5ee12..1b658e89d 100644 --- a/chapter03/introduction.xml +++ b/chapter03/introduction.xml @@ -31,7 +31,7 @@ Download locations may not always be accessible. If a download location has changed since this book was published, Google () provides a useful search engine for + url="https://www.google.com/"/>) provides a useful search engine for most packages. If this search is unsuccessful, try one of the alternative means of downloading at . diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index eda30ed2e..314540e7e 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -162,7 +162,7 @@ EOF 9, and in part by common convention employed by a number of existing Linux distributions. In addition, some test suites rely on specific users or groups. The Linux Standard Base (LSB, available at ) only recommends that, + url="https://refspecs.linuxfoundation.org/lsb.shtml"/>) only recommends that, besides the group root with a Group ID (GID) of 0, a group bin with a GID of 1 be present. The GID of 5 is widely used for diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml index 27e9c9cda..b925a976f 100644 --- a/chapter08/pkgmgt.xml +++ b/chapter08/pkgmgt.xml @@ -283,7 +283,7 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install This approach is used by most of the package managers found in the commercial distributions. Examples of package managers that follow this approach are RPM (which, incidentally, is required by the Linux + url="https://refspecs.linuxfoundation.org/lsb.shtml">Linux Standard Base Specification), pkg-utils, Debian's apt, and Gentoo's Portage system. A hint describing how to adopt this style of package management for LFS systems is located at archives. This system purposely does not handle package dependencies as more complex package managers do. For details of Slackware package management, see . + url="https://www.slackbook.org/html/package-management.html"/>. diff --git a/chapter09/consoled.xml b/chapter09/consoled.xml index 3abf16e3c..c7e4ab9ad 100644 --- a/chapter09/consoled.xml +++ b/chapter09/consoled.xml @@ -23,7 +23,7 @@ /etc/vconsole.conf file for configuration information. Decide which keymap and screen font will be used. Various language-specific HOWTOs can also help with this, see . + url="https://tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. Examine the output of localectl list-keymaps for a list of valid console keymaps. Look in the /usr/share/consolefonts diff --git a/chapter09/udev.xml b/chapter09/udev.xml index a2ff35511..435255a19 100644 --- a/chapter09/udev.xml +++ b/chapter09/udev.xml @@ -325,7 +325,7 @@ The sysfs Filesystem - + @@ -85,7 +85,7 @@ The goal of The Linux Documentation Project (TLDP) is to collaborate on all of the issues of Linux documentation. The TLDP features a large collection of HOWTOs, guides, and man pages. It is located at - . + . diff --git a/packages.ent b/packages.ent index 5d8adcf7d..ee1381228 100644 --- a/packages.ent +++ b/packages.ent @@ -410,7 +410,7 @@ - + @@ -499,7 +499,7 @@ - + diff --git a/prologue/prerequisites.xml b/prologue/prerequisites.xml index 05701ffb2..65042e2a5 100644 --- a/prologue/prerequisites.xml +++ b/prologue/prerequisites.xml @@ -30,7 +30,7 @@ Software-Building-HOWTO - + This is a comprehensive guide to building and installing generic Unix software packages under Linux. Although it @@ -40,7 +40,7 @@ Beginner's Guide to Installing from Source - + This guide provides a good summary of basic skills and techniques needed to build software from source code. diff --git a/prologue/standards.xml b/prologue/standards.xml index 6000cb72b..7e40ab887 100644 --- a/prologue/standards.xml +++ b/prologue/standards.xml @@ -18,17 +18,17 @@ - + POSIX.1-2008. + url="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html"> Filesystem Hierarchy Standard (FHS) Version 3.0 - Linux + Linux Standard Base (LSB) Version 5.0 (2015) The LSB has four separate standards: Core, Desktop, From 696a7b4a834e93901dd1d0e7299eaeab87a4ead9 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 5 Sep 2022 10:04:33 +0800 Subject: [PATCH 02/49] whatnow: update online resources list for maintainance Bugtraq is dead since 2021, use oss-sec instead. For CERT, cert.org redirects to CMU and us-cert.gov redirects to US CISA (https://www.cisa.gov/uscert/). I'm not familiar with those so left those for a US citizen to add :). --- chapter11/whatnow.xml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/chapter11/whatnow.xml b/chapter11/whatnow.xml index 9bca885f1..999926289 100644 --- a/chapter11/whatnow.xml +++ b/chapter11/whatnow.xml @@ -27,26 +27,21 @@ Since an LFS system is compiled from source, it is up to you to keep abreast of such reports. There are several online resources that track such reports, some of which are shown below: - + - CERT (Computer - Emergency Response Team) + LFS Security Advisories - CERT has a mailing list that publishes security alerts concerning - various operating systems and applications. Subscription information is - available at . + This is a list of security vulnerabilities discovered in the + LFS book after it's published. - Bugtraq + Open Source Security Mailing List - Bugtraq is a full-disclosure computer security mailing list. It - publishes newly discovered security issues, and occasionally potential - fixes for them. Subscription information is available at . + This is a mailing list for discussion of security flaws, + concepts, and practices in the Open Source community. From 917868fc69f30b569aea433f547d9d4cc89b6c52 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 7 Sep 2022 14:59:45 -0500 Subject: [PATCH 03/49] Package Updates. Update to shadow-4.12.3. Update to Python3-3.10.7. Update to linux-5.19.7. Update to less-608. Update to grep-3.8. --- chapter01/changelog.xml | 26 ++++++ chapter01/whatsnew.xml | 178 ++++++++++++++++++---------------------- packages.ent | 34 ++++---- 3 files changed, 125 insertions(+), 113 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 238b5bee7..c57aae5c1 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,32 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2022-09-07 + + + [bdubbs] - Update to shadow-4.12.3. Fixes + #5101. + + + [bdubbs] - Update to Python3-3.10.7. Fixes + #5109. + + + [bdubbs] - Update to linux-5.19.7. Fixes + #5099. + + + [bdubbs] - Update to less-608. Fixes + #5104. + + + [bdubbs] - Update to grep-3.8. Fixes + #5105. + + + + 2022-09-01 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 1ee469b77..f58e20ca3 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -41,12 +41,12 @@ - + + @@ -56,33 +56,33 @@ - + - + - + - + - + @@ -92,78 +92,78 @@ - + - + - + - + + + - - IPRoute2-&iproute2-version; - - - Jinja2-&jinja2-version; - - - Kbd-&kbd-version; - - - Kmod-&kmod-version; - + + + + + Less-&less-version; + - + + - + + Linux-&linux-version; @@ -173,18 +173,18 @@ - + - + + @@ -194,27 +194,27 @@ - + + - + - + + Python-&python-version; @@ -230,12 +230,12 @@ - + + @@ -245,24 +245,24 @@ - + + + - + + @@ -280,33 +280,19 @@ Added: - - Wheel-&wheel-version; - - - - &zstd-upstream-fixes-patch; - + --> Removed: - + diff --git a/packages.ent b/packages.ent index ee1381228..ce13ec456 100644 --- a/packages.ent +++ b/packages.ent @@ -281,10 +281,10 @@ - - + + - + @@ -374,10 +374,10 @@ - - + + - + @@ -424,12 +424,12 @@ - + - + - + - + - + - + - - + + @@ -621,10 +621,10 @@ - - + + - + From 0611f706d5cf2c5f18e18d51f2866956870b131a Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Fri, 9 Sep 2022 16:15:06 +0200 Subject: [PATCH 04/49] Use default-pie and default-ssp flags in gcc Committing only the commands for now, so that others can test the build. TODO: - add command explanations - add changelog - comment on failing tests in binutils and gcc --- chapter05/gcc-pass1.xml | 2 ++ chapter06/gcc-pass2.xml | 2 ++ chapter08/gcc.xml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 34ad1b15e..0b7f17913 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -87,6 +87,8 @@ cd build --with-sysroot=$LFS \ --with-newlib \ --without-headers \ + --enable-default-pie \ + --enable-default-ssp \ --disable-nls \ --disable-shared \ --disable-multilib \ diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml index aab95d58f..6774134a2 100644 --- a/chapter06/gcc-pass2.xml +++ b/chapter06/gcc-pass2.xml @@ -90,6 +90,8 @@ cd build LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \ --prefix=/usr \ --with-build-sysroot=$LFS \ + --enable-default-pie \ + --enable-default-ssp \ --disable-nls \ --disable-multilib \ --disable-decimal-float \ diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 9c7c0065a..fd6e5ae3c 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -74,6 +74,8 @@ cd build ../configure --prefix=/usr \ LD=ld \ --enable-languages=c,c++ \ + --enable-default-pie \ + --enable-default-ssp \ --disable-multilib \ --disable-bootstrap \ --with-system-zlib From 1bade3f439265d1c964701316922ab5cbfed93c8 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sat, 10 Sep 2022 13:41:38 +0200 Subject: [PATCH 05/49] Document the --enable-default-pie/ssp options Also document test failures in gcc chapter 8 --- chapter05/gcc-pass1.xml | 14 ++++++++++++++ chapter08/gcc.xml | 21 +++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 0b7f17913..2c8fc4c31 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -134,6 +134,20 @@ cd build + + --enable-default-pie and + --enable-default-ssp + + Those switches allow GCC to compile programs with + some hardening security features (more information on those in + the in chapter 8). 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. + + + + --disable-shared diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index fd6e5ae3c..171808df2 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -106,6 +106,23 @@ cd build + + + PIE (position independent executable) is a technique to produce + binary programs that can be loaded anywhere in memory. Together + with a feature named ASLR (Address Space Layout Randomization), + this allows programs to never have the same memory layout, + thus defeating attacks based on reproducible memory patterns. + + + SSP (Stack Smashing Protection) is a technique to ensure + that the parameter stack is not corrupted. Stack corruption can + for example alter the return address of a subroutine, + which would allow transferring control to an attacker program instead + of the original one. + + + Compile the package: make @@ -139,6 +156,10 @@ su tester -c "PATH=$PATH make -k check" url="&test-results;"/> and . + In gcc, eleven tests, in the i386 test suite are known to FAIL. + It's because the test files do not account for the + --enable-default-pie option. + In g++, four tests related to PR100400 are known to be reported as both XPASS and FAIL. It's because the test file for this known issue is not well written. From 8d3b2541dab38afe4dfc9cf0adde162070571c56 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sat, 10 Sep 2022 14:01:42 +0200 Subject: [PATCH 06/49] gcc-pass1: fix bold "and" in command explanation --- chapter05/gcc-pass1.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 2c8fc4c31..23707f658 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -135,8 +135,8 @@ cd build - --enable-default-pie and - --enable-default-ssp + --enable-default-pie and + --enable-default-ssp Those switches allow GCC to compile programs with some hardening security features (more information on those in From e502de1ab04336007ecfff9e534abdaa9b0344d9 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 11 Sep 2022 11:35:06 +0800 Subject: [PATCH 07/49] gcc: some reword of PIE/SSP/ASLR note Expand tabs to 8 spaces like everywhere else in the book. Explain that shared libraries are already covered by ASLR, PIE expands the ASLR to cover the exetutables. In 2022, stack smashing attackings are mostly constructing a sequence of faked returning addresses to exectute a series of function already existing in the programs or libraries itself (ret2lib). Returning into the code injected by the attacker is almost impossible because on i686 (with a PAE/NX enabled kernel) or x86_64, running injected code needs W/X mappings and those are very rare these days. --- chapter05/gcc-pass1.xml | 10 +++++----- chapter08/gcc.xml | 17 ++++++++++------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 23707f658..2aace5d2b 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -139,11 +139,11 @@ cd build --enable-default-ssp Those switches allow GCC to compile programs with - some hardening security features (more information on those in - the in chapter 8). 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. + some hardening security features (more information on those in + the in chapter 8) by default. The + 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. diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 171808df2..fe8e767d1 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -108,18 +108,21 @@ cd build - PIE (position independent executable) is a technique to produce - binary programs that can be loaded anywhere in memory. Together - with a feature named ASLR (Address Space Layout Randomization), - this allows programs to never have the same memory layout, - thus defeating attacks based on reproducible memory patterns. + PIE (position-independent executable) is a technique to produce + binary programs that can be loaded anywhere in memory. Without PIE, + the security feature named ASLR (Address Space Layout Randomization) + can be applied for the shared libraries, but not the exectutable + itself. Enabling PIE allows ASLR for the executables in addition to + the shared libraries, and mitigates some attacks based on fixed + addresses of sensitive code or data in the executables. SSP (Stack Smashing Protection) is a technique to ensure that the parameter stack is not corrupted. Stack corruption can for example alter the return address of a subroutine, - which would allow transferring control to an attacker program instead - of the original one. + which would allow transferring control to some dangerous code + (existing in the program or shared libraries, or injected by the + attacker somehow) instead of the original one. From a710d35e1f64684e29b1a1d627be64f495481e13 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 11 Sep 2022 12:01:31 +0800 Subject: [PATCH 08/49] Revert "linux kernel: disable CONFIG_USERFAULTFD to avoid CVE-2022-2590 for now" This reverts commit 098f4de3369ae0fc7d50fc6060b059eb5627de4e. CVE-2022-2590 is fixed in Linux >= 5.19.6. --- chapter10/kernel.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 157fb9f64..9042f570b 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -159,8 +159,6 @@ File systems ---> Processor type and features ---> [*] Support x2apic [CONFIG_X86_X2APIC] -Memory Management options ---> - [ ] Enable userfaultfd() system call [CONFIG_USERFAULTFD] Device Drivers ---> [*] PCI Support ---> [CONFIG_PCI] [*] Message Signaled Interrupts (MSI and MSI-X) [CONFIG_PCI_MSI] @@ -254,16 +252,6 @@ Device Drivers ---> - - Enable userfaultfd() system call - - If this option is enabled, a security vulnerability not - resolved in Linux-&linux-version; yet will be exploitable. - Disable this option to avoid the vulnerability. This system call - is not used by any part of LFS or BLFS. - - - Alternatively, make oldconfig may be more From e5aa02fe17dcce0f57a59ab1384973be8c71f2fd Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 11 Sep 2022 12:05:21 +0800 Subject: [PATCH 09/49] kernel: enable ASLR and SSP It does not make too much sense to protect the userspace with PIE+ASLR and SSP but leave the kernel alone... --- chapter10/kernel.xml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 9042f570b..76a6f86ca 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -105,9 +105,15 @@ Be sure to enable/disable/set the following features or the system might not work correctly or boot at all: - General setup --> + Processor type and features ---> + [*] Build a relocatable kernel [CONFIG_RELOCATABLE] + [*] Randomize the address of the kernel image (KASLR) [CONFIG_RANDOMIZE_BASE] +General setup ---> [ ] Compile the kernel with warnings as errors [CONFIG_WERROR] < > Enable kernel headers through /sys/kernel/kheaders.tar.xz [CONFIG_IKHEADERS] +General architecture-dependent options ---> + [*] Stack Protector buffer overflow detection [CONFIG_STACKPROTECTOR] + [*] Strong Stack Protector [CONFIG_STACKPROTECTOR_STRONG] Device Drivers ---> Graphics support ---> Frame buffer Devices ---> @@ -117,7 +123,10 @@ Device Drivers ---> [*] Maintain a devtmpfs filesystem to mount at /dev [CONFIG_DEVTMPFS] [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs [CONFIG_DEVTMPFS_MOUNT] - General setup --> + Processor type and features ---> + [*] Build a relocatable kernel [CONFIG_RELOCATABLE] + [*] Randomize the address of the kernel image (KASLR) [CONFIG_RANDOMIZE_BASE] +General setup ---> [ ] Compile the kernel with warnings as errors [CONFIG_WERROR] [ ] Auditing Support [CONFIG_AUDIT] CPU/Task time and stats accounting ---> @@ -130,6 +139,8 @@ Device Drivers ---> [*] open by fhandle syscalls [CONFIG_FHANDLE] General architecture-dependent options ---> [*] Enable seccomp to safely compute untrusted bytecode [CONFIG_SECCOMP] + [*] Stack Protector buffer overflow detection [CONFIG_STACKPROTECTOR] + [*] Strong Stack Protector [CONFIG_STACKPROTECTOR_STRONG] Networking support ---> Networking options ---> <*> The IPv6 protocol [CONFIG_IPV6] @@ -188,6 +199,14 @@ Device Drivers ---> The rationale for the above configuration items: + + Randomize the address of the kernel image (KASLR) + + Enable ASLR for kernel image, to mitigate some attacks based + on fixed addresses of sensitive data or code in the kernel. + + + @@ -213,6 +232,16 @@ Device Drivers ---> + + Strong Stack Protector + + Enable SSP for the kernel. We've enabled it for the entire + userspace with --enable-default-ssp + configuring GCC, but the kernel does not use GCC default setting + for SSP. We enable it explicitly here. + + + Support for uevent helper From c10a327376830278cc8cc2bf642c588f9273a065 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 11 Sep 2022 13:55:57 +0800 Subject: [PATCH 10/49] gcc: fix link to PIE & SSP note DocBook does not handle xref to note properly (#pie-ssp-info not generated). --- chapter08/gcc.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index fe8e767d1..93961626c 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -106,7 +106,8 @@ cd build - + + PIE (position-independent executable) is a technique to produce binary programs that can be loaded anywhere in memory. Without PIE, From 63c2e8bb66fd85aa7921dc64e1ac3612d318e1c5 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 11 Sep 2022 10:54:08 +0200 Subject: [PATCH 11/49] Comment on binutils test failures with pie/ssp --- chapter08/binutils.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml index d9855e735..96b820277 100644 --- a/chapter08/binutils.xml +++ b/chapter08/binutils.xml @@ -160,6 +160,10 @@ cd build make -k check +Twelve tests fail in the gold testsuite when the + and + options are passed to GCC. There + is also a known failure in the as tests. + + 2022-09-10 + + + [pierre] - Add and + to GCC build. Rationale + and some reports at + #5107. + + + + 2022-09-07 - [bdubbs] - Update to shadow-4.12.3. Fixes - #5101. + [bdubbs] - Update to shadow-4.12.3. Fixes + #5101. - [bdubbs] - Update to Python3-3.10.7. Fixes - #5109. + [bdubbs] - Update to Python3-3.10.7. Fixes + #5109. - [bdubbs] - Update to linux-5.19.7. Fixes - #5099. + [bdubbs] - Update to linux-5.19.7. Fixes + #5099. - [bdubbs] - Update to less-608. Fixes - #5104. + [bdubbs] - Update to less-608. Fixes + #5104. - [bdubbs] - Update to grep-3.8. Fixes - #5105. + [bdubbs] - Update to grep-3.8. Fixes + #5105. From c37e846f4b5db3ae2037dee054b3923192a50a31 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 11 Sep 2022 18:42:26 +0200 Subject: [PATCH 13/49] Replace tabs with spaces --- bootscripts/lfs/sysconfig/createfiles | 28 +- bootscripts/lfs/sysconfig/modules | 2 +- chapter03/packages.xml | 6 +- chapter04/settingenviron.xml | 2 +- chapter08/gettext.xml | 2 +- chapter08/meson.xml | 2 +- chapter08/readline.xml | 6 +- chapter08/vim.xml | 5 +- git-version.sh | 46 ++-- packages.ent | 6 +- part3intro/generalinstructions.xml | 4 +- udev-lfs/ChangeLog | 336 +++++++++++------------ udev-lfs/contrib/debian/write_cd_aliases | 2 +- 13 files changed, 224 insertions(+), 223 deletions(-) diff --git a/bootscripts/lfs/sysconfig/createfiles b/bootscripts/lfs/sysconfig/createfiles index 3d8587439..378fa3ee7 100644 --- a/bootscripts/lfs/sysconfig/createfiles +++ b/bootscripts/lfs/sysconfig/createfiles @@ -8,23 +8,23 @@ # Version : 00.00 # # Notes : The syntax of this file is as follows: -# if type is equal to "file" or "dir" -# -# if type is equal to "dev" -# +# if type is equal to "file" or "dir" +# +# if type is equal to "dev" +# # # -# is the name of the file which is to be created -# is either file, dir, or dev. -# file creates a new file -# dir creates a new directory -# dev creates a new device -# is either block, char or pipe -# block creates a block device -# char creates a character deivce -# pipe creates a pipe, this will ignore the and +# is the name of the file which is to be created +# is either file, dir, or dev. +# file creates a new file +# dir creates a new directory +# dev creates a new device +# is either block, char or pipe +# block creates a block device +# char creates a character deivce +# pipe creates a pipe, this will ignore the and # fields -# and are the major and minor numbers used for +# and are the major and minor numbers used for # the device. ######################################################################## diff --git a/bootscripts/lfs/sysconfig/modules b/bootscripts/lfs/sysconfig/modules index 0fce3f31f..c594e24a2 100644 --- a/bootscripts/lfs/sysconfig/modules +++ b/bootscripts/lfs/sysconfig/modules @@ -8,7 +8,7 @@ # Version : 00.00 # # Notes : The syntax of this file is as follows: -# [ ...] +# [ ...] # # Each module should be on its own line, and any options that you want # passed to the module should follow it. The line deliminator is either diff --git a/chapter03/packages.xml b/chapter03/packages.xml index aa927e60a..244c1ed2c 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -20,9 +20,9 @@ reachable, you should read the security advisories first to figure out if a newer version (with the vulnerability fixed) should be used. If not, try to download the removed package from a mirror. Although it's - possible to download an old release from a mirror even if this release - has been removed because of a vulnerability, it's not recommended to - use a release known to be vulnerable for building your system. + possible to download an old release from a mirror even if this release + has been removed because of a vulnerability, it's not recommended to + use a release known to be vulnerable for building your system. Download or otherwise obtain the following packages: diff --git a/chapter04/settingenviron.xml b/chapter04/settingenviron.xml index b0c3441e5..bac551e19 100644 --- a/chapter04/settingenviron.xml +++ b/chapter04/settingenviron.xml @@ -186,7 +186,7 @@ EOF After use of the lfs user is finished at the beginning of , you can restore - /etc/bash.bashrc (if desired). + /etc/bash.bashrc (if desired). Note that the LFS Bash package we will build in is not configured to load or execute diff --git a/chapter08/gettext.xml b/chapter08/gettext.xml index cafe26182..08b960d44 100644 --- a/chapter08/gettext.xml +++ b/chapter08/gettext.xml @@ -62,7 +62,7 @@ Since bison is not yet installed in /usr, configure hardcodes the directory containing translations for the bison program (the - "locale" directory) as /tools/share/locale. Passing this variable + "locale" directory) as /tools/share/locale. Passing this variable to make allows overriding the choice made by configure. diff --git a/chapter08/meson.xml b/chapter08/meson.xml index d2132b5a1..6e4b006ad 100644 --- a/chapter08/meson.xml +++ b/chapter08/meson.xml @@ -108,7 +108,7 @@ install -vDm644 data/shell-completions/zsh/_meson /usr/share/zsh/site-functions/ - meson + meson A high productivity build system diff --git a/chapter08/readline.xml b/chapter08/readline.xml index 72608ac94..889314b14 100644 --- a/chapter08/readline.xml +++ b/chapter08/readline.xml @@ -63,9 +63,9 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install --with-curses This option tells Readline that it can find the termcap - library functions in the curses library, rather than a separate - termcap library. It allows generating a correct - readline.pc file. + library functions in the curses library, rather than a separate + termcap library. It allows generating a correct + readline.pc file. diff --git a/chapter08/vim.xml b/chapter08/vim.xml index 11b5c2565..2df2038dd 100644 --- a/chapter08/vim.xml +++ b/chapter08/vim.xml @@ -170,8 +170,9 @@ EOF To install spell files for your preferred language, download the *.spl and optionally, the *.sug files for your language and character encoding from and save them to - /usr/share/&vim-docdir;/spell/. + url="https://github.com/vim/vim/tree/master/runtime/spell/"/> and save + them to + /usr/share/&vim-docdir;/spell/. To use these spell files, some configuration in /etc/vimrc is needed, e.g.: diff --git a/git-version.sh b/git-version.sh index 7e0b3b4df..a00deb6d2 100755 --- a/git-version.sh +++ b/git-version.sh @@ -1,31 +1,31 @@ #!/bin/sh if [ "$1" = sysv ]; then - SYSV="INCLUDE" - SYSTEMD="IGNORE " + SYSV="INCLUDE" + SYSTEMD="IGNORE " elif [ "$1" = systemd ]; then - SYSV="IGNORE " - SYSTEMD="INCLUDE" + SYSV="IGNORE " + SYSTEMD="INCLUDE" else - echo You must provide either \"sysv\" or \"systemd\" as argument - exit 1 + echo You must provide either \"sysv\" or \"systemd\" as argument + exit 1 fi echo "" > conditional.ent echo "" >> conditional.ent if ! git status > /dev/null; then - # Either it's not a git repository, or git is unavaliable. - # Just workaround. - echo " version.ent - echo "" >> version.ent - echo "]]>" >> version.ent - echo "> version.ent - echo "" >> version.ent - echo "]]>" >> version.ent - echo "" >> version.ent - echo "" >> version.ent - exit 0 + # Either it's not a git repository, or git is unavaliable. + # Just workaround. + echo " version.ent + echo "" >> version.ent + echo "]]>" >> version.ent + echo "> version.ent + echo "" >> version.ent + echo "]]>" >> version.ent + echo "" >> version.ent + echo "" >> version.ent + exit 0 fi export LC_ALL=en_US.utf8 @@ -39,10 +39,10 @@ month_digit=$(date --date "$commit_date" "+%m") day=$(date --date "$commit_date" "+%d" | sed 's/^0//') case $day in - "1" | "21" | "31" ) suffix="st";; - "2" | "22" ) suffix="nd";; - "3" | "23" ) suffix="rd";; - * ) suffix="th";; + "1" | "21" | "31" ) suffix="st";; + "2" | "22" ) suffix="nd";; + "3" | "23" ) suffix="rd";; + * ) suffix="th";; esac full_date="$month $day$suffix, $year" @@ -53,8 +53,8 @@ version="$rev" versiond="$rev-systemd" if [ "$(git diff HEAD | wc -l)" != "0" ]; then - version="$version+" - versiond="$versiond+" + version="$version+" + versiond="$versiond+" fi echo " version.ent diff --git a/packages.ent b/packages.ent index ce13ec456..7f1f5bd3d 100644 --- a/packages.ent +++ b/packages.ent @@ -207,10 +207,10 @@ - - + + - + diff --git a/part3intro/generalinstructions.xml b/part3intro/generalinstructions.xml index d8e280e0d..ac2bcc675 100644 --- a/part3intro/generalinstructions.xml +++ b/part3intro/generalinstructions.xml @@ -82,9 +82,9 @@ Place all the sources and patches in a directory that will be accessible from the chroot environment such as - /mnt/lfs/sources/. + /mnt/lfs/tools/. --> Change to the sources directory. diff --git a/udev-lfs/ChangeLog b/udev-lfs/ChangeLog index 897acee15..560346143 100644 --- a/udev-lfs/ChangeLog +++ b/udev-lfs/ChangeLog @@ -8,257 +8,257 @@ * Makefile.lfs: Adjust warning flags. Adjust linking rules to allow build with util-linux in LFS's /tools directory. -2010-01-26 Matt Burgess - * 55-lfs.rules: Remove lots of rules that have been merged upstream. - * 61-cdrom.rules: Remove as upstream has a replacement. - * doc/*: Cleanup and rewrite now that the rules are much simpler. +2010-01-26 Matt Burgess + * 55-lfs.rules: Remove lots of rules that have been merged upstream. + * 61-cdrom.rules: Remove as upstream has a replacement. + * doc/*: Cleanup and rewrite now that the rules are much simpler. -2009-09-25 Bryan Kadzban - * 55-lfs.rules: Make the RTC rule (which runs setclock) work for people - that don't use the RTC-class driver -- add another copy of the rule, - using KERNEL=="rtc" instead of SUBSYSTEM=="rtc". Also move the ACTION - match before the assignment to MODE. +2009-09-25 Bryan Kadzban + * 55-lfs.rules: Make the RTC rule (which runs setclock) work for people + that don't use the RTC-class driver -- add another copy of the rule, + using KERNEL=="rtc" instead of SUBSYSTEM=="rtc". Also move the ACTION + match before the assignment to MODE. -2009-05-23 Bruce Dubbs - * 55-lfs.rules: Set the rtc by udev upon boot. Removed aio device from - udev configuration so defaults are used. +2009-05-23 Bruce Dubbs + * 55-lfs.rules: Set the rtc by udev upon boot. Removed aio device from + udev configuration so defaults are used. -2009-05-16 Bryan Kadzban - * 55-lfs.rules: Adopt udev permissions for random, urandom, kmsg, and - input devices (including psaux, which probably doesn't exist anymore - anyway). +2009-05-16 Bryan Kadzban + * 55-lfs.rules: Adopt udev permissions for random, urandom, kmsg, and + input devices (including psaux, which probably doesn't exist anymore + anyway). -2009-05-16 Matt Burgess - * 55-lfs.rules: Remove the block rule as it was only setting - permissions that Udev will set by default - * 55-lfs.rules: Remove the rfcomm rule as the group it sets is already - included in upstream's rule - * 55-lfs-rules: Remove the tape rules as the group they sets is already - included in upstream's rules +2009-05-16 Matt Burgess + * 55-lfs.rules: Remove the block rule as it was only setting + permissions that Udev will set by default + * 55-lfs.rules: Remove the rfcomm rule as the group it sets is already + included in upstream's rule + * 55-lfs-rules: Remove the tape rules as the group they sets is already + included in upstream's rules -2009-03-15 Bryan Kadzban - * 55-lfs.rules: Remove the ISDN-handling rules (replaced with upstream's - version, which has a better match via SUBSYSTEM). - * 55-lfs.rules: Replace "uucp" with "dialout" now that udev has decided - to standardize on a Debian-like setup (uucp is for UUCP daemons to use - for privilege separation; dialout is for users and devices). +2009-03-15 Bryan Kadzban + * 55-lfs.rules: Remove the ISDN-handling rules (replaced with upstream's + version, which has a better match via SUBSYSTEM). + * 55-lfs.rules: Replace "uucp" with "dialout" now that udev has decided + to standardize on a Debian-like setup (uucp is for UUCP daemons to use + for privilege separation; dialout is for users and devices). 2008-12-07 Bruce Dubbs - * 55-lfs.rules: Change one line to use continuation so it does - not overflow the book's width. + * 55-lfs.rules: Change one line to use continuation so it does + not overflow the book's width. 2008-12-07 Bryan Kadzban - * 55-lfs.rules: Remove several rules that are either provided by upstream, - or that don't have any effect (there is no /dev/js or /dev/djs according - to devices.txt). - * 55-lfs.rules, 61-cdrom.rules: Replace ACTION=="add" with "add|change" - everywhere, per upstream's general request. + * 55-lfs.rules: Remove several rules that are either provided by upstream, + or that don't have any effect (there is no /dev/js or /dev/djs according + to devices.txt). + * 55-lfs.rules, 61-cdrom.rules: Replace ACTION=="add" with "add|change" + everywhere, per upstream's general request. 2008-11-11 Bryan Kadzban - * 55-lfs.rules, 61-cdrom.rules: Fix comments to use the right rule - numbers. Thanks to Trent Shea for the fix. Closes #2278. + * 55-lfs.rules, 61-cdrom.rules: Fix comments to use the right rule + numbers. Thanks to Trent Shea for the fix. Closes #2278. 2008-10-15 DJ Lucas - * 55-lfs.rules: Override default perms on floppy disk devices provided - by 50-udev-default.rules. Thanks to Bruce Dubbs for the fix. Closes - LFS ticket #2076. + * 55-lfs.rules: Override default perms on floppy disk devices provided + by 50-udev-default.rules. Thanks to Bruce Dubbs for the fix. Closes + LFS ticket #2076. 2008-05-21 Bryan Kadzban - * 81-firmware.rules, doc/81-firmware.txt: Remove. This rule is - already handled by udev's 50-udev-default.rules file. The docs - can be added back later if needed. - * Makefile: Don't install the above deleted files. - * 55-lfs.rules: Remove the device-mapper rule, since the upstream - 50-udev-default.rules file handles it properly. + * 81-firmware.rules, doc/81-firmware.txt: Remove. This rule is + already handled by udev's 50-udev-default.rules file. The docs + can be added back later if needed. + * Makefile: Don't install the above deleted files. + * 55-lfs.rules: Remove the device-mapper rule, since the upstream + 50-udev-default.rules file handles it properly. 2008-04-02 Bryan Kadzban - * Makefile: Make the package DESTDIR-friendly by installing the docs - into a fixed $(PREFIX)/share/doc/udev-config directory, instead of - trying to figure out what version of udev was just installed. + * Makefile: Make the package DESTDIR-friendly by installing the docs + into a fixed $(PREFIX)/share/doc/udev-config directory, instead of + trying to figure out what version of udev was just installed. 2007-10-30 Bryan Kadzban - * 55-lfs.rules: Since the dialout group was renamed to uucp, delete - the rules that override upstream's assignment of the dialout group. - Replace "dialout" with "uucp" on the remaining rules. + * 55-lfs.rules: Since the dialout group was renamed to uucp, delete + the rules that override upstream's assignment of the dialout group. + Replace "dialout" with "uucp" on the remaining rules. 2007-10-29 Bryan Kadzban - * 51-lfs.rules: Move to 55-lfs.rules. - * doc/51-lfs.rules: Move to doc/55-lfs.rules. + * 51-lfs.rules: Move to 55-lfs.rules. + * doc/51-lfs.rules: Move to doc/55-lfs.rules. 2007-10-27 Bryan Kadzban - * 25-lfs.rules: Some rules in here are duplicates of rules from udev's - new 50-udev-defaults.rules file; remove them. Override permissions - where needed elsewhere (and document overrides in comments). - * 26-modprobe.rules: Provided by udev's 80-drivers.rules and built-in - modaliases for SCSI device-type modules in 2.6.22+ kernels; remove. + * 25-lfs.rules: Some rules in here are duplicates of rules from udev's + new 50-udev-defaults.rules file; remove them. Override permissions + where needed elsewhere (and document overrides in comments). + * 26-modprobe.rules: Provided by udev's 80-drivers.rules and built-in + modaliases for SCSI device-type modules in 2.6.22+ kernels; remove. - * 25-lfs.rules: Move to 51-lfs.rules. - * 27-firmware.rules: Move to 81-firmware.rules. - * 81-cdrom.rules: Move to 61-cdrom.rules. + * 25-lfs.rules: Move to 51-lfs.rules. + * 27-firmware.rules: Move to 81-firmware.rules. + * 81-cdrom.rules: Move to 61-cdrom.rules. - * doc/25-lfs.txt: Rename to 51-lfs.txt. - * doc/26-modprobe.txt: Rename to 80-drivers.txt, and modify to reflect - the upstream rules. - * doc/27-firmware.txt: Rename to 81-firmware.txt. - * doc/81-cdrom.txt: Rename to 61-cdrom.txt. + * doc/25-lfs.txt: Rename to 51-lfs.txt. + * doc/26-modprobe.txt: Rename to 80-drivers.txt, and modify to reflect + the upstream rules. + * doc/27-firmware.txt: Rename to 81-firmware.txt. + * doc/81-cdrom.txt: Rename to 61-cdrom.txt. - * Makefile: Use new filenames. + * Makefile: Use new filenames. 2007-07-31 Dan Nicholson - * 25-lfs.rules: Changed the usb_device rule tto create /dev/bus/usb - nodes if the usb_device in 2.6.22+ kernels. The rule was also changed - to only trigger on "add" events. This change is not backwards - compatible with older kernels. + * 25-lfs.rules: Changed the usb_device rule tto create /dev/bus/usb + nodes if the usb_device in 2.6.22+ kernels. The rule was also changed + to only trigger on "add" events. This change is not backwards + compatible with older kernels. 2007-06-12 Dan Nicholson - * 25-lfs.rules: Fix the CPUID nodes from cpu/%n/cpu to cpu/%n/cpuid, - which is what's expected in userspace apps such as x86info. + * 25-lfs.rules: Fix the CPUID nodes from cpu/%n/cpu to cpu/%n/cpuid, + which is what's expected in userspace apps such as x86info. 2007-06-08 Bryan Kadzban - * 25-lfs.rules: Add rules for DVB devices (create nodes in /dev/dvb/) - and floppies (create extra nodes based on CMOS type), copied from - the SuSE rules file. Thanks to Alexander Patrakov for the bugreport. + * 25-lfs.rules: Add rules for DVB devices (create nodes in /dev/dvb/) + and floppies (create extra nodes based on CMOS type), copied from + the SuSE rules file. Thanks to Alexander Patrakov for the bugreport. -2007-03-04 Matthew Burgess - * Makefile: Use `udevd --version' to work out what version of Udev is - installed (requires Udev >= 106) +2007-03-04 Matthew Burgess + * Makefile: Use `udevd --version' to work out what version of Udev is + installed (requires Udev >= 106) 2007-01-02 Bryan Kadzban - * 25-lfs.rules: Change CPU devices (cpu, msr, microcode) to be in - /dev/cpu/ and /dev/cpu/N/, to match Documentation/devices.txt. + * 25-lfs.rules: Change CPU devices (cpu, msr, microcode) to be in + /dev/cpu/ and /dev/cpu/N/, to match Documentation/devices.txt. 2006-10-21 Bryan Kadzban - * Makefile: Add a missing backslash in install-extra-doc. + * Makefile: Add a missing backslash in install-extra-doc. - * 05-udev-early.rules, 60-persistent-input.rules, - 60-persistent-storage.rules, 95-udev-late.rules: Remove. The book - will install these files from udev's etc/udev/rules.d directory - instead. - * Makefile: Don't install these rules files after all. Also, only - install corresponding docs if requested. + * 05-udev-early.rules, 60-persistent-input.rules, + 60-persistent-storage.rules, 95-udev-late.rules: Remove. The book + will install these files from udev's etc/udev/rules.d directory + instead. + * Makefile: Don't install these rules files after all. Also, only + install corresponding docs if requested. 2006-10-20 Bryan Kadzban - * Makefile: Added; contains targets to install rules and doc files. - From Dan Nicholson. + * Makefile: Added; contains targets to install rules and doc files. + From Dan Nicholson. 2006-10-14 Bryan Kadzban - * 05-udev-early.rules, 60-persistent-storage.rules: Sync up with - upstream sample rules files (from udev-102), except for one rule - which is more specific in our tarball and should probably be changed - upstream. - * doc/60-persistent-storage.txt: Modify to match the changes. Also - fix a couple typos. + * 05-udev-early.rules, 60-persistent-storage.rules: Sync up with + upstream sample rules files (from udev-102), except for one rule + which is more specific in our tarball and should probably be changed + upstream. + * doc/60-persistent-storage.txt: Modify to match the changes. Also + fix a couple typos. - * 25-lfs.rules: Remove duplicate rules (ttyS[0-9]* is also matched by - tty[BC...S...][0-9]*, and ttyUSB[0-9]* is in there twice). + * 25-lfs.rules: Remove duplicate rules (ttyS[0-9]* is also matched by + tty[BC...S...][0-9]*, and ttyUSB[0-9]* is in there twice). - * 25-lfs.rules: Fix Alsa device KERNEL rules. Udev uses shell-style - glob matching, not regular expressions, so the old rules would match - nonsense device names like hw0asdf and pcmDzxcv. As long as the first - character after the "fixed" portion was in the list, the rule would - match; it wouldn't apply the same character range to later characters. + * 25-lfs.rules: Fix Alsa device KERNEL rules. Udev uses shell-style + glob matching, not regular expressions, so the old rules would match + nonsense device names like hw0asdf and pcmDzxcv. As long as the first + character after the "fixed" portion was in the list, the rule would + match; it wouldn't apply the same character range to later characters. - * doc/25-lfs.txt: Add a note on interaction between permissions and - symlinks. + * doc/25-lfs.txt: Add a note on interaction between permissions and + symlinks. 2006-10-09 Bryan Kadzban - * 25-lfs.rules: Fix fb[0-9]* device permissions (should use the default - 0660). + * 25-lfs.rules: Fix fb[0-9]* device permissions (should use the default + 0660). - * doc/25-lfs.txt: Fix typo: /dev/ptmx is given mode 0666, not 0660. - Also tweak the comment about other TTY devices. + * doc/25-lfs.txt: Fix typo: /dev/ptmx is given mode 0666, not 0660. + Also tweak the comment about other TTY devices. 2006-10-04 Bryan Kadzban - * 05-udev-early.rules: Remove WAIT_FOR_SYSFS="bus" rule. With kernel - 2.6.18, this rule is no longer required. + * 05-udev-early.rules: Remove WAIT_FOR_SYSFS="bus" rule. With kernel + 2.6.18, this rule is no longer required. - * doc/05-udev-early.txt: Update to match. + * doc/05-udev-early.txt: Update to match. 2006-09-28 Bryan Kadzban - * doc/60-persistent-storage.txt: Explain persistent storage rules, or - at least the parts I understand. (I don't use DASD or netblock or - several other supported configurations.) + * doc/60-persistent-storage.txt: Explain persistent storage rules, or + at least the parts I understand. (I don't use DASD or netblock or + several other supported configurations.) - * doc/81-cdrom.txt: Explain 81-cdrom.rules. + * doc/81-cdrom.txt: Explain 81-cdrom.rules. - * doc/95-udev-late.txt: Explain 95-udev-late.rules. Documentation is - now finished. + * doc/95-udev-late.txt: Explain 95-udev-late.rules. Documentation is + now finished. 2006-09-26 Bryan Kadzban - * doc/60-persistent-input.txt: Explain (in probably too much detail) - 60-persistent-input.rules. + * doc/60-persistent-input.txt: Explain (in probably too much detail) + 60-persistent-input.rules. 2006-09-24 Bryan Kadzban - * doc/05-udev-early.txt: Rewrap to fit 80 columns. + * doc/05-udev-early.txt: Rewrap to fit 80 columns. - * doc/26-modprobe.txt: Explain 26-modprobe.rules, and modaliases. + * doc/26-modprobe.txt: Explain 26-modprobe.rules, and modaliases. - * doc/27-firmware.txt: Explain 27-firmware.rules. + * doc/27-firmware.txt: Explain 27-firmware.rules. 2006-09-24 Bryan Kadzban - * doc/25-lfs.txt: Explain 25-lfs.rules. + * doc/25-lfs.txt: Explain 25-lfs.rules. - * 25-lfs.rules: Use SYMLINK+= for isdn/capi20 also. + * 25-lfs.rules: Use SYMLINK+= for isdn/capi20 also. 2006-09-23 Bryan Kadzban - * doc: New subdirectory to contain documentation of rules - * doc/README: New file, top-level documentation - * doc/*.txt: New documentation files, one for each rules file. Only - 05-udev-early.txt has anything in it. + * doc: New subdirectory to contain documentation of rules + * doc/README: New file, top-level documentation + * doc/*.txt: New documentation files, one for each rules file. Only + 05-udev-early.txt has anything in it. 2006-09-23 Bryan Kadzban - * 25-lfs.rules: Add "ignore_device" to OPTIONS for DRI devices, instead - of setting NAME to an empty string. This matches the way we ignore - devmapper / LVM devices. + * 25-lfs.rules: Add "ignore_device" to OPTIONS for DRI devices, instead + of setting NAME to an empty string. This matches the way we ignore + devmapper / LVM devices. 2006-09-22 Bryan Kadzban - * 60-persistent-input.rules, 95-udev-late.rules: Import from udev-100. - 60-persistent-input.rules creates persistent symlinks for input - devices, and 95-udev-late.rules enables udevmonitor. + * 60-persistent-input.rules, 95-udev-late.rules: Import from udev-100. + 60-persistent-input.rules creates persistent symlinks for input + devices, and 95-udev-late.rules enables udevmonitor. - * 60-persistent-storage.rules: Replace ATTRS{../removable} with just - ATTRS{removable} on partition devices. Replace ATTRS{removable} - with ATTR{removable} on whole-disk devices. + * 60-persistent-storage.rules: Replace ATTRS{../removable} with just + ATTRS{removable} on partition devices. Replace ATTRS{removable} + with ATTR{removable} on whole-disk devices. 2006-09-20 Bryan Kadzban - * 05-early.rules: Missed a rule in the last change. ENV{PHYSDEVBUS} - in the rule that waits for the "bus" symlink should be replaced by - SUBSYSTEMS. + * 05-early.rules: Missed a rule in the last change. ENV{PHYSDEVBUS} + in the rule that waits for the "bus" symlink should be replaced by + SUBSYSTEMS. 2006-09-20 Bryan Kadzban - * Adapted rules to the new matches used in udev-098 and above (e.g., - SYSFS becomes ATTRS). Prevents warnings, and support for the old - matches will be removed eventually. These rules will not work with - udev-097 and before! - * Fixed several bugs in the rules left over from previous udev - versions (missing commas, overwriting user symlinks using ="..." - instead of +="...", and matching against "*" instead of "?*"). + * Adapted rules to the new matches used in udev-098 and above (e.g., + SYSFS becomes ATTRS). Prevents warnings, and support for the old + matches will be removed eventually. These rules will not work with + udev-097 and before! + * Fixed several bugs in the rules left over from previous udev + versions (missing commas, overwriting user symlinks using ="..." + instead of +="...", and matching against "*" instead of "?*"). - * Renamed CHANGELOG to ChangeLog, started using pseudo-GNU-format - entries. (See standards.info; search it for "changelog" to get - the general gist.) + * Renamed CHANGELOG to ChangeLog, started using pseudo-GNU-format + entries. (See standards.info; search it for "changelog" to get + the general gist.) dnicholson - Jul 14, 2006 - * Fixed usbdev PROGRAM so that it works with the BusyBox sh. Thanks - to Anthony Wright. + * Fixed usbdev PROGRAM so that it works with the BusyBox sh. Thanks + to Anthony Wright. n/a - Jul 12, 2006 - * Added options so temporary nodes are not created with device-mapper - * Adapted cdrom rules to identify CD-ROM drives correctly by adding - SUBSYSTEM=="block" test. - * Added simple 81-cdrom.rules file to set cdrom group ownership + * Added options so temporary nodes are not created with device-mapper + * Adapted cdrom rules to identify CD-ROM drives correctly by adding + SUBSYSTEM=="block" test. + * Added simple 81-cdrom.rules file to set cdrom group ownership n/a - Jun 07, 2006 - * Removed nvidia rules - * Removed bug reporting rule - * Moved Debian-based persistent CD-ROM rules to contrib - * Adapted firmware rule to udev-093 + * Removed nvidia rules + * Removed bug reporting rule + * Moved Debian-based persistent CD-ROM rules to contrib + * Adapted firmware rule to udev-093 n/a - May 15, 2006 - * Part one of 25-lfs.rules rewrite - * Some minor tweaking of the layout + * Part one of 25-lfs.rules rewrite + * Some minor tweaking of the layout n/a - May 12, 2006 - * Initial import of the udev-config directory. - * Reorganized and modularized the rules files. - * Added explanatory comments + * Initial import of the udev-config directory. + * Reorganized and modularized the rules files. + * Added explanatory comments diff --git a/udev-lfs/contrib/debian/write_cd_aliases b/udev-lfs/contrib/debian/write_cd_aliases index ea8eeb7d8..d22ed9ed3 100644 --- a/udev-lfs/contrib/debian/write_cd_aliases +++ b/udev-lfs/contrib/debian/write_cd_aliases @@ -107,7 +107,7 @@ match="BUS==\"$PHYSDEVBUS\", ID==\"$id\"" comment="$ID_MODEL ($ID_PATH)" - write_rule "$match" "cdrom$link_num" "$comment" + write_rule "$match" "cdrom$link_num" "$comment" [ "$ID_CDROM_CD_RW" ] && write_rule "$match" "cdrw$link_num" [ "$ID_CDROM_DVD" ] && write_rule "$match" "dvd$link_num" [ "$ID_CDROM_DVD_RW" ] && write_rule "$match" "dvdrw$link_num" From 7bd0378b41a0c7ed7146053cb3e5e539383fd88b Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 11 Sep 2022 18:54:49 +0200 Subject: [PATCH 14/49] Remove trailing spaces --- chapter08/gcc.xml | 2 +- chapter08/meson.xml | 2 +- chapter08/ncurses.xml | 2 +- chapter08/openssl.xml | 2 +- chapter08/util-linux.xml | 2 +- chapter09/usage.xml | 6 +- prologue/why.xml | 2 +- stylesheets/lfs-xsl/lfs.css.new | 280 ++++++++++++++++---------------- 8 files changed, 149 insertions(+), 149 deletions(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 93961626c..7a06cf461 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -133,7 +133,7 @@ cd build In this section, the test suite for GCC is considered - important, but it takes a long time. First time builders are + important, but it takes a long time. First time builders are encouraged to not skip it. The time to run the tests can be reduced significantly by adding -jx to the make command below where x is the number of cores on your system. diff --git a/chapter08/meson.xml b/chapter08/meson.xml index 6e4b006ad..0bde43856 100644 --- a/chapter08/meson.xml +++ b/chapter08/meson.xml @@ -96,7 +96,7 @@ install -vDm644 data/shell-completions/zsh/_meson /usr/share/zsh/site-functions/ meson - /usr/lib/python&python-minor;/site-packages/meson-&meson-version;.dist-info and + /usr/lib/python&python-minor;/site-packages/meson-&meson-version;.dist-info and /usr/lib/python&python-minor;/site-packages/mesonbuild diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml index 31cd65a6c..e8d42bc7a 100644 --- a/chapter08/ncurses.xml +++ b/chapter08/ncurses.xml @@ -122,7 +122,7 @@ diff --git a/chapter08/openssl.xml b/chapter08/openssl.xml index 91e412bae..9701a0297 100644 --- a/chapter08/openssl.xml +++ b/chapter08/openssl.xml @@ -43,7 +43,7 @@ Installation of OpenSSL , issue: -make check +make -k check The test time for libtool can be reduced significantly on a system with multiple cores. To do this, append @@ -61,8 +61,9 @@ percent. Five tests are known to fail in the LFS build environment due - to a circular dependency, but all tests pass if rechecked after - automake is installed. + to a circular dependency, but these tests pass if rechecked after + automake is installed. Additionally, with grep-3.8, two tests will + trigger a warning for non-POSIX regular expressions and fail. Install the package: From 395eb462ba1fc1835ec9b6018f4427f41d78fa00 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 14 Sep 2022 01:34:15 +0800 Subject: [PATCH 23/49] bash: document egrep warnings in tests The test suite says "Any output from any test, unless otherwise noted, indicates a possible anomaly". So we should note those warnings. --- chapter08/bash.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chapter08/bash.xml b/chapter08/bash.xml index 4ea981d5b..1dd020f28 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -87,6 +87,10 @@ lassign [wait] _ _ _ value exit $value EOF + Several tests invoke the obsolete egrep + command and trigger a warning about the obsoletion. These warnings + should be ignored. + Install the package: make install From 95789f1ae44b1a2b033ea02ff8f463d1c406f0d9 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Tue, 13 Sep 2022 12:49:26 -0500 Subject: [PATCH 24/49] Minor wording change. --- chapter08/bash.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/bash.xml b/chapter08/bash.xml index 1dd020f28..a994999ec 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -88,7 +88,7 @@ exit $value EOF Several tests invoke the obsolete egrep - command and trigger a warning about the obsoletion. These warnings + command and trigger a warning. These warnings should be ignored. Install the package: From 2e9e5b43c5610c7eb39759717b9fe37dbb711975 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 14 Sep 2022 11:50:55 +0800 Subject: [PATCH 25/49] add to make commands for temp /etc/hosts and final /etc/pip3.conf looking better --- chapter07/createfiles.xml | 4 ++-- chapter08/python.xml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 314540e7e..ca7de3802 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -48,8 +48,8 @@ as well: cat > /etc/hosts << EOF -127.0.0.1 localhost $(hostname) -::1 localhost +127.0.0.1 localhost $(hostname) +::1 localhost EOF In order for user root to be diff --git a/chapter08/python.xml b/chapter08/python.xml index 0f50bf6ef..b03817629 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -116,10 +116,10 @@ well. If desired, suppress these warnings by running the following commands: - cat > /etc/pip.conf << EOF -[global] +cat > /etc/pip.conf << EOF +[global] root-user-action = ignore -disable-pip-version-check = true +disable-pip-version-check = true EOF + + 2022-09-15 + + + [bdubbs] - Update to file-5.43. Fixes + #5113. + + + [bdubbs] - Update to linux-5.19.8. Fixes + #5111. + + + [bdubbs] - Update to gawk-5.2.0. Fixes + #5108. + + + [bdubbs] - Update to meson-0.63.2. Fixes + #5106. + + + [bdubbs] - Update to ninja-1.11.1. Fixes + #5103. + + + [bdubbs] - Update to bc-6.0.2. Fixes + #5102. + + + [bdubbs] - Fix the location of udev rules in eudev. Fixes + #5112. + + + [bdubbs] - Remove a warning for egrep and fgrep that + makes tests for some packages fail. + + + [bdubbs] - Delete an empty binutils man page. Fixes + #5107. + + + + 2022-09-10 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index f58e20ca3..d0bb33f14 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -41,9 +41,9 @@ - + @@ -80,18 +80,18 @@ - + - + @@ -124,7 +124,7 @@ --> + --> @@ -182,9 +182,9 @@ - + @@ -194,9 +194,9 @@ - + diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml index 96b820277..78de16f9c 100644 --- a/chapter08/binutils.xml +++ b/chapter08/binutils.xml @@ -174,9 +174,10 @@ cd build make tooldir=/usr install - Remove useless static libraries: + Remove useless static libraries and an emptmy man page: -rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a +rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a +rm -fv /usr/share/man/man1/gprofng.1 diff --git a/chapter08/eudev.xml b/chapter08/eudev.xml index efaba9d30..0cce469e1 100644 --- a/chapter08/eudev.xml +++ b/chapter08/eudev.xml @@ -39,16 +39,12 @@ Installation of Eudev - - + First fix the location of udev rules in the .pc file: + +sed -i '/udevdir/a udev_dir=${udevdir}' src/udev/udev.pc.in Prepare Eudev for compilation: diff --git a/chapter08/gawk.xml b/chapter08/gawk.xml index 4c8ecc265..244d7004f 100644 --- a/chapter08/gawk.xml +++ b/chapter08/gawk.xml @@ -44,6 +44,10 @@ sed -i 's/extras//' Makefile.in + Now fix a programming error identified upstream: + +sed -i -i '241i UPREF(m);' interpret.h + Prepare Gawk for compilation: ./configure --prefix=/usr diff --git a/chapter08/grep.xml b/chapter08/grep.xml index 33b0896c2..25d598dfe 100644 --- a/chapter08/grep.xml +++ b/chapter08/grep.xml @@ -40,6 +40,13 @@ Installation of Grep + + First, remove a warning about using egrep and fgrep that makes + tests on some packages fail: + + +sed -i "s/echo/#echo/" src/egrep.sh + Prepare Grep for compilation: ./configure --prefix=/usr diff --git a/packages.ent b/packages.ent index ce13ec456..0fc7361a0 100644 --- a/packages.ent +++ b/packages.ent @@ -58,10 +58,10 @@ - - + + - + @@ -179,10 +179,10 @@ - - + + - + @@ -207,10 +207,10 @@ - - + + - + @@ -424,12 +424,12 @@ - + - + - + - + + + + Install any firmware needed if the + kernel driver for your hardware requires some firmware files to function + properly. + + - Install firmwares if the kernel - driver for your hardware require some firmware to function properly. - - - Finally, a review of the following configuration files - is also appropriate at this point. + + + Finally, a review of the following configuration files + is also appropriate at this point. + /etc/bashrc @@ -86,14 +98,11 @@ Now that we have said that, let's move on to booting our shiny new LFS - installation for the first time! First exit from the chroot environment: + installation for the first time! First exit from the chroot + environment: logout - + Then unmount the virtual file systems: @@ -106,8 +115,7 @@ umount -v $LFS/sys If multiple partitions were created, unmount the other partitions before unmounting the main one, like this: -umount -v $LFS/usr -umount -v $LFS/home +umount -v $LFS/home umount -v $LFS Unmount the LFS file system itself: diff --git a/chapter11/whatnow.xml b/chapter11/whatnow.xml index 999926289..e477e21c8 100644 --- a/chapter11/whatnow.xml +++ b/chapter11/whatnow.xml @@ -8,7 +8,7 @@ - What Now? + Additional Resources Thank you for reading this LFS book. We hope that you have found this book helpful and have learned more about the system @@ -38,7 +38,8 @@ - Open Source Security Mailing List + Open Source Security + Mailing List This is a mailing list for discussion of security flaws, concepts, and practices in the Open Source community. @@ -46,7 +47,7 @@ - + LFS Hints From 46b05a0832adca10a2afe5474642ad38521cf0d5 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 15 Sep 2022 18:22:44 +0800 Subject: [PATCH 32/49] gawk: remove duplicated "-i" in a sed command --- chapter08/gawk.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/gawk.xml b/chapter08/gawk.xml index 244d7004f..9979e32de 100644 --- a/chapter08/gawk.xml +++ b/chapter08/gawk.xml @@ -46,7 +46,7 @@ Now fix a programming error identified upstream: -sed -i -i '241i UPREF(m);' interpret.h +sed -i '241i UPREF(m);' interpret.h Prepare Gawk for compilation: From 59350d1c7b902e47c30cc12520b105c04a38d826 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 17 Sep 2022 20:36:13 +0800 Subject: [PATCH 33/49] afterlfs: remove trailing spaces, and fix two obvious "- -" --- chapter11/afterlfs.xml | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index d2779b563..ce18b3aab 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -24,28 +24,28 @@ A server is the simpler category. Generally this consists of a web - server such as the + server such as the Apache HTTP Server and a database server such as - MariaDB. + MariaDB. However other services are possible. The operating system embedded in a single use device falls into this category. On the other hand, a workstation is much more complex. It generally - requires a graphical user environment such as - LXDE, - XFCE, - KDE, or + requires a graphical user environment such as + LXDE, + XFCE, + KDE, or Gnome - based on the + based on the X Window graphical environment and several graphical based applications such as the - Firefox web browser, + Firefox web browser, Thunderbird email client, - or - LibreOffice office suite. + or + LibreOffice office suite. These applications require many (several hundred depending on desired capabilities) more packages of support applications and libraries. @@ -55,10 +55,10 @@ In addition to the above, there is a set of applications that are suitable for all systems for system management. These applications are all in the full BLFS book. Not - all packages are needed in all environments. For example - dhcpcd, - is not appropriate for a server and - wireless_tools, + all packages are needed in all environments. For example + dhcpcd, + is not appropriate for a server and + wireless_tools, are normally only useful for a laptop system. If you are not sure if a package presented here is needed or not, it can either be installed now or later as the @@ -73,7 +73,7 @@ When you initially boot into LFS, you have all the internal tools to build additional packages. Unfortunately, the user environment is quite sparse. - There are a couple of ways to improve this: + There are a couple of ways to improve this: @@ -90,7 +90,7 @@ In order to properly build packages in chroot, you will also need to remember to mount the virtual file systems if they are not already - mounted. One way to do this is to create a script on the + mounted. One way to do this is to create a script on the HOST system: @@ -100,7 +100,7 @@ function mountbind { if ! mountpoint $LFS/$1 >/dev/null; then - $SUDO mount - -bind /$1 $LFS/$1 + $SUDO mount --bind /$1 $LFS/$1 echo $LFS/$1 mounted else echo $LFS/$1 already mounted @@ -110,7 +110,7 @@ function mountbind function mounttype { if ! mountpoint $LFS/$1 >/dev/null; then - $SUDO mount -t $2 $3 $4 $5 $LFS/$1 + $SUDO mount -t $2 $3 $4 $5 $LFS/$1 echo $LFS/$1 mounted else echo $LFS/$1 already mounted @@ -128,7 +128,7 @@ if [ x$LFS == x ]; then exit 1 fi -mountbind dev +mountbind dev mounttype dev/pts devpts devpts -o gid=5,mode=620 mounttype proc proc proc mounttype sys sysfs sysfs @@ -142,7 +142,7 @@ EOF Note that the last three commands in the script are commented out. These are useful if those directories are mounted as separate partitions on the - host system and will be mounted when booting the completed LFS/BLFS system. + host system and will be mounted when booting the completed LFS/BLFS system. @@ -166,8 +166,8 @@ EOF placed in a user's ~/.bashrc file on the host system: -alias lfs='sudo /usr/sbin/chroot /mnt/lfs /usr/bin/env -i HOME=/root TERM="$TERM" PS1="\u:\w\\\\$ " -PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash - -login' +alias lfs='sudo /usr/sbin/chroot /mnt/lfs /usr/bin/env -i HOME=/root TERM="$TERM" PS1="\u:\w\\\\$ " +PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' This alias is a little tricky because of the quoting and levels of @@ -182,14 +182,14 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash - -login' This method also provides a full graphical environment, but first - requires installing + requires installing sshd and - wget + wget on the LFS system, usually in chroot. It also requires a second computer. This method has the advantage of being simple by not requiring the complexity of the chroot environment. It also uses your LFS built kernel for all additional packages and still provides a complete system - for installing packages. + for installing packages. @@ -198,18 +198,18 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash - -login' Work from the LFS command line - This method requiures installing + This method requiures installing make-ca, - wget, + wget, gpm, and links - in chroot and then rebooting into the new LFS system. At this - point the default system has six virtual consoles. Switching + in chroot and then rebooting into the new LFS system. At this + point the default system has six virtual consoles. Switching consoles is as easy as using the Alt-Fn key combinations where Fn is between F1 and F6. The Alt-LeftArrow and Alt-RightArrow key combinations also will change the console. - + At this point you can log into two different virtual consoles and run the links browser in one console and bash in the other. GPM then allows From afd19ad54a4dd4aff8a17df48e79b8f502feee8e Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sat, 17 Sep 2022 14:52:38 +0200 Subject: [PATCH 34/49] afterlfs: typo and add dependencies of make-ca --- chapter11/afterlfs.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index ce18b3aab..8b5fe6824 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -198,7 +198,9 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' Work from the LFS command line - This method requiures installing + This method requires installing + libtasn1, + p11-kit, make-ca, wget, gpm, and From 226784a1cba31a103826f1be680abb14201f3db8 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sat, 17 Sep 2022 14:57:01 +0200 Subject: [PATCH 35/49] afterlfs: Fix blfs "links" url --- chapter11/afterlfs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index 8b5fe6824..0a125d711 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -204,7 +204,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' make-ca, wget, gpm, and - links + links in chroot and then rebooting into the new LFS system. At this point the default system has six virtual consoles. Switching consoles is as easy as using the Alt-Fn key combinations where Fn is From 9f8335ee8dba07552a1615e7753d021654c1636c Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 17 Sep 2022 21:06:14 +0800 Subject: [PATCH 36/49] afterlfs: several fixes - Use for bold, instead of . - Remove "X window" as some graphical environments are Wayland-based. - "Full BLFS" -> "BLFS", and "partial BLFS" -> "basic LFS" (I guess some content is copied from Basic BLFS). --- chapter11/afterlfs.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index 0a125d711..fd863f76b 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -39,8 +39,8 @@ XFCE, KDE, or Gnome - based on the - X Window graphical environment + based on a basic + graphical environment and several graphical based applications such as the Firefox web browser, Thunderbird email client, @@ -54,7 +54,7 @@ In addition to the above, there is a set of applications that are suitable for all systems for system management. These applications are - all in the full BLFS book. Not + all in the BLFS book. Not all packages are needed in all environments. For example dhcpcd, is not appropriate for a server and @@ -68,7 +68,7 @@ - Working in a partial BLFS environment + Working in a basic LFS environment When you initially boot into LFS, you have all the internal tools to build @@ -91,7 +91,7 @@ In order to properly build packages in chroot, you will also need to remember to mount the virtual file systems if they are not already mounted. One way to do this is to create a script on the - HOST system: + HOST system: cat > ~/mount-virt.sh << "EOF" From 9bbfbeabc9f3b5d348f3076e791340328684020c Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 18 Sep 2022 00:13:14 +0800 Subject: [PATCH 37/49] afterlfs: tweak key combination description Use DocBook to decorate the keys. Change "Fn" to "Fx" because some small keyboards have a "Fn" (function) key to multiplex keys. --- chapter11/afterlfs.xml | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index fd863f76b..db2f21bc3 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -207,8 +207,23 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' links in chroot and then rebooting into the new LFS system. At this point the default system has six virtual consoles. Switching - consoles is as easy as using the Alt-Fn key combinations where Fn is - between F1 and F6. The Alt-LeftArrow and Alt-RightArrow key + consoles is as easy as using the + + Alt + Fx + + key combinations where Fx is + between F1 and F6. + The + + Alt + + + and + + Alt + + combinations also will change the console. @@ -222,10 +237,21 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' As a side note, switching of virtual consoles can also be done from - an X Window instance with the Ctrl-Alt-Fn key combination, but the - mouse copy operation does not work between the graphical interface - and a virtual console. You can return to the X Window display with - the Ctrl-Alt-Fn conbination where Fn is usually F7. + an X Window instance with the + + Ctrl + Alt + Fx + + key combination, but the mouse copy operation does not work + between the graphical interface and a virtual console. You can + return to the X Window display with the + + Ctrl + Alt + Fx + + combination, where Fx may be F7. From 43e486193639096eb9d7e57dc52e889a58434cc8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 18 Sep 2022 00:16:00 +0800 Subject: [PATCH 38/49] afterlfs: "links" -> "links or lynx" Lynx has a slight advantage: no recommended dependencies. --- chapter11/afterlfs.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index db2f21bc3..89ff1de57 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -205,6 +205,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' wget, gpm, and links + (or lynx) in chroot and then rebooting into the new LFS system. At this point the default system has six virtual consoles. Switching consoles is as easy as using the @@ -229,9 +230,9 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' At this point you can log into two different virtual consoles and run - the links browser in one console and bash in the other. GPM then allows - copying commands from the browser with the left mouse button, switching - consoles, and pasting into the other console. + the links or lynx browser in one console and bash in the other. GPM + then allows copying commands from the browser with the left mouse + button, switching consoles, and pasting into the other console. From b6a6f6c791002082132d98f410c58bb6a8532ea6 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 18 Sep 2022 00:17:12 +0800 Subject: [PATCH 39/49] afterlfs: use entity for root user --- chapter11/afterlfs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index 89ff1de57..4052ccdd6 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -147,7 +147,7 @@ EOF The script can be run with bash ~/mount-virt.sh as - either a regular user (recommended) or as root. If run as a regular + either a regular user (recommended) or as &root;. If run as a regular user, sudo is required on the host system. From 13342a071888e4fe731361977f933fd30770377a Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sat, 17 Sep 2022 15:43:51 -0500 Subject: [PATCH 40/49] Currency updates. Fix currency for iana-etc, meson, and shadow due to the way github changes when accessing pages via wget. --- lfs-latest-git.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lfs-latest-git.php b/lfs-latest-git.php index 645f8e70d..5dda8476c 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -34,7 +34,7 @@ function find_max( $lines, $regex_match, $regex_replace ) // Isolate the version and put in an array $slice = preg_replace( $regex_replace, "$1", $line ); - if ( $slice == $line ) continue; + if ( strcmp( $slice, $line ) == 0 ) continue; array_push( $a, $slice ); } @@ -266,6 +266,15 @@ if ( $package == "zstd" ) $dirpath = "https://github.com/facebook/zstd/rel if ( $package == "elfutils" ) return find_max( $lines, "/^\d/", "/^(\d[\d\.]+\d)\/.*$/" ); + if ( $package == "iana-etc" ) + return find_max( $lines, "/^\s*20\d\d/", "/^\s+(\d+).*$/" ); + + if ( $package == "meson" ) + return find_max( $lines, "/^\s+\d\./", "/^\s+([\d\.]+)$/" ); + + if ( $package == "shadow" ) + return find_max( $lines, "/^\s+\d\./", "/^\s+([\d\.]+)$/" ); + if ( $package == "XML-Parser" ) { $max = find_max( $lines, "/$package/", "/^.*$package-([\d\._]*\d).tar.*$/" ); From ade96029ade70d4016e779e63cf06f61d94f711f Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 18 Sep 2022 12:24:04 +0800 Subject: [PATCH 41/49] dependencies: bump grep external dependency on PCRE It now checks for libpcre2-8, so link to PCRE2 instead of PCRE1. --- appendices/dependencies.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index b59c93f93..66008b617 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -1186,7 +1186,7 @@ &external; - PCRE + PCRE2 and libsigsegv From 6cfe855a16b9a30cf40a7295038ab420b5b27e67 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 18 Sep 2022 12:25:00 +0800 Subject: [PATCH 42/49] dependencies: remove patch runtime dependency on itself Reported-by: Rahul Chandra --- appendices/dependencies.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 66008b617..69c676394 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -2356,7 +2356,7 @@ &runtime; - Glibc and Patch + Glibc From 99260fe3c91899bf3ff511918730793479e86dc3 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 18 Sep 2022 08:27:58 +0200 Subject: [PATCH 43/49] Makefile: remove unneeded tabs --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index bd6884a66..eb00b70e5 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,7 @@ validate: tmpdir version $(Q)xmllint --nonet \ --noent \ --postvalid \ - -o $(RENDERTMP)/lfs-full.xml \ + -o $(RENDERTMP)/lfs-full.xml \ $(RENDERTMP)/lfs-html2.xml $(Q)rm -f appendices/*.script @@ -147,9 +147,9 @@ profile-html: @echo "Generating profiled XML for XHTML..." $(Q)xsltproc --nonet \ --stringparam profile.condition html \ - --output $(RENDERTMP)/lfs-html.xml \ + --output $(RENDERTMP)/lfs-html.xml \ stylesheets/lfs-xsl/profile.xsl \ - $(RENDERTMP)/lfs-full.xml + $(RENDERTMP)/lfs-full.xml wget-list: $(BASEDIR)/wget-list $(BASEDIR)/wget-list-$(REV) $(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml \ @@ -158,7 +158,7 @@ $(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml \ $(Q)mkdir -p $(BASEDIR) $(Q)xsltproc --xinclude --nonet \ --output $(BASEDIR)/wget-list \ - stylesheets/wget-list.xsl \ + stylesheets/wget-list.xsl \ chapter03/chapter03.xml $(BASEDIR)/wget-list-$(REV): stylesheets/wget-list.xsl \ From cdc605303bd7317c6755da68150149e67a853383 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 18 Sep 2022 08:29:18 +0200 Subject: [PATCH 44/49] Makefile: reinstate the dump-commands target --- Makefile | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index eb00b70e5..13d0f52a8 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ ifeq ($(REV), sysv) BASEDIR ?= ~/lfs-book PDF_OUTPUT ?= LFS-BOOK.pdf NOCHUNKS_OUTPUT ?= LFS-BOOK.html - DUMPDIR ?= ~/cross-lfs-commands + DUMPDIR ?= ~/lfs-commands else BASEDIR ?= ~/lfs-systemd PDF_OUTPUT ?= LFS-SYSD-BOOK.pdf @@ -197,22 +197,17 @@ $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \ version: $(Q)./git-version.sh $(REV) -#dump-commands: validate -# @echo "Dumping book commands..." -# $(Q)xsltproc --nonet \ -# --output $(RENDERTMP)/lfs-html.xml \ -# --stringparam profile.revision $(REV) \ -# stylesheets/lfs-xsl/profile.xsl \ -# $(RENDERTMP)/lfs-full.xml +dump-commands: validate + @echo "Dumping book commands..." -# $(Q)rm -rf $(DUMPDIR) + $(Q)rm -rf $(DUMPDIR) -# $(Q)xsltproc --output $(DUMPDIR)/ \ -# stylesheets/dump-commands.xsl \ -# $(RENDERTMP)/lfs-html.xml -# @echo "Dumping book commands complete in $(DUMPDIR)" + $(Q)xsltproc --output $(DUMPDIR)/ \ + stylesheets/dump-commands.xsl \ + $(RENDERTMP)/lfs-full.xml + @echo "Dumping book commands complete in $(DUMPDIR)" -all: book nochunks pdf # dump-commands +all: book nochunks pdf dump-commands .PHONY : all book dump-commands nochunks pdf profile-html tmpdir validate md5sums wget-list version From 6d60bfc16fbb95a775869900005a8800a6c03f2b Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 18 Sep 2022 16:57:53 -0500 Subject: [PATCH 45/49] Chapter 11 text updates. --- chapter11/afterlfs.xml | 21 +++++++++------------ chapter11/reboot.xml | 6 +++--- chapter11/theend.xml | 5 ++--- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index 4052ccdd6..743fd2e98 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -52,17 +52,13 @@ - In addition to the above, there is a set of applications that are - suitable for all systems for system management. These applications are - all in the BLFS book. Not - all packages are needed in all environments. For example - dhcpcd, - is not appropriate for a server and - wireless_tools, - are normally only - useful for a laptop system. If you are not sure if a package presented - here is needed or not, it can either be installed now or later as the - need arises. + In addition to the above, there is a set of applications for system + management for all kinds of systems. These applications are all in the + BLFS book. Not all packages are needed in every environments For + example dhcpcd, is + not normally appropriate for a server and wireless_tools, + are normally only useful for a laptop system. @@ -252,7 +248,8 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' Alt Fx - combination, where Fx may be F7. + combination, where Fx is usually + F1 but may be F7. diff --git a/chapter11/reboot.xml b/chapter11/reboot.xml index 70979a191..5eee6ca5b 100644 --- a/chapter11/reboot.xml +++ b/chapter11/reboot.xml @@ -77,7 +77,7 @@ - Finally, a review of the following configuration files + A review of the following configuration files is also appropriate at this point. @@ -122,9 +122,9 @@ umount -v $LFS umount -v $LFS - Now, reboot the system with: + Now, reboot the system. -shutdown -r now + Assuming the GRUB boot loader was set up as outlined earlier, the menu is set to boot LFS &version; automatically. diff --git a/chapter11/theend.xml b/chapter11/theend.xml index 8470948a3..6f5e7e401 100644 --- a/chapter11/theend.xml +++ b/chapter11/theend.xml @@ -60,8 +60,7 @@ PRETTY_NAME="Linux From Scratch &version;" VERSION_CODENAME="<your name here>" EOF - Be sure to put some sort of customization for the fields - 'DISTRIB_CODENAME' and 'VERSION_CODENAME' to make the system uniquely - yours. + Be sure to customize the fields 'DISTRIB_CODENAME' and + 'VERSION_CODENAME' to make the system uniquely yours. From 5de4fea42c1dce41330ca1e70560661fff01b2f9 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 19 Sep 2022 10:58:43 +0800 Subject: [PATCH 46/49] cleanup: use a stronger tone for removing la files --- chapter08/cleanup.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter08/cleanup.xml b/chapter08/cleanup.xml index 4820e6bdb..9da3828a7 100644 --- a/chapter08/cleanup.xml +++ b/chapter08/cleanup.xml @@ -17,8 +17,8 @@ There are also several files installed in the /usr/lib and /usr/libexec directories with a file name extension of .la. These are "libtool archive" files. As already said, they are only useful when linking with static - libraries. They are unneeded, and potentially harmful, when using dynamic - shared libraries, specially when using also non-autotools build systems. + libraries. They are unneeded when using ELF dynamic shared libraries, and + it's known they can cause BLFS packages fail to build. To remove them, run: find /usr/lib /usr/libexec -name \*.la -delete From 5f85f38260892f0ca28ff3f7c5751fbe60699930 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 19 Sep 2022 11:03:29 +0800 Subject: [PATCH 47/49] reboot: add a comment for editors about why we don't provide reboot command --- chapter11/reboot.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chapter11/reboot.xml b/chapter11/reboot.xml index 5eee6ca5b..ebfb0a2b1 100644 --- a/chapter11/reboot.xml +++ b/chapter11/reboot.xml @@ -124,6 +124,9 @@ umount -v $LFS Now, reboot the system. + Assuming the GRUB boot loader was set up as outlined earlier, the menu From 4e381f952ea2852ae5a357ad1d8fe1842496dccc Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 19 Sep 2022 12:10:26 +0800 Subject: [PATCH 48/49] fix a typo --- chapter11/afterlfs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index 743fd2e98..6921f1785 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -54,7 +54,7 @@ In addition to the above, there is a set of applications for system management for all kinds of systems. These applications are all in the - BLFS book. Not all packages are needed in every environments For + BLFS book. Not all packages are needed in every environments. For example dhcpcd, is not normally appropriate for a server and wireless_tools, From 3d65730e220e697fad48dc8d1b0d688a83c8180e Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 19 Sep 2022 14:12:17 +0800 Subject: [PATCH 49/49] cleanup: rephrase description for .la removal Don't emphasis "static library" at all, to prevent anyone from thinking "I need to use static libraries so I'll keep these .la files". And warn that .la files are known to break BLFS packages. --- chapter07/cleanup.xml | 8 ++++---- chapter08/cleanup.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/chapter07/cleanup.xml b/chapter07/cleanup.xml index 6ed78fb93..7946d84eb 100644 --- a/chapter07/cleanup.xml +++ b/chapter07/cleanup.xml @@ -18,10 +18,10 @@ rm -rf /usr/share/{info,man,doc}/* - Second, the libtool .la files are only useful when linking with static - libraries. They are unneeded and potentially harmful when using dynamic - shared libraries, especially when using non-autotools build systems. - While still in chroot, remove those files now: + Second, on a modern Linux system, the libtool .la files are only + useful for libltdl. No libraries in LFS are expected to be loaded by + libltdl, and it's known that some .la files can cause BLFS packages + fail to build. Remove those files now: find /usr/{lib,libexec} -name \*.la -delete diff --git a/chapter08/cleanup.xml b/chapter08/cleanup.xml index 9da3828a7..c55b7af2f 100644 --- a/chapter08/cleanup.xml +++ b/chapter08/cleanup.xml @@ -16,10 +16,10 @@ There are also several files installed in the /usr/lib and /usr/libexec directories with a file name extension of .la. These are "libtool archive" - files. As already said, they are only useful when linking with static - libraries. They are unneeded when using ELF dynamic shared libraries, and - it's known they can cause BLFS packages fail to build. - To remove them, run: + files. As already said, on a modern Linux system the libtool .la files are + only useful for libltdl. No libraries in LFS are expected to be loaded + by libltdl, and it's known that some .la files can cause BLFS packages + fail to build. Remove those files now: find /usr/lib /usr/libexec -name \*.la -delete