From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SA3DBeq3uWOr7QAAbAwnHQ (envelope-from ) for ; Sat, 07 Jan 2023 19:20:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2H5EBeq3uWOW5wAAauVa8A (envelope-from ) for ; Sat, 07 Jan 2023 19:20:26 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3563A90F3 for ; Sat, 7 Jan 2023 19:20:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEDnY-0007cN-HY; Sat, 07 Jan 2023 13:20:04 -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 ) id 1pEDnX-0007bg-3I for guix-patches@gnu.org; Sat, 07 Jan 2023 13:20:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEDnW-0007ii-F8 for guix-patches@gnu.org; Sat, 07 Jan 2023 13:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pEDnW-0001OH-0y for guix-patches@gnu.org; Sat, 07 Jan 2023 13:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60632] [PATCH 1/1] services: base: Add extra-env support to guix-configuration. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Jan 2023 18:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60632 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60632@debbugs.gnu.org Cc: Mathieu Othacehe X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16731155965326 (code B ref -1); Sat, 07 Jan 2023 18:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jan 2023 18:19:56 +0000 Received: from localhost ([127.0.0.1]:58865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEDnP-0001Nq-K8 for submit@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 ) id 1pEDnO-0001Nj-3d for submit@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 ) id 1pEDnN-0007Y5-V9 for guix-patches@gnu.org; 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 ) id 1pEDnN-0007gm-Mn for guix-patches@gnu.org; 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 ) id 1pEDnM-0005LN-Ul; Sat, 07 Jan 2023 13:19:53 -0500 From: Mathieu Othacehe Date: Sat, 7 Jan 2023 19:19:38 +0100 Message-Id: <20230107181938.14334-1-othacehe@gnu.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673115625; a=rsa-sha256; cv=none; b=a6EoP22axrs685mHBIfciqWUPdFv4uiBUZhTvtgmwB0/IOA9MK0oS6G9VhD7kaFZrxCgkL dbMUZpif/XJuzTh0rLywGXbf+LMhHEEfRQhYjojDnI4bVWVcsMdrpkkCtdSybQ/YjL4VEC Kt6CLOzHm5wdoDQdamn7RdsPXvq0MHIYBvBNjejq8kw+4H14rRKggXZfHWSnVi8II+n7H4 PFR8aCx/ZQ2LQpCebg1bzpA2LbryerK1PqiywGI4PwUrV5JqDIIwLBHC+BSCitzZ/eYWCB 2rdWcuIbDAGfGuvg0FyqubP17GMRtfqRE6z2cV4puQ2jCIceHi9RNXA25TqeuQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ZYijfiWC; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673115625; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=vzEoa5Qe7VZ8HFYCjCvqoDINxXSk/MWM+FFXwBCX3VY=; b=fduRAKnMsjmZL+RJUMkRkMsv0JMI9gNn3JwFCwUIjy1ABkUP+WMq0A1LD43kLXaeB+iMzJ hlW1pHwyK8xu3yBV841l+LHrPozg2C0oZpjnO3iCS2CIl7/YW1W4Y7r/y/QXF9BUvdpQB1 I8+yhGmxa9I80V3mbNXUs8AcMUyCSq9OBcV4nRiUZAEdIj8Zi71n00hTkJXdNxba+8YCLl 6D0/Rc5RjbHnCczaspPhxhWw9I+9dh8b+k0LM6U0RxwkrRbbcArtKWPehG9iRMcHfvndgm izF9U+mZa8vYuUa32Gep/l/Ic3WYErDSL9FAdUCIeqKqaDygSBgOU+6QCAYgig== X-Spam-Score: -3.56 X-Migadu-Queue-Id: 3563A90F3 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ZYijfiWC; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.56 X-TUID: ZMyJIsb1nvJv * gnu/services/base.scm ()[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* (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