From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Othacehe Subject: Re: Proxy settings wrt guix daemon Date: Sat, 04 Apr 2020 17:31:00 +0200 Message-ID: <87r1x3tgi3.fsf@gmail.com> References: <87blofyzn0.fsf@gnu.org> <87eet8v948.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45848) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKklE-0003MU-Q5 for guix-devel@gnu.org; Sat, 04 Apr 2020 11:31:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKklD-000184-Iu for guix-devel@gnu.org; Sat, 04 Apr 2020 11:31:04 -0400 In-Reply-To: (Vincent Legoll's message of "Sat, 4 Apr 2020 00:29:10 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Vincent Legoll Cc: guix-devel 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