On Sun, Feb 09, 2020 at 07:19:24PM +0000, Simon McVittie wrote:
> I personally think this is a pbuilder bug (see also
> <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897662>). The fact that
> "localhost" resolves to 127.0.0.1 and/or ::1 is part of the "OS API",
> and I think packages' tests should be entitled to assume that this will
> happen, without needing to take special steps to achieve it.

I fixed pbuilder quite some time ago, and "localhost" now resolves
properly.

> According to #897662 this used to work - has it regressed?

I don't think so…
that was part of pbuilder 0.230, which is in stretch-backports+.  And I
haven't done many changes since then.

Once thing I noticed last month though, is that the way /etc/hosts is
create is odd and causes a leading \t:

|mattia@warren ~/pbuilder/build/3684584/etc % cat hosts
|       127.0.0.1       localhost localhost.localdomain warren 
warren.mapreri.org
|
|       ::1     ip6-localhost ip6-loopback localhost6 localhost6.localdomain6
|       fe00::0 ip6-localnet
|       ff00::0 ip6-mcastprefix
|       ff02::1 ip6-allnodes
|       ff02::2 ip6-allrouters
|       ff02::3 ip6-allhosts

That's also fixed in git.
Could that be causing issues for glib?  But I don't think that's the
case, since I can build it here with that leading \t… :(

> We could probably work around this in glib2.0 with a Build-Depends on
> libnss-myhostname | netbase, or the other way round.

> Related to <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939099>
> (which is about whether the name in /etc/hostname resolves to a local
> IP address, whereas this one is about whether localhost resolves to a
> local IP adddress, but installing libnss-myhostname or netbase will
> usually fix both those anomalous situations).

that's indeed a slighly different problem.  I already fixed pbuilder
for that in git, where `hostname -f` resolves back to 127.0.1.1.
https://salsa.debian.org/pbuilder-team/pbuilder/commit/36860888738ca61295a50bcd6626363843a73f03

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
More about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature

Reply via email to