guix-devel
[Top][All Lists]
Advanced

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

Re: Proxy settings wrt guix daemon


From: Mathieu Othacehe
Subject: Re: Proxy settings wrt guix daemon
Date: Sat, 04 Apr 2020 17:31:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello Vicent,

>
> What is the UI to run that guix-daemon --set-proxy ?
> Use herd set-proxy guix-daemon "https://proxy:3128"; ?
> (Like what is done for mcron)
>
> I really need a few "make this thing here do that" hints...
>
> And then also a bit of a hint on how I would test the
> modifications without risking my running system.

>From what I understand, the guix-daemon process is able to propagate
some of its environments variable to the builder. It seems that
http_proxy variable (and friends), are set as impureEnvVars by Guix. You
can search for '#:leaked-env-vars' over the Guix sources.

So it seems to indicate that if the guix-daemon process has the
http_proxy environment variable set, it will handle it correctly. So the
question is how to be able to set this variable dynamically?

I don't think there's a way to change the environment variables of a
process from the outside. So unless you come up with a new mechanism
inside guix-daemon, able to read proxy parameters from a file or so (not
desirable), the variable needs to be set before guix-daemon is launched.

Implementing what's proposed by Ludo would then make the following
command: 'herd set-proxy guix-daemon "https://proxy:3128";' do the
following things:

--8<---------------cut here---------------start------------->8---
(setenv "HTTP_PROXY" "https://proxy:3128";)
(restart guix-daemon) ; not the appropriated syntax
--8<---------------cut here---------------end--------------->8---

I don't know if that's what Ludo has in mind but I can't see any other
ways to do it.

Now Ludo has also proposed another solution here[1]. This solution
would require that (guix script perform-download) and (guix script
substitute) honor what would look like a 'build-option' (see
set-build-options in (guix store)). But this seems harder to implement.

Mathieu

[1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25569



reply via email to

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