From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0McTNmHHVWHWYgAAgWs5BA (envelope-from ) for ; Thu, 30 Sep 2021 16:19:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sELMMWHHVWEdKAAA1q6Kng (envelope-from ) for ; Thu, 30 Sep 2021 14:19:13 +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 903AA2D136 for ; Thu, 30 Sep 2021 16:19:13 +0200 (CEST) Received: from localhost ([::1]:47822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVwu0-0005SP-J4 for larch@yhetil.org; Thu, 30 Sep 2021 10:19:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVwtq-0005Qi-2c for guix-patches@gnu.org; Thu, 30 Sep 2021 10:19:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVwtp-0001fK-Rx for guix-patches@gnu.org; Thu, 30 Sep 2021 10:19:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVwtp-0001H5-NA for guix-patches@gnu.org; Thu, 30 Sep 2021 10:19:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50620] [PATCH 0/2] Unify 'computed-origin-method' (linux, icecat) Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Sep 2021 14:19: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Mark H Weaver , 50620@debbugs.gnu.org, zimoun Received: via spool by 50620-submit@debbugs.gnu.org id=B50620.16330114914820 (code B ref 50620); Thu, 30 Sep 2021 14:19:01 +0000 Received: (at 50620) by debbugs.gnu.org; 30 Sep 2021 14:18:11 +0000 Received: from localhost ([127.0.0.1]:53595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVwt0-0001Fg-Ib for submit@debbugs.gnu.org; Thu, 30 Sep 2021 10:18:10 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVwsn-0001Ee-CT for 50620@debbugs.gnu.org; Thu, 30 Sep 2021 10:18:09 -0400 Received: by mail-wr1-f68.google.com with SMTP id i23so10384982wrb.2 for <50620@debbugs.gnu.org>; Thu, 30 Sep 2021 07:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=AnJvLUfIo6+6caT298WVANOb0YVwp2P+hrf8SQXyVxY=; b=LcQBwb/QrxYD1gMCjBxb2OYoytuEfoq1LybyuVfY8d7VF3UwuW9Qj5SE6+Y51JxokU clYr/a1GW9Pyyu5PvwqV40O3Co2ZPNrUec8c+0cdEvEgFvYP+UeJN/z7qwYLLPXtMoov 6AAct8fV5lAHTL2gNEYlL7LGBbffNuVw5DgDceid56OzUgfW53uyCH/f8524VE/a8Zdg lsf8VfRbdJ9YAqjgPz8C9hxiqhQKKYe+rgYlmx3u9mQ86QiidqKt1R6vUaYxH5IyqBfj cQqcUKglMfbb3WYcsnkqu1FOUVvyoVvz79qhZ+TtY8j+J7IfBpsyidoKu8S1mg6slTZA 6h6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=AnJvLUfIo6+6caT298WVANOb0YVwp2P+hrf8SQXyVxY=; b=Pz5cPpP40+fHJ5V4gDL0qj9fUih3kBKQeD3lk0DF5mkyW9cp7kQ6A8xpsjYcUNQ7cM 1wF0vk3f92livO2cm9E7ck9ON6NS+nw0j8Ba5CDfCx4Fa28KClrmgfKpzB2MBPOVup6u 9WVxXjmKzF3n7hjfYRbV9qy/B5so4PC6MgrCKSri4ZGIjcBVEYMvE+meLty4qG+E4SYF kPb/JHt2LVU55KUlkJkEgjr9oQP29vWdsVOAA5anGPeJQ0SgyBaS+wyVcbiZf9bDJbGm QmOPTCtXNs0DsOKtg98cBPMHZfikj9fL9ix5YU9m+61PnAkp4WdKnYc/fpiIyGzB6YnK DznA== X-Gm-Message-State: AOAM532Y1Aw4PEarC7v6MxBLhEiKv0LJCmp2ET3Y3VZYv+KQYJd6/jZY SH/eTlOA1EsclwenjSN7Iao= X-Google-Smtp-Source: ABdhPJxChBPeDJSP936JCHfqu6a+LcvW5I5TStWuaGiGbKNs4LdzwICIV/3IpCAu23/kd8saI8y6/g== X-Received: by 2002:adf:eb12:: with SMTP id s18mr6583735wrn.97.1633011471095; Thu, 30 Sep 2021 07:17:51 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id l26sm4950316wmi.25.2021.09.30.07.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 07:17:49 -0700 (PDT) Message-ID: <735304d110f5e99c66904fc7ced3465bf1815baf.camel@gmail.com> From: Liliana Marie Prikler Date: Thu, 30 Sep 2021 16:17:48 +0200 In-Reply-To: <87r1d64gd3.fsf_-_@gnu.org> References: <20210916114734.2686426-1-zimon.toutoune@gmail.com> <9b6ee27ff10e1042a5d61d0f93d957cf760e9ecb.camel@gmail.com> <87v930ay5y.fsf@netris.org> <87pmstghx0.fsf@netris.org> <87a6jv8qu7.fsf_-_@gnu.org> <87pmsr5a0z.fsf_-_@gnu.org> <09c009ec61b8f9c1746f98916f492b8953b16dcc.camel@gmail.com> <87r1d64gd3.fsf_-_@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=1633011553; 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:dkim-signature; bh=AnJvLUfIo6+6caT298WVANOb0YVwp2P+hrf8SQXyVxY=; b=hxmQb/3h/m2NowKPteBGrXv5p2FOJIVwWdeYG8TuHtogOrRUFJJDIAeA7BOFjREWpso0by j/UDJX1Q+ghAvGnmqH5mDaQKpYn1UcsowSsLOyuizcybOcLj9F5GhvhvBzcWSz6L4InRbn sQD7PtH72BfBTub6DPS6LMJCSaxQojvxwCjgbGeZAoD2P7OqzE0vP18rGpbavPDux2wHw8 yMK8wJttKzl2mrbpwmJWTwAw2vHRIXmDUVSmvR2CeVuvjk41DNKHHmCMUiMcsn1esAgXYj ymBV9mR22Nl0nNwDDr7DBBU11LiXsStv6A6RyZ18K2ls88w6JWJGfBSFOdf6mQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633011553; a=rsa-sha256; cv=none; b=g4xflhseGIba3URBsdzWYd5yjmbxF16P9gGvahmkHOr2kkRhElN8z4S3CRtELn4t+hwW5i OzilYYYbhkiPyjYN3m438Y6PVKhrkVrJVLDsZE7AI79ojmG7YhvWuaHHibZtJZdRpNOZoN dAv1yJDXohTeEMg33ePGzIeV97zq82hlyq4Qxj8Ik2cyImUUGMq7PLRxYOWEfKxSYY8P/F S5MSTWLzpCJOknd44b0ehz2ycMoAnEN03rAzQkVrqYPqFO/0d7u3JPRa1wULZh98lJLSGJ tjZLGA5mjYArb+BgPxZut2prX6WtMRlDIRKmEp6VNegUuSgfj1YjnIxvfnAxHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="LcQBwb/Q"; 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: 0.20 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="LcQBwb/Q"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 903AA2D136 X-Spam-Score: 0.20 X-Migadu-Scanner: scn0.migadu.com X-TUID: DDqK8+ob+V6Y Hi, Am Donnerstag, den 30.09.2021, 10:28 +0200 schrieb Ludovic Courtès: > [...] > > What we can't currently control is the top directory name and the > > output name. Both of that could be customized by supplying a > > "repack-name" field, which is used as basis for the directory name > > and the tarball name. > > Another thing we can't easily control are extraneous inputs to the > > patches, although the patch-inputs field *does* exist. > > It’s possible to use a gexp as the snippet, where you can refer to > additional things in there (though in practice this is currently > impractical due to snippets not being thunks/promises.) Which is a practical issue because it'd mean that the tarball gets built as soon as the source is interpreted? > > > > 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 > > > ‘computed-file’ or to devise a new type. After all, that’s how > > > came to be (we could have used instead with a > > > suitable build system). > > > > > > There’s a tension between “purely declarative” and “flexible”, > > > and > > > it’s about striking a balance, subjectively. > > To be fair, I did think that "computed-tarball" might be a good > > abstraction in some sense, but on another hand origins are computed > > tarballs with a record interface. > > > > On a somewhat related note, origins have this weird situation going > > on where some things like git or svn checkouts need to be defined > > through them, whereas others may pass unhindered. I feel that this > > contributes to the equation of source = origin, that might have > > caused "computed-origin-method" to exist in the first place. > > I’m not sure what you mean by “others may pass unhindered”? You mean > other VCS checkouts? I mean that we don't need to wrap local-file inside an origin for example whereas we do need to wrap e.g. svn-fetch instead of having an svn-checkout constructor at the top. It's not really that noticable normally, but weird once you start thinking a little too hard about it. > > What do you think? > > I think the situation of IceCat and Linux-libre is unusual: 2 > packages out of 18K. That probably explains why we have a hard time > figuring out how to generalize the issues that ‘computed-origin- > method’ addresses. > > What you propose (IIUC) sounds interesting: we’d provide a > data type, which would make the source URL > manifest (something that’s useful for < > https://issues.guix.gnu.org/50515>;, > for instance), but the lowering step would be entirely custom, > similar to what it already looks like: > > (define-record-type* computed-tarball make- > computed-tarball > computed-tarball? > this-computed-tarball > (url computed-tarball-url) ;or could be an > (builder computer-tarball-builder (thunked)) ;gexp > (location computed-tarball-location (innate) (default (current- > source-location)))) > > Is this what you had in mind? Slightly similar, but I don't think I'd want a singular source url. Instead (define-record-type* computed-tarball make-computed-tarball computed-tarball? this-computed-tarball (sources computed-tarball-sources) ; list of origins, local ; files or other things (builder computer-tarball-builder (thunked)) ; gexp (name computed-tarball-name) ; perhaps? (location computed-tarball-location (innate) (default (current-source-location)))) At the start of BUILDER, SOURCES are already unpacked to the current working directory under their stripped file names. After builder returns, we either package the contents of the current working directory up into a tarball (variant A) or we have builder return a list of files to pack up (variant B) which we then post-process maybe. WDYT?