Package: fakeroot
Version: 1.5.5

I would like to have a feature where fakeroot 'overlays' some directory 
structure over another part and makes it behave like the real filesystem.
so that changes to files (or creation of new ones) that users are not allowed 
to touch can be saved and faked too.

I hope I can make it clear with an example:
$ fakeroot -o /tmp/fakeenv /
# echo foo > /testfile
# cp /etc/passwd /etc/passwd.old
# sed 's/user1/user2/' /etc/passwd.old > /etc/passwd
# rm /etc/passwd.old
# cat /etc/passwd
here comes the password-file with username changed
# exit
$

a look at /tmp/fakeenv would give the following:
/tmp/fakeenv/fakeroot.sav (normal fakeroot savefile)
/tmp/fakeenv/testfile
/tmp/fakeenv/etc/passwd (the one with changed username)

Is this possible to implement?
I'm not a debian user myself (well, ubuntu temporarily) but I would like this 
functionality for installing stuff (normal make install) as a normal user and 
inspect every change in a safe overlayed place, to pack it up or apply it as 
real root
(maybe some option in fakeroot to apply overlays when run as real root)

It would require checking the overlay first on every read. When not found 
there checking the real location.
And on writes first try the real location, on error use the overlay.
on deleting it would have to delete the real file(and overlay) and on error 
use some special attribute in the savefile to 'mask' the deleted real file.

I know I'm asking a lot. I'm also aware of unionfs, which is pretty much 
capable of doing the things I'm asking for. But there I have to be root, and 
it's not quite stable to use as a root filesystem. 

Thanks in advance for answering.

-- 
Mathijs Kwik <bluescreen303 at gmail dot com>
GnuPG public key ID: 0x83514827 (wwwkeys.pgp.net)
CEE5 668D 65DF ACB5 5F92 5005 3152 1AC3 8351 4827

Attachment: pgpAb9vwxszFw.pgp
Description: PGP signature

Reply via email to