unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#60112] Drafting a Guix blog post on the FHS container
       [not found] ` <87fscqjioe.fsf@protonmail.com>
@ 2023-01-04 18:18   ` jman via Guix-patches via
  2023-01-05 21:00     ` [bug#60112] [PATCH] website: Add post about guix shell fhs option Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: jman via Guix-patches via @ 2023-01-04 18:18 UTC (permalink / raw)
  To: 60112


Hello and sorry for getting into this comment thread.

I have posted a few days ago a question about preserving env vars
when creating a container with FHS emulation:
https://lists.gnu.org/archive/html/help-guix/2023-01/msg00002.html

I think it's something about me not understanding how it works. By
reading my question, is there anything useful to add to the blog post to
clarify its usage?

If not, simply discard this comment :-)

thanks




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#60112] [PATCH] website: Add post about guix shell fhs option.
  2023-01-04 18:18   ` [bug#60112] Drafting a Guix blog post on the FHS container jman via Guix-patches via
@ 2023-01-05 21:00     ` Ludovic Courtès
  2023-01-05 21:03       ` John Kehayias via Guix-patches via
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2023-01-05 21:00 UTC (permalink / raw)
  To: jman; +Cc: John Kehayias, 60112

Hi jman,

jman <srht@city17.xyz> skribis:

> Hello and sorry for getting into this comment thread.
>
> I have posted a few days ago a question about preserving env vars
> when creating a container with FHS emulation:
> https://lists.gnu.org/archive/html/help-guix/2023-01/msg00002.html

The ‘PATH’ environment variable, and only this one, is overridden
unconditionally when using ‘--emulate-fhs’; quoth ‘environment.scm’:

   (when emulate-fhs?
     ;; When running in a container with EMULATE-FHS?, override $PATH
     ;; (optional, but to better match FHS expectations), and generate
     ;; /etc/ld.so.cache.
     (setenv "PATH" "/bin:/usr/bin:/sbin:/usr/sbin")
     (invoke "ldconfig" "-X"))

Other variables are preserved, as in this example:

--8<---------------cut here---------------start------------->8---
$ FOO=bar guix shell -CF -E ^FOO coreutils -- env | grep FOO
FOO=bar
--8<---------------cut here---------------end--------------->8---

HTH!

Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#60112] [PATCH] website: Add post about guix shell fhs option.
  2023-01-05 21:00     ` [bug#60112] [PATCH] website: Add post about guix shell fhs option Ludovic Courtès
@ 2023-01-05 21:03       ` John Kehayias via Guix-patches via
  0 siblings, 0 replies; 3+ messages in thread
From: John Kehayias via Guix-patches via @ 2023-01-05 21:03 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 60112, jman

On Thu, Jan 05, 2023 at 10:00 PM, Ludovic Courtès wrote:

> Hi jman,
>
> jman <srht@city17.xyz> skribis:
>
>> Hello and sorry for getting into this comment thread.
>>
>> I have posted a few days ago a question about preserving env vars
>> when creating a container with FHS emulation:
>> <https://lists.gnu.org/archive/html/help-guix/2023-01/msg00002.html>
>
> The ‘PATH’ environment variable, and only this one, is overridden
> unconditionally when using ‘--emulate-fhs’; quoth ‘environment.scm’:
>
>    (when emulate-fhs?
>      ;; When running in a container with EMULATE-FHS?, override $PATH
>      ;; (optional, but to better match FHS expectations), and generate
>      ;; /etc/ld.so.cache.
>      (setenv "PATH" "/bin:/usr/bin:/sbin:/usr/sbin")
>      (invoke "ldconfig" "-X"))
>
> Other variables are preserved, as in this example:
>
> $ FOO=bar guix shell -CF -E ^FOO coreutils -- env | grep FOO
> FOO=bar
>
> HTH!
>
> Ludo’.

Now filed by jman as <https://issues.guix.gnu.org/60566> after discussion on #guix. I think it is a bug (say you want to preserve PATH as you have some scripts in ~/.local/bin for example) and I have a patch to fix. I'll send it to that bug and CC you (Ludo’) as well.

John





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-05 21:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <44635a7b-f8dc-4bea-935a-15e6a41ffa88@sporksmith.net>
     [not found] ` <87fscqjioe.fsf@protonmail.com>
2023-01-04 18:18   ` [bug#60112] Drafting a Guix blog post on the FHS container jman via Guix-patches via
2023-01-05 21:00     ` [bug#60112] [PATCH] website: Add post about guix shell fhs option Ludovic Courtès
2023-01-05 21:03       ` John Kehayias via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).