Acknowledgement sent
to Ludovic Courtès <ludo@gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches@gnu.org.
(Tue, 02 Jul 2019 08:38:02 GMT) (full text, mbox, link).
Subject: [PATCH 0/2] 'guix pack' records environment variables
Date: Tue, 2 Jul 2019 10:37:31 +0200
Hello Guix!
With these patches, images created by ‘guix pack -f docker’ or
‘guix pack -f singularity’ define the right environment variables
for the profile.
For instance, if you do:
guix pack -f docker guile guile-json --entry-point=bin/guile
Then:
docker run THE-IMAGE
will spawn Guile in an environment with $GUILE_LOAD_PATH pointing
to the profile, such that the (json) module is automatically found.
The change for Singularity is similar. I’ve tested it with an
instance of Singularity 3.2.0. Unfortunately, we still have 2.x
in Guix and that doesn’t quite support the environment file, so I’ve
chosen to punt on this one.
Thoughts?
Ludo’.
Ludovic Courtès (2):
pack: 'docker' backend records the profile's search paths.
pack: 'squashfs' backend records the profile's search paths.
gnu/tests/docker.scm | 16 ++++++----
gnu/tests/singularity.scm | 18 ++++++++++-
guix/docker.scm | 17 ++++++++---
guix/scripts/pack.scm | 64 ++++++++++++++++++++++++++++++++++++---
4 files changed, 99 insertions(+), 16 deletions(-)
--
2.22.0
Information forwarded
to guix-patches@gnu.org: bug#36469; Package guix-patches.
(Tue, 02 Jul 2019 08:57:02 GMT) (full text, mbox, link).
Subject: Re: [bug#36469] [PATCH 0/2] 'guix pack' records environment variables
Date: Tue, 2 Jul 2019 18:46:02 +0200
Hi,
That's awesome !
I have not tried the patch yet because I am not able to `git pull`
(issue with gnu.org NS and the network of my University, whatever!)
and my current version seems too old.
> The change for Singularity is similar. I’ve tested it with an
> instance of Singularity 3.2.0. Unfortunately, we still have 2.x
> in Guix and that doesn’t quite support the environment file, so I’ve
> chosen to punt on this one.
In `docker.scm` you replace %bootstrap-guile by guile-2.2, that's you
are talking about?
And now both `docker.scm` and `singularity.scm` are consistent to
guile-2.2 and there were not. :-)
Thank you again for the patch
simon
Information forwarded
to guix-patches@gnu.org: bug#36469; Package guix-patches.
(Thu, 04 Jul 2019 09:23:02 GMT) (full text, mbox, link).
Subject: Re: [bug#36469] [PATCH 0/2] 'guix pack' records environment variables
Date: Thu, 04 Jul 2019 11:22:12 +0200
Hi,
zimoun <zimon.toutoune@gmail.com> skribis:
> That's awesome !
Glad you like it!
>> The change for Singularity is similar. I’ve tested it with an
>> instance of Singularity 3.2.0. Unfortunately, we still have 2.x
>> in Guix and that doesn’t quite support the environment file, so I’ve
>> chosen to punt on this one.
>
> In `docker.scm` you replace %bootstrap-guile by guile-2.2, that's you
> are talking about?
No no, I was talking about Singularity 2.x, not Guile 2.x. :-)
Thanks for your feedback,
Ludo’.
Information forwarded
to guix-patches@gnu.org: bug#36469; Package guix-patches.
(Thu, 04 Jul 2019 11:15:01 GMT) (full text, mbox, link).
Subject: Re: [bug#36469] [PATCH 1/2] pack: 'docker' backend records the
profile's search paths.
Date: Thu, 04 Jul 2019 13:13:59 +0200
Ludovic Courtès <ludo@gnu.org> writes:
> * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]:
> Add example that expects (json) to be available.
This message here is clearer than the actual test. In the test all that
JSON stuff is really only there to test that (json) is available, right?
Maybe it’s worth adding a comment to the test itself.
> diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
> index c90b777222..bb6a8cda1a 100644
> --- a/guix/scripts/pack.scm
> +++ b/guix/scripts/pack.scm
> @@ -27,6 +27,7 @@
> #:use-module (guix utils)
> #:use-module (guix store)
> #:use-module ((guix status) #:select (with-status-verbosity))
> + #:use-module ((guix self) #:select (make-config.scm))
> #:use-module (guix grafts)
> #:autoload (guix inferior) (inferior-package?)
> #:use-module (guix monads)
> @@ -440,11 +441,24 @@ the image."
> (define build
> ;; Guile-JSON and Guile-Gcrypt are required by (guix docker).
> (with-extensions (list guile-json guile-gcrypt)
> - (with-imported-modules (source-module-closure '((guix docker)
> - (guix build store-copy))
> - #:select? not-config?)
> + (with-imported-modules `(((guix config) => ,(make-config.scm))
> + ,@(source-module-closure
> + `((guix docker)
> + (guix build store-copy)
> + (guix profiles)
> + (guix search-paths))
> + #:select? not-config?))
Woah, that “=>” thing is to generate a module dynamically? I hadn’t
seen this before. Nifty!
The rest of this commit looks good to me. Thanks for working on it!
--
Ricardo
Information forwarded
to guix-patches@gnu.org: bug#36469; Package guix-patches.
(Thu, 04 Jul 2019 11:19:02 GMT) (full text, mbox, link).
Subject: Re: [bug#36469] [PATCH 2/2] pack: 'squashfs' backend records the
profile's search paths.
Date: Thu, 04 Jul 2019 13:17:54 +0200
Ludovic Courtès <ludo@gnu.org> writes:
> From: Ludovic Courtès <ludovic.courtes@inria.fr>
>
> * guix/scripts/pack.scm (singularity-environment-file): New procedure.
> (squashfs-image): Use it, and create /.singularity/env/90-environment.sh.
> * gnu/tests/singularity.scm (run-singularity-test)["singularity run,
> with environment"]: New test, currently skipped.
> * gnu/tests/singularity.scm (build-tarball&run-singularity-test): Add
> GUILE-JSON to the profile.
This looks good to me.
I think it would be good to separate squashfs-image and singularity
going forward as we discussed earlier, but for now mixing the two is
fine.
Thanks!
--
Ricardo
Information forwarded
to guix-patches@gnu.org: bug#36469; Package guix-patches.
(Thu, 04 Jul 2019 15:07:02 GMT) (full text, mbox, link).
Subject: Re: [bug#36469] [PATCH 1/2] pack: 'docker' backend records the
profile's search paths.
Date: Thu, 04 Jul 2019 17:06:15 +0200
Ricardo Wurmus <rekado@elephly.net> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]:
>> Add example that expects (json) to be available.
>
> This message here is clearer than the actual test. In the test all that
> JSON stuff is really only there to test that (json) is available, right?
Yes, it ensures GUILE_LOAD_PATH is properly set.
> Maybe it’s worth adding a comment to the test itself.
Looks like it; I’ll add a comment.
Thank you!
Ludo’.
Information forwarded
to guix-patches@gnu.org: bug#36469; Package guix-patches.
(Thu, 04 Jul 2019 16:14:02 GMT) (full text, mbox, link).
Subject: Name of the Singularity/squashfs backend?
Date: Thu, 04 Jul 2019 18:12:43 +0200
Hi!
I’ve pushed these two patches, with an extra comment in the Docker test
as you suggested.
Ricardo Wurmus <rekado@elephly.net> skribis:
> I think it would be good to separate squashfs-image and singularity
> going forward as we discussed earlier, but for now mixing the two is
> fine.
So I was on the verge of renaming the ‘squashfs’ backend as a first
step, but I wasn’t sure about the name—naming is hard!
I thought about ‘singularity’, but that could be confused with SIF:
https://github.com/sylabs/sif
Then I thought about ‘singularity-squashfs’: it’s unambiguous but a bit
long.
Another option is the status quo since both ‘--help’ and the manual
mention Singularity.
WDYT?
Ludo’.
Added tag(s) fixed.
Request was from Ludovic Courtès <ludo@gnu.org>
to control@debbugs.gnu.org.
(Thu, 04 Jul 2019 16:14:02 GMT) (full text, mbox, link).
bug closed, send any further explanations to
36469@debbugs.gnu.org and Ludovic Courtès <ludo@gnu.org>
Request was from Ludovic Courtès <ludo@gnu.org>
to control@debbugs.gnu.org.
(Thu, 04 Jul 2019 16:14:02 GMT) (full text, mbox, link).
bug archived.
Request was from Debbugs Internal Request <help-debbugs@gnu.org>
to internal_control@debbugs.gnu.org.
(Fri, 02 Aug 2019 11:24:04 GMT) (full text, mbox, link).
Debbugs is free software and licensed under the terms of the
GNU Public License version 2. The current version can be
obtained from https://bugs.debian.org/debbugs-source/.