[Haifux] Announcing a new project - fakeroot-ng

arbel yossi yossiarbel at nana10.co.il
Mon Dec 31 15:13:21 MSK 2007


>The real issue here, however, is testing embedded setups.

>With fakeroot I can run the entire build script as a regular user, >which is great

Most embedded Linux-based I encountered are working as root and do not have such a thing as a regular user. It seems to me that this is usually so, but again I could be wrong.

Did you encounter any embedded setups where it is 
different ? 

Yossi Arbel

-----Original Message-----
From: haifux-bounces at haifux.org on behalf of Shachar Shemesh
Sent: Mon 12/31/2007 7:01 AM
To: alon at 8ln.org
Cc: Haifa Linux Club
Subject: Re: [Haifux] Announcing a new project - fakeroot-ng
alon at 8ln.org wrote:

> That being said, I don't really know why fake a chroot jail within
> fakeroot. I can understand why you'd like a userspace chroot jail, but
> you won't usually need to fake root at the time.

Actually, the two really come together. You use the same technology for 
both chroot and fakeroot.

The real issue here, however, is testing embedded setups. I have a 
script that builds a directory structure (with different owners and 
device files), that then gets automatically compressed into a SQUASHFS 
image and saved. When you boot from it, it turns into a real 
environment. It's real useful, however, to test whether this environment 
has all the devices, libraries and mounts that are required to, say, run 
a certain program. The obvious solution is to chroot into it, and try 
running the program.

With fakeroot I can run the entire build script as a regular user, which 
is great because I don't want to compile a whole system as root, I don't 
want to leave a passwordless sudo on my machines, the script runs for so 
long (ever times compiling of wxWidgets or glibc? They take a LONG time 
to compile) that a sudo with password expires, and that's before I start 
talking about bugs in the DESTDIR mechanism, which, if run as real root, 
may hose your entire system. fakeroot is ideal for those cases. I had to 
write a whole set of wrapper scripts around fakeroot to make it store 
its state (i.e. - the lies it tells the programs) between runs in a 
reliable way (and let me tell you, that stretches fakeroot's abilities 
to the limit).

However, once the environment is set up using fakeroot two things 
happen. The first is that you don't want to use a real root in order to 
chroot into it. You get used to good things :-). The second, and more 
important one, is that you cannot use a real root. All the files there 
have the wrong owners and none of the device files are actual devices. 
Sometimes it doesn't matter. Sometimes it does.

And that, actually, is the real reason fakeroot-ng was written.

Haifux mailing list
Haifux at haifux.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://haifux.org/pipermail/haifux/attachments/20071231/c69c3c76/attachment.html 

More information about the Haifux mailing list