From ce9ec4f126d82e7c20a2436cd4d63bda02e32381 Mon Sep 17 00:00:00 2001 From: "Douglas R. Reno" Date: Fri, 23 Jun 2023 10:48:45 -0500 Subject: [PATCH 01/47] gettext: Use gettext-version instead of a hardcoded version (which is now out of date) for /usr/share/gettext-0.21.1 --- chapter08/gettext.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/gettext.xml b/chapter08/gettext.xml index be1c16d39..bf5a97522 100644 --- a/chapter08/gettext.xml +++ b/chapter08/gettext.xml @@ -97,7 +97,7 @@ chmod -v 0755 /usr/lib/preloadable_libintl.so libasprintf.so, libgettextlib.so, libgettextpo.so, libgettextsrc.so, libtextstyle.so, and preloadable_libintl.so /usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;, - /usr/share/gettext, and /usr/share/gettext-0.19.8 + /usr/share/gettext, and /usr/share/gettext-&gettext-version; From bbfb090d2a43fc140de9c9475e4f4913529d0f57 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 30 Jun 2023 03:17:31 +0800 Subject: [PATCH 02/47] glibc: Disable obsolete libcrypt implementation I've not bothered to write an explanation for --disable-crypt because it will likely be the default of Glibc-2.38, then we may drop it from the command lines. --- chapter05/glibc.xml | 1 + chapter08/glibc.xml | 13 ++----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 14f1fac6c..7fb5e98c5 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -91,6 +91,7 @@ cd build --build=$(../scripts/config.guess) \ --enable-kernel=&min-kernel; \ --with-headers=$LFS/usr/include \ + --disable-crypt \ libc_cv_slibdir=/usr/lib diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index a44e285c9..4245b0ff4 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -79,6 +79,7 @@ cd build --enable-kernel=&min-kernel; \ --enable-stack-protector=strong \ --with-headers=/usr/include \ + --disable-crypt \ libc_cv_slibdir=/usr/lib @@ -489,7 +490,7 @@ mkdir -pv /etc/ld.so.conf.d ld-linux-x86-64.so.2, ld-linux.so.2, libBrokenLocale.{a,so}, libanl.{a,so}, libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so, - libcrypt.{a,so}, libdl.{a,so.2}, libg.a, libm.{a,so}, + libdl.{a,so.2}, libg.a, libm.{a,so}, libmcheck.a, libmemusage.so, libmvec.{a,so}, libnsl.so.1, libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so, libpcprofile.so, libpthread.{a,so.0}, @@ -795,16 +796,6 @@ mkdir -pv /etc/ld.so.conf.d - - libcrypt - - The cryptography library - - libcrypt - - - - libdl From c727d7e7f701db63f6a32d52ff2679289cb86706 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 30 Jun 2023 03:55:58 +0800 Subject: [PATCH 03/47] Add libxcrypt --- chapter01/changelog.xml | 10 +++ chapter01/whatsnew.xml | 4 ++ chapter03/packages.xml | 9 +++ chapter08/chapter08.xml | 1 + chapter08/libxcrypt.xml | 148 ++++++++++++++++++++++++++++++++++++++++ packages.ent | 8 +++ prologue/why.xml | 11 +++ 7 files changed, 191 insertions(+) create mode 100644 chapter08/libxcrypt.xml diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index e2b70f617..39f52d80e 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,16 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2023-06-29 + + + [xry111] - Add libxcrypt-4.4.35. Fixes + #5280. + + + + 2023-06-17 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index ded7e7df0..fa08642bc 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -304,6 +304,10 @@ Added: + + Libxcrypt-&libxcrypt-version; + + Pkgconf-&flit-core-version; diff --git a/chapter03/packages.xml b/chapter03/packages.xml index 569d6b6aa..86932b428 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -468,6 +468,15 @@ + + Libxcrypt (&libxcrypt-version;) - &libxcrypt-size;: + + Home page: + Download: + MD5 sum: &libxcrypt-md5; + + + Linux (&linux-version;) - &linux-size;: diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml index 605d26782..e97ae7057 100644 --- a/chapter08/chapter08.xml +++ b/chapter08/chapter08.xml @@ -36,6 +36,7 @@ + diff --git a/chapter08/libxcrypt.xml b/chapter08/libxcrypt.xml new file mode 100644 index 000000000..c65d7db29 --- /dev/null +++ b/chapter08/libxcrypt.xml @@ -0,0 +1,148 @@ + + + %general-entities; +]> + + + + + + libxcrypt + &libxcrypt-version; +
&libxcrypt-url;
+
+ + Libxcrypt-&libxcrypt-version; + + + Libxcrypt + + + + + + <para>The Libxcrypt package contains a modern library for one-way + hashing of passwords.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&libxcrypt-fin-sbu;</seg> + <seg>&libxcrypt-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Libxcrypt + + Prepare Libxcrypt for compilation: + +./configure --prefix=/usr \ + --enable-hashes=strong,glibc \ + --enable-obsolete-api=no \ + --disable-static \ + --disable-failure-tokens + + + The meaning of the new configure options: + + + --enable-hashes=strong,glibc + + Build strong hash algorithms recommended for security use + cases, and the hash algorithms provided by traditional Glibc + libcrypt for + compatibility. + + + + + --enable-obsolete-api=no + + Disable obsolete API functions. They are not needed for + a modern Linux system built from source. + + + + + --disable-failure-tokens + + Disable failure token feature. It's needed for + compatibility with the traditional hash libraries of some + platforms, but a Linux system based on Glibc does not need + it. + + + + + Compile the package: + +make + + To test the results, issue: + +make check + + Install the package: + +make install + + + + The instructions above disabled obsolete API functions since + no package installed by compiling from sources would link against + them at runtime. However, the only known binary-only applications + that link against these functions require ABI version 1. If you must + have such libraries because of some binary-only application or to be + to be compliant with LSB, build the package again with the following + commands: + +make distclean +./configure --prefix=/usr \ + --enable-hashes=strong,glibc \ + --enable-obsolete-api=glibc \ + --disable-static \ + --disable-failure-tokens +make +cp -av .libs/libcrypt.so.1* /usr/lib + + + + + + Contents of Libxcrypt + + + Installed libraries + + + libcrypt.so + + + + + Short Descriptions + + + + + libcrypt + + Contains functions to hash passwords + + libcrypt + + + + + + + + +
diff --git a/packages.ent b/packages.ent index 315c67fc7..c5ef421bf 100644 --- a/packages.ent +++ b/packages.ent @@ -430,6 +430,14 @@ + + + + + + + + diff --git a/prologue/why.xml b/prologue/why.xml index 7cfa14b7a..7cbe0e184 100644 --- a/prologue/why.xml +++ b/prologue/why.xml @@ -373,6 +373,17 @@ suites in other LFS packages.
+ + Libxcrypt + + This package provides the + libcrypt library + needed by various packages (notably, Shadow) for hashing passwords. + It replaces the obsolete + libcrypt implmentation in + Glibc. + + Linux Kernel From f652d5bb26aa5f8e3b6db2b74511db5702de7b4f Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 30 Jun 2023 06:32:31 +0800 Subject: [PATCH 04/47] gcc-pass2: Disable libsanitizer Building libsanitizer needs libcrypt. Disable it so we don't need to add libxcrypt into Chapter 6. --- chapter06/gcc-pass2.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml index ebc20a296..b342ae484 100644 --- a/chapter06/gcc-pass2.xml +++ b/chapter06/gcc-pass2.xml @@ -96,6 +96,7 @@ cd build --disable-libatomic \ --disable-libgomp \ --disable-libquadmath \ + --disable-libsanitizer \ --disable-libssp \ --disable-libvtv \ --enable-languages=c,c++ @@ -143,6 +144,19 @@ cd build
+ + --disable-libsanitizer + + Disable GCC sanitizer runtime libraries. They are not + needed for the temporary installation. This switch is necessary + to build GCC without + libcrypt installed for + the target. In it was + implied by --disable-libstdcxx, but now we + have to explicitly pass it. + + +
Compile the package: From 1adc9414366221a91553357495ee989a7774c091 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 30 Jun 2023 06:57:35 +0800 Subject: [PATCH 05/47] dependencies: Add Libxcrypt dependency info --- appendices/dependencies.xml | 65 ++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 1d4a0abac..54b3d65e0 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -970,8 +970,8 @@ &dependencies; Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC, - Gettext, Glibc, GMP, Grep, M4, Make, MPC, MPFR, Patch, Perl, Sed, - Tar, Texinfo, and Zstd + Gettext, Glibc, GMP, Grep, Libxcrypt, M4, Make, MPC, MPFR, Patch, + Perl, Sed, Tar, Texinfo, and Zstd @@ -1885,6 +1885,47 @@ + + Libxcrypt + + + &dependencies; + + Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, + Make, and Sed + + + + + &runtime; + + Glibc + + + + + &testsuites; + + None + + + + + &before; + + GCC, Perl, Python, + and Shadow, and Systemd + + + + + &external; + + None + + + Linux @@ -2455,14 +2496,14 @@ &dependencies; Bash, Binutils, Coreutils, Gawk, GCC, GDBM, Glibc, Grep, Groff, - Make, Sed, and Zlib + Libxcrypt, Make, Sed, and Zlib &runtime; - GDBM and Glibc + GDBM, Glibc, and Libxcrypt @@ -2621,7 +2662,7 @@ &dependencies; Bash, Binutils, Coreutils, Expat, GCC, Gdbm, Gettext, Glibc, - Grep, Libffi, Make, Ncurses, OpenSSL, Pkgconf, Sed, and + Grep, Libffi, Libxcrypt, Make, Ncurses, OpenSSL, Pkgconf, Sed, and Util-linux @@ -2629,8 +2670,8 @@ &runtime; - Bzip2, Expat, Gdbm, Glibc, Libffi, Ncurses, OpenSSL, and - Zlib + Bzip2, Expat, Gdbm, Glibc, Libffi, Libxcrypt, Ncurses, + OpenSSL, and Zlib @@ -2745,14 +2786,14 @@ &dependencies; Acl, Attr, Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, - GCC, Gettext, Glibc, Grep, Libcap, Make, and Sed + GCC, Gettext, Glibc, Grep, Libcap, Libxcrypt, Make, and Sed &runtime; - Glibc + Glibc and Libxcrypt @@ -2826,15 +2867,15 @@ &dependencies; Acl, Attr, Bash, Binutils, Coreutils, Diffutils, Expat, Gawk, - GCC, Glibc, Gperf, Grep, Jinja2, Libcap, Meson, Pkgconf, Sed, - Util-linux, and Zstd + GCC, Glibc, Gperf, Grep, Jinja2, Libcap, Libxcrypt, Meson, + Pkgconf, Sed, Util-linux, and Zstd &runtime; - Acl, Attr, Glibc, Libcap, and Util-linux + Acl, Attr, Glibc, Libcap, Libxcrypt, and Util-linux From 4cd0193c962548f5d2188144ee8ccd5be5af76e9 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Fri, 30 Jun 2023 12:58:10 -0500 Subject: [PATCH 06/47] Package Updates. Update to iana-etc-20230615. Update to vim-9.0.1671. Update to util-linux-2.39.1. Update to linux-6.3.10. Update to kbd-2.6.1. Update to gettext-0.22. --- chapter01/changelog.xml | 30 ++++++++++++++++++++++++++++++ chapter01/whatsnew.xml | 8 ++++---- packages.ent | 34 +++++++++++++++++----------------- 3 files changed, 51 insertions(+), 21 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index e2b70f617..42d617192 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,36 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 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 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index ded7e7df0..302f2d43f 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -121,9 +121,9 @@ - + @@ -160,9 +160,9 @@ - + diff --git a/packages.ent b/packages.ent index 315c67fc7..bd7e78860 100644 --- a/packages.ent +++ b/packages.ent @@ -253,10 +253,10 @@ - - + + - + @@ -325,10 +325,10 @@ - + - + @@ -366,10 +366,10 @@ - - + + - + @@ -432,12 +432,12 @@ - + - + - + - + + - + - + - + - + From d6e7cda825b9ddc2c9685cc1bb083923f18906b7 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 1 Jul 2023 16:00:20 +0800 Subject: [PATCH 07/47] kbd: Simplify the instruction for doc installation --- chapter08/kbd.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chapter08/kbd.xml b/chapter08/kbd.xml index 522ddbd72..28685015a 100644 --- a/chapter08/kbd.xml +++ b/chapter08/kbd.xml @@ -97,8 +97,7 @@ sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in If desired, install the documentation: -mkdir -pv /usr/share/doc/kbd-&kbd-version; -cp -R -v docs/doc/* /usr/share/doc/kbd-&kbd-version; +cp -R -v docs/doc -T /usr/share/doc/kbd-&kbd-version; From cc5eb637aad1025368417cfd5f8cf2f560036f17 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 2 Jul 2023 20:31:17 +0800 Subject: [PATCH 08/47] pkgconf: Use the Gentoo mirror for now :( BugLink: https://github.com/pkgconf/pkgconf/issues/302 --- packages.ent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.ent b/packages.ent index bd7e78860..cc6365abf 100644 --- a/packages.ent +++ b/packages.ent @@ -568,7 +568,7 @@ - + From 9ceb623400b564f39947cf7ff7313afaa1fd69a5 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 3 Jul 2023 06:14:40 +0800 Subject: [PATCH 09/47] Package update - Update to iproute2-6.4.0 (#5277) - Update to linux-6.4.1 (#5276) --- chapter01/changelog.xml | 14 ++++++++++++++ gen-changelog.py | 4 ++-- packages.ent | 14 +++++++------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 42d617192..d870405d9 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,20 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2023-07-02 + + + [xry111] - Update to iproute2-6.4.0. Fixes + #5277. + + + [xry111] - Update to linux-6.4.1. Fixes + #5276. + + + + 2023-07-01 diff --git a/gen-changelog.py b/gen-changelog.py index 2932dd9ec..e7ee1d7e7 100755 --- a/gen-changelog.py +++ b/gen-changelog.py @@ -83,9 +83,9 @@ for (s, act) in [(upd, "Update to "), (add, "Add ")]: out = act + pkgver if pkgver in ticket: out += ' (#' + ticket[pkgver] + ')' - print(out) + print("-", out) for i in rem: - print("Remove", i) + print("-", "Remove", i) print("---------------------") diff --git a/packages.ent b/packages.ent index cc6365abf..fc05f20f6 100644 --- a/packages.ent +++ b/packages.ent @@ -350,10 +350,10 @@ - - + + - + @@ -431,13 +431,13 @@ - - + + - + - + + + 2023-07-15 + + + [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 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 68ec876ab..a2d4cc179 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -136,9 +136,9 @@ Grep-&grep-version; - + diff --git a/chapter08/groff.xml b/chapter08/groff.xml index 4ab954d13..3a4dc2c56 100644 --- a/chapter08/groff.xml +++ b/chapter08/groff.xml @@ -57,7 +57,9 @@ make - This package does not come with a test suite. + To test the results, issue: + +make check Install the package: diff --git a/packages.ent b/packages.ent index 5c9e46172..2abb800d1 100644 --- a/packages.ent +++ b/packages.ent @@ -299,10 +299,10 @@ - - + + - + @@ -325,10 +325,10 @@ - - + + - + @@ -430,22 +430,22 @@ - - + + - + - + - + - + + One test named man1/lexgrog.1 is known + to fail. + Install the package: make install From 1053282e5f0a6e7bba9605676b650d46db6ffaf4 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 16 Jul 2023 00:52:41 +0800 Subject: [PATCH 24/47] man-db: Update known test failures, again I was too naive: actually a lot of tests fail with groff-1.23.0 and they'll show up with "-k". --- chapter08/man-db.xml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/chapter08/man-db.xml b/chapter08/man-db.xml index b99d580b5..498274f51 100644 --- a/chapter08/man-db.xml +++ b/chapter08/man-db.xml @@ -111,13 +111,11 @@ make - To test the results, issue: - -make check - - One test named man1/lexgrog.1 is known - to fail. + Many tests are known to fail with groff-1.23.0 or later. If + you still want to test the results anyway, issue: + +make -k check Install the package: From c7ee38fb5ad62d2153980b4a2518cc5d527a1c86 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 16 Jul 2023 10:04:12 +0800 Subject: [PATCH 25/47] bootscripts: Use /bin/udevadm instead of /sbin/udevadm We are switching from eudev to systemd-udev for SysV. Systemd installs udevadm into /usr/bin, and at least a part of its function can be used as non-root user, so we'll no longer put it into /usr/sbin. --- bootscripts/ChangeLog | 3 +++ bootscripts/lfs/init.d/udev | 8 ++++---- bootscripts/lfs/init.d/udev_retry | 6 ++---- packages.ent | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index c7a3d9a7b..0c1d33f6d 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,6 @@ +2023-07-15 Xi Ruoyao + * Use /bin/udevadm instead of /sbin/udevadm. + 2022-09-30 Bruce Dubbs * Mount /dev/shm as a tmpfs. diff --git a/bootscripts/lfs/init.d/udev b/bootscripts/lfs/init.d/udev index c74c8e19f..612685af7 100644 --- a/bootscripts/lfs/init.d/udev +++ b/bootscripts/lfs/init.d/udev @@ -49,13 +49,13 @@ case "${1}" in # Now traverse /sys in order to "coldplug" devices that have # already been discovered - /sbin/udevadm trigger --action=add --type=subsystems - /sbin/udevadm trigger --action=add --type=devices - /sbin/udevadm trigger --action=change --type=devices + /bin/udevadm trigger --action=add --type=subsystems + /bin/udevadm trigger --action=add --type=devices + /bin/udevadm trigger --action=change --type=devices # Now wait for udevd to process the uevents we triggered if ! is_true "$OMIT_UDEV_SETTLE"; then - /sbin/udevadm settle + /bin/udevadm settle fi # If any LVM based partitions are on the system, ensure they diff --git a/bootscripts/lfs/init.d/udev_retry b/bootscripts/lfs/init.d/udev_retry index 112846a03..ccac9a2bd 100644 --- a/bootscripts/lfs/init.d/udev_retry +++ b/bootscripts/lfs/init.d/udev_retry @@ -34,8 +34,6 @@ case "${1}" in start) log_info_msg "Retrying failed uevents, if any..." - # As of udev-186, the --run option is no longer valid - #rundir=$(/sbin/udevadm info --run) rundir=/run/udev # From Debian: "copy the rules generated before / was mounted # read-write": @@ -52,13 +50,13 @@ case "${1}" in /bin/sed -e 's/#.*$//' /etc/sysconfig/udev_retry | /bin/grep -v '^$' | \ while read line ; do for subsystem in $line ; do - /sbin/udevadm trigger --subsystem-match=$subsystem --action=add + /bin/udevadm trigger --subsystem-match=$subsystem --action=add done done # Now wait for udevd to process the uevents we triggered if ! is_true "$OMIT_UDEV_RETRY_SETTLE"; then - /sbin/udevadm settle + /bin/udevadm settle fi evaluate_retval diff --git a/packages.ent b/packages.ent index 2abb800d1..8e0a2d222 100644 --- a/packages.ent +++ b/packages.ent @@ -390,7 +390,7 @@ - + From a289860668ca293abca38227ae3a0721d2558688 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 16 Jul 2023 11:02:09 +0800 Subject: [PATCH 26/47] Replace eudev with udev from systemd --- appendices/udev-rules.xml | 2 +- chapter01/changelog.xml | 4 + chapter01/whatsnew.xml | 14 ++- chapter03/packages.xml | 10 +- chapter08/chapter08.xml | 2 +- chapter08/eudev.xml | 202 ------------------------------- chapter08/udev.xml | 245 ++++++++++++++++++++++++++++++++++++++ chapter09/network.xml | 2 +- packages.ent | 10 +- 9 files changed, 267 insertions(+), 224 deletions(-) delete mode 100644 chapter08/eudev.xml create mode 100644 chapter08/udev.xml diff --git a/appendices/udev-rules.xml b/appendices/udev-rules.xml index d1ab70dcf..ca1a7c88b 100644 --- a/appendices/udev-rules.xml +++ b/appendices/udev-rules.xml @@ -13,7 +13,7 @@ Udev configuration rules The rules in this appendix are listed for convenience. Installation is - normally done via instructions in . + normally done via instructions in . 55-lfs.rules diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index e13faf328..18ac4f3f7 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -43,6 +43,10 @@ 2023-07-15 + + [xry111] - Replace eudev-3.2.12 with udev from systemd-253. + Fixes #5085. + [bdubbs] - Update to iana-etc-20230629. Addresses #5006. diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index a2d4cc179..e2803d08c 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -91,9 +91,9 @@ - - Eudev-&eudev-version; - + @@ -304,6 +304,10 @@ Added: + + Udev-&systemd-version; (from systemd) + + Libxcrypt-&libxcrypt-version; @@ -333,6 +337,10 @@ Removed: + + eudev-3.2.12 + + Pkg-config-0.29.2 diff --git a/chapter03/packages.xml b/chapter03/packages.xml index 86932b428..30474944c 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -174,14 +174,6 @@ - - Eudev (&eudev-version;) - &eudev-size;: - - Download: - MD5 sum: &eudev-md5; - - - Expat (&expat-version;) - &expat-size;: @@ -697,7 +689,7 @@ - + Systemd (&systemd-version;) - &systemd-size;: Home page: diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml index e97ae7057..3f356d39e 100644 --- a/chapter08/chapter08.xml +++ b/chapter08/chapter08.xml @@ -91,7 +91,7 @@ - + diff --git a/chapter08/eudev.xml b/chapter08/eudev.xml deleted file mode 100644 index 785e70103..000000000 --- a/chapter08/eudev.xml +++ /dev/null @@ -1,202 +0,0 @@ - - - %general-entities; -]> - - - - - - eudev - &eudev-version; -
&eudev-url;
-
- - Eudev-&eudev-version; - - - Eudev - - - - - - <para>The Eudev package contains programs for dynamic creation of device - nodes.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&eudev-fin-sbu;</seg> - <seg>&eudev-fin-du;</seg> - </seglistitem> - </segmentedlist> - </sect2> - - <sect2 role="installation"> - <title>Installation of Eudev - - - Remove an unneeded group - sgx, from the default udev - rules: - -sed -i -e 's/GROUP="sgx", //' rules/50-udev-default.rules - - Prepare Eudev for compilation: - -./configure --prefix=/usr \ - --bindir=/usr/sbin \ - --sysconfdir=/etc \ - --enable-manpages \ - --disable-static - - Compile the package: - -make - - Create some directories now that are needed for tests, but - will also be used as a part of installation: - -mkdir -pv /usr/lib/udev/rules.d -mkdir -pv /etc/udev/rules.d - - To test the results, issue: - -make check - - Install the package: - -make install - - Install some custom rules and support files useful in an LFS - environment: - -tar -xvf ../&udev-lfs-version;.tar.xz -make -f &udev-lfs-version;/Makefile.lfs install - - - - - Configuring Eudev - - - Eudev - configuring - - - - /etc/udev/rules.d/65-kvm.rules - - - - The default udev rule installed by Eudev would allow all users to - access /dev/kvm. The editors - consider it dangerous. Create a configuration file to override it: - - -cat > /etc/udev/rules.d/65-kvm.rules << "EOF" -KERNEL=="kvm", GROUP="kvm", MODE="0660", TAG+="uaccess" -EOF - - - /etc/udev/hwdb.bin - - - Information about hardware devices is maintained in the - /etc/udev/hwdb.d and - /usr/lib/udev/hwdb.d directories. - Eudev needs that information to be compiled - into a binary database /etc/udev/hwdb.bin. Create the - initial database: - -udevadm hwdb --update - - This command needs to be run each time the hardware information is - updated. - - - - - Contents of Eudev - - - Installed programs - Installed libraries - Installed directories - - - udevadm and udevd - - libudev.so - - /etc/udev, /usr/lib/udev, and /usr/share/doc/udev-&udev-lfs-version; - - - - - Short Descriptions - - - - udevadm - - Generic udev administration tool: controls the udevd daemon, - provides info from the Udev database, monitors uevents, waits for - uevents to finish, tests Udev configuration, and triggers uevents - for a given device - - udevadm - - - - - - udevd - - A daemon that listens for uevents on the netlink socket, - creates devices and runs the configured external programs in - response to these uevents - - udevd - - - - - - libudev - - A library interface to udev device information - - libudev - - - - - - /etc/udev - - Contains Udev configuration files, - device permissions, and rules for device naming - - /etc/udev - - - - - - - - -
diff --git a/chapter08/udev.xml b/chapter08/udev.xml new file mode 100644 index 000000000..c1e2af312 --- /dev/null +++ b/chapter08/udev.xml @@ -0,0 +1,245 @@ + + + %general-entities; +]> + + + + + + udev + &systemd-version; +
&systemd-url;
+
+ + Udev from Systemd-&systemd-version; + + + Udev + + + + + + <para>The Udev package contains programs for dynamic creation of device + nodes.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&udev-fin-sbu;</seg> + <seg>&udev-fin-du;</seg> + </seglistitem> + </segmentedlist> + </sect2> + + <sect2 role="installation"> + <title>Installation of Udev + + Udev is part of the systemd-&systemd-version; package. Use + the systemd-&systemd-version;.tar.xz file as the source tarball. + + Remove two unneeded groups, + render and + sgx, from the default udev + rules: + + sed -i -e 's/GROUP="render"/GROUP="video"/' \ + -e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in + + Prepare Udev for compilation: + +mkdir -p build +cd build + +meson setup \ + --prefix=/usr \ + --buildtype=release \ + -Dmode=release \ + -Ddev-kvm-mode=0660 \ + -Dlink-udev-shared=false \ + .. + + + The meaning of the meson options: + + + --buildtype=release + + This switch overrides the default buildtype + (debug), which produces unoptimized + binaries. + + + + + -Dmode=release + + Disable some features considered experimental by upstream. + + + + + + -Ddev-kvm-mode=0660 + + The default udev rule would allow all users to access + /dev/kvm. The editors + consider it dangerous. This option overrides it. + + + + + -Dlink-udev-shared=false + + This option prevents udev from linking to the internal + systemd shared library, + libsystemd-shared. + This library is designed to be shared by many Systemd components + and it's too overkill for a udev-only installation. + + + + + 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 }') \ + $(realpath libudev.so --relative-to .) + + Install the package: + + install -vm755 -d {/usr/lib,/etc}/udev/{hwdb,rules}.d +install -vm755 udevadm /usr/bin/ +install -vm755 systemd-hwdb /usr/bin/udev-hwdb +ln -sv ../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 some custom rules and support files useful in an LFS + environment: + +tar -xvf ../../&udev-lfs-version;.tar.xz +make -f &udev-lfs-version;/Makefile.lfs install + + + + + Configuring Udev + + + Udev + configuring + + + + /etc/udev/hwdb.bin + + + Information about hardware devices is maintained in the + /etc/udev/hwdb.d and + /usr/lib/udev/hwdb.d directories. + Udev needs that information to be compiled + into a binary database /etc/udev/hwdb.bin. Create the + initial database: + +udev-hwdb update + + This command needs to be run each time the hardware information is + updated. + + + + + Contents of Udev + + + Installed programs + Installed libraries + Installed directories + + + udevadm, udevd (symlink to udevadm), and udev-hwdb + + libudev.so + + /etc/udev and /usr/lib/udev + + + + + Short Descriptions + + + + udevadm + + Generic udev administration tool: controls the udevd daemon, + provides info from the Udev database, monitors uevents, waits for + uevents to finish, tests Udev configuration, and triggers uevents + for a given device + + udevadm + + + + + + udevd + + A daemon that listens for uevents on the netlink socket, + creates devices and runs the configured external programs in + response to these uevents + + udevd + + + + + + udev-hwdb + + Updates or query the hardware database. + + udev-hwdb + + + + + + libudev + + A library interface to udev device information + + libudev + + + + + + /etc/udev + + Contains Udev configuration files, + device permissions, and rules for device naming + + /etc/udev + + + + + + + + +
diff --git a/chapter09/network.xml b/chapter09/network.xml index e2d0a5edf..c86edf56a 100644 --- a/chapter09/network.xml +++ b/chapter09/network.xml @@ -37,7 +37,7 @@ The interface names depend on the implementation and configuration of the udev daemon running on the system. The udev - daemon for LFS (installed in ) will + daemon for LFS (installed in ) will not run until the LFS system is booted. So the interface names in the LFS system cannot always be determined by running those commands on the host distro, diff --git a/packages.ent b/packages.ent index 8e0a2d222..ab075f7a4 100644 --- a/packages.ent +++ b/packages.ent @@ -156,13 +156,6 @@ - - - - - - - @@ -713,6 +706,9 @@ + + + From 13288b9165e60ff8537091d8dbd49cdf91485efa Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 16 Jul 2023 11:08:36 +0800 Subject: [PATCH 27/47] SysV: Add MarkupSafe and Jinja2 Jinja2 is needed for building udev from systemd. --- chapter01/whatsnew.xml | 8 ++++++++ chapter03/packages.xml | 4 ++-- chapter08/jinja2.xml | 2 +- chapter08/markupsafe.xml | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index e2803d08c..bd3843566 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -308,6 +308,14 @@ Udev-&systemd-version; (from systemd)
+ + Jinja2-&jinja2-version; + + + + MarkupSafe-&markupsafe-version; + + Libxcrypt-&libxcrypt-version; diff --git a/chapter03/packages.xml b/chapter03/packages.xml index 30474944c..3e8277b37 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -379,7 +379,7 @@
- + Jinja2 (&jinja2-version;) - &jinja2-size;: Home page: @@ -528,7 +528,7 @@ - + MarkupSafe (&markupsafe-version;) - &markupsafe-size;: Home page: diff --git a/chapter08/jinja2.xml b/chapter08/jinja2.xml index 8fa12dd25..ca614ecdc 100644 --- a/chapter08/jinja2.xml +++ b/chapter08/jinja2.xml @@ -5,7 +5,7 @@ %general-entities; ]> - + diff --git a/chapter08/markupsafe.xml b/chapter08/markupsafe.xml index 27fdb1627..b4a0cbc58 100644 --- a/chapter08/markupsafe.xml +++ b/chapter08/markupsafe.xml @@ -5,7 +5,7 @@ %general-entities; ]> - + From cce6c924637464556f437bb9eb417967966c5be1 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 16 Jul 2023 11:58:01 +0800 Subject: [PATCH 28/47] udev: Install man pages from systemd man pages tarball --- chapter03/packages.xml | 2 +- chapter08/udev.xml | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/chapter03/packages.xml b/chapter03/packages.xml index 3e8277b37..4db7bb5a1 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -698,7 +698,7 @@ - + Systemd Man Pages(&systemd-version;) - &systemd-man-size;: Home page: diff --git a/chapter08/udev.xml b/chapter08/udev.xml index c1e2af312..4e79ef899 100644 --- a/chapter08/udev.xml +++ b/chapter08/udev.xml @@ -133,6 +133,20 @@ install -vm755 $(find src/udev -type f | grep -F -v ".") /usr/lib/udevtar -xvf ../../&udev-lfs-version;.tar.xz make -f &udev-lfs-version;/Makefile.lfs install + Install the man pages: + + +tar -xf ../../systemd-man-pages-253.tar.xz --strip-components=1 \ + -C /usr/share/man --wildcards '*/udev*' '*/libudev*' \ + '*/systemd-'{hwdb,udevd.service}.8 +sed 's/systemd\(\\\?-\)/udev-/' /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 + From f7c36d049f1a2dc0b3d8d867f1c0d06dac055904 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 16 Jul 2023 13:46:20 +0800 Subject: [PATCH 29/47] udev: Create /usr/{lib,share}/pkgconfig They are not created in chapter 7.5, so we should create them before installing files into them. --- chapter08/udev.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/chapter08/udev.xml b/chapter08/udev.xml index 4e79ef899..951240d32 100644 --- a/chapter08/udev.xml +++ b/chapter08/udev.xml @@ -115,6 +115,7 @@ meson setup \ 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 -sv ../bin/udevadm /usr/sbin/udevd From 4ca4e8b1bad63a4e4d50b942f527bf28ec79a075 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 16 Jul 2023 23:29:18 +0800 Subject: [PATCH 30/47] udev: Fix a typo --- chapter08/udev.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/udev.xml b/chapter08/udev.xml index 951240d32..36edcc8a0 100644 --- a/chapter08/udev.xml +++ b/chapter08/udev.xml @@ -225,7 +225,7 @@ rm /usr/share/man/man8/systemd-*.8 udev-hwdb - Updates or query the hardware database. + Updates or queries the hardware database. udev-hwdb From 06610cefabc3abf7cf2504bab271224de52ab2b4 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 16 Jul 2023 23:59:45 +0800 Subject: [PATCH 31/47] dependencies: Update for Udev The Udev build dependencies are directly copied from systemd. Though they might be unneeded for a Udev-only build, meson will check them anyway. And I'm sure Jinja2 is really used. In systemd dependencies Attr is dropped because Attr is not used directly, it's just Acl needs Attr. OpenSSL is added because udevadm links to libcrypto. As "S" and "U" are closer, create a "systemd-udev" entity to simplify the choices. In Util-linux, lsblk and findmnt links to libudev so it depends on &systemd-udev;. --- appendices/dependencies.xml | 125 +++++++++++++++++------------------- 1 file changed, 59 insertions(+), 66 deletions(-) diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 1d693e064..8038ee943 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -3,6 +3,9 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ %general-entities; + + Systemd + Udev"> ]> @@ -466,9 +469,7 @@ &before; - Bash, Diffutils, Eudev, - Findutils, and Man-DB, and Systemd + Bash, Diffutils, Findutils, Man-DB, and &systemd-udev; @@ -642,45 +643,6 @@ - - Eudev - - - &dependencies; - - Bash, Binutils, Coreutils, Gawk, GCC, Glibc, Grep, Gperf, Make, - Sed, and Util-linux - - - - - &runtime; - - Glibc, Kmod, Xz, Util-linux, and Zlib. - - - - - &testsuites; - - None - - - - - &before; - - None - - - - - &external; - - None - - - Expat @@ -1555,7 +1517,7 @@ &before; - Systemd + &systemd-udev; @@ -1633,8 +1595,7 @@ &before; - Eudev - Systemd + &systemd-udev; @@ -1913,9 +1874,7 @@ &before; - GCC, Perl, Python, - and Shadow, and Systemd + GCC, Perl, Python, Shadow, and &systemd-udev; @@ -2236,10 +2195,7 @@ &before; - - None - Systemd - + &systemd-udev; @@ -2438,7 +2394,7 @@ &before; - Coreutils, Kmod, and Linux + Coreutils, Kmod, Linux, and &systemd-udev; @@ -2560,7 +2516,7 @@ D-Bus, E2fsprogs, IProute2, Kmod, Man-DB, Procps-ng, Python, - Systemd, and Util-linux + &systemd-udev;, and Util-linux @@ -2866,16 +2822,17 @@ &dependencies; - Acl, Attr, Bash, Binutils, Coreutils, Diffutils, Expat, Gawk, + Acl, Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Gperf, Grep, Jinja2, Libcap, Libxcrypt, Meson, - Pkgconf, Sed, Util-linux, and Zstd + OpenSSL, Pkgconf, Sed, Util-linux, and Zstd &runtime; - Acl, Attr, Glibc, Libcap, Libxcrypt, and Util-linux + Acl, Glibc, Libcap, Libxcrypt, OpenSSL, Util-linux, Xz, + Zlib, and Zstd @@ -3104,23 +3061,62 @@ + + Udev + + + &dependencies; + + Acl, Bash, Binutils, Coreutils, Diffutils, Gawk, + GCC, Glibc, Gperf, Grep, Jinja2, Libcap, Libxcrypt, Meson, + OpenSSL, Pkgconf, Sed, Util-linux, and Zstd + + + + + &runtime; + + Acl, Glibc, Libcap, OpenSSL, and Util-linux + + + + + &testsuites; + + None + + + + + &before; + + Util-linux + + + + + &external; + + None + + + Util-linux &dependencies; - Bash, Binutils, Coreutils, Diffutils, - Eudev, File, Findutils, Gawk, + Bash, Binutils, Coreutils, Diffutils, File, Findutils, Gawk, GCC, Gettext, Glibc, Grep, Make, Ncurses, Pkgconf, Sed, - Systemd, and Zlib + &systemd-udev;, and Zlib &runtime; - Glibc, Ncurses, Readline, and Zlib + Glibc, Ncurses, Readline, &systemd-udev;, and Zlib @@ -3308,9 +3304,7 @@ &before; - Eudev, File, GRUB, Kmod, - Libelf, and Man-DB, and Systemd + File, GRUB, Kmod, Libelf, Man-DB, and &systemd-udev; @@ -3386,8 +3380,7 @@ &before; - GCC and Libelf - GCC, Libelf, and Systemd + GCC, Libelf, and &systemd-udev; From 870d24c5cb3ce12dc43e5b8f71aee84d74e73015 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 17 Jul 2023 09:40:59 +0800 Subject: [PATCH 32/47] bootscripts: udev: Set SYSTEMD_LOG_TARGET=kmsg for udevd This makes udevd send log entries to kmsg buffer and sysklogd will pick them up. Ideally we should use "syslog" here, but at the time udevd starts, sysklogd has not started yet and /dev/log does not exist. So udevd cannot open /dev/log and it will still use stderr as a fallback. We cannot make udevd depending on sysklogd either, because it would cause a circular dependency... --- bootscripts/lfs/init.d/udev | 2 +- packages.ent | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootscripts/lfs/init.d/udev b/bootscripts/lfs/init.d/udev index 612685af7..f7d4b9bff 100644 --- a/bootscripts/lfs/init.d/udev +++ b/bootscripts/lfs/init.d/udev @@ -45,7 +45,7 @@ case "${1}" in # Start the udev daemon to continually watch for, and act on, # uevents - /sbin/udevd --daemon + SYSTEMD_LOG_TARGET=kmsg /sbin/udevd --daemon # Now traverse /sys in order to "coldplug" devices that have # already been discovered diff --git a/packages.ent b/packages.ent index ab075f7a4..8fd962d0e 100644 --- a/packages.ent +++ b/packages.ent @@ -383,7 +383,7 @@ - + From f24a041cd43c00c86dee8f737647ca8997d854a6 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 17 Jul 2023 09:58:53 +0800 Subject: [PATCH 33/47] udev: Remove two udev rules requiring a full systemd installation Or they'll produce some error messages saying "cannot execute systemd-sysctl or systemd-vconsole-setup". --- chapter08/udev.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chapter08/udev.xml b/chapter08/udev.xml index 36edcc8a0..2d3792511 100644 --- a/chapter08/udev.xml +++ b/chapter08/udev.xml @@ -51,6 +51,10 @@ sed -i -e 's/GROUP="render"/GROUP="video"/' \ -e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in + Remove one udev rule requiring a full Systemd installation: + + sed '/systemd-sysctl/s/^/#/' -i rules.d/99-systemd.rules.in + Prepare Udev for compilation: mkdir -p build @@ -112,6 +116,11 @@ meson setup \ build.ninja | awk '{ print $2 }') \ $(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 From 51c7e709c05ab01ad800212e388545aa189fcd40 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 17 Jul 2023 11:53:12 +0800 Subject: [PATCH 34/47] udev: Update SBU and DU --- packages.ent | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages.ent b/packages.ent index 8fd962d0e..11378b56e 100644 --- a/packages.ent +++ b/packages.ent @@ -706,8 +706,8 @@ - - + + From 5b3594b13ef120a0653be13445cc43456aa33a89 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 18 Jul 2023 13:04:13 +0800 Subject: [PATCH 35/47] changelog: Eudev -> systemd-udev change is sysv-only --- chapter01/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 18ac4f3f7..57b966b7f 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -43,7 +43,7 @@ 2023-07-15 - + [xry111] - Replace eudev-3.2.12 with udev from systemd-253. Fixes #5085. From b17741582476689fc91d83d2f55adbea688e15cd Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 18 Jul 2023 13:07:01 +0800 Subject: [PATCH 36/47] Remove references to eudev --- appendices/udev-rules.xml | 2 +- chapter09/udev.xml | 2 +- chapter10/kernel.xml | 4 ++-- prologue/why.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/appendices/udev-rules.xml b/appendices/udev-rules.xml index ca1a7c88b..189f55f41 100644 --- a/appendices/udev-rules.xml +++ b/appendices/udev-rules.xml @@ -8,7 +8,7 @@ - + Udev configuration rules diff --git a/chapter09/udev.xml b/chapter09/udev.xml index 20212035c..aa7e067e6 100644 --- a/chapter09/udev.xml +++ b/chapter09/udev.xml @@ -16,7 +16,7 @@ In , we installed the udev - daemon when eudev + daemon when udev systemd was built. Before we go into the details regarding how udev works, a brief history of previous methods of handling devices is in order. diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 1ee9a6934..244c86623 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -306,7 +306,7 @@ Device Drivers ---> Support for uevent helper Having this option set may interfere with device - management when using Udev/Eudev. + management when using Udev. @@ -316,7 +316,7 @@ Device Drivers ---> This will create automated device nodes which are populated by the kernel, even without Udev running. Udev then runs on top of this, managing permissions and adding symlinks. This configuration - item is required for all users of Udev/Eudev. + item is required for all users of Udev. diff --git a/prologue/why.xml b/prologue/why.xml index 7cbe0e184..a1e69d2ea 100644 --- a/prologue/why.xml +++ b/prologue/why.xml @@ -138,7 +138,7 @@
- Eudev + Udev This package is a device manager. It dynamically controls the ownership, permissions, names, and symbolic links of device nodes in the /dev directory when @@ -233,7 +233,7 @@ This package produces a program that generates a perfect hash function from a set of keys. It is required by - Eudev + Udev Systemd. From 772fb71015249a22a88580f5ec3d9023bcff7002 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 18 Jul 2023 13:07:31 +0800 Subject: [PATCH 37/47] currency: Remove eudev --- lfs-latest-git.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lfs-latest-git.php b/lfs-latest-git.php index 140ac6492..f9239e27b 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -124,7 +124,6 @@ if ( $package == "e2fsprogs" ) $dirpath = "https://sourceforge.net/projects/e2f if ( $package == "expat" ) $dirpath = "https://sourceforge.net/projects/expat/files"; if ( $package == "elfutils" ) $dirpath = "https://sourceware.org/ftp/elfutils"; if ( $package == "expect" ) $dirpath = "https://sourceforge.net/projects/expect/files"; -if ( $package == "eudev" ) $dirpath = github("eudev-project/eudev"); 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/"; From b5acea48a7b29e33b94e54aaabfc31ec2ab9a97a Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 18 Jul 2023 17:47:26 +0800 Subject: [PATCH 38/47] man-pages: Remove pages conflicting with libxcrypt --- chapter08/man-pages.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chapter08/man-pages.xml b/chapter08/man-pages.xml index 9d7c86bd9..19772f414 100644 --- a/chapter08/man-pages.xml +++ b/chapter08/man-pages.xml @@ -40,6 +40,12 @@ Installation of Man-pages + Remove two man pages for password hashing functions. + Libxcrypt will provide a better version + of these man pages: + +rm -v man3/crypt* + Install Man-pages by running: make prefix=/usr install From 66fbe7b805ec5b224fe30f72886cb7e0d228a0a8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 20 Jul 2023 01:09:30 +0800 Subject: [PATCH 39/47] meson and ninja: Kill false tips --- chapter08/meson.xml | 9 --------- chapter08/ninja.xml | 9 --------- 2 files changed, 18 deletions(-) diff --git a/chapter08/meson.xml b/chapter08/meson.xml index 1d9c9e3a7..a53a88c3c 100644 --- a/chapter08/meson.xml +++ b/chapter08/meson.xml @@ -35,15 +35,6 @@ - - This section is not strictly required when LFS does not use - systemd. On the other hand, Meson, along with Ninja, makes - a powerful build system combination, - which will probably be used more and more often. It is required for - several packages in the BLFS - book. - - diff --git a/chapter08/ninja.xml b/chapter08/ninja.xml index 74626e30c..4aca7b8c7 100644 --- a/chapter08/ninja.xml +++ b/chapter08/ninja.xml @@ -35,15 +35,6 @@ - - This section is not strictly required when LFS does not use - systemd. On the other hand, Ninja, along with Meson, makes - a powerful build system combination, - which will probably be used more and more often. It is required for - several packages in the BLFS - book. - - From ca0bd6d56cbc1787d571366061a859fe3f8e2f90 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 20 Jul 2023 01:14:20 +0800 Subject: [PATCH 40/47] rationale: Move Udev entry for lexicographical sorting Wrap long lines by the way. --- prologue/why.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/prologue/why.xml b/prologue/why.xml index a1e69d2ea..b43bb3a20 100644 --- a/prologue/why.xml +++ b/prologue/why.xml @@ -137,15 +137,6 @@ tested file systems that Linux supports. - - Udev - - This package is a device manager. It dynamically controls the ownership, - permissions, names, and symbolic links of device nodes in the /dev directory when - devices are added to or removed from the system. - - - Expat @@ -579,6 +570,15 @@ system. + + Udev + + This package is a device manager. It dynamically controls the + ownership, permissions, names, and symbolic links of device nodes in + the /dev directory when devices are added to or removed from the + system. + + Tar From e9619f650fc142ac74d5cdbf0b5c23000c1d949e Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 21 Jul 2023 21:08:09 +0800 Subject: [PATCH 41/47] Partially revert "man-db: Update known test failures, again" This partially reverts commit 1053282e5f0a6e7bba9605676b650d46db6ffaf4. There is actually only one test suite in LFS build even with -k, but on my complete system there are many test failures with "-k". I guess some tests depend on non-LFS packages. The text change is reverted, but the command change is preserved as generally we should use -k for any make check command known to fail. --- chapter08/man-db.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chapter08/man-db.xml b/chapter08/man-db.xml index 498274f51..88c811d33 100644 --- a/chapter08/man-db.xml +++ b/chapter08/man-db.xml @@ -111,12 +111,14 @@ make - - Many tests are known to fail with groff-1.23.0 or later. If - you still want to test the results anyway, issue: + To test the results, issue: make -k check + + One test named man1/lexgrog.1 is known + to fail. + Install the package: make install From 0d824c52807e3060f19e5ba5c7408905cd3aa4c2 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 22 Jul 2023 18:36:33 +0800 Subject: [PATCH 42/47] kernel: Simplify doc installation --- chapter10/kernel.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 244c86623..ad6b252a7 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -431,8 +431,7 @@ Device Drivers ---> Install the documentation for the Linux kernel: -install -d /usr/share/doc/linux-&linux-version; -cp -r Documentation/* /usr/share/doc/linux-&linux-version; +cp -r Documentation -T /usr/share/doc/linux-&linux-version; It is important to note that the files in the kernel source directory are not owned by root. Whenever a From 8435a70be4cc12621cfd3b8f500df85f8d79b2fd Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 22 Jul 2023 23:40:32 +0800 Subject: [PATCH 43/47] bootscripts: mountvirtfs: Create essential symlinks in /dev targeting /proc These were handled by Eudev, but systemd-udevd stopped to creating them since 2020. --- bootscripts/ChangeLog | 4 ++++ bootscripts/lfs/init.d/mountvirtfs | 26 +++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 0c1d33f6d..efff97b83 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,7 @@ +2023-07-22 Xi Ruoyao + * In mountvirtfs, create symlinks /dev/{fd,std{in,out,err}} and + /dev/core (optional). + 2023-07-15 Xi Ruoyao * Use /bin/udevadm instead of /sbin/udevadm. diff --git a/bootscripts/lfs/init.d/mountvirtfs b/bootscripts/lfs/init.d/mountvirtfs index 21d98a05d..bbf30cf90 100644 --- a/bootscripts/lfs/init.d/mountvirtfs +++ b/bootscripts/lfs/init.d/mountvirtfs @@ -7,8 +7,9 @@ # Authors : Gerard Beekmans - gerard@linuxfromscratch.org # DJ Lucas - dj@linuxfromscratch.org # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org +# Xi Ruoyao - xry111@xry111.site # -# Version : LFS 7.0 +# Version : LFS 12.0 # ######################################################################## @@ -62,6 +63,29 @@ case "${1}" in log_info_msg2 " ${INFO}/dev/shm" mount -o nosuid,nodev /dev/shm || failed=1 + (exit ${failed}) + evaluate_retval + if [ "${failed}" = 1 ]; then + exit 1 + fi + + log_info_msg "Create symlinks in /dev targeting /proc: ${INFO}/dev/stdin" + ln -sf /proc/self/fd/0 /dev/stdin || failed=1 + + log_info_msg2 " ${INFO}/dev/stdout" + ln -sf /proc/self/fd/1 /dev/stdout || failed=1 + + log_info_msg2 " ${INFO}/dev/stderr" + ln -sf /proc/self/fd/2 /dev/stderr || failed=1 + + log_info_msg2 " ${INFO}/dev/fd" + ln -sf /proc/self/fd /dev/fd || failed=1 + + if [ -e /proc/kcore ]; then + log_info_msg2 " ${INFO}/dev/core" + ln -sf /proc/kcore /dev/core || failed=1 + fi + (exit ${failed}) evaluate_retval exit $failed From da0d47999c7beca8270f16f181968add075c81c3 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 22 Jul 2023 23:44:10 +0800 Subject: [PATCH 44/47] bootscripts: Add missed Change Log entry and version bump for udev --- bootscripts/ChangeLog | 4 ++++ bootscripts/lfs/init.d/udev | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index efff97b83..d255411b1 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -2,6 +2,10 @@ * In mountvirtfs, create symlinks /dev/{fd,std{in,out,err}} and /dev/core (optional). +2023-07-16 Xi Ruoyao + * In udev, set SYSTEMD_LOG_TARGET=kmsg so systemd-udevd will correctly + log messages. + 2023-07-15 Xi Ruoyao * Use /bin/udevadm instead of /sbin/udevadm. diff --git a/bootscripts/lfs/init.d/udev b/bootscripts/lfs/init.d/udev index f7d4b9bff..f3b07b022 100644 --- a/bootscripts/lfs/init.d/udev +++ b/bootscripts/lfs/init.d/udev @@ -7,8 +7,9 @@ # Authors : Zack Winkles, Alexander E. Patrakov # DJ Lucas - dj@linuxfromscratch.org # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org +# Xi Ruoyao - xry111@xry111.site # -# Version : LFS 7.0 +# Version : LFS 12.0 # ######################################################################## From e641f736d70a5ce60c50292fb972b46a2abf351c Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 22 Jul 2023 23:46:40 +0800 Subject: [PATCH 45/47] Update to lfs-bootscripts-20230722 --- chapter01/changelog.xml | 11 +++++++++++ packages.ent | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 57b966b7f..f92fbcfcb 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,17 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2023-07-22 + + + [xry111] - Make the mountvirtfs bootscript create essential + symlinks in /dev. Fixes + #5289. + + + + 2023-07-15 diff --git a/packages.ent b/packages.ent index 11378b56e..6fd5c0280 100644 --- a/packages.ent +++ b/packages.ent @@ -383,7 +383,7 @@ - + From e5c08bfbf444744ab327e139f9422d52a89ef9ff Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 23 Jul 2023 00:20:13 +0800 Subject: [PATCH 46/47] changelog: Fix rendering with REV=systemd Empty is not allowed. --- chapter01/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index f92fbcfcb..cfb845733 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,7 +40,7 @@ appropriate for the entry or if needed the entire day's listitem. --> - + 2023-07-22 From 91aeb6f36d52d44f44032985b3917221b7b78590 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 23 Jul 2023 09:52:50 +0800 Subject: [PATCH 47/47] whatsnew: Add revision attribute for "Removed" entries --- chapter01/whatsnew.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index bd3843566..42d10c0aa 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -345,7 +345,7 @@ Removed: - + eudev-3.2.12 @@ -353,7 +353,7 @@ Pkg-config-0.29.2 - + systemd-252-security_fix-1.patch