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 SB2sOSo2pGCCEwEAgWs5BA (envelope-from ) for ; Tue, 18 May 2021 23:48:26 +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 mNNeNSo2pGDGeQAA1q6Kng (envelope-from ) for ; Tue, 18 May 2021 21:48:26 +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 9EA971FEB5 for ; Tue, 18 May 2021 23:48:26 +0200 (CEST) Received: from localhost ([::1]:53608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lj7Zh-0005yc-63 for larch@yhetil.org; Tue, 18 May 2021 17:48:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj7ZL-0005xb-3D for guix-patches@gnu.org; Tue, 18 May 2021 17:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45953) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lj7ZK-00067m-KD for guix-patches@gnu.org; Tue, 18 May 2021 17:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lj7ZK-0006e1-IL for guix-patches@gnu.org; Tue, 18 May 2021 17:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48437] [PATCH] lint: archival: Lookup content in Disarchive database. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 May 2021 21:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48437 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Timothy Sample Cc: 48437@debbugs.gnu.org Received: via spool by 48437-submit@debbugs.gnu.org id=B48437.162137447625529 (code B ref 48437); Tue, 18 May 2021 21:48:02 +0000 Received: (at 48437) by debbugs.gnu.org; 18 May 2021 21:47:56 +0000 Received: from localhost ([127.0.0.1]:57499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj7ZE-0006dg-5y for submit@debbugs.gnu.org; Tue, 18 May 2021 17:47:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj7ZB-0006dU-RS for 48437@debbugs.gnu.org; Tue, 18 May 2021 17:47:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53280) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lj7Z6-0005zT-Bi; Tue, 18 May 2021 17:47:48 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37520 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj7Z5-0006cA-Ge; Tue, 18 May 2021 17:47:48 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210515102814.5944-1-ludo@gnu.org> <87o8d8loey.fsf@ngyro.com> Date: Tue, 18 May 2021 23:47:45 +0200 In-Reply-To: <87o8d8loey.fsf@ngyro.com> (Timothy Sample's message of "Mon, 17 May 2021 23:19:01 -0400") Message-ID: <87a6or67em.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=1621374506; 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=VYzJPSi6j/n2CxuwDIRv+xJOe6YbkQNk9F9cCXhTLXE=; b=GxpnbeX7+1NCGCLKZR4craywGth4UEZIFh9XKtIOeco4W6LmNa7PTHp2yV83bUA+oqCeY1 RW6gMhdBsPY+daXAekD2lDZO/dH2PveghqDJTMgNDfB32EHYYdEX/v+keprFjHUc7a0t0u 5L8P9H6jJQARhUel9PyVTViwHm4gqWgDKiTWvkXua5XypaoHhzijggoUSoP8AlMfmKmSVT +yE2HyW/hpuhd7KK5YCPoZ7WP49XQBWaVQilOtFiPiyeMjm+/bL3zeYlzNs/Cu/Gn4JC5K +wRi9rXBQ+H6iqbxKFazvw46O5x5MfgnYEjW3gZue2UNmYDP3wiNrapoDB7nAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621374506; a=rsa-sha256; cv=none; b=qoZLUXpcOUbAE4gkWIcjsO5cx8z+huJEzQMzALotixkDWP5GLLEf+Xi7+aG5PJERr7it06 DeyPHnnRyZOlLcckYWicerQIQzR7TqgDZxD/asBQbYRw6xXAAvp7n9aKx//L0VOHOuSNrr 4zjkGMcAOTLKrsvxALS2Al5hz9u98uxJsjdA8eHAZ/BcdNf5YCpiWQvwk6zuhmI4kpv79E Zv2TefnJDjID4LyM3yGVNuNk9Qknyru3c9Pm9AWaz0IICVxeAjf2sf1e2f5keYdZDJY4VG ph+7mApG1b++c55AXtXghovCp4C6RB1wQCV0v0CdfliPWsZ1yzsHNcKQzCwyJA== 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: -2.94 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: 9EA971FEB5 X-Spam-Score: -2.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2WDHRemJOE+P Hi! Timothy Sample skribis: > Ludovic Court=C3=A8s writes: > >> This patch makes the =E2=80=98archival=E2=80=99 checker check the Disarc= hive database(s) >> when SWH =E2=80=98lookup-content=E2=80=99 returns #f. [...] >> >> It assumes that the swhid found in the Disarchive metadata is valid, a >> reasonable assumption IMO. >> >> Thoughts? > > One thing to consider is that just because Disarchive has captured an > archive=E2=80=99s metadata and computed the SWHID of its contents doesn= =E2=80=99t mean > that the contents are actually in the SWH archive. (Maybe that=E2=80=99s= what > you meant when you wrote about valid IDs above.) Yes, I thought we could assume the contents were necessarily in the archive. > It would be neat if the lint check looked up the SWHID to see if it > exists. Unfortunately, Disarchive doesn=E2=80=99t make getting the under= lying > SWHID easy at the moment. One option would be to pass a resolver to > =E2=80=9Cdisarchive-assemble=E2=80=9D that exfiltrates the ID using =E2= =80=9Cset!=E2=80=9D. Another > one would be to =E2=80=9Cread=E2=80=9D the specification and search for a= form like > =E2=80=98(swhid "swh:1:dir:...")=E2=80=99. Neither is particularly lovel= y.... Hmm yeah. There=E2=80=99s no API to deserialize the (disarchive =E2=80=A6)= sexp as a record, right? > Other than that, the code looks good and everything seems to work. :) Maybe we can assume (with a comment) that the SWHID points to a valid content, and when creating the Disarchive database we actually make sure this is the case? More generally, we need to talk about that database, how to create it and maintain it. :-) Thanks, Ludo=E2=80=99.