From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 10:45:40 2015 Received: (at 20402) by debbugs.gnu.org; 1 Jul 2015 14:45:41 +0000 Received: from localhost ([127.0.0.1]:36089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAJGd-0008EQ-MY for submit@debbugs.gnu.org; Wed, 01 Jul 2015 10:45:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33614) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAJGa-0008Dw-7k for 20402@debbugs.gnu.org; Wed, 01 Jul 2015 10:45:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAJGN-0007Ne-Oq for 20402@debbugs.gnu.org; Wed, 01 Jul 2015 10:45:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([208.118.235.10]:46203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAJGN-0007NT-MF; Wed, 01 Jul 2015 10:45:23 -0400 Received: from nocat-out.u-bordeaux.fr ([147.210.179.68]:42652 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZAJGN-0000xV-1g; Wed, 01 Jul 2015 10:45:23 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: =?utf-8?B?Q2xhZXMgV2FsbGluICjpn4vlmInoqqAp?= Subject: Re: HTTP and FTP proxies for guix package / guix-daemon References: <87381zicgg.fsf@gnu.org> <87616uzfd8.fsf@gnu.org> <87d20zbj03.fsf@gnu.org> <87pp4cxpbx.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 13 Messidor an 223 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Wed, 01 Jul 2015 16:45:15 +0200 In-Reply-To: ("Claes Wallin \=\?utf-8\?B\?KOmfi+WYieiqoCkiJ3M\=\?\= message of "Wed, 1 Jul 2015 15:08:31 +0200") Message-ID: <87h9poq6mc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.10 X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 20402 Cc: 20402@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) "Claes Wallin (=E9=9F=8B=E5=98=89=E8=AA=A0)" skribis: > On Wed, Jul 1, 2015 at 10:19 AM, Ludovic Court=C3=A8s wrot= e: > >> To test, I first run the daemon like this: >> >> sudo sh -c 'export http_proxy=3Dfoobar ; ./pre-inst-env guix-daemon --= build-users-group=3Dguixbuild' > > 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 Pasvorto: 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 PID TTY STAT TIME COMMAND 31316 ? Ss 0:00 /gnu/store/zg6j61inmmk5kyqgyfjnj7rdxl79i9ps-guix= -0.8.2.684bf7c/bin/guix-daemon --build-users-group guixbu --8<---------------cut here---------------end--------------->8--- That means I=E2=80=99m using commit 684bf7c of Guix, which has the fix, whi= ch 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=E2=80=99s 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, =E2=80=98open-socket-for-uri=E2=80= =99 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))) ;=E2=86=90 proxy (define addresses (let ((port (uri-port uri))) (delete-duplicates (getaddrinfo (uri-host uri) (cond (port =3D> number->string) (else (symbol->string (uri-scheme uri)))) (if port AI_NUMERICSERV 0)) ;; ... --8<---------------cut here---------------end--------------->8--- Do you see the same DNS issue when running: http_proxy=3Dhttp://... guix download http://... ? Thanks, Ludo=E2=80=99.