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

Bug#395262: "Arch: all" package FTBFS due to test needing network access - RC?



Peter Samuelson <peter@p12n.org> writes:

> [Goswin von Brederlow]
>> Do they fail when you use sudo instead of fakeroot or when you run the
>> complete build process as root?
>
> The usual reason a package fails with sudo is that it assumes the
> $(PWD) macro will be available, pointing to the current working
> directory.  sudo does not preserve this environment variable, which is
> often set by interactive shells.

Interesting. Din't know that one yet.

>> And why do they fail? Is there some specific test they do just to
>> detect fakeroot or is it a shortcomming of fakeroot that makes the
>> build suddenyl behave differently and succeed?
>
> fakeroot does not emulate root completely.  It does not wrap the
> access(2) systen call, which _should_ pretty much always succeed when
> run as root.  Succeeding can cause a test failure if the test is
> testing permissions that are supposed to be denied.

I think access under fakeroot reflects what fakeroot will allow
without being wrapped:

mrvn@frosties:~% fakeroot touch /usr/bin/bla
touch: cannot touch `/usr/bin/bla': Permission denied

Fakeroot does not have an extra file store. So if the user can't
create/write to a file then fakeroot won't emulate correct root
behaviour. I actualy prefer it this way so packages that dump files
directly into /sbin or something fail.

I guess that behaviour could be improved to work in test cases using
access too but nobody ever cared about it enough. Feel free to fix it.

MfG
        Goswin



Reply to: