[Haifux] Announcing a new project - fakeroot-ng

Alon Altman alon at 8ln.org
Mon Dec 31 08:47:31 MSK 2007

I see why you would like to have both chroot and fake root together.

One thing I don't understand is why the complex set of scripts to save
state? Can't you just use one instance of fakeroot to run the entire build
script under? And even if you do need to save state, that's what the -s and
-i options are for.


On 12/30/07, Shachar Shemesh <shachar at shemesh.biz> wrote:
> 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.
> Shachar
> _______________________________________________
> Haifux mailing list
> Haifux at haifux.org
> http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://haifux.org/pipermail/haifux/attachments/20071230/d1bb6e41/attachment.html 

More information about the Haifux mailing list