On 2016-11-16 09:48, Ximin Luo wrote:
> Aurelien Jarno:
> > On 2016-11-15 16:00, Ximin Luo wrote:
> >> Package: glibc
> >> Version: 2.24-5
> >> Severity: important
> >> Tags: upstream patch
> >> Forwarded: https://sourceware.org/bugzilla/show_bug.cgi?id=20826
> >>
> >> Dear Maintainer,
> >>
> >> posix/tst-getaddrinfo.c is causing glibc to FTBFS on 
> >> tests.reproducible-builds.org:
> >>
> >> https://tests.reproducible-builds.org/debian/rbuild/unstable/amd64/glibc_2.24-5.rbuild.log.gz
> >>
> >> The attached patch should fix this; I gave a more detailed description in 
> >> the upstream bug report.
> > 
> > Hum, I am not sure it is the correct way to fix that. I think that
> > libnss_files should be able to resolve entries from /etc/hosts when the
> > query is relative, but also when it is fully qualified. This is how
> > libnss_dns behaves.
> > 
> 
> Looks like I was wrong before about getaddrinfo bypassing /etc/hosts, and it 
> does indeed look at /etc/hosts.
> 
> $ sudo -u sbuild getent hosts localhost
> 127.0.0.1       profitbricks-build17-amd64.debian.net 
> profitbricks-build17-amd64 localhost
> $ sudo -u sbuild getent hosts localhost.
> # no results
> 
> However if you change "localhost" in /etc/hosts to "localhost." then the 
> above results would be reversed.
> 
> What do you think the full behaviour should be?

I think that it should returns 127.0.0.1 for both 'localhost' and
'localhost.'

> > Also note that technically the glibc doesn't require network access,
> > just a DNS server able to resolve 'localhost.'
> > 
> 
> So how do you want to fix this? glibc doesn't currently build-depend on a 
> name server, and I assume you wouldn't want to do that. Can you give me some 
> hints on what to patch, to fix libnss_files?

My point about that, is that a package should build without network
access. Now I am not sure it actually means without even a nameserver.

Anyway I don't know that part of the code a lot, but the fix has
probably to be done in nss/nss_files/files-hosts.c.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                 http://www.aurel32.net

Reply via email to