Package: coreutils
Version: 8.4-1
Severity: important
User: debian-...@lists.debian.org
Usertags: kfreebsd


Hi,

the current coreutils fails to build on GNU/kFreeBSD.
Under 7.2 kernel 9 test fails,
under 8.0 kernel 1 test fail.

The failure under 7.2 kernel is due to limitation
of chroot and bind mounts, it is solved in 8.0 kernel.

The remanining one is
tests/install/install-C which contains:
...
. $srcdir/test-lib.sh
skip_if_setgid_

mode1=0644
mode2=0755
mode3=2755
...

The problem have been described by Aurelien in
http://lists.debian.org/debian-bsd/2009/06/msg00009.html, see also bellow.

Petr


Some more details about the coreutils bug. It's a bit tricky.

First of all I should explain the differences between Linux and kFreeBSD
for the creation or new files/directory. kFreeBSD always use the group
of the parent directory for the group of the newly created
file/directory. Linux use the primary group of the user, except if the
parent directory is setgid or if the partition is mounted with the
option bsdgroups or grpid.

On the buildds the parent directory of the build directory has
uid=buildd, gid=sbuild. Note that the primary group of the user buildd
is buildd. Moreover it is setgid, so there should be no difference
between GNU/Linux and GNU/kFreeBSD.

dpkg-source -x first creates a temporary directory in the build
directory, and the permissions are explicitely set to 00700 (losing the
setgid bit). Then the .orig.tar.gz is untared here, patched are applied,
then the result is moved to the parent directory, and the the temporary
directory removed.

As a consequence, on GNU/Linux the temporary directory has lost the
setgid bit, and is still uid=buildd, gid=sbuild. Files are unpacked with
uid=buildd and gid=buildd, given that the temporary directory has lost
the setgid bit.

On GNU/kFreeBSD, the temporary directory has also lost the setgid bit,
and is also uid=buildd, gid=sbuild. Files are unpacked with uid=buildd
and gid=sbuild as the gid is determined by the parent directory.

Some coreutils tests fail if the files are not unpack with gid being the
primary group of the user. They are skipped if the directory is setgid,
but the kFreeBSD case is not taken into account.

I'll temporary change /buildd to gid=buildd on the buildds, but it looks
like we need a fix at some point. coreutils should probably be fixed,
but skipping the tests is probably not a good idea either. I wonder if
we should change dpkg to also force uid and gid of the temporary
directory while unpacking. I suspect that other packages than coreutils
might be affected. Guillem, as a dpkg maintainer, do you have an opinion
on that?

--
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurel...@aurel32.net                 http://www.aurel32.net




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to