Package: gettext Version: 1.0-1 Severity: normal Tags: patch Hi,
Ubuntu hit an FTBFS with gettext 1.0-1 in the stonking development series. The failing test is `gettext-tools/gnulib-tests/test-getaddrinfo.c`. The test tries to resolve external hostnames with `getaddrinfo()` and expects success, but in the Ubuntu build environment it returns `EAI_NONAME` (-2), causing `test-getaddrinfo` to fail. The test already skips on `EAI_AGAIN` for no-network situations. The attached patch also skips on `EAI_NONAME`, which can happen when DNS resolution is unavailable in sandboxed/buildd environments. PPA validation: https://launchpad.net/~zineb/+archive/ubuntu/gettext-ftbfs Forwarded upstream to [email protected]; archive link pending. Thanks, Zineb
Description: Skip test-getaddrinfo when DNS resolution is unavailable The gnulib getaddrinfo test tries to resolve external hostnames during the build-time test suite. In Ubuntu sbuild/buildd environments without working DNS resolution, getaddrinfo() can return EAI_NONAME instead of EAI_AGAIN. Treat this as an unavailable-network case and skip the test instead of failing the build. Author: Zineb Zaadoud <[email protected]> Bug-Ubuntu: https://launchpad.net/bugs/2158369 Forwarded: yes Last-Update: 2026-06-29 Index: gettext-gu/gettext-tools/gnulib-tests/test-getaddrinfo.c =================================================================== --- gettext-gu.orig/gettext-tools/gnulib-tests/test-getaddrinfo.c +++ gettext-gu/gettext-tools/gnulib-tests/test-getaddrinfo.c @@ -120,6 +120,16 @@ simple (int pass, char const *host, char fprintf (stderr, "skipping getaddrinfo test: no network?\n"); return 77; } + + /* EAI_NONAME can be returned in sandboxed build environments where + DNS resolution is unavailable. Treat it like EAI_AGAIN and skip. */ + if (res == EAI_NONAME) + { + skip++; + fprintf (stderr, "skipping getaddrinfo test: no DNS resolver?\n"); + return 77; + } + /* Solaris reports EAI_SERVICE for "http" and "https". Don't fail the test merely because of this. */ if (res == EAI_SERVICE)

