[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20402: HTTP and FTP proxies for guix package / guix-daemon

From: Ludovic Courtès
Subject: bug#20402: HTTP and FTP proxies for guix package / guix-daemon
Date: Wed, 01 Jul 2015 16:45:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

"Claes Wallin (韋嘉誠)" <address@hidden> skribis:

> On Wed, Jul 1, 2015 at 10:19 AM, Ludovic Courtès <address@hidden> wrote:
>> To test, I first run the daemon like this:
>>   sudo sh -c 'export http_proxy=foobar ; ./pre-inst-env guix-daemon 
>> --build-users-group=guixbuild'
> Could there be a difference because you are testing with the
> checked-out, semi-manually built guix and I was checking with a
> freshly packaged (pull, package -i guix) guix? Like I said in
> http://lists.gnu.org/archive/html/bug-guix/2015-06/msg00036.html ,
> guix-daemon as compiled by guix seems to be using guile-2.0.9. Maybe
> that only happens due to guix rewriting hashbangs etc, and on a build
> outside guix (even when using guix environment) it uses whatever guile
> happens to be in the paths?

Could you send the store file name of Guix that is being used?
For instance, I have:

--8<---------------cut here---------------start------------->8---
$ sudo deco status guix-daemon
Status of guix-daemon:
  It is started.
  Running value is 31316.
  It is enabled.
  Provides (guix-daemon).
  Requires (user-processes).
  Conflicts with ().
  Will be respawned.
$ ps 31316
31316 ?        Ss     0:00 
--build-users-group guixbu
--8<---------------cut here---------------end--------------->8---

That means I’m using commit 684bf7c of Guix, which has the fix, which
came up after the http_proxy commit (commit 0d88313.)

>>> No. Whenever the daemon is doing the downloading, http_proxy is
>>> ignored and I get "Temporary failure in name resolution" because the
>>> VM doesn't have an internet DNS.
>> [...]
>>> `/gnu/store/2zkyyw4bq0wzsxdysncrf9lmwl44w5wh-binutils-2.25.tar.bz2'
>>> from `http://ftpmirror.gnu.org/binutils/binutils-2.25.tar.bz2'...
>>> ERROR: In procedure getaddrinfo: Temporary failure in name resolution
>> That’s another, unrelated issue, probably in your network or on your
>> machine.
> Yes. This is why the proxy is required. There is no internet DNS for
> the VM, because it is on an isolated lab network.

Hmm, when using Guile 2.0.11 or later, ‘open-socket-for-uri’ connects to
the proxy (so its name must be available in DNS lookup), not to the
target server.  The code in (web client) goes like this:

--8<---------------cut here---------------start------------->8---
(define (open-socket-for-uri uri-or-string)
  "Return an open input/output port for a connection to URI."
  (define http-proxy (current-http-proxy))
  (define uri (ensure-uri (or http-proxy uri-or-string)))  ;← proxy
  (define addresses
    (let ((port (uri-port uri)))
       (getaddrinfo (uri-host uri)
                    (cond (port => number->string)
                          (else (symbol->string (uri-scheme uri))))
                    (if port
       ;; ...
--8<---------------cut here---------------end--------------->8---

Do you see the same DNS issue when running:

  http_proxy=http://... guix download http://...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]