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

Re: Require packages to build without any configured DNS



On 9/9/21 9:07 AM, Adrian Bunk wrote:
> On Thu, Sep 09, 2021 at 04:45:35AM +0000, Paul Wise wrote:
>> ...
>> That seems like a bug in the test cases, they shouldn't be testing the
>> build time environment like that, since it could differ from the
>> runtime environment.
> 
> These are usually not the tests of dnspython.
> 
> dnspython even has some support for using a different file instead of 
> /etc/resolv.conf, the problem is that there are several other packages
> in the callstack before dnspython in these failing tests.
> 
> Note that even if you would be mocking /etc/resolv.conf, you'd still 
> have to add a nameserver IP address in the mocked /etc/resolv.conf
> At that point you might as well install the mocked resolv.conf
> as /etc/resolv.conf in build environments.

Exactly. Which is why I wrote that we would be achieving nothing by
mandating a broken /etc/resolv.conf *IN THIS SPECIFIC CASE* (ie: where
the package is *NOT* doing any exteral DNS query).

I do believe, however, that we should not allow real DNS queries during
build time (just like accessing any external resource on the internet
should be forbiden, DNS shouldn't be an exception). But that's not what
happening with dnspython (it builds fine without any internet
connectivity, it just wants a valid /etc/resolv.conf so it can parse it).

Cheers,

Thomas Goirand (zigo)


Reply to: