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

Re: GNU/kFreeBSD packages in the Debian archive

Aurelien Jarno a écrit :
> We are also being (or will get) blocked by some build failures. They are
> currently:
> - openssl
> - coreutils

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
aurelien@aurel32.net                 http://www.aurel32.net

Reply to: