From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KAsOKHsjlF9VNAAA0tVLHw (envelope-from ) for ; Sat, 24 Oct 2020 12:52:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WFEZJHsjlF8AEgAAbx9fmQ (envelope-from ) for ; Sat, 24 Oct 2020 12:52:11 +0000 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 19D199403C6 for ; Sat, 24 Oct 2020 12:52:11 +0000 (UTC) Received: from localhost ([::1]:51204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWJ1m-00071n-1f for larch@yhetil.org; Sat, 24 Oct 2020 08:52:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWJ1e-00071S-Eu for bug-guix@gnu.org; Sat, 24 Oct 2020 08:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWJ1e-0002Nk-53 for bug-guix@gnu.org; Sat, 24 Oct 2020 08:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWJ1e-0006Jk-4N for bug-guix@gnu.org; Sat, 24 Oct 2020 08:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41764: `make authenticate` fails to find the keyring branch Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 24 Oct 2020 12:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41764 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 41764-submit@debbugs.gnu.org id=B41764.160354386224200 (code B ref 41764); Sat, 24 Oct 2020 12:52:02 +0000 Received: (at 41764) by debbugs.gnu.org; 24 Oct 2020 12:51:02 +0000 Received: from localhost ([127.0.0.1]:32925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWJ0f-0006I5-MC for submit@debbugs.gnu.org; Sat, 24 Oct 2020 08:51:02 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:37667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWJ0b-0006Hh-TH for 41764@debbugs.gnu.org; Sat, 24 Oct 2020 08:51:00 -0400 Received: by mail-wm1-f46.google.com with SMTP id c16so5563448wmd.2 for <41764@debbugs.gnu.org>; Sat, 24 Oct 2020 05:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=6jHkWfJs4l5mqsfhDlM2R8K1UjgWx2u1NJiXLFtIrr8=; b=YhWK2EhYeYavyGor4ZdgQ6kgwkMYue9ploRaYmr7p82xaFRw7+k/gRhkfU1dIBpZzG 8/oblF+hkZJXpCf4yG5+SyLSi8TcH/1TINICEIkz+3/dF+B7VpI7HeZnwbPq2hrJ5OBt MdMVdWVmB9tJiOjiHUWzTnOelhqV5gogRIJZ0UbYtBJZ/xFfulpNjjPb/ghVLo1umr7X w7O/5XYU+0Vk5JGkelbTdMBzcy6qGGOCagTgilDlRRijUvXYD6lElzR24HCdmVNmseXj 3G0iP7YLqelWFUkasmaeq62gSjrqvfOIsCtrsPY+ioathsSpB/uFYH5dFxAcAHZm23DK 2iYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=6jHkWfJs4l5mqsfhDlM2R8K1UjgWx2u1NJiXLFtIrr8=; b=oT5XscCGA179nNw1jecCiO5Yf2enFyhPgdDWhe8AeWp4OgbJ/wogKQkGGGVy46s+l4 Xv0Qfslf0aNFxZ91FO0caQx71ZX9aY77FZhTAEhjcl1JK0mQNgsBnaR9qKBw3vzEoROB YUulovsJQLyb5yH+8oAejzzE8p/T5/g7AgNomwz2RBTzqmh3YzJqQfu/G2NgiiHdgEoG rF0uwzpIrQ4GvN+isXLlwTOyzgS1wABJvTdSefTp/PQrzGa4qzqs9aN0zfZmg3FxyIgp ReBbY+iTQuWrPB98/RktWxvV5SNoHPnef2hJKJR/LFDwai4r959nPgGK3cT+2BPhxNOV hdDg== X-Gm-Message-State: AOAM532Av21n6dBntC0Xj544vZ2+XbDwfccgiTnzvgWIWX49NXaBg4Mx C+Zq04b3lb635KqgL3QkHhoW6Z5+DhjqDw== X-Google-Smtp-Source: ABdhPJy/gjSLDSbt+pbp3Pxf20dUnnlTGpzUhHuHBmW2c1WmJr40b5cY5OT9sBOYxYYGw8j3upypYA== X-Received: by 2002:a1c:740f:: with SMTP id p15mr6709994wmc.106.1603543851554; Sat, 24 Oct 2020 05:50:51 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id c129sm10239431wmd.7.2020.10.24.05.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 05:50:50 -0700 (PDT) From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas References: <20200608185404.GA2356@jasmine.lan> <87img0gqpr.fsf@gnu.org> Date: Sat, 24 Oct 2020 14:49:43 +0200 In-Reply-To: <87img0gqpr.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 09 Jun 2020 18:16:00 +0200") Message-ID: <87v9ezhjq0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.8 (/) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 41764@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=YhWK2EhY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -2.01 X-TUID: oxP2EFlFMtBa --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Ludovic Court=C3=A8s writes: > Hi, > > Leo Famulari skribis: > >> I just tried pushing for the first time since installing the new >> pre-push hook that runs `make authenticate`. >> >> This failed with the following error: >> >> Git error: cannot locate remote-tracking branch 'keyring' >> >> However, `git branch --all` includes "remotes/origin/keyring". >> >> After I did `git checkout origin/keyring`, it worked. > > Right, since commit 512b9e2da26968ebafdd47f701edd8fc3936d3e8, you have > to have a local =E2=80=98keyring=E2=80=99 branch. I've hit this too... >> Let's update the manual section Commit Access with the recommended way >> to make this branch accessible to `make authenticate`. Maybe it should >> even do it automatically? > > I don=E2=80=99t think it can do it automatically because it cannot guess = what > the remote is called (Tobias reported an issue earlier because > =E2=80=9Corigin/keyring=E2=80=9D was hard-coded and Tobias didn=E2=80=99t= have an =E2=80=9Corigin=E2=80=9D > remote.) I'd say this isn't really a solution: hard-coding the origin is bad but not the branch name? Someone who wants to have a local branch called keyring for whatever reason will have the exact same problem. From=20my POV, "origin/keyring" should be the *default*, as only people modifying its contents should have a local branch pointing to it, but the moment you name it hard- instead of normal-code you can clearly say there's a configuration need. :-) The attached patch exposes a variable for make called GUIX_GIT_KEYRING to provide the keyring reference to guix git authenticate, including an example in the manual, as everything else is already there. WDYT? Happy hacking! Miguel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-build-Add-GUIX_GIT_KEYRING-variable-for-make-authent.patch Content-Transfer-Encoding: quoted-printable Content-Description: 0001-build-Add-GUIX_GIT_KEYRING-variable-for-make-authent.patch From=20479ac6846cb228b67b778965f0f5299ea3172424 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D Date: Sat, 24 Oct 2020 14:35:09 +0200 Subject: [PATCH] build: Add GUIX_GIT_KEYRING variable for make authenticate. * Makefile.am (GUIX_GIT_KEYRING): New variable. (authenticate): Use GUIX_GIT_KEYRING to select the keyring branch reference. * doc/contributing.texi (Building from Git): Add an example about the use of GUIX_GIT_KEYRING. =2D-- Makefile.am | 2 ++ doc/contributing.texi | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/Makefile.am b/Makefile.am index c509562567..e6cef9ec1a 100644 =2D-- a/Makefile.am +++ b/Makefile.am @@ -666,9 +666,11 @@ channel_intro_commit =3D 9edb3f66fd807b096b48283debdcd= dccfea34bad channel_intro_signer =3D BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA =20 # Authenticate the current Git checkout by checking signatures on every co= mmit. +GUIX_GIT_KEYRING =3D origin/keyring authenticate: $(AM_V_at)echo "Authenticating Git checkout..." ; \ guix git authenticate \ + --keyring=3D$(GUIX_GIT_KEYRING) \ --cache-key=3Dchannels/guix --stats \ "$(channel_intro_commit)" "$(channel_intro_signer)" =20 diff --git a/doc/contributing.texi b/doc/contributing.texi index 26a4627464..9312faa849 100644 =2D-- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -140,6 +140,16 @@ make authenticate =20 The first run takes a couple of minutes, but subsequent runs are faster. =20 +Or, when your configuration for your local git repository doesn't match +the default one, you can provide the reference for the @code{keyring} +branch through the variable @code{GUIX_GIT_KEYRING}. The following +example assumes that you have a git remote called @samp{myremote} +pointing to the official repository: + +@example +make authenticate GUIX_GIT_KEYRING=3Dmyremote/keyring +@end example + @quotation Note You are advised to run @command{make authenticate} after every @command{git pull} invocation. This ensures you keep receiving valid =2D-=20 2.28.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEiIeExBRZrMuD5+hMY0xuiXn6vsIFAl+UIugACgkQY0xuiXn6 vsIDJAv+IEwSdiHrdzeswwo+9I4UZUJGTPt7LCuD4KiflLZrJkJKxhjqIQia1h9G oiqq4OBprKSQKz7h4NHLCFmMck6kRszZ8IBJUSvTsHPfeOxpZf3NytjOOLJZBXQV nEAewPi+QrTprwzbajxgJtQdiEKBDno2RdXwMaTHxgRkQCS/LPmCo50AYzago6qg frOWBp4x8QjcwVuJ5XajmfyJB/gplQq2g2wVvduWq26uUxo+vcHIlUtiSeqySycr ygj4pIlkXoiyouP0zcABXiu8Ktk1vHRIOf0DvSld46+McBZMEQx/ZVeVhRFV3+rq LgpgcOgufZdON8MEqu0dRYOn3WtMQnSEYtWUPVBBgCdUyTDOcGkSXZ99D32KO10j wbILpFVXB/iC/cbJCFwt8O255tCmAWKA0a7filwmi6QWefM+fzQOMVAA1+6ew7l4 /O4bS/xJGDeAjudXPKiPSMn2GByQnSVmZiXtc4BN/e3Txcja3Rr1oT7XxWpg2/j0 7oS8qIF1 =ktyF -----END PGP SIGNATURE----- --==-=-=--