On 15/08/07 08:00 -0300, Rodrigo Vivi wrote:
> don't you think that a real chroot is better for this kind of
> operation that requires root permission? because using the real chroot
> you don't have to change all permissions of the buildroot.
> 
> Thinking about this I tried to do sb2 -e sudo but I got another error:
> 
> bash-3.2$ sb2 -e sudo
> /bin/sh: sudo: not found
> 
> This is happening because buildroot/usr/bin/sudo is a symbolic link to
> /etc/alternatives/sudo but the sb2 is not redirecting this link to
> buildroot/etc/alternatives/sudo. shouldn't sb2 do this kind of
> redirection?

Indeed it should, there is a bug in the symlink handling, 
I'm working on it :)

> Now I'm starting to believe that it is what is causing all problems
> that I'm having even with dpkg/apt, since I have a lot of symbolic
> links on my buildroot.

Quite possible. The bug manifests itself when the target of the symlink is
not available, precisely what you described above. Stupid bug, really...

The patch I'm testing currently is below.

/lauri


diff --git a/redir_scripts/main.lua b/redir_scripts/main.lua
index 2eeeeb7..e999e00 100644
--- a/redir_scripts/main.lua
+++ b/redir_scripts/main.lua
@@ -182,9 +182,9 @@ function adjust_for_mapping_leakage(path)
        -- check if the file pointed to by the symlink
        -- exists, if not, return path
        
-       if (not sb.sb_file_exists(tmp)) then
-               return path
-       end
+       --if (not sb.sb_file_exists(tmp)) then
+       --      return path
+       --end
        -- make it an absolute path if it's not
        if (string.sub(tmp, 1, 1) ~= "/") then
                tmp = dirname(path) .. "/" .. tmp
@@ -215,10 +215,6 @@ no_adjust_funcs = {
        "lstat",
        "lstat64",
        "lutimes",
-       "mknod",
-       "mknodat",
-       "mkfifo",
-       "mkfifoat",
        "readlink",
        "symlink",
        "symlinkat",
_______________________________________________
Scratchbox-devel mailing list
[email protected]
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-devel

Reply via email to