[Pkg-utopia-maintainers] Bug#960752: FTBFS on arch-all, test-suite failure - conova buildd has broken "localhost"

Aurelien Jarno aurelien at aurel32.net
Sun May 17 16:04:39 BST 2020


control: tag -1 + ipv6

On 2020-05-16 19:27, Aurelien Jarno wrote:
> On 2020-05-16 17:45, Martin Pitt wrote:
> > Michael Biebl [2020-05-16 12:39 +0200]:
> > > Source: cockpit
> > > Version: 219-1
> > > Severity: serious
> > > 
> > > Hi Martin,
> > > 
> > > looks like the latest release reliably triggers a FTBFS on arch-all:
> > > 
> > > https://buildd.debian.org/status/logs.php?pkg=cockpit&ver=219-1&arch=all
> > > 
> > > The relevant part from the build log
> > > **
> > > cockpit-protocol:ERROR:src/common/test-webserver.c:374:perform_request: assertion failed (error == NULL): Error resolving ?2a02:16a8:dc41:100::238:46259?: Name or service not known (g-resolver-error-quark, 0)

The address 2a02:16a8:dc41:100::238:46259 is not correct. When combining
and IPv6 address and a port, the address must be escaped with []. This
means that the following code from test-webserver.c is incorrect:

|   inet = cockpit_test_find_non_loopback_address ();
|   /* this can fail in environments with only localhost */
|   if (inet != NULL)
|     str = g_inet_address_to_string (inet);

  ...

|   if (str)
|     tc->hostport = g_strdup_printf ("%s:%d", str, port);

As g_network_address_parse() supports escaping addresses with [] even
for IPv4 addresses, I guess the following *untested* patch should fix
the issue.

--- a/src/common/test-webserver.c
+++ b/src/common/test-webserver.c
@@ -93,7 +93,7 @@
   /* HACK: this should be "localhost", but this fails on COPR; https://github.com/cockpit-project/cockpit/issues/12423 */
   tc->localport = g_strdup_printf ("127.0.0.1:%d", port);
   if (str)
-    tc->hostport = g_strdup_printf ("%s:%d", str, port);
+    tc->hostport = g_strdup_printf ("[%s]:%d", str, port);
   if (inet)
     g_object_unref (inet);
   g_free (str);

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien at aurel32.net                 http://www.aurel32.net



More information about the Pkg-utopia-maintainers mailing list