From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qP1dAQN73WRszwAASxT56A (envelope-from ) for ; Thu, 17 Aug 2023 03:42:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YK2WAQN73WRdAQEA9RJhRA (envelope-from ) for ; Thu, 17 Aug 2023 03:42:27 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 85F8155D64 for ; Thu, 17 Aug 2023 03:42:26 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=gNkeLU5U; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692236546; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KPhTKJ+pwLG4GBpqS265QNKIJwbX3NYBlghnjlljPNw=; b=SaH8hf8U2OrWUTAVdvYwy45Iz7EgTEyCbqPyYGM4skyhnvwSqxD3M5aT2G1jPRiKfAs7tl xXq0lBwg4OIbsHcq44osYkGCJ+HDMMWqSZb95cC4jOapEYaIhlrCvnEQ0J/DGLqFSn20H4 p8wqGXbiEAd7tqQ76xuEFmj+Upc2wEy/oOLhU0CSVAeuiRf/mSHivaTqV6GKOGCiHkDLwz S3Z0gwp6+x7ZeKYLoBq0hACuq0sft7ZA13+2sBLXo9XF7+cuQAY49oH839xCEdTrRDq5rh X5Av9Sl2Vp4CsvN+YDj1F6N5m5uGfDwc88xUQ2itu1SVzRRZAYK8RrIfAbyzNA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=gNkeLU5U; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692236546; a=rsa-sha256; cv=none; b=eLMnM7g329Jcow5DBdrMcqd8MV8o16CAGesBehLQg9g5KBMUmFSwmMLBhpZjI2w9ACBeVp iL8E4XEP37fz+ImlxAO7nwyJHB5OLCvBfs7lSAVb8wLnut7a/SkHNn1eS+Fd1a0sDxz1X0 C08KJMzPooAh0TXn4+Cvr9m9E3+m6mADupxlD1/yzVbMatxmFS6mjilOeD9C0iBXss5x72 LPaAPElP3KtfLh/NvEffvAYcbM+WQRIjoC5wawzye1k0SZfJOmkhb3pl6b/jYL2A1eRCjm ySSMTII27CK2C24X1eEXjenAGzcivOz8glYNVsDD/N4IgBMPFjD7iUBgsjeylA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWS1U-0007ez-5V; Wed, 16 Aug 2023 21:42:04 -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 1qWS1T-0007ea-3k for guix-patches@gnu.org; Wed, 16 Aug 2023 21:42:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWS1S-0002Qj-RU for guix-patches@gnu.org; Wed, 16 Aug 2023 21:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWS1S-0001Vz-FM for guix-patches@gnu.org; Wed, 16 Aug 2023 21:42:02 -0400 Subject: bug#64746: [PATCH v2 3/3] scripts: time-machine: Error when attempting to visit too old commits. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Thu, 17 Aug 2023 01:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 64746 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon Tournier Cc: 64746-done@debbugs.gnu.org, Josselin Poiret , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines Mail-Followup-To: 64746@debbugs.gnu.org, maxim.cournoyer@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 64746-done@debbugs.gnu.org id=D64746.16922365025795 (code D ref 64746); Thu, 17 Aug 2023 01:42:02 +0000 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 85F8155D64 X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: 4.31 X-Migadu-Spam-Score: 4.31 X-TUID: ysWHdQ4JHafh 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