[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: persistent reproducibility ?

From: Chris Marusich
Subject: Re: persistent reproducibility ?
Date: Thu, 23 Mar 2017 22:39:52 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

zimoun <address@hidden> writes:

> Maybe `archive' or `pack' already do the job ? Something able to pack
> at the source level all the necessary materials to reproduce from
> scratch a bit-identical environment.

What about using 'guix archive' in combination with the 'guix build
--sources=transitive' command?  The manual explains ((guix) Additional
Build Options), the "--sources=transitive" option means:

"Build the source derivations of all packages, as well of all transitive
inputs to the packages.  This can be used e.g.  to prefetch package
source for later offline building."

Here's an example for the GNU Hello package:

--8<---------------cut here---------------start------------->8---
$ guix build --sources=transitive hello
--8<---------------cut here---------------end--------------->8---

You could archive those sources for later importation into the store on
another system.  For example:

  guix archive --export \
    $(guix build --sources=transitive hello) > hello-transitive-source.nar

If you import that archive (with 'guix archive --import') and build it
using the same version of the package definitions, theoretically it
should build even if the sources are no longer available for download
from their specified origin locations.

You could even do more.  By using 'guix gc', you could also include all
of the store items which are required to run GNU Hello:

--8<---------------cut here---------------start------------->8---
$ guix gc --requisites $(guix build hello)
--8<---------------cut here---------------end--------------->8---

Combine those two commands, and you should be able to export an archive
which contains all the files necessary to run GNU Hello, in addition to
all the sources necessary to build GNU Hello reproducibly (provided that
GNU Hello builds reproducibly, and provided that you build it using the
same version of the package definitions):

  guix archive --export \
    $(guix gc --requisites $(guix build hello)) \
    $(guix build --sources=transitive hello) > hello-requisites-and-sources.nar

You would also have to trust the key that was used to sign the archive
in order to import it (see 'guix archive --authorize').

By the way, in case you were wondering, one reason why we don't put the
sources for every package into the Guix source tree is because that
would make the Guix source tree prohibitively large.  The transitive
closure of sources for GNU Hello alone weighs in at 1750 MiB (wow!) when
uncompressed.  And that's only for those specific versions of the source


reply via email to

[Prev in Thread] Current Thread [Next in Thread]