diff --git a/Makefile b/Makefile index 1c23a55f5..6247b294d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,4 @@ -#BASEDIR = ~/lfs-book -#SYSDDIR = ~/lfs-systemd -#DUMPDIR = ~/lfs-commands +# vim:ts=3 RENDERTMP = $(HOME)/tmp CHUNK_QUIET = 1 ROOT_ID = @@ -23,15 +21,15 @@ ifneq ($(REV), sysv) endif ifeq ($(REV), sysv) - BASEDIR ?= ~/lfs-book + BASEDIR ?= $(HOME)/public_html/lfs-book PDF_OUTPUT ?= LFS-BOOK.pdf NOCHUNKS_OUTPUT ?= LFS-BOOK.html - DUMPDIR ?= ~/lfs-commands + DUMPDIR ?= $(HOME)/lfs-commands else - BASEDIR ?= ~/lfs-systemd + BASEDIR ?= $(HOME)/public_html/lfs-systemd PDF_OUTPUT ?= LFS-SYSD-BOOK.pdf NOCHUNKS_OUTPUT ?= LFS-SYSD-BOOK.html - DUMPDIR ?= ~/lfs-sysd-commands + DUMPDIR ?= $(HOME)/lfs-sysd-commands endif book: validate profile-html @@ -46,7 +44,8 @@ book: validate profile-html @echo "Copying CSS code and images..." $(Q)mkdir -p $(BASEDIR)/stylesheets $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets - $(Q)sed -i 's|../stylesheet|stylesheet|' $(BASEDIR)/index.html + $(Q)sed -e 's|../stylesheet|stylesheet|' \ + -i $(BASEDIR)/index.html $(Q)mkdir -p $(BASEDIR)/images $(Q)cp images/*.png $(BASEDIR)/images @@ -54,12 +53,10 @@ book: validate profile-html @echo "Running Tidy and obfuscate.sh..." $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \ tidy -config tidy.conf $$filename; \ - true; \ /bin/bash obfuscate.sh $$filename; \ - sed -e "s@text/html@application/xhtml+xml@g" \ - -e "s/\xa9/\©/ " \ + sed -e "s|text/html|application/xhtml+xml|g" \ -i $$filename; \ - done; + done $(Q)$(MAKE) --no-print-directory wget-list md5sums @@ -98,17 +95,16 @@ nochunks: validate profile-html --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \ stylesheets/lfs-nochunks.xsl \ $(RENDERTMP)/lfs-html.xml -# $(RENDERTMP)/lfs-html2.xml @echo "Running Tidy..." - $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true + $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || test $$? -le 1 @echo "Running obfuscate.sh..." - $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "s@../wget-list@wget-list@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "s@../md5sums@md5sums@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "s@\xa9@\©@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) + $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) + $(Q)sed -e "s|text/html|application/xhtml+xml|g" \ + -e "s|../wget-list|wget-list|" \ + -e "s|../md5sums|md5sums|" \ + -i $(BASEDIR)/$(NOCHUNKS_OUTPUT) @echo "Output at $(BASEDIR)/$(NOCHUNKS_OUTPUT)" @@ -127,16 +123,16 @@ validate: tmpdir version @echo "Adjusting for revision $(REV)..." $(Q)xsltproc --nonet \ --xinclude \ - --output $(RENDERTMP)/lfs-html2.xml \ --stringparam profile.revision $(REV) \ + --output $(RENDERTMP)/lfs-html2.xml \ stylesheets/lfs-xsl/profile.xsl \ index.xml @echo "Validating the book..." - $(Q)xmllint --nonet \ - --noent \ - --postvalid \ - -o $(RENDERTMP)/lfs-full.xml \ + $(Q)xmllint --nonet \ + --encode UTF-8 \ + --postvalid \ + --output $(RENDERTMP)/lfs-full.xml \ $(RENDERTMP)/lfs-html2.xml $(Q)rm -f appendices/*.script @@ -151,42 +147,45 @@ profile-html: stylesheets/lfs-xsl/profile.xsl \ $(RENDERTMP)/lfs-full.xml +DOWNLOADS_DEP = chapter03/packages.xml chapter03/patches.xml \ + packages.ent patches.ent general.ent + wget-list: $(BASEDIR)/wget-list $(BASEDIR)/wget-list-$(REV) -$(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml \ - packages.ent patches.ent general.ent +$(BASEDIR)/wget-list: stylesheets/wget-list.xsl $(DOWNLOADS_DEP) @echo "Generating consolidated wget list at $(BASEDIR)/wget-list ..." $(Q)mkdir -p $(BASEDIR) - $(Q)xsltproc --xinclude --nonet \ + $(Q)xsltproc --nonet \ + --xinclude \ --output $(BASEDIR)/wget-list \ stylesheets/wget-list.xsl \ chapter03/chapter03.xml -$(BASEDIR)/wget-list-$(REV): stylesheets/wget-list.xsl \ - chapter03/chapter03.xml \ - packages.ent patches.ent general.ent - $(Q)xsltproc --nonet --xinclude \ +$(BASEDIR)/wget-list-$(REV): stylesheets/wget-list.xsl $(DOWNLOADS_DEP) + $(Q)xsltproc --nonet \ + --xinclude \ --stringparam profile.revision $(REV) \ --output $(RENDERTMP)/wget-list.xml \ stylesheets/lfs-xsl/profile.xsl \ chapter03/chapter03.xml - $(Q)xsltproc --xinclude --nonet \ + + $(Q)xsltproc --nonet \ --output $(BASEDIR)/wget-list-$(REV) \ stylesheets/wget-list.xsl \ $(RENDERTMP)/wget-list.xml md5sums: $(BASEDIR)/md5sums -$(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \ - packages.ent patches.ent +$(BASEDIR)/md5sums: stylesheets/wget-list.xsl $(DOWNLOADS_DEP) @echo "Generating consolidated md5sum file at $(BASEDIR)/md5sums ..." $(Q)mkdir -p $(BASEDIR) - $(Q)xsltproc --nonet --xinclude \ + $(Q)xsltproc --nonet \ + --xinclude \ --stringparam profile.revision $(REV) \ --output $(RENDERTMP)/md5sum.xml \ stylesheets/lfs-xsl/profile.xsl \ chapter03/chapter03.xml - $(Q)xsltproc --xinclude --nonet \ + $(Q)xsltproc --nonet \ --output $(BASEDIR)/md5sums \ stylesheets/md5sum.xsl \ $(RENDERTMP)/md5sum.xml diff --git a/appendices/acknowledgments.xml b/appendices/acknowledgments.xml index 24cb88350..3d3f8bb69 100644 --- a/appendices/acknowledgments.xml +++ b/appendices/acknowledgments.xml @@ -1,4 +1,4 @@ - + diff --git a/appendices/acronymlist.xml b/appendices/acronymlist.xml index 9038da8f6..3ccfd3fb2 100644 --- a/appendices/acronymlist.xml +++ b/appendices/acronymlist.xml @@ -1,4 +1,4 @@ - + diff --git a/appendices/creat-comm.xml b/appendices/creat-comm.xml index 2ecc76097..be4e9ee7f 100644 --- a/appendices/creat-comm.xml +++ b/appendices/creat-comm.xml @@ -1,4 +1,4 @@ - + diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 73194612c..158ed0f04 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -1,4 +1,4 @@ - + @@ -6,6 +6,7 @@ Systemd Udev"> + Berkeley DB"> ]> @@ -29,10 +30,7 @@ in addition to those on the first list, need to be available in order to run the test suites. The fourth list of dependencies are packages that require this package to be built and installed in its final location before they are - built and installed. In most cases, this is because these packages will hard - code paths to binaries within their scripts. If not built in a certain order, - this could result in paths of /tools/bin/[binary] being placed inside scripts - installed to the final system. This is obviously not desirable. + built and installed. The last list of dependencies are optional packages that are not addressed in LFS, but could be useful to the user. These packages may have @@ -109,7 +107,7 @@ &before; - Acl and Libcap + Acl, Libcap, and Patch @@ -1049,7 +1047,7 @@ &external; - None + libxml2 @@ -1241,7 +1239,7 @@ &before; - Man-DB and Perl + Man-DB @@ -1486,7 +1484,7 @@ &external; - Berkeley DB, + &bdb;, iptables, libbpf, libmnl, and @@ -2416,14 +2414,15 @@ &dependencies; - Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, and Sed + Attr, Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, and + Sed &runtime; - Glibc + Attr and Glibc @@ -2456,7 +2455,7 @@ &dependencies; - Bash, Binutils, Coreutils, Gawk, GCC, GDBM, Glibc, Grep, Groff, + Bash, Binutils, Coreutils, Gawk, GCC, GDBM, Glibc, Grep, Libxcrypt, Make, Sed, and Zlib @@ -2486,7 +2485,7 @@ &external; - Berkeley DB + &bdb; @@ -2655,7 +2654,7 @@ &external; - Berkeley DB, + &bdb;, libnsl, SQLite, and Tk @@ -2937,6 +2936,7 @@ make-ca, p11-kit, PCRE2, + pefile, Polkit, pyelftools, qemu, @@ -3194,6 +3194,7 @@ &external; + Asciidoctor, Libcap-NG, libeconf, @@ -3202,7 +3203,8 @@ Linux-PAM, smartmontools, and + url="&blfs-book;postlfs/smartmontools.html">smartmontools, + po4a, and slang diff --git a/appendices/license.xml b/appendices/license.xml index ebcb5c0be..75eb24257 100644 --- a/appendices/license.xml +++ b/appendices/license.xml @@ -1,4 +1,4 @@ - + diff --git a/appendices/mit-lic.xml b/appendices/mit-lic.xml index 1e8ed4d03..6715d2a48 100644 --- a/appendices/mit-lic.xml +++ b/appendices/mit-lic.xml @@ -1,4 +1,4 @@ - + diff --git a/appendices/scripts.xml b/appendices/scripts.xml index 69d653bdc..980b90961 100644 --- a/appendices/scripts.xml +++ b/appendices/scripts.xml @@ -1,4 +1,4 @@ - + diff --git a/appendices/udev-rules.xml b/appendices/udev-rules.xml index 189f55f41..25f41033e 100644 --- a/appendices/udev-rules.xml +++ b/appendices/udev-rules.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter01/askforhelp.xml b/chapter01/askforhelp.xml index 5eb1d939f..dd36b30fa 100644 --- a/chapter01/askforhelp.xml +++ b/chapter01/askforhelp.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 8ad5949fb..fa7fc12c4 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -1,4 +1,4 @@ - + @@ -39,6 +39,314 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + + 2024-02-02 + + + [xry111] - Update to tzdata-2024a. Fixes + #5428. + + + [xry111] - Update to glibc-2.39 (security fix). Fixes + #5426. + + + [xry111] - Update to linux-6.7.3. Fixes + #5427. + + + + + + 2024-02-01 + + + [bdubbs] - Update to openssl-3.2.1 (security fix). Fixes + #5425. + + + [bdubbs] - Update to zlib-1.3.1. Fixes + #5419. + + + [bdubbs] - Update to xz-5.4.6. Fixes + #5423. + + + [bdubbs] - Update to linux-6.7.2. Fixes + #5422. + + + [bdubbs] - Update to iana-etc-20240125. Addresses + #5006. + + + [bdubbs] - Update to binutils-2.42. Fixes + #5424. + + + [bdubbs] - Update to acl-2.3.2. Fixes + #5421. + + + [bdubbs] - Update upstream fixes for readline-8.2. Fixes + #5420. + + + [bdubbs] - Apply upstream fix for bash-5.2.21. Fixes + #5420. + + + + + + 2024-01-21 + + + [xry111] - Apply upstream fix for pkgconf-2.1.0 regression. + Fixes #5414. + + + [xry111] - Update to jinja2-3.1.3 (security fix). Fixes + #5411. + + + [xry111] - Update to bc-6.7.5. Fixes + #5408. + + + [xry111] - Update to attr-2.5.2. Fixes + #5412. + + + [xry111] - Update to ncurses-6.4-20230520 (security fix). + Fixes #5416. + + + [xry111] - Update to markupsafe-2.1.4. Fixes + #5418. + + + [xry111] - Update to linux-6.7.1. Fixes + #5406. + + + [xry111] - Update to iproute2-6.7.0. Fixes + #5410. + + + [xry111] - Update to vim-9.1.0041. Addresses + #4500. + + + [xry111] - Update to iana-etc-20240117. Addresses + #5006. + + + [xry111] - Update to shadow-4.14.3. Fixes + #5413. + + + [xry111] - Fix CVE-2024-0684 for coreutils-9.4. Fixes + #5417. + + + + + + 2024-01-18 + + + [xry111] - Edit a ncurses header to always use the + wide-character ABI compatible with libncursesw.so because we + are faking the 8-bit libncurses.so with it. Fixes + #5415. + + + + + + 2024-01-09 + + + [renodr] - Fix the definition of the C.UTF-8 locale. Fixes + #5409. + + + + + + 2023-12-31 + + + [xry111] - Add --enable-default-hash-style=gnu configuring + binutils. Fixes + #5401. + + + [xry111] - Fix CVE-2023-7008 for systemd-255. Fixes + #5405. + + + [xry111] - Update to iana-etc-20231205. Addresses + #5006. + + + [xry111] - Update to tzdata-2023d. Fixes + #5399. + + + [xry111] - Update to linux-6.6.8. Fixes + #5397. + + + [xry111] - Update to meson-1.3.1. Fixes + #5402. + + + [xry111] - Update to grub-2.12. Fixes + #5396. + + + [xry111] - Update to inetutils-2.5. Fixes + #5404. + + + [xry111] - Update to setuptools-69.0.3. Fixes + #5400. + + + [xry111] - Update to xml-parser-2.47. Fixes + #5403. + + + [xry111] - Update to vim-9.0.2189. Addresses + #4500. + + + [xry111] - Update to autoconf-2.72. Fixes + #5398. + + + + + + 2023-12-16 + + + [xry111] - Update to udev + from systemd-255. Fixes + #5390. + + + + + + 2023-12-14 + + + [bdubbs] - Update to util-linux v2.39.3. Fixes + #5388. + + + [bdubbs] - Update to python3-3.12.1. Fixes + #5392. + + + [bdubbs] - Update to linux-6.6.7. Fixes + #5387. + + + [bdubbs] - Update to kbd-2.6.4. Fixes + #5393. + + + [bdubbs] - Update to bc-6.7.4. Fixes + #5389. + + + [bdubbs] - Reformat util-linux configure parameters. Fixes + #5395. + + + + + + 2023-12-04 + + + [thomas] - Modify commands for install Python docs to avoid + too restrictive permissions on the files and dirs. + + + + + + 2023-12-01 + + + [xry111] - Restore NIC naming based on physical system + characteristics. Fixes + #5386. + + + + + + 2023-11-30 + + + [bdubbs] - Update to vim-9.0.2136. Addresses + #4500. + + + [bdubbs] - Update to iana-etc-20231117. Addresses + #5006. + + + [bdubbs] - Update to bc-6.7.3. Fixes + #5385. + + + [bdubbs] - Update to wheel-0.42.0 (Python Module). Fixes + #5384. + + + [bdubbs] - Update to perl-5.38.2. Fixes + #5383. + + + [bdubbs] - Update to pkgconf-2.1.0. Fixes + #5382. + + + [bdubbs] - Update to readline patches 002 through 007. Fixes + #5381. + + + [bdubbs] - Update to openssl-3.2.0. Fixes + #5380. + + + [bdubbs] - Update to setuptools-69.0.2. Fixes + #5379. + + + [bdubbs] - Update to linux-6.6.3. Fixes + #5378. + + + [bdubbs] - Update to meson-1.3.0. Fixes + #5377. + + + [bdubbs] - Update to gettext-0.22.4. Fixes + #5376. + + + + 2023-11-13 diff --git a/chapter01/chapter01.xml b/chapter01/chapter01.xml index 6af8ca1c6..d54b7adcd 100644 --- a/chapter01/chapter01.xml +++ b/chapter01/chapter01.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter01/how.xml b/chapter01/how.xml index fa054dd1d..69001d091 100644 --- a/chapter01/how.xml +++ b/chapter01/how.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter01/resources.xml b/chapter01/resources.xml index d3bc7860e..47a568626 100644 --- a/chapter01/resources.xml +++ b/chapter01/resources.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 0586b3d02..5faf938b7 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -1,4 +1,4 @@ - + None --> - - - + @@ -44,9 +44,9 @@ Bc-&bc-version; - + @@ -101,9 +101,9 @@ Gettext-&gettext-version; - + @@ -116,27 +116,27 @@ - + Gzip-&gzip-version; Iana-Etc-&iana-etc-version; - + IPRoute2-&iproute2-version; - + Kbd-&kbd-version; @@ -153,7 +153,7 @@ Libcap-&libcap-version; --> - Libelf-&elfutils-version; (from elfutils) + Libelf from Elfutils-&elfutils-version; - + Meson-&meson-version; @@ -191,9 +191,9 @@ MPFR-&mpfr-version; - + @@ -203,12 +203,12 @@ + + Perl-&perl-version; + Pkgconf-&pkgconf-version; - Procps-ng-&procps-ng-version; @@ -248,11 +248,11 @@ Texinfo-&texinfo-version; - + Util-linux-&util-linux-version; @@ -263,9 +263,9 @@ Wheel-&wheel-version; - + Xz-&xz-version; @@ -290,12 +290,20 @@ Added: + + &bash-upstream-fixes-patch; + + setuptools-&setuptools-version; - &glibc-upstream-fixes-patch; + &pkgconf-upstream-fix-patch; + + + + &readline-fixes-patch; @@ -308,6 +316,14 @@ glibc-2.38-memalign_fix-1.patch + + grub-2.06-upstream_fixes-1.patch + + + + readline-8.2-upstream_fix-1.patch + + diff --git a/chapter02/aboutlfs.xml b/chapter02/aboutlfs.xml index 04f2809f2..82c59188a 100644 --- a/chapter02/aboutlfs.xml +++ b/chapter02/aboutlfs.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter02/chapter02.xml b/chapter02/chapter02.xml index 3e30afa62..639c8f7af 100644 --- a/chapter02/chapter02.xml +++ b/chapter02/chapter02.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter02/creatingfilesystem.xml b/chapter02/creatingfilesystem.xml index 5eedf456e..9b1a08b2a 100644 --- a/chapter02/creatingfilesystem.xml +++ b/chapter02/creatingfilesystem.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter02/creatingpartition.xml b/chapter02/creatingpartition.xml index 35279cb75..f5bb244cb 100644 --- a/chapter02/creatingpartition.xml +++ b/chapter02/creatingpartition.xml @@ -1,4 +1,4 @@ - + @@ -40,7 +40,8 @@ /dev/sda for the primary disk drive. Create a Linux native partition and a swap partition, if needed. Please - refer to cfdisk(8) or fdisk(8) if + refer to cfdisk(8) or + fdisk(8) if you do not yet know how to use the programs. For experienced users, other partitioning schemes are possible. diff --git a/chapter02/hostreqs.xml b/chapter02/hostreqs.xml index 5a2bbf6ee..52f913f07 100644 --- a/chapter02/hostreqs.xml +++ b/chapter02/hostreqs.xml @@ -1,4 +1,4 @@ - + @@ -34,9 +34,10 @@ minimum versions indicated. This should not be an issue for most modern Linux distributions. Also note that many distributions will place software headers into separate packages, often in the form of - <package-name>-devel or - <package-name>-dev. Be sure to install those if - your distribution provides them. + <package-name>-devel + or + <package-name>-dev. + Be sure to install those if your distribution provides them. Earlier versions of the listed software packages may work, but have not been tested. diff --git a/chapter02/introduction.xml b/chapter02/introduction.xml index bddcfec61..f739613ff 100644 --- a/chapter02/introduction.xml +++ b/chapter02/introduction.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter02/mounting.xml b/chapter02/mounting.xml index 1c2e7205e..4db0f5bfc 100644 --- a/chapter02/mounting.xml +++ b/chapter02/mounting.xml @@ -1,4 +1,4 @@ - + @@ -16,7 +16,7 @@ LFS environment variable described in the previous section. - Strictly speaking, one cannot "mount a partition". One mounts the file + Strictly speaking, one cannot mount a partition. One mounts the file system embedded in that partition. But since a single partition can't contain more than one file system, people often speak of the partition and the associated file system as if they were one and the same. diff --git a/chapter02/stages.xml b/chapter02/stages.xml index aa9db5462..d6d8ec1a4 100644 --- a/chapter02/stages.xml +++ b/chapter02/stages.xml @@ -1,4 +1,4 @@ - + @@ -70,7 +70,7 @@ A few operations, from Preparing Virtual Kernel File Systems to - Setting up Environment, must be done. + Setting up Environment, must be done. diff --git a/chapter03/chapter03.xml b/chapter03/chapter03.xml index f9b36e2e2..ca3bc32ec 100644 --- a/chapter03/chapter03.xml +++ b/chapter03/chapter03.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter03/introduction.xml b/chapter03/introduction.xml index 0e90508ae..05488ecbc 100644 --- a/chapter03/introduction.xml +++ b/chapter03/introduction.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter03/packages.xml b/chapter03/packages.xml index deae31301..1f5b55427 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter03/patches.xml b/chapter03/patches.xml index 00628bda7..f05fbd604 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -1,4 +1,4 @@ - + @@ -27,14 +27,14 @@ --> - + + Glibc Upstream Fixes Patch - &glibc-upstream-fixes-patch-size;: @@ -84,7 +84,7 @@ MD5 sum: &glibc-upstream-fixes-patch-md5; - +--> Glibc FHS Patch - &glibc-fhs-patch-size;: @@ -93,14 +93,6 @@ - - GRUB Upstream Fixes Patch - &grub-upstream-fixes-patch-size;: - - Download: - MD5 sum: &grub-upstream-fixes-patch-md5; - - - Kbd Backspace/Delete Fix Patch - &kbd-backspace-patch-size;: @@ -125,15 +117,14 @@ --> - Readline Upstream Fix Patch - &readline-fixes-patch-size;: diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index fca3011fd..08b3cb121 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter04/abouttestsuites.xml b/chapter04/abouttestsuites.xml index 459472be0..734e1c378 100644 --- a/chapter04/abouttestsuites.xml +++ b/chapter04/abouttestsuites.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter04/addinguser.xml b/chapter04/addinguser.xml index 8bcc41883..0200338bf 100644 --- a/chapter04/addinguser.xml +++ b/chapter04/addinguser.xml @@ -1,4 +1,4 @@ - + @@ -96,6 +96,7 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs The - instructs su to start a login shell as opposed to a non-login shell. The difference between these two types of shells is described in detail in - bash(1) and info bash. + bash(1) and info + bash. diff --git a/chapter04/chapter04.xml b/chapter04/chapter04.xml index 5ad2d22db..fdb847efe 100644 --- a/chapter04/chapter04.xml +++ b/chapter04/chapter04.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter04/creatingminlayout.xml b/chapter04/creatingminlayout.xml index 4a88c9aac..c36a62bda 100644 --- a/chapter04/creatingminlayout.xml +++ b/chapter04/creatingminlayout.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter04/introduction.xml b/chapter04/introduction.xml index e2ef6f0ba..069df4008 100644 --- a/chapter04/introduction.xml +++ b/chapter04/introduction.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter04/settingenviron.xml b/chapter04/settingenviron.xml index 7f55da75f..736fa854f 100644 --- a/chapter04/settingenviron.xml +++ b/chapter04/settingenviron.xml @@ -1,4 +1,4 @@ - + @@ -79,8 +79,8 @@ EOF Setting the user file-creation mask (umask) to 022 ensures that newly created files and directories are only writable by their owner, but are readable and executable by anyone (assuming default modes are used by the - open(2) system call, new files will end up with permission - mode 644 and directories with mode 755). + open(2) system call, new files + will end up with permission mode 644 and directories with mode 755). @@ -227,7 +227,7 @@ EOF Never pass a -j option without a number to make or set such an option in MAKEFLAGS. Doing so will allow make - to spawn infinite build jobs and cause system stability issue. + to spawn infinite build jobs and cause system stability problems. diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index 65e8dd2ae..ef9f3948c 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -1,4 +1,4 @@ - + @@ -75,7 +75,8 @@ cd build --target=$LFS_TGT \ --disable-nls \ --enable-gprofng=no \ - --disable-werror + --disable-werror \ + --enable-default-hash-style=gnu The meaning of the configure options: @@ -132,6 +133,22 @@ cd build + + --enable-default-hash-style=gnu + + By default, the linker would generate both the GNU-style + hash table and the classic ELF hash table for shared libraries and + dynamically linked executables. The hash tables are only intended + for a dynamic linker to perform symbol lookup. On LFS the dynamic + linker (provided by the Glibc package) will always use the + GNU-style hash table which is faster to query. So the classic + ELF hash table is completely useless. This makes the linker + only generate the GNU-style hash table by default, so we can avoid + wasting time to generate the classic ELF hash table when we build + the packages, or wasting disk space to store it. + + + Continue with compiling the package: diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index 467a02a36..79d89a0a6 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index b490d5106..335507ca6 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index f927d187f..6e1db70e8 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -1,4 +1,4 @@ - + @@ -61,8 +61,9 @@ esac The above command is correct. The ln command has several syntactic versions, so be sure to check - info coreutils ln and ln(1) - before reporting what may appear to be an error. + info coreutils ln and ln(1) before reporting what may appear to be + an error. @@ -162,8 +163,8 @@ cd build Gettext package, which the host distribution should provide. There have been reports that this package may fail when - building as a "parallel make". If that occurs, rerun the make command - with the "-j1" option. + building as a parallel make. If that occurs, rerun the make command + with the option. Compile the package: diff --git a/chapter05/introduction.xml b/chapter05/introduction.xml index 0318acf8b..3a602d29e 100644 --- a/chapter05/introduction.xml +++ b/chapter05/introduction.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter05/libstdc++.xml b/chapter05/libstdc++.xml index 1dc4277ee..e16efdea9 100644 --- a/chapter05/libstdc++.xml +++ b/chapter05/libstdc++.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter05/linux-headers.xml b/chapter05/linux-headers.xml index f00cee315..71927b058 100644 --- a/chapter05/linux-headers.xml +++ b/chapter05/linux-headers.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/bash.xml b/chapter06/bash.xml index d00e685ca..54fa6f444 100644 --- a/chapter06/bash.xml +++ b/chapter06/bash.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/binutils-pass2.xml b/chapter06/binutils-pass2.xml index 983aaee2f..9832e154d 100644 --- a/chapter06/binutils-pass2.xml +++ b/chapter06/binutils-pass2.xml @@ -1,4 +1,4 @@ - + @@ -72,7 +72,8 @@ cd build --enable-shared \ --enable-gprofng=no \ --disable-werror \ - --enable-64-bit-bfd + --enable-64-bit-bfd \ + --enable-default-hash-style=gnu The meaning of the new configure options: diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index f5f587ffe..e72af3aea 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index f6b6c6310..9b246a5f4 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/diffutils.xml b/chapter06/diffutils.xml index d2b875a9d..92951604d 100644 --- a/chapter06/diffutils.xml +++ b/chapter06/diffutils.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/file.xml b/chapter06/file.xml index 425a9bf58..ada0dddeb 100644 --- a/chapter06/file.xml +++ b/chapter06/file.xml @@ -1,4 +1,4 @@ - + @@ -78,11 +78,6 @@ popd ./configure --prefix=/usr --host=$LFS_TGT --build=$(./config.guess) - Compile the package: make FILE_COMPILE=$(pwd)/build/src/file diff --git a/chapter06/findutils.xml b/chapter06/findutils.xml index 7bb0c7219..db8eea40e 100644 --- a/chapter06/findutils.xml +++ b/chapter06/findutils.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/gawk.xml b/chapter06/gawk.xml index 40d69548d..d44428d0a 100644 --- a/chapter06/gawk.xml +++ b/chapter06/gawk.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml index 5dad30971..4b61f824d 100644 --- a/chapter06/gcc-pass2.xml +++ b/chapter06/gcc-pass2.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/grep.xml b/chapter06/grep.xml index dd942c712..ac60ff8b3 100644 --- a/chapter06/grep.xml +++ b/chapter06/grep.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/gzip.xml b/chapter06/gzip.xml index d75f26928..9f5f170c4 100644 --- a/chapter06/gzip.xml +++ b/chapter06/gzip.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/introduction.xml b/chapter06/introduction.xml index a0ecb1ef1..bfa2dafd4 100644 --- a/chapter06/introduction.xml +++ b/chapter06/introduction.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/m4.xml b/chapter06/m4.xml index 91e0a9ea2..0bbd08079 100644 --- a/chapter06/m4.xml +++ b/chapter06/m4.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/make.xml b/chapter06/make.xml index cf0dbce18..eaf0db48f 100644 --- a/chapter06/make.xml +++ b/chapter06/make.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml index 9e7764ecf..0a8c7e166 100644 --- a/chapter06/ncurses.xml +++ b/chapter06/ncurses.xml @@ -1,4 +1,4 @@ - + @@ -78,7 +78,7 @@ popd --with-manpage-format=normal - This prevents Ncurses installing compressed manual + This prevents Ncurses from installing compressed manual pages, which may happen if the host distribution itself has compressed manual pages. @@ -94,7 +94,7 @@ popd --without-normal - This prevents Ncurses building and installing static C + This prevents Ncurses from building and installing static C libraries. @@ -102,7 +102,7 @@ popd --without-debug - This prevents Ncurses building and installing debug + This prevents Ncurses from building and installing debug libraries. @@ -156,7 +156,9 @@ popd Install the package: make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install -echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so +ln -sv libncursesw.so $LFS/usr/lib/libncurses.so +sed -e 's/^#if.*XOPEN.*$/#if 1/' \ + -i $LFS/usr/include/curses.h + mkdir -pv /dev/{pts,shm} -mount -vt devpts /dev/pts /dev/pts -o gid=5,mode=620 +mount -vt devpts devpts -o gid=5,mode=0620 /dev/pts mount -vt proc proc /proc mount -vt sysfs sysfs /sys mount -vt tmpfs tmpfs /run diff --git a/chapter07/perl.xml b/chapter07/perl.xml index c8e3d7c98..0c400bf12 100644 --- a/chapter07/perl.xml +++ b/chapter07/perl.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter07/python.xml b/chapter07/python.xml index d25432d1f..872cf4a36 100644 --- a/chapter07/python.xml +++ b/chapter07/python.xml @@ -1,4 +1,4 @@ - + @@ -44,8 +44,8 @@ Installation of Python - There are two package files whose name starts with - python. The one to extract from is + There are two package files whose name starts with the + python prefix. The one to extract from is Python-&python-version;.tar.xz (notice the uppercase first letter). @@ -83,9 +83,9 @@ Some Python 3 modules can't be built now because the dependencies - are not installed yet. The building system still attempts to build - them however, so the compilation of some files will fail and the - compiler message may seem to indicate fatal error. + are not installed yet. For the ssl module, + a message Python requires a OpenSSL 1.1.1 or + newer is outputted. The message should be ignored. Just make sure the toplevel make command has not failed. The optional modules are not needed now and they will be built in diff --git a/chapter07/texinfo.xml b/chapter07/texinfo.xml index 34a386416..309a20942 100644 --- a/chapter07/texinfo.xml +++ b/chapter07/texinfo.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter07/util-linux.xml b/chapter07/util-linux.xml index 2f88e7d5f..488635b7a 100644 --- a/chapter07/util-linux.xml +++ b/chapter07/util-linux.xml @@ -1,4 +1,4 @@ - + @@ -51,10 +51,8 @@ Prepare Util-linux for compilation: -./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ - --libdir=/usr/lib \ +./configure --libdir=/usr/lib \ --runstatedir=/run \ - --docdir=/usr/share/doc/util-linux-&util-linux-version; \ --disable-chfn-chsh \ --disable-login \ --disable-nologin \ @@ -63,7 +61,9 @@ --disable-runuser \ --disable-pylibmount \ --disable-static \ - --without-python + --without-python \ + ADJTIME_PATH=/var/lib/hwclock/adjtime \ + --docdir=/usr/share/doc/util-linux-&util-linux-version; The meaning of the configure options: diff --git a/chapter08/aboutdebug.xml b/chapter08/aboutdebug.xml index e9b90d64b..6eebdd65d 100644 --- a/chapter08/aboutdebug.xml +++ b/chapter08/aboutdebug.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/acl.xml b/chapter08/acl.xml index 6702af90f..adef493f1 100644 --- a/chapter08/acl.xml +++ b/chapter08/acl.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/attr.xml b/chapter08/attr.xml index 5272cfcb2..d54561fda 100644 --- a/chapter08/attr.xml +++ b/chapter08/attr.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/autoconf.xml b/chapter08/autoconf.xml index 38375665f..7c89fba01 100644 --- a/chapter08/autoconf.xml +++ b/chapter08/autoconf.xml @@ -1,4 +1,4 @@ - + @@ -41,12 +41,6 @@ Installation of Autoconf - First, fix several problems with the tests caused by bash-5.2 and later: - - sed -e 's/SECONDS|/&SHLVL|/' \ - -e '/BASH_ARGV=/a\ /^SHLVL=/ d' \ - -i.orig tests/local.at - Prepare Autoconf for compilation: ./configure --prefix=/usr @@ -61,17 +55,6 @@ To run the tests anyway, issue: --> make check - - The test time for autoconf can be reduced significantly on a - system with multiple cores. To do this, append - TESTSUITEFLAGS=-j<N> to the line above. For - instance, using -j4 can reduce the test time by over 60 - percent. Install the package: diff --git a/chapter08/automake.xml b/chapter08/automake.xml index 5d7541049..ed1907c55 100644 --- a/chapter08/automake.xml +++ b/chapter08/automake.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/bash.xml b/chapter08/bash.xml index a8bf2b871..1490e7791 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -1,4 +1,4 @@ - + @@ -40,6 +40,10 @@ Installation of Bash + First, fix some issues identified upstream: + +patch -Np1 -i ../&bash-upstream-fixes-patch; + Prepare Bash for compilation: ./configure --prefix=/usr \ @@ -71,7 +75,7 @@ To prepare the tests, ensure that the tester user can write to the sources tree: -chown -Rv tester . +chown -R tester . The test suite of this package is designed to be run as a non-&root; user who owns the terminal connected to standard input. To satisfy the @@ -79,7 +83,7 @@ Expect and run the tests as the tester user: -su -s /usr/bin/expect tester << EOF +su -s /usr/bin/expect tester << "EOF" set timeout -1 spawn make tests expect eof diff --git a/chapter08/bc.xml b/chapter08/bc.xml index 4677f06fd..3d8cd9983 100644 --- a/chapter08/bc.xml +++ b/chapter08/bc.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml index 1fd436bd1..0d770a6c8 100644 --- a/chapter08/binutils.xml +++ b/chapter08/binutils.xml @@ -1,4 +1,4 @@ - + @@ -57,9 +57,11 @@ cd build --enable-shared \ --disable-werror \ --enable-64-bit-bfd \ - --with-system-zlib + --with-system-zlib \ + --enable-default-hash-style=gnu + - The meaning of the configure parameters: + The meaning of the new configure parameters: --enable-gold @@ -84,14 +86,6 @@ cd build - - --enable-64-bit-bfd - - Enables 64-bit support (on hosts with narrower word sizes). - May not be needed on 64-bit systems, but does no harm. - - - --with-system-zlib @@ -145,7 +139,7 @@ cd build and options are passed to GCC. - Three tests in the gprofng suite are also known to fail. + Install the package: diff --git a/chapter08/bison.xml b/chapter08/bison.xml index 88bd90099..f466c76eb 100644 --- a/chapter08/bison.xml +++ b/chapter08/bison.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/bzip2.xml b/chapter08/bzip2.xml index e57fe61c4..21b8fd92c 100644 --- a/chapter08/bzip2.xml +++ b/chapter08/bzip2.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml index 2fccb6139..c3ded2719 100644 --- a/chapter08/chapter08.xml +++ b/chapter08/chapter08.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/check.xml b/chapter08/check.xml index cb6b3590d..1000aaa68 100644 --- a/chapter08/check.xml +++ b/chapter08/check.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/cleanup.xml b/chapter08/cleanup.xml index daa38f597..da1c61afc 100644 --- a/chapter08/cleanup.xml +++ b/chapter08/cleanup.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml index afd6672f9..1ade57e93 100644 --- a/chapter08/coreutils.xml +++ b/chapter08/coreutils.xml @@ -1,4 +1,4 @@ - + @@ -53,13 +53,13 @@ those bugs are reproducible without this patch. - - + Fix a security vulnerability in the split + utility: + +sed -e '/n_out += n_hold/,+4 s|.*bufsize.*|//&|' \ + -i src/split.c -sed '/if ( ! match/s/ed_checksums//' -i src/digest.c ---> Now prepare Coreutils for compilation: autoreconf -fiv @@ -126,7 +126,7 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ Fix some of the permissions so that the non-&root; user can compile and run the tests: -chown -Rv tester . +chown -R tester . Now run the tests: @@ -1266,8 +1266,8 @@ sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8 yes - Repeatedly outputs y, or a given string, until - killed + Repeatedly outputs y or a given string, + until killed yes diff --git a/chapter08/dbus.xml b/chapter08/dbus.xml index 8ab4744ad..36d5c55ca 100644 --- a/chapter08/dbus.xml +++ b/chapter08/dbus.xml @@ -1,4 +1,4 @@ - + @@ -56,7 +56,7 @@ --disable-static \ --disable-doxygen-docs \ --disable-xml-docs \ - --docdir=/usr/share/doc/dbus-&dbus-version; \ + --docdir=/usr/share/doc/dbus-&dbus-version; \ --with-system-socket=/run/dbus/system_bus_socket diff --git a/chapter08/dejagnu.xml b/chapter08/dejagnu.xml index 4dc422f3a..c9b537f0b 100644 --- a/chapter08/dejagnu.xml +++ b/chapter08/dejagnu.xml @@ -1,4 +1,4 @@ - + @@ -54,16 +54,16 @@ cd build makeinfo --html --no-split -o doc/dejagnu.html ../doc/dejagnu.texi makeinfo --plaintext -o doc/dejagnu.txt ../doc/dejagnu.texi - Build and install the package: + To test the results, issue: + +make check + + Install the package: make install install -v -dm755 /usr/share/doc/dejagnu-&dejagnu-version; install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-&dejagnu-version; - To test the results, issue: - -make check - diff --git a/chapter08/diffutils.xml b/chapter08/diffutils.xml index 2ffb9fa8c..b8cdf796f 100644 --- a/chapter08/diffutils.xml +++ b/chapter08/diffutils.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/e2fsprogs.xml b/chapter08/e2fsprogs.xml index 5d50508b5..c5718c191 100644 --- a/chapter08/e2fsprogs.xml +++ b/chapter08/e2fsprogs.xml @@ -1,4 +1,4 @@ - + @@ -159,7 +159,8 @@ install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.infosed 's/metadata_csum_seed,//' -i /etc/mke2fs.conf - Read the man page mke2fs.conf(5) for details. + Read the man page mke2fs.conf(5) for details. diff --git a/chapter08/expat.xml b/chapter08/expat.xml index 86dd1d287..34595aa5f 100644 --- a/chapter08/expat.xml +++ b/chapter08/expat.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/expect.xml b/chapter08/expect.xml index 7962576fa..5c21e390f 100644 --- a/chapter08/expect.xml +++ b/chapter08/expect.xml @@ -1,4 +1,4 @@ - + @@ -48,6 +48,25 @@ Installation of Expect + Expect needs PTYs to work. Verify that the PTYs are working + properly inside the chroot environment by performing a simple + test: + +python3 -c 'from pty import spawn; spawn(["echo", "ok"])' + + This command should output ok. + If, instead, the output includes OSError: out of pty + devices, then the environment is not set up for proper + PTY operation. You need to exit from the chroot environment, read + again, and ensure the + devpts file system (and + other virtual kernel file systems) mounted correctly. Then reenter + the chroot environment following . + This issue needs to be resolved before continuing, or the test suites + requring Expect (for example the test suites of Bash, Binutils, GCC, + GDBM, and of course Expect itself) will fail catastrophically, and other + subtle breakages may also happen. + Prepare Expect for compilation: ./configure --prefix=/usr \ @@ -82,26 +101,10 @@ make - - The test suite for Expect is considered critical. - Do not skip it under any circumstances. - - To test the results, issue: make test - If any test fails with the message - The system has no more ptys. Ask your system - administrator to create more, it indicates - you've not mounted the - devpts file system - correctly. You need to read - again and ensure the - devpts file system (and - other virtual kernel file systems) mounted correctly. - This issue needs to be resolved before continuing. - Install the package: make install diff --git a/chapter08/file.xml b/chapter08/file.xml index eb9f41a2b..790d0d0ef 100644 --- a/chapter08/file.xml +++ b/chapter08/file.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/findutils.xml b/chapter08/findutils.xml index 5440490cf..5671f6183 100644 --- a/chapter08/findutils.xml +++ b/chapter08/findutils.xml @@ -1,4 +1,4 @@ - + @@ -82,7 +82,7 @@ esac To test the results, issue: -chown -Rv tester . +chown -R tester . su tester -c "PATH=$PATH make check" Install the package: diff --git a/chapter08/flex.xml b/chapter08/flex.xml index 478637adc..ff90f0a1a 100644 --- a/chapter08/flex.xml +++ b/chapter08/flex.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/flit-core.xml b/chapter08/flit-core.xml index 661a02684..419efc30f 100644 --- a/chapter08/flit-core.xml +++ b/chapter08/flit-core.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/gawk.xml b/chapter08/gawk.xml index d8984b58e..bc19acaaf 100644 --- a/chapter08/gawk.xml +++ b/chapter08/gawk.xml @@ -1,4 +1,4 @@ - + @@ -54,7 +54,7 @@ To test the results, issue: -chown -Rv tester . +chown -R tester . su tester -c "PATH=$PATH make check" Install the package: diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 97d5fe1a0..43487ff91 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -1,4 +1,4 @@ - + @@ -157,7 +157,7 @@ cd build Test the results as a non-privileged user, but do not stop at errors: -chown -Rv tester . +chown -R tester . su tester -c "PATH=$PATH make -k check" To extract a summary of the test suite results, run: @@ -533,7 +533,7 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib libcc1 - The C preprocessing library + A library that allows GDB to make use of GCC libcc1 diff --git a/chapter08/gdbm.xml b/chapter08/gdbm.xml index 80961a65d..50fe62b77 100644 --- a/chapter08/gdbm.xml +++ b/chapter08/gdbm.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/gettext.xml b/chapter08/gettext.xml index bf5a97522..f26d15536 100644 --- a/chapter08/gettext.xml +++ b/chapter08/gettext.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index 69936c879..594fc28e2 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -1,4 +1,4 @@ - + @@ -49,12 +49,12 @@ store their runtime data in the FHS-compliant locations: patch -Np1 -i ../&glibc-fhs-patch; - + The Glibc documentation recommends building Glibc in a dedicated build directory: @@ -73,7 +73,6 @@ cd build --disable-werror \ --enable-kernel=&linux-major-version;.&linux-minor-version; \ --enable-stack-protector=strong \ - --with-headers=/usr/include \ --disable-nscd \ libc_cv_slibdir=/usr/lib @@ -104,15 +103,10 @@ cd build This option increases system security by adding extra code to check for buffer overflows, such as stack - smashing attacks. - - - - - --with-headers=/usr/include - - This option tells the build system where to find the - kernel API headers. + smashing attacks. Note that Glibc always explicitly overrides + the default of GCC, so this option is still needed even though + we've already specified for + GCC. @@ -208,6 +202,122 @@ esac sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile + + + If upgrading Glibc to a new minor version (for example, from + Glibc-2.36 to Glibc-&glibc-version;) on a running LFS system, you + need to take some extra precautions to avoid breaking the system: + + + + + + + Upgrading Glibc on a LFS system prior to 11.0 (exclusive) is + not supported. Rebuild LFS if you are running such an old LFS + system but you need a newer Glibc. + + + + + + + If upgrading on a LFS system prior to 12.0 (exclusive), install + Libxcrypt following + In addition to + a normal Libxcrypt installation, + you MUST follow the note in Libxcrypt + section to install + libcrypt.so.1* + (overwritting + libcrypt.so.1 from the + prior Glibc installation). + + + + + + + If upgrading on a LFS system prior to 12.1 (exclusive), + remove the nscd program: + + + rm -f /usr/sbin/nscd + + + If this system (prior to LFS 12.1, exclusive) is based on + Systemd, it's also needed to disable and stop the + nscd service now: + + + systemctl disable --now nscd + + + + + Upgrade the kernel and reboot if it's older than &min-kernel; + (check the current version with uname -r) + or if you want to upgrade it anyway, following + + + + + + + Upgrade the kernel API headers if it's older than &min-kernel; + (check the current version with + cat /usr/include/linux/version.h) + or if you want to upgrade it anyway, following + (but removing + $LFS from the cp command). + + + + + + + Perform a DESTDIR installation and upgrade + the Glibc shared libraries on the system using one single + install command: + + + make DESTDIR=$PWD/dest install +install -vm755 dest/usr/lib/*.so.* /usr/lib + + + + + It's imperative to strictly follow these steps above unless you + completely understand what you are doing. + Any unexpected deviation may render the + system completely unusable. YOU ARE WARNED. + + + + Then continue to run the make install command, + the sed command against + /usr/bin/ldd, and the commands to install + the locales. Once they are finished, reboot the system + immediately. + + + Install the package: make install @@ -246,7 +356,7 @@ install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service mkdir -pv /usr/lib/locale -localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true +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 @@ -298,7 +408,7 @@ localedef -i zh_TW -f UTF-8 zh_TW.UTF-8 when you need them. For instance, the following two locales are needed for some tests later in this chapter: -localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true +localedef -i C -f UTF-8 C.UTF-8 localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true Glibc now uses libidn2 when resolving internationalized diff --git a/chapter08/gmp.xml b/chapter08/gmp.xml index c2fd316f8..15274cf4b 100644 --- a/chapter08/gmp.xml +++ b/chapter08/gmp.xml @@ -1,4 +1,4 @@ - + @@ -58,7 +58,7 @@ to the configure command. @@ -106,8 +106,9 @@ make html The code in gmp is highly optimized for the processor where it is built. Occasionally, the code that detects the processor misidentifies the system capabilities and there will be errors in the tests or other - applications using the gmp libraries with the message "Illegal - instruction". In this case, gmp should be reconfigured with the option + applications using the gmp libraries with the message + Illegal instruction. + In this case, gmp should be reconfigured with the option and rebuilt. To test the results, issue: -chown -Rv tester . +chown -R tester . su tester -c "PATH=$PATH make check" Install the package: diff --git a/chapter08/man-db.xml b/chapter08/man-db.xml index 229111131..e6d141987 100644 --- a/chapter08/man-db.xml +++ b/chapter08/man-db.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/man-pages.xml b/chapter08/man-pages.xml index 19772f414..54029fd2d 100644 --- a/chapter08/man-pages.xml +++ b/chapter08/man-pages.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/markupsafe.xml b/chapter08/markupsafe.xml index c09b9a64c..685b7b520 100644 --- a/chapter08/markupsafe.xml +++ b/chapter08/markupsafe.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/meson.xml b/chapter08/meson.xml index 8cf308237..89e3a5bdc 100644 --- a/chapter08/meson.xml +++ b/chapter08/meson.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/mpc.xml b/chapter08/mpc.xml index 941ee041c..f35378359 100644 --- a/chapter08/mpc.xml +++ b/chapter08/mpc.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/mpfr.xml b/chapter08/mpfr.xml index cba4a64aa..9e7f75825 100644 --- a/chapter08/mpfr.xml +++ b/chapter08/mpfr.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml index b51099001..40589c58a 100644 --- a/chapter08/ncurses.xml +++ b/chapter08/ncurses.xml @@ -1,4 +1,4 @@ - + @@ -99,9 +99,9 @@ --enable-widec This switch causes wide-character libraries (e.g., libncursesw.so.&ncurses-version;) + class="libraryfile">libncursesw.so.&ncurses-release;) to be built instead of normal ones (e.g., libncurses.so.&ncurses-version;). + class="libraryfile">libncurses.so.&ncurses-release;). These wide-character libraries are usable in both multibyte and traditional 8-bit locales, while normal libraries work properly only in 8-bit locales. Wide-character and normal libraries are @@ -127,34 +127,39 @@ make will spawn new shell processes during "make install". --> The installation of this package will overwrite - libncursesw.so.&ncurses-version; + libncursesw.so.&ncurses-release; in-place. It may crash the shell process which is using code and data from the library file. Install the package with DESTDIR, and replace the library file correctly using - install command: + install command (the header + curses.h is also edited to ensure the + wide-character ABI to be used as what we've done in + ): make DESTDIR=$PWD/dest install -install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib -rm -v dest/usr/lib/libncursesw.so.&ncurses-version; +install -vm755 dest/usr/lib/libncursesw.so.&ncurses-release; /usr/lib +rm -v dest/usr/lib/libncursesw.so.&ncurses-release; +sed -e 's/^#if.*XOPEN.*$/#if 1/' \ + -i dest/usr/include/curses.h cp -av dest/* / Many applications still expect the linker to be able to find - non-wide-character Ncurses libraries. Trick such applications into linking with - wide-character libraries by means of symlinks and linker scripts: + non-wide-character Ncurses libraries. Trick such applications into + linking with wide-character libraries by means of symlinks + (note that the .so links are + only safe with curses.h edited to always use the + wide-character ABI): for lib in ncurses form panel menu ; do - rm -vf /usr/lib/lib${lib}.so - echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so - ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc + ln -sfv lib${lib}w.so /usr/lib/lib${lib}.so + ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc done Finally, make sure that old applications that look for -lcurses at build time are still buildable: -rm -vf /usr/lib/libcursesw.so -echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so -ln -sfv libncurses.so /usr/lib/libcurses.so +ln -sfv libncursesw.so /usr/lib/libcurses.so If desired, install the Ncurses documentation: @@ -206,13 +211,17 @@ cp -av lib/lib*.so.5* /usr/lib tset - libcursesw.so (symlink and linker script to libncursesw.so), + libcurses.so (symlink), + libform.so (symlink), libformw.so, + libmenu.so (symlink), libmenuw.so, + libncurses.so (symlink), libncursesw.so, libncurses++w.so, - libpanelw.so, and their non-wide-character counterparts without "w" - in the library names. + libpanel.so (symlink), + and libpanelw.so, + /usr/share/tabset, /usr/share/terminfo, and @@ -342,16 +351,6 @@ cp -av lib/lib*.so.5* /usr/lib - - libcursesw - - A link to libncursesw - - libcursesw - - - - libncursesw diff --git a/chapter08/ninja.xml b/chapter08/ninja.xml index 4aca7b8c7..106e63970 100644 --- a/chapter08/ninja.xml +++ b/chapter08/ninja.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/openssl.xml b/chapter08/openssl.xml index 25295f056..446dd226a 100644 --- a/chapter08/openssl.xml +++ b/chapter08/openssl.xml @@ -1,4 +1,4 @@ - + @@ -163,7 +163,7 @@ make MANSUFFIX=ssl install is a command-line tool for using the various cryptography functions of OpenSSL's crypto library from the shell. It can be used for various functions which are documented in - man 1 openssl + openssl(1) openssl @@ -195,7 +195,8 @@ make MANSUFFIX=ssl install implements the Transport Layer Security (TLS v1) protocol. It provides a rich API, documentation - on which can be found by running man 7 ssl + on which can be found in ssl(7) libssl.so diff --git a/chapter08/patch.xml b/chapter08/patch.xml index 870007b98..239038094 100644 --- a/chapter08/patch.xml +++ b/chapter08/patch.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/perl.xml b/chapter08/perl.xml index 2bb849645..34c6ed32a 100644 --- a/chapter08/perl.xml +++ b/chapter08/perl.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/pkgconf.xml b/chapter08/pkgconf.xml index b95d7ab2c..139e0c810 100644 --- a/chapter08/pkgconf.xml +++ b/chapter08/pkgconf.xml @@ -1,4 +1,4 @@ - + @@ -45,9 +45,9 @@ Installation of Pkgconf - Fix a regression in pkgconf-2.0.3 breaking BLFS packages: + Fix a regression in pkgconf-2.1.0 breaking BLFS packages: - sed -i 's/str\(cmp.*package\)/strn\1, strlen(pkg->why)/' cli/main.c + patch -Np1 -i ../&pkgconf-upstream-fix-patch; Prepare Pkgconf for compilation: diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml index 185538796..10ec5d199 100644 --- a/chapter08/pkgmgt.xml +++ b/chapter08/pkgmgt.xml @@ -1,4 +1,4 @@ - + @@ -56,28 +56,16 @@ 5.10.17 to 5.10.18 or 5.11.1), nothing else needs to be rebuilt. The system will keep working fine thanks to the well-defined interface between the kernel and userspace. Specifically, Linux API headers - need not be (and should not be, see the next item) upgraded + need not be upgraded along with the kernel. You will merely need to reboot your system to use the upgraded kernel. - If the Linux API headers or Glibc need to be upgraded to a newer - version, (e.g., from Glibc-2.31 to Glibc-2.32), it is safer to - rebuild LFS. Though you may be able to rebuild - all the packages in their dependency order, we do not recommend - it. - - - - Reinstalling the same version of Glibc (&glibc-version; for - this release of LFS) with patches should be safe when these patches - do not change ABI and API. When a security vulnerability is found - in Glibc, we often need to apply such a patch to fix the - vulnerability and reinstall Glibc. Consult - LFS security - advisories if you are alerted for a published Glibc security - vulnerability but unsure about the action to take. + If Glibc needs to be upgraded to a newer + version, (e.g., from Glibc-2.36 to Glibc-&glibc-version;), + some extra steps are needed to avoid breaking the system. + Read for details. If a package containing a shared library is updated, and diff --git a/chapter08/procps.xml b/chapter08/procps.xml index 7fc74f587..0d2537054 100644 --- a/chapter08/procps.xml +++ b/chapter08/procps.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/psmisc.xml b/chapter08/psmisc.xml index cbf7609f3..b1aa31d0c 100644 --- a/chapter08/psmisc.xml +++ b/chapter08/psmisc.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/python.xml b/chapter08/python.xml index f7bc19d47..7ac618c09 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -1,4 +1,4 @@ - + @@ -155,21 +155,21 @@ EOF install -v -dm755 /usr/share/doc/python-&python-version;/html -tar --strip-components=1 \ - --no-same-owner \ - --no-same-permissions \ - -C /usr/share/doc/python-&python-version;/html \ - -xvf ../python-&python-version;-docs-html.tar.bz2 +tar --no-same-owner \ + -xvf ../python-&python-version;-docs-html.tar.bz2 +cp -R --no-preserve=mode python-&python-version;-docs-html/* \ + /usr/share/doc/python-&python-version;/html The meaning of the documentation install commands: - and + (tar) and (cp) Ensure the installed files have the correct ownership and permissions. Without these options, tar - will install the package files with the upstream creator's values. + will install the package files with the upstream creator's values + and files would have restrictive permissions. diff --git a/chapter08/readline.xml b/chapter08/readline.xml index ea073308d..1fb7474c1 100644 --- a/chapter08/readline.xml +++ b/chapter08/readline.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/sed.xml b/chapter08/sed.xml index 629b83465..75d015600 100644 --- a/chapter08/sed.xml +++ b/chapter08/sed.xml @@ -1,4 +1,4 @@ - + @@ -51,7 +51,7 @@ make html To test the results, issue: -chown -Rv tester . +chown -R tester . su tester -c "PATH=$PATH make check" Install the package and its documentation: diff --git a/chapter08/setuptools.xml b/chapter08/setuptools.xml index 257a50328..dfb31c5b8 100644 --- a/chapter08/setuptools.xml +++ b/chapter08/setuptools.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml index 315234c7f..89678b3f4 100644 --- a/chapter08/shadow.xml +++ b/chapter08/shadow.xml @@ -1,4 +1,4 @@ - + @@ -203,8 +203,8 @@ make -C man install-man to pass either the -g or -N parameter to useradd, or else change the setting of USERGROUPS_ENAB in - /etc/login.defs. See useradd(8) - for more information. + /etc/login.defs. See useradd(8) for more information. Second, to change the default parameters, the file /etc/default/useradd must be created and tailored diff --git a/chapter08/stripping.xml b/chapter08/stripping.xml index b7b983d73..5ce0235d3 100644 --- a/chapter08/stripping.xml +++ b/chapter08/stripping.xml @@ -1,4 +1,4 @@ - + @@ -52,7 +52,7 @@ The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems and ld-linux.so.2 on 32-bit systems. The construct below selects the correct name for the current architecture, excluding anything ending - with g, in case the commands below have already been + with g, in case the commands below have already been run. diff --git a/chapter08/sysklogd.xml b/chapter08/sysklogd.xml index 89fc314ed..131b7e7fc 100644 --- a/chapter08/sysklogd.xml +++ b/chapter08/sysklogd.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index 761467acd..5bc2a3553 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -1,4 +1,4 @@ - + @@ -48,6 +48,13 @@ 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: + +sed -e '/return FLAGS_SET.*AUTHENTICATED/s/(t/(dt/' \ + -i src/resolve/resolved-dns-transaction.c + Prepare systemd for compilation: mkdir -p build @@ -62,13 +69,15 @@ meson setup \ -Dldconfig=false \ -Dsysusers=false \ -Drpmmacrosdir=no \ - -Dhomed=false \ + -Dhomed=disabled \ -Duserdb=false \ - -Dman=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; \ .. @@ -139,7 +148,8 @@ meson setup \ - -D{userdb,homed}=false + -Dhomed=disabled and + -Duserdb=false Remove two daemons with dependencies that do not fit within the scope of LFS. @@ -147,7 +157,7 @@ meson setup \ - -Dman=false + -Dman=disabled Prevent the generation of man pages to avoid extra dependencies. We will install pre-generated man pages for systemd @@ -187,6 +197,28 @@ meson setup \ nogroup. + + + -Dsysupdate=disabled + + Do not install the systemd-sysupdate + tool. It's designed for automatically upgrading binary distros, + so it's useless for a basic Linux system built from source. + And it will report errors on boot if it's enabled but not properly + configured. + + + + + -Dukify=disabled + + Do not install the systemd-ukify script. + At runtime this script requires the + pefile Python module that neither LFS + nor BLFS provides. + + + Compile the package: @@ -214,12 +246,6 @@ meson setup \ systemctl preset-all - Disable two services for upgrading binary distros. They are useless for - a basic Linux system built from source, and each one will report an error if - it's enabled but not configured: - -systemctl disable systemd-sysupdate{,-reboot} - - The test time for Tar can be reduced significantly on a - system with multiple cores. To do this, append - TESTSUITEFLAGS=-j<N> to the line above. For - instance, using -j4 can reduce the test time by over 70 - percent. - One test, capabilities: binary store/restore, is known to fail if it is run because LFS lacks selinux, but will be skipped if the host kernel does not support extended attributes or security labels on the filesystem diff --git a/chapter08/tcl.xml b/chapter08/tcl.xml index 5cf4e0d13..8a7884804 100644 --- a/chapter08/tcl.xml +++ b/chapter08/tcl.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/texinfo.xml b/chapter08/texinfo.xml index 5eebeb0e3..0269bbe88 100644 --- a/chapter08/texinfo.xml +++ b/chapter08/texinfo.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/udev.xml b/chapter08/udev.xml index 46ab88cff..98ee48cf2 100644 --- a/chapter08/udev.xml +++ b/chapter08/udev.xml @@ -1,4 +1,4 @@ - + @@ -55,6 +55,11 @@ sed '/systemd-sysctl/s/^/#/' -i rules.d/99-systemd.rules.in + Adjust the hardcoded paths to network configuration files for the + standalone udev installation: + + sed '/NETWORK_DIRS/s/systemd/udev/' -i src/basic/path-lookup.h + Prepare Udev for compilation: mkdir -p build @@ -120,15 +125,23 @@ meson setup \ + Get the list of the shipped udev helpers and save it into an + environment variable (exporting it is not strictly necessary, but it makes + building as a regular user or using a package manager easier): + + export udev_helpers=$(grep "'name' :" ../src/udev/meson.build | \ + awk '{print $3}' | tr -d ",'" | grep -v 'udevadm') + Only build the components needed for udev: ninja udevadm systemd-hwdb \ $(ninja -n | grep -Eo '(src/(lib)?udev|rules.d|hwdb.d)/[^ ]*') \ - $(realpath libudev.so --relative-to .) + $(realpath libudev.so --relative-to .) \ + $udev_helpers Install the package: - install -vm755 -d {/usr/lib,/etc}/udev/{hwdb,rules}.d + install -vm755 -d {/usr/lib,/etc}/udev/{hwdb.d,rules.d,network} install -vm755 -d /usr/{lib,share}/pkgconfig install -vm755 udevadm /usr/bin/ install -vm755 systemd-hwdb /usr/bin/udev-hwdb @@ -142,8 +155,8 @@ install -vm644 rules.d/* ../rules.d/README /usr/lib/udev/rules.d/ install -vm644 $(find ../rules.d/*.rules \ -not -name '*power-switch*') /usr/lib/udev/rules.d/ install -vm644 hwdb.d/* ../hwdb.d/{*.hwdb,README} /usr/lib/udev/hwdb.d/ -install -vm755 $(find src/udev \ - -type f -not -name '*.*') /usr/lib/udev +install -vm755 $udev_helpers /usr/lib/udev +install -vm644 ../network/99-default.link /usr/lib/udev/network Install some custom rules and support files useful in an LFS environment: @@ -158,13 +171,27 @@ make -f &udev-lfs-version;/Makefile.lfs install tar -xf ../../systemd-man-pages-&systemd-man-version;.tar.xz \ --no-same-owner --strip-components=1 \ -C /usr/share/man --wildcards '*/udev*' '*/libudev*' \ + '*/systemd.link.5' \ '*/systemd-'{hwdb,udevd.service}.8 + +sed 's|systemd/network|udev/network|' \ + /usr/share/man/man5/systemd.link.5 \ + > /usr/share/man/man5/udev.link.5 + sed 's/systemd\(\\\?-\)/udev\1/' /usr/share/man/man8/systemd-hwdb.8 \ > /usr/share/man/man8/udev-hwdb.8 + sed 's|lib.*udevd|sbin/udevd|' \ /usr/share/man/man8/systemd-udevd.service.8 \ > /usr/share/man/man8/udevd.8 -rm /usr/share/man/man8/systemd-*.8 + +rm /usr/share/man/man*/systemd* + + Finally, unset the udev_helpers variable: + + + unset udev_helpers diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml index a6d058aff..4c53b4eb5 100644 --- a/chapter08/util-linux.xml +++ b/chapter08/util-linux.xml @@ -1,4 +1,4 @@ - + @@ -48,8 +48,7 @@ Prepare Util-linux for compilation: -./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ - --bindir=/usr/bin \ +./configure --bindir=/usr/bin \ --libdir=/usr/lib \ --runstatedir=/run \ --sbindir=/usr/sbin \ @@ -63,11 +62,11 @@ --disable-static \ --without-python \ --without-systemd \ - --without-systemdsystemunitdir \ + --without-systemdsystemunitdir \ + ADJTIME_PATH=/var/lib/hwclock/adjtime \ --docdir=/usr/share/doc/util-linux-&util-linux-version; -./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ - --bindir=/usr/bin \ +./configure --bindir=/usr/bin \ --libdir=/usr/lib \ --runstatedir=/run \ --sbindir=/usr/sbin \ @@ -80,6 +79,7 @@ --disable-pylibmount \ --disable-static \ --without-python \ + ADJTIME_PATH=/var/lib/hwclock/adjtime \ --docdir=/usr/share/doc/util-linux-&util-linux-version; The --disable and --without options prevent warnings about @@ -103,7 +103,7 @@ bash tests/run.sh --srcdir=$PWD --builddir=$PWD -chown -Rv tester . +chown -R tester . su tester -c "make -k check" The hardlink tests will fail if the host's kernel @@ -584,7 +584,8 @@ su tester -c "make -k check" irqtop Displays kernel interrupt counter information in - top(1) style view + top(1) style + view irqtop diff --git a/chapter08/vim.xml b/chapter08/vim.xml index 8672ad818..030c50442 100644 --- a/chapter08/vim.xml +++ b/chapter08/vim.xml @@ -1,4 +1,4 @@ - + @@ -66,7 +66,7 @@ tester can write to the source tree: -chown -Rv tester . +chown -R tester . Now run the tests as user tester: diff --git a/chapter08/wheel.xml b/chapter08/wheel.xml index 0f3a1c99e..605cda1be 100644 --- a/chapter08/wheel.xml +++ b/chapter08/wheel.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/xml-parser.xml b/chapter08/xml-parser.xml index 62053d566..8b3dd434d 100644 --- a/chapter08/xml-parser.xml +++ b/chapter08/xml-parser.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/xz.xml b/chapter08/xz.xml index 362c667dc..316b8558e 100644 --- a/chapter08/xz.xml +++ b/chapter08/xz.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/zlib.xml b/chapter08/zlib.xml index 604d5d503..6208a6172 100644 --- a/chapter08/zlib.xml +++ b/chapter08/zlib.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter08/zstd.xml b/chapter08/zstd.xml index ae793a34b..1a76103e5 100644 --- a/chapter08/zstd.xml +++ b/chapter08/zstd.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter09/bootscripts.xml b/chapter09/bootscripts.xml index fbffa76df..b4113728f 100644 --- a/chapter09/bootscripts.xml +++ b/chapter09/bootscripts.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter09/chapter09.xml b/chapter09/chapter09.xml index 499e66a6f..3f4db0d6b 100644 --- a/chapter09/chapter09.xml +++ b/chapter09/chapter09.xml @@ -1,4 +1,4 @@ - + @@ -26,14 +26,13 @@ - - + diff --git a/chapter09/clock.xml b/chapter09/clock.xml index 01f0efef9..be60684fb 100644 --- a/chapter09/clock.xml +++ b/chapter09/clock.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter09/consoled.xml b/chapter09/consoled.xml index c7e4ab9ad..ce922d6a8 100644 --- a/chapter09/consoled.xml +++ b/chapter09/consoled.xml @@ -1,4 +1,4 @@ - + @@ -30,7 +30,7 @@ directory for valid screen fonts. The /etc/vconsole.conf file should contain lines - of the form: VARIABLE="value". The following variables are recognized: + of the form: VARIABLE=value. The following variables are recognized: @@ -74,6 +74,25 @@ + We'll use C.UTF-8 as the locale for interactive + sessions in the Linux console in The console fonts shipped by + the Kbd package containing the glyphs for + all characters from the program messages in the C.UTF-8 + locale are LatArCyrHeb*.psfu.gz, + LatGrkCyr*.psfu.gz, + Lat2-Terminus16.psfu.gz, and + pancyrillic.f16.psfu.gz in + /usr/share/consolefonts (the other + shipped console fonts lack glyphs of some characters like the Unicode + left/right quotation marks and the Unicode English dash). So set one of + them, for example Lat2-Terminus16.psfu.gz as the + default console font: + + +echo FONT=Lat2-Terminus16 > /etc/vconsole.conf + An example for a German keyboard and console is given below: - Some packages beyond LFS may also lack support for your chosen locale. One - example is the X library (part of the X Window System), which outputs the - following error message if the locale does not exactly match one of the character - map names in its internal files: - -Warning: locale not supported by Xlib, locale set to C - - In several cases Xlib expects that the character map will be listed in - uppercase notation with canonical dashes. For instance, "ISO-8859-1" rather - than "iso88591". It is also possible to find an appropriate specification by - removing the charmap part of the locale specification. This can be checked - by running the locale charmap command in both locales. - For example, one would have to change "de_DE.ISO-8859-15@euro" to - "de_DE@euro" in order to get this locale recognized by Xlib. - Other packages can also function incorrectly (but may not necessarily display any error messages) if the locale name does not meet their expectations. In those cases, investigating how other Linux distributions support your locale might provide some useful information. - Once the proper locale settings have been determined, create the - /etc/locale.conf file: + Once the proper locale settings have been + determined, create the /etc/locale.conf file: -cat > /etc/locale.conf << "EOF" +cat > /etc/locale.conf << "EOF" LANG=<ll>_<CC>.<charmap><@modifiers> EOF - Note that you can modify /etc/locale.conf with the + The shell program /bin/bash (here after referred + as the shell) uses a collection of startup files to help + create the environment to run in. Each file has a specific use and may + affect login and interactive environments differently. The files in the + /etc directory provide global + settings. If equivalent files exist in the home directory, they + may override the global settings. + + An interactive login shell is started after a successful login, + using /bin/login, by reading the + /etc/passwd file. An interactive non-login shell is + started at the command-line (e.g. + [prompt]$/bin/bash). A + non-interactive shell is usually present when a shell script is running. + It is non-interactive because it is processing a script and not waiting + for user input between commands. + + The login shells are often unaffected by + the settings in /etc/locale.conf. Create the + /etc/profile + once the proper locale settings have been + determined to set the desired localeto read the locale settings from + /etc/locale.conf and export them, + but set the C.UTF-8 locale instead if running in the Linux + console (to prevent programs from outputting characters that the Linux + console is unable to render): + +cat > /etc/profile << "EOF" +# Begin /etc/profile + +for i in $(locale); do + unset ${i%=*} +done + +if [[ "$TERM" = linux ]]; then + export LANG=C.UTF-8 +else + source /etc/locale.conf + + for i in $(locale); do + key=${i%=*} + if [[ -v $key ]]; then + export $key + fi + done +fi + +# End /etc/profile +EOF + +cat > /etc/profile << "EOF" +# Begin /etc/profile + +for i in $(locale); do + unset ${i%=*} +done + +if [[ "$TERM" = linux ]]; then + export LANG=C.UTF-8 +else + export LANG=<ll>_<CC>.<charmap><@modifiers> +fi + +# End /etc/profile +EOF + + Note that you can modify /etc/locale.conf with the systemd localectl utility. To use localectl for the example above, run: -localectl set-locale LANG="<ll>_<CC>.<charmap><@modifiers>" +localectl set-locale LANG="<ll>_<CC>.<charmap><@modifiers>" - You can also specify other language specific environment variables such - as LANG, LC_CTYPE, LC_NUMERIC or - any other environment variable from locale output. Just - separate them with a space. An example where LANG is set as + You can also specify other language specific + environment variables such as LANG, + LC_CTYPE, LC_NUMERIC or any other + environment variable from locale output. Just separate + them with a space. An example where LANG is set as en_US.UTF-8 but LC_CTYPE is set as just en_US is: -localectl set-locale LANG="en_US.UTF-8" LC_CTYPE="en_US" +localectl set-locale LANG="en_US.UTF-8" LC_CTYPE="en_US" - Please note that the localectl command - doesn't work in the chroot environment. It can only - be used after the LFS system is booted with systemd. + Please note that the + localectl command doesn't work in the chroot + environment. It can only be used after the LFS system is booted with + systemd. - The C (default) and en_US (the recommended - one for United States English users) locales are different. C + The C (default) and en_US + (the recommended one for United States English users) locales are + different. C uses the US-ASCII 7-bit character set, and treats bytes with the high bit set as invalid characters. That's why, e.g., the ls command substitutes them with question marks in that locale. Also, an attempt to send mail with such characters from Mutt or Pine results in non-RFC-conforming - messages being sent (the charset in the outgoing mail is indicated as unknown - 8-bit). It's suggested that you use the C locale only + messages being sent (the charset in the outgoing mail is indicated as + unknown 8-bit). It's suggested that you + use the C locale only if you are certain that you will never need 8-bit characters. - - diff --git a/chapter09/network.xml b/chapter09/network.xml index 541ece699..a443ada2c 100644 --- a/chapter09/network.xml +++ b/chapter09/network.xml @@ -1,4 +1,4 @@ - + @@ -62,9 +62,9 @@ EOF The values in italics must be changed in each file, to set the interfaces up correctly. - If the ONBOOT variable is set to yes the + If the ONBOOT variable is set to yes the System V network script will bring up the Network Interface Card (NIC) during - the system boot process. If set to anything besides yes, the NIC + the system boot process. If set to anything besides yes, the NIC will be ignored by the network script and will not be started automatically. Interfaces can be manually started or stopped with the ifup and ifdown commands. diff --git a/chapter09/networkd.xml b/chapter09/networkd.xml index 27f15e815..6c2935de1 100644 --- a/chapter09/networkd.xml +++ b/chapter09/networkd.xml @@ -1,4 +1,4 @@ - + @@ -50,9 +50,11 @@ .netdev and .network files. For detailed descriptions and example contents of these configuration files, consult - the systemd-link(5), - systemd-netdev(5) and - systemd-network(5) manual pages. + the systemd-link(5), + systemd-netdev(5), + and systemd-network(5) manual + pages. Network Device Naming @@ -89,18 +91,20 @@ - Mask udev's .link file for the default policy: + Mask udev's .link file + for the default policy: ln -s /dev/null /etc/systemd/network/99-default.link - Create a manual naming scheme, for example by naming the - interfaces something like "internet0", "dmz0", or "lan0". - To do that, create .link files in /etc/systemd/network/ that - select an explicit name or a better naming scheme for your - network interfaces. For example: + Create a manual naming scheme, for example by naming the + interfaces something like internet0, + dmz0, or lan0. + To do that, create .link + files in /etc/systemd/network/ that select an explicit name or a + better naming scheme for your network interfaces. For example: cat > /etc/systemd/network/10-ether0.link << "EOF" @@ -113,14 +117,14 @@ Name=ether0 EOF - See the man page systemd.link(5) for more information. + See systemd.link(5) for more information. - In /boot/grub/grub.cfg, pass the option net.ifnames=0 on the - kernel command line. + In /boot/grub/grub.cfg, pass the option + on the kernel command line. @@ -357,7 +361,9 @@ EOF localhost.localdomain, or the hostname (without a domain) because they are handled by the myhostname NSS module, read - the man page nss-myhostname(8) for details. + the man page nss-myhostname(8) for + details. The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents the IPv6 loopback interface. diff --git a/chapter09/profile.xml b/chapter09/profile.xml deleted file mode 100644 index 1b87632f7..000000000 --- a/chapter09/profile.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - %general-entities; -]> - - - - - The Bash Shell Startup Files - - - /etc/profile - - - The shell program /bin/bash (hereafter referred to - as the shell) uses a collection of startup files to help - create the environment to run in. Each file has a specific use and may affect - login and interactive environments differently. The files in the /etc directory provide global settings. If - equivalent files exist in the home directory, they may override the global - settings. - - An interactive login shell is started after a successful login, using - /bin/login, by reading the /etc/passwd - file. An interactive non-login shell is started at the command-line (e.g., - [prompt]$/bin/bash). A non-interactive - shell is usually present when a shell script is running. It is non-interactive - because it is processing a script and not waiting for user input between - commands. - -For more information, see the Bash Startup Files and - Interactive Shells sections in the Bash - Features chapter of the Bash info pages (info bash). - - The files /etc/profile and - ~/.bash_profile are read when the shell is - invoked as an interactive login shell. - - The base /etc/profile below sets some - environment variables necessary for native language support. Setting - them properly results in: - - - - The output of programs translated into the native language - - - Correct classification of characters into letters, digits and other - classes. This is necessary for bash to properly accept - non-ASCII characters in command lines in non-English locales - - - The correct alphabetical sorting order for the country - - - Appropriate default paper size - - - Correct formatting of monetary, time, and date values - - - - Replace <ll> below with the two-letter code - for the desired language (e.g., en) and - <CC> with the two-letter code for the appropriate - country (e.g., GB). <charmap> should - be replaced with the canonical charmap for your chosen locale. Optional - modifiers such as @euro may also be present. - - The list of all locales supported by Glibc can be obtained by running - the following command: - -locale -a - - Charmaps can have a number of aliases, e.g., ISO-8859-1 - is also referred to as iso8859-1 and iso88591. - Some applications cannot handle the various synonyms correctly (e.g., require - that UTF-8 is written as UTF-8, not - utf8), so it is safest in most - cases to choose the canonical name for a particular locale. To determine - the canonical name, run the following command, where <locale - name> is the output given by locale -a for - your preferred locale (en_GB.iso88591 in our example). - -LC_ALL=<locale name> locale charmap - - For the en_GB.iso88591 locale, the above command - will print: - -ISO-8859-1 - - This results in a final locale setting of en_GB.ISO-8859-1. - It is important that the locale found using the heuristic above is tested before - it is added to the Bash startup files: - -LC_ALL=<locale name> locale language -LC_ALL=<locale name> locale charmap -LC_ALL=<locale name> locale int_curr_symbol -LC_ALL=<locale name> locale int_prefix - - The above commands should print the language name, the character - encoding used by the locale, the local currency, and the prefix to dial - before the telephone number in order to get into the country. If any of the - commands above fail with a message similar to the one shown below, this means - that your locale was either not installed in - or is not supported by the default installation of Glibc. - -locale: Cannot set LC_* to default locale: No such file or directory - - If this happens, you should either install the desired locale using the - localedef command, or consider choosing a different locale. - Further instructions assume that there are no such error messages from - Glibc. - - - - Other packages may also function incorrectly (but will not necessarily - display any error messages) if the locale name does not meet their expectations. - In such cases, investigating how other Linux distributions support your locale - might provide some useful information. - - Once the proper locale settings have been determined, create the - /etc/profile file: - -cat > /etc/profile << "EOF" -# Begin /etc/profile - -export LANG=<ll>_<CC>.<charmap><@modifiers> - -# End /etc/profile -EOF - - The C (default) and en_US.utf8 (the recommended - one for United States English users) locales are different. C - uses the US-ASCII 7-bit character set, and treats bytes with the high-order bit set - on as invalid characters. That's why, e.g., the ls command - displays them as question marks in that locale. Also, an attempt to send - mail with such characters from Mutt or Pine results in non-RFC-conforming - messages being sent (the charset in the outgoing mail is indicated as unknown - 8-bit). So you can only use the C locale if you are sure - you will never need 8-bit characters. - - UTF-8 based locales are not supported well by some programs. - Work is in progress to document and, if possible, fix such problems. See - . - - diff --git a/chapter09/symlinks.xml b/chapter09/symlinks.xml index 86528ba69..71e35f231 100644 --- a/chapter09/symlinks.xml +++ b/chapter09/symlinks.xml @@ -1,4 +1,4 @@ - + @@ -112,6 +112,19 @@ proceeding, and be sure to use that NAME value when creating your network configuration files. + Even if the custom udev rule file is created, udev may still + assign one or more alternative names for a NIC based on physical + characteristics. If a custom udev rule would rename some NIC using + a name already assigned as an alternative name of another NIC, this + udev rule will fail. If this issue happens, you may create the + /etc/udev/network/99-default.link configuration + file with an empty alternative assignment policy, overriding the + default configuration file + /usr/lib/udev/network/99-default.link: + +sed -e '/^AlternativeNamesPolicy/s/=.*$/=/' \ + -i /usr/lib/udev/network/99-default.link \ + > /etc/udev/network/99-default.link diff --git a/chapter09/systemd-custom.xml b/chapter09/systemd-custom.xml index 0218b0f23..ffca1a76f 100644 --- a/chapter09/systemd-custom.xml +++ b/chapter09/systemd-custom.xml @@ -1,4 +1,4 @@ - + @@ -21,8 +21,9 @@ of options to control basic systemd operations. The default file has all entries commented out with the default settings indicated. This file is where the log level may be changed as well as some basic logging settings. - See the systemd-system.conf(5) manual page for details - on each configuration option. + See the systemd-system.conf(5) manual + page for details on each configuration option. @@ -89,8 +90,8 @@ EOF /etc/tmpfiles.d override files with the same name in /usr/lib/tmpfiles.d. See - tmpfiles.d(5) manual page for file format - details. + tmpfiles.d(5) manual + page for file format details. Note that the syntax for the @@ -135,7 +136,8 @@ Restart=always RestartSec=30 EOF - See systemd.unit(5) manual page for more + See systemd.unit(5) manual page for more information. After creating the configuration file, run systemctl daemon-reload and systemctl restart foobar to activate the changes to a service. @@ -251,10 +253,11 @@ cat > /etc/systemd/coredump.conf.d/maxuse.conf << EOF MaxUse=5G EOF - See the systemd-coredump(8), - coredumpctl(1), and - coredump.conf.d(5) manual pages for more - information. + See the systemd-coredump(8), + coredumpctl(1), and + coredump.conf.d(5) manual pages for + more information. diff --git a/chapter09/udev.xml b/chapter09/udev.xml index aa7e067e6..06db345a2 100644 --- a/chapter09/udev.xml +++ b/chapter09/udev.xml @@ -1,4 +1,4 @@ - + @@ -129,13 +129,13 @@ program and are usually related to the bus-specific identifiers of devices supported by a module. For example, the snd-fm801 driver supports PCI devices with vendor ID 0x1319 and device ID 0x0801, - and has an alias of pci:v00001319d00000801sv*sd*bc04sc01i*. + and has an alias of pci:v00001319d00000801sv*sd*bc04sc01i*. For most devices, the bus driver exports the alias of the driver that would handle the device via sysfs. E.g., the /sys/bus/pci/devices/0000:00:0d.0/modalias file might contain the string - pci:v00001319d00000801sv00001319sd00001319bc04sc01i00. + pci:v00001319d00000801sv00001319sd00001319bc04sc01i00. The default rules provided with udev will cause udevd to call out to /sbin/modprobe with the contents of the MODALIAS uevent environment variable (which should be the @@ -225,8 +225,9 @@ Note that the softdep command also allows pre: dependencies, or a mixture of both pre: and post: dependencies. See - the modprobe.d(5) manual page for more information - on softdep syntax and capabilities. + the modprobe.d(5) + manual page for more information on softdep syntax and + capabilities. If the module in question is not a wrapper and is useful by itself, configure the modules bootscript to @@ -300,7 +301,7 @@ This is due to the fact that udev, by design, handles uevents and loads modules in parallel, and thus in an unpredictable order. This will - never be fixed. You should not rely upon the kernel device + never be fixed. You should not rely upon the kernel device names being stable. Instead, create your own rules that make symlinks with stable names based on some stable attributes of the device, such as a serial number or the output of various *_id utilities installed by udev. diff --git a/chapter09/usage.xml b/chapter09/usage.xml index b14f3635c..6b5441bba 100644 --- a/chapter09/usage.xml +++ b/chapter09/usage.xml @@ -1,4 +1,4 @@ - + @@ -32,7 +32,8 @@ SysVinit (which will be referred to as init from now on) uses a run levels scheme. There are seven run levels, numbered 0 to 6. (Actually, there are more run levels, but the others are for special cases and are - generally not used. See init(8) for more details.) + generally not used. See init(8) for more details.) Each one of the seven corresponds to actions the computer is supposed to perform when it starts up or shuts down. The default run level is 3. Here are the descriptions of the different run levels as they are implemented in LFS: @@ -47,11 +48,11 @@ - Classically, run level 2 above was defined as - "multi-user mode without networking", but this was only the case - many years ago when multiple users could connect to a system via - serial ports. In today's environment it makes no sense, and - we now say it is "reserved". + Classically, run level 2 above was defined as multi-user + mode without networking, but this was only the case + many years ago when multiple users could connect to a system via + serial ports. In today's environment it makes no sense, and + we now say it is reserved. @@ -341,12 +342,13 @@ EOF url="https://tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. If still in doubt, look in the /usr/share/keymaps and /usr/share/consolefonts directories - for valid keymaps and screen fonts. Read the loadkeys(1) and - setfont(8) manual pages to determine the correct - arguments for these programs. + for valid keymaps and screen fonts. Read the loadkeys(1) and setfont(8) manual pages to determine the + correct arguments for these programs. The /etc/sysconfig/console file should contain lines - of the form: VARIABLE="value". The following variables are recognized: + of the form: VARIABLE=value. The following variables are recognized: @@ -354,7 +356,7 @@ EOF This variable specifies the log level for kernel messages sent to the console as set by dmesg -n. Valid levels are - from "1" (no messages) to "8". The default level is "7". + from 1 (no messages) to 8. The default level is 7, which is quite verbose. @@ -363,7 +365,7 @@ EOF This variable specifies the arguments for the loadkeys program, typically, the name of the keymap - to load, e.g., it. If this variable is not set, the + to load, e.g., it. If this variable is not set, the bootscript will not run the loadkeys program, and the default kernel keymap will be used. Note that a few keymaps have multiple versions with the same name (cz and its variants in @@ -382,7 +384,7 @@ EOF loadkeys program. This is useful if the stock keymap is not completely satisfactory and a small adjustment has to be made. E.g., to include the Euro sign into a keymap that normally doesn't have it, - set this variable to euro2. + set this variable to euro2. @@ -391,12 +393,12 @@ EOF This variable specifies the arguments for the setfont program. Typically, this includes the font - name, -m, and the name of the application character + name, -m, and the name of the application character map to load. E.g., in order to load the lat1-16 font together with the 8859-1 application character map (appropriate in the USA), - set this variable to lat1-16 -m 8859-1. + set this variable to lat1-16 -m 8859-1. In UTF-8 mode, the kernel uses the application character map to convert 8-bit key codes to UTF-8. Therefore the argument of the "-m" parameter should be set to the encoding of the @@ -408,8 +410,8 @@ EOF UNICODE - Set this variable to 1, yes, or - true in order to put the + Set this variable to 1, yes, or + true in order to put the console into UTF-8 mode. This is useful in UTF-8 based locales and harmful otherwise. @@ -430,6 +432,40 @@ EOF Some examples: + + + We'll use C.UTF-8 as the locale for interactive + sessions in the Linux console in so we should set + UNICODE to 1. And the console + fonts shipped by the Kbd package + containing the glyphs for all characters from the program messages + in the C.UTF-8 locale are + LatArCyrHeb*.psfu.gz, + LatGrkCyr*.psfu.gz, + Lat2-Terminus16.psfu.gz, and + pancyrillic.f16.psfu.gz in + /usr/share/consolefonts (the + other shipped console fonts lack glyphs of some characters like the + Unicode left/right quotation marks and the Unicode English dash). + So set one of them, for example + Lat2-Terminus16.psfu.gz as the default console + font: + + + +cat > /etc/sysconfig/console << "EOF" +# Begin /etc/sysconfig/console + +UNICODE="1" +FONT="Lat2-Terminus16" + +# End /etc/sysconfig/console +EOF + + For a non-Unicode setup, only the KEYMAP and FONT variables are @@ -524,7 +560,7 @@ EOF languages, because there accents are added to unaccented ASCII characters, or two ASCII characters are composed together. However, in UTF-8 mode it is a problem; e.g., for the Greek language, where one - sometimes needs to put an accent on the letter alpha. + sometimes needs to put an accent on the letter α. The solution is either to avoid the use of UTF-8, or to install the X window system, which doesn't have this limitation, in its input handling. diff --git a/chapter10/chapter10.xml b/chapter10/chapter10.xml index d7236b21c..28b30f55e 100644 --- a/chapter10/chapter10.xml +++ b/chapter10/chapter10.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter10/fstab.xml b/chapter10/fstab.xml index 63758a71d..b98e9822c 100644 --- a/chapter10/fstab.xml +++ b/chapter10/fstab.xml @@ -1,4 +1,4 @@ - + @@ -52,7 +52,7 @@ EOF Replace sda to the name of the device node for your disk where LFS is being built. For details on the six - fields in this file, see man 5 fstab. + fields in this file, see fstab(5). Filesystems with MS-DOS or Windows origin (i.e. vfat, ntfs, smbfs, cifs, iso9660, udf) need a special option, utf8, in order for non-ASCII diff --git a/chapter10/grub.xml b/chapter10/grub.xml index 2433777f7..bd6bcabbf 100644 --- a/chapter10/grub.xml +++ b/chapter10/grub.xml @@ -1,4 +1,4 @@ - + @@ -105,17 +105,6 @@ xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso - diff --git a/chapter10/introduction.xml b/chapter10/introduction.xml index 2b233ec08..3e4cb85d4 100644 --- a/chapter10/introduction.xml +++ b/chapter10/introduction.xml @@ -1,4 +1,4 @@ - + diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 851962a87..f85a66e0b 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -1,4 +1,4 @@ - + @@ -273,16 +273,18 @@ - Framebuffer Console support + + + Enable legacy fbdev support for your modesetting driver + and + Framebuffer Console support + - This is needed to display the Linux console on a frame - buffer device. To allow the kernel to print debug messages at an - early boot stage, it shouldn't be built as a kernel module - unless an initramfs will be used. And, if - (Direct Rendering Manager) is enabled, - it's likely (Enable - legacy fbdev support for your modesetting driver) should be - enabled as well. + These are needed to display the Linux console on a + GPU driven by a DRI (Direct Rendering Infrastructure) driver. + If (Direct Rendering Manager) is + enabled, you should enable these two options as well or you'll see + a blank screen once the DRI driver is loaded. @@ -322,7 +324,8 @@ located in and in the kernel documentation in the linux-&linux-version;/Documentation directory. - Also, modprobe.d(5) may be of interest. + Also, modprobe.d(5) + may be of interest. Unless module support has been disabled in the kernel configuration, install the modules with: diff --git a/chapter10/kernel/Makefile b/chapter10/kernel/Makefile index e04d2d6b1..03de71ed9 100644 --- a/chapter10/kernel/Makefile +++ b/chapter10/kernel/Makefile @@ -19,5 +19,8 @@ s-kernel-version: fi touch s-kernel-version -%.xml: %.toml kernel-config.py kernel_version.py kernel.version +%.xml.tmp: %.toml kernel-config.py kernel_version.py kernel.version ./kernel-config.py $(KERNEL_TREE) $< > $@ + +%.xml: %.xml.tmp + mv $< $@ diff --git a/chapter10/kernel/highmem.xml b/chapter10/kernel/highmem.xml index 4f0938142..4849fc248 100644 --- a/chapter10/kernel/highmem.xml +++ b/chapter10/kernel/highmem.xml @@ -1,4 +1,4 @@ - + - + + - - + + - + - - + + - + - - + + - + @@ -57,18 +57,18 @@ - - + + - + - - + + - + @@ -245,20 +245,20 @@ - - + + - + - - + + - + @@ -299,10 +299,10 @@ - - + + - + @@ -319,18 +319,18 @@ - + - + - - + + - + @@ -343,28 +343,28 @@ - - + + - + - - + + - - + + - - + + - + @@ -434,13 +434,13 @@ - - + + - + - + + + + @@ -544,10 +547,10 @@ - - + + - + @@ -564,22 +567,22 @@ - + - + - + - - + + - + @@ -603,19 +606,19 @@ - + - + - + - - + + @@ -636,18 +639,18 @@ - - + + - + - - + + - + @@ -660,20 +663,20 @@ - + - + - + - - + + - + @@ -717,10 +720,10 @@ - - + + - + @@ -733,10 +736,10 @@ - - + + - + @@ -746,51 +749,51 @@ - + - - - - - + + + + + - + - + - - + + - + - - - - + + + + - - + + - + diff --git a/part3intro/generalinstructions.xml b/part3intro/generalinstructions.xml index fe368d8d8..624771c2d 100644 --- a/part3intro/generalinstructions.xml +++ b/part3intro/generalinstructions.xml @@ -1,4 +1,4 @@ - + diff --git a/part3intro/introduction.xml b/part3intro/introduction.xml index 03ac66a87..07cc1043d 100644 --- a/part3intro/introduction.xml +++ b/part3intro/introduction.xml @@ -1,4 +1,4 @@ - + diff --git a/part3intro/part3intro.xml b/part3intro/part3intro.xml index a4d8eecda..3f97b4a7f 100644 --- a/part3intro/part3intro.xml +++ b/part3intro/part3intro.xml @@ -1,4 +1,4 @@ - + diff --git a/part3intro/toolchaintechnotes.xml b/part3intro/toolchaintechnotes.xml index f044322e6..7997b0891 100644 --- a/part3intro/toolchaintechnotes.xml +++ b/part3intro/toolchaintechnotes.xml @@ -1,4 +1,4 @@ - + @@ -56,7 +56,7 @@ The build is the machine where we build programs. Note that this machine - is also referred to as the host. + is also referred to as the host. The host diff --git a/patches.ent b/patches.ent index 4107b2dc2..a6e3a306e 100644 --- a/patches.ent +++ b/patches.ent @@ -1,7 +1,11 @@ - + + + + + @@ -13,22 +17,22 @@ - - - - - - - - - + - - - + + + + + + + diff --git a/prologue/architecture.xml b/prologue/architecture.xml index 8b91fc5c6..2fb6a7e60 100644 --- a/prologue/architecture.xml +++ b/prologue/architecture.xml @@ -1,4 +1,4 @@ - + diff --git a/prologue/audience.xml b/prologue/audience.xml index 81a4b9112..b0c8f6276 100644 --- a/prologue/audience.xml +++ b/prologue/audience.xml @@ -1,4 +1,4 @@ - + diff --git a/prologue/bookinfo.xml b/prologue/bookinfo.xml index 18ba29e02..744df848e 100644 --- a/prologue/bookinfo.xml +++ b/prologue/bookinfo.xml @@ -1,4 +1,4 @@ - + diff --git a/prologue/dedication.xml b/prologue/dedication.xml index b8f0b2d1c..17d00b35e 100644 --- a/prologue/dedication.xml +++ b/prologue/dedication.xml @@ -1,4 +1,4 @@ - + diff --git a/prologue/errata.xml b/prologue/errata.xml index bfb6bc01b..1631751e1 100644 --- a/prologue/errata.xml +++ b/prologue/errata.xml @@ -1,4 +1,4 @@ - + diff --git a/prologue/foreword.xml b/prologue/foreword.xml index 33a33ec40..0c4ffb61b 100644 --- a/prologue/foreword.xml +++ b/prologue/foreword.xml @@ -1,4 +1,4 @@ - + diff --git a/prologue/organization.xml b/prologue/organization.xml index 81bfca47a..53d2719aa 100644 --- a/prologue/organization.xml +++ b/prologue/organization.xml @@ -1,4 +1,4 @@ - + diff --git a/prologue/preface.xml b/prologue/preface.xml index 2113b811f..fdd10a89e 100644 --- a/prologue/preface.xml +++ b/prologue/preface.xml @@ -1,4 +1,4 @@ - + diff --git a/prologue/prerequisites.xml b/prologue/prerequisites.xml index 745ed788d..2e9609dce 100644 --- a/prologue/prerequisites.xml +++ b/prologue/prerequisites.xml @@ -1,4 +1,4 @@ - + diff --git a/prologue/standards.xml b/prologue/standards.xml index 6ab757a07..187264812 100644 --- a/prologue/standards.xml +++ b/prologue/standards.xml @@ -1,4 +1,4 @@ - + @@ -49,7 +49,7 @@ While it is possible to create a complete system that will pass the LSB - certification tests "from scratch", this can't be done without many additional packages + certification tests from scratch, this can't be done without many additional packages that are beyond the scope of the LFS book. Installation instructions for these additional packages can be found in BLFS. diff --git a/prologue/typography.xml b/prologue/typography.xml index 6b7d6437d..d394e9b17 100644 --- a/prologue/typography.xml +++ b/prologue/typography.xml @@ -1,4 +1,4 @@ - + @@ -74,22 +74,27 @@ EOF This format is used to encapsulate text that is optional. - passwd(5) + passwd(5) This format is used to refer to a specific manual (man) page. The number inside parentheses indicates a specific section inside the manuals. For example, passwd has two man pages. Per LFS installation instructions, those two man pages will be located at /usr/share/man/man1/passwd.1 and - /usr/share/man/man5/passwd.5. When the book uses passwd(5) it is + /usr/share/man/man5/passwd.5. When the book uses + passwd(5) it is specifically referring to /usr/share/man/man5/passwd.5. man passwd will print the first man page it finds that - matches passwd, which will be + matches passwd, which will be /usr/share/man/man1/passwd.1. For this example, you will need to run man 5 passwd in order to read the page being specified. Note that most man pages do not have duplicate page names in different sections. Therefore, man <program - name> is generally sufficient. + name> is generally sufficient. In the LFS + book these references to man pages are also hyperlinks, so clicking on + such a reference will open the man page rendered in HTML from + Arch Linux manual + pages. diff --git a/prologue/why.xml b/prologue/why.xml index b5ac050eb..e8fac1af4 100644 --- a/prologue/why.xml +++ b/prologue/why.xml @@ -1,4 +1,4 @@ - + diff --git a/stylesheets/dump-commands.xsl b/stylesheets/dump-commands.xsl index 9e2af96e4..83e24dfc6 100644 --- a/stylesheets/dump-commands.xsl +++ b/stylesheets/dump-commands.xsl @@ -1,8 +1,8 @@ - + + xmlns:exsl="http://exslt.org/common" + extension-element-prefixes="exsl" + version="1.0"> diff --git a/stylesheets/lfs-chunked.xsl b/stylesheets/lfs-chunked.xsl index 5691f2a50..2c7287765 100644 --- a/stylesheets/lfs-chunked.xsl +++ b/stylesheets/lfs-chunked.xsl @@ -1,4 +1,4 @@ - + + + + + - - + + + + + + + @@ -34,9 +39,6 @@ - - - book toc,title diff --git a/stylesheets/lfs-xsl/chunkfast.xsl b/stylesheets/lfs-xsl/chunkfast.xsl index 2b79d72ae..6d9d823a5 100644 --- a/stylesheets/lfs-xsl/chunkfast.xsl +++ b/stylesheets/lfs-xsl/chunkfast.xsl @@ -1,4 +1,4 @@ - + + + + @@ -71,11 +72,11 @@ - + - - - + + + diff --git a/stylesheets/lfs-xsl/lfs.css b/stylesheets/lfs-xsl/lfs.css index 80eca11ed..d453cac89 100644 --- a/stylesheets/lfs-xsl/lfs.css +++ b/stylesheets/lfs-xsl/lfs.css @@ -1,13 +1,13 @@ /* Global settings */ body { - font-family: verdana, tahoma, helvetica, arial, sans-serif; + font-family: verdana, tahoma, arial, sans-serif; text-align: left; background: #fff; color: #222; margin: 1em; padding: 0; font-size: 1em; - line-height: 1.2em + line-height: 1.2em; } @@ -38,10 +38,36 @@ div.dedication { padding-left: 1em; } +/* Section titles */ +h1.sect1, h1.preface, h1.part, h1.chapter, h1.appendix, .glossary h1, .index h1 + { + background: #f5f6f7; + border-bottom: .1em solid #dbddec; + margin-bottom:1em; + margin-top: 0; + padding: .4em; +} -/* Sections */ -div.sect1, div.appendix { - padding-left: .3em; +/* Scrolling parts + The header is taller for sect1 and chapter pages than on the + other pages. Since we want fixed boxes, their top has to be calculated + by trial and errors to fit below the static header box.*/ + +div.sect1, div.chapter, div.appendix, div.wrap { + top: 11.55em; +} +div.preface, div.part, .index div.index { + top: 10.15em; +} +div.sect1, div.appendix, div.preface, div.part, div.chapter, div.wrap, .index div.index { +/* padding-left: .3em;*/ + overflow:auto; + height: auto; + position: fixed; + left:1em; + right:1em; + bottom: 1em; + border-bottom: 1em solid #dbddec; } div.important ul { @@ -63,8 +89,12 @@ div.important ul li p { background: #f5f6f7; border-bottom: 0.2em solid #dbddec; padding-top: .1em; - margin-top: 0; +/* margin-top: 0;*/ } +/* +.lfs .package p:first-child { + margin-top: 0; +}*/ .lfs .configuration { background: #fefefe; @@ -74,11 +104,11 @@ div.important ul li p { .lfs .content { background: #f5f6f7; border-top: 0.2em solid #dbddec; + border-bottom: 0.2em solid #dbddec; padding-bottom: .1em; - margin-bottom: 0; + margin-bottom: .5em; } - /* Headers */ h1, h2, h3, h4, h5, h6, b, .strong { color: #000; @@ -96,18 +126,6 @@ h1 { padding: 0.4em; } -.preface h1, .part h1, .chapter h1, .appendix h1, .index h1, .sect1 h1, .glossary h1 { - background: #f5f6f7; - border-bottom: .1em solid #dbddec; - margin-bottom: 1em; - margin-top: 0; - padding: .4em; -} - -.sect1 h1, .appendix h1 { - margin-left: -.2em; -} - .wrap h1 { background: #f5f6f7; margin: 0; @@ -157,13 +175,19 @@ div.navheader, div.navfooter { } div.navheader { - border-bottom: 1px solid #dbddec; - position: sticky; - top: 0; + border-bottom: .1em solid #dbddec; } +/* no need for a footer now that the header is always visible */ div.navfooter { - border-top: 1px solid #dbddec; + display:none; +} + +/* Except for the first page (TOC), where the bottom is the only + place where navigation is displayed. */ + +div.book + div.navfooter { + display:block } div.navheader h4 { @@ -179,7 +203,7 @@ div.navheader h3 { } div.navheader ul, div.navfooter ul { - padding: .2em .5em .5em 0; + padding: .2em .5em .5em .5em; /*top right bottom left*/ margin: .5em 0; position: relative; background: #dbddec; @@ -196,29 +220,29 @@ div.navheader ul li.prev, div.navfooter ul li.prev { left: 0; text-align: left; padding: 0.2em 1em; - margin-left: 6px; + margin-left: .4em; } div.navheader ul li.next, div.navfooter ul li.next { position: absolute; display: block; text-align: right; - right: 5px; - padding: 0.2em 0.5em; - margin-right: 7px; + right: 0; + padding: 0.2em 1em; + margin-right: .4em; } div.navheader ul li.prev p, div.navfooter ul li.prev p, div.navheader ul li.next p, div.navfooter ul li.next p { padding: 0; - margin: 1px 0px; + margin: .1em 0; } div.navheader ul li.home, div.navheader ul li.up, div.navfooter ul li.home, div.navfooter ul li.up { text-align: center; padding: 0; - margin: 0px auto; + margin: 0 auto; display: block; color: #dbddec; } diff --git a/stylesheets/lfs-xsl/nochunks.xsl b/stylesheets/lfs-xsl/nochunks.xsl index 3ff0ebc72..896449d7c 100644 --- a/stylesheets/lfs-xsl/nochunks.xsl +++ b/stylesheets/lfs-xsl/nochunks.xsl @@ -1,4 +1,4 @@ - + - - - + diff --git a/stylesheets/lfs-xsl/pdf.xsl b/stylesheets/lfs-xsl/pdf.xsl index 4028a19ea..ea247f5db 100644 --- a/stylesheets/lfs-xsl/pdf.xsl +++ b/stylesheets/lfs-xsl/pdf.xsl @@ -1,4 +1,4 @@ - + + See pdf/lfs-mixed.xsl. + Note: the argument in select= is a zero-width space + (unicode 200b)--> + Added role variable and use it when calling mode xref-to. + Also remove code for xlink:href attribute in xref elements, + since we don't use it.--> - - - - - - - - - - - + @@ -89,7 +77,7 @@ ERROR: xref linking to - + has no generated link text. ??? diff --git a/stylesheets/lfs-xsl/profile.xsl b/stylesheets/lfs-xsl/profile.xsl index b89b86cb1..80c9b01b5 100644 --- a/stylesheets/lfs-xsl/profile.xsl +++ b/stylesheets/lfs-xsl/profile.xsl @@ -1,4 +1,4 @@ - + @@ -18,6 +18,7 @@ diff --git a/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl b/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl index 99c2fd70c..3726baeb9 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-admon.xsl @@ -1,4 +1,4 @@ - + + + @@ -24,6 +24,30 @@ longindex.html + + + + + + +
+ + + + + +
+
+ +   diff --git a/stylesheets/lfs-xsl/xhtml/lfs-navigational.xsl b/stylesheets/lfs-xsl/xhtml/lfs-navigational.xsl index 2e4787633..1e8f17cb0 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-navigational.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-navigational.xsl @@ -1,4 +1,4 @@ - + + + Output non sect1 child elements before the TOC + Output title outside of the
because we want to be able to + use it at a fixed position --> + +
@@ -26,8 +30,6 @@ - - @@ -44,11 +46,42 @@
+ + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + Output non sect1 child elements before the TOC + Output title before div to be able to fix the title position --> + +
@@ -60,8 +93,6 @@ - - @@ -78,12 +109,50 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -96,7 +165,6 @@ -
diff --git a/stylesheets/lfs-xsl/xhtml/lfs-titles.xsl b/stylesheets/lfs-xsl/xhtml/lfs-titles.xsl index d9e8c52b3..e22d25423 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-titles.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-titles.xsl @@ -1,4 +1,4 @@ - + + + + Added role variable and use it when calling mode xref-to. + Also remove code for xlink:href attributes in xref elements + since we don't use it.--> - - - - - - - - - - - + @@ -85,7 +74,7 @@ ERROR: xref linking to - + has no generated link text. ??? diff --git a/stylesheets/md5sum.xsl b/stylesheets/md5sum.xsl index 617bd4aa9..57723df97 100644 --- a/stylesheets/md5sum.xsl +++ b/stylesheets/md5sum.xsl @@ -1,9 +1,9 @@ - + - + + version="1.0"> @@ -31,7 +31,7 @@
- +
@@ -55,4 +55,3 @@ - diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl index d86d1814d..f863edc1f 100644 --- a/stylesheets/patcheslist.xsl +++ b/stylesheets/patcheslist.xsl @@ -1,4 +1,4 @@ - + %general-entities; @@ -22,26 +22,30 @@ function copy cp $1 $2 >>copyerrs 2>&1 } -umask 002 +umask 002 - - install -d -m 775 -g lfswww +# Create dest.dir if it doesn't exist +# Remove old patches +# Copy the patches +# Ensure correct ownership +install -d -m 775 -g lfswww - && - cd + && +cd - && - - rm -f *.patch copyerrs && + && +rm -f *.patch copyerrs && + + - - chgrp lfswww *.patch && +chgrp lfswww *.patch && if [ `wc -l copyerrs | sed 's/ *//' | cut -f1 -d' '` -gt 0 ]; then mail -s "Missing LFS patches" lfs-book@lists.linuxfromscratch.org < copyerrs -fi +fi - exit +exit + @@ -59,10 +63,11 @@ fi copy /srv/www/www.linuxfromscratch.org/patches/downloads/ - + / - . + . + diff --git a/stylesheets/wget-list.xsl b/stylesheets/wget-list.xsl index 62a518d38..eca53a4c9 100644 --- a/stylesheets/wget-list.xsl +++ b/stylesheets/wget-list.xsl @@ -1,10 +1,10 @@ - + + version="1.0"> @@ -28,7 +28,7 @@ - + diff --git a/tidy.conf b/tidy.conf index 9db8e5f92..fc3672899 100644 --- a/tidy.conf +++ b/tidy.conf @@ -1,8 +1,6 @@ indent-spaces: 2 wrap: 78 tab-size: 8 -input-encoding: latin1 -output-encoding: latin1 write-back: yes markup: yes indent: yes