SWS::Projects::QFakeRoot
QFakeRoot is a tool included with, and used by the VirOS project. QFakeRoot was inspired by the same sorts of needs that inspired the traditional fakeroot tool on unix. QFakeRoot is a bit more complex than fakeroot, but provides some important functionality that fakeroot does not. QFakeRoot basically throws together a custom miniature linux system that runs completely from an autogenerated initramfs, and inside a qemu virtualized container, completely hidden from the user. The canonical example of what qfakeroot can do, that fakeroot, and as far as I know, no other tool, can do is illustrated by the ext3img2tar and tar2ext3img tools included with the VirOS/QFakeRoot package. To use them, and illustrate what qfakeroot enables, the following two commands do just what you would expect them to- without requireing SUID or root priveleges.
viros tar2ext3img some-input.tar some-output.ext3fs.img viros ext3img2tar some-input.ext3fs.img some-output.tar
Currently the ext3 filesystem image created by tar2ext3img is hard coded to a size of 1G. But this is easily enhanced. To best understand how to use qfakeroot to create your own utilities, I encourage you to run the following command after having installed viros (and meld)-
cd /usr/lib/viros/tools/scripts meld ext3img2tar tar2ext3img
-
Tutorial #1: x
-
From the command line, type the following
xyz
DMC's Profile
/