From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 19 17:53:09 2022 Received: (at submit) by debbugs.gnu.org; 19 Jul 2022 21:53:09 +0000 Received: from localhost ([127.0.0.1]:55364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDv9Q-0005ZQ-PP for submit@debbugs.gnu.org; Tue, 19 Jul 2022 17:53:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:44798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDv9N-0005ZH-Iy for submit@debbugs.gnu.org; Tue, 19 Jul 2022 17:53:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDv9N-0000bX-Du for guix-patches@gnu.org; Tue, 19 Jul 2022 17:53:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDv9M-0005Ej-5v; Tue, 19 Jul 2022 17:53:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=vDAYTCCbpI0Wh/VzfvIJguqSXVs6rlWahgdm/z9xBwM=; b=b6BeJevmQM0gXi X7ME2BBH9HhAz/6UTRxtakVUpP9CYPgHM7m6E7qnlG/XOUQ258nvOgDk09HA3r4b8XfGe44lxLSM8 iXNOj/HRpIOSzCrEcJvngJkS1DvHTREoeTm9cFvihsiZuHjrgBpDflhrosgybjHq6dUyHBWddSn+2 WNy13flnFJx/fGauOY1D25R2O3kQM+KBRXW4TXe+qzuVAzYbiibjveJ0twOE/M6PjeLYfaIA1MwSp VR5Tl8xi5xIYVLZtKQTD61nqQoaK7jWiqJtxgcVjnHtLYcKz+9hXr5gudqhyq9XvjQfOr4P+CUON0 z3F0ABCvXPjPOJMXKl6A==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:53614 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDv9L-0001a5-J7; Tue, 19 Jul 2022 17:53:03 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH] doc: Clarify "Replicating Guix" section. Date: Tue, 19 Jul 2022 23:52:50 +0200 Message-Id: <20220719215250.25467-1-ludo@gnu.org> X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: Ludovic Courtès * doc/guix.texi (Specifying Additional Channels): Replace 'guix pull --list-generations' example with 'guix describe'. (Replicating Guix): Rewrite to insist on 'guix describe', to include an example capturing channels and another one restoring them, and mention "lock files". --- doc/guix.texi | 65 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 25 deletions(-) Hi! I felt the “Replicating Guix” as it existed was unhelpful because it didn’t clearly show how to capture and restore channels, because it was biased towards ‘guix pull’ rather than ‘guix time-machine’, and because it was a bit too abstract. Thoughts? Ludo’. diff --git a/doc/guix.texi b/doc/guix.texi index d8a3d2e90c..85dfc55306 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5276,8 +5276,7 @@ but also the package modules from your own repository. The result in modules: @example -$ guix pull --list-generations -@dots{} +$ guix describe Generation 19 Aug 27 2018 16:20:48 guix d894ab8 repository URL: https://git.savannah.gnu.org/git/guix.git @@ -5287,16 +5286,13 @@ Generation 19 Aug 27 2018 16:20:48 repository URL: https://example.org/variant-packages.git branch: master commit: dd3df5e2c8818760a8fc0bd699e55d3b69fef2bb - 11 new packages: variant-gimp, variant-emacs-with-cool-features, @dots{} - 4 packages upgraded: emacs-racket-mode@@0.0.2-2.1b78827, @dots{} @end example @noindent -The output of @command{guix pull} above shows that Generation@tie{}19 includes -both Guix and packages from the @code{variant-personal-packages} channel. Among -the new and upgraded packages that are listed, some like @code{variant-gimp} and -@code{variant-emacs-with-cool-features} might come from -@code{variant-packages}, while others come from the Guix default channel. +The output of @command{guix describe} above shows that we're now running +Generation@tie{}19 and that it includes +both Guix and packages from the @code{variant-personal-packages} channel +(@pxref{Invoking guix describe}). @node Using a Custom Guix Channel @section Using a Custom Guix Channel @@ -5326,10 +5322,11 @@ addressed below (@pxref{Channel Authentication}). @cindex pinning, channels @cindex replicating Guix @cindex reproducibility, of Guix -The @command{guix pull --list-generations} output above shows precisely which -commits were used to build this instance of Guix. We can thus replicate it, -say, on another machine, by providing a channel specification in -@file{~/.config/guix/channels.scm} that is ``pinned'' to these commits: +The @command{guix describe} command shows precisely which commits were +used to build the instance of Guix we're using (@pxref{Invoking guix +describe}). We can replicate this instance on another machine or at a +different point in time by providing a channel specification ``pinned'' +to these commits that looks like this: @lisp ;; Deploy specific commits of my channels of interest. @@ -5343,18 +5340,36 @@ say, on another machine, by providing a channel specification in (commit "dd3df5e2c8818760a8fc0bd699e55d3b69fef2bb"))) @end lisp -The @command{guix describe --format=channels} command can even generate this -list of channels directly (@pxref{Invoking guix describe}). The resulting -file can be used with the @option{-C} option of @command{guix pull} -(@pxref{Invoking guix pull}) or @command{guix time-machine} -(@pxref{Invoking guix time-machine}). - -At this point the two machines run the @emph{exact same Guix}, with access to -the @emph{exact same packages}. The output of @command{guix build gimp} on -one machine will be exactly the same, bit for bit, as the output of the same -command on the other machine. It also means both machines have access to all -the source code of Guix and, transitively, to all the source code of every -package it defines. +To obtain this pinned channel specification, the easiest way is to run +@command{guix describe} and to save its output in the @code{channels} +format in a file, like so: + +@example +guix describe -f channels > channels.scm +@end example + +The resulting @file{channels.scm} file can be passed to the @option{-C} +option of @command{guix pull} (@pxref{Invoking guix pull}) or +@command{guix time-machine} (@pxref{Invoking guix time-machine}), as in +this example: + +@example +guix time-machine -C channels.scm -- shell python -- python3 +@end example + +Given the @file{channels.scm} file, the command above will always fetch +the @emph{exact same Guix instance}, then use that instance to run the +exact same Python (@pxref{Invoking guix shell}). On any machine, at any +time, it ends up running the exact same binaries, bit for bit. + +@cindex lock files +Pinned channels address a problem similar to ``lock files'' as +implemented by some deployment tools---they let you pin and reproduce a +set of packages. In the case of Guix though, you are effectively +pinning the entire package set as defined at the given channel commits; +in fact, you are pinning all of Guix, including its core modules and +command-line tools. You're also getting strong guarantees that you are, +indeed, obtaining the exact same software. This gives you super powers, allowing you to track the provenance of binary artifacts with very fine grain, and to reproduce software environments at base-commit: 22530b2645d64658e4b7dea8801f5604dfd395a0 -- 2.37.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 22 18:41:31 2022 Received: (at 56649-done) by debbugs.gnu.org; 22 Jul 2022 22:41:31 +0000 Received: from localhost ([127.0.0.1]:42684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oF1Kt-0004bB-Co for submit@debbugs.gnu.org; Fri, 22 Jul 2022 18:41:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oF1Kr-0004av-3t for 56649-done@debbugs.gnu.org; Fri, 22 Jul 2022 18:41:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oF1Kl-0004su-Tx for 56649-done@debbugs.gnu.org; Fri, 22 Jul 2022 18:41:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=xX/4TmsqAYAw2vzbg4QOiZGnHwxdIEsTqmTmbll4pLk=; b=qfryZsb9UBHKaN2ppX45 Cs/BJxTTPgDSPM+qsbrQ3ODsXG+qohSLatYmyTWZTXf3W6hyVyxMNtRxxprWgXJtrn/QICOCpRc0l v8H//Iv60rMzRm74U/+Pl5tyWbv1OBeklsVewDY3gpRwRHM+Y/4Bf8UpZg/1IuNhSzxXG7QYHvain J7MVhsW1T7ZXsul0AETVZxkHrYXgHU5mAvSlNFgpyifrperbjqWBxZxLM6b/zOZ8LpouL1aOrI3RI TDwmMsYGX1SOWmC7QzJDHXIZg9g4SkVoxM/2HrBGIdxy6d/MWYBXto+jLDwAEuFqiI5vDphCrCjXo RdvsIP4TCKHW+g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51392 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oF1Kj-00080C-Ar for 56649-done@debbugs.gnu.org; Fri, 22 Jul 2022 18:41:23 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 56649-done@debbugs.gnu.org Subject: Re: bug#56649: [PATCH] doc: Clarify "Replicating Guix" section. References: <20220719215250.25467-1-ludo@gnu.org> Date: Sat, 23 Jul 2022 00:41:20 +0200 In-Reply-To: <20220719215250.25467-1-ludo@gnu.org> ("Ludovic =?utf-8?Q?Cou?= =?utf-8?Q?rt=C3=A8s=22's?= message of "Tue, 19 Jul 2022 23:52:50 +0200") Message-ID: <8735esg48f.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56649-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s skribis: > From: Ludovic Court=C3=A8s > > * doc/guix.texi (Specifying Additional Channels): Replace 'guix pull > --list-generations' example with 'guix describe'. > (Replicating Guix): Rewrite to insist on 'guix describe', to include > an example capturing channels and another one restoring them, and > mention "lock files". Pushed as 6c42db835105ac6ec2fa786fd621d8d43ce0e45e. From unknown Sun Jun 22 11:48:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Aug 2022 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator