From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6ISxE2u+UGSKYAEASxT56A (envelope-from ) for ; Tue, 02 May 2023 09:40: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 mp11.migadu.com with LMTPS id MEm5E2u+UGQtGgAA9RJhRA (envelope-from ) for ; Tue, 02 May 2023 09:40:27 +0200 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 23AB923985 for ; Tue, 2 May 2023 09:40:27 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptkc6-0001Aq-0Y; Tue, 02 May 2023 03:39:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptkc4-0001Ai-Hm for guix-devel@gnu.org; Tue, 02 May 2023 03:39:52 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptkc1-0001E2-FQ for guix-devel@gnu.org; Tue, 02 May 2023 03:39:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version:content-transfer-encoding; bh=w7wJV0aYe7aq3mAZC4YXZ8N/y3VwzzAZUujLxDOzK6g=; b=FM3YKJO+b79S6nxbPwhEOiVt3nsI2NcTrouzjg16M0ehWto9Yk+IkkJn bRzlWTdm8keV/5cf06KlFNzFZrSFDIDslWERZAxpHr7m2ndOXygGZEB2O oX0Ihj2GrtZXXdp09+Y6FofzcVMcWRlAHbTnM8baqz+aQz475d5LeNxgv A=; X-IronPort-AV: E=Sophos;i="5.99,243,1677538800"; d="scan'208";a="54821393" Received: from unknown (HELO ribbon) ([193.50.110.221]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2023 09:39:44 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Cc: Simon Tournier , =?utf-8?Q?Bj=C3=B6rn_H?= =?utf-8?Q?=C3=B6fling?= , guix-devel@gnu.org, Lars-Dominik Braun Subject: Re: Adding content-addressed URLs to https://guix.gnu.org/sources.json References: <20230312220021.22bfff4f@tangletp> <878rfwgbng.fsf@gnu.org> <86lej8y75p.fsf@gmail.com> <87cz3t44hi.fsf_-_@inria.fr> <86pm7sb7vf.fsf@gmail.com> <87354oqdal.fsf@gmail.com> <87v8hg9lct.fsf@gmail.com> <875y9c9963.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 13 =?utf-8?Q?Flor=C3=A9al?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du =?utf-8?Q?B=C3=A2ton-d'or?= 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: Tue, 02 May 2023 09:39:43 +0200 In-Reply-To: <875y9c9963.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 30 Apr 2023 20:39:48 -0400") Message-ID: <87v8hb9o74.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.104; envelope-from=ludovic.courtes@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683013227; a=rsa-sha256; cv=none; b=Xx5Ut3K9qgeKboG9Sr86uucehhaDek+u9g2Rwqy6cF0RM4xza1+jjO+2v08H3ugiFVoAa8 ZpdXenrngPvNi/uzRkFDISIW8Tp+8qXoW4IOxBriCBYNfJDqTQZrGtccGjjFnRMS1EBde2 A1ZxEUyz1LIoJIq6nahDMlKUWu1U85+Yz4gYdvJmifQptfieHL1iSsMdBCzBzlOMsCLdkK AjWVy9bASQjQwC8L4kXKVlOrjB66tzYkX+nTmqNYhS5XMektXcAaQhpqpZHkKG5+ZKdEcQ EVwlz9jWqWYiM9XPyfdhl/U6Y9eUzL25MCFMVjPT+gc2MW5HLpTu8ygomUzgCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=FM3YKJO+; dmarc=pass (policy=none) header.from=inria.fr; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683013227; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=w7wJV0aYe7aq3mAZC4YXZ8N/y3VwzzAZUujLxDOzK6g=; b=b6Kzp3h9yPN7MPaP2b03JMO0rP5UBMvn5F4v2jWBBjXvVWjd/RTCrf9f5qCDEkmhXPvpii o1fDOvWjyZlxJlf23Wwhbzd8EzwO5lTG7K7kNgDV0ID+EgAOyUpLTVJ5NyWSlv038+Ksty 2qzy9QRlWNuzTDE9St5RdB3oopir3LJ259ScHTzZsJwfXY2pHxOQTeTbzirr2AsrXZNwwq lBal1mxAcwukQr9Y0Ms63fUFGvGHIKV5DkJO/wb50l5T5/Ja6U5IIJ3NtJL9YCOfFIB1e3 qWwLivJ02v7RVuM43m/kwJxvtL2WEfcRt3jq+neUz/w34m17zs9bOmti3syUVA== X-Migadu-Spam-Score: -8.79 X-Spam-Score: -8.79 X-Migadu-Queue-Id: 23AB923985 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=FM3YKJO+; dmarc=pass (policy=none) header.from=inria.fr; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-TUID: 4FPbqcJXPpiv Hello, Maxim Cournoyer skribis: > Simon Tournier writes: [...] >> I agree that any file-like object is nice. Somehow, the issue is to >> =E2=80=9Cunpack=E2=80=9C the information of this object. For instance, >> >> scheme@(guix-user)> (define ruby-sorbet-runtime (@@ (gnu packages ruby) = ruby-sorbet-runtime)) >> scheme@(guix-user)> (package-source ruby-sorbet-runtime) >> $1 =3D #< name: "ruby-sorbet-runtime-0.5.10610.2023010617= 4520-1fa668010-checkout" gexp: #= url: "https://github.com/sorbet/sorbet" commit: "0.5.10610.20230106174520-= 1fa668010" recursive?: #f> # () 7fd7ad6b81e0>:out> "/gems/sorbet-" #) #)) gnu/packages/ruby.scm:14071:5 7fd7= ae734480> guile: #f options: (#:local-build? #t)> >> >> >> and as far as I understand, this case cannot be handled by some generic >> code. The extraction of the =E2=80=9Creal=E2=80=9D origin needs manual = and specific >> extraction because of this =E2=80=99computed-file=E2=80=99. >> >> For sure, =E2=80=99source=E2=80=99 can use any file-like object because = some use-cases >> require that. However, I would be tempted to use an =E2=80=99origin=E2= =80=99 as a >> preferred choice =E2=80=93 i.e., when it=E2=80=99s possible and try to m= ake it >> possible. ;-) Because, somehow, it =E2=80=9Cnormalizes=E2=80=9C the sour= ce information >> and eases its extraction. Oh, got it. > I'm not sure I follow, perhaps because I lack context about how > Disarchiver use the source field of a package. Would you mind > explaining a bit what the problem is or pointing me to a place it was > already explained? The problem with the idiom used for =E2=80=98ruby-sorbet-runtime=E2=80=99 i= s that the origin is hidden inside a gexp. Thus, the machinery that produces (the file that SWH fetches periodically to ingest the source code packages refer to) will not add it. To put it differently, we have no guarantee that the commit above will be archived and that we=E2=80=99ll eventually be able to rebuild =E2=80=98ruby-sorbet-runtime=E2=80=99. So I guess as a matter of policy, we should try and find other ways to express this so we don=E2=80=99t lose track of origins. In this particular case, we could do what Simon proposed or, even simpler, just add a phase that calls =E2=80=98chdir=E2=80=99 (the advantage= being that we don=E2=80=99t have to create copies of subsets of =E2=80=98sorbet-monore= po=E2=80=99). WDYT? Ludo=E2=80=99.