From: "Tomáš Čech" <sleep_walker@gnu.org>
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel@gnu.org
Subject: Re: ‘guix publish’ now compresses archives
Date: Thu, 21 Jul 2016 22:50:20 +0200 [thread overview]
Message-ID: <20160721205020.zg3hzpnklrg5hoeh@venom> (raw)
In-Reply-To: <87r3anedue.fsf@mdc-berlin.de>
[-- Attachment #1: Type: text/plain, Size: 5207 bytes --]
On Thu, Jul 21, 2016 at 07:53:45AM +0200, Ricardo Wurmus wrote:
>
>Tomáš Čech <sleep_walker@gnu.org> writes:
>
>> First, I'm not saying that we should do that for every archive, but I
>> think that having a way how to automatically export this information
>> would be great and I see it as a week point for using Guix packages as
>> alternative to Snappy or Flatpak.
>
>Agreed. I think it’s unfortunate that there is no step in between the
>purely symbolic and the purely binary method of sharing environments.
>
>> Now, as long as Guix sources are part of equation and change during
>> the time, you may need to keep more Guix versions. If there is some
>> stable not-changing core, you probably could eliminate the need.
>
>This is going to be virtually impossible. Users can change Guix
>locally. We cannot assume an immutable core.
Actually the condition can be this weak - there won't be any false
positives, it will only make preparing reproducible builds damn hard.
>Guix packages are code. Guix itself is mostly a library.
That again supports the point that the code closure could gather
package code only when the library will be stable and feature complete
(unchanging).
>> 1] I guess I should better explain my position. In the discussion on
>> social media I was explaining why it can't be used now for
>> self-containing packages and what is missing. My goal now on the
>> mailing list is here the discussion itself, to see whether it is
>> possible and whether are people interested in that.
>
>It *can* be used for self-contained packages. “guix archive --export”
>and “guix archive --import” is sufficient for people who come from the
>world of bundling. They can just take a binary archive that someone
>else exported from their store and import it into their store.
OK, you are right.
>It is not pretty and I wouldn’t do it, though, because I would always
>want to be able to build the exact same binaries myself, which I cannot
>do without the exact same version of Guix (this includes package
>expressions).
>
>> 2] I don't know much Guile, maybe there is nice way how to work with
>> Scheme program from Scheme program. If I should implement it, I'd need
>> to strictly "draw line" between package definitions and Guix itself,
>> then I would need to parse package definitions files to identify which
>> parts were used and ship those. Maybe you can get this information
>> during evaluation by some side effect. I don't know Guile enough, really.
>
>In Guix we don’t parse package definitions. Package definitions are
>code. A package expression is evaluated to a Scheme value. To compute
>the Scheme value one needs all the definitions that are used therein.
I'm aware of this. I'm not sure how lazy is evaluation in Guile but
interpreter knows every pieces of this information during the
execution.
If the interpreter can't share this information (and there are reasons
why not extend the language allowing querying the interpreter state
during the execution), it would need to be done with parser, that was
what I meant before (and yes, that wouldn't be elegant at all).
>And that’s the rest of Guix. Package expressions are a part of the code
>of Guix. The code used inside of package expressions may change as we
>encounter new problems that need to be addressed. You cannot treat
>package expressions as if they were apart from the rest of Guix.
I think I have to just accept that.
>If all you wanted was the names of all packages in a closure — that’s
>easy to obtain with Guix. Just recurse over the inputs.
That is apparently not enough.
>But to get just a subset of Guix that is used in a closure is futile.
>At the end all closures are rooted in bootstrap binaries, so it’s likely
>you need a big chunk of all the Guix library definitions. It’s easier
>to just include a copy of Guix itself.
Right. And in the end it is not that bad solution either (until you
need to use two versions of Guix at the same time).
>My point is that you cannot (currently?) do this after the fact for any
>store item you may want to export. You would have to embed the state of
>the Guix world at store-add time in the store items themselves. This
>can be done by adding the current state of Guix to the store itself and
>add it as an input to each store item. This seems very heavy-handed,
>though.
Right.
>If we agree that we don’t need to be able to extract the Guix state for
>*any* store item the problem is smaller and much easier to solve.
>Preparing a reproducible binary package would then only involve
>appending the current Guix state (including whatever Guix sees via
>GUIX_PACKAGE_PATH) as a source archive to the exported closure.
Yes, that sounds sufficiently complete and corresponds to intention -
not do that automatically, not to do that for all stores, but be able
to export information that when requested.
I'm afraid that in that case we'll never be able to easily combine two
or more exported closures together.
Thank you for your patience and input into this discussion.
Best regards,
S_W
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-07-21 20:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 22:22 ‘guix publish’ now compresses archives Ludovic Courtès
2016-07-19 6:29 ` Tomáš Čech
2016-07-19 10:03 ` Pjotr Prins
2016-07-19 13:15 ` Ludovic Courtès
2016-07-19 13:42 ` Tomáš Čech
2016-07-19 14:23 ` Ricardo Wurmus
2016-07-19 15:50 ` Tomáš Čech
2016-07-20 11:20 ` Ricardo Wurmus
2016-07-20 13:05 ` Tomáš Čech
2016-07-20 13:12 ` Thompson, David
2016-07-20 16:10 ` Tomáš Čech
2016-07-21 5:33 ` Ricardo Wurmus
2016-07-21 15:58 ` Thompson, David
2016-07-21 5:53 ` Ricardo Wurmus
2016-07-21 20:50 ` Tomáš Čech [this message]
2016-07-21 10:12 ` Andy Wingo
2016-07-21 12:43 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160721205020.zg3hzpnklrg5hoeh@venom \
--to=sleep_walker@gnu.org \
--cc=guix-devel@gnu.org \
--cc=ricardo.wurmus@mdc-berlin.de \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.