emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#43034: closed ([PATCH] environment: Set USER and LOGNAME in containe


From: GNU bug Tracking System
Subject: bug#43034: closed ([PATCH] environment: Set USER and LOGNAME in container)
Date: Sun, 30 Aug 2020 21:55:02 +0000

Your message dated Sun, 30 Aug 2020 23:54:26 +0200
with message-id <87tuwjg5pp.fsf@gnu.org>
and subject line Re: [bug#43034] [PATCH] environment: Set USER and LOGNAME in 
container
has caused the debbugs.gnu.org bug report #43034,
regarding [PATCH] environment: Set USER and LOGNAME in container
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
43034: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43034
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] environment: Set USER and LOGNAME in container Date: Tue, 25 Aug 2020 10:58:24 +0200 User-agent: Mutt/1.10.1 (2018-07-13)
Hi,

I noticed `guix environment -C` lacks the two environment variable USER and
LOGNAME, which are part of %precious-variables (i.e. not cleared), but not
explicitly set when using a container. Some programs, in my case RStudio (see
https://github.com/leibniz-psychology/psychnotebook-app-rstudio/commit/3e15b9b173b8a9d2a7f55743ecba24e54b77ffad),
expect these to be set and can’t function properly without. Thus, the attached
patch exports them. This works with and without `-u`.

Cheers,
Lars

Attachment: 0001-environment-Set-USER-and-LOGNAME-in-container.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message --- Subject: Re: [bug#43034] [PATCH] environment: Set USER and LOGNAME in container Date: Sun, 30 Aug 2020 23:54:26 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
Hi Lars,

Lars-Dominik Braun <ldb@leibniz-psychology.org> skribis:

> From 516fecf81c980a020906533cd5135c6a7603a0a1 Mon Sep 17 00:00:00 2001
> From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
> Date: Tue, 25 Aug 2020 10:52:21 +0200
> Subject: [PATCH] environment: Set USER and LOGNAME in container
>
> * guix/scripts/environment.scm (launch-environment/container): Set
>   username environment variables.

Applied!

>                        ;; The same variables as in Nix's 'build.cc'.
>                        '("TMPDIR" "TEMPDIR" "TMP" "TEMP"))
>  
> +            ;; Some programs expect USER and/or LOGNAME to be set.
> +            (setenv "LOGNAME" logname)
> +            (setenv "USER" logname)

I was hesitant because so far we were more or less following the set of
variables exported by the daemon (see nix/libstore/build.cc), but there
were already exceptions (HOME, GUIX_ENVIRONMENT, PS1), and I think
making ‘guix environment -C’ more convenient is what matters.

Thanks,
Ludo’.


--- End Message ---

reply via email to

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