From 410e400a7978c1236b10689dc1268883a33ce778 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 20 Nov 2024 09:59:23 +0800 Subject: [PATCH 1/2] shadow: Having /bin or /sbin in $PATH is not a good idea Turned out in a recent blfs-support discuss. --- chapter08/shadow.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml index 38d233a9d..4cdf2596e 100644 --- a/chapter08/shadow.xml +++ b/chapter08/shadow.xml @@ -83,13 +83,13 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;/usr. - - If you wish to include /bin - and/or /sbin in the PATH - for some reason, modify the - PATH in .bashrc after LFS has been - built. - + + Including /bin + and/or /sbin in + the PATH variable may cause some BLFS packages fail to + build, so don't do that + in the .bashrc file or anywhere else. + sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD YESCRYPT:' \ -e 's:/var/spool/mail:/var/mail:' \ From e5338216f06703f1a58721d52d849265de43d78e Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Tue, 19 Nov 2024 22:28:24 -0600 Subject: [PATCH 2/2] Remove unneeded PATH entries. --- chapter11/afterlfs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index 633a782df..88a3c0114 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -168,7 +168,7 @@ EOF alias lfs='sudo /usr/sbin/chroot /mnt/lfs /usr/bin/env -i HOME=/root TERM="$TERM" PS1="\u:\w\\\\$ " -PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' +PATH=/usr/bin:/usr/sbin /bin/bash --login' This alias is a little tricky because of the quoting and levels of