bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Investigation of the failing build of gnat-4.9 using fakeroot-hurd


From: Svante Signell
Subject: Investigation of the failing build of gnat-4.9 using fakeroot-hurd
Date: Sat, 20 Dec 2014 15:29:19 +0100

Hi, 

Building gnat-4.9 fails currently with EACCES errors when building some
of the .debs, specifically libgnatvsn4.9-dev, libgnatprj4.9-dev. The
failing commands are dh_movefiles and dh_md5sums, and the failures are
happening due to the files being processed have mode r--r--r--. Common
is also that the processing is via pipes, see below for dh_md5sums.
(the failures are also somewhat random, sometimes the build of the .deb
succeeds, sometimes not. A race condition/something not properly
initialized?)

Invoking .../fakeroot-hurd sh -c 'command' results in different code
paths. How to track the code paths properly? It seems to be very
non-deterministic. Maybe not, but I have problems to find out which
functions are expected to be called.

Here command = 1) direct, 2) using a shell script, 3) with make issuing
the script, 4) using make issuing dh_md5sums command, and 5) finally
debian/rules binary.

1) command =(cd debian/libgnatvsn4.9-dev >/dev/null; find . -type f  !
-regex './DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0
md5sum > DEBIAN/md5sums)

2) command = ./test.sh
shell script: test.sh containing the above

3,4) command = make
cat Makefile
default:
       ./test.sh
or
        dh_md5sums -plibgnatvsn4.9-dev

5) command = debian/rules binary

The only invocation that fails is the last one, and that calls
dir-lookup.c and fails there on the write access test since the files
have access 444: r--r--r--. It should not fail since we are running
under fakeroot-hurd.


The fakeroot-hurd script is using the built binaries with printout code
added, via /usr/bin/env LD_LIBRARY_PATH=... see below:

exec /my_chroot/DEBs/test_fakeroot-hurd/settrans --chroot \
     /usr/bin/env
LD_LIBRARY_PATH=/my_chroot/DEBs/test_fakeroot-hurd/libs \
     /my_chroot/DEBs/test_fakeroot-hurd/fakeauth \
     /bin/sh -c 'cd "$1" || exit ; shift ; exec "$@"' \
     "$1" "$PWD" "$@" \
     -- / /usr/bin/env
LD_LIBRARY_PATH=/my_chroot/DEBs/test_fakeroot-hurd/libs\
     /my_chroot/DEBs/test_fakeroot-hurd/fakeroot

The built ext2fs.static is used to mount a directory located in a file:
settrans -ca ./test_ext2fs ./ext2fs.static test.fs

printouts are in different parts of the code, especially in
trans/fakeroot.c, libdiskfs/{file-set-trans.c,dir-lookup.c} and
libnetfs/{file-set-translator.c,file-chmod.c,file-chown.c}

for the test cases above, printouts when running are from:
1) trans/fakeroot.c:set_faked_attribute
2) trans/fakeroot.c:set_faked_attribute
3) trans/fakeroot.c:set_faked_attribute
4) trans/fakeroot.c:set_faked_attribute,
libdiskfs/file-set-trans.c:diskfs_S_file_set_translator,
libnetfs/{file-chown.c:netfs_S_file_chown,file-chmod.c:netfs_S_file_chmod}
5) Case 4 above and
libnetfs/file-set-translator.c:netfs_S_file_set_translator
libnetfs/dir-mkfile.c:netfs_S_dir_mkfile
libnetfs/dir-link.c:netfs_S_dir_link
libdiskfs/dir-lookup:diskfs_S_dir_lookup. Here we get the failures with
EACCES: Permission denied




reply via email to

[Prev in Thread] Current Thread [Next in Thread]