From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 ABvyC++O1WEcoAAAgWs5BA (envelope-from ) for ; Wed, 05 Jan 2022 13:28:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QMOdBO+O1WELbAEAG6o9tA (envelope-from ) for ; Wed, 05 Jan 2022 13:28:31 +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 B575D332E9 for ; Wed, 5 Jan 2022 13:28:30 +0100 (CET) Received: from localhost ([::1]:38002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n55P2-0001Ge-HS for larch@yhetil.org; Wed, 05 Jan 2022 07:28:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n55Oc-00011e-HW for guix-patches@gnu.org; Wed, 05 Jan 2022 07:28:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n55Oc-0000JT-6q for guix-patches@gnu.org; Wed, 05 Jan 2022 07:28:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n55Ob-00085g-Tb for guix-patches@gnu.org; Wed, 05 Jan 2022 07:28:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Jan 2022 12:28: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: zimoun Cc: Sarah Morgensen , 50072@debbugs.gnu.org Received: via spool by 50072-submit@debbugs.gnu.org id=B50072.164138565531069 (code B ref 50072); Wed, 05 Jan 2022 12:28:01 +0000 Received: (at 50072) by debbugs.gnu.org; 5 Jan 2022 12:27:35 +0000 Received: from localhost ([127.0.0.1]:39714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n55OB-000853-AR for submit@debbugs.gnu.org; Wed, 05 Jan 2022 07:27:35 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:34470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n55O8-00084r-Jr for 50072@debbugs.gnu.org; Wed, 05 Jan 2022 07:27:33 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id f0TW2600M4UW6Th010TXNM; Wed, 05 Jan 2022 13:27:31 +0100 Message-ID: From: Maxime Devos Date: Wed, 05 Jan 2022 12:27:25 +0000 In-Reply-To: <86y23u768v.fsf@gmail.com> References: <20220104200643.43374-1-maximedevos@telenet.be> <20220104200643.43374-2-maximedevos@telenet.be> <867dbfcf9n.fsf_-_@gmail.com> <52e7be94d926aa06c2a0132090e8c212381e7900.camel@telenet.be> <86y23u768v.fsf@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-K30N4pq8YNi45YTOrLiR" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1641385651; bh=IL+dV7fTBJSo9SVSHpED/ofTYGbkWBSjvziFwDZCZ4I=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Wc7RP2qEFY5PxDCrveNLPiyuZQ+PCIsSSf9uIJvRmSgbrT1uAwY/ObPSBOQxIIpzC P3vHDo8AdctQOFsVCAGBNGHtuHWxOa6aYED7S3co/JdMZdLR7Avm0+9ZAajC/l8zKJ a2hXmoMqmAviuXfLg74sOlJOyhTA7ik0q79lWllE/YknwS002ApslgZhsd76nmpdBf UyTIVqt7bRbjSo80Me39wmQT1p5PF7LHV7k5gyCMRNNkRGfi/411nKzYE2z4ERDv9M jhftyuDNUyNM11WD/7H7nwwFm8bZyBx+QqRM9OKKR/Ix0QODWf0woC62OH2+DbHRZE oD4oMP3Hi1Pyw== 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=1641385710; 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: dkim-signature; bh=IL+dV7fTBJSo9SVSHpED/ofTYGbkWBSjvziFwDZCZ4I=; b=sOHZr43WGzHSS/WoWFmOH1qMMhnpENK32sAv2uTKOgfYwdCi16HwFRbPDQS+o4nteKL+RY Bgx7xg+dLgSmLtu959w4cbuLnaQkTn6KZq34zl4XDRU93+fyMri7s+cIGHJCyOR4X8HlH0 iCRLazYkZgFvh91veZfJnXITtGJV6taBsvG/MQZy3cIhccSG+PTQG9o5rdq5KfcrpwXF0X u3Dli+SvRexYTdDSbj6wStYAUfXB0P44WBuONRObHsfvwNMQACR73ZHfRqPujaAk7k/yie bXDAG1hFAyyBD9tuuKdV4ynvITUo6l343Z0Yai984UnH2MSzDznyV7z0X9ClwQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641385710; a=rsa-sha256; cv=none; b=tQJ9AZ5J4EOLZqiy/uFmhDs4OEtwOTbJRfSb5zlJNVkwmONFf89JgfBxKzAcjVyYQS3H9G hCdSCEkL2S3IBXhzyxqvWpaU/Uxm9TNWotSeqoqpMi0Xs2wSQjK0WSYXGbs/vmOpZdUFlN orEHecZxaCi2MrFm9yUxKpcfPcsnVift00rHYs9GUX3BwWCJViM4jFWAf7pps7w97/Jsgf pBFXm/YFqLLzzuNBukbk2t+n+Tn+bkhbPoFMM4eWkPPEP2rlsJ4dOY1oZoAiRthf3nSRP2 P3ZVdNXrJClioJTJeHZCSlIV+DSkY7pX+M09lNuHBeZlRdEwXxh3OJ8h2f9iCg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=Wc7RP2qE; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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: -5.60 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=Wc7RP2qE; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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: B575D332E9 X-Spam-Score: -5.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: VTx7TOkEysKB --=-K30N4pq8YNi45YTOrLiR Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable zimoun schreef op wo 05-01-2022 om 12:48 [+0100]: > Well, I think =E2=80=99#:recursive?=E2=80=99 is confusing, and =E2=80=99a= uto=E2=80=99 too because it is > not POLA for a plumbing function, IMHO.=C2=A0 [...] Principle of least authority, or principle of least astonishment? I presume the latter. > Anyway. It is v4 and it is ready to merge. :-) I vote for a purple bikeshed! But your orange bikeshed would also keep the bikes out of the rain. > I just propose to replace =E2=80=99#:recursive?=E2=80=99 by =E2=80=99#:na= r-serializer?=E2=80=99 and a > docstring along these lines, >=20 > --8<---------------cut here---------------start------------->8--- > =C2=A0 "Compute the hash of FILE with ALGORITHM.=C2=A0 If NAR-SERIALIZER?= is > =C2=A0 #true, compute the combined hash (NAR hash) of FILE for which (SEL= ECT? > =C2=A0 FILE STAT) returns true. >=20 > =C2=A0 If NAR-SERIALIZER? is #false, compute the regular hash using the > =C2=A0 default serializer.=C2=A0 It is meant to be used for a regular fil= e. >=20 > =C2=A0 If NAR-SERIALIZER? is 'auto', when FILE is a directory, compute th= e > =C2=A0 combined hash (NAR hash).=C2=A0 When FILE is a regular file, compu= te the > =C2=A0 regular hash using the default serializer.=C2=A0 The option =E2=80= =99auto=E2=80=99 is meant > =C2=A0 to apply by default the expected hash computation. >=20 > =C2=A0 Symbolic links are not dereferenced unless NAR-SERIALIZER? is fals= e. >=20 > =C2=A0 This procedure must only be used under controlled circumstances; t= he > =C2=A0 detection of symbolic links in FILE is racy. > --8<---------------cut here---------------end--------------->8--- >=20 > WDYT? The nar hash / regular hash difference seems a very low-level detail to me, that most (all?) users don't need to be bothered about. Except maybe if FILE denotes an executable regular file, but file-hash* is currently only used on tarballs/zip files/git checkouts, which aren't executable files unless weirdness or some kind of attack is happening. I think that, the =E2=80=98least astonishing=E2=80=99 thing to do here, is = computing the hash that would go into the 'hash' / 'sha256' field of 'origin' objects by default, and not the nar hash for regular files that's almost never used. Greetings, Maxime. --=-K30N4pq8YNi45YTOrLiR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYdWOrRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jgpAP9+O6ncyElAGv5aH/Ms7kJaCrgJ hliVO7GJcnNP6aHGWwD+LmM5YbS1h9BcGt6hCRB5MNTZnJH6pa7Fitz6pzZuYwY= =PyXl -----END PGP SIGNATURE----- --=-K30N4pq8YNi45YTOrLiR--