GNU bug report logs -
#60112
[PATCH] website: Add post about guix shell fhs option.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60112 in the body.
You can then email your comments to 60112 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#60112
; Package
guix-patches
.
(Fri, 16 Dec 2022 07:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
John Kehayias <john.kehayias <at> protonmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 16 Dec 2022 07:29:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
As discussed on the mailing list, here is a draft post. I included the image in the patch, hopefully that shows correctly.
[0001-website-Add-post-about-guix-shell-fhs-option.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Sun, 25 Dec 2022 23:59:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 60112 <at> debbugs.gnu.org (full text, mbox):
Hi John,
I’m seeing this only now, apologies! (I thought the discussion was
continuing in the guix-devel thread, my bad. :-/)
John Kehayias <john.kehayias <at> protonmail.com> skribis:
> From e13d5a92a98680bf0d0b30fbd124a5e7725f7475 Mon Sep 17 00:00:00 2001
> From: John Kehayias <john.kehayias <at> protonmail.com>
> Date: Fri, 16 Dec 2022 02:22:17 -0500
> Subject: [PATCH] website: Add post about guix shell fhs option.
>
> * website/posts/guix-shell-fhs.md: New file.
> website/static/blog/img/guix-shell-fhs.gif: New file.
Overall looks great to me and pretty much ready to go. Minor
suggestions.
> +++ b/website/posts/guix-shell-fhs.md
> @@ -0,0 +1,140 @@
> +title: FHS Comes to Guix Containers
Should we spell “FHS” out?
> +GNU Guix is different from most other GNU/Linux distributions and perhaps nowhere is that more obvious than the organization of the filesystem: Guix does not conform to the [Filesystem Hierarchy Standard](https://refspecs.linuxfoundation.org/fhs.shtml) (FHS). In practical terms, this means there is no global `/lib` containing libraries, `/bin` containing binaries,<sup><a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup> and so on. This is very much at the core of how Guix works and some of the convenient features, like per-user installation of programs (different versions, for instance) and a declarative system configuration where the system is determined from a configuration file.
Haunt uses Guile-Commonmark, and I don’t think we can use inline HTML
nor footnotes actually. A bit of a bummer, but maybe you can
approximate that with:
`/bin` containing binaries¹, …
and at the bottom:
¹ Blah.
It might be worth mentioning somewhere that the feature is included in
the just-released 1.4.0 now.
> +Here is a very simple example:
> +
> + $ guix shell --container --emulate-fhs coreutils -- ls /bin | head
> + [
> + b2sum
> + base32
> + base64
> + basename
> + basenc
> + cat
> + catchsegv
> + chcon
> + chgrp
Example examples in triple backquotes (i.e., ```), without extra
indentation.
> +[](guix-shell-fhs.gif)
The syntax is:

Note that the alt text is not shown unless one disables pictures or
hovers over the picture. So “Or, if you like […]” should probably be
written above the image.
You can test the web site with:
guix shell
and then:
export GUIX_WEB_SITE_LOCAL=y
haunt build
haunt serve
Should we publish it after Jan. 1st, since people are more likely to
miss it during the holiday season?
Thanks!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Tue, 03 Jan 2023 22:55:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 60112 <at> debbugs.gnu.org (full text, mbox):
Hello!
ludovic Courtès <ludo <at> gnu.org> skribis:
> Should we publish it after Jan. 1st, since people are more likely to
> miss it during the holiday season?
FWIW I think now would be a good time to publish. Lemme know if/when
you have time for those final touches!
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Tue, 03 Jan 2023 23:08:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 60112 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Tue, Jan 03, 2023 at 11:54 PM, Ludovic Courtès wrote:
> Hello!
>
> ludovic Courtès <ludo <at> gnu.org> skribis:
>
>> Should we publish it after Jan. 1st, since people are more likely to
>> miss it during the holiday season?
>
> FWIW I think now would be a good time to publish. Lemme know if/when
> you have time for those final touches!
>
Yes, I think now will be a good time. Sorry I didn't get to this earlier (some unfortunate urgent situations), but I did make most of the changes already. I think just the footnotes, or rewriting them into the text, is all that's left.
Is there anything else I should add, like other images or screen recordings? I think I'll quickly test and add the Tor browser example mentioned on the mailing list at least.
John
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Wed, 04 Jan 2023 10:32:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 60112 <at> debbugs.gnu.org (full text, mbox):
Hi!
John Kehayias <john.kehayias <at> protonmail.com> skribis:
> Yes, I think now will be a good time. Sorry I didn't get to this earlier (some unfortunate urgent situations), but I did make most of the changes already. I think just the footnotes, or rewriting them into the text, is all that's left.
Cool!
> Is there anything else I should add, like other images or screen recordings? I think I'll quickly test and add the Tor browser example mentioned on the mailing list at least.
The Tor Browser example would be nice. No other suggestions from me!
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Wed, 04 Jan 2023 17:44:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 60112 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
On Wed, Jan 04, 2023 at 11:31 AM, Ludovic Courtès wrote:
> The Tor Browser example would be nice. No other suggestions from me!
>
Added, with a slight tweak from the original mailing list message (and with credit given). The gcc:lib input is smaller than libgccjit and I believe the DISPLAY/XAUTHORITY sharing is more general (or at least works for me, the original related to GDM which I don't use).
From your previous comments:
On Mon, Dec 26, 2022 at 12:58 AM, Ludovic Courtès wrote:
>> +++ b/website/posts/guix-shell-fhs.md
>> @@ -0,0 +1,140 @@
>> +title: FHS Comes to Guix Containers
>
> Should we spell “FHS” out?
>
I did now, which is more descriptive and I don't think too long. I didn't include the (FHS) abbreviation though (we could).
>> +GNU Guix is different from most other GNU/Linux distributions and perhaps nowhere is
>> that more obvious than the organization of the filesystem: Guix does not conform to the
>> [Filesystem Hierarchy Standard](<https://refspecs.linuxfoundation.org/fhs.shtml>) (FHS).
>> In practical terms, this means there is no global `/lib` containing libraries, `/bin`
>> containing binaries,<sup><a id="fnr.1" class="footref" href="#fn.1"
>> role="doc-backlink">1</a></sup> and so on. This is very much at the core of how Guix
>> works and some of the convenient features, like per-user installation of programs
>> (different versions, for instance) and a declarative system configuration where the
>> system is determined from a configuration file.
>
> Haunt uses Guile-Commonmark, and I don’t think we can use inline HTML
> nor footnotes actually. A bit of a bummer, but maybe you can
> approximate that with:
>
> `/bin` containing binaries¹, …
>
> and at the bottom:
>
> ¹ Blah.
>
Ah. I did just that, no links to jump back and forth then. The second note I could just have as a parenthetical paragraph, but the first would be a bit cluttered. So I kept them both as notes, but I'm not attached to the style if we want to change it.
> It might be worth mentioning somewhere that the feature is included in
> the just-released 1.4.0 now.
>
Good idea, noted and linked to the release announcement post.
>> +Here is a very simple example:
>> +
>> + $ guix shell --container --emulate-fhs coreutils -- ls /bin | head
>> + [
>> + b2sum
>> + base32
>> + base64
>> + basename
>> + basenc
>> + cat
>> + catchsegv
>> + chcon
>> + chgrp
>
> Example examples in triple backquotes (i.e., ```), without extra
> indentation.
>
Fixed (guess the org exporter defaulted to a different style). I didn't see any change in appearance with marking all of these as 'sh' examples, but added that in case it is useful at some point.
>> +[](guix-shell-fhs.gif)
>
> The syntax is:
>
> 
>
> Note that the alt text is not shown unless one disables pictures or
> hovers over the picture. So “Or, if you like […]” should probably be
> written above the image.
>
Correct, that was supposed to be a caption or before the image. Fixed and added credit for the image.
> You can test the web site with:
>
> guix shell
>
> and then:
>
> export GUIX_WEB_SITE_LOCAL=y
> haunt build
> haunt serve
>
Thanks, that was handy.
Other than these fixes, adding the Tor Browser example, and some stylistic changes (added some links too), the content should be basically the same as the first version.
Happy to add/subtract anything and anything else if anyone has suggestions.
John
[0001-website-Add-post-about-guix-shell-fhs-option.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Wed, 04 Jan 2023 18:24:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 60112 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Slight tweak to the Tor Browser example and just using 'expose' rather than 'share' for XAUTHORITY, as discussed on guix-devel. I tested VSCodium and Tor with that last change and they opened just fine.
Also added a brief comment about the more minimal inputs for the Tor example and how one usually finds it (a lot of trial and error usually).
[0001-website-Add-post-about-guix-shell-fhs-option.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Wed, 04 Jan 2023 22:20:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 60112 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Thu, 05 Jan 2023 21:01:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 60112 <at> debbugs.gnu.org (full text, mbox):
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’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Thu, 05 Jan 2023 21:04:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 60112 <at> debbugs.gnu.org (full text, mbox):
On Thu, Jan 05, 2023 at 10:00 PM, Ludovic Courtès wrote:
> 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:
>
> $ 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#60112
; Package
guix-patches
.
(Fri, 06 Jan 2023 12:50:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 60112 <at> debbugs.gnu.org (full text, mbox):
Howdy,
John Kehayias <john.kehayias <at> protonmail.com> skribis:
> From 79eed4b16c56adbdfddd5f516c793599d54d8d4f Mon Sep 17 00:00:00 2001
> From: John Kehayias <john.kehayias <at> protonmail.com>
> Date: Fri, 16 Dec 2022 02:22:17 -0500
> Subject: [PATCH] website: Add post about guix shell fhs option.
>
> * website/posts/guix-shell-fhs.md: New file.
> website/static/blog/img/guix-shell-fhs.gif: New file.
Wonderful. It’s on-line now, spread the word!
https://guix.gnu.org/en/blog/2023/the-filesystem-hierarchy-standard-comes-to-guix-containers/
Thanks for your work and for your patience!
Ludo’.
bug closed, send any further explanations to
60112 <at> debbugs.gnu.org and John Kehayias <john.kehayias <at> protonmail.com>
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 06 Jan 2023 12:51:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 04 Feb 2023 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 189 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.