From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 20 12:34:18 2023 Received: (at submit) by debbugs.gnu.org; 20 Jul 2023 16:34:18 +0000 Received: from localhost ([127.0.0.1]:59634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMWba-0007IT-Bi for submit@debbugs.gnu.org; Thu, 20 Jul 2023 12:34:18 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMWbX-0007I8-Kv for submit@debbugs.gnu.org; Thu, 20 Jul 2023 12:34:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMWbS-0006KA-2U for guix-patches@gnu.org; Thu, 20 Jul 2023 12:34:10 -0400 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qMWbP-0006lX-V5 for guix-patches@gnu.org; Thu, 20 Jul 2023 12:34:09 -0400 Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-4039a2b71c1so8120951cf.0 for ; Thu, 20 Jul 2023 09:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689870846; x=1690475646; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=045dGLNHIPQhzDZ2hgQBBy4cIPRrb+GTPYAsubP80dE=; b=GPYkpFFgwQ+WqAjOua0dMZhrPk9NSeVoWqWsPsKSI0Tx8RPRdulEZmhsvkbqDmwj3L AidSDmDWIg/Dx7Mv8uDtIyvF/teVJZesZZx3rmgGij1c8jBnH5LRlQBZHwoq56upVf8W mQ2H0GodNjPI1q27At3IJ9Rk/c+tEKgNsAulpdga9DgEtbKS37FrwqGa76WFILKUJcuW h3am+z014jJeAHhux6t4HpRAoAF66TqoYbFUNkIsq2dAL8P6L1Jsi9KNQQtjxfXAWRmk K4HGHUF6sV5o+6rP2CYbeurp69zlFmHupBuw/2qMRsf2VTLXI4qoXHjKKr5wPTs1IpI1 U8lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689870846; x=1690475646; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=045dGLNHIPQhzDZ2hgQBBy4cIPRrb+GTPYAsubP80dE=; b=QENp7BsgoeiyDG8O1eG+/gCmB8N34kugHWreSVeZjW6TcT49CcyLxLQryyT7bBNyyh hyoIqQK6rjbWSlvhHbZ0TlBuXmF3SK/rkNx0FIr37dWg18g/jyGPZBsbH/ELN/xlUUdO HcLEok/X3rlhtM4MHQLWvsfWsvn8twlJjOvkizAzIq87ZsoVx2nXiru35xgNF5S+btBS PnAaZkjmgqdsGRvRpfUsjCD4UJx6vIy3mTmq6icMEHV6tCOtFs0aWwmTIrKj4gR7qcry FOW4FouQqGOJUpsYaavb5tNMvT6DFmdqsiJe0eNT7W0L2Fnw2ATvIk4C+NXVjp8JlFVn /tfA== X-Gm-Message-State: ABy/qLYlvdHFdPn9saJe5T5LW9f/xRMEAuJhramhuutuqsaaGs//hco+ 5PMTE3Zw2OWmFwr1xjKQOSNaBWw2Xek= X-Google-Smtp-Source: APBJJlH0pXITnxf/op/3+JE3lKNDWzUBJKgkEVyUutKUo/oXXuGgi5mhmqsW5jyNpKTTOqO52hjCxA== X-Received: by 2002:ac8:5992:0:b0:405:4673:58e0 with SMTP id e18-20020ac85992000000b00405467358e0mr1378729qte.63.1689870846507; Thu, 20 Jul 2023 09:34:06 -0700 (PDT) Received: from localhost.localdomain (dsl-159-145.b2b2c.ca. [66.158.159.145]) by smtp.gmail.com with ESMTPSA id j7-20020ac84c87000000b00401e04c66fesm510860qtv.37.2023.07.20.09.34.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 09:34:06 -0700 (PDT) From: Maxim Cournoyer To: guix-patches@gnu.org, maxim.cournoyer@gmail.com Subject: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. Date: Thu, 20 Jul 2023 12:34:01 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x830.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Simon Tournier 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.0 (/) * doc/guix.texi (Invoking guix time-machine): Document limitation. * guix/scripts/time-machine.scm (%oldest-possible-commit): New variable. (guix-time-machine): Raise an error when the channel commit is too old. Suggested-by: Simon Tournier --- doc/guix.texi | 6 ++++++ guix/scripts/time-machine.scm | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1d8ebcd72f..30fef813c0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5056,6 +5056,12 @@ Invoking guix time-machine large number of packages; the result is cached though and subsequent commands targeting the same commit are almost instantaneous. +Due to @command{guix time-machine} relying on the ``inferiors'' +mechanism (@pxref{Inferiors}), the oldest commit it can travel to is +commit @samp{2ca299caf} (``Add (guix inferior) and (guix scripts +repl).''), dated July 10@sup{th}, 2018. An error is returned when +attempting to navigate to older commits. + @quotation Note The history of Guix is immutable and @command{guix time-machine} provides the exact same software as they are in a specific Guix diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm index d7c71ef705..36a40a1538 100644 --- a/guix/scripts/time-machine.scm +++ b/guix/scripts/time-machine.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2019 Konrad Hinsen ;;; Copyright © 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,13 +20,15 @@ ;;; along with GNU Guix. If not, see . (define-module (guix scripts time-machine) + #:use-module (guix channels) + #:use-module (guix diagnostics) #:use-module (guix ui) #:use-module (guix scripts) #:use-module (guix inferior) #:use-module (guix store) #:use-module (guix status) #:use-module ((guix git) - #:select (with-git-error-handling)) + #:select (update-cached-checkout with-git-error-handling)) #:use-module ((guix utils) #:select (%current-system)) #:use-module ((guix scripts pull) @@ -38,9 +41,16 @@ (define-module (guix scripts time-machine) #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) #:use-module (srfi srfi-37) + #:use-module (srfi srfi-71) #:export (guix-time-machine)) +;;; The commit introducing the 'inferiors' mechanism; it is the oldest commit +;;; that can be travelled to. +(define %oldest-possible-commit + "2ca299caf64489f4e1e665ec1158fb0309b0b565") + ;;; ;;; Command-line options. @@ -139,9 +149,20 @@ (define-command (guix-time-machine . args) (with-git-error-handling (let* ((opts (parse-args args)) (channels (channel-list opts)) + (guix-channel (find guix-channel? channels)) (command-line (assoc-ref opts 'exec)) + (ref (assoc-ref opts 'ref)) + (checkout commit relation (update-cached-checkout + (channel-url guix-channel) + #:ref (or ref '()) + #:starting-commit + %oldest-possible-commit)) (substitutes? (assoc-ref opts 'substitutes?)) (authenticate? (assoc-ref opts 'authenticate-channels?))) + (unless (memq relation '(ancestor self)) + (raise (formatted-message + (G_ "cannot travel past commit `~a' from July 10th, 2018") + (string-take %oldest-possible-commit 12)))) (when command-line (let* ((directory (with-store store -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 21 22:00:31 2023 Received: (at 64746) by debbugs.gnu.org; 22 Jul 2023 02:00:31 +0000 Received: from localhost ([127.0.0.1]:35111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qN1v4-00058b-NS for submit@debbugs.gnu.org; Fri, 21 Jul 2023 22:00:31 -0400 Received: from mail-yb1-xb35.google.com ([2607:f8b0:4864:20::b35]:49310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qN1v1-00058K-Br for 64746@debbugs.gnu.org; Fri, 21 Jul 2023 22:00:29 -0400 Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-cfd4ea89978so2446039276.2 for <64746@debbugs.gnu.org>; Fri, 21 Jul 2023 19:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689991222; x=1690596022; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=84bt8yTfmKNvfCBcpxsZ9mzm/vcHul3LDpYK5nHUiiM=; b=CG/c30GtPoZXBCzdXBDqDrKVe4RHfIIHZ79QqD2iiz7m5IfUyD/kflSXJhJ5afGXGr deMPwaBEYngtiKXADF0sPI2VYxUN7zhT4CuAo8UJ8d/zwBDRVny0rBbcvqNyYWX2ihbS u5MSFH4qfnmfJwBZbdh53ddnxJbOB+x0U1hPNfhWUww+MI136MgL15w3c5vFrAg1zaKP RaeofXCY74s5WnLwnQKsdXcETyj0Xn0rpouNPj1+bOs4JCRfNg1kLVlCebHlIM2JfaVJ uHY0nDuL6xaFBL1rc/FEaLgyPUAMMZJ7HHx3cTjIS5YwRBohUR+ksX9inpw8qjpPkreo RbNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689991222; x=1690596022; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=84bt8yTfmKNvfCBcpxsZ9mzm/vcHul3LDpYK5nHUiiM=; b=VUjM8YNsk5EDULoLWv0iWLiyZmM8lSEkEQlEohGZNVIQCtRbmY2vJ7e2nA3b8OkOuv DgcoHVs01EAJsTm6ZNLfRlCBVhYAn8K2zKWha+cMHSsJiqm2tN/GF6nR24q2Rp0ek58r /FLh8Gvmv6P0GyRlF28h4pvXA8q8qYj/3l29EpvIpQXB/pQGMYOODuSi9+IJhipO92aV Psv1Pap/CXOCa5dk3fX2dQ4yK2vqyKpIXH6BlXZTub4BkWYL23qQEdd0arUfFbgi+NT8 7FBh4czmjw2TuJX1eZXKNJBF1l4JR86c/h3U54mrVfqLCirQuwPRVVqPoHVOmkNAGHAy /2Dw== X-Gm-Message-State: ABy/qLbyz4OJ/ijd4sn9UikqapUWnAMAgzOXK0qhUHBaFRJWUubJNja9 Utjjc3sZVEJ2dXnwReXh0vE= X-Google-Smtp-Source: APBJJlEkALoMuZ2ySKItyasVCK/CQOX1MGd5AdvN6YG7dyY5pwAVmSfbveMqj3JoHHhuojhAv2s7yw== X-Received: by 2002:a25:738e:0:b0:cdd:6635:a1f8 with SMTP id o136-20020a25738e000000b00cdd6635a1f8mr3307953ybc.15.1689991221748; Fri, 21 Jul 2023 19:00:21 -0700 (PDT) Received: from hurd (dsl-10-135-166.b2b2c.ca. [72.10.135.166]) by smtp.gmail.com with ESMTPSA id ou37-20020a05620a622500b00767cc1463e9sm1531682qkn.75.2023.07.21.19.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 19:00:20 -0700 (PDT) From: Maxim Cournoyer To: 64746@debbugs.gnu.org Subject: Re: bug#64746: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. References: Date: Fri, 21 Jul 2023 22:00:18 -0400 In-Reply-To: (Maxim Cournoyer's message of "Thu, 20 Jul 2023 12:34:01 -0400") Message-ID: <87lef8hfil.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Christopher Baines , Ricardo Wurmus 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 (-) Hello, Maxim Cournoyer writes: > * doc/guix.texi (Invoking guix time-machine): Document limitation. > * guix/scripts/time-machine.scm (%oldest-possible-commit): New variable. > (guix-time-machine): Raise an error when the channel commit is too old. > > Suggested-by: Simon Tournier > --- > doc/guix.texi | 6 ++++++ > guix/scripts/time-machine.scm | 23 ++++++++++++++++++++++- > 2 files changed, 28 insertions(+), 1 deletion(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 1d8ebcd72f..30fef813c0 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -5056,6 +5056,12 @@ Invoking guix time-machine > large number of packages; the result is cached though and subsequent > commands targeting the same commit are almost instantaneous. >=20=20 > +Due to @command{guix time-machine} relying on the ``inferiors'' > +mechanism (@pxref{Inferiors}), the oldest commit it can travel to is > +commit @samp{2ca299caf} (``Add (guix inferior) and (guix scripts > +repl).''), dated July 10@sup{th}, 2018. An error is returned when > +attempting to navigate to older commits. > + > @quotation Note > The history of Guix is immutable and @command{guix time-machine} > provides the exact same software as they are in a specific Guix > diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm > index d7c71ef705..36a40a1538 100644 > --- a/guix/scripts/time-machine.scm > +++ b/guix/scripts/time-machine.scm > @@ -2,6 +2,7 @@ > ;;; Copyright =C2=A9 2019 Konrad Hinsen > ;;; Copyright =C2=A9 2019, 2020, 2021 Ludovic Court=C3=A8s > ;;; Copyright =C2=A9 2021 Simon Tournier > +;;; Copyright =C2=A9 2023 Maxim Cournoyer > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -19,13 +20,15 @@ > ;;; along with GNU Guix. If not, see . >=20=20 > (define-module (guix scripts time-machine) > + #:use-module (guix channels) > + #:use-module (guix diagnostics) > #:use-module (guix ui) > #:use-module (guix scripts) > #:use-module (guix inferior) > #:use-module (guix store) > #:use-module (guix status) > #:use-module ((guix git) > - #:select (with-git-error-handling)) > + #:select (update-cached-checkout with-git-error-handling= )) > #:use-module ((guix utils) > #:select (%current-system)) > #:use-module ((guix scripts pull) > @@ -38,9 +41,16 @@ (define-module (guix scripts time-machine) > #:use-module (srfi srfi-1) > #:use-module (srfi srfi-11) > #:use-module (srfi srfi-26) > + #:use-module (srfi srfi-34) > #:use-module (srfi srfi-37) > + #:use-module (srfi srfi-71) > #:export (guix-time-machine)) >=20=20 > +;;; The commit introducing the 'inferiors' mechanism; it is the oldest c= ommit > +;;; that can be travelled to. > +(define %oldest-possible-commit > + "2ca299caf64489f4e1e665ec1158fb0309b0b565") I just tried travelling to that assumed oldest commit (because it corresponds to the introduction of the inferiors mechanism), but it fails like: --8<---------------cut here---------------start------------->8--- Computing Guix derivation for 'x86_64-linux'... Backtrace: - 5 (primitive-load "/gnu/store/b70mihsj9xx0xxp6izliqb5vm4=E2=80= =A6") In ice-9/eval.scm: 155:9 4 (_ _) 159:9 3 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) =E2= =80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6)) 173:47 2 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) =E2= =80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6)) In ./guix/self.scm: 932:4 1 (guix-derivation "/gnu/store/yfn2s94i5bvwr7j7r6xcnivwg=E2=80= =A6" =E2=80=A6) 903:2 0 (guile-for-build "3.0") ./guix/self.scm:903:2: In procedure guile-for-build: Throw to key `match-error' with args `("match" "no matching pattern" "3.0")= '. Backtrace: In ice-9/boot-9.scm: 1752:10 19 (with-exception-handler _ _ #:unwind? _ # _) In guix/store.scm: 659:37 18 (thunk) In guix/status.scm: 839:4 17 (call-with-status-report _ _) In guix/store.scm: 1298:8 16 (call-with-build-handler # =E2=80=A6) In guix/monads.scm: 576:2 15 (run-with-store # =E2=80= =A6) In guix/inferior.scm: 927:8 14 (_ _) In guix/channels.scm: 982:2 13 (_ _) 924:2 12 (_ _) In guix/store.scm: 1883:0 11 (_ _) 1996:8 10 (_ _) In guix/channels.scm: 675:14 9 (_ #) In guix/monads.scm: 576:2 8 (run-with-store # =E2=80= =A6) In guix/store.scm: 1298:8 7 (call-with-build-handler _ _) 1298:8 6 (call-with-build-handler # =E2=80=A6) In guix/channels.scm: 690:14 5 (_) In guix/monads.scm: 576:2 4 (run-with-store # =E2=80= =A6) In ice-9/eval.scm: 191:27 3 (_ #(#(# #) = =E2=80=A6)) In ice-9/boot-9.scm: 2007:7 2 (error _ . _) 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: invalid build result (# /gnu/store/b70mihsj9xx0xxp6izliqb5vm46= 2yifl-compute-guix-derivation 7ff1d8b55000> "") --8<---------------cut here---------------end--------------->8--- Is this a bug or expected? --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 08 11:58:42 2023 Received: (at 64746) by debbugs.gnu.org; 8 Aug 2023 15:58:42 +0000 Received: from localhost ([127.0.0.1]:37590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTP6Y-0004b8-9E for submit@debbugs.gnu.org; Tue, 08 Aug 2023 11:58:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTP6V-0004at-U9 for 64746@debbugs.gnu.org; Tue, 08 Aug 2023 11:58:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTP6N-0004ZW-AJ; Tue, 08 Aug 2023 11:58:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=VgUfGF+KBqC7tpH/aCsG6egEHavvHJzSHYTmRsl8BKY=; b=WuWbt5VZeEryls9KA36v 5V+eof6PHMP1y++XjYbiKeKcb4fDqro9E/I0Lh9tgTXvzuWxMj90BZl+qQ2Q7bSlg+CGoCkK7eDVO E2tu4e+MBv4QpPr7W6WqMwTQvLrN0rgD8nQBU6CL5ul4m5tDDhz+YXfu9TM64zhnvcM60Usz/wYP/ 5zErCPKFU1MKoLMby+tSwxbGPFmgLOwBSYsuL9FWGM0QpgY23aIFnhz+RmoI0chPFolmMdShK0AdX Bhf48Vtsz/6fZvp2duUqmYCgUvVQA/t7evuaoA1PMOhjb28FclAYKaKsoSVz8LlwuphxUJcTSjgNv RrAjEB3MP3wQbQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#64746: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. References: <87lef8hfil.fsf_-_@gmail.com> Date: Tue, 08 Aug 2023 17:58:27 +0200 In-Reply-To: <87lef8hfil.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Fri, 21 Jul 2023 22:00:18 -0400") Message-ID: <87leelpluk.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Christopher Baines , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@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! Maxim Cournoyer skribis: >> +;;; The commit introducing the 'inferiors' mechanism; it is the oldest = commit >> +;;; that can be travelled to. >> +(define %oldest-possible-commit >> + "2ca299caf64489f4e1e665ec1158fb0309b0b565") > > I just tried travelling to that assumed oldest commit (because it > corresponds to the introduction of the inferiors mechanism), but it > fails like: > > Computing Guix derivation for 'x86_64-linux'... Backtrace: > - 5 (primitive-load "/gnu/store/b70mihsj9xx0xxp6izliqb5vm4=E2= =80=A6") > In ice-9/eval.scm: > 155:9 4 (_ _) > 159:9 3 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6= ) =E2=80=A6)) > 173:47 2 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6= ) =E2=80=A6)) > In ./guix/self.scm: > 932:4 1 (guix-derivation "/gnu/store/yfn2s94i5bvwr7j7r6xcnivwg=E2=80= =A6" =E2=80=A6) > 903:2 0 (guile-for-build "3.0") > > ./guix/self.scm:903:2: In procedure guile-for-build: > Throw to key `match-error' with args `("match" "no matching pattern" "3.0= ")'. I would pick =E2=80=98v0.15.0=E2=80=99 (=3D 359fdda40f754bbf1b5dc261e7427b7= 5463b59be) as the oldest commit one can travel to; it=E2=80=99s a bit newer than the one above, but it fails in the same way (to my surprise). It would be interesting to investigate. That said, we could just as well pick =E2=80=98v1.0.0=E2=80=99, which is th= e official warranty-void limit, and which seems to work (it needs to build things, though=E2=80=A6). Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 10 10:47:53 2023 Received: (at 64746) by debbugs.gnu.org; 10 Aug 2023 14:47:54 +0000 Received: from localhost ([127.0.0.1]:43814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU6x7-0006ut-4D for submit@debbugs.gnu.org; Thu, 10 Aug 2023 10:47:53 -0400 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]:55447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU6x3-0006tv-RI for 64746@debbugs.gnu.org; Thu, 10 Aug 2023 10:47:51 -0400 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-5607cdb0959so706819eaf.2 for <64746@debbugs.gnu.org>; Thu, 10 Aug 2023 07:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691678864; x=1692283664; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=JQ3okn3ScwJlRt+tLYLPoxtjmOuQocy0Hr/gAI5hBi8=; b=Y3uhHoSkzjpmGm+6rbrudPX0xAG/Mr5xUgpDxF6pD3eHNZtrXa2IZOV7J9bVE8/0F9 J5+4P2AFa39dxQaCuiPW3+lK9N2XPjsYAwO11GgmW4exnDyIgn78Zi1LpE5u0Q5htF1f W0tHkjmx2X/tlW/aMSQfQ7/M/QMYXze+ShZS0xp/Xw7VjMcelJwIRExkxBziPUirq11c DDoQrLL0Rjq4krDJjGBwxon/SP+NNI0mbj+CVAIyWz21+7Cz04QAjQSQRAwP+I8WJxoV ZBu+W28vsZ4dQ0lZcNGakwT1kT/eqMrU0xxuC4bLMYQ0NEArKYK0BvRauyGLlAe9G6L2 pO7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691678864; x=1692283664; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=JQ3okn3ScwJlRt+tLYLPoxtjmOuQocy0Hr/gAI5hBi8=; b=ldtbjH6EeopqiY8i5HSXoUSVak0HSZn4KH04VHmqjrtCUyWHD6ejx9m+6FuLQ7cdIx thA255fw68DR+m6Gnon+yGW6ptifbl8yuKjzdhrncs6keSdwHUIFvwzpMCNbZ9gxAKHh O4IKaz1oO+WDAKaCPro8J2SrRWai2asCOeK0VTHAWVv/ZblMZH2jn700tYSp2hRdskbR j4vYnomTBu6nuGjL4RTpGtebyjdAeYb62A6qgpahKsRBxTD1ka6X1wz6nfKOIMWpTctY QCK/lor8N0rrVRl98bRFsUrKvkIx6WHoyHKQwfunn5SZzc+OitARsSAf+KZPZq3ebEy0 0h4g== X-Gm-Message-State: AOJu0YzQ8VfiyX1SmUGwtBqXWtZB85ubfHwashOEuHuWcy0kDZsdkhEV fdrnzxk0TZyBH91xUCQQdb4= X-Google-Smtp-Source: AGHT+IHcL68qylStxtKCinB3K3BXIuvZvbulRlfKXkGrdMfKlL9F6YCqHQJUCDRMmr+EJshT+O1OOg== X-Received: by 2002:a05:6808:16a9:b0:3a7:1bd8:4eb6 with SMTP id bb41-20020a05680816a900b003a71bd84eb6mr2977972oib.44.1691678864010; Thu, 10 Aug 2023 07:47:44 -0700 (PDT) Received: from hurd (dsl-205-236-230-92.b2b2c.ca. [205.236.230.92]) by smtp.gmail.com with ESMTPSA id i17-20020a0cf391000000b0063f7c96db4asm517964qvk.142.2023.08.10.07.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 07:47:43 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#64746: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. References: <87lef8hfil.fsf_-_@gmail.com> <87leelpluk.fsf_-_@gnu.org> Date: Thu, 10 Aug 2023 10:47:42 -0400 In-Reply-To: <87leelpluk.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Tue, 08 Aug 2023 17:58:27 +0200") Message-ID: <87leejeyy9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Christopher Baines , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@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: -1.0 (-) Hi Ludo! Ludovic Court=C3=A8s writes: > Hi! > > Maxim Cournoyer skribis: > >>> +;;; The commit introducing the 'inferiors' mechanism; it is the oldest= commit >>> +;;; that can be travelled to. >>> +(define %oldest-possible-commit >>> + "2ca299caf64489f4e1e665ec1158fb0309b0b565") >> >> I just tried travelling to that assumed oldest commit (because it >> corresponds to the introduction of the inferiors mechanism), but it >> fails like: >> >> Computing Guix derivation for 'x86_64-linux'... Backtrace: >> - 5 (primitive-load "/gnu/store/b70mihsj9xx0xxp6izliqb5vm4=E2= =80=A6") >> In ice-9/eval.scm: >> 155:9 4 (_ _) >> 159:9 3 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6= ) =E2=80=A6)) >> 173:47 2 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6= ) =E2=80=A6)) >> In ./guix/self.scm: >> 932:4 1 (guix-derivation "/gnu/store/yfn2s94i5bvwr7j7r6xcnivwg=E2= =80=A6" =E2=80=A6) >> 903:2 0 (guile-for-build "3.0") >> >> ./guix/self.scm:903:2: In procedure guile-for-build: >> Throw to key `match-error' with args `("match" "no matching pattern" "3.= 0")'. > > I would pick =E2=80=98v0.15.0=E2=80=99 (=3D 359fdda40f754bbf1b5dc261e7427= b75463b59be) as > the oldest commit one can travel to; it=E2=80=99s a bit newer than the one > above, but it fails in the same way (to my surprise). It would be > interesting to investigate. > > That said, we could just as well pick =E2=80=98v1.0.0=E2=80=99, which is = the official > warranty-void limit, and which seems to work (it needs to build things, > though=E2=80=A6). I tried building v1.0.0 but it failed the same as earlier attempts on Python 2, which has a SSL test failing due to now-expired certificates: --8<---------------cut here---------------start------------->8--- @ build-log 18017 117=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 /gnu/store/gfprsx2m62cvqbh7ysc9ay9slhijvmal-module-import/guix/build/gnu-bu= ild-system.scm:369:6: In procedso = ure check:=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 @ build-log 18017 167=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 Throw to key `srfi-34' with args `(#)'. = 40=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 \@ build-log 18017 101=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 builder for `/gnu/store/sp947xhp8dqfzn3zd2m0aq4ia5qvklbl-python2-2.7.15.drv= ' failed with exit code 1 @ build-log 18017 183 = -o @ build-failed /gnu/store/sp947xhp8dqfzn3zd2m0aq4ia5qvklbl-python2-2.7.15.d= rv - 1 builder for `/gnu/store/h-sp947xhp8dqfzn3zd2m0aq4ia5qvklbl-python2-2= .7.15.drv' failed with exit code 1 @ build-log 18017 189 derivation '/gnu/store/sp947xhp8dqfzn3zd2m0aq4ia5qvklbl-python2-2.7.15.drv'= offloaded to '10.0.0.7' failede-: build of `/gnu/store/sp947xhp8dqfzn3zd2m= 0aq4ia5qvklbl-python2-2.7.15.drv' failed ar @ build-failed /gnu/store/sp947xhp8dqfzn3zd2m0aq4ia5qvklbl-python2-2.7.15.d= rv - 1 builder for `/gnu/store/cesp947xhp8dqfzn3zd2m0aq4ia5qvklbl-python2-2= .7.15.drv' failed with exit code 100 Backtrace: In ./guix/gexp.scm: 573:13 19 (_ _)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 In ./guix/store.scm: 1667:8 18 (_ _) 1667:8 17 (_ _) = so In ./guix/gexp.scm: 708:2 16 (_ _) In ./guix/monads.scm: 482:9 15 (_ _) In ./guix/gexp.scm: 573:13 14 (_ _) In ./guix/store.scm: 1667:8 13 (_ _) In ./guix/gexp.scm: 708:2 12 (_ _) In ./guix/monads.scm: = 9} 482:9 11 (_ _) In ./guix/gexp.scm: 573:13 10 (_ _) In ./guix/store.scm: = 37 1667:8 9 (_ _) = 36 In ./guix/gexp.scm: = 1c 708:2 8 (_ _) = 2! In ./guix/monads.scm: = 3I 482:9 7 (_ _) = \1 | In ./guix/gexp.scm: 573:13 6 (_ _) In ./guix/store.scm: 1667:8 5 (_ _) 1690:38 4 (_ #) In ./guix/packages.scm: 936:16 3 (cache! # # ?) 1255:22 2 (thunk) 1188:25 1 (bag->derivation # ?) In srfi/srfi-1.scm: 592:17 0 (map1 (("source" # url: "?>) ?)) srfi/srfi-1.scm:592:17: In procedure map1: Throw to key `srfi-34' with args `(#)'. guix time-machine: erreur : You found a bug: the program '/gnu/store/d12x45= lz2dv3mgp594kzjv0d121g0ncs-compute-guix-derivation' failed to compute the derivation for Guix (version: "6298c3ffd9654d3231a6f2= 5390b056483e8f407c"; system: "xso86_64-linux"; host version: "985638aea14720e16ed5fd94a0e1382a57dec7ac"; pull-version: 1). Please report it by email to . --8<---------------cut here---------------end--------------->8--- Since we can't retroactively fix this kind of problem, it means we should find the oldest commit which is immune to that problem? --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 10 12:56:53 2023 Received: (at 64746) by debbugs.gnu.org; 10 Aug 2023 16:56:53 +0000 Received: from localhost ([127.0.0.1]:43941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU8xx-0001yB-5o for submit@debbugs.gnu.org; Thu, 10 Aug 2023 12:56:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU8xu-0001xw-2s for 64746@debbugs.gnu.org; Thu, 10 Aug 2023 12:56:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU8xm-0004Bp-Tm; Thu, 10 Aug 2023 12:56:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=2HGRZ0zyHb5XVKk9Lywz9upGd++8BMClCjPELJzU0Qs=; b=rI0S3egkGXrf1npsk/Cs 2Zj1EM+wk+dgGuWLtqU1m30lHkD2W12gU1XbK/Roz0Kw6+hTeivOcdCLyz5A1PJcuovUUsEmMpraK cGMGM9JEXn6cuy/TFbQjgDBCJLl75OrEuZ3led89h/MXKotAo5s+3u3OoVjJ0asDtQZ9tahj94tFE l4lxNyi3XMJORo4ajhUtQJS48vRj9OSg1rE36qo6R/vwuZL8COk6+aYu2bMMduwOg8CB87etuHznv O2uV1I0tH5kfbv21g3/QOLW1LZL0R8xA+sHxWJPVQKMhOHZyMIcxXor7tM8g6ZX7BaH4INbnlyE1q lbH7wxO8suRQgA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#64746: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. References: <87lef8hfil.fsf_-_@gmail.com> <87leelpluk.fsf_-_@gnu.org> <87leejeyy9.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 23 Thermidor an 231 de la =?utf-8?Q?R=C3=A9vol?= =?utf-8?Q?ution=2C?= jour de la Lentille 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, 10 Aug 2023 18:56:38 +0200 In-Reply-To: <87leejeyy9.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 10 Aug 2023 10:47:42 -0400") Message-ID: <87bkfekf95.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Christopher Baines , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@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, Maxim Cournoyer skribis: > Since we can't retroactively fix this kind of problem, it means we > should find the oldest commit which is immune to that problem? Timebombs (typically expired SSL certificates as in the Python case you mention) can be worked around. Currently it=E2=80=99s inconvenient at best because you need to manually set up a VM or physical machine with its date set to an older date, but it=E2=80=99s feasible. For other problems, there=E2=80=99s (guix quirks), which can, to some exten= t, let us retroactively fix problems, though that should be rare. The job set, which uses =E2=80=98etc/time-travel-manifest.scm=E2=80=99, is supposed to test these t= hings, but apparently it=E2=80=99s been stuck for a while. Needs investigation! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 11 03:19:58 2023 Received: (at 64746) by debbugs.gnu.org; 11 Aug 2023 07:19:59 +0000 Received: from localhost ([127.0.0.1]:44788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUMRC-0000aX-LL for submit@debbugs.gnu.org; Fri, 11 Aug 2023 03:19:58 -0400 Received: from jpoiret.xyz ([206.189.101.64]:36820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUMR9-0000aM-EV for 64746@debbugs.gnu.org; Fri, 11 Aug 2023 03:19:58 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id CF07C185438; Fri, 11 Aug 2023 07:19:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1691738393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yvwqD1LBQxKB/RGuTbkA+cbqsa3NxV3yEwFNjE7x+eE=; b=bs4UgvXPC9QV+Po+IDGvQ5U/EC+9MvDqUq3lAeXmXdBKPnczWt4yFZ1PPcJB9NGxv5XsKb 8Pfdzq568btQyEpj0Aec0IKhhX7mGo/hbAsCmH2u7fQlszDFD7JQE3pFS7S0vVSQd93NV3 sUUi4a+liSpVJ8zowlpLUOdTCLjRKN+KbnYwSpJcwfXJJp7VMd5/oHS6ycKCCfwf8jH1tf VoJT4JvEdjU0g1rbdSB/4QwS/rZn2my1be6DHZ/UiQJ+0H7d440vzXp2ogRGOriu/iN8ST yuyyrxm4bjViaT0kkhzVadtd36vl3F3JwI4DlPEJKZUAIDLq3YrGGq0Di8y+1w== From: Josselin Poiret To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Maxim Cournoyer Subject: Re: bug#64746: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. In-Reply-To: <87bkfekf95.fsf@gnu.org> References: <87lef8hfil.fsf_-_@gmail.com> <87leelpluk.fsf_-_@gnu.org> <87leejeyy9.fsf@gmail.com> <87bkfekf95.fsf@gnu.org> Date: Fri, 11 Aug 2023 09:19:48 +0200 Message-ID: <87ttt6rqp7.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spamd-Bar: / Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Christopher Baines , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi everyone, Ludovic Court=C3=A8s writes: > For other problems, there=E2=80=99s (guix quirks), which can, to some ext= ent, > let us retroactively fix problems, though that should be rare. Is there any established policy around what (guix quirks) is allowed to do? To be more specific, can/will it ever change derivation hashes? Best, =2D-=20 Josselin Poiret --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHEBAEBCgAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmTV4RQQHGRldkBqcG9p cmV0Lnh5egAKCRBQXkC5FhcairSeC/9A0TE/0bKahmqDPg5nqg4FjDvOANnuTEcH GBN4Bd+6azISKSJAmQdl6MhoA7L8cbpyPStjcJ2op+c9u/U2PVpYuUqUQsHtvNWw 5vYxUcwLhUt/RVQ5lRjQi5RJLpISl00q7UtYXDWQqQ+st3z1BFYD1rG1zI3cYWMY pOOhDnYx+cQy4l3pgVM+V/v5HhhzxEetcFi+ks5B5hTMMILJ5RGw797xp90k8RAx 7zqmjoD+d31vNtvGWYJqvVQD33COEwV51gbH0Yz8J6TWW7+WEIT64UXGRWgd/6B6 jnsa2pP5cfhUDYbbc1TDYbKfN26i81n+Dy3xech+WqxJECGuw7xCDUPQvBMyqqBp 01TsMha6aI7OvBHowpMgzi3219ojPg+dv9Vby8RwV8wh8hCSDN0frRR7Z/aaFo5x cSIFI/XRZcZnoZtnWuWWSQgxaUC0beXPOB8UDrbL+1kR3JcKdDsvsZjisbUxK/ae b6oiHeIPcTSl6Pdh3u9vheApdpY54wc= =Y8SB -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 12 16:32:19 2023 Received: (at 64746) by debbugs.gnu.org; 12 Aug 2023 20:32:19 +0000 Received: from localhost ([127.0.0.1]:57542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUvHX-0002OE-ER for submit@debbugs.gnu.org; Sat, 12 Aug 2023 16:32:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUvHV-0002O1-KD for 64746@debbugs.gnu.org; Sat, 12 Aug 2023 16:32:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUvHP-0008TV-LM; Sat, 12 Aug 2023 16:32:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=VoWqn9pteZR3BIenT6S126p4IzAkk2eEhZnB+qmxIl0=; b=ggx3e8dDR0NnJVehQ2Mk jdiJAGb1F938LeO8i8Xgbpguxen6B3o1dc85zdtYzBf8SnyPm4KRp4HdhqngoYKg+Tq2tuJUpv1KE J77B+udC/XuhRzAJzko3dXJrlGX5CHBwDc4lqjbOQpwQzuxDA2cP+yqiDxC4ECnmY5iji8ybQdE6u hDDcIFQ/VUNTE8qy++ew8sdm5KcI5Y0Mqnoxg5sWwP8lGMPBQ0GQqm/MocbBZ8jlAzCQYWgJYEPfB m1E+0oCx1bMIoXhA9aWK/cZ43IvmRtSdjXHUHVEHaofiH6ot01h2YvU5Yd5dOBYvPDWLuSf4Fn1qL P7SFuc8yywcxGA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Josselin Poiret Subject: Re: bug#64746: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. References: <87lef8hfil.fsf_-_@gmail.com> <87leelpluk.fsf_-_@gnu.org> <87leejeyy9.fsf@gmail.com> <87bkfekf95.fsf@gnu.org> <87ttt6rqp7.fsf@jpoiret.xyz> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 25 Thermidor an 231 de la =?utf-8?Q?R=C3=A9?= =?utf-8?Q?volution=2C?= jour de la Loutre 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: Sat, 12 Aug 2023 22:32:09 +0200 In-Reply-To: <87ttt6rqp7.fsf@jpoiret.xyz> (Josselin Poiret's message of "Fri, 11 Aug 2023 09:19:48 +0200") Message-ID: <87ttt4dmt2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64746 Cc: Christopher Baines , Maxim Cournoyer , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@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, Josselin Poiret skribis: > Ludovic Court=C3=A8s writes: > >> For other problems, there=E2=80=99s (guix quirks), which can, to some ex= tent, >> let us retroactively fix problems, though that should be rare. > > Is there any established policy around what (guix quirks) is allowed to > do? To be more specific, can/will it ever change derivation hashes? It should not change derivations, which means it can only touch auxiliary files like =E2=80=98build-aux/build-self.scm=E2=80=99. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 15 12:15:06 2023 Received: (at 64746) by debbugs.gnu.org; 15 Aug 2023 16:15:06 +0000 Received: from localhost ([127.0.0.1]:36553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVwhF-0001yt-V6 for submit@debbugs.gnu.org; Tue, 15 Aug 2023 12:15:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVwhD-0001xv-4Q for 64746@debbugs.gnu.org; Tue, 15 Aug 2023 12:15:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVwh5-0007BR-Vy; Tue, 15 Aug 2023 12:14:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=6FGsvFLM24oHeGGt0O+QpUXL7NW0JlhNv0ofqDvx1n8=; b=U/GBOBYnj50VMsGB9rap cK1zWBv7RExcExc95PEBZ/FFjI/FGUW+mq0WDTFy1CeFVWkT7K4k4R7lisu52VQ9YYE/+AzKr3h6A YcNl1qeBZ+WKGgv+xp97W3X5PvIJtwpEB3zGAFwCsWuT690FotDLvhPvP55t8y5pM/r7ZvOaXmOUK ve55fbqkPDdufApil+TKqX4JloIuVW3ssN5eZ3HjDKA6lROlhiIvsUmIGcXrgyuenwUlU2K7VyrFG 8fPG6Qg/J10Z6chDiEq0FBXeFSrWaOB62h8qB8BOqmpirg5eD854y4KzWnkO1cegyipH+smL9Qr/s gqvDFmeb6cg1RQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#64746: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. References: Date: Tue, 15 Aug 2023 18:14:51 +0200 In-Reply-To: (Maxim Cournoyer's message of "Thu, 20 Jul 2023 12:34:01 -0400") Message-ID: <87pm3o8epw.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , Christopher Baines , Ricardo Wurmus , 64746@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 (---) Hello, Maxim Cournoyer skribis: > @@ -139,9 +149,20 @@ (define-command (guix-time-machine . args) > (with-git-error-handling > (let* ((opts (parse-args args)) > (channels (channel-list opts)) > + (guix-channel (find guix-channel? channels)) > (command-line (assoc-ref opts 'exec)) > + (ref (assoc-ref opts 'ref)) > + (checkout commit relation (update-cached-checkout > + (channel-url guix-channel) > + #:ref (or ref '()) > + #:starting-commit > + %oldest-possible-commit)) > (substitutes? (assoc-ref opts 'substitutes?)) > (authenticate? (assoc-ref opts 'authenticate-channels?))) Following your question earlier today on IRC, I realized that this would unconditionally add a Git checkout update every time =E2=80=98time-machine= =E2=80=99 is started. This would noticeably degrade performance in the cache-hit case (when running a cached channel set). Currently, on cache hits, =E2=80=98cached-channel-instance=E2=80=99 directly returns ~/.cache/guix/pr= ofiles/xyz without performing any Git or (guix store) operation. This is important because it guarantees that one can run =E2=80=98guix time-machine -C channels.scm -- COMMAND=E2=80=99 at pretty much the same sp= eed as =E2=80=98guix COMMAND=E2=80=99. Perhaps the solution would be for =E2=80=98cached-channel-instance=E2=80=99= to have a new #:validate-channel procedure (or similar) that would be passed channel/commit/relation and would have the opportunity to validate, before the thing is in cache. How does that sound? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 15 14:57:42 2023 Received: (at 64746) by debbugs.gnu.org; 15 Aug 2023 18:57:42 +0000 Received: from localhost ([127.0.0.1]:36624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVzEb-0000a6-Ow for submit@debbugs.gnu.org; Tue, 15 Aug 2023 14:57:42 -0400 Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]:62754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVzEY-0000Zp-B3 for 64746@debbugs.gnu.org; Tue, 15 Aug 2023 14:57:40 -0400 Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-643909db8f4so17601736d6.1 for <64746@debbugs.gnu.org>; Tue, 15 Aug 2023 11:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692125852; x=1692730652; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=6L1DbA/BzF54oj7th9n/zoNx53LsS1/y3XzBaBbaRGk=; b=gYSRBMzp/Dlwq7Az1C6YHqlrmjpcoNcZQj9oJoiZAQluyz18Pz2cY3HHW1VU0g2HZy V8wL9CCgCId21FcmuAonKXq7DNv7Kg/98iwGpOe85jb98DD2tEAMTTGeFVrRIKFHx5OV AS/AZG70g1mHZmMMPfI8NBubR3/x3zQmF5lJzRkqqbC23OStqSnaFbpbpAMtSF+d+1ak +4n5AhcAXDzIwLcITXErr2tdN/ijQuJXHi93tkhkIFbj1Kgnfc/5GWzpVS8dRtGGrbJM X+WQw4BCnCGI+Ed4DaL9eJdKPsQ512+I0t143LJ+/h8AFxfH93EpXra9gLcRTQWXQC7k J7Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692125852; x=1692730652; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6L1DbA/BzF54oj7th9n/zoNx53LsS1/y3XzBaBbaRGk=; b=RgR9f+vxQrnecfNFRk+1CSuebcC7UJwOJa4FzyE39CiksZZ+iR/6+SjPOqASZsLFMA 5y4E/igCqzt8PZWjmvqkz0KCY0nSovx7b7BxVDABmlq6o8wa0nanQjl1Uzrw6KjgbV4e kv8HRnIMue9jq/dA8t2DO2Hc/hYq2OhnpqY5hKC6lOcoU8+5+0pmI1vzwP7Kt/Z34Awv RYVQeX4acMSPJNPYc/yAGVRNvbumlOmOVyBPGbEYilirYDzMPlsY82bRH88shLC+GWOZ 6xdbUuzfk5UMgNzpxr8X+q96QrAtulrh+X8tCTvLsGZP47DYMfp3wJ+cemItn8Bi1cm7 wLeg== X-Gm-Message-State: AOJu0YycGNHE9PZTMDezp4CfNOnGZTLiBP6eDYXAkpEJF8modNsDQNYn I9d5DLa+QTJ70Fn2pGNQLc/12nz72yFYDA== X-Google-Smtp-Source: AGHT+IGSx928oNd8WwwccBD5RkCEB6CzKCusbCntd9LSMiuhgjXS93dihybBLaVNBmPpRhi2uPZgQw== X-Received: by 2002:a05:6214:40e:b0:63c:f325:bb03 with SMTP id z14-20020a056214040e00b0063cf325bb03mr3971138qvx.8.1692125852301; Tue, 15 Aug 2023 11:57:32 -0700 (PDT) Received: from hurd (dsl-148-65.b2b2c.ca. [66.158.148.65]) by smtp.gmail.com with ESMTPSA id s14-20020a0cdc0e000000b006431027ac44sm1903198qvk.83.2023.08.15.11.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 11:57:31 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#64746: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. References: <87lef8hfil.fsf_-_@gmail.com> <87leelpluk.fsf_-_@gnu.org> Date: Tue, 15 Aug 2023 14:57:29 -0400 In-Reply-To: <87leelpluk.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Tue, 08 Aug 2023 17:58:27 +0200") Message-ID: <87h6p0jfqe.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Christopher Baines , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@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: -1.0 (-) Hello, Ludovic Court=C3=A8s writes: > Hi! > > Maxim Cournoyer skribis: > >>> +;;; The commit introducing the 'inferiors' mechanism; it is the oldest= commit >>> +;;; that can be travelled to. >>> +(define %oldest-possible-commit >>> + "2ca299caf64489f4e1e665ec1158fb0309b0b565") >> >> I just tried travelling to that assumed oldest commit (because it >> corresponds to the introduction of the inferiors mechanism), but it >> fails like: >> >> Computing Guix derivation for 'x86_64-linux'... Backtrace: >> - 5 (primitive-load "/gnu/store/b70mihsj9xx0xxp6izliqb5vm4=E2= =80=A6") >> In ice-9/eval.scm: >> 155:9 4 (_ _) >> 159:9 3 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6= ) =E2=80=A6)) >> 173:47 2 (_ #(#(#(#(#(#(#(#(#(#(#(=E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6= ) =E2=80=A6)) >> In ./guix/self.scm: >> 932:4 1 (guix-derivation "/gnu/store/yfn2s94i5bvwr7j7r6xcnivwg=E2= =80=A6" =E2=80=A6) >> 903:2 0 (guile-for-build "3.0") >> >> ./guix/self.scm:903:2: In procedure guile-for-build: >> Throw to key `match-error' with args `("match" "no matching pattern" "3.= 0")'. > > I would pick =E2=80=98v0.15.0=E2=80=99 (=3D 359fdda40f754bbf1b5dc261e7427= b75463b59be) as > the oldest commit one can travel to; it=E2=80=99s a bit newer than the one > above, but it fails in the same way (to my surprise). It would be > interesting to investigate. > > That said, we could just as well pick =E2=80=98v1.0.0=E2=80=99, which is = the official > warranty-void limit, and which seems to work (it needs to build things, > though=E2=80=A6). I've picked v1.0.0. It already seems hard enough to get there (you'd have to build Python 2 with the hardware clock set to a value in the past to avoid time bombs in its test suite). As discussed with Ludovic, it's best to avoid doing work on critical path, that is, when there is a cache hit for the channel. I've implemented their idea to delay such work to within 'cached-channel-instance', where we know if there's a cache hit or not. Here's a simple 'strace -c' benchmark: Without this change (Guix commit 985638aea14720e16ed5fd94a0e1382a57dec7ac), on a warm cache, it results on something like: --8<---------------cut here---------------start------------->8--- $ strace -c guix time-machine --commit=3Dv1.3.0 -- \ environment --ad-hoc hello -- hello % time seconds usecs/call calls errors syscall [...] 100,00 0,072028 4 16963 2026 total With this change (v2 incoming) installed: --8<---------------cut here---------------start------------->8--- $ strace -c ./pre-inst-env guix time-machine --commit=3Dv1.3.0 -- \ environment --ad-hoc hello -- hello % time seconds usecs/call calls errors syscall [...] 100,00 0,074576 4 18005 2700 total --8<---------------cut here---------------end--------------->8--- It seems a small cost to pay for the increased user friendliness. What do you think? --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 15 15:45:12 2023 Received: (at 64746) by debbugs.gnu.org; 15 Aug 2023 19:45:12 +0000 Received: from localhost ([127.0.0.1]:36661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVzya-0001kn-BK for submit@debbugs.gnu.org; Tue, 15 Aug 2023 15:45:12 -0400 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:51224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVzyW-0001k3-Gf for 64746@debbugs.gnu.org; Tue, 15 Aug 2023 15:45:11 -0400 Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-40ff796e8ddso43112441cf.2 for <64746@debbugs.gnu.org>; Tue, 15 Aug 2023 12:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692128702; x=1692733502; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3QneMBPT8ky8lkuiPx8LP9V5ElnnO08mtoiDJKnEmD0=; b=fAUHj9hdVXt41KNA1UBVY1AloV6uhaS0UMPgbIEHRaO4JubOEUlCIDsS618Bw80mHi 00yTEaZHB307t5+YpHb6ZrliV23/nqy9kFwlWfpLkTJJ2rtVOtEQJSq1UBWmvAzBOsix G/IR/9prCsl9NswhKJ5k5gRXJBmqVWdAj7fEIUxAi33vgDHuD0h53IjbLot//kM1TDSw 3aNtGiQayft8GK9FHMgXybU+Dla88ENIaXk2ANc6iYwh7vOveCVU9pQl2Pk3PnRPGxuE pDiWjIGv7j3+jzM4BXJldURsfpcKaz6XNzN6IGUDjgmKc5+T6CtrFu25q0DTLNBZArs2 lHLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692128702; x=1692733502; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3QneMBPT8ky8lkuiPx8LP9V5ElnnO08mtoiDJKnEmD0=; b=Tj4LZbejAlW088J8eTwXRByL9DbKa0O2XrBfMmUE+5CRb4nKL4Z9OimD+tvQIZl2fX 0Xj2WN4V1/ZDAQ9WEHUqO26D+7lW45QBjuAoSFFSk1Zix2BpUvn68kfegdVev/3r9OlW l6B+Yk6NtY4oe1r6mTkVocgwpU4YPaTF6urOb6LMYpZZ9pCB38Qx7oHIWRCQYpW89kaF wwUZfIZjexvUJtXnXY0oROCCPPH5uBAdZCrrhU3tr6C6RW+X3212mD+nePgirC30vrVB G4C3Xj01enjRrxOcQer9gJNAYLTVcuQFPUPMKofplZme5wRAmAmy15yOFSwl2dEfBLtq 89UA== X-Gm-Message-State: AOJu0Yx7aBfOCVFY0HYkz3bodwmXIiBj5rSRR3nvQdWYucSP/0pF5DfX rXinbwsyuTFsnOYnuuCEji3tBInD7ecttA== X-Google-Smtp-Source: AGHT+IHoczIZ9BjjZExGDp8wO2h30hC4jWdZY/qvIqBE6JW9BCyUeeV8eDav/kqeYknEm0PoIlke9g== X-Received: by 2002:a05:622a:1981:b0:40c:3f64:b55f with SMTP id u1-20020a05622a198100b0040c3f64b55fmr17811569qtc.15.1692128702353; Tue, 15 Aug 2023 12:45:02 -0700 (PDT) Received: from localhost.localdomain (dsl-148-65.b2b2c.ca. [66.158.148.65]) by smtp.gmail.com with ESMTPSA id h11-20020ac8744b000000b00403ad6ec2e8sm3953031qtr.26.2023.08.15.12.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 12:45:01 -0700 (PDT) From: Maxim Cournoyer To: 64746@debbugs.gnu.org Subject: [PATCH v2 1/3] git: Clarify commit relation reference in doc. Date: Tue, 15 Aug 2023 15:44:07 -0400 Message-ID: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Maxim Cournoyer 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 (-) * guix/git.scm (update-cached-checkout): Clarify that it is the relation of STARTING-COMMIT that is returned, relative to the new commit, not the other way around. --- (no changes since v1) guix/git.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/git.scm b/guix/git.scm index be20cde019..dbc3b7caa7 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -439,7 +439,7 @@ (define* (update-cached-checkout url #:recursive? recursive?))) "Update the cached checkout of URL to REF in CACHE-DIRECTORY. Return three values: the cache directory name, and the SHA1 commit (a string) corresponding -to REF, and the relation of the new commit relative to STARTING-COMMIT (if +to REF, and the relation of STARTING-COMMIT relative to the new commit (if provided) as returned by 'commit-relation'. REF is pair whose key is [branch | commit | tag | tag-or-commit ] and value base-commit: a4bed14c438dc0cbc1c1885a38f8409c7fef7957 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 15 15:45:15 2023 Received: (at 64746) by debbugs.gnu.org; 15 Aug 2023 19:45:15 +0000 Received: from localhost ([127.0.0.1]:36663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVzyc-0001l2-RB for submit@debbugs.gnu.org; Tue, 15 Aug 2023 15:45:15 -0400 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:53425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVzyX-0001kT-Vh for 64746@debbugs.gnu.org; Tue, 15 Aug 2023 15:45:11 -0400 Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-403e7472b28so34775011cf.2 for <64746@debbugs.gnu.org>; Tue, 15 Aug 2023 12:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692128704; x=1692733504; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=B8hGdU4OELa28DbMUXTnepI6us/G3Bq8sQl7rzDGixY=; b=LSfcwxejybTLHs3fO+eVtO8eAVQzOvW40TX3Yon/fwzETpzDBJdvha3jLfa8FYwopB KLtj40AUexXNz6g4H/udVKqNqoxtC/IVxEzQK8tzKadJuZu5uhhuGBOUYmgubsnEHBP4 q/o++gL2E32t3zaj1KHrqlOqA0Px7J3+NXI7kLKJhpu7aI67nOgmWi3Y72FcB+BHFnpd 6lv2LUvQ2xDVVKiefeyfkqUzI/XCmoqAq1Y/TbIMlmygqgoQ8/kgqwvZ9RxOjK6YdxKy I8Si4oqY5gg1VKSZjqe9ptvchLd4/dwi/rnQr4+U3l0yI9DH8VQbnmMTj9V5CyAnJZb9 iyrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692128704; x=1692733504; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B8hGdU4OELa28DbMUXTnepI6us/G3Bq8sQl7rzDGixY=; b=Vu6yuXY2NXwN+B9dX20BHgJQOdoZqhxTTTzXc9lIyVpG4dwS+pIXV1wwXZq3U+RmqK Mv5PFE+x17v2xjMhLQl25U+HqMpOhrC9ta/I0rsLPiQs5g70u7dQL3/Rgvtkje+fyAAB QAqHp3+loSaqhm1w7zMvuNoK56x/+Pna6dy84BFm5bDoaBHVyjke5jLKt3InvC0afROA TmUx+qtvR0UwlQaH4v1XcT1nI/tQFthcR6AmpP1AmkW7EJXoP2OH8gpLQVmmcn1IlSTM Ju79nRlvGtg8lMpjJ/E7j+ISiN1nZcD/niZhtGAq8Veoj/WjGxBlfpRNV5StDSe8f7za zBkQ== X-Gm-Message-State: AOJu0YyHUEjrY9JlF7OM1WH2bq/LaxnmnefE7ylqUCf4bH4hxbNFq14Z zhIdpM2AMtPJia0gXTO8AA834Vn5hEScUQ== X-Google-Smtp-Source: AGHT+IH9hSgIttU+hjCcnp32bBE9BaF0+xKwekR4glL+epVaPXiH1FHFpieUpKIjBhE/YJDmuSj21w== X-Received: by 2002:a05:622a:1482:b0:40f:ecef:cab3 with SMTP id t2-20020a05622a148200b0040fecefcab3mr17560126qtx.33.1692128704313; Tue, 15 Aug 2023 12:45:04 -0700 (PDT) Received: from localhost.localdomain (dsl-148-65.b2b2c.ca. [66.158.148.65]) by smtp.gmail.com with ESMTPSA id h11-20020ac8744b000000b00403ad6ec2e8sm3953031qtr.26.2023.08.15.12.45.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 12:45:03 -0700 (PDT) From: Maxim Cournoyer To: 64746@debbugs.gnu.org Subject: [PATCH v2 2/3] pull: Tag commit argument with 'tag-or-commit. Date: Tue, 15 Aug 2023 15:44:08 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Maxim Cournoyer 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 (-) For compatibility with (guix git) procedures. * guix/scripts/pull.scm (channel-list): Also accept tag-or-commit tagged refspec. --- New commit. guix/scripts/pull.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index ecd264d3fa..9b78d4b5ca 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -166,7 +166,7 @@ (define %options (alist-delete 'repository-url result)))) (option '("commit") #t #f (lambda (opt name arg result) - (alist-cons 'ref `(commit . ,arg) result))) + (alist-cons 'ref `(tag-or-commit . ,arg) result))) (option '("branch") #t #f (lambda (opt name arg result) (alist-cons 'ref `(branch . ,arg) result))) @@ -774,7 +774,8 @@ (define (channel-list opts) (if (guix-channel? c) (let ((url (or url (channel-url c)))) (match ref - (('commit . commit) + ((or ('commit . commit) + ('tag-or-commit . commit)) (channel (inherit c) (url url) (commit commit) (branch #f))) (('branch . branch) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 15 15:45:16 2023 Received: (at 64746) by debbugs.gnu.org; 15 Aug 2023 19:45:16 +0000 Received: from localhost ([127.0.0.1]:36665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVzyd-0001l5-77 for submit@debbugs.gnu.org; Tue, 15 Aug 2023 15:45:16 -0400 Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]:44389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVzya-0001kW-8E for 64746@debbugs.gnu.org; Tue, 15 Aug 2023 15:45:13 -0400 Received: by mail-qk1-x730.google.com with SMTP id af79cd13be357-76d535567afso164127085a.1 for <64746@debbugs.gnu.org>; Tue, 15 Aug 2023 12:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692128706; x=1692733506; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ke0p/pvdx3IQKPSccLx/QTYEfddANKEDXSD9F1VXXlQ=; b=E+EwBH+J25R+3EOYCh0Zt9GCBdHcvjH0dkk9ZB+DMy9j8SXZjLMIibPqFafeYG8Qc5 wCdN3UAVkn1RQbXKr6iJgqUJt9a9f51I/frNkiAb907mhyXoMG6KHfOOiwT3UZpzIDWe oymIdcM1TIvcQVd/exsBphhvXjkqxENKwh/0bWd91oFRXJ6MDKIIA7F4vuCdsAAKpLRV XuABP4BljQh6WoVmAGXtGs36ebi62/sXoMu2mqW0rFUAgdrmKjWWgvtaIilYUi7WFX4K yayTbgKbMlAoObpLnhy3ggL0HdOqblSjBAxUsGXqb8IDkm/tdSPVDprIf8sjQiF+C1uI NuNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692128706; x=1692733506; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ke0p/pvdx3IQKPSccLx/QTYEfddANKEDXSD9F1VXXlQ=; b=YVUaL7BcwX5Ggd5Va75an56aRAUShe/X73c8UnQ07/YFaHnpw1f9FL+/UAHQoqeTnC 3Qf9oAPrTEX34Q7GV058rJVwQTMLmxIR+gozR0boQdFcpmDT5jrrUxEhUzfGExodFcix /uF3bmFQqnBMdTd6dd4A1omkXTbozFAEOksK7WtsttZA2QLi0NpkAPPr4MJIKLPynp0V OsbGXiCtYb1lW4oBVSwL/RQMDKLWRXsjc4MaFWCvWkXoApNEBxThm7rZnXKOmP0OEjkV yDXfGQVOMRWdps8We+Vcv1UOmd0kqyKyOx0Ah78lKQzU9u0SqZZPISpV2R6iWlmivW+s oxzA== X-Gm-Message-State: AOJu0Yxt2ksVreLPCIzcXosK8SAIteO6uvbNG5LbY/1riBPUfTw4K0eF 22xnNYz3Ujoq6w+cHOeeFplF0P22n3aTAQ== X-Google-Smtp-Source: AGHT+IGyntlK8oGlCmNYAaPGP5y4PEu/n31haEms+4+X7lIeN4OcToHvPExbTI43xk06ltmUHNo5xg== X-Received: by 2002:a05:620a:3710:b0:76c:c563:cd7e with SMTP id de16-20020a05620a371000b0076cc563cd7emr18186793qkb.61.1692128706357; Tue, 15 Aug 2023 12:45:06 -0700 (PDT) Received: from localhost.localdomain (dsl-148-65.b2b2c.ca. [66.158.148.65]) by smtp.gmail.com with ESMTPSA id h11-20020ac8744b000000b00403ad6ec2e8sm3953031qtr.26.2023.08.15.12.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 12:45:06 -0700 (PDT) From: Maxim Cournoyer To: 64746@debbugs.gnu.org Subject: [PATCH v2 3/3] scripts: time-machine: Error when attempting to visit too old commits. Date: Tue, 15 Aug 2023 15:44:09 -0400 Message-ID: <7ce3ce800ab5dde1cdaaf272a54738be6256c1b3.1692128648.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= , Maxim Cournoyer , Simon Tournier 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 (-) * doc/guix.texi (Invoking guix time-machine): Document limitation. * guix/inferior.scm (cached-channel-instance): New VALIDATE-CHANNELS argument. Use it to validate channels when there are no cache hit. * guix/scripts/time-machine.scm (%options): Tag the given reference with 'tag-or-commit instead of 'commit. (%oldest-possible-commit): New variable. (guix-time-machine) : New nested procedure. Pass it to the 'cached-channel-instance' call. * tests/guix-time-machine.sh: New test. * Makefile.am (SH_TESTS): Register it. Suggested-by: Simon Tournier Reviewed-by: Ludovic Courtès --- Changes in v2: - Test it - Delay validation work to inside cached-channel-instance, when there's no cache hit - Expound doc to mention possible problems and possible workarounds Makefile.am | 1 + doc/guix.texi | 14 +++++++++ guix/inferior.scm | 57 ++++++++++++++++++++--------------- guix/scripts/time-machine.scm | 38 +++++++++++++++++++++-- tests/guix-time-machine.sh | 28 +++++++++++++++++ 5 files changed, 110 insertions(+), 28 deletions(-) create mode 100644 tests/guix-time-machine.sh diff --git a/Makefile.am b/Makefile.am index 5ffcb6a12d..4228c07803 100644 --- a/Makefile.am +++ b/Makefile.am @@ -615,6 +615,7 @@ SH_TESTS = \ tests/guix-refresh.sh \ tests/guix-shell.sh \ tests/guix-shell-export-manifest.sh \ + tests/guix-time-machine.sh \ tests/guix-graph.sh \ tests/guix-describe.sh \ tests/guix-repl.sh \ diff --git a/doc/guix.texi b/doc/guix.texi index b50feed4c4..a3754b7019 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5060,6 +5060,20 @@ Invoking guix time-machine large number of packages; the result is cached though and subsequent commands targeting the same commit are almost instantaneous. +Due to @command{guix time-machine} relying on the ``inferiors'' +mechanism (@pxref{Inferiors}), the oldest commit it can travel to is +commit @samp{6298c3ff} (``v1.0.0''), dated May 1@sup{st}, 2019, which is +the first release that included the inferiors mechanism. An error is +returned when attempting to navigate to older commits. Note that +although it should technically be possible to travel to such an old +commit, the ease to do so will largely depend on the availability of +binary substitutes. When traveling to a distant past, some packages may +not easily build from source anymore. One such example are old versions +of Python 2 which had time bombs in its test suite, in the form of +expiring SSL certificates. This particular problem can be worked around +by setting the hardware clock to a value in the past before attempting +the build. + @quotation Note The history of Guix is immutable and @command{guix time-machine} provides the exact same software as they are in a specific Guix diff --git a/guix/inferior.scm b/guix/inferior.scm index 5dfd30a6c8..fca6fb4b22 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -871,11 +871,15 @@ (define* (cached-channel-instance store #:key (authenticate? #t) (cache-directory (%inferior-cache-directory)) - (ttl (* 3600 24 30))) + (ttl (* 3600 24 30)) + validate-channels) "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. AUTHENTICATE? -determines whether CHANNELS are authenticated." +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. AUTHENTICATE? determines whether CHANNELS are authenticated. +VALIDATE-CHANNELS, if specified, must be a one argument procedure accepting a +list of channels that can be used to validate the channels; it should raise an +exception in case of problems." (define commits ;; Since computing the instances of CHANNELS is I/O-intensive, use a ;; cheaper way to get the commit list of CHANNELS. This limits overhead @@ -923,27 +927,30 @@ (define* (cached-channel-instance store (if (file-exists? cached) cached - (run-with-store store - (mlet* %store-monad ((instances - -> (latest-channel-instances store channels - #:authenticate? - authenticate?)) - (profile - (channel-instances->derivation instances))) - (mbegin %store-monad - ;; It's up to the caller to install a build handler to report - ;; what's going to be built. - (built-derivations (list profile)) - - ;; Cache if and only if AUTHENTICATE? is true. - (if authenticate? - (mbegin %store-monad - (symlink* (derivation->output-path profile) cached) - (add-indirect-root* cached) - (return cached)) - (mbegin %store-monad - (add-temp-root* (derivation->output-path profile)) - (return (derivation->output-path profile))))))))) + (begin + (when (procedure? validate-channels) + (validate-channels channels)) + (run-with-store store + (mlet* %store-monad ((instances + -> (latest-channel-instances store channels + #:authenticate? + authenticate?)) + (profile + (channel-instances->derivation instances))) + (mbegin %store-monad + ;; It's up to the caller to install a build handler to report + ;; what's going to be built. + (built-derivations (list profile)) + + ;; Cache if and only if AUTHENTICATE? is true. + (if authenticate? + (mbegin %store-monad + (symlink* (derivation->output-path profile) cached) + (add-indirect-root* cached) + (return cached)) + (mbegin %store-monad + (add-temp-root* (derivation->output-path profile)) + (return (derivation->output-path profile)))))))))) (define* (inferior-for-channels channels #:key diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm index d7c71ef705..e4fe511382 100644 --- a/guix/scripts/time-machine.scm +++ b/guix/scripts/time-machine.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2019 Konrad Hinsen ;;; Copyright © 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,13 +20,15 @@ ;;; along with GNU Guix. If not, see . (define-module (guix scripts time-machine) + #:use-module (guix channels) + #:use-module (guix diagnostics) #:use-module (guix ui) #:use-module (guix scripts) #:use-module (guix inferior) #:use-module (guix store) #:use-module (guix status) #:use-module ((guix git) - #:select (with-git-error-handling)) + #:select (update-cached-checkout with-git-error-handling)) #:use-module ((guix utils) #:select (%current-system)) #:use-module ((guix scripts pull) @@ -38,9 +41,17 @@ (define-module (guix scripts time-machine) #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) #:use-module (srfi srfi-37) + #:use-module (srfi srfi-71) #:export (guix-time-machine)) +;;; The required inferiors mechanism relied on by 'guix time-machine' was +;;; firmed up in v1.0.0; it is the oldest, safest commit that can be travelled +;;; to. +(define %oldest-possible-commit + "6298c3ffd9654d3231a6f25390b056483e8f407c") ;v1.0.0 + ;;; ;;; Command-line options. @@ -81,7 +92,7 @@ (define %options (alist-delete 'repository-url result)))) (option '("commit") #t #f (lambda (opt name arg result) - (alist-cons 'ref `(commit . ,arg) result))) + (alist-cons 'ref `(tag-or-commit . ,arg) result))) (option '("branch") #t #f (lambda (opt name arg result) (alist-cons 'ref `(branch . ,arg) result))) @@ -140,8 +151,27 @@ (define-command (guix-time-machine . args) (let* ((opts (parse-args args)) (channels (channel-list opts)) (command-line (assoc-ref opts 'exec)) + (ref (assoc-ref opts 'ref)) (substitutes? (assoc-ref opts 'substitutes?)) (authenticate? (assoc-ref opts 'authenticate-channels?))) + + (define (validate-guix-channel channels) + "Finds the Guix channel among CHANNELS, and validates that REF as +captured from the closure, a git reference specification such as a commit hash +or tag associated to CHANNEL, is valid and new enough to satisfy the 'guix +time-machine' requirements. A `formatted-message' condition is raised +otherwise." + (let* ((guix-channel (find guix-channel? channels)) + (checkout commit relation (update-cached-checkout + (channel-url guix-channel) + #:ref (or ref '()) + #:starting-commit + %oldest-possible-commit))) + (unless (memq relation '(ancestor self)) + (raise (formatted-message + (G_ "cannot travel past commit `~a' from May 1st, 2019") + (string-take %oldest-possible-commit 12)))))) + (when command-line (let* ((directory (with-store store @@ -153,6 +183,8 @@ (define-command (guix-time-machine . args) #:dry-run? #f) (set-build-options-from-command-line store opts) (cached-channel-instance store channels - #:authenticate? authenticate?))))) + #:authenticate? authenticate? + #:validate-channels + validate-guix-channel))))) (executable (string-append directory "/bin/guix"))) (apply execl (cons* executable executable command-line)))))))) diff --git a/tests/guix-time-machine.sh b/tests/guix-time-machine.sh new file mode 100644 index 0000000000..8b62ef75ea --- /dev/null +++ b/tests/guix-time-machine.sh @@ -0,0 +1,28 @@ +# GNU Guix --- Functional package management for GNU +# Copyright © 2023 Maxim Cournoyer +# +# 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 . + +# +# Test the 'guix time-machine' command-line utility. +# + +guix time-machine --version + +# Visiting a commit older than v1.0.0 fails. +! guix time-machine --commit=v0.15.0 + +exit 0 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 13:11:55 2023 Received: (at 64746) by debbugs.gnu.org; 16 Aug 2023 17:11:55 +0000 Received: from localhost ([127.0.0.1]:41942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3n-0005Oz-0e for submit@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:55 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:38190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3d-0005Mq-Gf for 64746@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:46 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3159b524c56so1056870f8f.1 for <64746@debbugs.gnu.org>; Wed, 16 Aug 2023 10:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692205900; x=1692810700; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=y0JMZjBfGsQUzVWYf0kAQB1D1nZ/pGEvdlNpkE3l5Rk=; b=i4Do5OT+BADurhpnVDeG/jX8B6PLTfeEhxOTAMJngyjRWFLncKDfYWKTknPUAFP4Aj gwX5+CT0BagbidkaeOdtRZ4Hd8Z+/Wt/9tI89ij9f6DIGP8sQNsLYbqAlLXTlTL6RAZA OQQ/dxDVyDbMbkxC48zoelTywGVBAfidFiJ2FenzCWbQQlXqs3bvYwciGvcwKA9cf8F2 IAhPcGsfs+DLHv86ADhc6bizTODAME5jzgj+765tvzkB/alM3b/JokWzPIlmAuPuyolQ b6/MdcZk44NFHyfc0HUcm8gQuaa8UCUxtwcvh//cDtPg+5eoa9zPITI6iZiXMFgcReJS E/pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692205900; x=1692810700; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y0JMZjBfGsQUzVWYf0kAQB1D1nZ/pGEvdlNpkE3l5Rk=; b=YS02J6qpxJVZOKF+HxkdQW6BL9oqs95O6sOj52JCt7U05eueTgR8gxnFieCyTvrFWi lc5zENlV1dRV2xfnc/kcPebW8uNOYeFOCYdUZ1K6Ot2/36vDBpeATfMXTbqJw0oPjua3 7SWq3Exvkd2mFEj0XrYQ3T9A5ZZGW13YXsoXv3wmRa3GbDC0ytrgcYfrePF/KjJ6994D 8CTQ8cETiJqZVc4WNVZ3HhG/YcSlf20NHcUkRO7byzEtVcrCmzNtyd2xNcROJADKafiT DylFKfXDucJu5ebAkkBpMbI6LrWueSE4lZSniCJgFQMkVEJpVa9qYQ+fzj8ID9LWhw3F XYmw== X-Gm-Message-State: AOJu0Yy1TsROstjAlbxaQOawLwihF74aAF8Hshvh7F8YQsAdcdW1ABYk CpFmu9dOYm8FwsaRalrjK+vdbeEemf4= X-Google-Smtp-Source: AGHT+IEI4CX0ocWOKHfntNgBctmVYHe/bk0EugwPFaBEhqE5wn9TQ0Vp/dvxFj47y0KykBd3XXDrvg== X-Received: by 2002:a5d:62c9:0:b0:317:ead9:3363 with SMTP id o9-20020a5d62c9000000b00317ead93363mr1880682wrv.5.1692205899618; Wed, 16 Aug 2023 10:11:39 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id f6-20020adffcc6000000b0031984b370f2sm6763688wrs.47.2023.08.16.10.11.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 10:11:39 -0700 (PDT) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Maxim Cournoyer Subject: Re: [bug#64746] [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. In-Reply-To: <87pm3o8epw.fsf_-_@gnu.org> References: <87pm3o8epw.fsf_-_@gnu.org> Date: Wed, 16 Aug 2023 16:46:49 +0200 Message-ID: <87sf8jf3ja.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Christopher Baines , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@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: -1.0 (-) Hi, Thanks Maxim for this improvement. On Tue, 15 Aug 2023 at 18:14, Ludovic Court=C3=A8s wrote: > Following your question earlier today on IRC, I realized that this would > unconditionally add a Git checkout update every time =E2=80=98time-machin= e=E2=80=99 is > started. Please note that if git.savannah.gnu.org is not reachable, then =E2=80=9Cgu= ix time-machine=E2=80=9D fails. Let start with the regular: --8<---------------cut here---------------start------------->8--- $ guix describe Generation 26 Jul 12 2023 09:13:39 (current) guix 4a027d2 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 4a027d2b0ee68e39f21f6802a8cd1751d3065330 $ guix time-machine --commit=3D4a027d2 -- describe Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.or= g/git/guix.git'... substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% building /gnu/store/sg8ca36rlbh4il6jy8dk2gr33lxm4z8q-compute-guix-derivatio= n.drv... Computing Guix derivation for 'x86_64-linux'... | substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% The following derivations will be built: [...] building profile with 1 package... guix 4a027d2 repository URL: https://git.savannah.gnu.org/git/guix.git commit: 4a027d2b0ee68e39f21f6802a8cd1751d3065330 --8<---------------cut here---------------end--------------->8--- So far, so good. Here all is cached and so on. Now, let make git.savannah.gnu.org unreachable by tweaking some stuff. Then, --8<---------------cut here---------------start------------->8--- $ guix time-machine --commit=3D4a027d2 -- describe guix time-machine: error: Git error: failed to resolve address for git.sava= nnah.gnu.org: Name or service not known --8<---------------cut here---------------end--------------->8--- Well, even if this patch will add another inefficiency, there is already one. :-) I would say without having looking closely to the code that the issue comes because something=E2=84=A2 tries to connect before checking if = the commit is already in the local checkout. > This would noticeably degrade performance in the cache-hit case (when > running a cached channel set). Currently, on cache hits, > =E2=80=98cached-channel-instance=E2=80=99 directly returns ~/.cache/guix/= profiles/xyz > without performing any Git or (guix store) operation. As shown above, I guess there is bug=E2=80=A6 > This is important because it guarantees that one can run =E2=80=98guix > time-machine -C channels.scm -- COMMAND=E2=80=99 at pretty much the same = speed > as =E2=80=98guix COMMAND=E2=80=99. Yes but I guess it could also be improved as shown above. :-) The check if the requested commit is newer than the %oldest-possible-commit should use the Git history graph closure similarly as the authentication mechanism, no? And this check should come after checking the cache, no? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 13:11:55 2023 Received: (at 64746) by debbugs.gnu.org; 16 Aug 2023 17:11:56 +0000 Received: from localhost ([127.0.0.1]:41944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3n-0005P6-Fc for submit@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:55 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:41435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3e-0005Ms-4n for 64746@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:46 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3174ca258bbso1431626f8f.1 for <64746@debbugs.gnu.org>; Wed, 16 Aug 2023 10:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692205900; x=1692810700; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=U0zH9soTWPgeG2airfdl97cFHDSWL13O0JQbEnvJTUc=; b=IXDZ/sfhciky1iVH+YvJ1gJCdDmT9TFvfT8vRyuO+lv0iKIlsyqKfPCJ3xcNlO1jOs If8cy77VDJJP/zEmtQiIU4mCpWKAWOoR1khjz1Qh5AMMyPr/T7fJ+DmPKT6yPMlKOG6Y rSl1J9C2/VfAgSoRBb3E49nu3i98BJu52F7+/68RmOSwPysJqqKpwUwXz24cE1EY0n/J UABn/EZzh9ry/HlOheXM+B9sM1NU0CB+UBlo+pQenHd2mTrUI4uASvu/PmojC+3aEmDw zWvW4JhB5Gv9Xz0piiz+oNllCYQ3ng8TxQt0EaqDPQSREKWbQE2R72Uz475YioJrTmHE 0m1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692205900; x=1692810700; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U0zH9soTWPgeG2airfdl97cFHDSWL13O0JQbEnvJTUc=; b=g3sHK1yI3T5deHPXs550ctkjU1KmhAV5DrCQxCrcWWih27qCyvCvdvXf3INiNaItrr D9qi/PHBduRajEQIR0j2J3X7znF0GjjlE+O642xVdAvj5lvsTvXw+TSL+ITD7J3rur0I Y5dM+Fb07omocOQq1qhislmj5+YIsLVpos0X5No+KwS39AKIgp1XeTelrhKz7cs+7bQ4 ORUJ3o6PETujJCoWSYef/WKzKpVsRu3ZQIpDJf/sjOkY4XZD0EKexrq8LcAfgZyo2OsJ xo/L9NjkUD8v3pcPvPjvJb5Ho7QkkAygO+HnToMkrHT6Pa4ltW6wqlhrwQz29h7Obd67 hYkg== X-Gm-Message-State: AOJu0YzEd6lgBr9uTvpoE8WTQfNAEUECBt4xC3fOHqJ3CJhFc5rGn5UV wzhjlxqG8daXdVp2qINcczZOyawN758= X-Google-Smtp-Source: AGHT+IEq0ZMEa+JudWM+1qJbjSXllPzGWmFiX48lfEWggTYZV6onbUC0TOK+rBFyDVNdtbrTExVgaA== X-Received: by 2002:adf:e9c9:0:b0:317:3a23:4855 with SMTP id l9-20020adfe9c9000000b003173a234855mr2254174wrn.2.1692205900472; Wed, 16 Aug 2023 10:11:40 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id z2-20020adfec82000000b003141a3c4353sm1574426wrn.30.2023.08.16.10.11.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 10:11:40 -0700 (PDT) From: Simon Tournier To: Maxim Cournoyer , 64746@debbugs.gnu.org Subject: Re: [bug#64746] [PATCH v2 2/3] pull: Tag commit argument with 'tag-or-commit. In-Reply-To: References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> Date: Wed, 16 Aug 2023 17:02:24 +0200 Message-ID: <87o7j7f2tb.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Maxim Cournoyer , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines 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 (-) Hi Maxim, On Tue, 15 Aug 2023 at 15:44, Maxim Cournoyer w= rote: > For compatibility with (guix git) procedures. > > * guix/scripts/pull.scm (channel-list): Also accept tag-or-commit tagged > refspec. > --- I am not sure to understand these both changes. > > guix/scripts/pull.scm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm > index ecd264d3fa..9b78d4b5ca 100644 > --- a/guix/scripts/pull.scm > +++ b/guix/scripts/pull.scm > @@ -166,7 +166,7 @@ (define %options > (alist-delete 'repository-url result)))) > (option '("commit") #t #f > (lambda (opt name arg result) > - (alist-cons 'ref `(commit . ,arg) result))) > + (alist-cons 'ref `(tag-or-commit . ,arg) result))) Well, why not. :-) > (option '("branch") #t #f > (lambda (opt name arg result) > (alist-cons 'ref `(branch . ,arg) result))) > @@ -774,7 +774,8 @@ (define (channel-list opts) > (if (guix-channel? c) > (let ((url (or url (channel-url c)))) > (match ref > - (('commit . commit) > + ((or ('commit . commit) > + ('tag-or-commit . commit)) Here, why not also add 'tag?. Hum, I am missing why this =E2=80=99tag-or-c= ommit would be required. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 13:11:56 2023 Received: (at 64746) by debbugs.gnu.org; 16 Aug 2023 17:11:57 +0000 Received: from localhost ([127.0.0.1]:41946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3n-0005PD-RL for submit@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:56 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:41311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3f-0005Mu-5i for 64746@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:47 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fe3194d21dso12423755e9.1 for <64746@debbugs.gnu.org>; Wed, 16 Aug 2023 10:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692205901; x=1692810701; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=cgS0xDbnTFdLgo6GDvSnaDc/A2/Vyys7Xoa1iAkwBDg=; b=RHnsRF13YNFgOsS4ppdhb9BC/0oCZVGDyHXNJGqKQZb202E8nJcGGhkVMqSbYHgV3t gf1ScCewJm7BisjtY185M4kqK1jFs9NTBzXHNMiJOMrCKmgNdSpn5AkJmeysXJm1uVLK Y/c9ePR1odi271fPqx/F6s1HvisR99jxEtX+gFs+w8nVLf5VJ3UZcpObtKsSRKyLA9b6 ZziRjvZu9noV2CDcT83cVuczLs6ZVxOXu/9fRbBMPF493x3IEXRSkRWH4s3fGwKldQER wHdyY2IG48X+zAoSunDWqHvTRZwLR2kmTwkeV3xGWbpvodOZ2uCWMLWhJKWyjyL/8ue8 WwaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692205901; x=1692810701; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cgS0xDbnTFdLgo6GDvSnaDc/A2/Vyys7Xoa1iAkwBDg=; b=H0oCFJ1dEZa61uqE+S3JAzoilXqsVuuyNVwcoyoHvG1+wsZsbp9ayfwZjK3XOchdOV ZyXGSon4EeJLtz32tOcShdtRa7OZrJRsIlnvL5EbqL/Z9uEoNR1Pk8zSDVeb+rN/U/sp z/bEhSr/UiNXn0e/B3Rgb3vu8a4CzGA9JF3Q+STvs+84QGyzh123lBEPDyYQrQsAspSB bYAyVNPTCew7g/gck6OsOAU91K4xXYGJpOXpF4xM99Q0nvDOd+EKPh92NJ5rjR7WYNDx gc4d+sLVIMIt4d4lIt5zYVUBAn1R4TDp9jVuyXqeWQenSE/fW2egO2i9rI1b0SxAu5nf 4OMQ== X-Gm-Message-State: AOJu0YyTYHdFOI0DqU0WnwlenVaFWs/WfP+jdj3VBvQrTyr9WVV0S/+6 7Y6G4wAd9per6MnDbvxKcAk= X-Google-Smtp-Source: AGHT+IGCKkT+gXx2O5TRW/k1/nwGWJY+xxqSsibDHcafoguRgPyd+G8QL2u8AxXx4aKV9OQjf8GiTg== X-Received: by 2002:a05:600c:3d86:b0:3fa:97b1:b12d with SMTP id bi6-20020a05600c3d8600b003fa97b1b12dmr2062295wmb.2.1692205901425; Wed, 16 Aug 2023 10:11:41 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id a19-20020a05600c225300b003fe1cdbc33dsm24848679wmm.9.2023.08.16.10.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 10:11:41 -0700 (PDT) From: Simon Tournier To: Maxim Cournoyer , 64746@debbugs.gnu.org Subject: Re: [bug#64746] [PATCH v2 3/3] scripts: time-machine: Error when attempting to visit too old commits. In-Reply-To: <7ce3ce800ab5dde1cdaaf272a54738be6256c1b3.1692128648.git.maxim.cournoyer@gmail.com> References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> <7ce3ce800ab5dde1cdaaf272a54738be6256c1b3.1692128648.git.maxim.cournoyer@gmail.com> Date: Wed, 16 Aug 2023 17:39:35 +0200 Message-ID: <87jztvf13c.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Maxim Cournoyer , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines 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 (-) Hi Maxim, For the record, I have documented [1] the various roadblocks when using =E2=80=9Cguix time-machine=E2=80=9D rebuilding all from source. Time-bomb = is one among other annoyances =E2=80=93 I have in mind the complete bootstrap. Well, as Ludo pointed, the CI is currently building all the past releases. Waiting the fixes for all the bugs, I suggest that we retain the substitutes for the release. I mean that, guix time-machine --commit=3Dv1.X.0 -- help just works when substitutes are available. If the project is lacking disk space, the University of Montpellier (France) is proposing to store some binary artifact outputs. At least, they were proposing back on past September in 10 Years of Guix event. :-) There is discussion on guix-sysadmin, I guess. Maybe we could resume this discussion and complete the last steps. WDYT? 1: https://simon.tournier.info/posts/2023-06-23-hackathon-repro.html On Tue, 15 Aug 2023 at 15:44, Maxim Cournoyer w= rote: > * doc/guix.texi (Invoking guix time-machine): Document limitation. > * guix/inferior.scm (cached-channel-instance): New VALIDATE-CHANNELS > argument. Use it to validate channels when there are no cache hit. > * guix/scripts/time-machine.scm > (%options): Tag the given reference with 'tag-or-commit instead of 'commi= t. > (%oldest-possible-commit): New variable. > (guix-time-machine) : New nested procedure. Pass = it to > the 'cached-channel-instance' call. > * tests/guix-time-machine.sh: New test. > * Makefile.am (SH_TESTS): Register it. Cool! That=E2=80=99s a nice usability improvement. > diff --git a/doc/guix.texi b/doc/guix.texi > index b50feed4c4..a3754b7019 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -5060,6 +5060,20 @@ Invoking guix time-machine > large number of packages; the result is cached though and subsequent > commands targeting the same commit are almost instantaneous. >=20=20 > +Due to @command{guix time-machine} relying on the ``inferiors'' > +mechanism (@pxref{Inferiors}), the oldest commit it can travel to is > +commit @samp{6298c3ff} (``v1.0.0''), dated May 1@sup{st}, 2019, which is > +the first release that included the inferiors mechanism. An error is > +returned when attempting to navigate to older commits. There is also some issue with bootstrapping depending on your hardware. About time-bomb, there are also gnutls and openssl or libgit2. It was probably transparent for you because there are substitutable, I guess. While Python 2 had probably been removed for some reasons. Well, I would move the workaround to some dedicated block and move this comment after the note about security --8<---------------cut here---------------start------------->8--- @quotation Note The history of Guix is immutable and @command{guix time-machine} provides the exact same software as they are in a specific Guix revision. Naturally, no security fixes are provided for old versions of Guix or its channels. A careless use of @command{guix time-machine} opens the door to security vulnerabilities. @xref{Invoking guix pull, @option{--allow-downgrades}}. @end quotation =20 +Due to @command{guix time-machine} relying on the ``inferiors'' +mechanism (@pxref{Inferiors}), the oldest commit it can travel to is +commit @samp{6298c3ff} (``v1.0.0''), dated May 1@sup{st}, 2019, which is +the first release that included the inferiors mechanism. An error is +returned when attempting to navigate to older commits. + +@quotation Note +Although it should technically be possible to travel to such an old +revision, the ease to do so will largely depend on the availability of +binary substitutes. When traveling to a distant past, some packages may +not easily build from source anymore. One such example are old versions +of Python 2 which had time bombs in its test suite, in the form of +expiring SSL certificates. This particular problem can be worked around +by setting the hardware clock to a value in the past before attempting +the build. +@end quotation + The general syntax is: =20 @example --8<---------------cut here---------------end--------------->8--- > new file mode 100644 > index 0000000000..8b62ef75ea > --- /dev/null > +++ b/tests/guix-time-machine.sh [...] > +# Visiting a commit older than v1.0.0 fails. > +! guix time-machine --commit=3Dv0.15.0 Cool to add test. But this test needs a network access: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix time-machine --commit=3Dv0.15.0 -- describe guix time-machine: error: Git error: failed to resolve address for git.sava= nnah.gnu.org: Name or service not known --8<---------------cut here---------------end--------------->8--- It=E2=80=99s as I said elsewhere. :-) Well, I have not investigated more b= ut I guess a bug in some Git manipulation. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 14:42:05 2023 Received: (at 64746) by debbugs.gnu.org; 16 Aug 2023 18:42:05 +0000 Received: from localhost ([127.0.0.1]:42092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWLT3-0004ek-6j for submit@debbugs.gnu.org; Wed, 16 Aug 2023 14:42:05 -0400 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]:58699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWLT1-0004eE-Fv for 64746@debbugs.gnu.org; Wed, 16 Aug 2023 14:42:04 -0400 Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-76d71798f9aso51841685a.1 for <64746@debbugs.gnu.org>; Wed, 16 Aug 2023 11:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692211317; x=1692816117; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=PpFR2RoaIUsTOsRMJMJTbYx6ho8kw4cxmuZTF6XBYu4=; b=nn9Sa/fZ6y9bO4wZ+jM1gTlzDbCZLCN4AHo5xid/0QUOXiGJ6YS8aHHvFAKRULhrmq y4sGG7k0x+3o7e5W9lel1QwsGrUvaHakmK4JvkvlTL+pf1bPFIl1d+s0qkxOnv4rsJgS RoXdJLZuIELEmlsxfj2Bty1lN8w/Cqqva1c/VusfPTCT4m1lQAQb2u1M+i4qGWZmWDp1 dUj+y/4mCnTye/PDyQJF0H/+yjHRbFw1ja+p1HenXuoocCaz1HBgrPZJl8oBBM5sWoWG x+CbghrlNECPI2Ml5dBJkngXVdQd476/dEoqW9nKTaBswPPRn48zTOHdXgfu3PzjbKuW 4ZVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692211317; x=1692816117; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PpFR2RoaIUsTOsRMJMJTbYx6ho8kw4cxmuZTF6XBYu4=; b=ktDHFaqc7UtuFGR+BvP8EgPM5flIdc7wwLKRkck3Y36KFkFU15ZvhA4/lMkHcxDOV9 72Ifc7769NefIkXyqyZQwqOwzBTV0Z6U9aZcD5ax4d4jw85lZ4SZoIrV0uTpfJK1XdJE 0A0n3go3Klu/UlWbVZZqaIwiu0GuUBi9t01n7EtAEtGTAi6lLU5me1AMlIzvFt/PQ2g0 nYM7pworQEN5/ExZ6RqWRDw4EkEVsSRiuVGRhYGWTpLAK7YhycBW/TC+iQwIhj0WuqD3 SVAKt/0eoKhYR3I48q3AnbwfaExIupdq/HHVg7I4qV/wBBdIMQptTZKJozm2LqTyKz9i 3qXw== X-Gm-Message-State: AOJu0YxzGesgAgnKsoNxL1WbVhhbfr4t9ADcIT0clrdkdjCMbsO9MqeA Ys45IerRGh+QokhIKFqmsSYTN94p8XU= X-Google-Smtp-Source: AGHT+IF7c3Fng+sCoPmzVzW+CxLxt4esDLylPCIPCKztiNn6pxT7pcnDcnbPb5tVCUcsxVBfojl+7Q== X-Received: by 2002:a05:620a:1a23:b0:76c:a010:259d with SMTP id bk35-20020a05620a1a2300b0076ca010259dmr3346697qkb.23.1692211317522; Wed, 16 Aug 2023 11:41:57 -0700 (PDT) Received: from hurd (dsl-152-182.b2b2c.ca. [66.158.152.182]) by smtp.gmail.com with ESMTPSA id j7-20020a37c247000000b0076730d0b0b9sm4583201qkm.14.2023.08.16.11.41.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 11:41:56 -0700 (PDT) From: Maxim Cournoyer To: Simon Tournier Subject: Re: [bug#64746] [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. References: <87pm3o8epw.fsf_-_@gnu.org> <87sf8jf3ja.fsf@gmail.com> Date: Wed, 16 Aug 2023 14:41:55 -0400 In-Reply-To: <87sf8jf3ja.fsf@gmail.com> (Simon Tournier's message of "Wed, 16 Aug 2023 16:46:49 +0200") Message-ID: <87fs4ij0cs.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Christopher Baines , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@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: -1.0 (-) Hi Simon, Simon Tournier writes: > Hi, > > Thanks Maxim for this improvement. > > > On Tue, 15 Aug 2023 at 18:14, Ludovic Court=C3=A8s wrote: > >> Following your question earlier today on IRC, I realized that this would >> unconditionally add a Git checkout update every time =E2=80=98time-machi= ne=E2=80=99 is >> started. > > Please note that if git.savannah.gnu.org is not reachable, then =E2=80=9C= guix > time-machine=E2=80=9D fails. > > Let start with the regular: > > $ guix describe > Generation 26 Jul 12 2023 09:13:39 (current) > guix 4a027d2 > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: 4a027d2b0ee68e39f21f6802a8cd1751d3065330 > > $ guix time-machine --commit=3D4a027d2 -- describe > Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.= org/git/guix.git'... > substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% > substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... = 100.0% > building /gnu/store/sg8ca36rlbh4il6jy8dk2gr33lxm4z8q-compute-guix-derivat= ion.drv... > Computing Guix derivation for 'x86_64-linux'... | > substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% > substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... = 100.0% > The following derivations will be built: > [...] > building profile with 1 package... > guix 4a027d2 > repository URL: https://git.savannah.gnu.org/git/guix.git > commit: 4a027d2b0ee68e39f21f6802a8cd1751d3065330 > > > So far, so good. Here all is cached and so on. Now, let make > git.savannah.gnu.org unreachable by tweaking some stuff. Then, > > $ guix time-machine --commit=3D4a027d2 -- describe > guix time-machine: error: Git error: failed to resolve address for git.sa= vannah.gnu.org: Name or service not known > [...] > The check if the requested commit is newer than the > %oldest-possible-commit should use the Git history graph closure > similarly as the authentication mechanism, no? > > And this check should come after checking the cache, no? Interesting finding! I think it'd make sense to raise this issue separately and discuss its resolution there, too keep things focused and discoverable :-). --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 14:48:06 2023 Received: (at 64746) by debbugs.gnu.org; 16 Aug 2023 18:48:06 +0000 Received: from localhost ([127.0.0.1]:42097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWLYs-0007Qh-2h for submit@debbugs.gnu.org; Wed, 16 Aug 2023 14:48:06 -0400 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]:42127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWLYq-0007Pb-2F for 64746@debbugs.gnu.org; Wed, 16 Aug 2023 14:48:04 -0400 Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-6434cd84a96so917526d6.0 for <64746@debbugs.gnu.org>; Wed, 16 Aug 2023 11:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692211678; x=1692816478; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=xNttlYpu3YEupkAiMDaNeeGsz0+mRkMf1WZ9mYt8Zng=; b=RYxWdbtcTIUG8wXjOt4uu2gtIkpurDtUabSR5oWwOsP1f/+vwb/IIxoowSW8VYYDHr 9smhOIpkjQLHLiUWowGlbRzH5zdeC/Xt6rRu4vQ8HoveWEPyeK1OO1wTvDFvP7CasZik Yo+sLf5cQU9Ajt2fPC+42SuP09K3ISl/+fkhbIwMZ932CHgL4Y2t/MseIu+Fo9S4mBV0 WTIQ0iWfZVruJckFNOjD1l7ty5rrZR8OK4O4tc7I76zxyF+xHaOBO5uyeHZc5qXpuE9n 5VHbApAzpBtBv6nyZIjXyRW0LjDQIt9PcbPQ07Q3olUwmvdsh8s1Nf+gwLqmyNyYdpIq 6OzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692211678; x=1692816478; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xNttlYpu3YEupkAiMDaNeeGsz0+mRkMf1WZ9mYt8Zng=; b=YeDm/aYmAu6bTbG4v+vWYrUEegxRrY2zg2Zo34C4pQuO3FdbCTR/SEfuzV2JfC6twx Irvgh84hxVgXiJkOLtKQ7ktfSZNV7yecjmZpxZsLg8fyOMTboI6ARsE9v4W7X7TE1Pi1 8KUYhwIBFgMmgsK/ksWSGqQDGoCHVB34pBEr+wyG/phVVm5G/XoHeKLIwqOok3e5H+LT qzTBq7gFHByA2lMvNh46uqlPKBjk+4mMGvIP15Zt86VoivUny8KVLGco0nsGaMWDi5Bi uHha4drPG4e35gEu5MuwedaR3iWq5Fk8qkhJ8AH7trCZG0wHZXDNAy3mHGhW9SjrPR90 ajPA== X-Gm-Message-State: AOJu0Yz/YNjzo0jm9gZ/CHw9F/ZrxdeJ+X47zphSunTGysI5PlZL6zbN jRqT5dKKnhMVgKhRLdB6RDanGtkfZ4E= X-Google-Smtp-Source: AGHT+IEOSKjqHH2vK6v/wObjtPLPrjXumvO7/BXUI72k7VMPODF/1sDMTTsBokFNRg5j9vKE4djhLg== X-Received: by 2002:a05:6214:2523:b0:635:ce65:38a2 with SMTP id gg3-20020a056214252300b00635ce6538a2mr864679qvb.6.1692211678410; Wed, 16 Aug 2023 11:47:58 -0700 (PDT) Received: from hurd (dsl-152-182.b2b2c.ca. [66.158.152.182]) by smtp.gmail.com with ESMTPSA id i8-20020a0c9c88000000b0063d7740b5d2sm5108920qvf.46.2023.08.16.11.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 11:47:57 -0700 (PDT) From: Maxim Cournoyer To: Simon Tournier Subject: Re: [bug#64746] [PATCH v2 2/3] pull: Tag commit argument with 'tag-or-commit. References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> <87o7j7f2tb.fsf@gmail.com> Date: Wed, 16 Aug 2023 14:47:56 -0400 In-Reply-To: <87o7j7f2tb.fsf@gmail.com> (Simon Tournier's message of "Wed, 16 Aug 2023 17:02:24 +0200") Message-ID: <87bkf6j02r.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@debbugs.gnu.org, Christopher Baines 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 (-) Hi Simon, Simon Tournier writes: > Hi Maxim, > > On Tue, 15 Aug 2023 at 15:44, Maxim Cournoyer wrote: >> For compatibility with (guix git) procedures. >> >> * guix/scripts/pull.scm (channel-list): Also accept tag-or-commit tagged >> refspec. >> --- > > I am not sure to understand these both changes. > >> >> guix/scripts/pull.scm | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm >> index ecd264d3fa..9b78d4b5ca 100644 >> --- a/guix/scripts/pull.scm >> +++ b/guix/scripts/pull.scm >> @@ -166,7 +166,7 @@ (define %options >> (alist-delete 'repository-url result)))) >> (option '("commit") #t #f >> (lambda (opt name arg result) >> - (alist-cons 'ref `(commit . ,arg) result))) >> + (alist-cons 'ref `(tag-or-commit . ,arg) result))) > > Well, why not. :-) The reason is to standardize the API of (guix pull) and (guix git), whose procedure had a different expectation for 'ref' objects. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 21:41:42 2023 Received: (at 64746-done) by debbugs.gnu.org; 17 Aug 2023 01:41:42 +0000 Received: from localhost ([127.0.0.1]:42379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWS18-0001VO-19 for submit@debbugs.gnu.org; Wed, 16 Aug 2023 21:41:42 -0400 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]:46378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWS15-0001VB-Gm for 64746-done@debbugs.gnu.org; Wed, 16 Aug 2023 21:41:40 -0400 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-645181e1eaeso28897286d6.1 for <64746-done@debbugs.gnu.org>; Wed, 16 Aug 2023 18:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692236493; x=1692841293; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=KPhTKJ+pwLG4GBpqS265QNKIJwbX3NYBlghnjlljPNw=; b=gNkeLU5URNCSbhaVBx9R06+/eKtxhmiulq5WwYfKhkawHtOVZyt44vMrqsbi/Vk9Wa 9lAtpNtwOzcCjVk/dUd3wC+jYKPm/w8BFJRzJltsIO0WXPd4FuPzalft1siQ1bd67xwQ GkeDtPumu6cT67CVBHbTpxnBdnuHiuqCOSUSdaK4Io/cNrIoiZJXgRBi3dXcwG9IxVoi 49e16Ym3KMKuacH1Et7UqhysW0zzeYrXYChYIzlCn4kLA61I3dMcxmhu53jEMmFLxoD4 xPglGdmSW12P4bvoBR/IlH+lXJla/qFEOO+YDtjhjiKJMk8SCLd2BpMU5ekiAaPRc0Jx ohJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692236493; x=1692841293; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=KPhTKJ+pwLG4GBpqS265QNKIJwbX3NYBlghnjlljPNw=; b=KpL05umcoDpLpUu97wud9fUdcLNPxvvA8y+YVT1VczBiyPdWq4NsSFO5lzpfGg4csi mLswHy8LHJ1fafpbX1u6orKRI37XUJlDmedUuEsc2fCPY0WVPANIERF6+z8iYsx76/Xg 2tt3G4FG0Pz4LReDuXbTirk7Da5mWJiJXCXwVjS8BlMfJbID1SY4YvXSwcvRYggvZK3Y bd3sE1nxTH1F6ZhMbOL7PNK6i+EeZwyH0kBYpwni0KV7d6wIyYl/CwW5Pog53PlFfjgx v0Vq/fJZTS275lIDG5Qh2PRXMK6+Ov1ND+Hwxa8xGjgRPowb8Z/9izU55WW3tUR1k0xP 5DfQ== X-Gm-Message-State: AOJu0YwzOJgiAD3yaTUaLl7tORUw8s5r9XgG7b4+gDlAD57vvnsF9sj/ oLEiaXGr3KEy2NnaqjP5pOY= X-Google-Smtp-Source: AGHT+IHJbCyEjZfqnHPVYprt491pnKaE2azCf2Zr0iP4dv6rdXLQvYzdcl8gtlWkQu1L7EvcP92Wcg== X-Received: by 2002:a0c:e093:0:b0:635:e773:dc04 with SMTP id l19-20020a0ce093000000b00635e773dc04mr3615655qvk.56.1692236493539; Wed, 16 Aug 2023 18:41:33 -0700 (PDT) Received: from hurd (dsl-152-182.b2b2c.ca. [66.158.152.182]) by smtp.gmail.com with ESMTPSA id j8-20020a0cf508000000b0063d2b827bbfsm804509qvm.49.2023.08.16.18.41.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 18:41:32 -0700 (PDT) From: Maxim Cournoyer To: Simon Tournier Subject: Re: [bug#64746] [PATCH v2 3/3] scripts: time-machine: Error when attempting to visit too old commits. References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> <7ce3ce800ab5dde1cdaaf272a54738be6256c1b3.1692128648.git.maxim.cournoyer@gmail.com> <87jztvf13c.fsf@gmail.com> Date: Wed, 16 Aug 2023 21:41:31 -0400 In-Reply-To: <87jztvf13c.fsf@gmail.com> (Simon Tournier's message of "Wed, 16 Aug 2023 17:39:35 +0200") Message-ID: <87y1iah2d0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746-done Cc: 64746-done@debbugs.gnu.org, Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines 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 (-) Hi Simon, Simon Tournier writes: > Hi Maxim, > > For the record, I have documented [1] the various roadblocks when using > =E2=80=9Cguix time-machine=E2=80=9D rebuilding all from source. Time-bom= b is one among > other annoyances =E2=80=93 I have in mind the complete bootstrap. > > Well, as Ludo pointed, the CI is currently building all the past > releases. Waiting the fixes for all the bugs, I suggest that we retain > the substitutes for the release. I mean that, > > guix time-machine --commit=3Dv1.X.0 -- help > > just works when substitutes are available. If the project is lacking > disk space, the University of Montpellier (France) is proposing to store > some binary artifact outputs. At least, they were proposing back on > past September in 10 Years of Guix event. :-) There is discussion on > guix-sysadmin, I guess. Maybe we could resume this discussion and > complete the last steps. WDYT? That make sense. The current means this can be achieved is by having a jobset for each release in Cuirass, as hinted in doc/release.org from the guix-maintenance repo: --8<---------------cut here---------------start------------->8--- ** Adding a Cuirass jobset for branch =3Dversion-X.Y.Z=3D This jobset will have to be kept until the next release, so that substitutes remain available. The easiest way to add a new jobset is directly via the web interface of Cuirass. To be allowed to do so, you must authenticate with the Cuirass instance via a private TLS certificate imported into your browser. --8<---------------cut here---------------end--------------->8--- They should be added declaratively in the guix-maintenance repo to avoid loosing them. Would you like to give it a try? [...] >> diff --git a/doc/guix.texi b/doc/guix.texi >> index b50feed4c4..a3754b7019 100644 >> --- a/doc/guix.texi >> +++ b/doc/guix.texi >> @@ -5060,6 +5060,20 @@ Invoking guix time-machine >> large number of packages; the result is cached though and subsequent >> commands targeting the same commit are almost instantaneous. >> >> +Due to @command{guix time-machine} relying on the ``inferiors'' >> +mechanism (@pxref{Inferiors}), the oldest commit it can travel to is >> +commit @samp{6298c3ff} (``v1.0.0''), dated May 1@sup{st}, 2019, which is >> +the first release that included the inferiors mechanism. An error is >> +returned when attempting to navigate to older commits. > > There is also some issue with bootstrapping depending on your hardware. > > About time-bomb, there are also gnutls and openssl or libgit2. It was > probably transparent for you because there are substitutable, I guess. > While Python 2 had probably been removed for some reasons. > > Well, I would move the workaround to some dedicated block and move this > comment after the note about security > > @quotation Note > The history of Guix is immutable and @command{guix time-machine} > provides the exact same software as they are in a specific Guix > revision. Naturally, no security fixes are provided for old versions > of Guix or its channels. A careless use of @command{guix time-machine} > opens the door to security vulnerabilities. @xref{Invoking guix pull, > @option{--allow-downgrades}}. > @end quotation > > +Due to @command{guix time-machine} relying on the ``inferiors'' > +mechanism (@pxref{Inferiors}), the oldest commit it can travel to is > +commit @samp{6298c3ff} (``v1.0.0''), dated May 1@sup{st}, 2019, which is > +the first release that included the inferiors mechanism. An error is > +returned when attempting to navigate to older commits. > + > +@quotation Note > +Although it should technically be possible to travel to such an old > +revision, the ease to do so will largely depend on the availability of > +binary substitutes. When traveling to a distant past, some packages may > +not easily build from source anymore. One such example are old versions > +of Python 2 which had time bombs in its test suite, in the form of > +expiring SSL certificates. This particular problem can be worked around > +by setting the hardware clock to a value in the past before attempting > +the build. > +@end quotation Good suggestion, done! > The general syntax is: > > @example > > > >> new file mode 100644 >> index 0000000000..8b62ef75ea >> --- /dev/null >> +++ b/tests/guix-time-machine.sh > > [...] > >> +# Visiting a commit older than v1.0.0 fails. >> +! guix time-machine --commit=3Dv0.15.0 > > Cool to add test. But this test needs a network access: > > $ ./pre-inst-env guix time-machine --commit=3Dv0.15.0 -- describe > guix time-machine: error: Git error: failed to resolve address for git.sa= vannah.gnu.org: Name or service not known > > It=E2=80=99s as I said elsewhere. :-) Well, I have not investigated more= but I > guess a bug in some Git manipulation. >From my testing, the test doesn't require networking, perhaps because it doesn't use the --commit or --branch arguments. I've tested that with this in /etc/hosts, with the first IP being bogus: --8<---------------cut here---------------start------------->8--- 192.168.254.254 git.savannah.gnu.org savannah --8<---------------cut here---------------end--------------->8--- I've investigated a bit, and it seems that reaching to the network is only done when using tags or branch names, not exact commits. That is expected I think, since tags or branch names are not immutable in Git, while a commit ID is. I've now installed this change; thanks for the review and suggestions! -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 13:08:11 2023 Received: (at 64746) by debbugs.gnu.org; 17 Aug 2023 17:08:11 +0000 Received: from localhost ([127.0.0.1]:45465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWgTi-0006tq-La for submit@debbugs.gnu.org; Thu, 17 Aug 2023 13:08:10 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:39330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWgTf-0006tO-Hi for 64746@debbugs.gnu.org; Thu, 17 Aug 2023 13:08:09 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3fe1b6192e8so213425e9.1 for <64746@debbugs.gnu.org>; Thu, 17 Aug 2023 10:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692292080; x=1692896880; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=sF6sFlj/XWsHHj48qqLmYjXG0EgiYjXYOpb/WpXY9XA=; b=q/7RLD8meezQYAd/NEnX+PLo28u/5pEpddgQ/3HqdEloFDZ93/f8AHVLRiQGHjrDKo 18qGgqrFwxrbio+DNfF+ioeeLuGfrTtvqP99gA5u3smRk1E+ilP7yWAPllW+9zpxdfdJ sqXVGynTulIGzFZSaKlGerBbbhlpGB3dxMmIFPVo0ZOdQDI3W1qzKL0nJhAlcLkPSycp FI3QJ2BnkJatq4rwr4SR/l0e1jzwOIvQsAShsg0KfNITOFKqciKDuyrFhxJ+eLAcEkid h5pO1dMfKydXcSA0WS2NSoiV1WWF47HEhpFr2stEZg59rtHfauVexmP3MZr7ZAAWkjsF QqSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692292080; x=1692896880; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sF6sFlj/XWsHHj48qqLmYjXG0EgiYjXYOpb/WpXY9XA=; b=KjTVOt3ju7P7tYuLndUS1m7v1iF2diAFo2+NmQnK2Y83iRdHCm3L6p7kkp0tIO6eVY qnxR+FjilxqivHYZPY+pdKiBNw+t1JA8NorIJ5j102Ekdk6E10b10SKJZOOtj96QMAF5 +2524F8VTATq/YNGeLZG0ZK/5sG2d4aC9bjXj5U0gmboBWz9ynxHJ0s+DgDTOV1N5Dsb siGSds+VQZlCTSmuwrAtKhz/zQuMHHP1RDhgfaxO1rsP6wdbuyJh5WKYpFGT2CgGRbbx DXi5/0WikufsH/bB5imStdB9/8yYpkERHd/gUl/ReW320Kor7vIRjnvjT2BpDjNWDB2n TuSQ== X-Gm-Message-State: AOJu0YwbG2wVrXo23BrGGoUHHHcj9umidgfI9q3oBP0S7R1BvT+713Ns D7oR+UablgE9aHX1rRb4r4w= X-Google-Smtp-Source: AGHT+IG49xFDY55KSCo/teF92jRFLdQIVQIwFgbBF/CO4uITUghhmbfE+Ji6WGoKUpvISMrRAL3FeA== X-Received: by 2002:a05:600c:3ba6:b0:3f8:efad:31ee with SMTP id n38-20020a05600c3ba600b003f8efad31eemr260478wms.2.1692292080291; Thu, 17 Aug 2023 10:08:00 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id k1-20020a5d4281000000b00317a29af4b2sm25095928wrq.68.2023.08.17.10.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Aug 2023 10:07:59 -0700 (PDT) From: Simon Tournier To: Maxim Cournoyer Subject: Re: [bug#64746] [PATCH v2 2/3] pull: Tag commit argument with 'tag-or-commit. In-Reply-To: <87bkf6j02r.fsf@gmail.com> References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> <87o7j7f2tb.fsf@gmail.com> <87bkf6j02r.fsf@gmail.com> Date: Thu, 17 Aug 2023 16:45:45 +0200 Message-ID: <87a5up4tie.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@debbugs.gnu.org, Christopher Baines 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 (-) Hi Maxim, On Wed, 16 Aug 2023 at 14:47, Maxim Cournoyer w= rote: >>> (option '("commit") #t #f >>> (lambda (opt name arg result) >>> - (alist-cons 'ref `(commit . ,arg) result))) >>> + (alist-cons 'ref `(tag-or-commit . ,arg) result))) [...] > (match ref > - (('commit . commit) > + ((or ('commit . commit) > + ('tag-or-commit . commit)) > The reason is to standardize the API of (guix pull) and (guix git), > whose procedure had a different expectation for 'ref' objects. My point is that this =E2=80=99or=E2=80=99 is useless, IIUC. Well, I have = removed it in the series fixing the annoyance with the network access of =E2=80=9Cguix time-machine=E2=80=9D. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 14:16:22 2023 Received: (at 64746) by debbugs.gnu.org; 17 Aug 2023 18:16:22 +0000 Received: from localhost ([127.0.0.1]:45572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWhXh-00034R-Of for submit@debbugs.gnu.org; Thu, 17 Aug 2023 14:16:22 -0400 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:57831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWhXf-00034C-9H for 64746@debbugs.gnu.org; Thu, 17 Aug 2023 14:16:20 -0400 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3a43cbb432aso6114404b6e.3 for <64746@debbugs.gnu.org>; Thu, 17 Aug 2023 11:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692296173; x=1692900973; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=DDPzmLwUDa9Ccy3aJZF5PhxaOvnSC1WyfSgpi6ByVAk=; b=dEP7vS2uc5C+jA0DpgT5EiDglyX4ZoWqS3Pb0H4hOOBBxsEFXNaQkoUQucUG63tgqT xvkuQNh2KJ5ANxEGrPoJ41BWulMrMJCJFwTLe98mBStq2RH3AlZ10DM8iEF2g+04LsR7 z5xwflFBZBnKkWrcUIPYWt8MBrMWmuS77bBiCr1UfFORWr9VdEV3WH5GTJ4zZ34SUrwL fPMlaGXO9EDXv4CLnd+rie9V+JVJT8atgGuKKMqTgb2yUdSS4eieCP4iNtRaqoXt3bnn 4QgHLeLgztVkqPf/EiVS+Z1/Z1IhsHlFOraFjUnGx3rdClAcdj0MpYEXcbudt9fTQASW 7Wbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692296173; x=1692900973; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DDPzmLwUDa9Ccy3aJZF5PhxaOvnSC1WyfSgpi6ByVAk=; b=IWxhhpC/Ks/OzQdr0w50d58/yRM3y9WcI7sXxg90XVk+ZhR/wehUXkQAg6TkI5jmHf sU3zGje6fAQTT+fPvzI7J6uEZOlm++wajv98s6CSEhaqWVAJyoDwDOwZAlKMgfTFk2vA HWffggmG5TatUEJLR+UbzRDOmQ3hdFkjeO+Rw7Ch4xTBMBAOTJTeWh7s5aoDCFftebvl wyp67CFg9qAH1CqUq4I7TzwY104HY1KQstcvH7n7QD1I/TB6xmh8HVc/Mjm/UiMcmdvF A54DdHM6rHp6JV6dCJBlzOjQ258TJLjyd7VamzR0HMbdrBdj10P27MwUCL8A4IVhbbWs U7cQ== X-Gm-Message-State: AOJu0YxQkTs1SJ1LmpvVHf5C0KrrqVSv/wN5wF2GTzk/J0TT3yNDAMK7 yD1OYVugMyzrib+WZ3I4eN4= X-Google-Smtp-Source: AGHT+IE0w8RKzi811LPMpk1fohgLl8s6OmuqNsAK53z/iBPFRAJfQC4KYdXLumuWaFwD5D6I9r5Gmg== X-Received: by 2002:a54:4397:0:b0:3a4:39e5:5c69 with SMTP id u23-20020a544397000000b003a439e55c69mr268098oiv.53.1692296173365; Thu, 17 Aug 2023 11:16:13 -0700 (PDT) Received: from hurd (dsl-152-182.b2b2c.ca. [66.158.152.182]) by smtp.gmail.com with ESMTPSA id h18-20020a0cf452000000b0063d1f967268sm47481qvm.111.2023.08.17.11.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Aug 2023 11:16:12 -0700 (PDT) From: Maxim Cournoyer To: Simon Tournier Subject: Re: [bug#64746] [PATCH v2 2/3] pull: Tag commit argument with 'tag-or-commit. References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> <87o7j7f2tb.fsf@gmail.com> <87bkf6j02r.fsf@gmail.com> <87a5up4tie.fsf@gmail.com> Date: Thu, 17 Aug 2023 14:16:11 -0400 In-Reply-To: <87a5up4tie.fsf@gmail.com> (Simon Tournier's message of "Thu, 17 Aug 2023 16:45:45 +0200") Message-ID: <87jzttfsb8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@debbugs.gnu.org, Christopher Baines 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 (-) Hi Simon, Simon Tournier writes: > Hi Maxim, > > On Wed, 16 Aug 2023 at 14:47, Maxim Cournoyer = wrote: > >>>> (option '("commit") #t #f >>>> (lambda (opt name arg result) >>>> - (alist-cons 'ref `(commit . ,arg) result))) >>>> + (alist-cons 'ref `(tag-or-commit . ,arg) result))) > > [...] > >> (match ref >> - (('commit . commit) >> + ((or ('commit . commit) >> + ('tag-or-commit . commit)) > >> The reason is to standardize the API of (guix pull) and (guix git), >> whose procedure had a different expectation for 'ref' objects. > > My point is that this =E2=80=99or=E2=80=99 is useless, IIUC. Well, I hav= e removed it in > the series fixing the annoyance with the network access of =E2=80=9Cguix > time-machine=E2=80=9D. It isn't, unless you meant after applying further changes :-) You should be able to see the problem by reverting that commit and running 'guix time-machine --commit=3Dv1.4.0 -- describe', for example. --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 14:48:10 2023 Received: (at 64746) by debbugs.gnu.org; 17 Aug 2023 18:48:10 +0000 Received: from localhost ([127.0.0.1]:45622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWi2S-0003yw-EE for submit@debbugs.gnu.org; Thu, 17 Aug 2023 14:48:10 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:38326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWi2M-0003xW-Pc for 64746@debbugs.gnu.org; Thu, 17 Aug 2023 14:48:06 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4fe8c1aec15so5989e87.1 for <64746@debbugs.gnu.org>; Thu, 17 Aug 2023 11:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692298076; x=1692902876; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6pdbA4tQF4NWpHt8IsO50Ze1KqOC4KH6KHHk0XdxIp8=; b=NKeBqv+NMNLRBCRphLWWn86oabJNAdghL3PRfiv0q7tA46qBJQT5vpgz+UpTG/UhWm Yx8C/TUK4Tw9FOh0CGgrrRz+pgXRxA6Eo2aXQFMALbqt9OxobVMPeNN3tzvk4uwNo/o1 tD6hHRvKL/2NjS3SSGkjlS/MF6iOCpWOAAxcf/culyrK5HWPIKnXhng//AMKp+ZD2X/Y U8SnM0/9X93e5K69A0M8Wm2+N73u4Prynl6FuNDJWdgIBiHhrkdotQo+ZSdsONTUhx/V AbLR0/siFch7QAlpX6carF7OZ0cIRCRO7uL+r6J6zW5IxP6WnuQCEfU/X1+J315BVOmX 2A8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692298076; x=1692902876; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6pdbA4tQF4NWpHt8IsO50Ze1KqOC4KH6KHHk0XdxIp8=; b=dmvi39sqZgn3+WZ60OIf14zyqhAwzjjhpT2knzJVxgx3MQasALk6s2wdJTMetJztb/ zGm+mMJ65+qSNeT3TMRVbqmhrem+Snfu+2UTcu5OobSeSTB7fPYbM2GSxm293zuovKwl A9Kv1Dw9nOtKIgtISqko5cX9k4abunob9RldWM/1zQ36VIFB/4wA/rs5B24Fqd8ThoUC HeP2SP3Bj8+wCdiIH1BHQH3taf8YvwYlsCtKTcDzlJT3+Y6g46ghM64lYH9Yx33Ej6Sm DS3JrHXGyLexprqT44WJFwMPGfghwUyDGsNK92jW7KLT2U10P+rm7xFQEqTvtKUR5AhU 3PbA== X-Gm-Message-State: AOJu0YxywmMFRaRqEkX+Xg7VPh1LXGoLhMlz/Wp+gLNAqNhNZzODSq8Y fnOAlNOD8z+JnnPylbaqZOuKyiVWC3qVp4hgqrA= X-Google-Smtp-Source: AGHT+IGrHK8ZcROR38Z4phYUe60nr1sH6eGCt3ND/TjdnGFnje/0ylS5nsEJf1GfwV21Uj4UDR0mEv7zA1V4Yhsi5T8= X-Received: by 2002:ac2:5967:0:b0:4ff:8c32:fdbb with SMTP id h7-20020ac25967000000b004ff8c32fdbbmr78431lfp.6.1692298076364; Thu, 17 Aug 2023 11:47:56 -0700 (PDT) MIME-Version: 1.0 References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> <87o7j7f2tb.fsf@gmail.com> <87bkf6j02r.fsf@gmail.com> <87a5up4tie.fsf@gmail.com> <87jzttfsb8.fsf@gmail.com> In-Reply-To: <87jzttfsb8.fsf@gmail.com> From: Simon Tournier Date: Thu, 17 Aug 2023 20:47:44 +0200 Message-ID: Subject: Re: [bug#64746] [PATCH v2 2/3] pull: Tag commit argument with 'tag-or-commit. To: Maxim Cournoyer Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Mathieu Othacehe , =?UTF-8?Q?Ludovic_Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@debbugs.gnu.org, Christopher Baines 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 (-) Re Maxim, On Thu, 17 Aug 2023 at 20:16, Maxim Cournoyer w= rote: > > On Wed, 16 Aug 2023 at 14:47, Maxim Cournoyer wrote: > > > >>>> (option '("commit") #t #f > >>>> (lambda (opt name arg result) > >>>> - (alist-cons 'ref `(commit . ,arg) result))) > >>>> + (alist-cons 'ref `(tag-or-commit . ,arg) result)= )) > > > > [...] > > > >> (match ref > >> - (('commit . commit) > >> + ((or ('commit . commit) > >> + ('tag-or-commit . commit)) > > > >> The reason is to standardize the API of (guix pull) and (guix git), > >> whose procedure had a different expectation for 'ref' objects. > > > > My point is that this =E2=80=99or=E2=80=99 is useless, IIUC. Well, I h= ave removed it in > > the series fixing the annoyance with the network access of =E2=80=9Cgui= x > > time-machine=E2=80=9D. > > It isn't, unless you meant after applying further changes :-) You should > be able to see the problem by reverting that commit and running 'guix > time-machine --commit=3Dv1.4.0 -- describe', for example. Yes for sure because you introduced this in guix/scripts/time-machine.scm, (lambda (opt name arg result) - (alist-cons 'ref `(commit . ,arg) result))) + (alist-cons 'ref `(tag-or-commit . ,arg) result))) with the previous commit 79ec651a286c71a3d4c72be33a1f80e76a560031. Well, I feel there is a misunderstanding. :-) And maybe I am missing something... IIUC, the option parser: (option '("commit") #t #f (lambda (opt name arg result) (alist-cons 'ref `(commit . ,arg) result))) implemented in guix/scrtips/pull.scm provides a way to construct this REF. This way should be compliant with the other one in guix/scripts/time-machine.scm -- at least for being consistent. And I am missing the reason why you introduced this difference. If the both option parsers use the same way, then the 'or' is useless. As I said initially commenting this patch v2 2/3: --8<---------------cut here---------------start------------->8--- > For compatibility with (guix git) procedures. > > * guix/scripts/pull.scm (channel-list): Also accept tag-or-commit tagged > refspec. > --- I am not sure to understand these both changes. --8<---------------cut here---------------end--------------->8--- Anyway, my other message [1] in #65352 contains the two alternatives for closing this discussion. :-) 1: https://issues.guix.gnu.org/65352#4 Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 22 22:54:28 2023 Received: (at 64746) by debbugs.gnu.org; 23 Aug 2023 02:54:28 +0000 Received: from localhost ([127.0.0.1]:60748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYe0p-0003az-Md for submit@debbugs.gnu.org; Tue, 22 Aug 2023 22:54:28 -0400 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:50525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYe0o-0003al-7o for 64746@debbugs.gnu.org; Tue, 22 Aug 2023 22:54:26 -0400 Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-76dafe9574bso124620085a.1 for <64746@debbugs.gnu.org>; Tue, 22 Aug 2023 19:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692759257; x=1693364057; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=pbLk+v5heawEU1/r1Cbv6vxs18YZlSmzi4S+X49+gLU=; b=CtggA8AnlR1+f1j8vUSAJyaXDi4sqgj5UpuclnDk75lh/WhfO8zkT+wZEKskWBu5G+ p4W+VIKjjzJhrJBLIMncxj9lA+/9wbnobEq+fJ8H9DxJEusU2rnvMGvNyWdKwy7BhG1H hf3Ym00jZNR/Y/qXsblO2deNQbHme8kDGFmWO1zkwS74JdOjo3tNq+bmY/dF2VZ3DU7V XTWo3h3KoejpQLXrvEvkBKb9L4HfrQtSKf0G6w6MJ5AhmeKiVZ2R9ppzNLSax9VNmdqg FhsTSVrO2Ami4P3DWr0XZOV1tjLsG6IMTOrAu/qTpQpSkbunxYCTuC+jphVcDpAAtzro +BnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692759257; x=1693364057; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pbLk+v5heawEU1/r1Cbv6vxs18YZlSmzi4S+X49+gLU=; b=Z7IB3An3gHljnF4fcvEHVDt86sESvc5EBfwp+bN47VALj5ujcqzzm0sqDDoRNxDYhf qfx4P2zluhZiRHEOy0xfGt2UPnQn1ubXoD5pa2r+NafmSe5buH4t8rXet5TgDsyvc0h0 VhcXIZswtUzAg9OZ+5AvQ0SwTdCsIe9t73ob5lkK66srQoUsfwNFOwFob3DbrSR6qx9z p9LyV6WKylD6+mYsLPAs3yiZewnFqCzVOw7Fg1O8z9YzgpDk7hFXNYpdAiRS9u/GmbPo qgCuCA+5KxUTDc3D9fSqg8QimH1JyJOAb9mvupHoCJNw5oBz+Je7uwZZpxhQYLEJgoPr 8tkg== X-Gm-Message-State: AOJu0Yy7J3i/uEfmxw3L/4Lnofqj0/Rj0xQg2uYLKXPRH8dOuw/IDSxY +SFdVaHkDKI6/8u/tGuo8Ks= X-Google-Smtp-Source: AGHT+IEz08JIiZ9wIBtFcedNqLxaa2uYPCwsgSRETa7K4FJp62LjvAThopbyZZ+TEG2WrD0nluxPoA== X-Received: by 2002:a05:622a:108:b0:405:509b:524 with SMTP id u8-20020a05622a010800b00405509b0524mr13886287qtw.7.1692759257468; Tue, 22 Aug 2023 19:54:17 -0700 (PDT) Received: from hurd (dsl-158-129.b2b2c.ca. [66.158.158.129]) by smtp.gmail.com with ESMTPSA id h11-20020a0cf44b000000b0063c71b62239sm3808121qvm.42.2023.08.22.19.54.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 19:54:16 -0700 (PDT) From: Maxim Cournoyer To: Simon Tournier Subject: Re: bug#64746: [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> <87o7j7f2tb.fsf@gmail.com> <87bkf6j02r.fsf@gmail.com> <87a5up4tie.fsf@gmail.com> <87jzttfsb8.fsf@gmail.com> Date: Tue, 22 Aug 2023 22:54:15 -0400 In-Reply-To: (Simon Tournier's message of "Thu, 17 Aug 2023 20:47:44 +0200") Message-ID: <87y1i2a2p4.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@debbugs.gnu.org, Christopher Baines 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 (-) Hi again, Simon Tournier writes: > Re Maxim, > > On Thu, 17 Aug 2023 at 20:16, Maxim Cournoyer = wrote: > >> > On Wed, 16 Aug 2023 at 14:47, Maxim Cournoyer wrote: >> > >> >>>> (option '("commit") #t #f >> >>>> (lambda (opt name arg result) >> >>>> - (alist-cons 'ref `(commit . ,arg) result))) >> >>>> + (alist-cons 'ref `(tag-or-commit . ,arg) result= ))) >> > >> > [...] >> > >> >> (match ref >> >> - (('commit . commit) >> >> + ((or ('commit . commit) >> >> + ('tag-or-commit . commit)) >> > >> >> The reason is to standardize the API of (guix pull) and (guix git), >> >> whose procedure had a different expectation for 'ref' objects. >> > >> > My point is that this =E2=80=99or=E2=80=99 is useless, IIUC. Well, I = have removed it in >> > the series fixing the annoyance with the network access of =E2=80=9Cgu= ix >> > time-machine=E2=80=9D. >> >> It isn't, unless you meant after applying further changes :-) You should >> be able to see the problem by reverting that commit and running 'guix >> time-machine --commit=3Dv1.4.0 -- describe', for example. > > Yes for sure because you introduced this in guix/scripts/time-machine.scm, > > (lambda (opt name arg result) > - (alist-cons 'ref `(commit . ,arg) result))) > + (alist-cons 'ref `(tag-or-commit . ,arg) result))) > > with the previous commit 79ec651a286c71a3d4c72be33a1f80e76a560031. It's a bit convoluted, but there are three things involved: 1. (guix scripts time-machine) 2. (guix pull) 3. (guix git) They are involved in that order, if I remember correctly. Now the important part is that the update-cached-checkout from (guix git), newly used in (guix scripts time-machine), should be passed a tag-or-commit ref and not a commit one if we want to support both tags or commits (otherwise tags would throw an error about not respecting a git hash format). Since 'guix time-machine --commit' is documented as accepting a tag or commit, it makes sense to tag it as such at that point. I hope this clarifies it? --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 23 12:40:28 2023 Received: (at 64746) by debbugs.gnu.org; 23 Aug 2023 16:40:29 +0000 Received: from localhost ([127.0.0.1]:34986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYquC-0000rU-GU for submit@debbugs.gnu.org; Wed, 23 Aug 2023 12:40:28 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:38058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYqu8-0000qx-SN for 64746@debbugs.gnu.org; Wed, 23 Aug 2023 12:40:27 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3fefaf4e3c6so3054695e9.0 for <64746@debbugs.gnu.org>; Wed, 23 Aug 2023 09:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692808815; x=1693413615; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=I0yK9ZnqnsRuuiZMVsqliR/HjyEVWL73vOV8VqOHR08=; b=pob2CyVvCtFqgLjmiyrR/5V0zqrQoS3Ws5VI/yqvRPatfap3LiIbX7Q6xiGwnXYFPv royrvTWeoLKG8K44y9UIxyK0Nr7ra/G94pFSAkG4VLw8UVye1u+FbXNMxJeXFLM1QSGP imOprMPjhfvb6Ll61/UK8fO0S7sZ9O4Lk6ms0KQro+tnixW2q8d6qgyBeTAW+9M3RkwJ qLcfJUj9vVp+smMQhfEtoit1K7+gypALnrfUx6cA0VGX9uTXt8929BXIraGerqOfOE3T 9tSFBoHp9AcbwZV+8ilDQzxKsN+U7CbdUfafV/cBhp9mISaE/5UOTcwfh+hy0We80V6b zk4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692808815; x=1693413615; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=I0yK9ZnqnsRuuiZMVsqliR/HjyEVWL73vOV8VqOHR08=; b=It0lilL412Ix6BtzxBZHWH8MQranSpzuHfZPEBrbWVYqpQZa5AvyTqOXfHdS3hNeac LSHXnKtIpS0XtccTc9GpnDLL/DS9D7es39XFdCnnt/LXvjAxLRVFw9yhXknerenKluHV R4+909HI+lndVcUTGB+81QMdeFzTGxDNaz+Uinb2eLRkZChmkjq3tqiG5DCB7izsLnvx x5+SUvy0wMasCt4rrTl4YqwOpl/hqlEaxlc3SO2dCdcb5bzBDmYJ0D/pDKz7wFnRs36k e11UeCQE9XNShHgLqKL9Xknlr3y1aiNQxJYaq1LDjIA+6cPtBsYZ53BIk7iOgSS2Mr+b Op2g== X-Gm-Message-State: AOJu0YwZ/1bRWXCG1twmshXXqEfxgGO1wsea0JAXyUkIDdyeAFjXmebq EtXM8mv3oAIJrqzGqkYzUHk= X-Google-Smtp-Source: AGHT+IFzM/VpQwGpZRdDJ9JjeeUKytch91tSutr5mhy2Kq6TdliWg2XZscqYDwPjgjCpIjGpMKHlnw== X-Received: by 2002:a05:600c:3b16:b0:3fa:9767:bb0 with SMTP id m22-20020a05600c3b1600b003fa97670bb0mr10347007wms.0.1692808815388; Wed, 23 Aug 2023 09:40:15 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id z22-20020a05600c221600b003fe1c332810sm61818wml.33.2023.08.23.09.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 09:40:14 -0700 (PDT) From: Simon Tournier To: Maxim Cournoyer Subject: Re: [bug#64746] [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. In-Reply-To: <87y1i2a2p4.fsf_-_@gmail.com> References: <340786ccd3d40c0c8906028dc20af5ae9b0aa6b9.1692128648.git.maxim.cournoyer@gmail.com> <87o7j7f2tb.fsf@gmail.com> <87bkf6j02r.fsf@gmail.com> <87a5up4tie.fsf@gmail.com> <87jzttfsb8.fsf@gmail.com> <87y1i2a2p4.fsf_-_@gmail.com> Date: Wed, 23 Aug 2023 10:27:51 +0200 Message-ID: <86o7iy40zc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.1 (+) 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: Hi Maxim, On Tue, 22 Aug 2023 at 22:54, Maxim Cournoyer wrote: > 1. (guix scripts time-machine) > 2. (guix pull) > 3. (guix git) Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:32c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 64746 Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@debbugs.gnu.org, Christopher Baines 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.1 (/) Hi Maxim, On Tue, 22 Aug 2023 at 22:54, Maxim Cournoyer wrote: > 1. (guix scripts time-machine) > 2. (guix pull) > 3. (guix git) [...] > I hope this clarifies it? All is clear since my initial comment [1] about this patch. ;-) And my proposal for improving the asymmetry your patch introduced is summarized by the alternative options I wrote in [2]. Therefore, I will continue the discussion in #65352. :-) 1: https://issues.guix.gnu.org/64746#13 2: https://issues.guix.gnu.org/65352#4 Cheers, simon From unknown Sun Jun 22 04:10:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 21 Sep 2023 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator