From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sFVDL8QwCmKPewEAgWs5BA (envelope-from ) for ; Mon, 14 Feb 2022 11:36:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6HzJK8QwCmJwQAEAauVa8A (envelope-from ) for ; Mon, 14 Feb 2022 11:36:52 +0100 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 4ED323B67E for ; Mon, 14 Feb 2022 11:36:52 +0100 (CET) Received: from localhost ([::1]:59908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJYix-0002T5-Fh for larch@yhetil.org; Mon, 14 Feb 2022 05:36:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJYhG-0000ST-Bn for guix-patches@gnu.org; Mon, 14 Feb 2022 05:35:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46027) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJYhC-0008Kb-Hv for guix-patches@gnu.org; Mon, 14 Feb 2022 05:35:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJYhC-0001zr-DL for guix-patches@gnu.org; Mon, 14 Feb 2022 05:35:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53608] [PATCH 0/2] Rejecting commits unrelated to the introductory commit Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Feb 2022 10:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53608 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch security To: Maxime Devos Cc: Attila Lendvai , 53608@debbugs.gnu.org Received: via spool by 53608-submit@debbugs.gnu.org id=B53608.16448348497582 (code B ref 53608); Mon, 14 Feb 2022 10:35:02 +0000 Received: (at 53608) by debbugs.gnu.org; 14 Feb 2022 10:34:09 +0000 Received: from localhost ([127.0.0.1]:39921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJYgL-0001yC-6M for submit@debbugs.gnu.org; Mon, 14 Feb 2022 05:34:09 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:34874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJYgI-0001xh-Qv for 53608@debbugs.gnu.org; Mon, 14 Feb 2022 05:34:07 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 49C32B12; Mon, 14 Feb 2022 11:34:01 +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 bGr4uSXyWvWd; Mon, 14 Feb 2022 11:34:00 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 202A528B; Mon, 14 Feb 2022 11:34:00 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220128173142.7072-1-ludo@gnu.org> <87leyl7yj0.fsf@gnu.org> <2ff5b7962c1258f94554f23128385c593a3ee9de.camel@telenet.be> Date: Mon, 14 Feb 2022 11:33:59 +0100 In-Reply-To: <2ff5b7962c1258f94554f23128385c593a3ee9de.camel@telenet.be> (Maxime Devos's message of "Thu, 10 Feb 2022 23:29:25 +0100") Message-ID: <87tud1ybxk.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: 49C32B12 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-patch]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644835012; 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:resent-cc: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; bh=b6ciNTQhdRJ5vqnbqvBnhlc66Hjk9mM7xKnesX/mgBY=; b=A9PiVGXi7U82h+00nNvAbpYoHcNNspw3yk2rdX4/JZby6cGdtVpK/BaJgx5fYNGPYXpd/n pL75zoED2JtfvBqXmUcIAd4WREe97qX5EP+R1pAq8Kk/1pqxaHcrGT0LY7J7oaSyURqaVQ 2dAm/FgiNsmUp1nzzuRo2iE0G4/BDl5kOupBDDrmPXw/lkBoD4BHIFkdpjrQY64eSriYYZ vq+GP6p/b6g/wtybfBEqH6gpYntsp552gRRF3UvoEIHHvjojCI3gBXDa+VUe4NBwbBDk+g 2HZJGhWzj6i3Qtd1oveLxnXQ76aimY5Ho+qKjdNjcyk9JFKSRUX+rGY2aR1GgQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644835012; a=rsa-sha256; cv=none; b=P9sJzVcccwgjx+7K9hpiGdydz06BxIjlJNZZOmY3tH7zQJl2gsKkAUnfL7M7ZZYYaWiZTB RdXob1jFLxpFwWoqOf2aOibD3Tbq5ThYAXGn7tbjLX99gzvw9yhT6gbc2dj1knQg2E34IZ oaGvswG8DT6z8ibDweLlcFnNpwO8wEpfgHzyP+30sWoKRqcECCny8M5pDeEpuzyLswr7Gf ALHgClSUPlvJbmoU0TxVQXou2iz1I71rsWXQpILFxSMjF59aF+mrXTyOfv60ASGHm3isMV 6f+4uE00dyM2mh0E9TsbNj+qOWeeHde+9RSmw0iEzb6QNGnaBXcQ0sbbRtEkRA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -3.63 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: 4ED323B67E X-Spam-Score: -3.63 X-Migadu-Scanner: scn1.migadu.com X-TUID: fXfMztQTsFIt --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Maxime Devos skribis: > Ludovic Court=C3=A8s schreef op wo 09-02-2022 om 00:02 [+0100]: >> Howdy Maxime & Attila, >>=20 >> Did you have a chance to look into this series? >>=20 >> =C2=A0=C2=A0https://issues.guix.gnu.org/53608 >>=20 >> It=E2=80=99s relatively simple but I=E2=80=99d rather have other eyeball= s looking at it. >>=20 >> TIA. :-) > > The concept seems reasonable to me but I cannot tell if the > implementation is good or bad. OK. I went ahead and pushed these two commits: ca87601dd9 git-authenticate: Ensure the target is a descendant of the int= roductory commit. 87d49346f3 git: Add 'commit-descendant?'. The actual change is this extra condition: --=-=-= Content-Type: text/x-patch Content-Disposition: inline @@ -426,6 +428,17 @@ (define commits (verify-introductory-commit repository keyring start-commit signer)) + ;; Make sure END-COMMIT is a descendant of START-COMMIT or of one of + ;; AUTHENTICATED-COMMITS, which are known to be descendants of + ;; START-COMMIT. + (unless (commit-descendant? end-commit + (cons start-commit + authenticated-commits)) + (raise (formatted-message + (G_ "commit ~a is not a descendant of introductory commit ~a") + (oid->string (commit-id end-commit)) + (oid->string (commit-id start-commit))))) + (let ((stats (call-with-progress-reporter reporter (lambda (report) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I encourage everyone to take a look. Thanks, Ludo=E2=80=99. --=-=-=--