From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wKNMIlny/F5uYwAA0tVLHw (envelope-from ) for ; Wed, 01 Jul 2020 20:30:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gJMjHlny/F6yfwAAbx9fmQ (envelope-from ) for ; Wed, 01 Jul 2020 20:30:17 +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 0B6409404E2 for ; Wed, 1 Jul 2020 20:30:16 +0000 (UTC) Received: from localhost ([::1]:56366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqjN1-0002VF-0x for larch@yhetil.org; Wed, 01 Jul 2020 16:30:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqjMo-0002V6-BV for guix-patches@gnu.org; Wed, 01 Jul 2020 16:30:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqjMo-0006by-1f for guix-patches@gnu.org; Wed, 01 Jul 2020 16:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jqjMn-0003Pn-UP for guix-patches@gnu.org; Wed, 01 Jul 2020 16:30:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42019] [PATCH 1/1] website: Add integrity to JSON sources. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jul 2020 20:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42019 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 42019@debbugs.gnu.org Received: via spool by 42019-submit@debbugs.gnu.org id=B42019.159363535013022 (code B ref 42019); Wed, 01 Jul 2020 20:30:01 +0000 Received: (at 42019) by debbugs.gnu.org; 1 Jul 2020 20:29:10 +0000 Received: from localhost ([127.0.0.1]:53773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqjLy-0003Ny-FZ for submit@debbugs.gnu.org; Wed, 01 Jul 2020 16:29:10 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqjLw-0003Nk-A0 for 42019@debbugs.gnu.org; Wed, 01 Jul 2020 16:29:08 -0400 Received: by mail-wr1-f68.google.com with SMTP id a6so25483191wrm.4 for <42019@debbugs.gnu.org>; Wed, 01 Jul 2020 13:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=ihIXhy2RYcqgp1oLqgltC995BonpOoqnCZLpCCfXFpo=; b=YTIU78W2+BvawBnuV7v8Xcl4fAqI3o+GaESgzmhWYjA1SPNDP9nsR/aiSu0I6cBfG5 fVRxm6Y8T2+twovKwrdjllsURNbhsUKkzIeLDTQQREuBsUctkvIBU2oV48ifDcMVyVT0 hpzHtb4l+hqLaKkySrQbJjQHsNoavCgHzbDEvj9jpQWN0gF5r1+0oqDnWJUA0H3NTQIM 76MFUOur2VPmVWQ1iWiFH/iCtn1JGaH+1We/Nw7C85jFGRv3u5KvdklNTj9rhsHDh4xJ haJmMl6rUI0qJUaiE5musac8H43FQJweYPc+WD9C2EjfwnIjKfPdu00kM5GDQHXsyrhF +IOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=ihIXhy2RYcqgp1oLqgltC995BonpOoqnCZLpCCfXFpo=; b=aY1y+/8F14Bv8awXcCaB6ZZZGIO43bJLuHydqor2ZcYBgkMGYPDEn3nxpb/G/6xoSz qZ/zPs1twLFqNjY5SzRsykjk+/J0HzTLT2Ulqoq5LFBp0AK0ZcGLq61O3YqVl1HvlDmN FRQ551D/eXiTJit3AeXFlGkIPVCaxc003sJgqqdr0pOkaM1CkUE4VGmA2azUNa3AndfJ e7ryq6DQWn9wXnDGUGvw57XdcMG9m8n8jstHZliA5zrWJ6i54z1oLhUgg7SDSZ1hSqhH YnJkOuxnOhNGRv8WRNgZTkLN4Yy5mR70LyI7KvO4t7figAlwzzLaQ1U9PBGHAyukKHpr aQQg== X-Gm-Message-State: AOAM5323nsk34uKIShxS78aYY+egrSbSM1aKXWrdlHhFTd8cg7Om9TRn m4cw3GbpvV4MksTGVifUy/P1j4yyv14= X-Google-Smtp-Source: ABdhPJz0Cw4UB7HdUw2sCGgIWfeWh/I9MqYuWVHsji/yjikOPh+ZawXn4/Tsf+LC5k1+SgXz1xiQ1g== X-Received: by 2002:a5d:424f:: with SMTP id s15mr18859967wrr.342.1593635342148; Wed, 01 Jul 2020 13:29:02 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id s10sm8576593wme.31.2020.07.01.13.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 13:29:01 -0700 (PDT) From: zimoun In-Reply-To: <87d05f2flv.fsf@cbaines.net> References: <20200623151323.29639-1-zimon.toutoune@gmail.com> <20200623152139.512-1-zimon.toutoune@gmail.com> <87zh8ol9qp.fsf@gnu.org> <86y2o8be3c.fsf@gmail.com> <87v9j9a9ko.fsf@gnu.org> <864kqtbgeq.fsf@gmail.com> <87d05f2flv.fsf@cbaines.net> Date: Wed, 01 Jul 2020 22:29:00 +0200 Message-ID: <86366b9dyr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=YTIU78W2; 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-Spam-Score: 1.59 X-TUID: MwtH1QXLgJXb Hi Chris, On Wed, 01 Jul 2020 at 20:35, Christopher Baines wrote: > A question maybe for you Simon, what would be the perfect data for this > particular use case? I gather it's something about the (source ...) > field in packages, probably for all the exported (plus maybe > not-exported packages). Currently the website builds source.json by using 'fold-packages' (traversing all the modules and returning all the public variables, if I read correctly) then excluding 'package-superseded' and 'package-replacement'. Well, maybe an example is simpler than a lot of words. The resulting JSON looks like: --8<---------------cut here---------------start------------->8--- { "type": "url", "urls": [ "https://ftpmirror.gnu.org/gnu/a2ps/a2ps-4.14.tar.gz", "ftp://ftp.cs.tu-berlin.de/pub/gnu/a2ps/a2ps-4.14.tar.gz", "ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/a2ps/a2ps-4.14.tar.gz", "http://ftp.gnu.org/pub/gnu/a2ps/a2ps-4.14.tar.gz" ], "integrity": "sha256-866NPUVkpBtuKiHyN9LysQT0gQhZHouDSXUAGCo6s6Q=" }, { "type": "git", "git_url": "https://github.com/opencog/agi-bio.git", "git_ref": "b5c6f3d99e8cca3798bf0cdf2c32f4bdb8098efb" }, --8<---------------cut here---------------end--------------->8--- So basically, the data are: origin-method, origin-uri (implies reference URLs and {git,hg,svn}-{commit,revision}), origin-hash (implies content-hash-{value,algorithm}). Note that the list of mirrors are necessary too. I have given a look to http://git.savannah.gnu.org/cgit/guix/data-service.git/tree/ but I am not sure to understand where the SQL table is defined. Thanks, simon