From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Oct 2019 14:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37978@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15723582718050 (code B ref -1); Tue, 29 Oct 2019 14:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Oct 2019 14:11:11 +0000 Received: from localhost ([127.0.0.1]:48427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPSDG-00025m-Nc for submit@debbugs.gnu.org; Tue, 29 Oct 2019 10:11:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:32900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPSDF-00025e-BN for submit@debbugs.gnu.org; Tue, 29 Oct 2019 10:11:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58835) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPSDC-00006w-N0 for guix-patches@gnu.org; Tue, 29 Oct 2019 10:11:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,SPOOFED_FREEMAIL,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPS5J-00036J-Jq for guix-patches@gnu.org; Tue, 29 Oct 2019 10:02:59 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48655) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iPS5I-00035r-Nt for guix-patches@gnu.org; Tue, 29 Oct 2019 10:02:57 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 21260217DD; Tue, 29 Oct 2019 10:02:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 29 Oct 2019 10:02:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm1; bh=2E1GIl9594m3wlk51NHCc7sodm YJJiQ6r/5fzOqj1AA=; b=TV4i/QkWyNta3MxEcuAEUhXmx0jlj5Lh6FIYWJX5go Bmg6+hUVrp84WJNmiWhGpGitLmY7ODpNj9tLGGt4c1+3z3rAfuDtDGnTLn/uN0cA UL//H+GTAzvOszIDsfGcr20SogyXoXWWM8f9q9hNfb7KCo1ytae5s+Es6cvL+twY 2AOVgrGJd+M80cCOmL95mkjZFU11HWN1RWrxEHg8sjpQrXkFQVwFwiDdroRYN5Co ZJDugFY8iUpEGWbmziP06aPIURNGoNlxOQXeUzyd9QwR0Ji6OLV9feH0E40JMAta qBsf5twDWtg4KYZEAQaYROn978Io2LvNOOShi6Ef/lDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=2E1GIl 9594m3wlk51NHCc7sodmYJJiQ6r/5fzOqj1AA=; b=saj1PhfK8Ozhq0sJBcznEi kgpJyIrIfzYMz6VUQykooLG2/1Z3VJikQfSzEurlKxUkJvkj6j4Gpp/4Ebz0C+7t qTVCT3ucPPYAkMZs5anPhgxdywlczgqW79zkdG78fX7NMa27xWIVE/ixSFRvfkA9 Jr77Ny9ciGJTtLD1bpsi+KSeGuKggJ1HN/UzFVf1s8xhAkTdFI0nBnlcgQX6eopg QI4RlIaQimUcOo+1IwBnehtsClqt9r/Cek3oLjmzQ660rJfCaR/E0GBkeFS1tUqN Kx0hxX0tDeDiW477hiLU5MWs7JsvaZYJiBpZFBlBXvo+WyPHcCOPpAXlanJpnFxg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddtuddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgfesthhqredttd dtjeenucfhrhhomhepmfhonhhrrgguucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhs vghnsehfrghsthhmrghilhdrnhgvtheqnecuffhomhgrihhnpehgnhhurdhorhhgnecukf hppeelvddrudeiledruddvjedrfeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkohhn rhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvthenucevlhhushhtvghrufhiii gvpedt X-ME-Proxy: Received: from ordinateur-de-catherine--konrad.home (lfbn-1-4129-33.w92-169.abo.wanadoo.fr [92.169.127.33]) by mail.messagingengine.com (Postfix) with ESMTPA id E2F9880059; Tue, 29 Oct 2019 10:02:53 -0400 (EDT) From: Konrad Hinsen Date: Fri, 25 Oct 2019 17:42:21 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.27 X-Spam-Score: 0.4 (/) 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: -2.6 (--) * guix/scripts/time-machine.scm: New file. * guix/scripts/pull.scm: Export function channel-list. * guix/inferior.scm: New function cached-guix-filetree-for-channels. * doc/guix.texi: Document "git time-machine" --- doc/guix.texi | 47 +++++++++++++++- guix/inferior.scm | 38 +++++++++---- guix/scripts/pull.scm | 1 + guix/scripts/time-machine.scm | 101 ++++++++++++++++++++++++++++++++++ 4 files changed, 174 insertions(+), 13 deletions(-) create mode 100644 guix/scripts/time-machine.scm diff --git a/doc/guix.texi b/doc/guix.texi index 7cc33c6e22..a147f16088 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -247,6 +247,7 @@ Utilities * Invoking guix container:: Process isolation. * Invoking guix weather:: Assessing substitute availability. * Invoking guix processes:: Listing client processes. +* Invoking guix time-machine:: Running an older version of Guix. =20 Invoking @command{guix build} =20 @@ -4142,7 +4143,10 @@ say, on another machine, by providing a channel spec= ification in @end lisp =20 The @command{guix describe --format=3Dchannels} command can even generate = this -list of channels directly (@pxref{Invoking guix describe}). +list of channels directly (@pxref{Invoking guix describe}). The resulting +file can be used with the -C options of @command{guix pull} +(@pxref{Invoking guix pull}) or @command{guix time-machine} +(@pxref{Invoking guix time-machine}). =20 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 @@ -7894,6 +7898,7 @@ the Scheme programming interface of Guix in a conveni= ent way. * Invoking guix container:: Process isolation. * Invoking guix weather:: Assessing substitute availability. * Invoking guix processes:: Listing client processes. +* Invoking guix time-machine:: Running an older version of Guix. @end menu =20 @node Invoking guix build @@ -10563,6 +10568,46 @@ ClientPID: 19419 ClientCommand: cuirass --cache-directory /var/cache/cuirass @dots{} @end example =20 +@node Invoking guix time-machine +@section Invoking @command{guix time-machine} + +@cindex @command{guix time-machine} +@cindex pinning, channels +@cindex replicating Guix +@cindex reproducibility, of Guix + +The @command{guix time-machine} command provides access to older +versions of Guix, for example to install older versions of packages, +or to reproduce a computation in an identical environment. The version +of Guix to be used is defined by a commit or by a channel +description file created by @command{guix describe} +(@pxref{Invoking guix describe}). + +The general syntax is: + +@example +guix time-machine @var{channels} -- @var{command} @var {arg}@dots{} +@end example + +where @var{command} and @var{arg}@dots{} are passed unmodified to the +@command{guix} command in its old version. The @var{channels} that define +this version can be specified using the following options: + +@table @code +@item --url=3D@var{url} +@itemx --commit=3D@var{commit} +@itemx --branch=3D@var{branch} +Use the @code{guix} channel from the specified @var{url}, at the +given @var{commit} (a valid Git commit ID represented as a hexadecimal +string), or @var{branch}. + +@item --channels=3D@var{file} +@itemx -C @var{file} +Read the list of channels from @var{file}. @var{file} must contain +Scheme code that evaluates to a list of channel objects. +@xref{Channels} for more information. +@end table + =20 @node System Configuration @chapter System Configuration diff --git a/guix/inferior.scm b/guix/inferior.scm index b8e2f21f42..cb80bb43d5 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -89,6 +89,7 @@ gexp->derivation-in-inferior =20 %inferior-cache-directory + cached-guix-filetree-for-channels inferior-for-channels)) =20 ;;; Commentary: @@ -635,16 +636,13 @@ failing when GUIX is too old and lacks the 'guix repl= ' command." (make-parameter (string-append (cache-directory #:ensure? #f) "/inferiors"))) =20 -(define* (inferior-for-channels channels - #:key - (cache-directory (%inferior-cache-director= y)) - (ttl (* 3600 24 30))) - "Return an inferior for CHANNELS, a list of channels. Use the cache at -CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This -procedure opens a new connection to the build daemon. - -This is a convenience procedure that people may use in manifests passed to -'guix package -m', for instance." +(define* (cached-guix-filetree-for-channels channels + #:key + (cache-directory (%inferior-ca= che-directory)) + (ttl (* 3600 24 30))) + "Return a directory containing a guix filetree defined by CHANNELS, a li= st of channels. +The directory is a subdirectory of CACHE-DIRECTORY, where entries can be r= eclaimed after TTL seconds. +This procedure opens a new connection to the build daemon." (with-store store (let () (define instances @@ -680,7 +678,7 @@ This is a convenience procedure that people may use in = manifests passed to (file-expiration-time ttl)) =20 (if (file-exists? cached) - (open-inferior cached) + cached (run-with-store store (mlet %store-monad ((profile (channel-instances->derivation instances)= )) @@ -689,4 +687,20 @@ This is a convenience procedure that people may use in= manifests passed to (built-derivations (list profile)) (symlink* (derivation->output-path profile) cached) (add-indirect-root* cached) - (return (open-inferior cached))))))))) + (return cached)))))))) + +(define* (inferior-for-channels channels + #:key + (cache-directory (%inferior-cache-director= y)) + (ttl (* 3600 24 30))) + "Return an inferior for CHANNELS, a list of channels. Use the cache at +CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This +procedure opens a new connection to the build daemon. + +This is a convenience procedure that people may use in manifests passed to +'guix package -m', for instance." + (define cached + (cached-guix-filetree-for-channels channels + #:cache-directory cache-directory + #:ttl ttl)) + (open-inferior cached)) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 80d070652b..a508e817b2 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -56,6 +56,7 @@ #:use-module (ice-9 vlist) #:use-module (ice-9 format) #:export (display-profile-content + channel-list guix-pull)) =20 diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm new file mode 100644 index 0000000000..8e954d51e1 --- /dev/null +++ b/guix/scripts/time-machine.scm @@ -0,0 +1,101 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2019 Konrad Hinsen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts time-machine) + #:use-module (guix ui) + #:use-module (guix scripts) + #:use-module (guix inferior) + #:use-module (guix channels) + #:use-module ((guix scripts pull) #:select (channel-list)) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-37) + #:export (guix-time-machine)) + + +;;; +;;; Command-line options. +;;; + +(define (show-help) + (display (G_ "Usage: guix time-machine [OPTION] -- COMMAND ARGS... +Execute COMMAND ARGS... in an older version of Guix.\n")) + (display (G_ " + -C, --channels=3DFILE deploy the channels defined in FILE")) + (display (G_ " + --url=3DURL use the Git repository at URL")) + (display (G_ " + --commit=3DCOMMIT use the specified COMMIT")) + (display (G_ " + --branch=3DBRANCH use the tip of the specified BRANCH")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specifications of the command-line options. + (list (option '(#\C "channels") #t #f + (lambda (opt name arg result) + (alist-cons 'channel-file arg result))) + (option '("url") #t #f + (lambda (opt name arg result) + (alist-cons 'repository-url arg + (alist-delete 'repository-url result)))) + (option '("commit") #t #f + (lambda (opt name arg result) + (alist-cons 'ref `(commit . ,arg) result))) + (option '("branch") #t #f + (lambda (opt name arg result) + (alist-cons 'ref `(branch . ,arg) result))) + (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix time-machine"))))) + +(define (parse-args args) + "Parse the list of command line arguments ARGS." + ;; The '--' token is used to separate the command to run from the rest of + ;; the operands. + (let-values (((args command) (break (cut string=3D? "--" <>) args))) + (let ((opts (parse-command-line args %options '(()) #:build-options? #= f))) + (match command + (() opts) + (("--") opts) + (("--" command ...) (alist-cons 'exec command opts)))))) + + +;;; +;;; Entry point. +;;; + +(define (guix-time-machine . args) + (with-error-handling + (let* ((opts (parse-args args)) + (channels (channel-list opts)) + (command-line (assoc-ref opts 'exec)) + (directory (cached-guix-filetree-for-channels channels)) + (executable (string-append directory "/bin/guix"))) + (apply system* (cons executable command-line))))) --=20 2.23.0 From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Nov 2019 13:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Konrad Hinsen Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.157304843217533 (code B ref 37978); Wed, 06 Nov 2019 13:54:01 +0000 Received: (at 37978) by debbugs.gnu.org; 6 Nov 2019 13:53:52 +0000 Received: from localhost ([127.0.0.1]:39602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSLkt-0004Yi-La for submit@debbugs.gnu.org; Wed, 06 Nov 2019 08:53:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSLkr-0004YS-7z for 37978@debbugs.gnu.org; Wed, 06 Nov 2019 08:53:49 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iSLkm-0000aO-0N; Wed, 06 Nov 2019 08:53:44 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52824 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iSLkk-0005Ln-6C; Wed, 06 Nov 2019 08:53:43 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Wed, 06 Nov 2019 14:53:40 +0100 In-Reply-To: (Konrad Hinsen's message of "Fri, 25 Oct 2019 17:42:21 +0200") Message-ID: <87y2wt3ycb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) 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 (---) Hello Konrad! Konrad Hinsen skribis: > * guix/scripts/time-machine.scm: New file. > * guix/scripts/pull.scm: Export function channel-list. > * guix/inferior.scm: New function cached-guix-filetree-for-channels. > * doc/guix.texi: Document "git time-machine" Awesome. :-) Please also add time-machine.scm to Makefile.am. In the commit log, you=E2=80=99ll get bonus points if you mention the modified entities in parentheses (see =E2=80=98git log=E2=80=99 for examples.) :-) > @@ -247,6 +247,7 @@ Utilities > * Invoking guix container:: Process isolation. > * Invoking guix weather:: Assessing substitute availability. > * Invoking guix processes:: Listing client processes. > +* Invoking guix time-machine:: Running an older version of Guix. How about moving this section a bit higher, because it=E2=80=99s more widely useful than =E2=80=98guix processes=E2=80=99 for instance? Actually, it co= uld go under =E2=80=9CPackage Management=E2=80=9D right before =E2=80=9CInferiors=E2=80= =9D, WDYT? > The @command{guix describe --format=3Dchannels} command can even generat= e this > -list of channels directly (@pxref{Invoking guix describe}). > +list of channels directly (@pxref{Invoking guix describe}). The resulting > +file can be used with the -C options of @command{guix pull} > +(@pxref{Invoking guix pull}) or @command{guix time-machine} > +(@pxref{Invoking guix time-machine}). Nitpick: Please write two spaces after an end-of-sentence period. > +The general syntax is: > + > +@example > +guix time-machine @var{channels} -- @var{command} @var {arg}@dots{} > +@end example I think it should be =E2=80=9Cguix time-machine @var{options}@dots{} -- =E2= =80=A6=E2=80=9D, right? IIUC, if you run: guix time-machine -- build hello you build =E2=80=9Chello=E2=80=9D with the latest master, right? Perhaps it would be good to add an example like this one actually, WDYT? > +where @var{command} and @var{arg}@dots{} are passed unmodified to the > +@command{guix} command in its old version. The @var{channels} that defi= ne > +this version can be specified using the following options: Perhaps add =E2=80=9Clike for @command{guix pull}=E2=80=9D. > -(define* (inferior-for-channels channels > - #:key > - (cache-directory (%inferior-cache-direct= ory)) > - (ttl (* 3600 24 30))) > - "Return an inferior for CHANNELS, a list of channels. Use the cache at > -CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This > -procedure opens a new connection to the build daemon. > - > -This is a convenience procedure that people may use in manifests passed = to > -'guix package -m', for instance." > +(define* (cached-guix-filetree-for-channels channels > + #:key > + (cache-directory (%inferior-= cache-directory)) > + (ttl (* 3600 24 30))) > + "Return a directory containing a guix filetree defined by CHANNELS, a = list of channels. > +The directory is a subdirectory of CACHE-DIRECTORY, where entries can be= reclaimed after TTL seconds. > +This procedure opens a new connection to the build daemon." How about (1) calling it =E2=80=98cached-channel-instance=E2=80=99 (or simi= lar), and (2) not opening a connection to the daemon? Regarding (2), it means that procedure would be a monadic procedure and it=E2=80=99s up to the user to do with-store + run-with-store or whatever. = The general convention is to not open new connections on behalf of the user (=E2=80=98inferior-for-channels=E2=80=99 is one of the only exceptions to t= he rule because it=E2=80=99s a convenience function for use in manifests.) Perhaps this change should be a separate patch. > +(define (guix-time-machine . args) > + (with-error-handling > + (let* ((opts (parse-args args)) > + (channels (channel-list opts)) > + (command-line (assoc-ref opts 'exec)) > + (directory (cached-guix-filetree-for-channels channels)) > + (executable (string-append directory "/bin/guix"))) > + (apply system* (cons executable command-line))))) I think this should be: (apply execl executable command-line) so that we don=E2=80=99t create an extra process and actually get the exit = code for that sub-process. Thanks, Ludo=E2=80=99. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Nov 2019 14:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37978@debbugs.gnu.org Cc: konrad.hinsen@fastmail.net X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Cc: Konrad Hinsen , 37978@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157305045921048 (code B ref -1); Wed, 06 Nov 2019 14:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Nov 2019 14:27:39 +0000 Received: from localhost ([127.0.0.1]:39669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSMHa-0005TQ-U2 for submit@debbugs.gnu.org; Wed, 06 Nov 2019 09:27:39 -0500 Received: from lists.gnu.org ([209.51.188.17]:43024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSMHW-0005T9-M7 for submit@debbugs.gnu.org; Wed, 06 Nov 2019 09:27:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58732) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSMHV-0008Ra-Ow for guix-patches@gnu.org; Wed, 06 Nov 2019 09:27:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSMHT-0001pr-VY for guix-patches@gnu.org; Wed, 06 Nov 2019 09:27:32 -0500 Received: from tobias.gr ([2001:470:7405::1]:45628) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iSMHT-0001ol-Bt for guix-patches@gnu.org; Wed, 06 Nov 2019 09:27:31 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id a9ccaaeb; Wed, 6 Nov 2019 14:27:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to:cc :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=Neyn0wiFgNyMAnmLUn7TgS 4i4jseEeVvbxnkO5pA5eQ=; b=kmnqh9ECZ+gXBGuZx9S7oL1AXEbgveI9zanGtu mpEDgUMHnXFgEFSO99IRYK8Syfly0FGW13omVVfcyRYCm2WevJ+2FCO7E0LP+Bsb qjM/dlPke1t3uXf3QTiUsoD173hq+YlgH7KPXSFEnUk0x1vt7yl/WzEeCVrxVtfH BuH13cWlQ6Y3cB4ziOO5sV9lOilpjzT5buSc8LvzYqaELDPUaVldOajjYl41wUGl jfWxbM8JtGzEXKR7vnOqUqGgt5y0cMe5IUyPsmYMjwBBAL9fwvMDcSzFGkFFtH6B NP8vg9hwOZI7jmtfAVq+CgKbJ5m6cY1REfod+6MeqwUTRFfQ== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 022b547f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 6 Nov 2019 14:27:27 +0000 (UTC) From: Tobias Geerinckx-Rice References: <87y2wt3ycb.fsf@gnu.org> In-reply-to: <87y2wt3ycb.fsf@gnu.org> Date: Wed, 06 Nov 2019 15:27:27 +0100 Message-ID: <87bltpulkg.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:470:7405::1 X-Spam-Score: -1.4 (-) 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: -2.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Konrad, Thank you! This is neat! Konrad Hinsen =E5=86=99=E9=81=93=EF=BC=9A > * doc/guix.texi: Document "git time-machine" ^^^ Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl3C2E8ACgkQ2Imw8BjF STzLgg//dgmwpbIoVhrxhlDFiVdoAliFoULIQLGGqwFMN/ntA4oh1ZLEYmupPwLW mmCwWC+0BUgp6o9DEwdzBsxD0htMc2KMU6/0A1lVRljwiMc8U3sAdwHYvT159zle Xrrod79bc6CHv5PKPfgL1ymdiZjRQYgoFVlc1Is78Z9k28xyNeF2BWw926gcn6gV 64smZDgrBzJ9x/b4Q3XtelbuR016Yr6tjreN4cayrcyLKJ8Is/NG/2ok4T3JPBj4 7Zw49lBY5FvXkUhvVo8PCKdkz8JevExvjLi4UDsqt9fZjgdlgzyy3eQd/hcVrEA6 i6+Be0QVwVHbuCCGHTOH5yTRm90dDeDDWxmND78KcECweUJm/11vi/I+JoFT3GMh /zWd1SHx139rFWfu8k9lc+tOVUT6X8x+lN/0cvG8P+rL3IZeCwfy81AgezPl99L4 gXaDqINvkd3nJiM/1ZVj5aB1/8m58YPhhnnyU35Ut0F8TaAfCV7Ai+p0MhRm8Pr8 T+g/JJBmddPu5GnMTNmCNWKQQAicDzAS54JUYMNqe73PImp8ENnBz401986y1z7E 4jHVWHOL+Q/x0V3X+KYgpVxC7T3YdlaBM4t+Oo5IO9uPDVa7Naf+3ietFlGKKoTr r0RPEr8VXouGvG5KM5wmi0OBJjSd1CXK/iSjoZihHtP3sRvtTlo= =nF7P -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Nov 2019 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Konrad Hinsen Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.157305062621400 (code B ref 37978); Wed, 06 Nov 2019 14:31:02 +0000 Received: (at 37978) by debbugs.gnu.org; 6 Nov 2019 14:30:26 +0000 Received: from localhost ([127.0.0.1]:39675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSMKI-0005Z4-Er for submit@debbugs.gnu.org; Wed, 06 Nov 2019 09:30:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSMKF-0005Yr-Ua for 37978@debbugs.gnu.org; Wed, 06 Nov 2019 09:30:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iSMKA-0003Ja-PC; Wed, 06 Nov 2019 09:30:18 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52834 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iSMK9-0004Lm-Lc; Wed, 06 Nov 2019 09:30:18 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y2wt3ycb.fsf@gnu.org> Date: Wed, 06 Nov 2019 15:30:16 +0100 In-Reply-To: <87y2wt3ycb.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 06 Nov 2019 14:53:40 +0100") Message-ID: <87lfst2i2v.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) 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 (---) Another thing that comes to mind: it=E2=80=99d be nice to add an entry in =E2=80=98etc/news.scm=E2=80=99 to let users know about the new command! Ludo=E2=80=99. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Nov 2019 13:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.15731323162741 (code B ref 37978); Thu, 07 Nov 2019 13:12:01 +0000 Received: (at 37978) by debbugs.gnu.org; 7 Nov 2019 13:11:56 +0000 Received: from localhost ([127.0.0.1]:41772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iShZs-0000i9-7C for submit@debbugs.gnu.org; Thu, 07 Nov 2019 08:11:56 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iShZp-0000hw-Pv for 37978@debbugs.gnu.org; Thu, 07 Nov 2019 08:11:54 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 9F7B120E7B; Thu, 7 Nov 2019 08:11:48 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 07 Nov 2019 08:11:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= 8Bp4SFJFqoQqdU9dfru+WD4hBH2Q8aUOcK+D0CfdXGQ=; b=cAJUkMm2tkpRws/l yRUcjA4X/R5eRse6M05LnaGMkVU1wTaMig3VYpknSSTNO8/2KF9IAwwiOYflLLNQ UHY/BWmqzmnogy40OodNkgoxtl75WmCvBfy3ZJ8Tc9rxBmOECOJfyBh82JjFMtl3 tC1thAS6b93CSfxHlS/vdhzg8bLYs0l/XWGUD0RztsY4tKrzfIAEvja/Gn06RGEK Skw7GdSV7FVU5eMEv0qr0GrCWhCkBpGvGzzdacbCAPDo6ua8a/EwvbcXBcBq545V EkmrRCK2d9vECx4UMjCMGe9hGOfJjftJfKQFqy2mXQwEGGW509tquH/tMvIZ7jDS i1TgNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=8Bp4SFJFqoQqdU9dfru+WD4hBH2Q8aUOcK+D0CfdX GQ=; b=QtBbmA9lIgjYvs90uFnGQZr8YeEiZ4UGvFMbkIX+LsD27CGkFnheawYST 510+4tfmHuGFFXixygB44Bl2Vl0e3Xc1udWB1aw4LKltu/pjJPNaYyKk6UcRcvSc tX/fJZJMNniswUjC5ohATH0rhiDkaPv1XIMsalf2H6WnS42Ry9/hOg11NNXQtZmg G6QHItZtYR9Q4Gi0aW0jM+ohdiIYhGcNP7G/sEJZ2MuqguTwBucwDyH9uU4PKU6Q KvyE624c5tVLIY2czw4tZq9QjYK0xbcmj1sn1OLJqOG6cazi0PCdfnjpG4xyoAwB 8tN+4/13iXtxUNTPSStdRFPLB0uZg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudduledggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffffkgggtgfesthhqre dttddtjeenucfhrhhomhepmfhonhhrrgguucfjihhnshgvnhcuoehkohhnrhgrugdrhhhi nhhsvghnsehfrghsthhmrghilhdrnhgvtheqnecukfhppeelvddrudeiledrjedruddtud enucfrrghrrghmpehmrghilhhfrhhomhepkhhonhhrrggurdhhihhnshgvnhesfhgrshht mhgrihhlrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from ordinateur-de-catherine--konrad.home (lfbn-1-4320-101.w92-169.abo.wanadoo.fr [92.169.7.101]) by mail.messagingengine.com (Postfix) with ESMTPA id 7C0A4306005B; Thu, 7 Nov 2019 08:11:47 -0500 (EST) From: Konrad Hinsen In-Reply-To: <87bltpulkg.fsf@nckx> References: <87y2wt3ycb.fsf@gnu.org> <87bltpulkg.fsf@nckx> Date: Thu, 07 Nov 2019 14:11:46 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: -1.7 (-) Tobias Geerinckx-Rice writes: > Konrad Hinsen =E5=86=99=E9=81=93=EF=BC=9A >> * doc/guix.texi: Document "git time-machine" > ^^^ Ouch. That's me. I always confuse "git" and "guix" on the command line. It's worst for "pull", which works with both. Is command-line dyslexia a thing already ? ;-) Thanks for spotting the typo, Konrad. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Nov 2019 19:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.157315564527166 (code B ref 37978); Thu, 07 Nov 2019 19:41:01 +0000 Received: (at 37978) by debbugs.gnu.org; 7 Nov 2019 19:40:45 +0000 Received: from localhost ([127.0.0.1]:43933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSne9-000746-8e for submit@debbugs.gnu.org; Thu, 07 Nov 2019 14:40:45 -0500 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:43667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSne7-00073u-Lg for 37978@debbugs.gnu.org; Thu, 07 Nov 2019 14:40:44 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id B70D0429; Thu, 7 Nov 2019 14:40:37 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 07 Nov 2019 14:40:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= tiVJD/epKd4WF9GhKwKJqFcZi3m2Na0vFwu39xyQa7w=; b=hxMZL3pYjKgNn9wn HwzuIZkY4ZM656wJSFSdu9+p2SzOMUei095ek2WcCFw8EcWs/unCEianwrz+s7Rg dEKvzZhA2DFxT5T5IbmuMep8XGuWMkPcWgCaj0l8oCOIHaaYTuqK5Ixnyt4GPNtQ pU84Zba3yi8GrKbyYx8tmfZktPzti/OHBxHGF3BOzLJlVA8Iq5M5RpkJTFnOUNM7 ILsGmS+rIGeLyBtqjN0m8CM3pVr0VF5eV4WrYaHzCF8O5S4be4aCDcZ9JLdHJj6a 6xvVW2LDn25UBIknQmsD0PO/QrtPslFdpFsjvBZed4zXCle8Ci1AdVCCZGtnbWLb UY9JHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=tiVJD/epKd4WF9GhKwKJqFcZi3m2Na0vFwu39xyQa 7w=; b=PcM4iXkOVtQcaNWQjTLJZP8ETCXaLJKGg79BNXGIMRFvGbxRq2KgzmM8H EuLxIzJqtOaRTGG/qfg30q4H9uZmywBDYpPf8ua+kQVUYk42z3itsq/0FIwl0e8F QJVPrdV4zVlEqjkxoojAIIqX26rYirqNQ9Rj8+gkUJOhoYlf9S6VJqRVojvxJYZh opm2xuUuqqzGU/ho1kxCCrS1Cy5bP9U2nT6XnFIvYqgeBIeFPy7voBeTfeHnixW7 wusEqk6TFHgDpQsrahBgoTW4w/gFtoWt6+UF8AxiaKdEIcDYdQ2ekpjMlAPd4Q4R I3LXbmX4fzt75TcG4bwrx2cFvFJLA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudduledguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffffkgggtgfesthhqredttddtjeenucfhrhhomhepmfhonhhr rgguucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnh gvtheqnecukfhppeelvddrudeiledrjedruddtudenucfrrghrrghmpehmrghilhhfrhho mhepkhhonhhrrggurdhhihhnshgvnhesfhgrshhtmhgrihhlrdhnvghtnecuvehluhhsth gvrhfuihiivgeptd X-ME-Proxy: Received: from khs-macbook.home (lfbn-1-4320-101.w92-169.abo.wanadoo.fr [92.169.7.101]) by mail.messagingengine.com (Postfix) with ESMTPA id 9A37B306005F; Thu, 7 Nov 2019 14:40:36 -0500 (EST) From: Konrad Hinsen In-Reply-To: <87lfst2i2v.fsf@gnu.org> References: <87y2wt3ycb.fsf@gnu.org> <87lfst2i2v.fsf@gnu.org> Date: Thu, 07 Nov 2019 20:40:35 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: -1.7 (-) Ludovic Court=C3=A8s writes: > Another thing that comes to mind: it=E2=80=99d be nice to add an entry in > =E2=80=98etc/news.scm=E2=80=99 to let users know about the new command! If I understand the format correctly, I can't write this entry before the command is merged into master, because I need the commit that implements it. Konrad. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Nov 2019 21:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Konrad Hinsen Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.15731610633692 (code B ref 37978); Thu, 07 Nov 2019 21:12:02 +0000 Received: (at 37978) by debbugs.gnu.org; 7 Nov 2019 21:11:03 +0000 Received: from localhost ([127.0.0.1]:44003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSp3W-0000xN-37 for submit@debbugs.gnu.org; Thu, 07 Nov 2019 16:11:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSp3T-0000wt-T5 for 37978@debbugs.gnu.org; Thu, 07 Nov 2019 16:11:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iSp3O-0004BV-P4; Thu, 07 Nov 2019 16:10:54 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38844 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iSp3N-0004yh-WB; Thu, 07 Nov 2019 16:10:54 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y2wt3ycb.fsf@gnu.org> <87lfst2i2v.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Brumaire an 228 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 07 Nov 2019 22:10:52 +0100 In-Reply-To: (Konrad Hinsen's message of "Thu, 07 Nov 2019 20:40:35 +0100") Message-ID: <874kzfmlyb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) 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 (---) Konrad Hinsen skribis: > Ludovic Court=C3=A8s writes: > >> Another thing that comes to mind: it=E2=80=99d be nice to add an entry in >> =E2=80=98etc/news.scm=E2=80=99 to let users know about the new command! > > If I understand the format correctly, I can't write this entry before > the command is merged into master, because I need the commit that > implements it. Exactly, so whoever pushes it must adjust the commit ID in the news entry right before pushing. You can just write (commit "XXX") in the meantime. Ludo=E2=80=99. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2019 07:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.15731972529195 (code B ref 37978); Fri, 08 Nov 2019 07:15:02 +0000 Received: (at 37978) by debbugs.gnu.org; 8 Nov 2019 07:14:12 +0000 Received: from localhost ([127.0.0.1]:44528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSyTE-0002OF-HN for submit@debbugs.gnu.org; Fri, 08 Nov 2019 02:14:12 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:46609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSyTC-0002O2-6q for 37978@debbugs.gnu.org; Fri, 08 Nov 2019 02:14:10 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 1FF24213F4; Fri, 8 Nov 2019 02:14:05 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 08 Nov 2019 02:14:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= Q5olkviE1tAVPqfD66KJAuDBTjn5YqwYkE6FeVCwu3w=; b=QaQAUfdZwYy/Y5JT nm46OYZdIuD4FC4WBbZk03D+Wd4S94UYxEqnLLxUd7bTHDG1jMGzCMKN4feO3mFr gTpe6GFAYB49Enl3yUfer9wwzVK77ncSP7PjVKAnWVNWhPTvnvtD5Fv6PtqF31dp Hh6gZNSITaK9ueH0IQ5Y7Vd8JsDThTCpubdzS/QUjnDanJEDxEQqYUXchL5XDsVx pCsfIKNqpSqKBsC1/mR+QtWFauto24Kan8D4+vcUm9Qy1fPrvIyQk370a9K9E44m XTIP8G+FLXgi2EcM0iYbi7NYzSTu3Yo3EbXDqN10aDGmuYctM1VtNeroNIZ4VyzE l2G/tA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Q5olkviE1tAVPqfD66KJAuDBTjn5YqwYkE6FeVCwu 3w=; b=NSkNKKRDuUxrEFVWYGlrmtS3xzn4lIsAH1E+4drJyLDMtcT6wmeS1Wxo1 aKz8BQA7wW6bFUPV/5azfM4iw8jWFRNV2V7KSrvKo5KLDCvV3u/L+wLQOeuT2J+i qn3437GEKeREkFjMeMUHlOtswACdG95clK42GnVMiM3vU3EuNbh+EQnqI67ls+4K Dn6aTWZrQuZK9nY2pXCAhbyO9T9sQnQC0v40Fdr6fUli6dhHIwN1ahB+Pbeaxbyy 4U6etMZ1cf1hSKGQpXMXXDo5tUGlEFxXH5/5XM2JIsbHbKxOY5d5rXmXVRDm6p3r jf2McKLtef9xYCrEP+EkoXwdSwrEw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvtddguddtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffffkgggtgfesthhqredttddtjeenucfhrhhomhepmfhonhhr rgguucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnh gvtheqnecukfhppeelvddrudeiledrjedruddtudenucfrrghrrghmpehmrghilhhfrhho mhepkhhonhhrrggurdhhihhnshgvnhesfhgrshhtmhgrihhlrdhnvghtnecuvehluhhsth gvrhfuihiivgeptd X-ME-Proxy: Received: from ordinateur-de-catherine--konrad.home (lfbn-1-4320-101.w92-169.abo.wanadoo.fr [92.169.7.101]) by mail.messagingengine.com (Postfix) with ESMTPA id 565288005A; Fri, 8 Nov 2019 02:14:04 -0500 (EST) From: Konrad Hinsen In-Reply-To: <87y2wt3ycb.fsf@gnu.org> References: <87y2wt3ycb.fsf@gnu.org> Date: Fri, 08 Nov 2019 08:14:03 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: -1.7 (-) Hi Ludo, Thanks for your detailed comments, most of which I agree with, and I will make the required changes. There is one issue I see: > How about (1) calling it =E2=80=98cached-channel-instance=E2=80=99 (or si= milar), and (2) > not opening a connection to the daemon? > > Regarding (2), it means that procedure would be a monadic procedure and > it=E2=80=99s up to the user to do with-store + run-with-store or whatever= . The That would imply that the user always opens a daemon, even if it is not necessary because the required instance is already in the cache. Is that a price worth paying for a more conventional interface, in your opinion? Cheers, Konrad. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 1/2] guix: new command "guix time-machine" In-Reply-To: Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2019 14:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.15732224382317 (code B ref 37978); Fri, 08 Nov 2019 14:14:02 +0000 Received: (at 37978) by debbugs.gnu.org; 8 Nov 2019 14:13:58 +0000 Received: from localhost ([127.0.0.1]:45080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT51R-0000bI-Gw for submit@debbugs.gnu.org; Fri, 08 Nov 2019 09:13:58 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:45179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT51P-0000b1-GQ for 37978@debbugs.gnu.org; Fri, 08 Nov 2019 09:13:56 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 3934520E54 for <37978@debbugs.gnu.org>; Fri, 8 Nov 2019 09:13:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 08 Nov 2019 09:13:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:references:date:message-id:mime-version :content-type:content-transfer-encoding; s=fm1; bh=xocAY2LR08VvX nEXTFF1YJ3RiGNs+9GZCL8RTuj4k5Y=; b=mthMIy9Iqp6og0+hhJh376O3ooi/x ntwvJww3q/wwgj00YQfaq/A3PWAU/hyHVCUyV8+Q5s7RJ+4kgevpYtUXqKhpVPqc rdcmZYtQIqj168crWj7Ig6Y+S9RYaw2cC9mQEN/W9mnmPaXfUZXvwEfots8SSoTw h7piEaBXvHokFmlebdgHCxgLBfAbtk4Mz7pkJi/Xjd3lFSIgTdxyjsuHJhCRRx7w eWrhkLjJTSN/zQ1fWimhHL63dI+z0P3dFIDkS4+bMF2TJ+yryncFiQjjtWccSdFm le5D1vL2+o8eotmZwZbZ7KbK5I6ZSOIxSk9cbfFXH4SFe3xv5cX+aJegA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=xocAY2LR08VvXnEXTFF1YJ3RiGNs+9GZCL8RTuj4k5Y=; b=sgP8q8ZA z1Qx8hwqa6poH1qkTxBy6sjeXysfzztUs+0dHg2PJU70XPV8mJOvBId13ikVLsx5 8RL1pZ0aBqDwjxqc17BE+5nLl8YXhcCo5EXkCU2pzTBiqUcXX65LVL40xPg+yoA5 4b8MmlymKR6G9SNJ9sxiMKJ5pd2uG9vElC9R/Sk14zF7EYZ0suFREhxEa7mx5GEs QoPudNK1F1LAoyulmhSixnxJS4g5nxz+Zwz04Gvv/xePnAKhRMf5yxExZ5bKNICL FdJGAtC/7jI4C7vx5mkYhFNt5ll7E8fvRgaKQGfkwLnc5ccala+1nsRR3Bz4ab0Y R1qgSv6aLFzx3g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvuddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufhffkfggtgfgsehtqhertd dttdejnecuhfhrohhmpefmohhnrhgrugcujfhinhhsvghnuceokhhonhhrrggurdhhihhn shgvnhesfhgrshhtmhgrihhlrdhnvghtqeenucffohhmrghinhepghhnuhdrohhrghenuc fkphepudelhedrvddvuddrtddrvddtieenucfrrghrrghmpehmrghilhhfrhhomhepkhho nhhrrggurdhhihhnshgvnhesfhgrshhtmhgrihhlrdhnvghtnecuvehluhhsthgvrhfuih iivgeptd X-ME-Proxy: Received: from KHs-MacBook.local (soleil-ext.synchrotron-soleil.fr [195.221.0.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 5719A8005C for <37978@debbugs.gnu.org>; Fri, 8 Nov 2019 09:13:49 -0500 (EST) From: Konrad Hinsen References: <87y2wt3ycb.fsf@gnu.org> Date: Fri, 08 Nov 2019 15:13:48 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: -1.7 (-) * guix/scripts/time-machine.scm: New file. * Makefile.am: (MODULES): Add it. * guix/scripts/pull.scm: Export function channel-list. * guix/inferior.scm: New function cached-guix-filetree-for-channels. * doc/guix.texi: Document "guix time-machine" --- Makefile.am | 1 + doc/guix.texi | 59 +++++++++++++++++++- guix/inferior.scm | 38 +++++++++---- guix/scripts/pull.scm | 1 + guix/scripts/time-machine.scm | 102 ++++++++++++++++++++++++++++++++++ 5 files changed, 187 insertions(+), 14 deletions(-) create mode 100644 guix/scripts/time-machine.scm diff --git a/Makefile.am b/Makefile.am index b1f33946c5..b3f03d44c8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -278,6 +278,7 @@ MODULES =3D \ guix/scripts/container.scm \ guix/scripts/container/exec.scm \ guix/scripts/deploy.scm \ + guix/scripts/time-machine.scm \ guix.scm \ $(GNU_SYSTEM_MODULES) =20 diff --git a/doc/guix.texi b/doc/guix.texi index 3b8e5935bb..3d4192cab2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -197,6 +197,7 @@ Package Management * Invoking guix gc:: Running the garbage collector. * Invoking guix pull:: Fetching the latest Guix and distribution. * Channels:: Customizing the package collection. +* Invoking guix time-machine:: Running an older revision of Guix. * Inferiors:: Interacting with another revision of Guix. * Invoking guix describe:: Display information about your Guix revisi= on. * Invoking guix archive:: Exporting and importing store files. @@ -2548,6 +2549,7 @@ guix install emacs-guix * Invoking guix gc:: Running the garbage collector. * Invoking guix pull:: Fetching the latest Guix and distribution. * Channels:: Customizing the package collection. +* Invoking guix time-machine:: Running an older revision of Guix. * Inferiors:: Interacting with another revision of Guix. * Invoking guix describe:: Display information about your Guix revisi= on. * Invoking guix archive:: Exporting and importing store files. @@ -4150,7 +4152,10 @@ say, on another machine, by providing a channel spec= ification in @end lisp =20 The @command{guix describe --format=3Dchannels} command can even generate = this -list of channels directly (@pxref{Invoking guix describe}). +list of channels directly (@pxref{Invoking guix describe}). The resulting +file can be used with the -C options of @command{guix pull} +(@pxref{Invoking guix pull}) or @command{guix time-machine} +(@pxref{Invoking guix time-machine}). =20 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 @@ -4164,6 +4169,57 @@ artifacts with very fine grain, and to reproduce sof= tware environments at will---some sort of ``meta reproducibility'' capabilities, if you will. @xref{Inferiors}, for another way to take advantage of these super powers. =20 +@node Invoking guix time-machine +@section Invoking @command{guix time-machine} + +@cindex @command{guix time-machine} +@cindex pinning, channels +@cindex replicating Guix +@cindex reproducibility, of Guix + +The @command{guix time-machine} command provides access to other +revisions of Guix, for example to install older versions of packages, +or to reproduce a computation in an identical environment. The revision +of Guix to be used is defined by a commit or by a channel +description file created by @command{guix describe} +(@pxref{Invoking guix describe}). + +The general syntax is: + +@example +guix time-machine @var{options}@dots{} -- @var{command} @var {arg}@dots{} +@end example + +where @var{command} and @var{arg}@dots{} are passed unmodified to the +@command{guix} command if the specified revision. The @var{options} that = define +this revision are the same as for @command{guix pull} (@pxref{Invoking gui= x pull}): + +@table @code +@item --url=3D@var{url} +@itemx --commit=3D@var{commit} +@itemx --branch=3D@var{branch} +Use the @code{guix} channel from the specified @var{url}, at the +given @var{commit} (a valid Git commit ID represented as a hexadecimal +string), or @var{branch}. + +@item --channels=3D@var{file} +@itemx -C @var{file} +Read the list of channels from @var{file}. @var{file} must contain +Scheme code that evaluates to a list of channel objects. +@xref{Channels} for more information. +@end table + +As for @command{guix pull}, the absence of any options means that the +the latest commit on the master branch will be used. The command + +@example +guix time-machine -- build hello +@end example + +will thus build the package @code{hello} as defined in the master branch, +which is in general a newer revison of Guix than you have installed. +Time travel works in both directions! + @node Inferiors @section Inferiors =20 @@ -10582,7 +10638,6 @@ ClientPID: 19419 ClientCommand: cuirass --cache-directory /var/cache/cuirass @dots{} @end example =20 - @node System Configuration @chapter System Configuration =20 diff --git a/guix/inferior.scm b/guix/inferior.scm index b8e2f21f42..cb80bb43d5 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -89,6 +89,7 @@ gexp->derivation-in-inferior =20 %inferior-cache-directory + cached-guix-filetree-for-channels inferior-for-channels)) =20 ;;; Commentary: @@ -635,16 +636,13 @@ failing when GUIX is too old and lacks the 'guix repl= ' command." (make-parameter (string-append (cache-directory #:ensure? #f) "/inferiors"))) =20 -(define* (inferior-for-channels channels - #:key - (cache-directory (%inferior-cache-director= y)) - (ttl (* 3600 24 30))) - "Return an inferior for CHANNELS, a list of channels. Use the cache at -CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This -procedure opens a new connection to the build daemon. - -This is a convenience procedure that people may use in manifests passed to -'guix package -m', for instance." +(define* (cached-guix-filetree-for-channels channels + #:key + (cache-directory (%inferior-ca= che-directory)) + (ttl (* 3600 24 30))) + "Return a directory containing a guix filetree defined by CHANNELS, a li= st of channels. +The directory is a subdirectory of CACHE-DIRECTORY, where entries can be r= eclaimed after TTL seconds. +This procedure opens a new connection to the build daemon." (with-store store (let () (define instances @@ -680,7 +678,7 @@ This is a convenience procedure that people may use in = manifests passed to (file-expiration-time ttl)) =20 (if (file-exists? cached) - (open-inferior cached) + cached (run-with-store store (mlet %store-monad ((profile (channel-instances->derivation instances)= )) @@ -689,4 +687,20 @@ This is a convenience procedure that people may use in= manifests passed to (built-derivations (list profile)) (symlink* (derivation->output-path profile) cached) (add-indirect-root* cached) - (return (open-inferior cached))))))))) + (return cached)))))))) + +(define* (inferior-for-channels channels + #:key + (cache-directory (%inferior-cache-director= y)) + (ttl (* 3600 24 30))) + "Return an inferior for CHANNELS, a list of channels. Use the cache at +CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This +procedure opens a new connection to the build daemon. + +This is a convenience procedure that people may use in manifests passed to +'guix package -m', for instance." + (define cached + (cached-guix-filetree-for-channels channels + #:cache-directory cache-directory + #:ttl ttl)) + (open-inferior cached)) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 92aac6066e..d6173a6acb 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -56,6 +56,7 @@ #:use-module (ice-9 vlist) #:use-module (ice-9 format) #:export (display-profile-content + channel-list guix-pull)) =20 diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm new file mode 100644 index 0000000000..bc7ae573a3 --- /dev/null +++ b/guix/scripts/time-machine.scm @@ -0,0 +1,102 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2019 Konrad Hinsen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts time-machine) + #:use-module (guix ui) + #:use-module (guix scripts) + #:use-module (guix inferior) + #:use-module (guix channels) + #:use-module ((guix scripts pull) #:select (channel-list)) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-37) + #:export (guix-time-machine)) + + +;;; +;;; Command-line options. +;;; + +(define (show-help) + (display (G_ "Usage: guix time-machine [OPTION] -- COMMAND ARGS... +Execute COMMAND ARGS... in an older version of Guix.\n")) + (display (G_ " + -C, --channels=3DFILE deploy the channels defined in FILE")) + (display (G_ " + --url=3DURL use the Git repository at URL")) + (display (G_ " + --commit=3DCOMMIT use the specified COMMIT")) + (display (G_ " + --branch=3DBRANCH use the tip of the specified BRANCH")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specifications of the command-line options. + (list (option '(#\C "channels") #t #f + (lambda (opt name arg result) + (alist-cons 'channel-file arg result))) + (option '("url") #t #f + (lambda (opt name arg result) + (alist-cons 'repository-url arg + (alist-delete 'repository-url result)))) + (option '("commit") #t #f + (lambda (opt name arg result) + (alist-cons 'ref `(commit . ,arg) result))) + (option '("branch") #t #f + (lambda (opt name arg result) + (alist-cons 'ref `(branch . ,arg) result))) + (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix time-machine"))))) + +(define (parse-args args) + "Parse the list of command line arguments ARGS." + ;; The '--' token is used to separate the command to run from the rest of + ;; the operands. + (let-values (((args command) (break (cut string=3D? "--" <>) args))) + (let ((opts (parse-command-line args %options '(()) #:build-options? #= f))) + (match command + (() opts) + (("--") opts) + (("--" command ...) (alist-cons 'exec command opts)))))) + + +;;; +;;; Entry point. +;;; + +(define (guix-time-machine . args) + (with-error-handling + (let* ((opts (parse-args args)) + (channels (channel-list opts)) + (command-line (assoc-ref opts 'exec))) + (when command-line + (let* ((directory (cached-guix-filetree-for-channels channels)) + (executable (string-append directory "/bin/guix"))) + (apply execl (cons* executable executable command-line))))))) --=20 2.23.0 From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 2/2] news: Add entry for "guix time-machine". In-Reply-To: Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2019 14:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.15732225322504 (code B ref 37978); Fri, 08 Nov 2019 14:16:01 +0000 Received: (at 37978) by debbugs.gnu.org; 8 Nov 2019 14:15:32 +0000 Received: from localhost ([127.0.0.1]:45086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT52v-0000eG-A4 for submit@debbugs.gnu.org; Fri, 08 Nov 2019 09:15:32 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:53617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT52t-0000e1-2P for 37978@debbugs.gnu.org; Fri, 08 Nov 2019 09:15:27 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 81EDE21BF9 for <37978@debbugs.gnu.org>; Fri, 8 Nov 2019 09:15:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Fri, 08 Nov 2019 09:15:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:references:date:message-id:mime-version :content-type:content-transfer-encoding; s=fm1; bh=OMOOF7U6/Gz3F vu5s9EZnL/6VRzy8JrX+9yhc3J4ehk=; b=K2x6WnhztTRv7j4ibyPITp80eZvGE 2in99dZ/HaA2i5yXRPoPC6FykrNvvLwaoi9x71e1KGuaAX9XXuY1zEkSVx1Nqo6N 8Kl18MYpolj6hBI7PIVMcLDc3D39NcFz8U4WkthMOQjXfeXuxeoY95E0b5ZhrWlm CuWzPuifkbJsjiAfOP7ys3fmOEUeCZ7mIlsuBoxZULur1SnScriwLtifiXwErrsH BGDS8huI4ksThr8QnrPS7SorOXFGFKouOr+WEG4v9KfTlgiP5OB2x+Ceg/b5+fXr kUlTRfMVVfgWVlaYijrrGgTlCEkiddDzglZFdAwtQrM2ENmwlJ7vG6yXw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=OMOOF7U6/Gz3Fvu5s9EZnL/6VRzy8JrX+9yhc3J4ehk=; b=MTbmYoQl xaMGeplj6hnHi3kZSlr3/lNYpQI1Nvu0HWX7L/qObBm/vh1/8hp8fW7B52i4q4R9 wRH/iKpfuq+doOZ6q/f7JXkF6Fh6OpAmPsMUAA0SA/y7dHDah3rDVSeYv3I9txnt +vPgjRGbSaZjOI3n+IE0KVqlm6L2vhVdhPuHAkJWPf9phjeR/bAn2tGegX6VmUXc QUt/vBiR1bLqQJ4Ot6puqAQz1GeHMQhGiLxB2UsMnb73bMDLDjEoeNqX3g2UvhsF CE01rrfmMTThG6HEvUI6TN9If6hZ9LAr1MZiYfMklA9Ob9s8PG1uJv/Nktg5/ND9 BKeC0nBr8+GHPw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvuddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufhffkfggtgfgsehtqhertd dttdejnecuhfhrohhmpefmohhnrhgrugcujfhinhhsvghnuceokhhonhhrrggurdhhihhn shgvnhesfhgrshhtmhgrihhlrdhnvghtqeenucfkphepudelhedrvddvuddrtddrvddtie enucfrrghrrghmpehmrghilhhfrhhomhepkhhonhhrrggurdhhihhnshgvnhesfhgrshht mhgrihhlrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from KHs-MacBook.local (soleil-ext.synchrotron-soleil.fr [195.221.0.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 1DEBD3060057 for <37978@debbugs.gnu.org>; Fri, 8 Nov 2019 09:15:18 -0500 (EST) From: Konrad Hinsen References: <87y2wt3ycb.fsf@gnu.org> Date: Fri, 08 Nov 2019 15:15:16 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: -1.7 (-) * etc/news.scm: Add entry for "guix time-machine". --- etc/news.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/etc/news.scm b/etc/news.scm index 08e06351e9..b6a7f46ee9 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -9,6 +9,24 @@ (channel-news (version 0) =20 + (entry (commit "XXX") + (title (en "New command @command{guix time-machine}") + (de "Neuer Befehl @command{guix time-machine}") + (fr "Nouvelle commande @command{guix time-machine}")) + (body (en "The new command @command{guix time-machine} facilitates +access to older or newer revisions of Guix than the one that is installed. +It can be used to install different versions of packages, and to +re-create computational environments exactly as used in the past.") + (de "Der neue Befehl @command{guix time-machine} vereinfacht +den Zugriff auf =C3=A4ltere oder neuere Guix-Versionen als die installiert= e. +Er kann zur Installation bestimmer Paket-Versionen verwendet werden, aber +auch zur Wiederherstellung von Entwicklungsumgebungen wie sie in der +Vergagngenheit verwendet wurden.") + (fr "La nouvelle commande @command{guix time-machine} +facilite l'acc=C3=A8s =C3=A0 des versions ant=C3=A9rieures ou post=C3=A9ri= eures par rapport +=C3=A0 la version install=C3=A9e. Elle sert =C3=A0 installer des versions= sp=C3=A9cifiques +de paquets, ainsi =C3=A0 la restauration d'environnements dans un =C3=A9tat +historique."))) (entry (commit "3e962e59d849e4300e447d94487684102d9d412e") (title (en "@command{guix graph} now supports package transformations")) --=20 2.23.0 From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 2/2] news: Add entry for "guix time-machine". References: In-Reply-To: Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2019 14:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.15732225432561 (code B ref 37978); Fri, 08 Nov 2019 14:16:02 +0000 Received: (at 37978) by debbugs.gnu.org; 8 Nov 2019 14:15:43 +0000 Received: from localhost ([127.0.0.1]:45091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT538-0000fF-Q1 for submit@debbugs.gnu.org; Fri, 08 Nov 2019 09:15:43 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:44843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT537-0000f2-TI for 37978@debbugs.gnu.org; Fri, 08 Nov 2019 09:15:42 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id CA32C21C1B for <37978@debbugs.gnu.org>; Fri, 8 Nov 2019 09:15:36 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Fri, 08 Nov 2019 09:15:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm1; bh=OMOOF7U6/Gz3Fvu5s9EZnL/6VR zy8JrX+9yhc3J4ehk=; b=vo45H+zaIoqfD1ktCzWKKDxmVhbIc7ALSKfWBV0k5r TviJJIQImOx7aKSdV/B5zkEu+wwTl2HtE82j/eMwVcq+U8e7hYnAwuQcET/E3GBS 8kpKLdZbjkzDecOZwwaYSZSD8hglVxW2DrnhyefPrvg95JsIxypBg1GQdQZk2NUK EWIz/29fM78LefrLbXIEYgWdibqQ82o85qdSljR305dqDdwhSfkWBu32ImL3wSVk IJ+GOwk0cnnpylCQuqvSWJL5Pc1+vgfxcNBFrM2K1pDS7zt3ITmrigcBCLAF+jQD oCNQQj2v2LNltTrvgYL+pq8P7ior2NMhPkBLSdMpQ5BA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=OMOOF7 U6/Gz3Fvu5s9EZnL/6VRzy8JrX+9yhc3J4ehk=; b=u8TbJXlNv+XvXLHrUsbAmS x9fcJAUjv+O03NDYCVZ405yY92jwbZRPRKClShMdLG6r6hyXYNi08J0s8gRKWSMi 98FlVViJ4h8wpcz3v6ePoJYe2zZ0pvcWncrMjAcxBdf7MO8Jc00Fm9KwQd2OiBvD IpyvU2MdddpZVDMJyWyotXnTpBU1XxQR+DDRTMqsN5543FIxFltR5RVsgTIfihNt a8a8LcWgHg1S4HguxiHrzajhGE0+fIUaerfBBw2rEBoSTrY89Spfa+907WuSapqH 87wxt41cl48LoGix0yuCPm3f3ohluYBRGn+HY9MODdJglXP64Pu9uLW9Nei+1sEg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvuddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgfesthhqredttd dtjeenucfhrhhomhepmfhonhhrrgguucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhs vghnsehfrghsthhmrghilhdrnhgvtheqnecukfhppeduleehrddvvddurddtrddvtdeine curfgrrhgrmhepmhgrihhlfhhrohhmpehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhm rghilhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from KHs-MacBook.local (soleil-ext.synchrotron-soleil.fr [195.221.0.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 4B83E3060057 for <37978@debbugs.gnu.org>; Fri, 8 Nov 2019 09:15:36 -0500 (EST) From: Konrad Hinsen Date: Fri, 08 Nov 2019 15:15:35 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: -1.7 (-) * etc/news.scm: Add entry for "guix time-machine". --- etc/news.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/etc/news.scm b/etc/news.scm index 08e06351e9..b6a7f46ee9 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -9,6 +9,24 @@ (channel-news (version 0) =20 + (entry (commit "XXX") + (title (en "New command @command{guix time-machine}") + (de "Neuer Befehl @command{guix time-machine}") + (fr "Nouvelle commande @command{guix time-machine}")) + (body (en "The new command @command{guix time-machine} facilitates +access to older or newer revisions of Guix than the one that is installed. +It can be used to install different versions of packages, and to +re-create computational environments exactly as used in the past.") + (de "Der neue Befehl @command{guix time-machine} vereinfacht +den Zugriff auf =C3=A4ltere oder neuere Guix-Versionen als die installiert= e. +Er kann zur Installation bestimmer Paket-Versionen verwendet werden, aber +auch zur Wiederherstellung von Entwicklungsumgebungen wie sie in der +Vergagngenheit verwendet wurden.") + (fr "La nouvelle commande @command{guix time-machine} +facilite l'acc=C3=A8s =C3=A0 des versions ant=C3=A9rieures ou post=C3=A9ri= eures par rapport +=C3=A0 la version install=C3=A9e. Elle sert =C3=A0 installer des versions= sp=C3=A9cifiques +de paquets, ainsi =C3=A0 la restauration d'environnements dans un =C3=A9tat +historique."))) (entry (commit "3e962e59d849e4300e447d94487684102d9d412e") (title (en "@command{guix graph} now supports package transformations")) --=20 2.23.0 From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2019 14:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.15732226082686 (code B ref 37978); Fri, 08 Nov 2019 14:17:02 +0000 Received: (at 37978) by debbugs.gnu.org; 8 Nov 2019 14:16:48 +0000 Received: from localhost ([127.0.0.1]:45098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT54C-0000hF-6h for submit@debbugs.gnu.org; Fri, 08 Nov 2019 09:16:48 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:46521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT549-0000gz-MP for 37978@debbugs.gnu.org; Fri, 08 Nov 2019 09:16:46 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5F95C2104C; Fri, 8 Nov 2019 09:16:38 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 08 Nov 2019 09:16:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=z5nNpxg1ARRNg1Qr2ErDrGidxQ fxrWVqMcN/GONzeVQ=; b=SAhzpfbv/zPv8j37Wmn4YIHRvv7X79lU6ITiz+WSdW AozAhb6EwHiK0ZUacSvkqn+dZ5dpvavMGp2nguadUe6FaZRVc8qQFIBg6lG9hsF/ WxRqAcwbY/wlBNkY/Gq2LG+ChK+6zStw0SJKHYi0GdrCe8yxW4y65Vy8LmAvGFSz Af6kI0Zkqz1LJWQ5kvtKaFtm0UzgU/FToq7GWt6zZEl2FZ4LXngPTG0GPIsuHw8p HVL745dwNBwq9JTNs+fa7j4F7Unb0I5RDcIfJIt/d6XbLcbXGhkQM4sHAbgND4Qp Tl4oXzEeJn7VQg16q1fs1OPXIXvTzB1mbg0f7eXFedtw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=z5nNpx g1ARRNg1Qr2ErDrGidxQfxrWVqMcN/GONzeVQ=; b=SCECHXDea8OE2aNQ7+lXsR k4mAq5yMgY1pg+2fFhRb0ul6YDFPcYclewMikcMr2U8ioQhEIppA+4y0J4N44YU5 MQA6N7kUnK1URwUsyzzjbHPkPIaxk8jq9KAKqDRf1V2q74xvC7fwgGWU+Kvbi93e nFe1I/dLE2wx1Qn5M0gqsBJO+Fba2wZ5sJC3+TPxUuu+XH9gCOFkDb4z0notOj8v LOgIQ92cWENKecEk5TE+dLsbpBv3/J3WEymRglbNHsDcTiTKiaRgRr3G2bghwlWr PQJSAZSkGDodPhTdjcPW9xPFNz82pQpo1lE/rkqf4I+Z7/qepRW6tfxWS/0dNQmw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvuddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepmfhonhhrrggu ucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvth eqnecukfhppeduleehrddvvddurddtrddvtdeinecurfgrrhgrmhepmhgrihhlfhhrohhm pehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvthenucevlhhushhtvg hrufhiiigvpedt X-ME-Proxy: Received: from KHs-MacBook.local (soleil-ext.synchrotron-soleil.fr [195.221.0.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 7846F80062; Fri, 8 Nov 2019 09:16:37 -0500 (EST) From: Konrad Hinsen In-Reply-To: References: <87y2wt3ycb.fsf@gnu.org> Date: Fri, 08 Nov 2019 15:16:36 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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: -1.7 (-) Konrad Hinsen writes: > Thanks for your detailed comments, most of which I agree with, and I > will make the required changes. I just submitted two new patches. Looking forward to everyone's feedbck! Cheers, Konrad. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2019 20:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Konrad Hinsen Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.15732437605242 (code B ref 37978); Fri, 08 Nov 2019 20:10:01 +0000 Received: (at 37978) by debbugs.gnu.org; 8 Nov 2019 20:09:20 +0000 Received: from localhost ([127.0.0.1]:47669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTAZM-0001MU-5B for submit@debbugs.gnu.org; Fri, 08 Nov 2019 15:09:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTAZJ-0001ME-Jf for 37978@debbugs.gnu.org; Fri, 08 Nov 2019 15:09:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iTAZE-0004Ja-Gq; Fri, 08 Nov 2019 15:09:12 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42184 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iTAZE-0008Ei-0g; Fri, 08 Nov 2019 15:09:12 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y2wt3ycb.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 Brumaire an 228 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 08 Nov 2019 21:09:10 +0100 In-Reply-To: (Konrad Hinsen's message of "Fri, 08 Nov 2019 08:14:03 +0100") Message-ID: <87o8xmdtax.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) 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 (---) Hello, Konrad Hinsen skribis: >> How about (1) calling it =E2=80=98cached-channel-instance=E2=80=99 (or s= imilar), and (2) >> not opening a connection to the daemon? >> >> Regarding (2), it means that procedure would be a monadic procedure and >> it=E2=80=99s up to the user to do with-store + run-with-store or whateve= r. The > > That would imply that the user always opens a daemon, even if it is not > necessary because the required instance is already in the cache. Is that > a price worth paying for a more conventional interface, in your opinion? Ah, I hadn=E2=80=99t thought about it. Hmm opening a connection to the daemon doesn=E2=80=99t cost much, but OTOH = it=E2=80=99s best if we can avoid it here since =E2=80=98guix time-machine=E2=80=99 is j= ust a trampoline. Dunno, I=E2=80=99ll comment on the new patches and we=E2=80=99ll see. :-) Ludo=E2=80=99. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 2/2] news: Add entry for "guix time-machine". Resent-From: "pelzflorian (Florian Pelz)" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Nov 2019 20:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Konrad Hinsen Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.15732458108594 (code B ref 37978); Fri, 08 Nov 2019 20:44:02 +0000 Received: (at 37978) by debbugs.gnu.org; 8 Nov 2019 20:43:30 +0000 Received: from localhost ([127.0.0.1]:47713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTB6Q-0002EY-DB for submit@debbugs.gnu.org; Fri, 08 Nov 2019 15:43:30 -0500 Received: from pelzflorian.de ([5.45.111.108]:41362 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTB6O-0002EO-VG for 37978@debbugs.gnu.org; Fri, 08 Nov 2019 15:43:29 -0500 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 35F8A3604DA; Fri, 8 Nov 2019 21:43:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1573245807; bh=LqL3Kx99ltpCitTO+zlIF3SZYrBwxL60MWom0yY5hFI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=oVsR8QLl3W8vGtH2gNwAGrUGOe+miRfTe9HF2H6QlF/Px3ZZVx+OiVeOxN7DlEQ4L I+x9NZgS5MjiT644GNg7HNejqVD8aheVP/9ZZD89Od+Y8BxbBI9O/1/5UyMNDeBnW9 MfM5JJlVwrrygeAUwNIX54fl1+yXadGZCibTGHxc= Date: Fri, 8 Nov 2019 21:43:27 +0100 From: "pelzflorian (Florian Pelz)" Message-ID: <20191108204327.k45bqzauhyfpabke@pelzflorian.localdomain> References: <87y2wt3ycb.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Thank you for not only this useful command but also providing translations. It does not really matter, but: On Fri, Nov 08, 2019 at 03:15:16PM +0100, Konrad Hinsen wrote: > * etc/news.scm: Add entry for "guix time-machine". > --- > etc/news.scm | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > =?UTF-8?Q?[=E2?= [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 DOS_RCVD_IP_TWICE_B Received from the same IP twice in a row (only one external relay) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 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: 1.0 (+) Thank you for not only this useful command but also providing translations. It does not really matter, but: On Fri, Nov 08, 2019 at 03:15:16PM +0100, Konrad Hinsen wrote: > * etc/news.scm: Add entry for "guix time-machine". > --- > etc/news.scm | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > […] > + (de "Der neue Befehl @command{guix time-machine} vereinfacht > +den Zugriff auf ältere oder neuere Guix-Versionen als die installierte. > +Er kann zur Installation bestimmer Paket-Versionen verwendet werden, aber I would prefer „Paketversionen“ rather than „Paket-Versionen“ because the hyphen does not make it easier to read. > +auch zur Wiederherstellung von Entwicklungsumgebungen wie sie in der > +Vergagngenheit verwendet wurden.") There needs to be a comma before „wie“ because what follows is a separate nebensatz. Regards, Florian From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 1/2] guix: new command "guix time-machine" Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Nov 2019 12:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Konrad Hinsen Cc: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.157338724414431 (code B ref 37978); Sun, 10 Nov 2019 12:01:02 +0000 Received: (at 37978) by debbugs.gnu.org; 10 Nov 2019 12:00:44 +0000 Received: from localhost ([127.0.0.1]:50729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTltc-0003kh-By for submit@debbugs.gnu.org; Sun, 10 Nov 2019 07:00:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTlta-0003kU-R7 for 37978@debbugs.gnu.org; Sun, 10 Nov 2019 07:00:43 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iTltV-0007xT-KJ; Sun, 10 Nov 2019 07:00:37 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38464 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iTltT-0006Ih-Fv; Sun, 10 Nov 2019 07:00:37 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y2wt3ycb.fsf@gnu.org> Date: Sun, 10 Nov 2019 13:00:33 +0100 In-Reply-To: (Konrad Hinsen's message of "Fri, 08 Nov 2019 15:13:48 +0100") Message-ID: <87k1883pr2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) 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 (---) Hi Konrad, Thanks for the updated patch! Konrad Hinsen skribis: > * guix/scripts/time-machine.scm: New file. > * Makefile.am: (MODULES): Add it. > * guix/scripts/pull.scm: Export function channel-list. > * guix/inferior.scm: New function cached-guix-filetree-for-channels. > * doc/guix.texi: Document "guix time-machine" [...] > +(define* (cached-guix-filetree-for-channels channels > + #:key > + (cache-directory (%inferior-= cache-directory)) > + (ttl (* 3600 24 30))) > + "Return a directory containing a guix filetree defined by CHANNELS, a = list of channels. > +The directory is a subdirectory of CACHE-DIRECTORY, where entries can be= reclaimed after TTL seconds. > +This procedure opens a new connection to the build daemon." > (with-store store It=E2=80=99s the same as in v1, right? How about (1) calling it =E2=80=98cached-channel-instance=E2=80=99 (or simi= lar; as a rule of thumb, I try to avoid =E2=80=9Cguix=E2=80=9D in identifiers as well= as neologisms), and (2) not opening a connection to the daemon? :-) As it stands, this procedure opens a connection unconditionally anyway, so it=E2=80=99s fine IMO to just move that =E2=80=98with-store=E2=80=99 to = time-machine.scm and to =E2=80=98inferior-for-channels=E2=80=99. I also think it would be preferable to make it a separate patch (separate from the one that adds time-machine.scm), if it=E2=80=99s OK for = you. Thoughts? Thank you! Ludo=E2=80=99. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 2/2] news: Add entry for "guix time-machine". Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Nov 2019 12:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "pelzflorian \(Florian Pelz\)" Cc: Konrad Hinsen , 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.157338733414594 (code B ref 37978); Sun, 10 Nov 2019 12:03:01 +0000 Received: (at 37978) by debbugs.gnu.org; 10 Nov 2019 12:02:14 +0000 Received: from localhost ([127.0.0.1]:50733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTlv3-0003nK-PE for submit@debbugs.gnu.org; Sun, 10 Nov 2019 07:02:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTlv1-0003n7-Sg for 37978@debbugs.gnu.org; Sun, 10 Nov 2019 07:02:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iTluw-0008FD-B9; Sun, 10 Nov 2019 07:02:06 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38466 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iTluv-0000bE-Kp; Sun, 10 Nov 2019 07:02:05 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y2wt3ycb.fsf@gnu.org> <20191108204327.k45bqzauhyfpabke@pelzflorian.localdomain> Date: Sun, 10 Nov 2019 13:02:04 +0100 In-Reply-To: <20191108204327.k45bqzauhyfpabke@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Fri, 8 Nov 2019 21:43:27 +0100") Message-ID: <87eeyg3poj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) 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 (---) "pelzflorian (Florian Pelz)" skribis: > Thank you for not only this useful command but also providing > translations. Ah yes, I forgot to say it Konrad, but you can Cc: guix-i18n@gnu.org to obtain translations. It=E2=80=99s convenient to be polyglot though. ;-) Ludo=E2=80=99. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 1/2] guix: new command "guix time-machine" Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Nov 2019 15:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , pelzflorian (Florian Pelz) , 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.157357393411190 (code B ref 37978); Tue, 12 Nov 2019 15:53:01 +0000 Received: (at 37978) by debbugs.gnu.org; 12 Nov 2019 15:52:14 +0000 Received: from localhost ([127.0.0.1]:58234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUYSj-0002uQ-Tv for submit@debbugs.gnu.org; Tue, 12 Nov 2019 10:52:14 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:34545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUYSi-0002uA-8h for 37978@debbugs.gnu.org; Tue, 12 Nov 2019 10:52:12 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 5D0AC4E0; Tue, 12 Nov 2019 10:52:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 12 Nov 2019 10:52:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:to:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=yszX7E7KL1UHEIBMNNv+aNW04b Xlfe99/iA2map6Zj8=; b=RKoRVcrMty2bucDZ9um0bGGO6sNMFbOJR12bGFRFez o59LxWbmYCAbRbKLMq1a2KPV25YHIHXV56djFuYux1I0+l6gr3cAbRtC6XS60yvZ 6kaV6l9ARfN1jYftLmh/U7Gr9WbAY8jqax95Gkm+eTrE872QOk22hWq+vmQP46ki SmaYR4syTOjhBIRDkhnvUqKRcT0b4q4o84XifD/FsbdfO7vEph/NHHNoqjFtEuRY CBDrf7u60PIw/mQNMCAzhoJqJ+JLwVBxcV875qA9F/3gsjtEC0ai3XrNe+dMJ9hw 4DuwBMTKV9+Qto6WmCBzr9XiDdtoqRnakYBy4il7jn7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=yszX7E 7KL1UHEIBMNNv+aNW04bXlfe99/iA2map6Zj8=; b=Wc6Xvqf1k1ElMD80fngjy6 amWrV4QIhOmgOIIdwR3Px8a7h1jhoYDYkPsO4C7SSZALdPHFpWeVoejS/6wQ9uge HsoYX2VzC0y2SOTCTCnLDJqcbvi0Fx3TePKMxrFNIiP3hF/7aPe+B2lrWp+BdEwh OYGblEz0hbXmwSIGxne8/ilVVjmeH59tmWNarQBkm57fAfEWddCX5H1qzSPLXdtn phMAPs18h6D9ud4G1/8TF7UJYjB0PrOdY2rAMG744b0DYsjV0fHCOOltoTLV8gJM WyvfBDwlmLmpUWI5HYiLufXP3vlLbGAD/9gGiMpeWNkviEZBMQ0GAQ49lh8Pi/7A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvledgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gotffhvedqqdfjughrqdfuuhhsphgvtghtqdhlohifucdlhedmnecujfgurhephffvvffv ufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepmfhonhhrrgguucfjihhnshgvnh cuoehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvtheqnecukfhppedu leehrddvvddurddtrddvtdeinecurfgrrhgrmhepmhgrihhlfhhrohhmpehkohhnrhgrug drhhhinhhsvghnsehfrghsthhmrghilhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from KHs-MacBook.local (soleil-ext.synchrotron-soleil.fr [195.221.0.206]) by mail.messagingengine.com (Postfix) with ESMTPA id D6580306005E; Tue, 12 Nov 2019 10:52:04 -0500 (EST) From: Konrad Hinsen In-Reply-To: <87k1883pr2.fsf@gnu.org> References: <87y2wt3ycb.fsf@gnu.org> <87k1883pr2.fsf@gnu.org> Date: Tue, 12 Nov 2019 16:52:03 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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: -1.7 (-) Hi Ludo and Florian, Thanks for your comments and corrections. I have prepared a third version, now consisting of three patches. I'll send them in a minute... Cheers, Konrad. From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 1/3] guix: new command "guix time-machine" References: In-Reply-To: Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Nov 2019 15:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.157357397711262 (code B ref 37978); Tue, 12 Nov 2019 15:53:02 +0000 Received: (at 37978) by debbugs.gnu.org; 12 Nov 2019 15:52:57 +0000 Received: from localhost ([127.0.0.1]:58240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUYTQ-0002vZ-80 for submit@debbugs.gnu.org; Tue, 12 Nov 2019 10:52:57 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:58867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUYTN-0002vI-DH for 37978@debbugs.gnu.org; Tue, 12 Nov 2019 10:52:54 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 92FBA4E0; Tue, 12 Nov 2019 10:52:47 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 12 Nov 2019 10:52:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm1; bh=gVcYXWWn1s2Hr1hYhVwzyduIlQ 36P3kpUBbNwVJx/Kc=; b=tOTg42i+Ttb73lZIlnh0SiFaBjnYT9JDMIdSEbOBiz dmFaGzPxvi7KEFO2tmW76Vlx16gqyqseGDa12eNkWaPqNueaOkla7YTjCJwevtzI hYxDIDfth5Xbuvbs+6dJXYZM09szzbZcdys7SHh6xK//MLSbMHuUzl2FsfzdzCpU 45wEDySBAg/ggihsDW1H5AusoJKE7Q4b5lexOlJX+CeWhAX4AsM64UooOfYgGWrj 58CKar5BX22CgttaFs9Ate+9vn/9Pl3M7JpAEAwgLTfD+mmltK0zPTcKPqVVDYBl 3Io+TEYuX86uS17dCcBUcuXyfnYkNkAP/r7Nw4uGzVOQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=gVcYXW Wn1s2Hr1hYhVwzyduIlQ36P3kpUBbNwVJx/Kc=; b=Wj7JfwE9jif09k4Zu3+fzs j5X03TEmPpOUy0s86Y5YDKWONM6hGFzxnK9XYAUcDNL4n0crOH0Ae2uDLkMKF4ct ONSW5Z6dQ+vxBRbZmJuggcwLYldlMG3CH7NLy79YtX67hsmegUW7PCECFbaqp+qz Cqu9bweoNqFWKpNxYyuRrlFfFNi0zvwv68uwLnTVpDOuYQkfk+OIy5rnrYFrrCO/ WyKLgIK3dxJ8/ZkNdS+YlwcMWTJJSfYt8hyohoMczoAvv9uNgDjjLwrB17dbvurH lidF4Rg0kG1kSrqWH6k8+TTILuN5yvtWlMbUhLWD+nPz7qrfem7H/pIyqaNxPHzw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvledgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgfesthhqredttd dtjeenucfhrhhomhepmfhonhhrrgguucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhs vghnsehfrghsthhmrghilhdrnhgvtheqnecuffhomhgrihhnpehgnhhurdhorhhgnecukf hppeduleehrddvvddurddtrddvtdeinecurfgrrhgrmhepmhgrihhlfhhrohhmpehkohhn rhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvthenucevlhhushhtvghrufhiii gvpedt X-ME-Proxy: Received: from KHs-MacBook.local (soleil-ext.synchrotron.fr [195.221.0.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 6168B80068; Tue, 12 Nov 2019 10:52:46 -0500 (EST) From: Konrad Hinsen Date: Fri, 25 Oct 2019 17:42:21 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/scripts/time-machine.scm: New file. * Makefile.am: (MODULES): Add it. * guix/scripts/pull.scm: Export function channel-list. * guix/inferior.scm: New exported function cached-channel-instance. [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: fastmail.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [64.147.123.25 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (konrad.hinsen[at]fastmail.net) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 SPF_PASS SPF: sender matches SPF record 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: 0.4 (/) * guix/scripts/time-machine.scm: New file. * Makefile.am: (MODULES): Add it. * guix/scripts/pull.scm: Export function channel-list. * guix/inferior.scm: New exported function cached-channel-instance. * doc/guix.texi: Document "guix time-machine". --- Makefile.am | 1 + doc/guix.texi | 59 +++++++++++++++++++- guix/inferior.scm | 38 +++++++++---- guix/scripts/pull.scm | 1 + guix/scripts/time-machine.scm | 102 ++++++++++++++++++++++++++++++++++ 5 files changed, 187 insertions(+), 14 deletions(-) create mode 100644 guix/scripts/time-machine.scm diff --git a/Makefile.am b/Makefile.am index b1f33946c5..b3f03d44c8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -278,6 +278,7 @@ MODULES =3D \ guix/scripts/container.scm \ guix/scripts/container/exec.scm \ guix/scripts/deploy.scm \ + guix/scripts/time-machine.scm \ guix.scm \ $(GNU_SYSTEM_MODULES) =20 diff --git a/doc/guix.texi b/doc/guix.texi index 3b8e5935bb..3d4192cab2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -197,6 +197,7 @@ Package Management * Invoking guix gc:: Running the garbage collector. * Invoking guix pull:: Fetching the latest Guix and distribution. * Channels:: Customizing the package collection. +* Invoking guix time-machine:: Running an older revision of Guix. * Inferiors:: Interacting with another revision of Guix. * Invoking guix describe:: Display information about your Guix revisi= on. * Invoking guix archive:: Exporting and importing store files. @@ -2548,6 +2549,7 @@ guix install emacs-guix * Invoking guix gc:: Running the garbage collector. * Invoking guix pull:: Fetching the latest Guix and distribution. * Channels:: Customizing the package collection. +* Invoking guix time-machine:: Running an older revision of Guix. * Inferiors:: Interacting with another revision of Guix. * Invoking guix describe:: Display information about your Guix revisi= on. * Invoking guix archive:: Exporting and importing store files. @@ -4150,7 +4152,10 @@ say, on another machine, by providing a channel spec= ification in @end lisp =20 The @command{guix describe --format=3Dchannels} command can even generate = this -list of channels directly (@pxref{Invoking guix describe}). +list of channels directly (@pxref{Invoking guix describe}). The resulting +file can be used with the -C options of @command{guix pull} +(@pxref{Invoking guix pull}) or @command{guix time-machine} +(@pxref{Invoking guix time-machine}). =20 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 @@ -4164,6 +4169,57 @@ artifacts with very fine grain, and to reproduce sof= tware environments at will---some sort of ``meta reproducibility'' capabilities, if you will. @xref{Inferiors}, for another way to take advantage of these super powers. =20 +@node Invoking guix time-machine +@section Invoking @command{guix time-machine} + +@cindex @command{guix time-machine} +@cindex pinning, channels +@cindex replicating Guix +@cindex reproducibility, of Guix + +The @command{guix time-machine} command provides access to other +revisions of Guix, for example to install older versions of packages, +or to reproduce a computation in an identical environment. The revision +of Guix to be used is defined by a commit or by a channel +description file created by @command{guix describe} +(@pxref{Invoking guix describe}). + +The general syntax is: + +@example +guix time-machine @var{options}@dots{} -- @var{command} @var {arg}@dots{} +@end example + +where @var{command} and @var{arg}@dots{} are passed unmodified to the +@command{guix} command if the specified revision. The @var{options} that = define +this revision are the same as for @command{guix pull} (@pxref{Invoking gui= x pull}): + +@table @code +@item --url=3D@var{url} +@itemx --commit=3D@var{commit} +@itemx --branch=3D@var{branch} +Use the @code{guix} channel from the specified @var{url}, at the +given @var{commit} (a valid Git commit ID represented as a hexadecimal +string), or @var{branch}. + +@item --channels=3D@var{file} +@itemx -C @var{file} +Read the list of channels from @var{file}. @var{file} must contain +Scheme code that evaluates to a list of channel objects. +@xref{Channels} for more information. +@end table + +As for @command{guix pull}, the absence of any options means that the +the latest commit on the master branch will be used. The command + +@example +guix time-machine -- build hello +@end example + +will thus build the package @code{hello} as defined in the master branch, +which is in general a newer revison of Guix than you have installed. +Time travel works in both directions! + @node Inferiors @section Inferiors =20 @@ -10582,7 +10638,6 @@ ClientPID: 19419 ClientCommand: cuirass --cache-directory /var/cache/cuirass @dots{} @end example =20 - @node System Configuration @chapter System Configuration =20 diff --git a/guix/inferior.scm b/guix/inferior.scm index b8e2f21f42..be50e0ec26 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -89,6 +89,7 @@ gexp->derivation-in-inferior =20 %inferior-cache-directory + cached-channel-instance inferior-for-channels)) =20 ;;; Commentary: @@ -635,16 +636,13 @@ failing when GUIX is too old and lacks the 'guix repl= ' command." (make-parameter (string-append (cache-directory #:ensure? #f) "/inferiors"))) =20 -(define* (inferior-for-channels channels - #:key - (cache-directory (%inferior-cache-director= y)) - (ttl (* 3600 24 30))) - "Return an inferior for CHANNELS, a list of channels. Use the cache at -CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This -procedure opens a new connection to the build daemon. - -This is a convenience procedure that people may use in manifests passed to -'guix package -m', for instance." +(define* (cached-channel-instance channels + #:key + (cache-directory (%inferior-cache-direct= ory)) + (ttl (* 3600 24 30))) + "Return a directory containing a guix filetree defined by CHANNELS, a li= st of channels. +The directory is a subdirectory of CACHE-DIRECTORY, where entries can be r= eclaimed after TTL seconds. +This procedure opens a new connection to the build daemon." (with-store store (let () (define instances @@ -680,7 +678,7 @@ This is a convenience procedure that people may use in = manifests passed to (file-expiration-time ttl)) =20 (if (file-exists? cached) - (open-inferior cached) + cached (run-with-store store (mlet %store-monad ((profile (channel-instances->derivation instances)= )) @@ -689,4 +687,20 @@ This is a convenience procedure that people may use in= manifests passed to (built-derivations (list profile)) (symlink* (derivation->output-path profile) cached) (add-indirect-root* cached) - (return (open-inferior cached))))))))) + (return cached)))))))) + +(define* (inferior-for-channels channels + #:key + (cache-directory (%inferior-cache-director= y)) + (ttl (* 3600 24 30))) + "Return an inferior for CHANNELS, a list of channels. Use the cache at +CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This +procedure opens a new connection to the build daemon. + +This is a convenience procedure that people may use in manifests passed to +'guix package -m', for instance." + (define cached + (cached-channel-instance channels + #:cache-directory cache-directory + #:ttl ttl)) + (open-inferior cached)) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 92aac6066e..d6173a6acb 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -56,6 +56,7 @@ #:use-module (ice-9 vlist) #:use-module (ice-9 format) #:export (display-profile-content + channel-list guix-pull)) =20 diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm new file mode 100644 index 0000000000..a6598fb0f7 --- /dev/null +++ b/guix/scripts/time-machine.scm @@ -0,0 +1,102 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2019 Konrad Hinsen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts time-machine) + #:use-module (guix ui) + #:use-module (guix scripts) + #:use-module (guix inferior) + #:use-module (guix channels) + #:use-module ((guix scripts pull) #:select (channel-list)) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-37) + #:export (guix-time-machine)) + + +;;; +;;; Command-line options. +;;; + +(define (show-help) + (display (G_ "Usage: guix time-machine [OPTION] -- COMMAND ARGS... +Execute COMMAND ARGS... in an older version of Guix.\n")) + (display (G_ " + -C, --channels=3DFILE deploy the channels defined in FILE")) + (display (G_ " + --url=3DURL use the Git repository at URL")) + (display (G_ " + --commit=3DCOMMIT use the specified COMMIT")) + (display (G_ " + --branch=3DBRANCH use the tip of the specified BRANCH")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specifications of the command-line options. + (list (option '(#\C "channels") #t #f + (lambda (opt name arg result) + (alist-cons 'channel-file arg result))) + (option '("url") #t #f + (lambda (opt name arg result) + (alist-cons 'repository-url arg + (alist-delete 'repository-url result)))) + (option '("commit") #t #f + (lambda (opt name arg result) + (alist-cons 'ref `(commit . ,arg) result))) + (option '("branch") #t #f + (lambda (opt name arg result) + (alist-cons 'ref `(branch . ,arg) result))) + (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix time-machine"))))) + +(define (parse-args args) + "Parse the list of command line arguments ARGS." + ;; The '--' token is used to separate the command to run from the rest of + ;; the operands. + (let-values (((args command) (break (cut string=3D? "--" <>) args))) + (let ((opts (parse-command-line args %options '(()) #:build-options? #= f))) + (match command + (() opts) + (("--") opts) + (("--" command ...) (alist-cons 'exec command opts)))))) + + +;;; +;;; Entry point. +;;; + +(define (guix-time-machine . args) + (with-error-handling + (let* ((opts (parse-args args)) + (channels (channel-list opts)) + (command-line (assoc-ref opts 'exec))) + (when command-line + (let* ((directory (cached-channel-instance channels)) + (executable (string-append directory "/bin/guix"))) + (apply execl (cons* executable executable command-line))))))) --=20 2.24.0 From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 2/3] guix: don't connect to daemon in cached-channel-instance References: In-Reply-To: Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Nov 2019 15:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.157357403011365 (code B ref 37978); Tue, 12 Nov 2019 15:54:01 +0000 Received: (at 37978) by debbugs.gnu.org; 12 Nov 2019 15:53:50 +0000 Received: from localhost ([127.0.0.1]:58247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUYUD-0002xA-NZ for submit@debbugs.gnu.org; Tue, 12 Nov 2019 10:53:48 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:49131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUYUB-0002wx-B6 for 37978@debbugs.gnu.org; Tue, 12 Nov 2019 10:53:43 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 8BDD46C4; Tue, 12 Nov 2019 10:53:37 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 12 Nov 2019 10:53:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:date:message-id:mime-version:content-type; s= fm1; bh=B96nd8N58kGKsu4wc6Dm7IOai7wvmgysgYh7md8GKGo=; b=g/LFAK7i +gm70eoJstYqtrWaOrsJwoZGJA6SgPmuDpr7kR2U3NU1ErraZBqeHtWkm/8FUbX5 LcRVBDYBnVi6CiV4tSGfFHHz6HYprvvp8K0/XU1Lv7+hRrlEOgJnjteNby2fxzsJ TJmUhJUKQqTPC5BH4i64PjY9nKT/3wkl/wpgrR24jNkFJpS78RVjjGooUPumIn3B ayIUH84I0+G26lBTeWHO4pvac3RYmPVOqd6ifbydTnl5jk0onkjjezPYFyszXLlZ 3HXJcq8Pxual8aXbrBbJNNFLg6NMhP/sBwUZxQ0spI5NYv4DHBAwyu2AuehgJS/v QEJEFmtXxIaC5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=B96nd8N58kGKsu4wc6Dm7IOai7wvm gysgYh7md8GKGo=; b=Uh6GN5vrY3SxZelSFikITr4Y39z/dtUVkoquDI3ZLF5VG +rWzNKzhqI9CWbbk9ZzfIS5uVJsEWb9ma/7XOb+yjrTGIhvBgIIdVgfUcGAAUK9B rvP5EDH0JzfrQ+5i+6rCdN4/Lwza3HFyJuew6TYmA2wqWbyLHNsTQjgBNgvNuAtm 972tlxycT3F4asmNuB4Lp8upjItGoMmeT5WgYVcr9e3qqt4yLncu4LYl2b3KVATc 3eunc/Viy6xvNV+HBacYHN3dCwroShHjO2MwDVpVSzhy3vGzoRX2eo+G2QSxX2gu nhT91r3+uoQVRDgbOYteZ7N0sH3KwL6aiQFUV7tpA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvledgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehttdertddttd dtnecuhfhrohhmpefmohhnrhgrugcujfhinhhsvghnuceokhhonhhrrggurdhhihhnshgv nhesfhgrshhtmhgrihhlrdhnvghtqeenucfkphepudelhedrvddvuddrtddrvddtieenuc frrghrrghmpehmrghilhhfrhhomhepkhhonhhrrggurdhhihhnshgvnhesfhgrshhtmhgr ihhlrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from KHs-MacBook.local (soleil-ext.synchrotron-soleil.fr [195.221.0.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 72E1D3060060; Tue, 12 Nov 2019 10:53:36 -0500 (EST) From: Konrad Hinsen Date: Tue, 12 Nov 2019 16:39:46 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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: -1.7 (-) * guix/inferior.scm (cached-channel-instance): take an explicit store argument * guix/inferior.scm (inferior-for-channels): wrap call to cached-channel-instance in with-store * guix/time-machine.scm (guix-time-machine): wrap call to cached-channel-instance in with-store --- guix/inferior.scm | 99 ++++++++++++++++++----------------- guix/scripts/time-machine.scm | 4 +- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/guix/inferior.scm b/guix/inferior.scm index be50e0ec26..71dae89e92 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -636,58 +636,57 @@ failing when GUIX is too old and lacks the 'guix repl' command." (make-parameter (string-append (cache-directory #:ensure? #f) "/inferiors"))) -(define* (cached-channel-instance channels +(define* (cached-channel-instance store + channels #:key (cache-directory (%inferior-cache-directory)) (ttl (* 3600 24 30))) "Return a directory containing a guix filetree defined by CHANNELS, a list of channels. The directory is a subdirectory of CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This procedure opens a new connection to the build daemon." - (with-store store - (let () - (define instances - (latest-channel-instances store channels)) - - (define key - (bytevector->base32-string - (sha256 - (string->utf8 - (string-concatenate (map channel-instance-commit instances)))))) - - (define cached - (string-append cache-directory "/" key)) - - (define (base32-encoded-sha256? str) - (= (string-length str) 52)) - - (define (cache-entries directory) - (map (lambda (file) - (string-append directory "/" file)) - (scandir directory base32-encoded-sha256?))) - - (define symlink* - (lift2 symlink %store-monad)) - - (define add-indirect-root* - (store-lift add-indirect-root)) - - (mkdir-p cache-directory) - (maybe-remove-expired-cache-entries cache-directory - cache-entries - #:entry-expiration - (file-expiration-time ttl)) - - (if (file-exists? cached) - cached - (run-with-store store - (mlet %store-monad ((profile - (channel-instances->derivation instances))) - (mbegin %store-monad - (show-what-to-build* (list profile)) - (built-derivations (list profile)) - (symlink* (derivation->output-path profile) cached) - (add-indirect-root* cached) - (return cached)))))))) + (define instances + (latest-channel-instances store channels)) + + (define key + (bytevector->base32-string + (sha256 + (string->utf8 + (string-concatenate (map channel-instance-commit instances)))))) + + (define cached + (string-append cache-directory "/" key)) + + (define (base32-encoded-sha256? str) + (= (string-length str) 52)) + + (define (cache-entries directory) + (map (lambda (file) + (string-append directory "/" file)) + (scandir directory base32-encoded-sha256?))) + + (define symlink* + (lift2 symlink %store-monad)) + + (define add-indirect-root* + (store-lift add-indirect-root)) + + (mkdir-p cache-directory) + (maybe-remove-expired-cache-entries cache-directory + cache-entries + #:entry-expiration + (file-expiration-time ttl)) + + (if (file-exists? cached) + cached + (run-with-store store + (mlet %store-monad ((profile + (channel-instances->derivation instances))) + (mbegin %store-monad + (show-what-to-build* (list profile)) + (built-derivations (list profile)) + (symlink* (derivation->output-path profile) cached) + (add-indirect-root* cached) + (return cached)))))) (define* (inferior-for-channels channels #:key @@ -700,7 +699,9 @@ procedure opens a new connection to the build daemon. This is a convenience procedure that people may use in manifests passed to 'guix package -m', for instance." (define cached - (cached-channel-instance channels - #:cache-directory cache-directory - #:ttl ttl)) + (with-store store + (cached-channel-instance store + channels + #:cache-directory cache-directory + #:ttl ttl))) (open-inferior cached)) diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm index a6598fb0f7..a64badc27b 100644 --- a/guix/scripts/time-machine.scm +++ b/guix/scripts/time-machine.scm @@ -21,6 +21,7 @@ #:use-module (guix scripts) #:use-module (guix inferior) #:use-module (guix channels) + #:use-module (guix store) #:use-module ((guix scripts pull) #:select (channel-list)) #:use-module (ice-9 match) #:use-module (srfi srfi-1) @@ -97,6 +98,7 @@ Execute COMMAND ARGS... in an older version of Guix.\n")) (channels (channel-list opts)) (command-line (assoc-ref opts 'exec))) (when command-line - (let* ((directory (cached-channel-instance channels)) + (let* ((directory (with-store store + (cached-channel-instance store channels))) (executable (string-append directory "/bin/guix"))) (apply execl (cons* executable executable command-line))))))) -- 2.24.0 From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH 3/3] news: Add entry for "guix time-machine". References: In-Reply-To: Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Nov 2019 15:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37978@debbugs.gnu.org Received: via spool by 37978-submit@debbugs.gnu.org id=B37978.157357406211435 (code B ref 37978); Tue, 12 Nov 2019 15:55:02 +0000 Received: (at 37978) by debbugs.gnu.org; 12 Nov 2019 15:54:22 +0000 Received: from localhost ([127.0.0.1]:58253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUYUn-0002yM-KS for submit@debbugs.gnu.org; Tue, 12 Nov 2019 10:54:21 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:59983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUYUk-0002y9-Nl for 37978@debbugs.gnu.org; Tue, 12 Nov 2019 10:54:19 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id DFC8D72A; Tue, 12 Nov 2019 10:54:12 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 12 Nov 2019 10:54:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm1; bh=ZgbqA4lytSUhbXP2/Edibcpbn6 VUbCzV8NEREKqv31c=; b=ChjRidtanRxIBgW0xTAqyszgSQdC4IlnlHvS27vV43 J1iymL9mXRX5y7mOvASac58Ao2Qyx5pe7lRK0EQEPy5ieY4rnKmUGrR+F7FkCe9c zUVCQrZsOoIUYm99ngECNk2ISekQP6KIZ1h1hjvHsX41vnRvTmK8JZW3cMqziCnA j8UwTpj0FZTPOwDVdcNQ0+UXS1S7/crP4SpqsGr+aRwJfrUQoHAanGmgbljjqegn GHY8NepkHPDcP4W1Obrpwuj5YxnI2ds7yLKw70WKIgyxqJuFsuAVqJbFpvMA2xsL WXiRP3bzaaXHCUfrBRxYnpw4DEOJbf2uCtiV3uI1miRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ZgbqA4 lytSUhbXP2/Edibcpbn6VUbCzV8NEREKqv31c=; b=ywn2/mSiz4iqCOpgkxbmdb eumHkqM/+7F/Tj4bgqJ1s/RUsDoJJKxnuH3XvfqyKMCNpFgUqAnXFJO5jcMpEhg6 VopWjTrfh46TUl7hm//3j6Vcx9NiTmhnCWtGqeYAtVjukxJN2XwuY0efD4lJ4rae V5UwGCAxZg/GxVImp0C0/GAK1fItqQgYfWOGy2jgJ6kKdUk6NcJhhJNpS2SSs9ga wRe0jnqf3hacldJwDUGkq+DvTBhk8i5ewce9udA+uotOrEkAyyFByRvO47kRfu7G N+4uyeQTBuZQMiBEWQPzac3X1i+TnZJBnMPrMzSblx86Q/9RJv36BzhmvYojRzog == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvledgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgogfeguddtqddvjeculdehtddmnecujfgurhephf fvufffkfggtgfgsehtqhertddttdejnecuhfhrohhmpefmohhnrhgrugcujfhinhhsvghn uceokhhonhhrrggurdhhihhnshgvnhesfhgrshhtmhgrihhlrdhnvghtqeenucfkphepud elhedrvddvuddrtddrvddtieenucfrrghrrghmpehmrghilhhfrhhomhepkhhonhhrrggu rdhhihhnshgvnhesfhgrshhtmhgrihhlrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from KHs-MacBook.local (soleil-ext.synchrotron-soleil.fr [195.221.0.206]) by mail.messagingengine.com (Postfix) with ESMTPA id EF5F73060060; Tue, 12 Nov 2019 10:54:11 -0500 (EST) From: Konrad Hinsen Date: Fri, 8 Nov 2019 11:16:50 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: --- etc/news.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/etc/news.scm b/etc/news.scm index 08e06351e9..bc6d173365 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -9,6 +9,24 @@ (channel-news (version 0) Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: messagingengine.com] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [64.147.123.25 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (konrad.hinsen[at]fastmail.net) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 SPF_PASS SPF: sender matches SPF record 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: 0.4 (/) --- etc/news.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/etc/news.scm b/etc/news.scm index 08e06351e9..bc6d173365 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -9,6 +9,24 @@ (channel-news (version 0) =20 + (entry (commit "XXX") + (title (en "New command @command{guix time-machine}") + (de "Neuer Befehl @command{guix time-machine}") + (fr "Nouvelle commande @command{guix time-machine}")) + (body (en "The new command @command{guix time-machine} facilitates +access to older or newer revisions of Guix than the one that is installed. +It can be used to install different versions of packages, and to +re-create computational environments exactly as used in the past.") + (de "Der neue Befehl @command{guix time-machine} vereinfacht +den Zugriff auf =C3=A4ltere oder neuere Guix-Versionen als die installiert= e. +Er kann zur Installation bestimmer Paketversionen verwendet werden, aber +auch zur Wiederherstellung von Entwicklungsumgebungen, wie sie in der +Vergagngenheit verwendet wurden.") + (fr "La nouvelle commande @command{guix time-machine} +facilite l'acc=C3=A8s =C3=A0 des versions ant=C3=A9rieures ou post=C3=A9ri= eures par rapport +=C3=A0 la version install=C3=A9e. Elle sert =C3=A0 installer des versions= sp=C3=A9cifiques +de paquets, ainsi =C3=A0 la restauration d'environnements dans un =C3=A9tat +historique."))) (entry (commit "3e962e59d849e4300e447d94487684102d9d412e") (title (en "@command{guix graph} now supports package transformations")) --=20 2.24.0 From unknown Sun Jun 22 04:09:52 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Konrad Hinsen Subject: bug#37978: closed (Re: [bug#37978] [PATCH] guix: new command "guix time-machine") Message-ID: References: <875zjkzs1j.fsf@gnu.org> X-Gnu-PR-Message: they-closed 37978 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 37978@debbugs.gnu.org Date: Fri, 15 Nov 2019 22:37:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1573857422-20353-1" This is a multi-part message in MIME format... ------------=_1573857422-20353-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #37978: [PATCH] guix: new command "guix time-machine" which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 37978@debbugs.gnu.org. --=20 37978: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37978 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1573857422-20353-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 37978-done) by debbugs.gnu.org; 15 Nov 2019 22:36:02 +0000 Received: from localhost ([127.0.0.1]:37489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVkCA-0005H0-Hs for submit@debbugs.gnu.org; Fri, 15 Nov 2019 17:36:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVkC8-0005GW-Cy for 37978-done@debbugs.gnu.org; Fri, 15 Nov 2019 17:36:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iVkC3-0001uP-7B; Fri, 15 Nov 2019 17:35:55 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43608 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iVkC2-0004OT-Qn; Fri, 15 Nov 2019 17:35:55 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Konrad Hinsen Subject: Re: [bug#37978] [PATCH] guix: new command "guix time-machine" References: <87y2wt3ycb.fsf@gnu.org> Date: Fri, 15 Nov 2019 23:35:52 +0100 In-Reply-To: (Konrad Hinsen's message of "Fri, 08 Nov 2019 15:16:36 +0100") Message-ID: <875zjkzs1j.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37978-done Cc: 37978-done@debbugs.gnu.org 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 (---) Hi Konrad, Konrad Hinsen skribis: > Konrad Hinsen writes: > >> Thanks for your detailed comments, most of which I agree with, and I >> will make the required changes. > > I just submitted two new patches. Looking forward to everyone's feedbck! I=E2=80=99ve just applied them, thank you! I followed up with one commit to gracefully handle Git errors (e.g., when one type =E2=80=98--commit=3Dfoobar=E2=80=99) and another one to handl= e build options like the other commands. Let me know if anything looks wrong. Anyway, I can do things like this: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix time-machine --commit=3D65956ad3526ba09e1f7a40722c96c= 6ef7c0936fe -- package -A |wc -l Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.or= g/git/guix.git'... guile: warning: failed to install locale warning: failed to install locale: Invalid argument 7666 --8<---------------cut here---------------end--------------->8--- =E2=80=A6 where the commit in question is from June 2018. Pretty fun! It would be neat if the =E2=80=9CUpdating=E2=80=A6=E2=80=9D message wouldn= =E2=80=99t show up when in fact everything is already available. Also, it=E2=80=99d be nice if we cou= ld write (and in =E2=80=98guix pull=E2=80=99 too) =E2=80=98--date=3D2019-07-07= =E2=80=99 or =E2=80=98--date=3Dlast-month=E2=80=99. Future work! :-) Thanks again for this nifty command! Ludo=E2=80=99. ------------=_1573857422-20353-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Oct 2019 14:11:11 +0000 Received: from localhost ([127.0.0.1]:48427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPSDG-00025m-Nc for submit@debbugs.gnu.org; Tue, 29 Oct 2019 10:11:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:32900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPSDF-00025e-BN for submit@debbugs.gnu.org; Tue, 29 Oct 2019 10:11:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58835) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPSDC-00006w-N0 for guix-patches@gnu.org; Tue, 29 Oct 2019 10:11:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,SPOOFED_FREEMAIL,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPS5J-00036J-Jq for guix-patches@gnu.org; Tue, 29 Oct 2019 10:02:59 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48655) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iPS5I-00035r-Nt for guix-patches@gnu.org; Tue, 29 Oct 2019 10:02:57 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 21260217DD; Tue, 29 Oct 2019 10:02:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 29 Oct 2019 10:02:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm1; bh=2E1GIl9594m3wlk51NHCc7sodm YJJiQ6r/5fzOqj1AA=; b=TV4i/QkWyNta3MxEcuAEUhXmx0jlj5Lh6FIYWJX5go Bmg6+hUVrp84WJNmiWhGpGitLmY7ODpNj9tLGGt4c1+3z3rAfuDtDGnTLn/uN0cA UL//H+GTAzvOszIDsfGcr20SogyXoXWWM8f9q9hNfb7KCo1ytae5s+Es6cvL+twY 2AOVgrGJd+M80cCOmL95mkjZFU11HWN1RWrxEHg8sjpQrXkFQVwFwiDdroRYN5Co ZJDugFY8iUpEGWbmziP06aPIURNGoNlxOQXeUzyd9QwR0Ji6OLV9feH0E40JMAta qBsf5twDWtg4KYZEAQaYROn978Io2LvNOOShi6Ef/lDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=2E1GIl 9594m3wlk51NHCc7sodmYJJiQ6r/5fzOqj1AA=; b=saj1PhfK8Ozhq0sJBcznEi kgpJyIrIfzYMz6VUQykooLG2/1Z3VJikQfSzEurlKxUkJvkj6j4Gpp/4Ebz0C+7t qTVCT3ucPPYAkMZs5anPhgxdywlczgqW79zkdG78fX7NMa27xWIVE/ixSFRvfkA9 Jr77Ny9ciGJTtLD1bpsi+KSeGuKggJ1HN/UzFVf1s8xhAkTdFI0nBnlcgQX6eopg QI4RlIaQimUcOo+1IwBnehtsClqt9r/Cek3oLjmzQ660rJfCaR/E0GBkeFS1tUqN Kx0hxX0tDeDiW477hiLU5MWs7JsvaZYJiBpZFBlBXvo+WyPHcCOPpAXlanJpnFxg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddtuddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgfesthhqredttd dtjeenucfhrhhomhepmfhonhhrrgguucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhs vghnsehfrghsthhmrghilhdrnhgvtheqnecuffhomhgrihhnpehgnhhurdhorhhgnecukf hppeelvddrudeiledruddvjedrfeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkohhn rhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvthenucevlhhushhtvghrufhiii gvpedt X-ME-Proxy: Received: from ordinateur-de-catherine--konrad.home (lfbn-1-4129-33.w92-169.abo.wanadoo.fr [92.169.127.33]) by mail.messagingengine.com (Postfix) with ESMTPA id E2F9880059; Tue, 29 Oct 2019 10:02:53 -0400 (EDT) From: Konrad Hinsen To: guix-patches@gnu.org Subject: [PATCH] guix: new command "guix time-machine" Date: Fri, 25 Oct 2019 17:42:21 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.27 X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: submit 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: -2.6 (--) * guix/scripts/time-machine.scm: New file. * guix/scripts/pull.scm: Export function channel-list. * guix/inferior.scm: New function cached-guix-filetree-for-channels. * doc/guix.texi: Document "git time-machine" --- doc/guix.texi | 47 +++++++++++++++- guix/inferior.scm | 38 +++++++++---- guix/scripts/pull.scm | 1 + guix/scripts/time-machine.scm | 101 ++++++++++++++++++++++++++++++++++ 4 files changed, 174 insertions(+), 13 deletions(-) create mode 100644 guix/scripts/time-machine.scm diff --git a/doc/guix.texi b/doc/guix.texi index 7cc33c6e22..a147f16088 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -247,6 +247,7 @@ Utilities * Invoking guix container:: Process isolation. * Invoking guix weather:: Assessing substitute availability. * Invoking guix processes:: Listing client processes. +* Invoking guix time-machine:: Running an older version of Guix. =20 Invoking @command{guix build} =20 @@ -4142,7 +4143,10 @@ say, on another machine, by providing a channel spec= ification in @end lisp =20 The @command{guix describe --format=3Dchannels} command can even generate = this -list of channels directly (@pxref{Invoking guix describe}). +list of channels directly (@pxref{Invoking guix describe}). The resulting +file can be used with the -C options of @command{guix pull} +(@pxref{Invoking guix pull}) or @command{guix time-machine} +(@pxref{Invoking guix time-machine}). =20 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 @@ -7894,6 +7898,7 @@ the Scheme programming interface of Guix in a conveni= ent way. * Invoking guix container:: Process isolation. * Invoking guix weather:: Assessing substitute availability. * Invoking guix processes:: Listing client processes. +* Invoking guix time-machine:: Running an older version of Guix. @end menu =20 @node Invoking guix build @@ -10563,6 +10568,46 @@ ClientPID: 19419 ClientCommand: cuirass --cache-directory /var/cache/cuirass @dots{} @end example =20 +@node Invoking guix time-machine +@section Invoking @command{guix time-machine} + +@cindex @command{guix time-machine} +@cindex pinning, channels +@cindex replicating Guix +@cindex reproducibility, of Guix + +The @command{guix time-machine} command provides access to older +versions of Guix, for example to install older versions of packages, +or to reproduce a computation in an identical environment. The version +of Guix to be used is defined by a commit or by a channel +description file created by @command{guix describe} +(@pxref{Invoking guix describe}). + +The general syntax is: + +@example +guix time-machine @var{channels} -- @var{command} @var {arg}@dots{} +@end example + +where @var{command} and @var{arg}@dots{} are passed unmodified to the +@command{guix} command in its old version. The @var{channels} that define +this version can be specified using the following options: + +@table @code +@item --url=3D@var{url} +@itemx --commit=3D@var{commit} +@itemx --branch=3D@var{branch} +Use the @code{guix} channel from the specified @var{url}, at the +given @var{commit} (a valid Git commit ID represented as a hexadecimal +string), or @var{branch}. + +@item --channels=3D@var{file} +@itemx -C @var{file} +Read the list of channels from @var{file}. @var{file} must contain +Scheme code that evaluates to a list of channel objects. +@xref{Channels} for more information. +@end table + =20 @node System Configuration @chapter System Configuration diff --git a/guix/inferior.scm b/guix/inferior.scm index b8e2f21f42..cb80bb43d5 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -89,6 +89,7 @@ gexp->derivation-in-inferior =20 %inferior-cache-directory + cached-guix-filetree-for-channels inferior-for-channels)) =20 ;;; Commentary: @@ -635,16 +636,13 @@ failing when GUIX is too old and lacks the 'guix repl= ' command." (make-parameter (string-append (cache-directory #:ensure? #f) "/inferiors"))) =20 -(define* (inferior-for-channels channels - #:key - (cache-directory (%inferior-cache-director= y)) - (ttl (* 3600 24 30))) - "Return an inferior for CHANNELS, a list of channels. Use the cache at -CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This -procedure opens a new connection to the build daemon. - -This is a convenience procedure that people may use in manifests passed to -'guix package -m', for instance." +(define* (cached-guix-filetree-for-channels channels + #:key + (cache-directory (%inferior-ca= che-directory)) + (ttl (* 3600 24 30))) + "Return a directory containing a guix filetree defined by CHANNELS, a li= st of channels. +The directory is a subdirectory of CACHE-DIRECTORY, where entries can be r= eclaimed after TTL seconds. +This procedure opens a new connection to the build daemon." (with-store store (let () (define instances @@ -680,7 +678,7 @@ This is a convenience procedure that people may use in = manifests passed to (file-expiration-time ttl)) =20 (if (file-exists? cached) - (open-inferior cached) + cached (run-with-store store (mlet %store-monad ((profile (channel-instances->derivation instances)= )) @@ -689,4 +687,20 @@ This is a convenience procedure that people may use in= manifests passed to (built-derivations (list profile)) (symlink* (derivation->output-path profile) cached) (add-indirect-root* cached) - (return (open-inferior cached))))))))) + (return cached)))))))) + +(define* (inferior-for-channels channels + #:key + (cache-directory (%inferior-cache-director= y)) + (ttl (* 3600 24 30))) + "Return an inferior for CHANNELS, a list of channels. Use the cache at +CACHE-DIRECTORY, where entries can be reclaimed after TTL seconds. This +procedure opens a new connection to the build daemon. + +This is a convenience procedure that people may use in manifests passed to +'guix package -m', for instance." + (define cached + (cached-guix-filetree-for-channels channels + #:cache-directory cache-directory + #:ttl ttl)) + (open-inferior cached)) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 80d070652b..a508e817b2 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -56,6 +56,7 @@ #:use-module (ice-9 vlist) #:use-module (ice-9 format) #:export (display-profile-content + channel-list guix-pull)) =20 diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm new file mode 100644 index 0000000000..8e954d51e1 --- /dev/null +++ b/guix/scripts/time-machine.scm @@ -0,0 +1,101 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2019 Konrad Hinsen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts time-machine) + #:use-module (guix ui) + #:use-module (guix scripts) + #:use-module (guix inferior) + #:use-module (guix channels) + #:use-module ((guix scripts pull) #:select (channel-list)) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-37) + #:export (guix-time-machine)) + + +;;; +;;; Command-line options. +;;; + +(define (show-help) + (display (G_ "Usage: guix time-machine [OPTION] -- COMMAND ARGS... +Execute COMMAND ARGS... in an older version of Guix.\n")) + (display (G_ " + -C, --channels=3DFILE deploy the channels defined in FILE")) + (display (G_ " + --url=3DURL use the Git repository at URL")) + (display (G_ " + --commit=3DCOMMIT use the specified COMMIT")) + (display (G_ " + --branch=3DBRANCH use the tip of the specified BRANCH")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specifications of the command-line options. + (list (option '(#\C "channels") #t #f + (lambda (opt name arg result) + (alist-cons 'channel-file arg result))) + (option '("url") #t #f + (lambda (opt name arg result) + (alist-cons 'repository-url arg + (alist-delete 'repository-url result)))) + (option '("commit") #t #f + (lambda (opt name arg result) + (alist-cons 'ref `(commit . ,arg) result))) + (option '("branch") #t #f + (lambda (opt name arg result) + (alist-cons 'ref `(branch . ,arg) result))) + (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix time-machine"))))) + +(define (parse-args args) + "Parse the list of command line arguments ARGS." + ;; The '--' token is used to separate the command to run from the rest of + ;; the operands. + (let-values (((args command) (break (cut string=3D? "--" <>) args))) + (let ((opts (parse-command-line args %options '(()) #:build-options? #= f))) + (match command + (() opts) + (("--") opts) + (("--" command ...) (alist-cons 'exec command opts)))))) + + +;;; +;;; Entry point. +;;; + +(define (guix-time-machine . args) + (with-error-handling + (let* ((opts (parse-args args)) + (channels (channel-list opts)) + (command-line (assoc-ref opts 'exec)) + (directory (cached-guix-filetree-for-channels channels)) + (executable (string-append directory "/bin/guix"))) + (apply system* (cons executable command-line))))) --=20 2.23.0 ------------=_1573857422-20353-1-- From unknown Sun Jun 22 04:09:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37978] [PATCH] guix: new command "guix time-machine" Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Nov 2019 09:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37978-done@debbugs.gnu.org Received: via spool by 37978-done@debbugs.gnu.org id=D37978.15738952044033 (code D ref 37978); Sat, 16 Nov 2019 09:07:01 +0000 Received: (at 37978-done) by debbugs.gnu.org; 16 Nov 2019 09:06:44 +0000 Received: from localhost ([127.0.0.1]:37739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVu2W-00012z-6I for submit@debbugs.gnu.org; Sat, 16 Nov 2019 04:06:44 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:44071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVu2U-00012l-Hn for 37978-done@debbugs.gnu.org; Sat, 16 Nov 2019 04:06:43 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id C10544DE; Sat, 16 Nov 2019 04:06:36 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sat, 16 Nov 2019 04:06:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm2; bh= nRyZTT9D10glQi9Gr1towISYOxSbPKgmWcZnMc8YU6M=; b=ZbaClPz1f07pjSnA KnN/dVBy4UCaHChixJInTIcq86tHOOHgdjxoQFEH0vYeWeeailGLqPDmp66XBGpJ sUaoegJ0vjurhGPz8wX7pbMUrzsXs3A6/JgZK67ljKfMv2ZS+bLTA5fWkjiaJVUQ U3SvaQmrUr7fRtH5O+coInc+6wm7yb78NgJYTKLr/MtPXctYIMYGfeah8V8GB8yJ BXGDze45LUSF45SmXQmbdfFOznu8k8Mki2bSsAAm912mWcTm9KHNrxkFpMIaH9GU mPjgaV2npKVJRCBWZ+e6mcgjsljlp9knIRTPuxCrZjBgIZ2FAiNZiXdkwJsMzRP9 eEIOMQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=nRyZTT9D10glQi9Gr1towISYOxSbPKgmWcZnMc8YU 6M=; b=mkauxbyHFvJFSZOOrn8zCA3TvHGyJFVYNjQLzaNmL7PiFNVjuf7LoIG34 snyidZr8I65gH4cBR2RBZjtQ8KkjR6AZPbVn5yvVAcrUmFflfQIgFZwj1yY/4+Bs UBiZLKyS57ZetH26ZYgW/KsPyaPyXOyMifbQeyGALHeD55XvE+BPAteBev2t3fOa PQEz1DvGA5nLTbgH1bkyT4DT+kPODYUBgLS7YBaS5LW0wChDQLRDkOewKKGdDxWX AQCUJCc8pwT/7w3MtqfXBUrLzLXl9JZh/FtXmemniY27SxtjuS71tK/Ldzw6MXt/ WkQMVoBOqONKipN5ngm2d2tIWUs/A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudefkedgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffffkgggtgfesthhqredttddtjeenucfhrhhomhepmfhonhhr rgguucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnh gvtheqnecukfhppeelvddrudeiledrjedruddtudenucfrrghrrghmpehmrghilhhfrhho mhepkhhonhhrrggurdhhihhnshgvnhesfhgrshhtmhgrihhlrdhnvghtnecuvehluhhsth gvrhfuihiivgeptd X-ME-Proxy: Received: from ordinateur-de-catherine--konrad.home (lfbn-1-4320-101.w92-169.abo.wanadoo.fr [92.169.7.101]) by mail.messagingengine.com (Postfix) with ESMTPA id AFB533060057; Sat, 16 Nov 2019 04:06:35 -0500 (EST) From: Konrad Hinsen In-Reply-To: <875zjkzs1j.fsf@gnu.org> References: <87y2wt3ycb.fsf@gnu.org> <875zjkzs1j.fsf@gnu.org> Date: Sat, 16 Nov 2019 10:06:34 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: -1.7 (-) Hi Ludo, > I followed up with one commit to gracefully handle Git errors (e.g., > when one type =E2=80=98--commit=3Dfoobar=E2=80=99) and another one to han= dle build options > like the other commands. Let me know if anything looks wrong. Quite on the contrary, everything looks fine - thanks! I hadn't realized that "guix pull" takes build options, but obviously that makes sense. > It would be neat if the =E2=80=9CUpdating=E2=80=A6=E2=80=9D message would= n=E2=80=99t show up when in > fact everything is already available. Also, it=E2=80=99d be nice if we c= ould > write (and in =E2=80=98guix pull=E2=80=99 too) =E2=80=98--date=3D2019-07-= 07=E2=80=99 or > =E2=80=98--date=3Dlast-month=E2=80=99. Future work! :-) Right. Also not pulling anything if the requested channels are identical to those of the current guix version. There's always more to to! Cheers, Konrad.