Created attachment 21071 [details] test case for issue This attached testcase yields inconsistent behaviour when run with sb2 -R -m emulate, basically, that rm <relative path> of a symbolic link containing a relative path (../foo/bar for instance.) works, while rm /full/path of a symbolic link containing a relative path does not work. This breaks for instance, the fontconfig-config package (from ubuntu), where it rm's /etc/fonts/conf.d/10-no-sub-pixel.conf which is a relative symlink to ../conf.avail/10-no-sub-pixel.conf, and fails to configure because of failure to rm (No such file or directory).
Created attachment 21073 [details] output of testcase being run with sb2 -R -m emulate ./testcase.sh
Created attachment 21074 [details] sbox2 debug log associated to testcase running, gzipped
relevant strace (outside sb2) traces from successful attempt: id 7610] execve("/home/cvm/mr-sdk/sb2/bin/qemu-arm", ["/home/cvm/mr-sdk/sb2/bin/qemu-ar"..., "-drop-ld-preload", "-L", "/", "/bin/readlink", "/foo/test/a/d" ... [pid 7610] readlink("/home/cvm/mr-sdk/jaunty-armel/foo/test/a/d", "../b/c", 64) = 6 .... [pid 7610] write(1, "../b/c\n", 7../b/c .... [pid 7611] unlinkat(AT_FDCWD, "test/a/d", 0) = 0 relevant strace traces from unsuccessful attempt: [pid 7611] execve("/home/cvm/mr-sdk/sb2/bin/qemu-arm", ["/home/cvm/mr-sdk/sb2/bin/qemu-ar"..., "-drop-ld-preload", "-L", "/", "/bin/rm", "test/a/d"], [/* 45 id 7618] execve("/home/cvm/mr-sdk/sb2/bin/qemu-arm", ["/home/cvm/mr-sdk/sb2/bin/qemu-ar"..., "-drop-ld-preload", "-L", "/", "/bin/readlink", "/bar/test/a/d" ..... [pid 7618] readlink("/home/cvm/mr-sdk/jaunty-armel/bar", 0xbf8b5b97, 4096) = -1 EINVAL (Invalid argument) [pid 7618] readlink("/home/cvm/mr-sdk/jaunty-armel/bar/test", 0xbf8b5b97, 4096) = -1 EINVAL (Invalid argument) [pid 7618] readlink("/home/cvm/mr-sdk/jaunty-armel/bar/test/a", 0xbf8b5b97, 4096) = -1 EINVAL (Invalid argument) [pid 7618] readlink("/home/cvm/mr-sdk/jaunty-armel/bar/test/a/d", "../b/c", 64) = 6 [pid 7618] fstat64(1, {st_mode=S_IFREG|0644, st_size=2934567, ...}) = 0 .... [pid 7618] mmap2(0x421cf000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x421cf000 [pid 7618] write(1, "../b/c\n", 7../b/c ) = 7 ..... [pid 7619] execve("/home/cvm/mr-sdk/sb2/bin/qemu-arm", ["/home/cvm/mr-sdk/sb2/bin/qemu-ar"..., "-drop-ld-preload", "-L", "/", "/bin/rm", "/bar/test/a/d"], [ ..... [pid 7619] unlinkat(AT_FDCWD, "/bar/test/a/d", 0) = -1 ENOENT (No such file or directory) [pid 7619] write(2, "/bin/rm: ", 9/bin/rm: ) = 9 [pid 7619] write(2, "cannot remove `/bar/test/a/d\'", 29cannot remove `/bar/test/a/d') = 29 [pid 7619] write(2, ": No such file or directory", 27: No such file or directory) = 27 [pid 7619] write(2, "\n", 1 .....
problem was solved with sb2-qemu-arm from maemo-sdk+. might be worth documenting.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.