From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id quH2E2ffVGHYCAAAgWs5BA (envelope-from ) for ; Wed, 29 Sep 2021 23:49:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id LC4TD2ffVGHYdwAA1q6Kng (envelope-from ) for ; Wed, 29 Sep 2021 21:49:27 +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 DA83013235 for ; Wed, 29 Sep 2021 23:49:26 +0200 (CEST) Received: from localhost ([::1]:34328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVhS9-0007LP-Rk for larch@yhetil.org; Wed, 29 Sep 2021 17:49:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVhQo-0005sp-Db for guix-patches@gnu.org; Wed, 29 Sep 2021 17:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVhQo-00089R-08 for guix-patches@gnu.org; Wed, 29 Sep 2021 17:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVhQn-0008DS-V3 for guix-patches@gnu.org; Wed, 29 Sep 2021 17:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50620] [PATCH 0/2] Unify 'computed-origin-method' (linux, icecat) Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Sep 2021 21:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50620 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: Mark H Weaver , 50620@debbugs.gnu.org, zimoun Received: via spool by 50620-submit@debbugs.gnu.org id=B50620.163295207031563 (code B ref 50620); Wed, 29 Sep 2021 21:48:01 +0000 Received: (at 50620) by debbugs.gnu.org; 29 Sep 2021 21:47:50 +0000 Received: from localhost ([127.0.0.1]:50517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVhQc-0008D0-0s for submit@debbugs.gnu.org; Wed, 29 Sep 2021 17:47:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVhQa-0008Cm-9B for 50620@debbugs.gnu.org; Wed, 29 Sep 2021 17:47:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47462) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVhQU-0007ti-SV; Wed, 29 Sep 2021 17:47:42 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36428 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVhQU-0006l0-FC; Wed, 29 Sep 2021 17:47:42 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210916114734.2686426-1-zimon.toutoune@gmail.com> <9b6ee27ff10e1042a5d61d0f93d957cf760e9ecb.camel@gmail.com> <87v930ay5y.fsf@netris.org> <87pmstghx0.fsf@netris.org> <87a6jv8qu7.fsf_-_@gnu.org> Date: Wed, 29 Sep 2021 23:47:40 +0200 In-Reply-To: (Liliana Marie Prikler's message of "Wed, 29 Sep 2021 17:34:27 +0200") Message-ID: <87pmsr5a0z.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-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632952167; 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=plWU5kK7pIZ4fIPG138v04sJ1C4uWRD7YJDW6emSkco=; b=gOncI3r9HJ2j0g/lM0c9zaZYvSamyM7cfOBHVYpfLu70Bu3HIYsKqBm7hcIC+nBb+YOctf 7IBO2lhFn1OgrxebcCKc3MzpvIfViCluuF4ZgPFXB98soz9Bd/FLpl44osgW8YCTCvM23A rQzmd/rz09LgDR3hqESLOldVkure5Ph9BtuSXDnlG0nYmXXVteiriEdIHYijpfmWrx6Yts 4Orggp5wX69O5RdIbRwtICQycIi9vAtsZ0EhymZJvdj0d44ij0jjoV2B8fV7DjBgyxIlRi whSbPOB3YRhCWaNkkyEo2S1AfGYVJdJ1Rqw/MWFxKrsBjyK7QF5pCmVd/6Vn1w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632952167; a=rsa-sha256; cv=none; b=pdMdaSBisYfMOioMj9D+EJrI5PNmFP4+CGk8q2ypiKrPKyXZrLBc5wvarZOfWTHNT0rEMw 8J77iSa5TbmkvSkIxB1OhHiyapO+zIHpzr7BYkYf64kCKmvt8kLwzxSbWY8WF41Pu04o3d ePIdDEHVVElQnNZLEPDzvLlpNXjDHbvOXaE1iQYcfku7bnsjGiBCjLopbIuyZa2XpR1JpT SGh+0Ze8OJn9JLY4XKLvIXTaqV5rEF/IhcD6dK6/ORy3hC8yBiILrTSc86EoAzZrgcJhTL lS2JRT2yI4YUqxfmj/FQTp94LofyA6EU3337Pwqwc625/e1MU0DE4Gsgn9hZFw== 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@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.40 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@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: DA83013235 X-Spam-Score: -1.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: WYxjL4T8CK2y Hi Liliana, Liliana Marie Prikler skribis: > Am Mittwoch, den 29.09.2021, 15:16 +0200 schrieb Ludovic Court=C3=A8s: >> Hi there! >>=20 >> I=E2=80=99d rather go with zimoun=E2=80=99s original patch, which is foc= used and does >> nothing more than what was originally intended, which is to factorize >> the procedure. I=E2=80=99ll go ahead and apply it shortly if there are = no >> objections. > I have trouble understanding this paragraph. What exactly is "this > patch" and what do you mean by "factorizing"? If it means moving > computed-origin-method elsewhere, then yes, for a short-time solution > only moving it is a wise choice in my opinion, OK, I agree too. > but zimoun and I still disagree on the target. zimoun says (guix > packages) for reasons unknown to me, whereas I say (gnu packages), > because it's closer to where it's used and doesn't imply that this is > going to be a part of the (guix) download schemes anytime soon. (gnu packages) is higher-level: it=E2=80=99s part of the distro and include= s CLI helpers such as =E2=80=98specification->package=E2=80=99. So I think (guix= =E2=80=A6) is somewhat more appropriate. (That said, what matters more to me is how we=E2=80=99re going to replace it with a proper solution.) [...] >> A better solution IMO would be to improve the =E2=80=98snippet=E2=80=99 = mechanism in >> the first place. =E2=80=98computed-origin-method=E2=80=99 improves on i= t in two >> ways: (1) lazy evaluation of the gexp, and (2) allows the use of a >> different base name. >>=20 >> I would think #2 is addressed by the =E2=80=98file-name=E2=80=99 field (= isn=E2=80=99t it?). >>=20 >> As for #1, it can be addressed by making the =E2=80=98snippet=E2=80=99 f= ield delayed >> or thunked. It=E2=80=99s a one line change; the only thing we need is to >> measure, or attempt to measure, the impact it has on module load >> time. >>=20 >> Thoughts? > This would work for packages, whose source are some base source with > patches or snippets applied, as is indeed the case for linux and > icecat. However, there are also other potential uses for computed > origins. It=E2=80=99s hard for me to talk about potential uses in the abstract. :-) There might be cases where an origin simply isn=E2=80=99t the right tool an= d one would prefer =E2=80=98computed-file=E2=80=99 or something else. It really = depends on the context. [...] > I think that some version of `computed-origin-method' will eventually > need to become public API as such packages may not always be best > described as "a base package with a snippet". If we had recursive > origins =E2=80=93 i.e. origins, that can take origins as inputs =E2=80=93= we might be > able to do some of that, but I don't think it would necessarily work > for linux-libre or icecat, as with those you don't want the tainted > versions to be kept around. Perhaps this could be worked around by not > interning the intermediate origins, but only using their file-names > inside the temporary directory in which the snippet is applied? =E2=80=9CRecursive origins=E2=80=9D are a bit of a stretch as a concept IMO= ; what you describe is a case where I=E2=80=99d probably use =E2=80=98computed-file=E2= =80=99 instead. > Another thing is that the final act of the linux-libre promise is not > the packing of the tarball, but the deblob-check. Guix currently lacks > a way of modeling such checks in their origin, but I'd argue it would > need one if we wanted to do computed origins via snippets. This is not > required by icecat and so one "simplification" could be that computed- > origin-method would not require the user to create a tarball, but > instead simply provide a name for the tarball and a directory to create > it from (via a promise again). Ah, I had overlooked that =E2=80=98deblob-check=E2=80=99 bit. It could be = that allowing for custom pack-and-repack procedures would be enough to address it. > A combination of the above might make computed origins obsolete for > good, but the question remains whether that is a better design. What > do y'all think? The design goal is to have clearly identified types: , , . For each of these, we want some flexibility: build system, origin method, etc. However, beyond some level of stretching, it may be clearer to just use the catch-all =E2=80=98computed-file=E2=80=99 or to devise a new type. After all, that= =E2=80=99s how came to be (we could have used instead with a suitable build system). There=E2=80=99s a tension between =E2=80=9Cpurely declarative=E2=80=9D and = =E2=80=9Cflexible=E2=80=9D, and it=E2=80=99s about striking a balance, subjectively. Hope that makes sense! Ludo=E2=80=99.