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;
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/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..f7d4b9bff 100644
--- a/bootscripts/lfs/init.d/udev
+++ b/bootscripts/lfs/init.d/udev
@@ -45,17 +45,17 @@ 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
- /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/chapter01/changelog.xml b/chapter01/changelog.xml
index abaafa162..381ed091b 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 6ee2066aa..e7b9f23d6 100644
--- a/chapter01/whatsnew.xml
+++ b/chapter01/whatsnew.xml
@@ -91,9 +91,9 @@
-
- Eudev-&eudev-version;
-
+
@@ -304,6 +304,18 @@
Added:
+
+ Udev-&systemd-version; (from systemd)
+
+
+
+ Jinja2-&jinja2-version;
+
+
+
+ MarkupSafe-&markupsafe-version;
+
+
Libxcrypt-&libxcrypt-version;
@@ -337,6 +349,10 @@
Removed:
+
+ eudev-3.2.12
+
+
grub-2.06-upstream_fixes-1.patch
diff --git a/chapter03/packages.xml b/chapter03/packages.xml
index 86932b428..4db7bb5a1 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;:
@@ -387,7 +379,7 @@
-
+
Jinja2 (&jinja2-version;) - &jinja2-size;:
Home page:
@@ -536,7 +528,7 @@
-
+
MarkupSafe (&markupsafe-version;) - &markupsafe-size;:
Home page:
@@ -697,7 +689,7 @@
-
+
Systemd (&systemd-version;) - &systemd-size;:
Home page:
@@ -706,7 +698,7 @@
-
+
Systemd Man Pages(&systemd-version;) - &systemd-man-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
-
-
-
-
-
- The Eudev package contains programs for dynamic creation of device
- nodes.
-
-
- &buildtime;
- &diskspace;
-
-
- &eudev-fin-sbu;
- &eudev-fin-du;
-
-
-
-
-
- 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/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;
]>
-
+
diff --git a/chapter08/udev.xml b/chapter08/udev.xml
new file mode 100644
index 000000000..2d3792511
--- /dev/null
+++ b/chapter08/udev.xml
@@ -0,0 +1,269 @@
+
+
+ %general-entities;
+]>
+
+
+
+
+
+ udev
+ &systemd-version;
+ &systemd-url;
+
+
+ Udev from Systemd-&systemd-version;
+
+
+ Udev
+
+
+
+
+
+ The Udev package contains programs for dynamic creation of device
+ nodes.
+
+
+ &buildtime;
+ &diskspace;
+
+
+ &udev-fin-sbu;
+ &udev-fin-du;
+
+
+
+
+
+ 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
+
+ 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
+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 .)
+
+ 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 -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
+
+ 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
+
+
+
+
+ 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 queries 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 b2982e59c..e21117e35 100644
--- a/packages.ent
+++ b/packages.ent
@@ -156,13 +156,6 @@
-
-
-
-
-
-
-
@@ -390,7 +383,7 @@
-
+
@@ -713,6 +706,9 @@
+
+
+