From 677f795cf85f1ecb40dfedf1624817d3288ea1ca Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 3 Feb 2024 18:55:26 +0800 Subject: [PATCH 1/2] glibc: When update, also regenerate the locales A Glibc update may contain locale updates, so keep /usr/lib/locale/locale-archive synced. Other distros are also doing this when Glibc is updated with the package manager. --- chapter08/glibc.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index e09fe4900..64ed3b630 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -309,10 +309,11 @@ install -vm755 dest/usr/lib/*.so.* /usr/lib - Then continue to run the make install command - and the sed command against - /usr/bin/ldd. Once they are finished, reboot - the system immediately. + Then continue to run the make install command, + the sed command against + /usr/bin/ldd, and the commands to install + the locales. Once they are finished, reboot the system + immediately. From 8cf42d4c72d9e0b773c32849af2fb237b557029e Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 4 Feb 2024 03:40:36 +0800 Subject: [PATCH 2/2] Fix and unify the commands creating the link target of /dev/shm $(realpath /dev/shm) will return the absolute path of the target of /dev/shm, thus the command will work for both absolute symlink and relative symlink. --- chapter07/kernfs.xml | 5 +++-- chapter11/afterlfs.xml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/chapter07/kernfs.xml b/chapter07/kernfs.xml index 00a971b59..ecdff0dd2 100644 --- a/chapter07/kernfs.xml +++ b/chapter07/kernfs.xml @@ -97,7 +97,8 @@ mount -vt tmpfs tmpfs $LFS/run --> In some host systems, /dev/shm is a - symbolic link to /run/shm. + symbolic link to a directory, typically + /run/shm. The /run tmpfs was mounted above so in this case only a directory needs to be created. @@ -107,7 +108,7 @@ mount -vt tmpfs tmpfs $LFS/run we must explicitly mount a tmpfs: if [ -h $LFS/dev/shm ]; then - (cd $LFS/dev; mkdir $(readlink shm)) + mkdir -pv $LFS$(realpath /dev/shm) else mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm fi diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index ff8bae006..5c2693ade 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -130,7 +130,7 @@ mounttype proc proc proc mounttype sys sysfs sysfs mounttype run tmpfs run if [ -h $LFS/dev/shm ]; then - mkdir -pv $LFS/$(readlink $LFS/dev/shm) + mkdir -pv $LFS$(realpath /dev/shm) else mounttype dev/shm tmpfs tmpfs -o nosuid,nodev fi