From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 15 12:44:57 2021 Received: (at submit) by debbugs.gnu.org; 15 Jan 2021 17:44:57 +0000 Received: from localhost ([127.0.0.1]:41644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0T9c-0007wa-3c for submit@debbugs.gnu.org; Fri, 15 Jan 2021 12:44:57 -0500 Received: from lists.gnu.org ([209.51.188.17]:43856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0T9Z-0007wS-Ew for submit@debbugs.gnu.org; Fri, 15 Jan 2021 12:44:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0T9Z-0005U0-4c for bug-guix@gnu.org; Fri, 15 Jan 2021 12:44:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34683) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0T9Y-00022L-QR for bug-guix@gnu.org; Fri, 15 Jan 2021 12:44:52 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43202 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0T9X-0004ZJ-RQ for bug-guix@gnu.org; Fri, 15 Jan 2021 12:44:52 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Subject: Channel authentication should start at the current commit(s) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 =?utf-8?Q?Niv=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 15 Jan 2021 18:44:49 +0100 Message-ID: <87czy6xffy.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Currently, the first =E2=80=98guix pull=E2=80=99 (when ~/.cache/guix is emp= ty) authenticates starting from the introductory commit. For the =E2=80=98guix= =E2=80=99 channel, that=E2=80=99s 11K commits today, which takes about a minute to pr= ocess on modern hardware. Authentication should instead consider the current commits, as returned by =E2=80=98guix describe=E2=80=99, authenticated, and start from there. For example, if you install Guix 1.3, authentication should start at the =E2=80=98v1.3=E2=80=99 commit. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 15 12:50:32 2021 Received: (at control) by debbugs.gnu.org; 15 Jan 2021 17:50:32 +0000 Received: from localhost ([127.0.0.1]:41656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0TF2-00085Z-Ey for submit@debbugs.gnu.org; Fri, 15 Jan 2021 12:50:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0TEz-00085L-Fq for control@debbugs.gnu.org; Fri, 15 Jan 2021 12:50:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34728) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0TEu-0004Bx-7q for control@debbugs.gnu.org; Fri, 15 Jan 2021 12:50:24 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43270 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0TEs-0004w5-Fv for control@debbugs.gnu.org; Fri, 15 Jan 2021 12:50:23 -0500 Date: Fri, 15 Jan 2021 18:50:21 +0100 Message-Id: <877doexf6q.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #45895 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) severity 45895 important quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 16 06:12:17 2021 Received: (at control) by debbugs.gnu.org; 16 Jan 2021 11:12:17 +0000 Received: from localhost ([127.0.0.1]:42481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0jVA-0005rT-UG for submit@debbugs.gnu.org; Sat, 16 Jan 2021 06:12:17 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:50414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0jV8-0005rF-Md for control@debbugs.gnu.org; Sat, 16 Jan 2021 06:12:15 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 47E265FA for ; Sat, 16 Jan 2021 12:12:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wU5yU5JE8YBn for ; Sat, 16 Jan 2021 12:12:08 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A475775 for ; Sat, 16 Jan 2021 12:12:08 +0100 (CET) Date: Sat, 16 Jan 2021 12:12:08 +0100 Message-Id: <87h7nhyw3b.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #45895 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr X-Rspamd-Server: hera X-Rspamd-Queue-Id: 47E265FA X-Spamd-Result: default: False [-0.63 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[control@debbugs.gnu.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; BAYES_HAM(-0.63)[82.35%] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: control 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 (/) block 45895 by 45896 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 02 03:46:54 2021 Received: (at 45895) by debbugs.gnu.org; 2 Feb 2021 08:46:54 +0000 Received: from localhost ([127.0.0.1]:34003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6rKm-0007iv-UV for submit@debbugs.gnu.org; Tue, 02 Feb 2021 03:46:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6rKh-0007ie-UR for 45895@debbugs.gnu.org; Tue, 02 Feb 2021 03:46:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42065) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6rKc-0007fk-NH for 45895@debbugs.gnu.org; Tue, 02 Feb 2021 03:46:42 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54006 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l6rKb-0000kN-GG for 45895@debbugs.gnu.org; Tue, 02 Feb 2021 03:46:42 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 45895@debbugs.gnu.org Subject: Re: bug#45895: Channel authentication should start at the current commit(s) References: <87czy6xffy.fsf@inria.fr> Date: Tue, 02 Feb 2021 09:46:39 +0100 In-Reply-To: <87czy6xffy.fsf@inria.fr> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?= =?utf-8?Q?'s?= message of "Fri, 15 Jan 2021 18:44:49 +0100") Message-ID: <87wnvqg8ls.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 45895 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Ludovic Court=C3=A8s skribis: > Currently, the first =E2=80=98guix pull=E2=80=99 (when ~/.cache/guix is e= mpty) > authenticates starting from the introductory commit. For the =E2=80=98gu= ix=E2=80=99 > channel, that=E2=80=99s 11K commits today, which takes about a minute to = process > on modern hardware. > > Authentication should instead consider the current commits, as returned > by =E2=80=98guix describe=E2=80=99, authenticated, and start from there. The attached patch does that. Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-channels-Consider-the-current-channel-commit-as-auth.patch Content-Transfer-Encoding: quoted-printable Content-Description: the patch >From 9bbce577036f2018d605d111042b0a7fc1be266b Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Ludovic=3D20Court=3DC3=3DA8s?=3D Date: Tue, 2 Feb 2021 09:37:33 +0100 Subject: [PATCH] channels: Consider the current channel commit as authentic. Fixes . When the ~/.cache/guix/authentication is empty, this change allows authentication to start at the current commit, as shown by 'guix describe', instead of starting from the introductory commit, which would take more and more time (there's currently 18K commits per year). * guix/git-authenticate.scm (authenticate-repository): Add #:authentic-comm= its. [authenticated-commits]: Append it. * guix/channels.scm (authenticate-channel)[authentic-commits]: New variable. Pass it to 'authenticate-repository'. --- guix/channels.scm | 14 ++++++++++++++ guix/git-authenticate.scm | 9 ++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/guix/channels.scm b/guix/channels.scm index 3cc3b4c438..05226e766b 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -47,6 +47,7 @@ #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) + #:autoload (guix describe) (current-channels) ;XXX: circular dep #:autoload (guix self) (whole-package make-config.scm) #:autoload (guix inferior) (gexp->derivation-in-inferior) ;FIXME: circ= ular dep #:autoload (guix quirks) (%quirks %patches applicable-patch? apply-pat= ch) @@ -344,6 +345,18 @@ commits)...~%") =20 (progress-reporter/bar (length commits))) =20 + (define authentic-commits + ;; Consider the currently-used commit of CHANNEL as authentic so + ;; authentication can skip it and all its closure. + (match (find (lambda (candidate) + (eq? (channel-name candidate) (channel-name channel))) + (current-channels)) + (#f '()) + (channel + (if (channel-commit channel) + (list (channel-commit channel)) + '())))) + ;; XXX: Too bad we need to re-open CHECKOUT. (with-repository checkout repository (authenticate-repository repository @@ -354,6 +367,7 @@ commits)...~%") #:keyring-reference (string-append keyring-reference-prefix keyring-reference) + #:authentic-commits authentic-commits #:make-reporter make-reporter #:cache-key cache-key))) =20 diff --git a/guix/git-authenticate.scm b/guix/git-authenticate.scm index 4ab5419bd6..ab3fcd8b2f 100644 --- a/guix/git-authenticate.scm +++ b/guix/git-authenticate.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2019, 2020 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2019, 2020, 2021 Ludovic Court=C3=A8s ;;; ;;; This file is part of GNU Guix. ;;; @@ -376,12 +376,14 @@ instead of '~a'") (cache-key (repository-cache-key reposit= ory)) (end (reference-target (repository-head repository))) + (authentic-commits '()) (historical-authorizations '()) (make-reporter (const progress-reporter/silent))) "Authenticate REPOSITORY up to commit END, an OID. Authentication starts with commit START, an OID, which must be signed by SIGNER; an exception is -raised if that is not the case. Return an alist mapping OpenPGP public ke= ys +raised if that is not the case. Commits listed in AUTHENTIC-COMMITS and t= heir +closure are considered authentic. Return an alist mapping OpenPGP public = keys to the number of commits signed by that key that have been traversed. =20 The OpenPGP keyring is loaded from KEYRING-REFERENCE in REPOSITORY, where @@ -404,7 +406,8 @@ denoting the authorized keys for commits whose parent l= ack the (filter-map (lambda (id) (false-if-git-not-found (commit-lookup repository (string->oid id)))) - (previously-authenticated-commits cache-key))) + (append (previously-authenticated-commits cache-key) + authentic-commits))) =20 (define commits ;; Commits to authenticate, excluding the closure of --=20 2.30.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 07:47:14 2021 Received: (at 45895-done) by debbugs.gnu.org; 4 Feb 2021 12:47:15 +0000 Received: from localhost ([127.0.0.1]:40165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7e2U-0004m4-NL for submit@debbugs.gnu.org; Thu, 04 Feb 2021 07:47:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7e2T-0004ls-Iw for 45895-done@debbugs.gnu.org; Thu, 04 Feb 2021 07:47:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36423) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7e2O-0000nc-Bd for 45895-done@debbugs.gnu.org; Thu, 04 Feb 2021 07:47:08 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54936 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l7e2L-0002SN-Mf for 45895-done@debbugs.gnu.org; Thu, 04 Feb 2021 07:47:08 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 45895-done@debbugs.gnu.org Subject: Re: bug#45895: Channel authentication should start at the current commit(s) References: <87czy6xffy.fsf@inria.fr> <87wnvqg8ls.fsf@gnu.org> Date: Thu, 04 Feb 2021 13:47:04 +0100 In-Reply-To: <87wnvqg8ls.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 02 Feb 2021 09:46:39 +0100") Message-ID: <87zh0k6lvb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 45895-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Ludovic Court=C3=A8s skribis: >>>From 9bbce577036f2018d605d111042b0a7fc1be266b Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Ludovic=3D20Court=3DC3=3DA8s?=3D > Date: Tue, 2 Feb 2021 09:37:33 +0100 > Subject: [PATCH] channels: Consider the current channel commit as authent= ic. > > Fixes . > > When the ~/.cache/guix/authentication is empty, this change allows > authentication to start at the current commit, as shown by 'guix > describe', instead of starting from the introductory commit, which would > take more and more time (there's currently 18K commits per year). > > * guix/git-authenticate.scm (authenticate-repository): Add #:authentic-co= mmits. > [authenticated-commits]: Append it. > * guix/channels.scm (authenticate-channel)[authentic-commits]: New > variable. Pass it to 'authenticate-repository'. Pushed as 29009fdb2d3636eafa77b406da2430b08a22d47e. Ludo=E2=80=99. From unknown Sun Jun 22 08:09:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 05 Mar 2021 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator