Gentoo Archives: gentoo-embedded

From: Kfir Lavi <lavi.kfir@×××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] locales / sandbox violations
Date: Tue, 22 Mar 2011 14:04:29
Message-Id: AANLkTi=w-Jxu4Nfbs1qi_2otCAuoOUMSut+YYoKcc9TU@mail.gmail.com
In Reply to: [gentoo-embedded] locales / sandbox violations by Martin Gysel
1 On Tue, Mar 22, 2011 at 12:26 PM, Martin Gysel <m.gysel@×××.ch> wrote:
2
3 > Hi
4 >
5 > I installed a dev chroot on 2 different systems each, both x64, one
6 > gentoo, one ubuntu as host. in both chroots I created a x-compiler using
7 > crossdev. in the first one I downloaded a prebuilt armv5tel stage and
8 > rebuilt it so it uses my USE flags using the x-compiler and qemu
9 > (depending on pkg). everything went fine so far. in the second chroot I
10 > used the binpkg from the first one to set up the arm sysroot/root. now
11 > if I chroot into the sysroot on the second using qemu I get some access
12 > violations from the sandbox:
13 > ACCESS DENIED open_wr: /dev/null
14 > /usr/lib/portage/bin/ebuild.sh: line 1558: /dev/null: Permission denied
15 > <snip>
16 > --------------------------- ACCESS VIOLATION SUMMARY
17 > ---------------------------
18 > LOG FILE "/var/log/sandbox/sandbox-10088.log"
19 >
20 > VERSION 1.0
21 > FORMAT: F - Function called
22 > FORMAT: S - Access Status
23 > FORMAT: P - Path as passed to function
24 > FORMAT: A - Absolute Path (not canonical)
25 > FORMAT: R - Canonical Path
26 > FORMAT: C - Command Line
27 >
28 > F: open_wr
29 > S: deny
30 > P: /dev/null
31 > A: /dev/null
32 > R: /dev/null
33 > C: /qemu-wrapper -cpu arm926 /bin/bash /usr/lib/portage/bin/ebuild.sh
34 > unpack
35 >
36 > after some googling I found a forum thread saying it's a locale issue.
37 > so I tried to play with the locale settings. now depending on the locale
38 > it stop at different stages during emerge. switching of the sandbox also
39 > works... (which I sometimes need to do anyway as the there's a
40 > sandbox/qemu 'malloc' issue)
41 > has someone experienced a similar behavior or knows a solution for this?
42 > does it help if I try to rebuild everything with my 'new' locale
43 > settings? can it be a problem to have not set the same locales in the
44 > 'sysroot/qemu chroot' than for the x-compiler?
45 >
46 > btw, the glibc natively built using qemu dosen't work but the x-compiled
47 > works fine...
48 >
49 > thanks
50 > martin
51 >
52 > If I'm understanding correctly, when you chroot on your Gentoo machine,
53 everything goes fine.
54 If you chroot on the Ubuntu machine, you get this problem.
55 Is that correct?
56 chroot also depends on the kernel running. On the Ubuntu, the kernel will be
57 the Ubuntu kernel. Is there
58 any diffs between the Gentoo kernel and the Ubuntu kernel?
59 Version of qemu, are close or the Ubuntu one is old?
60 I can't see why locales are involved here. Can you post the link to the
61 forum thread that state this?
62 Is 'ls -l /dev/null' the same in each chroot environment (after you bind
63 /dev)?
64
65 Kfir