all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joshua Randall <jcrandall@alum.mit.edu>
To: 20402@debbugs.gnu.org
Subject: bug#20402: guix cannot download via an http proxy
Date: Wed, 22 Apr 2015 10:08:27 +0100	[thread overview]
Message-ID: <CAFBLGSOaeXcbZpWAUByAkfe+kanD_2O+x97WW6A02yNPApVKTQ@mail.gmail.com> (raw)
In-Reply-To: <CAFBLGSN8Gu5-=NsFuHumomtG80jNO94Sjc9AsuSZvkT9R46eEg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2516 bytes --]

After more testing this morning, I see that although the core functionality
is working after applying the proposed patch (i.e. the guix daemon itself
can download things), the derivations are still failing because the
environment is being squashed and so the http_proxy and https_proxy
environment variables are not available to the build. It looks like nix has
a way around this involving setting imputeEnvVars = "http_proxy
https_proxy" so that those variables get copied into the build environment
(for fixed-output derivations only, which makes sense to me).

I'll try to come up with a patch that inserts the imputeEnvVars, but I'm
getting farther from the code I understand so I will probably need some
help in getting it in the right place.

Cheers,

Josh.


On Wed, Apr 22, 2015 at 2:15 AM, Joshua Randall <jcrandall@alum.mit.edu>
wrote:

> Tags: patch
>
> Please find a proposed patch that should fix this issue. I haven't written
> scheme in many years, so please excuse me if I have failed to follow
> convention in any way - I won't be offended at all if you want to refactor
> it. This patch should apply cleanly on the current git master branch and
> also on the v0.8.1 release.
>
> This patch modifies http-fetch (in build/download.scm) such that it calls
> Guile's open-socket-for-uri after fixing up the uri so that it always has a
> port specified. I'm not sure how to test the bootstrapping NSS issue that
> required open-connection-for-uri, but my expectation based on reading the
> source is that this alternative should work for Guile > 2.0.7, and I've
> left the original open-connection-for-uri in there for backwards
> compatibility with Guile < 2.0.7. If someone can test this against a
> situation known to have needed the NSS workaround, that would be great.
>
> I've also changed the only other call to open-connection-for-uri, which is
> in the probe-uri function in scripts/lint.scm - my suspicion is that won't
> be an issue because I'm guessing the lint scripts are not used while
> bootstrapping, so the open-socket-for-uri function will probably be fine
> for the purpose of probing whether a URL is valid.
>
> After applying this patch, guix should use the http proxy support built in
> to Guile >= 2.0.10. This appears to be working for me - I've just started a
> bootstrap and it has now started to successfully download packages - so
> far, so good.
>
> Please let me know if there is anything else I can do to assist with
> getting this issue fixed.
>
> Cheers,
>
> Josh.
>
>

[-- Attachment #2: Type: text/html, Size: 3116 bytes --]

  reply	other threads:[~2015-04-22  9:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21 22:56 bug#20402: guix cannot download via an http proxy Joshua Randall
2015-04-22  1:15 ` Joshua Randall
2015-04-22  9:08   ` Joshua Randall [this message]
2015-04-30 22:07   ` Ludovic Courtès
2015-04-22 14:22 ` bug#20402: updated patch to pass http_proxy and https_proxy env vars to derivation builds Joshua Randall
2015-04-30 22:12   ` Ludovic Courtès
2015-06-09  1:22 ` bug#20402: guix cannot download via an http proxy Claes Wallin
2015-06-10  2:26   ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFBLGSOaeXcbZpWAUByAkfe+kanD_2O+x97WW6A02yNPApVKTQ@mail.gmail.com \
    --to=jcrandall@alum.mit.edu \
    --cc=20402@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.