[Clfs-dev] [CLFS-DEV] Embedded Ticket-924

Andrew Bradford andrew at bradfordembedded.com
Mon Jul 15 03:30:31 PDT 2013


On Sat, Jul 13, 2013, at 10:09 AM, Kirk Terrell wrote:
> I've been experimenting with doing the embedded build without creating a 
> clfs user, and minimizing the need for root access - I think I've 
> managed by doing the following:
> 
> 	* create-dir/creatingbuilddir.html: Using sudo to create the working 
> directory and then changing ownership to user

If you create the working directory in your normal /home directory, does
that reduced the need for sudo and chowning here?  That's how OE or
Buildroot do it.

> 	* Skip final-preps/addinguser.html
> 
> 	* final-preps/settingenvironment.html:	Adding HOME=/mnt/clfs to the 
> .bashrc file, and writing it to $CLFS/.bashrc

Are you modifying your own .bashrc file?  I don't think that's a good
idea.  We should just source a .bashrc-like file that clears the entire
env and then sets everything correctly like is done today for the clfs
user.  After this point the env will not really that useful for things
other than cross-building, but I think that's OK.  Maybe we can modify
PS1 to show this is a special shell?

> 	* Execute the remainder of the book from bash --rcfile $CLFS/.bashrc.

I believe this will still execute /etc/profile first before using the
given .bashrc.  Is that what we want?

> 	* cleanup/remove-files.html: Copy files to the ${CLFS}/build/final 
> directory.
> 
> 	* cleanup/chowning.html: Use fakeroot to execute

We'll need to add fakeroot as a dependency on the host but this is a
very good use of fakeroot :)

> 	* cleanup/copy-to-target.html: Use fakeroot - one has to do the 
> chowning and copy as one fakeroot session.
> 
> Do you think this is worth pursuing further?

Yes!
I'm very interested in getting away from having a special user, mostly
because it's a pain for me when I'm building more than one book at a
time and keeping everything straight.  Plus, none of the other build
tools seem to make a special user just for this.

Thanks for the great work!
-Andrew



More information about the Clfs-dev mailing list