[LFS Trac] #5655: Remove $LFS/{bin,lib,sbin} from the chown commands
| Newsgroups | gmane.linux.lfs.book |
|---|---|
| Message-ID | <[email protected]> |
#5655: Remove $LFS/{bin,lib,sbin} from the chown commands
-------------------------+----------------------
Reporter: Xi Ruoyao | Owner: lfs-book
Type: enhancement | Status: new
Priority: normal | Milestone: 12.4
Component: Book | Version: git
Severity: normal | Keywords:
-------------------------+----------------------
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.
--
Ticket URL: <https://wiki.linuxfromscratch.org/lfs/ticket/5655>
LFS Trac <https://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
--
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page