opkg - adding an offline-path option

Werner Almesberger werner at openmoko.org
Mon Nov 24 13:44:44 CET 2008

Andy Green wrote:
> You might need an entry in ./etc/shells, which fakeroot can sort out for
> you enough to create a tarball from ./etc that says the right "root"
> permissions, but you will never need an entry in build host /etc/shells
> as part of this.

Ah, interesting. I hadn't known that one. Thanks for the pointer !

So you'd install things under, say, fakeroot/root/, run the postinst
scripts under chroot, with a wrapper (also running under fakeroot)
that chroots to fakeroot/root/, and once postinst is done, you'd exit
the chroot and tar fakeroot/root/ into fakeroot/root.tar while still
running under fakeroot, so that the permissing in the tar file are

Okay, that solves the problem of needing root to do things when
you don't or are too afraid to use it. I had just assumed that we
can use root privileges when needed.

However, it doesn't solve the cross-architecture problem. Anything
trying to explicitly run /bin/sh will still run into problems.

It also doesn't seem to emulate mount, so we would need to find
something that created ext2 and VFAT file systems in user space.
I guess such things must exist - dumpe2fs already almost does it.

- Werner

More information about the devel mailing list