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

Re: Require packages to build without any configured DNS



On Wed, Sep 08, 2021 at 09:01:31AM -0700, Josh Triplett wrote:
>...
> I think dnspython's previous approach was correct: just like glibc, musl, and
> other libraries, if /etc/resolv.conf is missing they should treat that as
> though it specified a nameserver on localhost.

How libraries implement a standard high-level C interface is not 
necessarily relevant for how a DNS library implements a low-level 
interface.

> The change to make that a
> configuration error, instead, breaks real configurations that intentionally
> don't have /etc/resolv.conf.
> 
> Among other things, having a DNS server on localhost (or forwarding the DNS
> port on localhost to your real DNS server) means that a chroot without
> /etc/resolv.conf still has functional DNS.

It is debatable whether this is a feature or a bug.

Having to configure a nameserver when you want DNS is less surprising 
than software automatically using nameservers like 127.0.0.1 or 8.8.8.8
when none is configured.

> Now, that said, if the build process actually wants a DNS server to run tests
> against, it should provide or depend on such a DNS server, and configure it for
> such tests.
>...

Depending on and configuring a normal DNS server might not happen in 
practice, since the build process running as a normal user would have
to configure and manually start it running on a non-privileged port.

Trying to resolve DNS addresses on the internet during the build is
not permitted.

> - Josh Triplett

cu
Adrian


Reply to: