Opened 6 weeks ago
Closed 5 weeks ago
#5655 closed enhancement (fixed)
Remove $LFS/{bin,lib,sbin} from the chown commands
Reported by: | Xi Ruoyao | Owned by: | lfs-book |
---|---|---|---|
Priority: | normal | Milestone: | 12.4 |
Component: | Book | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description
They are symlinks and running chown on a symlink actually operates on the target of the link, and the targets of these links are already covered by $LFS/usr/*. So running chown on them are redundant, and it's potentially harmful if the user wrongly types
for i in bin lib sbin; do ln -sv /usr/$i $LFS/$i done
(note that the additional "/" before usr) in Creating a Limited Directory Layout in the LFS Filesystem: in this case /usr/lib of the host will be owned by the LFS user, and when we install Glibc in chapter 5 it'll just overwrite the Glibc of the host distro, blowing it up.
While we may argue "user error is user error" it's still better to prevent a single-point failure from blowing up the entire host distro. And I cannot see any bad effect to remove them.
Maybe we can even do it before 12.3 release but I'm not sure, so leaving the milestone 12.4 for now.
Change History (2)
comment:1 by , 5 weeks ago
comment:2 by , 5 weeks ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed at commit d35857c7bb.
Update to zstd-1.5.7. Update to systemd-257.3. Update to shadow-4.17.3. Update to setuptools-75.8.1. Update to linux-6.13.4. Update to kmod-34. Update to inetutils-2.6. Update to gettext-0.24. Update to flit_core-3.11.0. Remove $LFS/{bin,lib,sbin} from the chown commands This applies to 'Section 4.3. Adding the LFS User' Remove static library in sysklogd Accomplished with adding --disable-static to the configure options.
Just to be clear, the subject line is in Section 4.3. Adding the LFS User
needs to be changed to