unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Chris Marusich <cmmarusich@gmail.com>
Cc: Andy Wingo <wingo@pobox.com>, guix-devel <guix-devel@gnu.org>
Subject: Re: Introducing ‘guix pack’
Date: Sun, 12 Mar 2017 17:56:05 +0100	[thread overview]
Message-ID: <87d1dm304a.fsf@gnu.org> (raw)
In-Reply-To: <87mvcred6y.fsf@gmail.com> (Chris Marusich's message of "Sat, 11 Mar 2017 13:05:57 -0800")

Hi Chris,

Chris Marusich <cmmarusich@gmail.com> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:

[...]

>> lrwxrwxrwx root/root         0 1970-01-01 01:00 ./gnu/store/ynafk7v924xil993dqbx4mxxnm9ifsi6-profile/bin/guild -> /gnu/store/62hqgi4cac0f70v1ycsvv985fl3l1hzr-guile-next-2.1.7/bin/guild
>
> Why does a relative path ./gnu/store/... point to an absolute path
> /gnu/store/...?  I would have thought it would be "relative to
> relative", or "absolute to absolute", not "relative to absolute".
> Perhaps I'm missing something.
>
> What is the expected method for extracting the tarball?  Can you 'cd' to
> any directory and run a command like 'tar -xf the_file', or does the
> current working directory have to be '/'?

The extraction method is supposed to be the same as for the Guix binary
tarball, since it’s exactly the same code:

  https://gnu.org/software/guix/manual/html_node/Binary-Installation.html

>> I’d like to move support for Docker (currently in ‘guix archive’) to
>> this new command because I think it’s more appropriate: ‘guix archive’
>> is supposed to be rather low-level so it would not create a profile, for
>> instance.
>
> My understanding is that one use case for this command is to make it
> easy to deploy software (and the closure of its dependencies) using
> Docker, in the case (maybe always? I'm not too familiar with Docker)
> where you cannot run Guix inside of the Docker instance.  If you could
> run Guix, I imagine you would not need this solution, since you could
> just install it via the usual Guix mechanisms (e.g., 'guix package -i
> foo').
>
> Another use case seems to be specifically the creation of a tarball
> containing Guix to enable a binary installation of it (you mentioned
> that was the inspiration for this feature).
>
> What other use cases do you imagine?  Is the intent to make it easy to
> deploy software (and the closure of its dependencies) to any place where
> you either can't or don't want to install Guix first?

The use case for ‘guix archive -f docker’ (which already exists; I’m
just proposing to move it to ‘guix pack’) is when you’d like to pass
software to someone who has Docker but not Guix:

  https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00048.html

I think the impetus for Ricardo was when the Emacs folks were discussing
of building Docker images of Emacs.  :-)

But I guess it’s not uncommon for people to have Docker and not Guix, as
sad as it may sound.  ;-)

>> (define* (self-contained-tarball name profile
>>                                  #:key deduplicate?)
>>   "Return a self-contained tarball containing a store initialized with the
>> closure of PROFILE, a derivation.  The tarball contains /gnu/store, /var/guix,
>> and PROFILE is available as /root/.guix-profile."
>
> Why is it necessary to include /var/guix?  I'm thinking about the case
> where you're using this to package something other than Guix, e.g., some
> other piece of software for deployment in a Docker instance.

FTR, this code was in (gnu system install) until now where it was used
to create the Guix standalone tarball.

For the Guix binary tarball, it’s important to have /var/guix with the
store database properly initialized and so on.

For other cases, it’s probably less useful.  We could make it optional.

>>           ;; Note: there is not much to gain here with deduplication and
>>           ;; there is the overhead of the '.links' directory, so turn it
>>           ;; off.
>>           (populate-single-profile-directory %root
>>                                              #:profile #$profile
>>                                              #:closure "profile"
>>                                              #:deduplicate? #f)
>
> When you say "there is not much to gain here," do you mean "it is
> unlikely that duplication will occur"?  If so, why is that true?

In the Guix binary tarball, there are few files present several times,
hence “not much to be gained.”  Back then I compared both and the
deduplicated version was about the same size as the other one, IIRC.

But again, for the more general case, I agree it would make sense to
have an option for this.

I’ve pushed ‘guix pack’ in commit
239c22663ac928618028c4ec03cefc77de788e9d (slightly improved version of
what I posted.)  Still many ways in which we can improve it!

The Docker backend requires a bit of thought because of the dependency
on libgcrypt and guile-json, which ‘gexp->derivation’ doesn’t yet handle
nicely.

Thanks for your feedback!

Ludo’.

  reply	other threads:[~2017-03-12 16:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10 21:50 Introducing ‘guix pack’ Ludovic Courtès
2017-03-10 23:43 ` Ricardo Wurmus
2017-03-11 21:05 ` Chris Marusich
2017-03-12 16:56   ` Ludovic Courtès [this message]
2017-03-12 23:03     ` Ricardo Wurmus
2017-03-13  7:44     ` Chris Marusich
2017-03-13 10:18 ` Andy Wingo
2017-03-14 13:42   ` Ludovic Courtès
2017-03-14 14:00     ` Andy Wingo
2017-03-14 17:02       ` Ludovic Courtès
2017-03-19 17:13         ` Federico Beffa
2017-03-19 22:56           ` Ludovic Courtès
2017-03-20  8:09             ` Federico Beffa
2017-03-20 14:14               ` Ludovic Courtès
2017-03-21 10:48                 ` Andy Wingo
2017-03-22  8:48                   ` Federico Beffa
2017-03-24  9:56                     ` Ludovic Courtès
2017-03-20 14:16               ` Ludovic Courtès
2017-03-20 15:16                 ` Alex Sassmannshausen
2017-03-16 22:28 ` Ludovic Courtès
2017-03-17 17:23   ` Pjotr Prins
2017-03-17 23:43     ` Ludovic Courtès
2017-03-17 23:49   ` Ludovic Courtès
2017-03-19 12:01     ` Jan Nieuwenhuizen
2017-03-20 14:20   ` Clément Lassieur
2017-03-20 15:14     ` Ricardo Wurmus
2017-03-20 15:41       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1dm304a.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).