Opened 14 years ago
Closed 14 years ago
#765 closed task (fixed)
Changing Ownership to Root Happens Too Early
Reported by: | Andrew Bradford | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | CLFS Embedded 1.0.0 |
Component: | BOOK | Version: | CLFS Embedded GIT |
Keywords: | Cc: |
Description
The embedded book changes the ownership of the $CLFS directory to be owned by root too early. It currently happens after building the kernel and before setting up Beyond CLFS section.
This will cause problems if you want to go back and change something or add more packages as now you have to do it as root rather than the "clfs" user.
The changing of ownership to root should happen as late as possible. I propose changing ownership just before copying the $CLFS directory to the target. In this way, the "Remove Unnecessary Files" step will already be completed and you'll be operating on a copy, not the actual $CLFS directory.
Change History (6)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Oops... CLFS_TARGET isn't what I meant. That's already used for the target triplet.
What I mean above is the target filesystem.
comment:3 by , 14 years ago
mdev instructions already say to create an /etc/mdev.conf that creates /dev/null and /dev/console. Are these nodes needed before mdev starts? If not, we don't need to create them using mknod.
comment:4 by , 14 years ago
I've confirmed (using BeagleBoard-xM ARM build) that we don't need to mknod /dev/null or /dev/console, mdev will do it for us at boot time. The instructions for mknod'ing these should be taken out.
comment:5 by , 14 years ago
This can be closed. All fixes have been merged into mainline as of commit 2ef84660d2aeacafaad9b61df91b2b18d76e41b1.
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
A better way would be to simply copy the $CLFS directory to the target as root using "cp -vr" so that all permissions are set to root. Then go and change the ownership of var/run/utmp and var/log/lastlog to utmp group.
When doing the ownership change to utmp group, the actual name "utmp" shouldn't be used as the host most likely has a different group number for utmp than our CLFS target (as created when making the /etc/group file). Command should be "chmod -v 13 ${CLFS_TARGET}/var/run/utmp ${CLFS_TARGET}/var/log/lastlog" since group 13 is utmp group on the target.
All of this should probably go into the "Creating Tarball" section as it all fits together to making the target boot.
Should the mknod commands for null and console should go into their own section? Only root can mknod?