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

Previous Next

Package: guix-patches;

Reported by: John Kehayias <john.kehayias <at> protonmail.com>

Date: Fri, 16 Dec 2022 07:29:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 60112 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: jman <srht <at> city17.xyz>
Cc: John Kehayias <john.kehayias <at> protonmail.com>, 60112 <at> debbugs.gnu.org
Subject: Re: bug#60112: [PATCH] website: Add post about guix shell fhs option.
Date: Thu, 05 Jan 2023 22:00:39 +0100
Hi jman,

jman <srht <at> 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’.




This bug report was last modified 2 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.