GNU bug report logs - #60632
[PATCH 1/1] services: base: Add extra-env support to guix-configuration.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Mathieu Othacehe <othacehe@HIDDEN>; Keywords: patch; dated Sat, 7 Jan 2023 18:20:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 60632 <at> debbugs.gnu.org:


Received: (at 60632) by debbugs.gnu.org; 11 Jan 2023 19:38:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 11 14:38:31 2023
Received: from localhost ([127.0.0.1]:43921 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pFgvf-0003GZ-LJ
	for submit <at> debbugs.gnu.org; Wed, 11 Jan 2023 14:38:31 -0500
Received: from mail-vs1-f46.google.com ([209.85.217.46]:42896)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1pFgvc-0003GK-DU
 for 60632 <at> debbugs.gnu.org; Wed, 11 Jan 2023 14:38:30 -0500
Received: by mail-vs1-f46.google.com with SMTP id d66so4417990vsd.9
 for <60632 <at> debbugs.gnu.org>; Wed, 11 Jan 2023 11:38:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:user-agent:message-id:in-reply-to:date:references
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=BMvIOgA7aGVaJpdRfu+i3WPqp2PRXJzobiu9GoNhc5k=;
 b=dK/6wo8HGC4k9i/+526kogvRmxjKsHAiHmuBf96cM3389WdB0pjvcUfXPYKIIhoQaZ
 07SqYFJ2nwzVfEoWCZYgV3sN0Wrky6+uuGqCZMRbVXW8EWh18BEx4b2U7YsqAYP5ZBc1
 rM6vxzIi6cl7VWezFueNKMbo3cfqXW7/iZBfwLEjWU6rh0XJ5qCUCtZ/iFIymm7SI5DN
 yTXMF36tFCBCAFKAe/kUAI7d3/rHWX4LY8oiPmKfHhX84WbQcBPr7jasOFRBC0ZwehZH
 rTtvhlXDcuiSLEq+TqipXof+c0LkD1RlsNW14C9xyXDIFIUKQg3QbIGv+2EoFsav8sO0
 0H6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:user-agent:message-id:in-reply-to:date:references
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=BMvIOgA7aGVaJpdRfu+i3WPqp2PRXJzobiu9GoNhc5k=;
 b=VabV5jNvePx5e7mO2F/FGaWh7wBOyK9BUAjhu2T8wOAz2UMZiwZ7sxxPhQectyudj6
 xPVAcrPcE12JfJKY4hNdnAsSXWFnA0elrChDtP3ayjuwGrP1vt7jk0x5b0uXDY3qT7db
 FEOxXrbrjLpq9uOTVsrUSejyueuMlVMMLWT29lP3sx0H7OLh8fUq2dpHmHXeW5ZcwiuO
 weG5JPs6Mu8qHwKHF4l75VUpeinXj7sXVjQxY61fPpPZrI3eDJm8Cd0TzvAX/zAqEooj
 OAOZWlSwiUQsy2yFwp9K/uq0RZ7jcAtSL5Rv5daP5LceThRMhXfNc2aqTvaDAsc5FCvh
 u7JQ==
X-Gm-Message-State: AFqh2kotbvRrn6BthqJnz220kjQB0VlTyUp2zH62tDnxvLqu0j30TBkG
 +HA52wudQouGrUJV45SVX9ZL8DJk5k2hmg==
X-Google-Smtp-Source: AMrXdXtzGPmFqdxHWtBevAj+bLcn8NedDC3oS7l+UyMNqAjnQaNI7kTRbuVoXsjYuKOT7mnhzo1ubQ==
X-Received: by 2002:a05:6102:3022:b0:3ce:9934:c5f5 with SMTP id
 v2-20020a056102302200b003ce9934c5f5mr20241887vsa.20.1673465902332; 
 Wed, 11 Jan 2023 11:38:22 -0800 (PST)
Received: from hurd (dsl-159-79.b2b2c.ca. [66.158.159.79])
 by smtp.gmail.com with ESMTPSA id
 d6-20020a37b406000000b007049f19c736sm9368153qkf.7.2023.01.11.11.38.21
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 11 Jan 2023 11:38:21 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Mathieu Othacehe <othacehe@HIDDEN>
Subject: Re: bug#60632: [PATCH 1/1] services: base: Add extra-env support to
 guix-configuration.
References: <20230107181938.14334-1-othacehe@HIDDEN>
Date: Wed, 11 Jan 2023 14:38:20 -0500
In-Reply-To: <20230107181938.14334-1-othacehe@HIDDEN> (Mathieu Othacehe's
 message of "Sat, 7 Jan 2023 19:19:38 +0100")
Message-ID: <871qo0j1zn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60632
Cc: 60632 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Mathieu,

Mathieu Othacehe <othacehe@HIDDEN> writes:

> * gnu/services/base.scm (<guix-configuration>)[extra-env]: New field.
> (guix-shepherd-service): Honor it.
> * doc/guix.texi (Base Services): Document it.
> ---
> Hello,
>
> Here is a small patch to allow defining extra environment variables in the
> guix-daemon context.
>
> I intend to use it to set the GUIX_SUBSTITUTE_DEBUG variable to debug
> https://issues.guix.gnu.org/48468.

LGTM.

Side topic: I wonder if (with some changes to the daemon -- perhaps in
DerivationGoal::startBuilder) in nix/libstore/build.cc we could leak the
COLUMNS variable to be able to control the Guile builder backtrace
width.

-- 
Thanks,
Maxim




Information forwarded to guix-patches@HIDDEN:
bug#60632; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Jan 2023 18:19:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 07 13:19:56 2023
Received: from localhost ([127.0.0.1]:58865 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pEDnP-0001Nq-K8
	for submit <at> debbugs.gnu.org; Sat, 07 Jan 2023 13:19:55 -0500
Received: from lists.gnu.org ([209.51.188.17]:48134)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <othacehe@HIDDEN>) id 1pEDnO-0001Nj-3d
 for submit <at> debbugs.gnu.org; Sat, 07 Jan 2023 13:19:54 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1pEDnN-0007Y5-V9
 for guix-patches@HIDDEN; Sat, 07 Jan 2023 13:19:53 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1pEDnN-0007gm-Mn
 for guix-patches@HIDDEN; Sat, 07 Jan 2023 13:19:53 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=vzEoa5Qe7VZ8HFYCjCvqoDINxXSk/MWM+FFXwBCX3VY=; b=ZYijfiWCG6kSkG
 zNRx2vUiEt3QBgrzq6hb2VEbjJ8KFAFtiJwPeSrqGNif37iS8bF4a/2ZcNktCpbObKpnpV07dtxDS
 ++7rDLVb/VHQx4LYZi2rZmQFzZo46KOO2EuE6fifXXTyrLCgbJd7REMp2VaBgc7SiGOWR9coP0Fhs
 y/K5sqtMboDirFibiGRyB5J7aDQdORZuzoRJyIw6ff4zVyOWH0Vy6z6aZ5EZsU64ESgbI9X+hHDSk
 aQAnwThPCrwjRh01Uk7NzBuRk4VBsj7uqc5elfMGqYYqsZmwLxTZKYhQMMfyEaug6wCl1O1qlisNH
 P835SpTCosBBIBh39e7Q==;
Received: from [109.190.253.11] (helo=localhost.localdomain)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>)
 id 1pEDnM-0005LN-Ul; Sat, 07 Jan 2023 13:19:53 -0500
From: Mathieu Othacehe <othacehe@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 1/1] services: base: Add extra-env support to
 guix-configuration.
Date: Sat,  7 Jan 2023 19:19:38 +0100
Message-Id: <20230107181938.14334-1-othacehe@HIDDEN>
X-Mailer: git-send-email 2.38.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
Cc: Mathieu Othacehe <othacehe@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/base.scm (<guix-configuration>)[extra-env]: New field.
(guix-shepherd-service): Honor it.
* doc/guix.texi (Base Services): Document it.
---
Hello,

Here is a small patch to allow defining extra environment variables in the
guix-daemon context.

I intend to use it to set the GUIX_SUBSTITUTE_DEBUG variable to debug
https://issues.guix.gnu.org/48468.

Thanks,

Mathieu

 doc/guix.texi         |  4 ++++
 gnu/services/base.scm | 10 +++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 293c3016aa..e337945ba7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18482,6 +18482,10 @@ herd set-http-proxy guix-daemon
 @item @code{tmpdir} (default: @code{#f})
 A directory path where the @command{guix-daemon} will perform builds.
 
+@item @code{extra-env} (default: @code{'()})
+Environment variables to be set before starting the daemon, as a list of
+@code{key=value} strings.
+
 @end table
 @end deftp
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 6993e1f174..f29657e86e 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -198,6 +198,7 @@ (define-module (gnu services base)
             guix-configuration-generate-substitute-key?
             guix-configuration-extra-options
             guix-configuration-log-file
+            guix-configuration-extra-env
 
             guix-extension
             guix-extension?
@@ -1654,7 +1655,9 @@ (define-record-type* <guix-configuration>
   (http-proxy       guix-http-proxy               ;string | #f
                     (default #f))
   (tmpdir           guix-tmpdir                   ;string | #f
-                    (default #f)))
+                    (default #f))
+  (extra-env        guix-configuration-extra-env  ;list of strings
+                    (default '())))
 
 (define %default-guix-configuration
   (guix-configuration))
@@ -1710,7 +1713,7 @@ (define (guix-shepherd-service config)
     (guix build-group build-accounts authorize-key? authorized-keys
           use-substitutes? substitute-urls max-silent-time timeout
           log-compression discover? extra-options log-file
-          http-proxy tmpdir chroot-directories)
+          http-proxy tmpdir chroot-directories extra-env)
     (list (shepherd-service
            (documentation "Run the Guix daemon.")
            (provision '(guix-daemon))
@@ -1799,7 +1802,8 @@ (define discover?
                            (if proxy
                                (list (string-append "http_proxy=" proxy)
                                      (string-append "https_proxy=" proxy))
-                               '()))
+                               '())
+                           extra-env)
 
                    #:log-file #$log-file))))
            (stop #~(make-kill-destructor))))))
-- 
2.38.1





Acknowledgement sent to Mathieu Othacehe <othacehe@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#60632; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 11 Jan 2023 19:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.