[maemo-developers] sbox2 & maemo

From: Marius Vollmer marius.vollmer at nokia.com
Date: Thu Aug 2 00:36:29 EEST 2007
Lauri Leukkunen <lauri.leukkunen at nokia.com> writes:

> On 31/07/07 11:56 +0300, ext Marius Vollmer wrote:
>> Also, both sbox1 and sbox2 redirect whole packages, not just binaries
>> (if I understand sbox2 correctly).  E.g., when redirecting the "perl"
>> command, the redirected-to perl will take its modules from the
>> redirected-to prefix, not from the redirected-from prefix.
> It's all per-file based, you could write the sb2 rules so that only
> specific files are accessed from the host. It's all quite flexible.

Hmm, the redirecting itself is quite trivial in my scenario: just make
some symlinks.  I'd rather not have a magic tool in the middle.  Also,
I don't want to access any files from the host except my home

Correct me if I am wrong: the main point of the redirection magic of
sb2 is to fake chroot, no?

>> That way, all binaries can be replaced that are used a lot during
>> compilation and are too slow to be emulated: /bin/sh, m4, awk,
>> make, perl, gcc, binutils, but not much more.  Packages like
>> autoconf, automake, libtool are never redirected since they are
>> interpreted anyway.
> You could implement this as a mapping mode for sb2,

Yes, I could.  I also _could_ write my own FUSE filesystem that
implements the mapping I want, or use symlinks or bind mounts.  Right
now, symlinks is all I need.

> by simply doing export SBOX_MAPPING_MODE=your_mode you could switch
> to whatever you like. Just put your custom rules into
> scratchbox/shared/scratchbox2/redir_scripts/preload/your_mode and
> you're all set.

I know it's simple for you, but for me the value of sb2 is that it
does something useful right out of the box.  If I have to write my own
rules in a language that I don't know for a system that doesn't have
good documentation yet(!) just to get the effect of a couple of
symlinks, I don't feel like doing it.

Speaking of 'right out of the box': I understand that you are happy
that sb2 is in Debian testing and that fact is actually what make me
consider trying it out.

Nut I'd say as long as there isn't a suitable version of qemu, libtool
and a suitable toolchain also in Debian testing, sb2 is not "there"
yet for me.

(The toolchain from Codesourcery that I downloaded couldn't compile
libtool's libltdl because <dirent.h> is not supported or something,
and the toolchain for the maemo SDK wasn't supported by sb2 because of
"TLS data" or something.  I guess you are happy with your own
toolchain; could you provide it for ia32 as well?)

More information about the maemo-developers mailing list