diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 8038ee943..0ab386dff 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -147,7 +147,7 @@ &before; - Automake + Automake and Coreutils @@ -189,7 +189,7 @@ &before; - None + Coreutils @@ -286,7 +286,8 @@ &dependencies; Bash, Binutils, Coreutils, Diffutils, File, Flex, Gawk, GCC, - Glibc, Grep, Make, Perl, Sed, Texinfo, and Zlib + Glibc, Grep, Make, Perl, Pkgconf, Sed, Texinfo, Zlib, and + Zstd @@ -437,6 +438,9 @@ libsubunit + and + + patchutils @@ -447,8 +451,9 @@ &dependencies; - Bash, Binutils, Coreutils, GCC, Gettext, Glibc, GMP, Grep, - Libcap, Make, OpenSSL, Patch, Perl, Sed, and Texinfo + Autoconf, Automake, Bash, Binutils, Coreutils, GCC, Gettext, + Glibc, GMP, Grep, Libcap, Make, OpenSSL, Patch, Perl, Sed, and + Texinfo @@ -2514,9 +2519,10 @@ &before; - D-Bus, E2fsprogs, + Binutils, + D-Bus, E2fsprogs, IProute2, Kmod, Man-DB, Procps-ng, Python, - &systemd-udev;, and Util-linux + &systemd-udev;, and Util-linux @@ -2566,7 +2572,7 @@ None - elogind + elogind @@ -2854,6 +2860,11 @@ &external; + AppArmor, + + audit-userspace, + + bash-completion, btrfs-progs, cURL, @@ -2861,20 +2872,20 @@ docbook-xml, docbook-xsl-nons, - elfutils, Git, - gnu-efi, GnuTLS, iptables, + jekyll, kexec-tools, + libbpf, + libdw, libfido2, libgcrypt, libidn2, - Libmicrohttpd, + libmicrohttpd, libpwquality, libseccomp, @@ -2889,16 +2900,23 @@ p11-kit, PCRE2, Polkit, + pyelftools, qemu, qrencode, - - quota-tools, + quota-tools, + rpm, rsync, + + SELinux, Sphinx, + + systemtap, tpm2-tss, Valgrind, + Xen, and zsh @@ -3380,7 +3398,7 @@ &before; - GCC, Libelf, and &systemd-udev; + Binutils, GCC, Libelf, and &systemd-udev; diff --git a/bootscripts/lfs/init.d/checkfs b/bootscripts/lfs/init.d/checkfs index 0903a0111..bbbae8d99 100644 --- a/bootscripts/lfs/init.d/checkfs +++ b/bootscripts/lfs/init.d/checkfs @@ -101,7 +101,7 @@ case "${1}" in if [ "${error_value}" = 2 -o "${error_value}" = 3 ]; then msg="\nWARNING:\n\nFile system errors " - msg="${msg}were found and have been been " + msg="${msg}were found and have been " msg="${msg}corrected, but the nature of the " msg="${msg}errors require this system to be rebooted.\n\n" msg="${msg}After you press enter, " diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index f7a808cea..2debc0c0a 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -39,582 +39,117 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + - 2023-08-18 + 2023-09-05 - [bdubbs] - Update to linux-6.4.12. Fixes - #5320. + [xry111] - Move pkgconf before binutils for binutils + building system to detect zstd properly. + #5340. + + + [xry111] - Update to linux-6.5.1. Fixes + #5332. + + + [xry111] - Update to pkgconf-2.0.3. Fixes + #5339. + + + [xry111] - Update to dbus-1.14.10. Fixes + #5337. - 2023-08-18 + 2023-09-04 - [bdubbs] - Update to udev-lfs-20230818. + [bdubbs] - Move caution regarding building by mixing + different version of LFS to General Compilation Instructions. Fixes + #5338. - 2023-08-15 + 2023-09-02 - [bdubbs] - Add a patch to fix a performance regression in - glibc's posix_memalign() function. Fixes - #5315. + [xry111] - Add --no-cache-dir option for pip3 wheel + commands. Addresses + BLFS #18466. - [bdubbs] - Update to less-643. Fixes - #5317. + [bdubbs] - Update to vim-9.0.1837. Addresses + #4500. - [bdubbs] - Update to meson-1.2.1. Fixes - #5314. + [bdubbs] - Update to zlib-1.3. Fixes + #5324. - [bdubbs] - Update to linux-6.4.10. Fixes - #5313. + [bdubbs] - Update to wheel-0.41.2 (Python Module). Fixes + #5328. - [bdubbs] - Update to iana-etc-20230810. Addresses - #5006. - - - [rahul] - Update to pkgconf-2.0.1. Fixes - #5316. - - - - - - 2023-08-07 - - - [bdubbs] - Update to xz-5.4.4. Fixes - #5307. - - - [bdubbs] - Update to wheel-0.41.1 (Python Module). Fixes - #5311. - - - [bdubbs] - Update to man-pages-6.05.01. Fixes - #5306. - - - [bdubbs] - Update to linux-6.4.8. Fixes - #5309. - - - [bdubbs] - Update to iana-etc-20230804. Addresses - #5006. - - - [rahul] - Update to pkgconf-2.0.0. Fixes - #5310. - - - - - - 2023-08-01 - - - [bdubbs] - Update to vim-9.0.1677. Addresses - #4500. - - - [bdubbs] - Update to openssl-3.1.2. Fixes - #5305. - - - [bdubbs] - Update to man-pages-6.05. Fixes - #5303. - - - [bdubbs] - Update to binutils-2.41. Fixes - #5300. - - - [bdubbs] - Update to gmp-6.3.0. Fixes - #5301. - - - [bdubbs] - Update to glibc-2.38. Fixes - #5302. - - - - - - 2023-07-28 - - - [bdubbs] - Update udev-lfs tarball to remove obsolete - cdrom rules and references to ISDN devices. Fixes - #5291. - - - [bdubbs] - Update to wheel-0.41.0 (Python Module). Fixes - #5290. - - - [bdubbs] - Update to tar-1.35. Fixes - #5287. - - - [bdubbs] - Update to udev - from systemd-254. Fixes - #5293. - - - [bdubbs] - Update to meson-1.2.0. Fixes - #5286. - - - [bdubbs] - Update to linux-6.4.7. Fixes - #5288. - - - [bdubbs] - Update to gcc-13.2.0. Fixes - #5292. - - - [bdubbs] - Update to file-5.45. Fixes - #5294. - - - - - - 2023-07-28 - - - [xry111] - Enable cgroup-based memory pressure information - in kernel, and add the cgroup file system into /etc/fstab and the - mountvirtfs bootscript. This is a preparation for udev from - systemd-254. Addresses - #5293. - - - - - - 2023-07-22 - - - [xry111] - Make the mountvirtfs bootscript create essential - symlinks in /dev. Fixes - #5289. - - - - - - 2023-07-15 - - - [xry111] - Replace eudev-3.2.12 with udev from systemd-253. - Fixes #5085. - - - [bdubbs] - Update to iana-etc-20230629. Addresses - #5006. - - - [bdubbs] - Update to linux-6.4.3. Fixes - #5284. - - - [bdubbs] - Update to libxcrypt-4.4.36. Fixes - #5283. - - - [bdubbs] - Update to groff-1.23.0. Fixes - #5282. - - - [bdubbs] - Update to perl-5.38.0. Fixes - #5281. - - - - - - 2023-07-02 - - - [xry111] - Add libxcrypt-4.4.35. Fixes - #5280. - - - [xry111] - Update to iproute2-6.4.0. Fixes - #5277. - - - [xry111] - Update to linux-6.4.1. Fixes - #5276. - - - - - - 2023-07-01 - - - [bdubbs] - Update to iana-etc-20230615. Addresses - #5006. - - - [bdubbs] - Update to vim-9.0.1671. Addresses - #4500. - - - [bdubbs] - Update to util-linux-2.39.1. Addresses - #5278. - - - [bdubbs] - Update to linux-6.3.10. Addresses - #5276. - - - [rahul] - Update to kbd-2.6.1. Fixes - #5279. - - - [bdubbs] - Update to gettext-0.22. Fixes - #5275. - - - - - - 2023-06-17 - - - [xry111] - Update to linux-6.3.8. Fixes - #5272. - - - [xry111] - Update to kbd-2.6.0. Fixes - #5273. - - - [rahul] - Changed from pkg-config to pkgconf-1.9.5. Fixes - #5274. - - - - - - 2023-06-09 - - - [bdubbs] - Update to dbus-1.14.8. Fixes - #5271. - - - [bdubbs] - Update to linux-6.3.6. Fixes - #5269. - - - [bdubbs] - Update to Python-3.11.4. Fixes - #5271. - - - - - - 2023-06-03 - - - [bdubbs] - Update to iana-etc-20230524. Addresses - #5006. - - - [bdubbs] - Update to MarkupSafe-2.1.3 (Python Module). Fixes - #5268. - - - [bdubbs] - Update to linux-6.3.5. Fixes - #5264. - - - [bdubbs] - Update to openssl-3.1.1. Fixes - #5267. - - - [bdubbs] - Update to meson-1.1.1. Fixes - #5266. - - - [bdubbs] - Update to diffutils-3.10. Fixes - #5262. - - - [bdubbs] - Update to bc-6.6.0. Fixes - #5263. - - - - - - 2023-05-25 - - - [ken] - Remove unneeded group sgx from eudev rules. Fixes - #5265. - - - - - - 2023-05-18 - - - [bdubbs] - Update to util-linux-2.39. Fixes - #5259. - - - [bdubbs] - Update to linux-6.3.3. Fixes - #5261. - - - [bdubbs] - Update to libcap-2.69. Fixes - #5258. - - - [bdubbs] - Update to grep-3.11. Fixes - #5256. - - - [bdubbs] - Update to flit_core-3.9.0. Fixes - #5257. - - - [bdubbs] - Update to eudev-3.2.12. Fixes - #5260. - - - - - - 2023-05-13 - - - [xry111] - Update to less-633. Fixes - #5251. - - - [xry111] - Update to linux-6.3.2. Fixes - #5255. - - - [xry111] - Update to xz-5.4.3. Fixes - #5252. - - - [xry111] - Update to gawk-5.2.2. Fixes - #5253. - - - [xry111] - Fix systemd runtime issue exploited by GCC 13. - Fixes #5254. - - - - - - 2023-05-01 - - - [bdubbs] - Update to vim-9.0.1503. Addresses - #4500. - - - [bdubbs] - Update to iana-etc-20230418. Addresses - #5006. + [bdubbs] - Update to util-linux-2.39.2. Fixes + #5322. - [bdubbs] - Update to sysvinit-3.07. Fixes - #5250. + [bdubbs] - Update to sysvinit-3.08. Fixes + #5321. - [bdubbs] - Update to iproute2-6.3.0. Fixes - #5248. + [bdubbs] - Update to shadow-4.14.0. Fixes + #5319. - [bdubbs] - Update to gcc-13.1.0. Fixes - #5247. + [bdubbs] - Update to Python-3.11.5. Fixes + #5330. - [bdubbs] - Update to perl-5.36.1. Fixes - #5246. + [bdubbs] - Update to procps-ng-4.0.4. Fixes + #5335. - [bdubbs] - Update to linux-6.3.1. Fixes - #5245. + [bdubbs] - Update to pkgconf-2.0.2. Fixes + #5323. - [bdubbs] - Update to coreutils-9.3. Fixes - #5244. - - - - - - 2023-04-15 - - - [bdubbs] - Update to vim-9.0.1452. Addresses - #4500. + [bdubbs] - Update to mpfr-4.2.1. Fixes + #5326. - [bdubbs] - Update to iana-etc-20230405. Addresses - #5006. + [bdubbs] - Update to kbd-2.6.2. Fixes + #5318. - [bdubbs] - Update to zstd-1.5.5. Fixes - #5239. + [bdubbs] - Update to gzip-1.13. Fixes + #5325. - [bdubbs] - Update to Python-3.11.3. Fixes - #5240. + [bdubbs] - Update to coreutils-9.4. Fixes + #5334. - - [bdubbs] - Update to meson-1.1.0. Fixes - #5242. - - - [bdubbs] - Update to man-pages-6.04. Fixes - #5238. - - - [bdubbs] - Update to linux-6.2.11. Fixes - #5241. - - - - - - 2023-03-31 - - - [xry111] - Update to linux-6.2.9 (security fix). Fixes - #5230. - - - [xry111] - Update to grep-3.10. Fixes - #5234. - - - [xry111] - Update to wheel-0.40.0. Fixes - #5229. - - - [xry111] - Update to bc-6.5.0. Fixes - #5228. - - - [xry111] - Update to texinfo-7.0.3. Fixes - #5235. - - - [xry111] - Update to coreutils-9.2. Fixes - #5232. - - - [xry111] - Update to libcap-2.68. Fixes - #5236. - - - [xry111] - Update to tzdata-2023c. Fixes - #5237. - - - [xry111] - Update to xz-5.4.2. Fixes - #5233. - - - [xry111] - Update to openssl-3.1.0. Fixes - #5227. - - - [xry111] - Add flit-core-3.8.0. - - - - - - 2023-03-15 - - - [bdubbs] - Update to bc-6.4.0. Fixes - #5217. - - - [bdubbs] - Update to grep-3.9. Fixes - #5225. - - - [bdubbs] - Update to linux-6.2.6. Fixes - #5226. - - - [bdubbs] - Update to iana-etc-20230306. Addresses - #5006. - - - - - 2023-03-04 - - [xry111] - Update to systemd-253. Fixes - #5206. + [bdubbs] - Specify the 'nobody-group' for systemd. Fixes + #5333. - [xry111] - Update to bc-6.3.1. Fixes - #5217. - - - [xry111] - Update to linux-6.2.2 (security fixes). Fixes - #5218. - - - [xry111] - Update to procps-ng-4.0.3. Fixes - #5220. - - - [xry111] - Update to iproute2-6.2.0. Fixes - #5221. - - - [xry111] - Update to meson-1.0.1. Fixes - #5222. - - - [xry111] - Update to make-4.4.1. Fixes - #5223. - - - [xry111] - Update to libelf-0.189. Fixes - #5224. - - - [bdubbs] - Change to a better host requirements script in Chapter 2. + [bdubbs] - Remove unused usb group. Fixes + #5331. - 2023-03-01 + 2023-09-01 - [bdubbs] - LFS-11.3 released. + [bdubbs] - LFS-12.0 released. diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 78a241373..d7c391796 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -11,26 +11,6 @@ What's new since the last release - - - During a development cycle of LFS, the instructions in the book is - often modified to adapt for a package update or take the advantage of - new features from updated packages. Mixing up the instructions of - different versions of the LFS book can cause subtle breakages. This - kind of issue is generally a result from reusing some script created - for a prior LFS release. Such a reuse is strongly discouraged. If - you are reusing scripts for a prior LFS release for any reason, you'll - need to be very careful to update the scripts to match current version - of the LFS book. - - - - In the 11.4 release, --disable-fixincludes - is set for GCC. It's a configure switch newly added in GCC 13.1 to - prevent GCC from fixing the system headers. Such a - fix is unnecessary for a modern Linux system and may cause - issues if a package is updated after installing GCC. - Here is a list of the packages updated since the previous release of LFS. @@ -61,12 +41,12 @@ - + + @@ -82,12 +62,12 @@ - + + @@ -100,63 +80,63 @@ - + - + + + - + + + - + + - - IANA-Etc-&iana-etc-version; + Gzip-&gzip-version; + - + @@ -166,18 +146,18 @@ - + - + + @@ -187,51 +167,51 @@ - + - + - + + + - + - + Pkgconf-&pkgconf-version; - + Procps-ng-&procps-ng-version; @@ -247,30 +227,30 @@ - - - Sysklogd-&sysklogd-version; - - Systemd-&systemd-version; + Shadow-&shadow-version; - - Tar-&tar-version; + + + SysVinit-&sysvinit-version; + - + + Util-Linux-&util-linux-version; @@ -283,15 +263,15 @@ - - XZ-Utils-&xz-version; - - Zstd-&zstd-version; + Zlib-&zlib-version; + - - Udev-&systemd-version; (from systemd) - - - - Jinja2-&jinja2-version; - - - - MarkupSafe-&markupsafe-version; - - - - Libxcrypt-&libxcrypt-version; - - - - Pkgconf-&pkgconf-version; - - - - Flit-core-&flit-core-version; - - - - &glibc-memalign-patch; - - @@ -351,7 +303,7 @@ Removed: - + diff --git a/chapter02/hostreqs.xml b/chapter02/hostreqs.xml index 862d2605c..10c1bf16e 100644 --- a/chapter02/hostreqs.xml +++ b/chapter02/hostreqs.xml @@ -145,7 +145,7 @@ - Texinfo-4.7 + Texinfo-5.0 @@ -173,7 +173,7 @@ To see whether your host system has all the appropriate versions, and the ability to compile programs, run the following commands: -cat > version-check.sh << "EOF" +cat > version-check.sh << "EOF" #!/bin/bash # A script to list version numbers of critical development tools @@ -235,7 +235,7 @@ ver_check Perl perl 5.8.8 ver_check Python python3 3.4 ver_check Sed sed 4.1.5 ver_check Tar tar 1.22 -ver_check Texinfo texi2any 4.7 +ver_check Texinfo texi2any 5.0 ver_check Xz xz 5.0.0 ver_kernel &min-kernel; diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 2434a6b17..2b752b944 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -107,7 +107,6 @@ dialout:x:10: audio:x:11: video:x:12: utmp:x:13: -usb:x:14: cdrom:x:15: adm:x:16: messagebus:x:18: @@ -135,7 +134,6 @@ dialout:x:10: audio:x:11: video:x:12: utmp:x:13: -usb:x:14: cdrom:x:15: adm:x:16: messagebus:x:18: diff --git a/chapter08/autoconf.xml b/chapter08/autoconf.xml index 7925e44ea..38375665f 100644 --- a/chapter08/autoconf.xml +++ b/chapter08/autoconf.xml @@ -153,7 +153,7 @@ Helps to create a configure.in file for a software package; it examines the source files in a directory tree, searching them for common portability issues, and creates a - configure.scan file that serves as as a + configure.scan file that serves as a preliminary configure.in file for the package diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml index 3f356d39e..8ab81d2f8 100644 --- a/chapter08/chapter08.xml +++ b/chapter08/chapter08.xml @@ -29,6 +29,7 @@ + @@ -39,7 +40,6 @@ - diff --git a/chapter08/flit-core.xml b/chapter08/flit-core.xml index 641ff73b7..661a02684 100644 --- a/chapter08/flit-core.xml +++ b/chapter08/flit-core.xml @@ -42,7 +42,7 @@ Build the package: -pip3 wheel -w dist --no-build-isolation --no-deps $PWD +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD Install the package: @@ -66,6 +66,15 @@ + + --no-cache-dir + + Prevents pip from copying the created wheel into the + /root/.cache/pip + directory. + + + install diff --git a/chapter08/jinja2.xml b/chapter08/jinja2.xml index ca614ecdc..59a01e26c 100644 --- a/chapter08/jinja2.xml +++ b/chapter08/jinja2.xml @@ -42,7 +42,7 @@ Build the package: -pip3 wheel -w dist --no-build-isolation --no-deps $PWD +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD Install the package: diff --git a/chapter08/markupsafe.xml b/chapter08/markupsafe.xml index b4a0cbc58..c09b9a64c 100644 --- a/chapter08/markupsafe.xml +++ b/chapter08/markupsafe.xml @@ -42,7 +42,7 @@ Compile MarkupSafe with the following command: -pip3 wheel -w dist --no-build-isolation --no-deps $PWD +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD This package does not come with a test suite. diff --git a/chapter08/meson.xml b/chapter08/meson.xml index a53a88c3c..8cf308237 100644 --- a/chapter08/meson.xml +++ b/chapter08/meson.xml @@ -46,7 +46,7 @@ --> Compile Meson with the following command: -pip3 wheel -w dist --no-build-isolation --no-deps $PWD +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD The test suite requires some packages outside the scope of LFS. diff --git a/chapter08/mpfr.xml b/chapter08/mpfr.xml index 2d16053de..c9e7c1a7d 100644 --- a/chapter08/mpfr.xml +++ b/chapter08/mpfr.xml @@ -41,20 +41,6 @@ Installation of MPFR - - Fix a test case based on a bug of old Glibc releases: - -sed -e 's/+01,234,567/+1,234,567 /' \ - -e 's/13.10Pd/13Pd/' \ - -i tests/tsprintf.c - Prepare MPFR for compilation: ./configure --prefix=/usr \ diff --git a/chapter08/openssl.xml b/chapter08/openssl.xml index 40a769311..6a4441552 100644 --- a/chapter08/openssl.xml +++ b/chapter08/openssl.xml @@ -101,21 +101,6 @@ make MANSUFFIX=ssl install number. - - - If OpenSSH is installed, it will be an - exception of the general rule above. It contains an - over-restrictive OpenSSL version check, so both SSH client and SSH - server will refuse to start if OpenSSL - is updated with MAJOR version number unchanged but MINOR version - number changed. You need to rebuild - OpenSSH after such an upgrade. - If OpenSSH is being - used to access the system, you must rebuild and reinstall it - after upgrading OpenSSL to a new MINOR version number before logout - or you won't be able to login via SSH anymore. - - However, any running programs linked to those libraries need to be stopped and restarted. Read the related entries in diff --git a/chapter08/procps.xml b/chapter08/procps.xml index 20a6be096..7fc74f587 100644 --- a/chapter08/procps.xml +++ b/chapter08/procps.xml @@ -67,18 +67,9 @@ Compile the package: -make - To run the test suite, run: make check diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml index 0f34d70ac..f88216a5b 100644 --- a/chapter08/shadow.xml +++ b/chapter08/shadow.xml @@ -107,6 +107,7 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \; @@ -144,6 +145,14 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \; + + --without-libbsd + + Do not use the readpassphrase function from libbsd which + is not in LFS. Use the internal copy instead. + + + Compile the package: diff --git a/chapter08/stripping.xml b/chapter08/stripping.xml index 1446949be..92ecfe310 100644 --- a/chapter08/stripping.xml +++ b/chapter08/stripping.xml @@ -95,6 +95,7 @@ online_usrlib="libbfd-&binutils-version;.so libm.so.6 libreadline.so.&readline-soversion; libz.so.&zlib-version; + libzstd.so.&zstd-version; $(cd /usr/lib; find libnss*.so* -type f)" for BIN in $online_usrbin; do diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index 63003ac68..761467acd 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -68,6 +68,7 @@ meson setup \ -Dmode=release \ -Dpamconfdir=no \ -Ddev-kvm-mode=0660 \ + -Dnobody-group=nogroup \ -Ddocdir=/usr/share/doc/systemd-&systemd-version; \ .. @@ -178,6 +179,14 @@ meson setup \ consider it dangerous. This option overrides it. + + + -Dnobody-group=nogroup + + Tell the package the group name with GID 65534 is + nogroup. + + Compile the package: diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml index 72c6e3699..0ec5c1c8e 100644 --- a/chapter08/util-linux.xml +++ b/chapter08/util-linux.xml @@ -1220,7 +1220,8 @@ su tester -c "make -k check" Creates new UUIDs. Each new UUID is a random number likely to be unique among all UUIDs created, on the local system and on other systems, in the past and in the future, with extremely high - probability (~340 trillion trillion trillion unique UUIDs are possible) + probability (2128 UUIDs are + possible) uuidgen diff --git a/chapter08/wheel.xml b/chapter08/wheel.xml index 88e47d556..0f3a1c99e 100644 --- a/chapter08/wheel.xml +++ b/chapter08/wheel.xml @@ -42,7 +42,7 @@ Compile Wheel with the following command: -pip3 wheel -w dist --no-build-isolation --no-deps $PWD +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD Install Wheel with the following command: diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 314ba3f31..587417f19 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -122,6 +122,7 @@ + A good starting place for setting up the kernel configuration is to run make defconfig. This will set the base configuration to a good state that takes your current system architecture diff --git a/general.ent b/general.ent index a222812e9..0540ac6c2 100644 --- a/general.ent +++ b/general.ent @@ -103,6 +103,7 @@ --> + diff --git a/lfs-latest.php b/lfs-latest.php deleted file mode 100644 index 3a4df9243..000000000 --- a/lfs-latest.php +++ /dev/null @@ -1,481 +0,0 @@ -#! /usr/bin/php - 80 - list( $major, $minor, $rest ) = explode( ".", $slice . ".0" ); - if ( $minor % 2 == 1 ) continue; - if ( $minor > 80 ) continue; - array_push( $a, $slice ); - } - - rsort( $a, SORT_NATURAL ); // Max version is at the top - return ( isset( $a[0] ) ) ? $a[0] : -2; -} - -function http_get_file( $url ) -{ - if ( ! preg_match( "/sourceforge/", $url ) && - ! preg_match( "/psmisc/", $url ) ) - { - exec( "curl --location --silent --max-time 30 $url", $dir ); - - $s = implode( "\n", $dir ); - $dir = strip_tags( $s ); - return explode( "\n", $dir ); - } - else - { - exec( "links -dump $url 2>/dev/null", $lines ); - return $lines; - } -} - -function max_parent( $dirpath, $prefix ) -{ - // First, remove a directory - $dirpath = rtrim ( $dirpath, "/" ); // Trim any trailing slash - $position = strrpos( $dirpath, "/" ); - $dirpath = substr ( $dirpath, 0, $position ); - - $lines = http_get_file( $dirpath ); - - $regex_match = "#${prefix}[\d\.]+/#"; - $regex_replace = "#^.*(${prefix}[\d\.]+)/.*$#"; - $max = find_max( $lines, $regex_match, $regex_replace ); - - return "$dirpath/$max"; -} - -function get_packages( $package, $dirpath ) -{ - global $exceptions; - global $regex; - -//if ( $package != "psmisc" ) return 0; // Debug - -if ( $package == "bc" ) $dirpath = "https://github.com/gavinhoward/bc/releases"; -if ( $package == "check" ) $dirpath = "https://github.com/libcheck/check/releases"; -if ( $package == "e2fsprogs" ) $dirpath = "http://sourceforge.net/projects/e2fsprogs/files/e2fsprogs"; -if ( $package == "expat" ) $dirpath = "http://sourceforge.net/projects/expat/files"; -if ( $package == "elfutils" ) $dirpath = "https://sourceware.org/ftp/elfutils"; -if ( $package == "expect" ) $dirpath = "http://sourceforge.net/projects/expect/files"; -if ( $package == "file" ) $dirpath = "https://github.com/file/file/releases"; -if ( $package == "flex" ) $dirpath = "https://github.com/westes/flex/releases"; -if ( $package == "gcc" ) $dirpath = max_parent( $dirpath, "gcc-" ); -if ( $package == "iana-etc" ) $dirpath = "https://github.com/Mic92/iana-etc/releases"; -if ( $package == "intltool" ) $dirpath = "https://launchpad.net/intltool/trunk"; -if ( $package == "meson" ) $dirpath = "https://github.com/mesonbuild/meson/releases"; -if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc"; -if ( $package == "mpfr" ) $dirpath = "http://mpfr.loria.fr/mpfr-current"; -if ( $package == "ninja" ) $dirpath = "https://github.com/ninja-build/ninja/releases"; -if ( $package == "procps-ng" ) $dirpath = "https://gitlab.com/procps-ng/procps/-/tags"; -if ( $package == "psmisc" ) $dirpath = "https://gitlab.com/psmisc/psmisc/-/tags"; -if ( $package == "Python" ) $dirpath = "https://www.python.org/downloads/source/"; -if ( $package == "shadow" ) $dirpath = "https://github.com/shadow-maint/shadow/releases"; -if ( $package == "systemd" ) $dirpath = "https://github.com/systemd/systemd/releases"; -if ( $package == "tcl" ) $dirpath = "http://sourceforge.net/projects/tcl/files"; -if ( $package == "util-linux" ) $dirpath = max_parent( $dirpath, "v." ); -if ( $package == "vim" ) $dirpath = "https://github.com/vim/vim/releases"; -if ( $package == "zstd" ) $dirpath = "https://github.com/facebook/zstd/releases"; -//if ( $package == "vim" ) $dirpath = "ftp://ftp.vim.org/pub/vim/unix"; - - // Check for ftp - if ( preg_match( "/^ftp/", $dirpath ) ) - { - $dirpath = substr( $dirpath, 6 ); // Remove ftp:// - $dirpath = rtrim ( $dirpath, "/" ); // Trim any trailing slash - $position = strpos( $dirpath, "/" ); // Divide at first slash - $server = substr( $dirpath, 0, $position ); - $path = substr( $dirpath, $position ); - - $conn = ftp_connect( $server ); - ftp_login( $conn, "anonymous", "" ); - - // See if we need special handling - if ( isset( $exceptions[ $package ] ) ) - { - $specials = explode( ":", $exceptions[ $package ] ); - - foreach ( $specials as $i ) - { - list( $op, $regexp ) = explode( "=", $i ); - - switch ($op) - { - case "UPDIR": - // Remove last dir from $path - $position = strrpos( $path, "/" ); - $path = substr( $path, 0, $position ); - - // Get dir listing - $lines = ftp_rawlist ($conn, $path); - $max = find_max( $lines, $regexp, $regexp ); - break; - - case "DOWNDIR": - // Append found directory - $path .= "/$max"; - break; - - default: - echo "Error in specials array for $package\n"; - return -5; - break; - } - } - } - - $lines = ftp_rawlist ($conn, $path); - ftp_close( $conn ); - } - else // http - { - // Customize http directories as needed - if ( $package == "tzdata" ) - { - // Remove two directories - $dirpath = rtrim ( $dirpath, "/" ); // Trim any trailing slash - $position = strrpos( $dirpath, "/" ); - $dirpath = substr ( $dirpath, 0, $position ); - $position = strrpos( $dirpath, "/" ); - $dirpath = substr ( $dirpath, 0, $position ); - } - - //if ( $package == "bzip2" ) - //{ - // // Remove one directory - // $dirpath = rtrim ( $dirpath, "/" ); // Trim any trailing slash - // $position = strrpos( $dirpath, "/" ); - // $dirpath = substr ( $dirpath, 0, $position ); - //} - - $lines = http_get_file( $dirpath ); - if ( ! is_array( $lines ) ) return -6; - } // End fetch -//print_r($lines); - if ( isset( $regex[ $package ] ) ) - { - // Custom search for latest package name - foreach ( $lines as $l ) - { - $ver = preg_replace( $regex[ $package ], "$1", $l ); - if ( $ver == $l ) continue; - return $ver; // Return first match of regex - } - - return -7; // This is an error - } - - if ( $package == "perl" ) // Custom for perl - { - $tmp = array(); - - foreach ( $lines as $l ) - { - if ( preg_match( "/sperl/", $l ) ) continue; // Don't want this - $ver = preg_replace( "/^.*perl-([\d\.]+\d)\.tar.*$/", "$1", $l ); - if ( $ver == $l ) continue; - list( $s1, $s2, $rest ) = explode( ".", $ver ); - if ( $s2 % 2 == 1 ) continue; // Remove odd minor versions - array_push( $tmp, $l ); - } - - $lines = $tmp; - } - - if ( $package == "attr" || - $package == "acl" ) - { - return find_max( $lines, "/$package/", "/^.*$package-([\d\.-]*\d).tar.*$/" ); - } - - if ( $package == "e2fsprogs" ) - return find_max( $lines, "/v\d/", "/^.*v(\d[\d\.]+\d).*$/" ); - - if ( $package == "expect" ) - return find_max( $lines, "/expect/", "/^.*expect(\d[\d\.]+\d).tar.*$/" ); - - if ( $package == "elfutils" ) - return find_max( $lines, "/^\d/", "/^(\d[\d\.]+\d)\/.*$/" ); - - if ( $package == "XML-Parser" ) - { - $max = find_max( $lines, "/$package/", "/^.*$package-([\d\._]*\d).tar.*$/" ); - # 2.44_01 is a developer release - if ( $max == "2.44_01" ) { return "2.44"; } - return $max; - } - - if ( $package == "tcl" ) - return find_max( $lines, "/tcl/", "/^.*tcl(\d[\d\.]*\d)-src.*$/" ); - - if ( $package == "ninja" ) - return find_max( $lines, "/v\d/", "/^.*v(\d[\d\.]*\d).*$/" ); - - if ( $package == "gmp" ) - return find_max( $lines, "/$package/", "/^.*$package-([\d\._]*\d[a-z]?).tar.*$/" ); - - if ( $package == "dbus" ) - return find_even_max( $lines, "/$package/", "/^.*$package-([\d\.]+).tar.*$/" ); - - if ( $package == "file" ) - { - $max = find_max( $lines, "/FILE5/", "/^.*FILE(5_\d+)*$/" ); - return str_replace( "_", ".", $max ); - } - - if ( $package == "procps-ng" ) - return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" ); - - if ( $package == "psmisc" ) - return find_max( $lines, "/v\d/", "/^.*v([\d\.]+) .*$/" ); - - if ( $package == "grub" ) - return find_max( $lines, "/grub/", "/^.*grub-(\d\..*).tar.xz.*$/" ); - - if ( $package == "openssl" ) - return find_max( $lines, "/openssl/", "/^.*openssl-([\d\.p]*\d.?).tar.*$/" ); - - if ( $package == "vim" ) - return find_max( $lines, "/v\d\./", "/^.*v([\d\.]+).*$/" ); - - if ( $package == "zstd" ) - return find_max( $lines, "/Zstandard v/", "/^.*v([\d\.]+).*$/" ); - - // Most packages are in the form $package-n.n.n - // Occasionally there are dashes (e.g. 201-1) - return find_max( $lines, "/$package/", "/^.*$package-([\d\.-]*\d)\.tar.*$/" ); -} - -function get_current() -{ - global $dirs; - global $vers; - - // Fetech from svn and get wget-list - $current = array(); - $lfssvn = "svn://svn.linuxfromscratch.org/LFS/trunk"; - - $tmpdir = exec( "mktemp -d /tmp/lfscheck.XXXXXX" ); - $cdir = getcwd(); - chdir( $tmpdir ); - exec ( "svn --quiet export $lfssvn LFS" ); - chdir( $cdir ); - - $PAGE = "$tmpdir/LFS/BOOK/chapter03/chapter03.xml"; - $STYLESHEET = "$tmpdir/LFS/BOOK/stylesheets/wget-list.xsl"; - - exec( "xsltproc --xinclude --nonet $STYLESHEET $PAGE", $current ); - exec( "rm -rf $tmpdir" ); - - foreach ( $current as $line ) - { - $file = basename( $line ) . "\n"; - if ( preg_match( "/patch$/", $file ) ) { continue; } // Skip patches - - $file = preg_replace( "/bz2/", '', $file ); // The 2 confusses the regex - - $file = rtrim( $file ); - $pkg_pattern = "/(\D*).*/"; - //$pattern = "/\D*(\d.*\d)\D*/"; - $pattern = "/\D*(\d.*\d)\D*/"; - - if ( preg_match( "/e2fsprogs/", $file ) ) - { - $pattern = "/e2\D*(\d.*\d)\D*/"; - $pkg_pattern = "/(e2\D*).*/"; - } - - else if ( preg_match( "/tzdata/", $file ) ) - { - $pattern = "/\D*(\d.*[a-z])\.tar\D*/"; - } - - else if ( preg_match( "/openssl/", $file ) ) - { - $pattern = "/\D*(\d.*\d.*).tar.*$/"; - } - - else if ( preg_match( "/gmp/", $file ) ) - { - $pattern = "/\D*(\d.*[a-z]*)\.tar\D*/"; - } - - else if ( preg_match( "/systemd-man-pages/", $file ) ) continue; - else if ( preg_match( "/python/" , $file ) ) continue; - - $version = preg_replace( $pattern, "$1", $file ); // Isolate version - $version = preg_replace( "/^\d-/", "", $version ); // Remove leading #- - - // Touch up package names - $pkg_name = preg_replace( $pkg_pattern, "$1", $file ); - $pkg_name = trim( $pkg_name, "-" ); - - if ( preg_match( "/bzip|iproute/", $pkg_name ) ) { $pkg_name .= "2"; } - if ( preg_match( "/^m$/" , $pkg_name ) ) { $pkg_name .= "4"; } - if ( preg_match( "/shadow/" , $pkg_name ) ) { $pkg_name = "shadow"; } - - $dirs[ $pkg_name ] = dirname( $line ); - $vers[ $pkg_name ] = $version; - } -} - -function mail_to_lfs() -{ - global $date; - global $vers; - global $dirs; - - //$to = "bruce.dubbs@gmail.com"; - $to = "lfs-book@lists.linuxfromscratch.org"; - $from = "bdubbs@linuxfromscratch.org"; - $subject = "LFS Package Currency Check - $date GMT"; - $headers = "From: bdubbs@anduin.linuxfromscratch.org"; - - $message = "Package LFS Upstream Flag\n\n"; - - foreach ( $dirs as $pkg => $dir ) - { - //if ( $pkg != "gmp" ) continue; //debug - $v = get_packages( $pkg, $dir ); - - $flag = ( $vers[ $pkg ] != $v ) ? "*" : ""; - - // Pad for output - $pad = " "; - $p = substr( $pkg . $pad, 0, 15 ); - $l = substr( $vers[ $pkg ] . $pad, 0, 10 ); - $c = substr( $v . $pad, 0, 10 ); - - $message .= "$p $l $c $flag\n"; - } - - exec ( "echo '$message' | mailx -r $from -s '$subject' $to" ); - //echo $message; -} - -function html() -{ - - global $date; - global $vers; - global $dirs; - - echo " - - -LFS Package Currency Check - $date - - - - -

LFS Package Currency Check

-

As of $date GMT

- - -\n"; - - // Get the latest version of each package - foreach ( $dirs as $pkg => $dir ) - { - $v = get_packages( $pkg, $dir ); - $flag = ( $vers[ $pkg ] != $v ) ? "*" : ""; - echo "\n"; - } - - echo "
LFS Package LFS Version Latest Flag
$pkg ${vers[ $pkg ]} $v $flag
- -\n"; - -} - -get_current(); // Get what is in the book -mail_to_lfs(); -//html(); // Write html output -?> diff --git a/lfs-latest.php b/lfs-latest.php new file mode 120000 index 000000000..f41b1b2b9 --- /dev/null +++ b/lfs-latest.php @@ -0,0 +1 @@ +lfs-latest-git.php \ No newline at end of file diff --git a/packages.ent b/packages.ent index 67ad4012c..7827212da 100644 --- a/packages.ent +++ b/packages.ent @@ -104,20 +104,20 @@ - - + + - + - - + + - + @@ -308,10 +308,10 @@ - - + + - + @@ -359,10 +359,10 @@ - - + + - + @@ -432,13 +432,13 @@ - - + + - + - + - + - + - + - - + + @@ -627,10 +627,10 @@ - - + + - + @@ -660,10 +660,10 @@ - - + + - + @@ -716,31 +716,31 @@ - - + + - + - + - + - + - + - + @@ -763,11 +763,15 @@ - - - - - + + + + + + diff --git a/part3intro/generalinstructions.xml b/part3intro/generalinstructions.xml index f3285bc17..fe368d8d8 100644 --- a/part3intro/generalinstructions.xml +++ b/part3intro/generalinstructions.xml @@ -11,6 +11,20 @@ General Compilation Instructions + + + During a development cycle of LFS, the instructions in the book are + often modified to adapt for a package update or take the advantage of + new features from updated packages. Mixing up the instructions of + different versions of the LFS book can cause subtle breakages. This + kind of issue is generally a result from reusing some script created + for a prior LFS release. Such a reuse is strongly discouraged. If + you are reusing scripts for a prior LFS release for any reason, you'll + need to be very careful to update the scripts to match current version + of the LFS book. + + + Here are some things you should know about building each package: diff --git a/patches.ent b/patches.ent index c3b6dfb18..7bb34e656 100644 --- a/patches.ent +++ b/patches.ent @@ -2,50 +2,14 @@ - - - - - + - - - - @@ -62,49 +26,11 @@ - - - - - -