From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kFqkIB4C02HobAAAgWs5BA (envelope-from ) for ; Mon, 03 Jan 2022 15:03:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KOMsHR4C02EfmwAAauVa8A (envelope-from ) for ; Mon, 03 Jan 2022 15:03:10 +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 2E0CE2BB59 for ; Mon, 3 Jan 2022 15:03:10 +0100 (CET) Received: from localhost ([::1]:41368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4NvZ-0006Wz-87 for larch@yhetil.org; Mon, 03 Jan 2022 09:03:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4NvS-0006VB-5w for guix-patches@gnu.org; Mon, 03 Jan 2022 09:03:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n4NvR-0001HR-Rw for guix-patches@gnu.org; Mon, 03 Jan 2022 09:03:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n4NvR-0004I7-Lh for guix-patches@gnu.org; Mon, 03 Jan 2022 09:03:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#50072] [PATCH v2 4/4] upstream: Support updating 'git-fetch' origins. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Jan 2022 14:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50072 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: Sarah Morgensen , 50072@debbugs.gnu.org Received: via spool by 50072-submit@debbugs.gnu.org id=B50072.164121856216464 (code B ref 50072); Mon, 03 Jan 2022 14:03:01 +0000 Received: (at 50072) by debbugs.gnu.org; 3 Jan 2022 14:02:42 +0000 Received: from localhost ([127.0.0.1]:34447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4Nv8-0004HU-G8 for submit@debbugs.gnu.org; Mon, 03 Jan 2022 09:02:42 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:58454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4Nv6-0004HD-5J for 50072@debbugs.gnu.org; Mon, 03 Jan 2022 09:02:40 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E9F82363; Mon, 3 Jan 2022 15:02:33 +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 HAxj7ubfAadx; Mon, 3 Jan 2022 15:02:33 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id E7B54120; Mon, 3 Jan 2022 15:02:32 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220101203940.149517-1-maximedevos@telenet.be> <20220101203940.149517-5-maximedevos@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 =?UTF-8?Q?Niv=C3=B4se?= an 230 de la =?UTF-8?Q?R=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: Mon, 03 Jan 2022 15:02:32 +0100 In-Reply-To: <20220101203940.149517-5-maximedevos@telenet.be> (Maxime Devos's message of "Sat, 1 Jan 2022 20:39:40 +0000") Message-ID: <87h7aklxxj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: E9F82363 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)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; 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=1641218590; 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-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=UTe2UyxYSmr0T2IYNPhrHguRcFoPOnQHCRa7kTMclzI=; b=VDy+52D9eU/LaXHQdQsLwDAlVd70cnCwX7a76j4N8ORUhjqn84QKk4KRdYMnS6BDQs1CWF VFPJJl/vDGYI1FdYqNBJtCbiPfzPgsgfIh3VaeYQgjqrrAsgSkmCEsC73Srm9cJIGWJeCi pCbbhc2bprPWMrcpkfXddF4meFh6mNOLNTdD/aebmJ673M1PY4J3EVkJywaz7Vxom8YDVx 2X2D5SWylbsM3TigyemECQBfTyMo8NvmufOqMjsy3lRQAM4DKHRFz9NpPEMVlzMYp4O5fB NobmIGFSd5U4HM71PoCuNxZDL+tT6/gV0ByylCD7pqN4eONaoxOuoUPya/yE7g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641218590; a=rsa-sha256; cv=none; b=pepM1801az2G9aRAa/+JEtQqSM5pIC6m97yilVknPFlYPa1o4hBcskN/NKUgklmFBNVp6W u5DzNQFUVFfCaxspekeSvfsZQzSG+Ipqx1gj4a+xSwSG/m4jqTdB5Ftg12gzVfKi83431V +liE31fZJbbKZTA8pUpuA0BwjG723FkEIYT1wY21FxIxtjBS/vV8/FjgNIxFYHsL/hJPwR 3rRi6/SfVaG7A6Zk50IE+B6qLxuxATo9EaaEk1VDlwvZESNgm2w/2PhfE2auXzjEWugr3W Wh24udgKMP2yKZXhrSj/aKiiV2BACipvhxuYj+oJGSYopgGGuk3DgCWOOTiDCg== 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.59 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: 2E0CE2BB59 X-Spam-Score: -3.59 X-Migadu-Scanner: scn1.migadu.com X-TUID: ZScTQOflQrC/ Maxime Devos skribis: > From: Sarah Morgensen > > Updaters need to be modified to return 'git-reference' objects. > This patch modifies the 'generic-git' and 'minetest' updater, > but others might need to be modified as well. > > * guix/upstream.scm (package-update/git-fetch): New procedure. > ()[urls]: Document it can be a 'git-reference'. > (%method-updates): Add 'git-fetch' mapping. > (update-package-source): Support 'git-reference' sources. > (upstream-source-compiler): Bail out gracefully if the source is a git > origin. > * guix/import/git.scm > (latest-git-tag-version): Always return two values and document that th= e tag > is returned as well. > (latest-git-release)[urls]: Use the 'git-reference' instead of the > repository URL. > * guix/import/minetest.scm (latest-minetest-release)[urls]: Don't wrap the > 'git-reference' in a list. > * tests/minetest.scm (upstream-source->sexp): Adjust to new convention. > > Co-authored-by: Maxime Devos [...] > system target) > "Download SOURCE from its first URL and lower it as a fixed-output > derivation that would fetch it." > - (mlet* %store-monad ((url -> (first (upstream-source-urls source))) > - (signature > + (define url > + (match (upstream-source-urls source) > + ((first . _) first) > + (_ (raise (formatted-message > + (G_ "git origins are unsupported by --with-latest")))))) We should probably not refer to =E2=80=98--with-latest=E2=80=99 in =E2=80=98upstream-source-compiler=E2=80=99 to keep things separate. > +(define* (package-update/git-fetch store package source #:key key-downlo= ad) > + "Return the version, checkout, and SOURCE, to update PACKAGE to > +SOURCE, an ." > + ;; TODO: it would be nice to authenticate commits, e.g. with > + ;; "guix git authenticate" or a list of permitted signing keys. > + (define ref (upstream-source-urls source)) ; a > + (values (upstream-source-version source) > + (latest-repository-commit It=E2=80=99s a bummer that no longer models things correc= tly: =E2=80=98urls=E2=80=99 can be either a list of URLs or a , a= s can be seen in the two examples above, and =E2=80=98signature-urls=E2=80=99 is meaningl= ess for Git origins. We can probably leave it for a future patch series, but I think we should do something about it. In particular, as the comment notes, IWBN to make provisions to allow for tag signature verification, which is probably the most widespread practice. Thanks, Ludo=E2=80=99.