GNU bug report logs -
#60632
[PATCH 1/1] services: base: Add extra-env support to guix-configuration.
Previous Next
Reported by: Mathieu Othacehe <othacehe <at> gnu.org>
Date: Sat, 7 Jan 2023 18:20:01 UTC
Severity: normal
Tags: patch
Done: Mathieu Othacehe <othacehe <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60632 in the body.
You can then email your comments to 60632 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#60632
; Package
guix-patches
.
(Sat, 07 Jan 2023 18:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 07 Jan 2023 18:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60632
; Package
guix-patches
.
(Wed, 11 Jan 2023 19:39:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 60632 <at> debbugs.gnu.org (full text, mbox):
Hi Mathieu,
Mathieu Othacehe <othacehe <at> gnu.org> 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 <at> gnu.org
:
bug#60632
; Package
guix-patches
.
(Tue, 31 Jan 2023 22:19:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 60632 <at> debbugs.gnu.org (full text, mbox):
Hi!
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
> 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.
As a rule of thumb, I think we should keep the build environment
unchanged forever—no changes to the set of environment variables and
files/directories present in the build environment.
It’s important because the whole reproducibile-by-construction approach
depends on that.
Ludo’.
Reply sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
You have taken responsibility.
(Sat, 14 Oct 2023 19:56:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
bug acknowledged by developer.
(Sat, 14 Oct 2023 19:56:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 60632-done <at> debbugs.gnu.org (full text, mbox):
Hey,
> As a rule of thumb, I think we should keep the build environment
> unchanged forever—no changes to the set of environment variables and
> files/directories present in the build environment.
>
> It’s important because the whole reproducibile-by-construction approach
> depends on that.
OK, closing then :)
Thanks,
Mathieu
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 12 Nov 2023 12:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.