guix-patches
[Top][All Lists]
Advanced

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

[bug#60112] [PATCH] website: Add post about guix shell fhs option.


From: Ludovic Courtès
Subject: [bug#60112] [PATCH] website: Add post about guix shell fhs option.
Date: Thu, 05 Jan 2023 22:00:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

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’.





reply via email to

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