diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index c84776374..73194612c 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -1496,37 +1496,37 @@ - Jinja2 + Jinja2 - + &dependencies; - MarkupSafe and Python + MarkupSafe, Python, Setuptools, and Wheel - + &runtime; MarkupSafe and Python - + &testsuites; No test suite available - + &before; &systemd-udev; - + &external; None @@ -2136,37 +2136,37 @@ - MarkupSafe + MarkupSafe - + &dependencies; - Python + Python, Setuptools, and Wheel - + &runtime; Python - + &testsuites; No test suite available - + &before; Jinja2 - + &external; None @@ -2179,7 +2179,7 @@ &dependencies; - Ninja and Python + Ninja, Python, Setuptools, and Wheel @@ -2741,6 +2741,44 @@ + + Setuptools + + + &dependencies; + + Python and Wheel + + + + + &runtime; + + Python + + + + + &testsuites; + + No test suite available + + + + + &before; + + Jinja2, MarkupSafe, and Meson + + + + + &external; + + None + + + Shadow @@ -3216,7 +3254,7 @@ - wheel + Wheel &dependencies; @@ -3243,8 +3281,7 @@ &before; - None - Jinja2 + Jinja2, MarkupSafe, Meson, and Setuptools diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index aff30cb41..3853ff83a 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,8 @@ +2023-10-04 Pierre Labastie + * After the changes done on 2022-03-24, several "halt stop" should + have been changed to "halt start". Done now. Fortunately, those + occur only when something wrong happens with disks or devices. + 2023-07-28 Xi Ruoyao * In mountvirtfs, mount /sys/fs/cgroup for udev from systemd-254. @@ -24,7 +29,7 @@ * New semantics for K and S scripts: - S scripts only started if not already marked S in the previous runlevel - K scripts only started if not already marked K in the previous runlevel - - remove the convention of running S scripts ith "stop" in rl 0/6 + - remove the convention of running S scripts with "stop" in rl 0/6 2021-06-08 Bruce Dubbs * When shutting down the network, ignore invalid interfaces or interfaces that are not UP. diff --git a/bootscripts/lfs/init.d/checkfs b/bootscripts/lfs/init.d/checkfs index bbbae8d99..b7f6e3ff2 100644 --- a/bootscripts/lfs/init.d/checkfs +++ b/bootscripts/lfs/init.d/checkfs @@ -63,7 +63,7 @@ case "${1}" in log_info_msg "Press Enter to continue..." wait_for_user - /etc/rc.d/init.d/halt stop + /etc/rc.d/init.d/halt start else log_success_msg2 fi @@ -127,7 +127,7 @@ case "${1}" in log_info_msg "Press Enter to continue..." wait_for_user - /etc/rc.d/init.d/halt stop + /etc/rc.d/init.d/halt start fi if [ "${error_value}" -ge 16 ]; then diff --git a/bootscripts/lfs/init.d/udev b/bootscripts/lfs/init.d/udev index f3b07b022..a843e0c39 100644 --- a/bootscripts/lfs/init.d/udev +++ b/bootscripts/lfs/init.d/udev @@ -41,7 +41,7 @@ case "${1}" in log_info_msg "$msg" log_info_msg "Press Enter to continue..." wait_for_user - /etc/rc.d/init.d/halt stop + /etc/rc.d/init.d/halt start fi # Start the udev daemon to continually watch for, and act on, diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 5f2d4860f..8ad5949fb 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -39,6 +39,195 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2023-11-13 + + + [xry111] - Update to elfutils-0.190. Fixes + #5373. + + + [xry111] - Update to vim-9.0.2103. Addresses + #4500. + + + [xry111] - Update to linux-6.6.1. Fixes + #5369. + + + [xry111] - Update to xz-5.4.5. Fixes + #5371. + + + [xry111] - Update to iana-etc-20231107. Addresses + #5006. + + + [xry111] - Update to gawk-5.3.0. Fixes + #5372. + + + [xry111] - Update to bash-5.2.21. Fixes + #5375. + + + [xry111] - Update to iproute2-6.6.0. Fixes + #5374. + + + + + + 2023-11-01 + + + [bdubbs] - Update to iana-etc-20231019. Addresses + #5006. + + + [bdubbs] - Update to wheel-0.41.3. Fixes + #5370. + + + [bdubbs] - Update to shadow-4.14.2. Fixes + #5368. + + + [bdubbs] - Update to openssl-3.1.4. Fixes + #5367. + + + [bdubbs] - Update to texinfo-7.1. Fixes + #5364. + + + [bdubbs] - Update to meson-1.2.3. Fixes + #5366. + + + [bdubbs] - Update to bc-6.7.2. Fixes + #5363. + + + [bdubbs] - Update to linux-6.5.9. Fixes + #5365. + + + [bdubbs] - Update to Python-3.12.0. Fixes + #5357. + + + [bdubbs] - Add setuptools-68.2.2. Fixes + #5358. + + + + + + 2023-10-15 + + + [bdubbs] - Update to linux-6.5.7. Fixes + #5362. + + + [bdubbs] - Update to shadow-4.14.1. Fixes + #5361. + + + [bdubbs] - Update to gettext-0.22.3. Fixes + #5359. + + + + + + 2023-10-03 + + + [xry111] - Update Glibc upstream fixes patch to fix + CVE-2023-4911. + + + + + + 2023-10-01 + + + [bdubbs] - Disable building nscd in glibc. Fixes + #5349. + + + [bdubbs] - Update to iana-etc-20230929. Addresses + #5006. + + + [bdubbs] - Update to vim-9.0.1968. Addresses + #4500. + + + [bdubbs] - Update to openssl-3.1.3. Fixes + #5350. + + + [bdubbs] - Update to meson-1.2.2. Fixes + #5356. + + + [bdubbs] - Update to man-db-2.12.0. Fixes + #5354. + + + [bdubbs] - Update to linux-6.5.5. Fixes + #5352. + + + [bdubbs] - Update to kmod-31. Fixes + #5355. + + + [bdubbs] - Update to kbd-2.6.3. Fixes + #5361. + + + [bdubbs] - Update to gettext-0.22.2. Fixes + #5348. + + + [bdubbs] - Update to bc-6.7.0. Fixes + #5353. + + + + + + 2023-09-24 + + + [xry111] - Update Glibc upstream fixes patch to plug a + memory leak introduced by the security fix. + + + + + + 2023-09-17 + + + [xry111] - Update to linux-6.5.3. Fixes + #5343. + + + [xry111] - Update to iana-etc-20230912. Addresses + #5006. + + + [xry111] - Update to iproute2-6.5.0. Fixes + #5342. + + + 2023-09-13 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index e1fca225c..0586b3d02 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -38,12 +38,12 @@ - - + @@ -89,18 +89,18 @@ - + - + @@ -122,27 +122,27 @@ Gzip-&gzip-version; - + - + Kbd-&kbd-version; - + @@ -152,9 +152,9 @@ - + @@ -173,18 +173,18 @@ - + - + @@ -197,9 +197,9 @@ - + + OpenSSL-&openssl-version; + @@ -224,6 +224,9 @@ + Shadow-&shadow-version; @@ -242,9 +245,9 @@ - + @@ -263,9 +266,9 @@ - + Zlib-&zlib-version; @@ -287,6 +290,10 @@ Added: + + setuptools-&setuptools-version; + + &glibc-upstream-fixes-patch; diff --git a/chapter02/hostreqs.xml b/chapter02/hostreqs.xml index 7b4a037eb..5a2bbf6ee 100644 --- a/chapter02/hostreqs.xml +++ b/chapter02/hostreqs.xml @@ -64,8 +64,9 @@ should be a link to bison or a small script that executes bison) + - Coreutils-7.0 + Coreutils-8.1 @@ -82,7 +83,9 @@ - GCC-5.1 including the C++ + + GCC-5.2 including the C++ compiler, g++ (Versions greater than &gcc-version; are not recommended as they have not been tested). C and C++ standard libraries (with headers) must also be present so the C++ compiler can @@ -185,8 +188,8 @@ ver_check() fi } -# Coreutils first because-sort needs Coreutils >= 7.0 -ver_check Coreutils sort 7.0 || bail "--version-sort unsupported" +# Coreutils first because --version-sort needs Coreutils >= 7.0 +ver_check Coreutils sort 8.1 || bail "Coreutils too old, stop" ver_check Bash bash 3.2 ver_check Bc bc 1.07.0 ver_check Binutils ld 2.13.1 @@ -194,8 +197,8 @@ ver_check Bison bison 2.7 ver_check Diffutils diff 2.8.1 ver_check Findutils find 4.2.31 ver_check Gawk gawk 4.0.1 -ver_check GCC gcc 5.1 -ver_check "GCC (C++)" g++ 5.1 +ver_check GCC gcc 5.2 +ver_check "GCC (C++)" g++ 5.2 ver_check Grep grep 2.5.1a ver_check Gzip gzip 1.3.12 ver_check M4 m4 1.4.10 @@ -222,7 +225,13 @@ echo "Compiler check:" if printf "int main(){}" | g++ -x c++ - then echo "OK: g++ works"; else echo "ERROR: g++ does NOT work"; fi -rm -f a.out +rm -f a.out + +if [ "$(nproc)" = "" ]; then + echo "ERROR: nproc is not available or it produces empty output" +else + echo "OK: nproc reports $(nproc) logical cores are available" +fi EOF bash version-check.sh diff --git a/chapter03/packages.xml b/chapter03/packages.xml index dba151cac..deae31301 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -242,7 +242,6 @@ Home page: Download: MD5 sum: &gcc-md5; - SHA256 sum: &gcc-sha256; @@ -356,7 +355,6 @@ Home page: Download: MD5 sum: &inetutils-md5; - SHA256 sum: &inetutils-sha256; @@ -670,6 +668,15 @@ + + Setuptools (&setuptools-version;) - &setuptools-size;: + + Home page: + Download: + MD5 sum: &setuptools-md5; + + + Shadow (&shadow-version;) - &shadow-size;: diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml index 92e7c69bc..fca3011fd 100644 --- a/chapter04/aboutsbus.xml +++ b/chapter04/aboutsbus.xml @@ -45,18 +45,6 @@ - For many modern systems with multiple processors (or cores) the - compilation time for a package can be reduced by performing a "parallel - make" by either setting an environment variable or telling the - make program how many processors are available. For - instance, an Intel i5-6500 CPU can support four simultaneous processes with: - - export MAKEFLAGS='-j4' - - or by building with: - - make -j4 - When multiple processors are used in this way, the SBU units in the book will vary even more than they normally would. In some cases, the make step will simply fail. Analyzing the output of the build process will also diff --git a/chapter04/settingenviron.xml b/chapter04/settingenviron.xml index 9e1d104d9..7f55da75f 100644 --- a/chapter04/settingenviron.xml +++ b/chapter04/settingenviron.xml @@ -198,6 +198,55 @@ EOF completed LFS system. + + For many modern systems with multiple processors (or cores) the + compilation time for a package can be reduced by performing a "parallel + make" by telling the make program how many processors are available via + a command line option or an environment variable. For instance, an Intel + Core i9-13900K processor has 8 P (performance) cores and + 16 E (efficiency) cores, and a P core can simultaneously run two threads + so each P core are modeled as two logical cores by the Linux kernel. + As the result there are 32 logical cores in total. One obvious way to + use all these logical cores is allowing make to spawn + up to 32 build jobs. This can be done by passing the + -j32 option to make: + + + make -j32 + + + Or set the MAKEFLAGS environment variable and its + content will be automatically used by make as + command line options: + + + export MAKEFLAGS=-j32 + + + + 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 use all logical cores available for building packages in + and + , set MAKEFLAGS + now in .bashrc: + + +cat >> ~/.bashrc << "EOF" +export MAKEFLAGS=-j$(nproc) +EOF + + + Replace $(nproc) with the number of logical + cores you want to use if you don't want to use all the logical cores. + + Finally, to ensure the environment is fully prepared for building the temporary tools, force the bash shell to read the new user profile: diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 3772ef075..f927d187f 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -93,6 +93,7 @@ cd build --build=$(../scripts/config.guess) \ --enable-kernel=&linux-major-version;.&linux-minor-version; \ --with-headers=$LFS/usr/include \ + --disable-nscd \ libc_cv_slibdir=/usr/lib @@ -136,6 +137,14 @@ cd build + + --disable-nscd + + Do not build the name service cache daemon which is no + longer used. + + + During this stage the following warning might appear: diff --git a/chapter05/libstdc++.xml b/chapter05/libstdc++.xml index e0ea2e790..1dc4277ee 100644 --- a/chapter05/libstdc++.xml +++ b/chapter05/libstdc++.xml @@ -124,7 +124,7 @@ cd build Remove the libtool archive files because they are harmful for cross-compilation: -rm -v $LFS/usr/lib/lib{stdc++,stdc++fs,supc++}.la +rm -v $LFS/usr/lib/lib{stdc++{,exp,fs},supc++}.la diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index 185f4a0c4..f6b6c6310 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -63,13 +63,6 @@ - - gl_cv_macro_MB_CUR_MAX_good=y - - This is needed to work around an issue in the gnulib copy - shipped by the package which would break cross compilation. - - Compile the package: diff --git a/chapter07/chroot.xml b/chapter07/chroot.xml index 6fe1da971..2ebdfd75e 100644 --- a/chapter07/chroot.xml +++ b/chapter07/chroot.xml @@ -46,11 +46,23 @@ bash: no job control in this shell TERM="$TERM" \ PS1='(lfs) \u:\w\$ ' \ PATH=/usr/bin:/usr/sbin \ + MAKEFLAGS="-j$(nproc)" \ + TESTSUITEFLAGS="-j$(nproc)" \ /bin/bash --login The command replace the current shell process with a new shell process, with controlling terminal set up. + + If you don't want to use all available logical cores, replace + $(nproc) with the number of logical cores you + want to use for building packages in this chapter and the following + chapters. The test suites of some packages (notably Autoconf, Libtool, + and Tar) in &ch-final; are not affected by MAKEFLAGS, they + use a TESTSUITEFLAGS environment variable instead. We + set that here as well for running these test suites with multiple cores. + + The -i option given to the env command will clear all the variables in the environment. After that, only the HOME, TERM, PS1, and @@ -66,7 +78,7 @@ bash: no job control in this shell in the PATH. This means that the cross toolchain will no longer be used. - Note that the bash prompt will say + Also note that the bash prompt will say I have no name! This is normal because the /etc/passwd file has not been created yet. diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 2b752b944..9047fa744 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -215,8 +215,23 @@ chmod -v 600 /var/log/btmp failed login attempts. The /var/log/btmp file records the bad login attempts. - The /run/utmp file records the users that - are currently logged in. This file is created dynamically in the boot - scripts. + + The /run/utmp file + records the users that are currently logged in. This file is created + dynamically in the boot scripts. + + + + + The utmp, + wtmp, btmp, and + lastlog files use 32-bit integers for timestamps + and they'll be fundamentally broken after year 2038. Many packages + have stopped using them and other packages are going to stop using + them. It is probably best to consider them deprecated. + + diff --git a/chapter08/automake.xml b/chapter08/automake.xml index 4fc1bd277..5d7541049 100644 --- a/chapter08/automake.xml +++ b/chapter08/automake.xml @@ -53,11 +53,14 @@ make - Using the -j4 make option speeds up the tests, even on systems with - only one processor, due to internal delays in individual tests. To test + Using four parallel jobs speeds up the tests, even on systems with + less logical cores, due to internal delays in individual tests. To test the results, issue: -make -j4 check +make -j$(($(nproc)>4?$(nproc):4)) check + + Replace $((...)) with the number of + logical cores you want to use if you don't want to use all. The test t/subobj.sh is known to fail. diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml index 8ab81d2f8..2fccb6139 100644 --- a/chapter08/chapter08.xml +++ b/chapter08/chapter08.xml @@ -65,6 +65,7 @@ + diff --git a/chapter08/gawk.xml b/chapter08/gawk.xml index cc9348d90..d8984b58e 100644 --- a/chapter08/gawk.xml +++ b/chapter08/gawk.xml @@ -59,15 +59,18 @@ su tester -c "PATH=$PATH make check" Install the package: -make LN='ln -f' install +rm -f /usr/bin/gawk-&gawk-version; +make install - The meaning of the overridden make variable: + The meaning of the command: - LN='ln -f' + rm -f /usr/bin/gawk-&gawk-version; - This variable ensures that the previous hard link installed + The building system will not recreate the hard link + gawk-&gawk-version; if it already exists. + Remove it to ensure that the previous hard link installed in is updated here. diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index 179357c00..69936c879 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -74,6 +74,7 @@ cd build --enable-kernel=&linux-major-version;.&linux-minor-version; \ --enable-stack-protector=strong \ --with-headers=/usr/include \ + --disable-nscd \ libc_cv_slibdir=/usr/lib @@ -115,6 +116,14 @@ cd build + + --disable-nscd + + Do not build the name service cache daemon which is no + longer used. + + + libc_cv_slibdir=/usr/lib @@ -207,7 +216,7 @@ esac ldd script: sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd - + Next, install the locales that can make the system respond in a different language. None of these locales are required, but if some of them are missing, the test suites of some packages will skip important @@ -499,7 +508,7 @@ mkdir -pv /etc/ld.so.conf.d gencat, getconf, getent, iconv, iconvconfig, ldconfig, ldd, lddlibc4, ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2), - locale, localedef, makedb, mtrace, nscd, + locale, localedef, makedb, mtrace, pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace, zdump, and zic ld-linux-x86-64.so.2, ld-linux.so.2, @@ -519,7 +528,7 @@ mkdir -pv /etc/ld.so.conf.d /usr/include/protocols, /usr/include/rpc, /usr/include/sys, /usr/lib/audit, /usr/lib/gconv, /usr/lib/locale, /usr/libexec/getconf, /usr/share/i18n, /usr/share/zoneinfo, - /var/cache/nscd, and /var/lib/nss_db + and /var/lib/nss_db @@ -653,17 +662,6 @@ mkdir -pv /etc/ld.so.conf.d - - nscd - - A daemon that provides a cache for the most common name - service requests - - nscd - - - - pcprofiledump diff --git a/chapter08/man-db.xml b/chapter08/man-db.xml index 88c811d33..229111131 100644 --- a/chapter08/man-db.xml +++ b/chapter08/man-db.xml @@ -113,11 +113,7 @@ To test the results, issue: -make -k check - - - One test named man1/lexgrog.1 is known - to fail. +make check Install the package: diff --git a/chapter08/openssl.xml b/chapter08/openssl.xml index 6a4441552..25295f056 100644 --- a/chapter08/openssl.xml +++ b/chapter08/openssl.xml @@ -63,7 +63,7 @@ To test the results, issue: -make test +HARNESS_JOBS=$(nproc) make test One test, 30-test_afalg.t, is known to fail if the host kernel does not have enabled, diff --git a/chapter08/perl.xml b/chapter08/perl.xml index d3159595c..2bb849645 100644 --- a/chapter08/perl.xml +++ b/chapter08/perl.xml @@ -111,7 +111,7 @@ export BUILD_BZIP2=0 To test the results (approximately 11 SBU), issue: -make test +TEST_JOBS=$(nproc) make test_harness Install the package and clean up: diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml index 7104d9cba..185538796 100644 --- a/chapter08/pkgmgt.xml +++ b/chapter08/pkgmgt.xml @@ -69,6 +69,17 @@ 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 a package containing a shared library is updated, and if the name of the library changes, then any packages dynamically linked to the library must be recompiled, to link against the @@ -152,7 +163,7 @@ provided by coreutils has already implemented this, and most packages use that command to install binary files and libraries. This means that you won't be troubled by this issue most of the time. - However, the install process of some packages (notably Mozilla JS + However, the install process of some packages (notably SpiderMonkey in BLFS) just overwrites the file if it exists; this causes a crash. So it's safer to save your work and close unneeded running processes before updating a package. @@ -185,19 +196,29 @@ This is a simplistic package management technique that does not need a special program to manage the packages. Each package is installed in a separate directory. For example, package foo-1.1 is installed in - /usr/pkg/foo-1.1 - and a symlink is made from /usr/pkg/foo to - /usr/pkg/foo-1.1. When + /opt/foo-1.1 + and a symlink is made from /opt/foo to + /opt/foo-1.1. When a new version foo-1.2 comes along, it is installed in - /usr/pkg/foo-1.2 and the previous + /opt/foo-1.2 and the previous symlink is replaced by a symlink to the new version. Environment variables such as PATH, - LD_LIBRARY_PATH, MANPATH, - INFOPATH and CPPFLAGS need to be expanded to - include /usr/pkg/foo. If you install more than a few packages, - this scheme becomes unmanageable. + MANPATH, INFOPATH, + PKG_CONFIG_PATH, CPPFLAGS, + LDFLAGS, and the configuration file + /etc/ld.so.conf may need to be expanded to + include the corresponding subdirectories in + /opt/foo-x.y. + + This scheme is used by the BLFS book to install some very large + packages to make it easier to upgrade them. If you install more + than a few packages, this scheme becomes unmanageable. And some + packages (for example Linux API headers and Glibc) may not work well + with this scheme. + Never use this scheme system-wide. + diff --git a/chapter08/python.xml b/chapter08/python.xml index a4bfeaf91..f7bc19d47 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -48,7 +48,6 @@ ./configure --prefix=/usr \ --enable-shared \ --with-system-expat \ - --with-system-ffi \ --enable-optimizations @@ -62,14 +61,6 @@ - - --with-system-ffi - - This switch enables linking against the system version of - libffi.so. - - - --enable-optimizations diff --git a/chapter08/setuptools.xml b/chapter08/setuptools.xml new file mode 100644 index 000000000..257a50328 --- /dev/null +++ b/chapter08/setuptools.xml @@ -0,0 +1,71 @@ + + + %general-entities; +]> + + + + + + setuptools + &setuptools-version; +
&setuptools-url;
+
+ + Setuptools-&setuptools-version; + + + Setuptools + + + + + + <para>Setuptools is a tool used to download, build, install, upgrade, + and uninstall Python packages.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + <seglistitem> + <seg>&setuptools-fin-sbu;</seg> + <seg>&setuptools-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Setuptools + + Build the package: + +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD + + Install the package: + +pip3 install --no-index --find-links dist setuptools + + + + Contents of Setuptools + + + Installed directory + + + + /usr/lib/python&python-minor;/site-packages/_distutils_hack, + /usr/lib/python&python-minor;/site-packages/pkg_resources, + /usr/lib/python&python-minor;/site-packages/setuptools, and + /usr/lib/python&python-minor;/site-packages/setuptools-&setuptools-version;.dist-info + + + + + + +
+ diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml index f88216a5b..315234c7f 100644 --- a/chapter08/shadow.xml +++ b/chapter08/shadow.xml @@ -276,7 +276,7 @@ useradd -D --gid 999 chage, chfn, chgpasswd, chpasswd, chsh, expiry, faillog, getsubids, gpasswd, groupadd, groupdel, groupmems, groupmod, grpck, - grpconv, grpunconv, lastlog, login, logoutd, newgidmap, newgrp, + grpconv, grpunconv, login, logoutd, newgidmap, newgrp, newuidmap, newusers, nologin, passwd, pwck, pwconv, pwunconv, sg (link to newgrp), su, useradd, userdel, usermod, vigr (link to vipw), and vipw @@ -459,17 +459,6 @@ useradd -D --gid 999
- - lastlog - - Reports the most recent login of all users or of a - given user - - lastlog - - - - login diff --git a/chapter08/udev.xml b/chapter08/udev.xml index 35bb12f46..46ab88cff 100644 --- a/chapter08/udev.xml +++ b/chapter08/udev.xml @@ -66,6 +66,8 @@ meson setup \ -Dmode=release \ -Ddev-kvm-mode=0660 \ -Dlink-udev-shared=false \ + -Dlogind=false \ + -Dvconsole=false \ .. @@ -107,35 +109,41 @@ meson setup \ and it's too overkill for a udev-only installation. + + + -Dlogind=false -Dvconsole=false + + These options prevent the generation of several udev rule + files belonging to the other Systemd components that we won't + install. + + Only build the components needed for udev: - ninja udevadm systemd-hwdb \ - $(grep -o -E "^build (src/libudev|src/udev|rules.d|hwdb.d)[^:]*" \ - build.ninja | awk '{ print $2 }') \ + ninja udevadm systemd-hwdb \ + $(ninja -n | grep -Eo '(src/(lib)?udev|rules.d|hwdb.d)/[^ ]*') \ $(realpath libudev.so --relative-to .) - Remove one udev rule file requiring a full Systemd - installation: - -rm rules.d/90-vconsole.rules - Install the package: install -vm755 -d {/usr/lib,/etc}/udev/{hwdb,rules}.d install -vm755 -d /usr/{lib,share}/pkgconfig -install -vm755 udevadm /usr/bin/ -install -vm755 systemd-hwdb /usr/bin/udev-hwdb -ln -svfn ../bin/udevadm /usr/sbin/udevd -cp -av libudev.so{,*[0-9]} /usr/lib/ -install -vm644 ../src/libudev/libudev.h /usr/include/ -install -vm644 src/libudev/*.pc /usr/lib/pkgconfig/ -install -vm644 src/udev/*.pc /usr/share/pkgconfig/ -install -vm644 ../src/udev/udev.conf /etc/udev/ -install -vm644 rules.d/* ../rules.d/{*.rules,README} /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 | grep -F -v ".") /usr/lib/udev +install -vm755 udevadm /usr/bin/ +install -vm755 systemd-hwdb /usr/bin/udev-hwdb +ln -svfn ../bin/udevadm /usr/sbin/udevd +cp -av libudev.so{,*[0-9]} /usr/lib/ +install -vm644 ../src/libudev/libudev.h /usr/include/ +install -vm644 src/libudev/*.pc /usr/lib/pkgconfig/ +install -vm644 src/udev/*.pc /usr/share/pkgconfig/ +install -vm644 ../src/udev/udev.conf /etc/udev/ +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 some custom rules and support files useful in an LFS environment: diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index 76e50bb98..a08bc0d59 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -78,12 +78,22 @@ This method also provides a full graphical environment, but first requires installing - sshd and - wget + sshd on the LFS system, usually in the LFS command line. It also requires a second computer. + + You may use the scp command to upload the package + sources to be built onto the LFS system. If you want to download + the sources onto the LFS system directly instead, install + libtasn1, + p11-kit, + make-ca, and + wget + in chroot (or upload their sources using scp + after booting the LFS system). + diff --git a/chapter11/theend.xml b/chapter11/theend.xml index 6f5e7e401..e7bfc6ef8 100644 --- a/chapter11/theend.xml +++ b/chapter11/theend.xml @@ -58,6 +58,7 @@ VERSION="&version;" ID=lfs PRETTY_NAME="Linux From Scratch &version;" VERSION_CODENAME="<your name here>" +HOME_URL="&lfs-root;lfs/" EOF Be sure to customize the fields 'DISTRIB_CODENAME' and diff --git a/lfs-latest-git.php b/lfs-latest-git.php index c0c7aaea3..162d8d6c8 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -85,8 +85,9 @@ function http_get_file( $url ) exec( "curl --location --silent --max-time 30 $url", $dir ); - $s = implode( "\n", $dir ); - $dir = strip_tags( $s ); + $dir = implode( "\n", $dir ); + if ( !preg_match( "/api.github.com/", $url) ) + $dir = strip_tags( $dir ); return explode( "\n", $dir ); } @@ -127,6 +128,7 @@ if ( $package == "expect" ) $dirpath = "https://sourceforge.net/projects/exp if ( $package == "file" ) $dirpath = "https://github.com/file/file/tags"; if ( $package == "flex" ) $dirpath = github("westes/flex"); if ( $package == "flit_core" ) $dirpath = "https://pypi.org/project/flit-core/"; +if ( $package == "setuptools" ) $dirpath = "https://pypi.org/project/setuptools/"; if ( $package == "gcc" ) $dirpath = max_parent( $dirpath, "gcc-" ); if ( $package == "iana-etc" ) $dirpath = github("Mic92/iana-etc"); if ( $package == "intltool" ) $dirpath = "https://launchpad.net/intltool/trunk"; @@ -293,6 +295,9 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd"); if ( $package == "flit_core" ) return find_max( $lines, "/flit-core /", "/^.*flit-core ([\d\.]+)$/" ); + if ( $package == "setuptools" ) + return find_max( $lines, "/setuptools /", "/^.*setuptools ([\d\.]+)$/" ); + if ( $package == "procps-ng" ) return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" ); diff --git a/packages.ent b/packages.ent index 73a14b81f..69a5646b2 100644 --- a/packages.ent +++ b/packages.ent @@ -47,20 +47,20 @@ - - + + - + - - + + - + @@ -148,10 +148,10 @@ - - + + - + @@ -208,10 +208,10 @@ - - + + - + @@ -222,7 +222,6 @@ - @@ -246,10 +245,10 @@ - - + + - + @@ -320,10 +319,10 @@ - - + + - + @@ -332,7 +331,6 @@ - @@ -345,10 +343,10 @@ - - + + - + @@ -363,18 +361,18 @@ - - + + - + - - + + - + @@ -436,21 +434,26 @@ - + - + - + - - - - - + + + + + + + @@ -475,10 +478,10 @@ - - + + - + @@ -499,10 +502,10 @@ - - + + - + @@ -541,10 +544,10 @@ - - + + - + @@ -600,19 +603,19 @@ - - - + + + - + - - + + @@ -633,11 +636,19 @@ - - + + + + + + + + + + - - + + @@ -696,10 +707,10 @@ - - + + - + @@ -735,21 +746,21 @@ - + - + - - + + - - + + - + @@ -762,10 +773,10 @@ - - + + - + diff --git a/patches.ent b/patches.ent index 6634d1f2f..4107b2dc2 100644 --- a/patches.ent +++ b/patches.ent @@ -14,9 +14,9 @@ - - - + + + diff --git a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl b/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl index 49337d0ef..787a0e8c1 100644 --- a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl +++ b/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl @@ -241,4 +241,22 @@ + + + + + + + i + i + i + i + i + i + 1 + + +