Building Guix fails without '/etc/services'

  • Done
  • quality assurance status badge
Details
4 participants
  • Jonathan Brielmaier
  • Julien Lepiller
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal
L
L
Leo Famulari wrote on 1 Aug 2017 02:23
(address . bug-guix@gnu.org)
20170801002358.GA1481@jasmine.lan
On a system that lacks '/etc/services' (CoreOS), building Guix from
source fails because getaddrinfo() doesn't know how to proceed:

ERROR: In procedure getaddrinfo: Servname not supported for ai_socktype

I worked around this issue by downloading the binaries by hand with
curl.

I don't know how curl does it, but could it be possible to make the Guix
build more resilient here?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll/yhsACgkQJkb6MLrK
fwi2tRAAoMSz1bwQJ3PjfP2pHNKz4fnrZMtAjeYHCUvIwH0355FcJUIYUVIKr7Ix
asbaO4m4Jh8Zapf14Db+by42lqmDSGx/1k5fNPnOzAUdnF6LGQMv07w0Rj+nX3r+
FLYUCuZsYej2t+wlc0BvZRz/bx74m90nNUNzF3zQubt630sQJd5HVz2ddMvWdLMU
lRsXNwX13wtD9p7O3lZqNrOaOUJjs4QAjtzvPluUbpPtUqrPAFiVgn4lQ1oU7Vag
V0jEtLLk1MvYX1B4SBbeXcdlq1ANu04/jVEGURmhUrofTBw1Qi/9ezA5gyhWp2kK
/RMpRh1mqTPurxTBpnLIoDD+xp8HLNnr+vbxSEt3RESk3Q/2clRb0C2vZe2QrmWR
WmswBAjgoPhg0gaVhVP2ZY2EPX0uGHsgDXAgCzS0dOwePHSC9p0BeNY3wt6SLA4u
y+StKhHHYDr/4xk1N+M/7akurbwo3UzILo2bTKT1FiFxN2FZK1fggABm0xOVFy74
WxacK4mhhe+P3rKC14hh0ThDzY6aYuOXdK+rb4FVptKS5hTjZVWpoGLTdv1OGmuB
8pGJIcRyPHnOtGR3a+YU1vmlVtw3zpxnBz2FSduW+0q5wtTF1MS2cLQ4y9yyz/Jl
k26rf3fN03/RDfnYdjKD5zw1tymWNg+a3LMk+D77m89cRHXmZvo=
=CG47
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 1 Aug 2017 12:09
(name . Leo Famulari)(address . leo@famulari.name)(address . 27894@debbugs.gnu.org)
87mv7jr453.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (8 lines)
> On a system that lacks '/etc/services' (CoreOS), building Guix from
> source fails because getaddrinfo() doesn't know how to proceed:
>
> ERROR: In procedure getaddrinfo: Servname not supported for ai_socktype
>
> I worked around this issue by downloading the binaries by hand with
> curl.

You get the error above when running “make”, which in turn runs
build-aux/download.scm, right?

If so, I think this can be worked around with:
Toggle diff (13 lines)
diff --git a/build-aux/download.scm b/build-aux/download.scm
index 8dfa91460..5cb2491dc 100644
--- a/build-aux/download.scm
+++ b/build-aux/download.scm
@@ -31,7 +31,7 @@
(guix hash))
(define %url-base
- "http://alpha.gnu.org/gnu/guix/bootstrap"
+ "http://alpha.gnu.org:80/gnu/guix/bootstrap"
;; Alternately:
;;"http://www.fdn.fr/~lcourtes/software/guix/packages"
However, the whole point of /etc/services is so that application writers
don’t have to hard-code port number everywhere. So I’d be tempted to
say this is not a bug.

WDYT?

Ludo’.
L
L
Leo Famulari wrote on 1 Aug 2017 21:39
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27894-done@debbugs.gnu.org)
20170801193919.GA31569@jasmine.lan
On Tue, Aug 01, 2017 at 12:09:12PM +0200, Ludovic Courtès wrote:
Toggle quote (37 lines)
> Leo Famulari <leo@famulari.name> skribis:
>
> > On a system that lacks '/etc/services' (CoreOS), building Guix from
> > source fails because getaddrinfo() doesn't know how to proceed:
> >
> > ERROR: In procedure getaddrinfo: Servname not supported for ai_socktype
> >
> > I worked around this issue by downloading the binaries by hand with
> > curl.
>
> You get the error above when running “make”, which in turn runs
> build-aux/download.scm, right?
>
> If so, I think this can be worked around with:
>

> diff --git a/build-aux/download.scm b/build-aux/download.scm
> index 8dfa91460..5cb2491dc 100644
> --- a/build-aux/download.scm
> +++ b/build-aux/download.scm
> @@ -31,7 +31,7 @@
> (guix hash))
>
> (define %url-base
> - "http://alpha.gnu.org/gnu/guix/bootstrap"
> + "http://alpha.gnu.org:80/gnu/guix/bootstrap"
>
> ;; Alternately:
> ;;"http://www.fdn.fr/~lcourtes/software/guix/packages"

>
> However, the whole point of /etc/services is so that application writers
> don’t have to hard-code port number everywhere. So I’d be tempted to
> say this is not a bug.
>
> WDYT?

I think it's fair to say it's not a bug. Perhaps if we get more reports
from users of this system we can reconsider.
Closed
J
J
Jonathan Brielmaier wrote on 11 Feb 2020 21:08
unarchive 27894
(address . control@debbugs.gnu.org)
a141b67f-9951-db0a-1bba-47662d3b01b6@web.de
unarchive 27894
J
J
Jonathan Brielmaier wrote on 11 Feb 2020 21:10
Building Guix fails without '/etc/services'
(address . 27894@debbugs.gnu.org)
ccf2b51f-128b-aed9-d82d-7e3f7bd876e8@web.de
I run into this bug now on openSUSE Tumbleweed. The reason is that on TW
`/etc/services` got moved to `/usr/etc/services`.

What would be required to support that use case?
J
J
Julien Lepiller wrote on 11 Feb 2020 21:40
557A15DC-8D1C-45C9-8593-9884FAC1BA85@lepiller.eu
Le 11 février 2020 15:10:16 GMT-05:00, Jonathan Brielmaier <jonathan.brielmaier@web.de> a écrit :
Toggle quote (6 lines)
>I run into this bug now on openSUSE Tumbleweed. The reason is that on
>TW
>`/etc/services` got moved to `/usr/etc/services`.
>
>What would be required to support that use case?

This is somewhat similar to what happens on android, and probably any systen using an alternate libc. Guix uses its own libc that expects an /etc/services and other files. I guess a symlink from /etc to /usr/etc is all you need?
J
J
Jonathan Brielmaier wrote on 11 Feb 2020 21:50
924c83ae-af91-9999-7a2e-ce43afa8d88f@web.de
On 11.02.20 21:40, Julien Lepiller wrote:> This is somewhat similar to
what happens on android, and probably any systen using an alternate
libc. Guix uses its own libc that expects an /etc/services and other
files. I guess a symlink from /etc to /usr/etc is all you need?.
Yes a symlink does resolve it. But doing it on all my systems is annoying :P

But I wonder how much effort would be required to make this hardcoding
of `/etc/services` more flexible. I'm mean Tumbleweed uses glibc. The
only thing different is that they are moving all/most of config files
from /etc to /usr/etc for $reason.
L
L
Ludovic Courtès wrote on 24 Feb 2020 17:51
(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
87eeukhqsv.fsf@gnu.org
Hi,

Jonathan Brielmaier <jonathan.brielmaier@web.de> skribis:

Toggle quote (11 lines)
> On 11.02.20 21:40, Julien Lepiller wrote:> This is somewhat similar to
> what happens on android, and probably any systen using an alternate
> libc. Guix uses its own libc that expects an /etc/services and other
> files. I guess a symlink from /etc to /usr/etc is all you need?.
> Yes a symlink does resolve it. But doing it on all my systems is annoying :P
>
> But I wonder how much effort would be required to make this hardcoding
> of `/etc/services` more flexible. I'm mean Tumbleweed uses glibc. The
> only thing different is that they are moving all/most of config files
> from /etc to /usr/etc for $reason.

It seems to me that this question should be addressed in glibc proper.
Perhaps glibc should provide a way to configure this.

Or is openSuSE’s libc configured with --sysconfdir=/usr/etc?

Thanks,
Ludo’.
?
Your comment

This issue is archived.

To comment on this conversation send an email to 27894@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 27894
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch