From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH] website: Provide JSON sources list used by Software Heritage. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 10 Feb 2020 17:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39547@debbugs.gnu.org Cc: zimoun X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158135427717951 (code B ref -1); Mon, 10 Feb 2020 17:05:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Feb 2020 17:04:37 +0000 Received: from localhost ([127.0.0.1]:55331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1CU6-0004fP-BK for submit@debbugs.gnu.org; Mon, 10 Feb 2020 12:04:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:46211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1CU2-0004fG-J4 for submit@debbugs.gnu.org; Mon, 10 Feb 2020 12:04:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50178) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1CTz-0002oJ-VK for guix-patches@gnu.org; Mon, 10 Feb 2020 12:04:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1CTx-0003q8-Me for guix-patches@gnu.org; Mon, 10 Feb 2020 12:04:27 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:46027) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1CTx-0003nL-Ad for guix-patches@gnu.org; Mon, 10 Feb 2020 12:04:25 -0500 Received: by mail-wr1-x443.google.com with SMTP id g3so7627938wrs.12 for ; Mon, 10 Feb 2020 09:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mosk8DvAhv8UbhMVFP1f25338vyV0ob4vfrXDnT2JP0=; b=ZMs2j6li/XQfyEvlWjtd81YfQuHGbg7Zx2BQYKLMOXp5AWZux/Yojtmvl6llUMytYX jxiRx+ImUfmz9T+jaFBO4YqLWULp5oTmkapEpl1Ll5vYgkvggYJ09kzOJMnHs3r0Aab2 0gABV2Ovjv/ZpNaBU0jh2FF8A1mnVa5OVbFVm2jsjj2sFbZ+7EIgdShQ3It7/RA0fZM8 EXshxED1U3qFLCzi07798VPNkycLFdRHkg0g1S2fft816BMDWS8N6Pot7/nvF/yd9CDE Jz7Dh4Qi09RD+o7edZPaSCcPOkV+RPE7upR/7S+0l1/QZ8T/Iid+7+iKYoaH99v47QsV YEyw== 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:date:message-id:mime-version :content-transfer-encoding; bh=mosk8DvAhv8UbhMVFP1f25338vyV0ob4vfrXDnT2JP0=; b=g0LYY5VhaTEonK8xxUW/gyVySNbDqRJ2EuFwhv/q/3XcLKziMwn2hbKetcbNkMWs8v 1Sxc7C/RPAynmseypEUcgGCXBzYPk9jZECEmA21haH1SkA1wf2ZDMRg1l3CZD+Bwv7NW zndWak1KfGOul0G7gX77DYerPH2gZ4UvBYv0NPkOnHtc70AULdX5/Zpj1Y3Afc5RiFU3 VfakgGV9S7VIaDFtq8B668VF+k0zN+5LK5DyaOUulfCslk3yXEnP/0zhPn4ey64O17aR qRDi0BscznQ53blPj0pyLhR9MqFsfTj9aB2GT/Wb+KzzRZQKn8cnQBU8uEzUHGTEr/TV roSA== X-Gm-Message-State: APjAAAXPia6GDx4ibxi4+a97CYQ05Qa5ocdWJtlvqH4sZFfEAyItFIs5 aHFGq1SmQubn/+PvPOQcIL3v8kq+ X-Google-Smtp-Source: APXvYqxyCxu7xSwZhGX1eSqXrH00JJcblIvBE1EZ7lz23gPNIGFzoEuIR9XvDnFnU/931WFjKToJ/Q== X-Received: by 2002:adf:f3d0:: with SMTP id g16mr3102866wrp.2.1581354262796; Mon, 10 Feb 2020 09:04:22 -0800 (PST) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id f127sm2870wma.4.2020.02.10.09.04.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2020 09:04:22 -0800 (PST) From: zimoun Date: Mon, 10 Feb 2020 18:04:18 +0100 Message-Id: <20200210170418.32076-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 X-Spam-Score: 3.9 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Format discussed here . * website/apps/packages/builder.scm (sources-json-builder): New procedure. --- website/apps/packages/builder.scm | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) Content analysis details: (3.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: nixo.xyz] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 2.0 SPOOFED_FREEMAIL No description available. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Format discussed here . * website/apps/packages/builder.scm (sources-json-builder): New procedure. --- website/apps/packages/builder.scm | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Format discussed here . * website/apps/packages/builder.scm (sources-json-builder): New procedure. --- website/apps/packages/builder.scm | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm index 9dc44c9..5279096 100644 --- a/website/apps/packages/builder.scm +++ b/website/apps/packages/builder.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2019 Nicolò Balzarotti +;;; Copyright © 2020 Simon Tournier ;;; ;;; Initially written by sirgazil ;;; who waives all copyright interest on this file. @@ -37,6 +38,8 @@ #:use-module (haunt page) #:use-module (haunt utils) #:use-module (srfi srfi-1) + #:use-module ((web uri) #:select (string->uri uri->string uri-scheme)) + #:use-module ((guix build download) #:select (maybe-expand-mirrors)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -70,6 +73,7 @@ (flatten (list (index-builder) + (sources-json-builder) (packages-json-builder) (packages-builder) (package-list-builder)))) @@ -84,6 +88,64 @@ ;; Maximum number of packages shown on /packages. 30) +(define (sources-json-builder) + "Return a JSON page listing all the sources." + (define (origin->json origin) + (define method + (origin-method origin)) + + (define uri ;represented as string + (origin-uri origin)) + + (define (mirror->url uri) + (uri->string (car (maybe-expand-mirrors uri %mirrors)))) + + (define (resolve urls) + (let* ((url (car urls)) + (uri (string->uri url)) + (rest (cdr urls))) + (case (uri-scheme uri) + ((mirror) (mirror->url uri)) + ((http) url) + ((https) url) + (else + (if (null? rest) + url + (resolve rest)))))) + + `((type . ,(cond ((eq? url-fetch method) 'url) + ((eq? git-fetch method) 'git) + ((eq? svn-fetch method) 'svn) + (else #nil))) + ,@(cond ((eq? url-fetch method) + `(("url" . ,(match uri + ((? string? url) (mirror->url (string->uri url))) + ((urls ...) (resolve urls)))))) + ((eq? git-fetch method) + `(("git_url" . ,(git-reference-url uri)))) + ((eq? svn-fetch method) + `(("svn_url" . ,(svn-reference-url uri)))) + (else '())) + ,@(if (eq? method git-fetch) + `(("git_ref" . ,(git-reference-commit uri))) + '()) + ,@(if (eq? method svn-fetch) + `(("svn_revision" . ,(svn-reference-revision + uri))) + '()))) + + (define (package->json package) + `(,@(if (origin? (package-source package)) + (origin->json (package-source package)) + `(("type" . "no-origin") + ("name" . ,(package-name package)))))) + + (make-page "sources.json" + `(("sources" . ,(list->vector (map package->json (all-packages)))) + ("version" . "1")) + scm->json)) + + (define (packages-json-builder) "Return a JSON page listing all packages." (define (origin->json origin) -- 2.23.0 From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH] website: Provide JSON sources list used by Software Heritage. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 14 Feb 2020 08:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158166965328048 (code B ref 39547); Fri, 14 Feb 2020 08:41:02 +0000 Received: (at 39547) by debbugs.gnu.org; 14 Feb 2020 08:40:53 +0000 Received: from localhost ([127.0.0.1]:60819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2WWr-0007IK-Cb for submit@debbugs.gnu.org; Fri, 14 Feb 2020 03:40:53 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:28444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2WWq-0007I6-A3 for 39547@debbugs.gnu.org; Fri, 14 Feb 2020 03:40:52 -0500 X-IronPort-AV: E=Sophos;i="5.70,439,1574118000"; d="scan'208";a="339164778" Received: from unknown (HELO ribbon) ([193.50.110.249]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES256-GCM-SHA384; 14 Feb 2020 09:40:45 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200210170418.32076-1-zimon.toutoune@gmail.com> Date: Fri, 14 Feb 2020 09:40:45 +0100 In-Reply-To: <20200210170418.32076-1-zimon.toutoune@gmail.com> (zimoun's message of "Mon, 10 Feb 2020 18:04:18 +0100") Message-ID: <87pnehk1de.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hello, zimoun skribis: > Format discussed here . > > * website/apps/packages/builder.scm (sources-json-builder): New procedure. [...] > +(define (sources-json-builder) > + "Return a JSON page listing all the sources." Please add a reference to here. > + (define (origin->json origin) > + (define method > + (origin-method origin)) > + > + (define uri ;represented as string > + (origin-uri origin)) > + > + (define (mirror->url uri) > + (uri->string (car (maybe-expand-mirrors uri %mirrors)))) > + > + (define (resolve urls) > + (let* ((url (car urls)) > + (uri (string->uri url)) > + (rest (cdr urls))) > + (case (uri-scheme uri) > + ((mirror) (mirror->url uri)) > + ((http) url) > + ((https) url) > + (else > + (if (null? rest) > + url > + (resolve rest)))))) > + > + `((type . ,(cond ((eq? url-fetch method) 'url) > + ((eq? git-fetch method) 'git) > + ((eq? svn-fetch method) 'svn) > + (else #nil))) > + ,@(cond ((eq? url-fetch method) > + `(("url" . ,(match uri > + ((? string? url) (mirror->url (string->uri url))) > + ((urls ...) (resolve urls)))))) > + ((eq? git-fetch method) > + `(("git_url" . ,(git-reference-url uri)))) > + ((eq? svn-fetch method) > + `(("svn_url" . ,(svn-reference-url uri)))) > + (else '())) > + ,@(if (eq? method git-fetch) > + `(("git_ref" . ,(git-reference-commit uri))) > + '()) > + ,@(if (eq? method svn-fetch) > + `(("svn_revision" . ,(svn-reference-revision > + uri))) > + '()))) Could you, in a first patch, move =E2=80=98origin->json=E2=80=99 out of =E2=80=98packages-json-builder=E2=80=99, and in a second patch, add mirror-= expansion feature? For mirror:// expansion, I think you can just write something like: (define uris (append-map (cut maybe-expand-mirrors <> %mirrors) (match url ((_ ...) (map string->uri url)) (_ (list (string->uri url)))))) and then pick the first element of the list. In parallel, I=E2=80=99d recommend suggesting a format change or addition t= hat would allow us to provide all the URLs. :-) With those changes in place, I think we=E2=80=99ll be ready to go! Thanks for working on it, Simon! Ludo=E2=80=99. From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH] website: Provide JSON sources list used by Software Heritage. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 14 Feb 2020 09:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158167106230201 (code B ref 39547); Fri, 14 Feb 2020 09:05:01 +0000 Received: (at 39547) by debbugs.gnu.org; 14 Feb 2020 09:04:22 +0000 Received: from localhost ([127.0.0.1]:60846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2WtZ-0007r2-NU for submit@debbugs.gnu.org; Fri, 14 Feb 2020 04:04:22 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:34031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2WtX-0007qp-Ow for 39547@debbugs.gnu.org; Fri, 14 Feb 2020 04:04:20 -0500 Received: by mail-qk1-f194.google.com with SMTP id c20so8526985qkm.1 for <39547@debbugs.gnu.org>; Fri, 14 Feb 2020 01:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=epGJ86T2d41GJmUsxZ9e9qfYGgPZPihbTNnANLarFX0=; b=ZWc6PfkQmcgRxzb2BoTXqLKXKH8svte+aGPTSiSzVrgAfPUrOG7oY/N2+RkuxTI59Y eXpkFJmAF2wIMuUFCQUhYs023dKOJIYO6nE7rg5l4EIQki71aNsAKUAuyPcj/zdrC6PW 451EsWnwQvZ8jrIcMM/QXsYGzYZgF52cNDNJ8FWJmWQxQ50wPGxeQOrIIdesje+/XhG9 ai+jDuo2bKYPc/NKqehgq5cFU8HagyfHfwtFJhg6ZgGFY/fLYdM2MLS5/l+BhgQYbD+R sPg7k+0+gvc9tChic2taRXjeZcwAPRI8sE/UolruP6fuVDSW1AmfuiSVaiZV1Q96gwak qjpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=epGJ86T2d41GJmUsxZ9e9qfYGgPZPihbTNnANLarFX0=; b=oHmelOVM120iiMoAEN9hn0URQrRgPEbWDt9JlIwW8oqAqVgxDHYLztgThQi482ukKq KdcVL4ZLZXiXABik/5nqXl9sYWcJQ7PgZ2zDsckqAtXDglXfMOrj8DXpLBIWub1eyQVK mipn9PQ1oMcFg+gZbfckRlV3RFoPyiCPLtQgciF9OIb0YA9SIFk6JDWcQZsskY6T1MC2 +Rfp4X+y9e+QQBF5t6quysh53l6T/XInrecp/UBuz8VLvKHwB0BqI/goyEMQTqvk1TG3 vIwKymA4r/KWW11cAtQkASEkhiHV/ScHB6QCtRQQq1KHULlDc2ege61ktbUGhEOc5QHF uGVg== X-Gm-Message-State: APjAAAWuZkg+6+kijp6Qx3EHCvq3GbiDUCSvFoK8net/efKCpse1aPqr 5OFXNe37JG3O73m2kKMqC6gpWUyBKUVwVqQs5ag= X-Google-Smtp-Source: APXvYqzrt2TkUOU2CbcCX70B4cPsrLScIrebIyanSjm0MlPqGZJM6GOmVtwzqsDxukWoZ/vdKZZauLiNEwWbYVjYm/8= X-Received: by 2002:a05:620a:1234:: with SMTP id v20mr1359116qkj.304.1581671054227; Fri, 14 Feb 2020 01:04:14 -0800 (PST) MIME-Version: 1.0 References: <20200210170418.32076-1-zimon.toutoune@gmail.com> <87pnehk1de.fsf@gnu.org> In-Reply-To: <87pnehk1de.fsf@gnu.org> From: zimoun Date: Fri, 14 Feb 2020 10:04:01 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, Thank you for the review. On Fri, 14 Feb 2020 at 09:40, Ludovic Court=C3=A8s wrote: > zimoun skribis: > > Format discussed here . > > > > * website/apps/packages/builder.scm (sources-json-builder): New procedu= re. > > [...] > > > +(define (sources-json-builder) > > + "Return a JSON page listing all the sources." > > Please add a reference to > here. ok > > + (define (origin->json origin) > > + (define method > > + (origin-method origin)) > > + > > + (define uri ;represented as string > > + (origin-uri origin)) > > + > > + (define (mirror->url uri) > > + (uri->string (car (maybe-expand-mirrors uri %mirrors)))) > > + > > + (define (resolve urls) > > + (let* ((url (car urls)) > > + (uri (string->uri url)) > > + (rest (cdr urls))) > > + (case (uri-scheme uri) > > + ((mirror) (mirror->url uri)) > > + ((http) url) > > + ((https) url) > > + (else > > + (if (null? rest) > > + url > > + (resolve rest)))))) > > + > > + `((type . ,(cond ((eq? url-fetch method) 'url) > > + ((eq? git-fetch method) 'git) > > + ((eq? svn-fetch method) 'svn) > > + (else #nil))) > > + ,@(cond ((eq? url-fetch method) > > + `(("url" . ,(match uri > > + ((? string? url) (mirror->url (string->= uri url))) > > + ((urls ...) (resolve urls)))))) > > + ((eq? git-fetch method) > > + `(("git_url" . ,(git-reference-url uri)))) > > + ((eq? svn-fetch method) > > + `(("svn_url" . ,(svn-reference-url uri)))) > > + (else '())) > > + ,@(if (eq? method git-fetch) > > + `(("git_ref" . ,(git-reference-commit uri))) > > + '()) > > + ,@(if (eq? method svn-fetch) > > + `(("svn_revision" . ,(svn-reference-revision > > + uri))) > > + '()))) > > Could you, in a first patch, move =E2=80=98origin->json=E2=80=99 out of > =E2=80=98packages-json-builder=E2=80=99, and in a second patch, add mirro= r-expansion > feature? Yes, I will try but I am a bit lost. There is: - packages-json-builder that I did not modified - sources-json-builder which the "adaptation" of the former to output to the sources.json format. Well, do you want a refactor of 'origin->json' shared by the 2 "{sources,packages}-json-builder"? > For mirror:// expansion, I think you can just write something like: > > (define uris > (append-map (cut maybe-expand-mirrors <> %mirrors) > (match url > ((_ ...) (map string->uri url)) > (_ (list (string->uri url)))))) > > and then pick the first element of the list. Yes, it is better. :-) > In parallel, I=E2=80=99d recommend suggesting a format change or addition= that > would allow us to provide all the URLs. :-) Ok :-) > With those changes in place, I think we=E2=80=99ll be ready to go! Working on updating the package Julia, I have seen that some patches are 'origin' and live for example upstream (https://blablab/project.git/patches/fancy-name.patch) and the current patch will not list them. Therefore, if upstream disappears and/or change in-place the patches, Guix would not be able to re-build in the future (time-machine). I am trying to implement a recursive exporter. Well, I will try to make that the v2 contains your suggestions and all the patches. Cheers, simon From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH] website: Provide JSON sources list used by Software Heritage. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 14 Feb 2020 10:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.15816756464814 (code B ref 39547); Fri, 14 Feb 2020 10:21:01 +0000 Received: (at 39547) by debbugs.gnu.org; 14 Feb 2020 10:20:46 +0000 Received: from localhost ([127.0.0.1]:60896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Y5W-0001Fa-G8 for submit@debbugs.gnu.org; Fri, 14 Feb 2020 05:20:46 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:39083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Y5V-0001FM-Jh for 39547@debbugs.gnu.org; Fri, 14 Feb 2020 05:20:46 -0500 X-IronPort-AV: E=Sophos;i="5.70,440,1574118000"; d="scan'208";a="435972035" Received: from unknown (HELO ribbon) ([193.50.110.249]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES256-GCM-SHA384; 14 Feb 2020 11:20:38 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200210170418.32076-1-zimon.toutoune@gmail.com> <87pnehk1de.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 =?UTF-8?Q?Pluvi=C3=B4se?= an 228 de la =?UTF-8?Q?R=C3=A9volution?= 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: Fri, 14 Feb 2020 11:20:38 +0100 In-Reply-To: (zimoun's message of "Fri, 14 Feb 2020 10:04:01 +0100") Message-ID: <8736bdjwqx.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi, zimoun skribis: >> Could you, in a first patch, move =E2=80=98origin->json=E2=80=99 out of >> =E2=80=98packages-json-builder=E2=80=99, and in a second patch, add mirr= or-expansion >> feature? > > Yes, I will try but I am a bit lost. There is: > - packages-json-builder that I did not modified > - sources-json-builder which the "adaptation" of the former to output > to the sources.json format. > > Well, do you want a refactor of 'origin->json' shared by the 2 > "{sources,packages}-json-builder"? Yes, exactly. No reason to have two copies of that code. > Working on updating the package Julia, I have seen that some patches > are 'origin' and live for example upstream > (https://blablab/project.git/patches/fancy-name.patch) and the current > patch will not list them. Therefore, if upstream disappears and/or > change in-place the patches, Guix would not be able to re-build in the > future (time-machine). Right. I guess you can implement that in the next version. What you propose is already nice to have. Ludo=E2=80=99. From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH] website: Provide JSON sources list used by Software Heritage. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2020 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.15819623831532 (code B ref 39547); Mon, 17 Feb 2020 18:00:02 +0000 Received: (at 39547) by debbugs.gnu.org; 17 Feb 2020 17:59:43 +0000 Received: from localhost ([127.0.0.1]:39189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3kgI-0000Oe-Re for submit@debbugs.gnu.org; Mon, 17 Feb 2020 12:59:43 -0500 Received: from mail-qv1-f68.google.com ([209.85.219.68]:41918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3kgG-0000OR-Jc for 39547@debbugs.gnu.org; Mon, 17 Feb 2020 12:59:41 -0500 Received: by mail-qv1-f68.google.com with SMTP id s7so7944149qvn.8 for <39547@debbugs.gnu.org>; Mon, 17 Feb 2020 09:59:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=IeBJxNAoh+/cVQkDrRtNHxeluxErGcQfUKEaKC08YV4=; b=iYaaQZIQl3Q19jBHjrkpRThWI4dcQgSmc8UGHB4DH1YwINhSPLh4GMMcl+t8Vdx2D8 2+nfEPJsvu1VWKfbYLvBqLE0WOlBVac29ThFvqETLxckTf8AhLe3PC/e6qWXYmq2SibI g7ZStYvDZ7CX+8YynVBasPaZeLGHVJmHXvQEtA8gM3tcbmr6EiCa61BX6RVW44x7kvxR ufBTcapUSB60ZhO/fBPOfmnaeFKm4rliicvLT7HVWriRUctkwVO1YMisRnM+LuH06jQU +YEJMEagZkh26HqX3JQVX7KEMol0wh95RclSGE+A0x0lHiu/ohrQUpoiiNtOLEHdic8E qx4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IeBJxNAoh+/cVQkDrRtNHxeluxErGcQfUKEaKC08YV4=; b=pxr+Nw+g0a9bsSjeU6ATrto/F5VKkeAndEcFjtoOENuEhVCgYo0ixX9KnmoINizOpQ xo0ywe0orNV5E7K/lNOGlp5iH13DhVWh6nIiWUIr5Osc/xAzEFJYDZNH29/W/Z3RF1kF UpA33o2Ec17kuxZkZrTd+TvnUu+AhjZls2qfBQBxlXy4RiiRE82AS7uM3bP8tkipRaMa 5dkTPIe4ukX6+asssVuaa5IFGxCHll6fKQpfN9r18m29/J9qSyXOgctEQ+GyyzNFyiPv ajdEfWXnNqDGfRrdSa3ga0vwH+3F+Al9HXLgU0zBPJQnMunyrjnPl4+EV08aOgUZ/VG1 zSbw== X-Gm-Message-State: APjAAAUA8xVXT9Ka/Sa+2YO5sXJVNFZ5bBZ3LvcjrQjhw+h2yaguqF2U 1r1O9YnJlT6CJ69+OG7imB9fTYqyRWglmXze5Q0= X-Google-Smtp-Source: APXvYqywOrqEIWymydOxBJRoEUfPVPWf3daCKUlU9+iUaF0w09Ll9NPZDsdyeZBHLS+d1KBGj0cWvAhwelx0H+/hA0A= X-Received: by 2002:a05:6214:108a:: with SMTP id o10mr13137020qvr.246.1581962375036; Mon, 17 Feb 2020 09:59:35 -0800 (PST) MIME-Version: 1.0 References: <20200210170418.32076-1-zimon.toutoune@gmail.com> <87pnehk1de.fsf@gnu.org> <8736bdjwqx.fsf@inria.fr> In-Reply-To: <8736bdjwqx.fsf@inria.fr> From: zimoun Date: Mon, 17 Feb 2020 18:59:24 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, On Fri, 14 Feb 2020 at 11:20, Ludovic Court=C3=A8s wrote: > zimoun skribis: > >> Could you, in a first patch, move =E2=80=98origin->json=E2=80=99 out o= f > >> =E2=80=98packages-json-builder=E2=80=99, and in a second patch, add mi= rror-expansion > >> feature? > > > > Yes, I will try but I am a bit lost. There is: > > - packages-json-builder that I did not modified > > - sources-json-builder which the "adaptation" of the former to output > > to the sources.json format. > > > > Well, do you want a refactor of 'origin->json' shared by the 2 > > "{sources,packages}-json-builder"? > > Yes, exactly. No reason to have two copies of that code. The minor "issue" is the 'match' piece of 'origin->json': --8<---------------cut here---------------start------------->8--- `(("url" . ,(match uri ((? string? url) (vector url)) ((urls ...) (list->vector urls)))))) --8<---------------cut here---------------end--------------->8--- Because in the 'sources.json' it is always one unique string. However, in 'packages.json' it is always a vector of one or several elements. And in the previous patch, the job of 'resolve' was to uniquify these elements for 'sources.json'. For example, see the package 'adns' in 'packages.json' --8<---------------cut here---------------start------------->8--- { "name": "adns", "version": "1.5.1", "source": { "type": "url", "url": [ "mirror://gnu/adns/adns-1.5.1.tar.gz", "http://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-1.5.1.tar.gz" ] }, "synopsis": "Asynchronous DNS client library and utilities", "homepage": "https://www.gnu.org/software/adns/", "location": "gnu/packages/adns.scm:32" }, --8<---------------cut here---------------end--------------->8--- Just to be on the same wavelength, does 'packages.json' stay as it is (vector for the source url field)? Or is 'packages.json' modified to record only one url for the source url field with mirror:// expanded? Cheers, simon From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH] website: Provide JSON sources list used by Software Heritage. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Feb 2020 08:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158201429825320 (code B ref 39547); Tue, 18 Feb 2020 08:25:01 +0000 Received: (at 39547) by debbugs.gnu.org; 18 Feb 2020 08:24:58 +0000 Received: from localhost ([127.0.0.1]:39520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3yBd-0006aK-Tx for submit@debbugs.gnu.org; Tue, 18 Feb 2020 03:24:58 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:5243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3yBc-0006Zu-DG for 39547@debbugs.gnu.org; Tue, 18 Feb 2020 03:24:57 -0500 X-IronPort-AV: E=Sophos;i="5.70,455,1574118000"; d="scan'208";a="339544837" Received: from unknown (HELO ribbon) ([193.50.110.249]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES256-GCM-SHA384; 18 Feb 2020 09:24:49 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200210170418.32076-1-zimon.toutoune@gmail.com> <87pnehk1de.fsf@gnu.org> <8736bdjwqx.fsf@inria.fr> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 =?UTF-8?Q?Pluvi=C3=B4se?= an 228 de la =?UTF-8?Q?R=C3=A9volution?= 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, 18 Feb 2020 09:24:49 +0100 In-Reply-To: (zimoun's message of "Mon, 17 Feb 2020 18:59:24 +0100") Message-ID: <87v9o4nvzi.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi! zimoun skribis: > On Fri, 14 Feb 2020 at 11:20, Ludovic Court=C3=A8s wrote: >> zimoun skribis: > >> >> Could you, in a first patch, move =E2=80=98origin->json=E2=80=99 out = of >> >> =E2=80=98packages-json-builder=E2=80=99, and in a second patch, add m= irror-expansion >> >> feature? >> > >> > Yes, I will try but I am a bit lost. There is: >> > - packages-json-builder that I did not modified >> > - sources-json-builder which the "adaptation" of the former to output >> > to the sources.json format. >> > >> > Well, do you want a refactor of 'origin->json' shared by the 2 >> > "{sources,packages}-json-builder"? >> >> Yes, exactly. No reason to have two copies of that code. > > The minor "issue" is the 'match' piece of 'origin->json': > > `(("url" . ,(match uri > ((? string? url) (vector url)) > ((urls ...) (list->vector urls)))))) > > > Because in the 'sources.json' it is always one unique string. > However, in 'packages.json' it is always a vector of one or several > elements. And in the previous patch, the job of 'resolve' was to > uniquify these elements for 'sources.json'. Ah, good point. What about adding a keyword parameter to =E2=80=98origin->= json=E2=80=99 that would tell whether to return a single URL or a list thereof? > For example, see the package 'adns' in 'packages.json' > > { > "name": "adns", > "version": "1.5.1", > "source": { > "type": "url", > "url": [ > "mirror://gnu/adns/adns-1.5.1.tar.gz", > "http://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-1.5.1.tar.g= z" > ] > }, > "synopsis": "Asynchronous DNS client library and utilities", > "homepage": "https://www.gnu.org/software/adns/", > "location": "gnu/packages/adns.scm:32" > }, > > > > Just to be on the same wavelength, does 'packages.json' stay as it is > (vector for the source url field)? I think =E2=80=98packages.json=E2=80=99 should still return a list of URLs. I=E2=80=99ve also added a comment asking whether =E2=80=98sources.json=E2= =80=99 could be changed to contain a list of URLs: https://forge.softwareheritage.org/D2025#64037 > Or is 'packages.json' modified to record only one url for the source > url field with mirror:// expanded? Yeah, I think we can expand mirror URLs. Thanks, Ludo=E2=80=99. From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH] website: Provide JSON sources list used by Software Heritage. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Feb 2020 08:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158201515826705 (code B ref 39547); Tue, 18 Feb 2020 08:40:01 +0000 Received: (at 39547) by debbugs.gnu.org; 18 Feb 2020 08:39:18 +0000 Received: from localhost ([127.0.0.1]:39529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3yPW-0006wf-Fd for submit@debbugs.gnu.org; Tue, 18 Feb 2020 03:39:18 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:34753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3yPU-0006wT-Th for 39547@debbugs.gnu.org; Tue, 18 Feb 2020 03:39:17 -0500 Received: by mail-qk1-f195.google.com with SMTP id c20so18768173qkm.1 for <39547@debbugs.gnu.org>; Tue, 18 Feb 2020 00:39:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=4VIuATUwHGu8UbM0QqNDmEUHyPQ5iw2I+87uDsY3X6Y=; b=nrZhXGW+gRiuCVDzxoBiaKdmyIfoPOF9Yod4gC1YcDCM3vz104BfXYVioKJwsiaERB 7C/GoP5vhzlzq6gLm94PE0R7fNlgEXSmdJG2KApcCTvyidWWFnVXQL87T8MXGFB5o/OS GUObyg0OYNsqZxsz2UuqCf4FcSbOTERSCU9lKa4dUK9pXAfxwtpMmS42ev3wRbs8vdWo FetL8jjpUjHEK+bNNUXjfz0eQQSEgrE9gCroxcrFHz5NjfTwzsAxY5kLNnVgWNccyCNk u5zTbpSGhlE+pYCCgJoB5oBDhl4/YfeB77IMIEBu9q/PhmvU7dyW4c7A9RqcuB7qdm4h cpMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=4VIuATUwHGu8UbM0QqNDmEUHyPQ5iw2I+87uDsY3X6Y=; b=ebs6oUcM2/QlwAqkkZ/MUX3OQ72loO9dmsiXsgQbbXqc4zC4QOThpJYNIkcQdmFm/E /cngUnZMpyukg1+Z+G79YfKmwjhUyXDMBfq52lbz1t9wlwQ0WMC1nqOjdHPLkI61dX6Q WE60Ey2qq5uKySdGdEy9h4YmwjT31mh6nM5EUFoSk9X+8fLEhX1pQINJPJkjlrWpDQAM YpE45DYVHnCm2L8vOjRq/J8uyQQSPtHPBDcNGhNMsoqcXIBlu6CnxD+OOxGhTZcsUZaQ UB2nuUAXi32++Nylyf6WshVfecHFHXypvJxAYmZdHz1yXiK0otrGYQLCAunxGUKXK6Vv Pvzg== X-Gm-Message-State: APjAAAVIt2qcdSar9OgMkSljtnAkuMecTJ9RiICqvp6FlcyfBIxl/X/x sMWUyPuhaPZLlYoiH3ncTeFxc26SJibaUTpQWJ0= X-Google-Smtp-Source: APXvYqyk7A3EWApVDYMP5Qftyqx178u504Ruj5kxu9rcWDsCPB9ohT/dmb77m3oorf58c7jb7jp74aiQyUkNf6lcFJ8= X-Received: by 2002:a37:414:: with SMTP id 20mr13163959qke.304.1582015151286; Tue, 18 Feb 2020 00:39:11 -0800 (PST) MIME-Version: 1.0 References: <20200210170418.32076-1-zimon.toutoune@gmail.com> <87pnehk1de.fsf@gnu.org> <8736bdjwqx.fsf@inria.fr> <87v9o4nvzi.fsf@inria.fr> In-Reply-To: <87v9o4nvzi.fsf@inria.fr> From: zimoun Date: Tue, 18 Feb 2020 09:38:58 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, On Tue, 18 Feb 2020 at 09:24, Ludovic Court=C3=A8s wrote: > zimoun skribis: > > On Fri, 14 Feb 2020 at 11:20, Ludovic Court=C3=A8s wrote: > >> zimoun skribis: > >> >> Could you, in a first patch, move =E2=80=98origin->json=E2=80=99 ou= t of > >> >> =E2=80=98packages-json-builder=E2=80=99, and in a second patch, add= mirror-expansion > >> >> feature? > >> > > >> > Yes, I will try but I am a bit lost. There is: > >> > - packages-json-builder that I did not modified > >> > - sources-json-builder which the "adaptation" of the former to outp= ut > >> > to the sources.json format. > >> > > >> > Well, do you want a refactor of 'origin->json' shared by the 2 > >> > "{sources,packages}-json-builder"? > >> > >> Yes, exactly. No reason to have two copies of that code. > > > > The minor "issue" is the 'match' piece of 'origin->json': > > > > `(("url" . ,(match uri > > ((? string? url) (vector url)) > > ((urls ...) (list->vector urls)))))) > > > > > > Because in the 'sources.json' it is always one unique string. > > However, in 'packages.json' it is always a vector of one or several > > elements. And in the previous patch, the job of 'resolve' was to > > uniquify these elements for 'sources.json'. > > Ah, good point. What about adding a keyword parameter to =E2=80=98origin= ->json=E2=80=99 > that would tell whether to return a single URL or a list thereof? Sharing the same code. - packages.json: as it is now. - sources.json: expand mirror and resolve to display only URL. I am going for that. > > Just to be on the same wavelength, does 'packages.json' stay as it is > > (vector for the source url field)? > > I think =E2=80=98packages.json=E2=80=99 should still return a list of URL= s. Ok. > I=E2=80=99ve also added a comment asking whether =E2=80=98sources.json=E2= =80=99 could be changed > to contain a list of URLs: > > https://forge.softwareheritage.org/D2025#64037 I have seen. :-) Even, all the mirrors list should be expanded, not only the first one. > > Or is 'packages.json' modified to record only one url for the source > > url field with mirror:// expanded? > > Yeah, I think we can expand mirror URLs. So, 'mirror://' will become a list (from '%mirrors') of URLs, right? Cheers, simon From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH] website: Provide JSON sources list used by Software Heritage. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Feb 2020 08:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158201539227601 (code B ref 39547); Tue, 18 Feb 2020 08:44:02 +0000 Received: (at 39547) by debbugs.gnu.org; 18 Feb 2020 08:43:12 +0000 Received: from localhost ([127.0.0.1]:39534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3yTI-0007B7-0r for submit@debbugs.gnu.org; Tue, 18 Feb 2020 03:43:12 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:12929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3yTF-0007Ao-JV for 39547@debbugs.gnu.org; Tue, 18 Feb 2020 03:43:10 -0500 X-IronPort-AV: E=Sophos;i="5.70,455,1574118000"; d="scan'208";a="436469315" Received: from nat-eduroam-36-gw-01-bso.bordeaux.inria.fr (HELO ribbon) ([194.199.1.36]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES256-GCM-SHA384; 18 Feb 2020 09:43:02 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200210170418.32076-1-zimon.toutoune@gmail.com> <87pnehk1de.fsf@gnu.org> <8736bdjwqx.fsf@inria.fr> <87v9o4nvzi.fsf@inria.fr> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 =?UTF-8?Q?Pluvi=C3=B4se?= an 228 de la =?UTF-8?Q?R=C3=A9volution?= 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, 18 Feb 2020 09:43:01 +0100 In-Reply-To: (zimoun's message of "Tue, 18 Feb 2020 09:38:58 +0100") Message-ID: <87h7zonv56.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi, zimoun skribis: > On Tue, 18 Feb 2020 at 09:24, Ludovic Court=C3=A8s wrote: [...] >> > Or is 'packages.json' modified to record only one url for the source >> > url field with mirror:// expanded? >> >> Yeah, I think we can expand mirror URLs. > > So, 'mirror://' will become a list (from '%mirrors') of URLs, right? Yup! Thanks, Ludo=E2=80=99. From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH v2 1/2] website: Refactor and resolve mirror:// of JSON package list. References: <20200210170418.32076-1-zimon.toutoune@gmail.com> In-Reply-To: <20200210170418.32076-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Feb 2020 12:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39547@debbugs.gnu.org Cc: zimoun Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158202918324825 (code B ref 39547); Tue, 18 Feb 2020 12:34:02 +0000 Received: (at 39547) by debbugs.gnu.org; 18 Feb 2020 12:33:03 +0000 Received: from localhost ([127.0.0.1]:39619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j423i-0006SL-Jk for submit@debbugs.gnu.org; Tue, 18 Feb 2020 07:33:02 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:38608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j423g-0006Rp-Hy for 39547@debbugs.gnu.org; Tue, 18 Feb 2020 07:33:00 -0500 Received: by mail-wr1-f53.google.com with SMTP id e8so1219492wrm.5 for <39547@debbugs.gnu.org>; Tue, 18 Feb 2020 04:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7JTnTCTPn054MdGgkuwiw6bQAkCKfGWZfS315KivH6Q=; b=MlPESGYUf9GxMquSEaMdVBc4LPjgfgTQknaOWCd6WoKmVBAkGJ8uE6cosRdbhQSfxL UEFm/Tropy8mv+kDrDnpRtMPXgP+DD57DLhRyicZ7uptk4H1JgSA0NmS6slRTurqyP7e YXSWbjsXM8wKVXYf9IRZ/B4+TmPN912+rRqSer/KUc1I9b2/ktowexyhMOlZdDqAZf7g pzie7elxN8X9y+4AQzllq91tFMxPu3uLEsnwAZFw3ArgCRAMiGcg0zn198G/Xg/dO477 VrfY5JYzGI8tUZ2NyKd71nKjphAni1JGRjqQd87JvSl4P5bqX0u0R5sMCVzmsJqqXaQ8 KFWg== 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:date:message-id:mime-version :content-transfer-encoding; bh=7JTnTCTPn054MdGgkuwiw6bQAkCKfGWZfS315KivH6Q=; b=Qyn3O/pMKrxvcVydBCNffc+K6/GWNZoZgq0HmyAY8TCdvVwzKxfA7kqqTEG4ZC+rXX UF7zU9SHX5JapDkhqZ1ZjErNTmcLJXEhASIRROaOWP3hD0POrvblRtTcKQ6kVBJy5XRW JRVEii0sNwrUiJFThKNYkgtkVBy8xyjzGsAxjQwFToNpNDRBKdJpqpP6aX6VHf7Xtj9j bMdnSNOnF4qnY82i8oRHOLoROIYOKkJmWc/5XEMixb4NXxMuNHm4tWANeVAYBOrbisbg C3yme9dDRx490tZRiLF47J0e9Ym+JwFOGtkbgHy/5OjAMvyHaEurDBUr0iRCB4ClpGos 0tcg== X-Gm-Message-State: APjAAAWHW25IQAXj3fIRsOMJV7btGQ+A7Lm+ZCwKYiEVgU7dT2uCYm5X baNcGTewz5kvkEA4K5YxWXRxxuM5 X-Google-Smtp-Source: APXvYqwoAFt/v8xHxScYKAFFQAyMwwa51YTJXoxkx0jjZ38Wfr4Civk4cFbGfpJNdmMUCcqGUDOLPA== X-Received: by 2002:adf:ea42:: with SMTP id j2mr991717wrn.139.1582029174682; Tue, 18 Feb 2020 04:32:54 -0800 (PST) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id b21sm3281258wmd.37.2020.02.18.04.32.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 04:32:54 -0800 (PST) From: zimoun Date: Tue, 18 Feb 2020 13:32:45 +0100 Message-Id: <20200218123246.32473-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * website/apps/packages/builder.scm (origin->json): New procedure. --- website/apps/packages/builder.scm | 34 ++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm index 9dc44c9..d3a777e 100644 --- a/website/apps/packages/builder.scm +++ b/website/apps/packages/builder.scm @@ -2,6 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.53 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.53 listed in wl.mailspike.net] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) * website/apps/packages/builder.scm (origin->json): New procedure. --- website/apps/packages/builder.scm | 34 ++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm index 9dc44c9..d3a777e 100644 --- a/website/apps/packages/builder.scm +++ b/website/apps/packages/builder.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2019 Nicolò Balzarotti +;;; Copyright © 2020 Simon Tournier ;;; ;;; Initially written by sirgazil ;;; who waives all copyright interest on this file. @@ -37,13 +38,16 @@ #:use-module (haunt page) #:use-module (haunt utils) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix svn-download) #:use-module (guix utils) ;location + #:use-module ((guix build download) #:select (maybe-expand-mirrors)) #:use-module (json) #:use-module (ice-9 match) + #:use-module ((web uri) #:select (string->uri uri->string)) #:export (builder)) @@ -84,33 +88,43 @@ ;; Maximum number of packages shown on /packages. 30) -(define (packages-json-builder) - "Return a JSON page listing all packages." - (define (origin->json origin) +(define (origin->json origin) (define method (origin-method origin)) + (define uri ;represented as string + (origin-uri origin)) + + (define (resolve urls) + (map uri->string + (append-map (cut maybe-expand-mirrors <> %mirrors) + (map string->uri urls)))) + `((type . ,(cond ((eq? url-fetch method) 'url) ((eq? git-fetch method) 'git) ((eq? svn-fetch method) 'svn) (else #nil))) ,@(cond ((eq? url-fetch method) - `(("url" . ,(match (origin-uri origin) - ((? string? url) (vector url)) - ((urls ...) (list->vector urls)))))) + `(("url" . ,(list->vector + (resolve + (match uri + ((? string? url) (list url)) + ((urls ...) urls))))))) ((eq? git-fetch method) - `(("git_url" . ,(git-reference-url (origin-uri origin))))) + `(("git_url" . ,(git-reference-url uri)))) ((eq? svn-fetch method) - `(("svn_url" . ,(svn-reference-url (origin-uri origin))))) + `(("svn_url" . ,(svn-reference-url uri)))) (else '())) ,@(if (eq? method git-fetch) - `(("git_ref" . ,(git-reference-commit (origin-uri origin)))) + `(("git_ref" . ,(git-reference-commit uri))) '()) ,@(if (eq? method svn-fetch) `(("svn_revision" . ,(svn-reference-revision - (origin-uri origin)))) + uri))) '()))) +(define (packages-json-builder) + "Return a JSON page listing all packages." (define (package->json package) (define cpe-name (assoc-ref (package-properties package) 'cpe-name)) -- 2.25.0 From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH v2 2/2] website: Provide JSON sources list used by Software Heritage. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Feb 2020 12:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39547@debbugs.gnu.org Cc: zimoun Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158202918924844 (code B ref 39547); Tue, 18 Feb 2020 12:34:02 +0000 Received: (at 39547) by debbugs.gnu.org; 18 Feb 2020 12:33:09 +0000 Received: from localhost ([127.0.0.1]:39622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j423o-0006Sd-WD for submit@debbugs.gnu.org; Tue, 18 Feb 2020 07:33:09 -0500 Received: from mail-wr1-f54.google.com ([209.85.221.54]:45938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j423m-0006S2-U5 for 39547@debbugs.gnu.org; Tue, 18 Feb 2020 07:33:07 -0500 Received: by mail-wr1-f54.google.com with SMTP id g3so23678964wrs.12 for <39547@debbugs.gnu.org>; Tue, 18 Feb 2020 04:33:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2zgWveQl2Gffl3h7QHE+zVyAFsJc309pFQQOjmOQdZo=; b=sPe9dWajkDVeE6kJmFhCJ+CyyNlMchO8En4/4BWiWZAV4Q9Mhn8M5xcvioo+KzrUve 2Cj1c/IR2tOifKwSlb2SN2lNf42jdhlEHxHkv76DQesFiRYow3sNApvZ/lZG5bwQSMuQ lhmVq8uaAj08teAeMl5KRUY5YvZsegp0H3XlLWMfoku61+QS189X1cSv9ej7YXIIxEZr hM6YrWmO9oH1tHZpRtV5TS5XlD77nOgPA5jywQt0k/Fm0pwDE1Ryfot+PI+4IRq7m2gG XQ0bUYYwZeFFtuHLrlUUfq+mleyXDmSgIiP/AgJw+v3GC3c7FYAb2ouJyZD26XVF7aLJ idoQ== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2zgWveQl2Gffl3h7QHE+zVyAFsJc309pFQQOjmOQdZo=; b=hvG6zadhtpycGJGp3kWQ3K/F9pic2uh6TKhSDs2WtiX5TtbmO3jrOCOoxQSPkpB2xR L8qUhN4eXAhWMAvAnuqy9FvjVbz9vjdVFRMP2dpaWrzY5jz4dZMXiYuuekFpFZpjj6ib obXWNWn+6DmYfB9h4fXCNgoGqUgguKyHjOA4vnWF3jS0IMQPgSFqR+rkA/wHgO4+QIre GPCFi2uFWIszpbf/KzerDTWa2Ui/wqn+MlG9UFDhuc5oq9qd9FoXezllu6JnXn57/eNm 9Lq+b6vO4Xf740ykkLbcHeplgTLEX5aRiN9YbWHQout4gHwPsGv1Td9C4qEu8rokLpC2 kqLw== X-Gm-Message-State: APjAAAWN/xCj09GC7/4nTA2eHw8zj5iODdM9GuHta9K16/ePRquEP3Eb rLlLmuxf53IB/2VHMGVcSxjlADb+ X-Google-Smtp-Source: APXvYqzhVafkKIlY7BwXpV6ncY8ulgwemsrqfqgd8H0wRgu7jhiyQQ1gspGJsjEzH26beppEuhSBuQ== X-Received: by 2002:adf:db48:: with SMTP id f8mr27267999wrj.146.1582029181140; Tue, 18 Feb 2020 04:33:01 -0800 (PST) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id b21sm3281258wmd.37.2020.02.18.04.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 04:33:00 -0800 (PST) From: zimoun Date: Tue, 18 Feb 2020 13:32:46 +0100 Message-Id: <20200218123246.32473-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200218123246.32473-1-zimon.toutoune@gmail.com> References: <20200218123246.32473-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Format discussed here . * website/apps/packages/builder.scm (origin->json): Add list modifier. * website/apps/packages/builder.scm (sources-json-builder): New procedure. --- website/apps/packages/builder.scm | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm index d3a777e..49721f6 100644 --- a/website/apps/packages/builder.scm +++ b/website/apps/packages/builder.scm @@ -74,6 +74,7 @@ (flatten (list (index-builder) + (sources-json-builder) (packages-json-builder) (packages-builder) (package-list-builder)))) @@ -88,7 +89,7 @@ ;; Maximum number of packages shown on /packages. 30) -(define (origin->json origin) +(define (origin->json origin transformer) (define method (origin-method origin)) @@ -105,7 +106,7 @@ ((eq? svn-fetch method) 'svn) (else #nil))) ,@(cond ((eq? url-fetch method) - `(("url" . ,(list->vector + `(("url" . ,(transformer (resolve (match uri ((? string? url) (list url)) @@ -136,7 +137,7 @@ ,@(if cpe-name `(("cpe_name" . ,cpe-name)) '()) ,@(if cpe-version `(("cpe_version" . ,cpe-version)) '()) ,@(if (origin? (package-source package)) - `(("source" . ,(origin->json (package-source package)))) + `(("source" . ,(origin->json (package-source package) list->vector))) '()) ("synopsis" . ,(package-synopsis package)) ,@(if (package-home-page package) @@ -155,6 +156,21 @@ (list->vector (map package->json (all-packages))) scm->json)) +(define (sources-json-builder) + "Return a JSON page listing all the sources. + +See ." + (define (package->json package) + `(,@(if (origin? (package-source package)) + (origin->json (package-source package) car) + `(("type" . "no-origin") + ("name" . ,(package-name package)))))) + + (make-page "sources.json" + `(("sources" . ,(list->vector (map package->json (all-packages)))) + ("version" . "1")) + scm->json)) + (define (index-builder) "Return a Haunt page listing some random packages." (define (sample n from) -- 2.25.0 From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH v3] sources.json: array instead of list References: <20200210170418.32076-1-zimon.toutoune@gmail.com> In-Reply-To: <20200210170418.32076-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Mar 2020 17:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39547@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158316990911386 (code B ref 39547); Mon, 02 Mar 2020 17:26:01 +0000 Received: (at 39547) by debbugs.gnu.org; 2 Mar 2020 17:25:09 +0000 Received: from localhost ([127.0.0.1]:38306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8ooX-0002xX-6T for submit@debbugs.gnu.org; Mon, 02 Mar 2020 12:25:09 -0500 Received: from mail-qv1-f53.google.com ([209.85.219.53]:41296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8ooU-0002x6-Uh for 39547@debbugs.gnu.org; Mon, 02 Mar 2020 12:25:07 -0500 Received: by mail-qv1-f53.google.com with SMTP id s15so235840qvn.8 for <39547@debbugs.gnu.org>; Mon, 02 Mar 2020 09:25:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=vjotUINPGXhnGECTRjk7Hf8+cB4fw/hWZ3EI88LZjBI=; b=gzR9pyc15BSFXDEeG29gk8PAvPhjv8zTXDmeKVDhEc4yHVe4Yb4pxV/qGa1jACOm9+ HeCadT2qBd8o+YpJgB7OiES74aX38ir0eOzCIn0F0euz8ooKmtgx7+sc0WauJo8P3RRm q945NzO39crJ8tXjtOvpgt2FzOr+w8VTKiHejqB5HpJu3AR+uC/s5K7AKSWZKu7yzG/j 01KhPnjRlxPv31m9GiJrAHv5tJxqjGMjzwcaxvd3TJc38kL46h6B2vwWp/pVBZHMrzbz rVvxc/NDzKoDews+cFQz+tzXvpF2HatsqlgX4Tdi7abdvcIxiz9G3ZpXNIcEjfyiQW1D WJ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vjotUINPGXhnGECTRjk7Hf8+cB4fw/hWZ3EI88LZjBI=; b=RmCZkGV7rFe67I4UTqjAytB1+DSsiDkoJKNQwUjQBxSoPc2ArX6UQhP4Ck1I88hAVd RaBkNUeQg/Uo/cIq9ZcUkj7GAfpz5YBDzaauio4cF5NnGSk7kPmb/IKiB856I+oSpeQU xa88Uz/YXXbiX7JPXRBVgCs2e2OtqLG9OamyNYci5HDa9MvjqFQVZedpf8a9x6jZzU0I Cd3WwozG384Chbq0q6eS3oOQ4/VSIoN3+a+P0bWJCeJg5sDNAJkdWFOvywbFOvbaTDFf Q+1i+KTdqUSGdSJxdQ99kVR6izGRFyR0Tt03iIH387cWTskVj/nmLk6htevV3mHaDsUM DW/w== X-Gm-Message-State: ANhLgQ3klSYbnduutjURhdKuf8zCOPdZQ1JBjtNfyXHnXzz5xadc1/Gu 63x3Vb9j6X//DFSOTRIgnJfoyliIhFL4oeo/G9iREQ== X-Google-Smtp-Source: ADFU+vuOej6fAMAXYXTrPv3H5xG92d00dds9Zvg0G2fcjn8haBUPuiWc5WPKoqZiJqLSeLjbUk+y7O3wm9v5ymEj1js= X-Received: by 2002:ad4:4674:: with SMTP id z20mr475482qvv.6.1583169901205; Mon, 02 Mar 2020 09:25:01 -0800 (PST) MIME-Version: 1.0 From: zimoun Date: Mon, 2 Mar 2020 18:24:49 +0100 Message-ID: Content-Type: multipart/mixed; boundary="0000000000009501fb059fe27718" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --0000000000009501fb059fe27718 Content-Type: text/plain; charset="UTF-8" Hi Ludo, Attached, the tiny modification to output the list (array) of URLs instead of the first one. The version number is still '1' because I do not know yet if lewo would bump it. Note also that "transformer" is not useful any more because 'packages-json-builder' and 'sources-json-builder' returns both vectors now. Cheers, simon --0000000000009501fb059fe27718 Content-Type: text/x-patch; charset="UTF-8"; name="v3-0001-website-Refactor-and-resolve-mirror-of-JSON-packa.patch" Content-Disposition: attachment; filename="v3-0001-website-Refactor-and-resolve-mirror-of-JSON-packa.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k7aqbgsw1 RnJvbSA1N2E0NDRmNmYyMTVmYjYzMjc3MTkxNjFhNmU2YWQ0YWQyMjkyNzNmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiB6aW1vdW4gPHppbW9uLnRvdXRvdW5lQGdtYWlsLmNvbT4KRGF0 ZTogTW9uLCAxMCBGZWIgMjAyMCAxNzo1MjoxMyArMDEwMApTdWJqZWN0OiBbUEFUQ0ggdjMgMS8y XSB3ZWJzaXRlOiBSZWZhY3RvciBhbmQgcmVzb2x2ZSBtaXJyb3I6Ly8gb2YgSlNPTgogcGFja2Fn ZSBsaXN0LgoKKiB3ZWJzaXRlL2FwcHMvcGFja2FnZXMvYnVpbGRlci5zY20gKG9yaWdpbi0+anNv bik6IE5ldyBwcm9jZWR1cmUuCi0tLQogd2Vic2l0ZS9hcHBzL3BhY2thZ2VzL2J1aWxkZXIuc2Nt IHwgMzQgKysrKysrKysrKysrKysrKysrKysrKy0tLS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDI0 IGluc2VydGlvbnMoKyksIDEwIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL3dlYnNpdGUvYXBw cy9wYWNrYWdlcy9idWlsZGVyLnNjbSBiL3dlYnNpdGUvYXBwcy9wYWNrYWdlcy9idWlsZGVyLnNj bQppbmRleCA5ZGM0NGM5Li5kM2E3NzdlIDEwMDY0NAotLS0gYS93ZWJzaXRlL2FwcHMvcGFja2Fn ZXMvYnVpbGRlci5zY20KKysrIGIvd2Vic2l0ZS9hcHBzL3BhY2thZ2VzL2J1aWxkZXIuc2NtCkBA IC0yLDYgKzIsNyBAQAogOzs7IENvcHlyaWdodCDCqSAyMDE3IEx1ZG92aWMgQ291cnTDqHMgPGx1 ZG9AZ251Lm9yZz4KIDs7OyBDb3B5cmlnaHQgwqkgMjAxOSBSaWNhcmRvIFd1cm11cyA8cmVrYWRv QGVsZXBobHkubmV0PgogOzs7IENvcHlyaWdodCDCqSAyMDE5IE5pY29sw7IgQmFsemFyb3R0aSA8 bmljb2xvQG5peG8ueHl6PgorOzs7IENvcHlyaWdodCDCqSAyMDIwIFNpbW9uIFRvdXJuaWVyIDx6 aW1vbi50b3V0b3VuZUBnbWFpbC5jb20+CiA7OzsKIDs7OyBJbml0aWFsbHkgd3JpdHRlbiBieSBz aXJnYXppbAogOzs7IHdobyB3YWl2ZXMgYWxsIGNvcHlyaWdodCBpbnRlcmVzdCBvbiB0aGlzIGZp bGUuCkBAIC0zNywxMyArMzgsMTYgQEAKICAgIzp1c2UtbW9kdWxlIChoYXVudCBwYWdlKQogICAj OnVzZS1tb2R1bGUgKGhhdW50IHV0aWxzKQogICAjOnVzZS1tb2R1bGUgKHNyZmkgc3JmaS0xKQor ICAjOnVzZS1tb2R1bGUgKHNyZmkgc3JmaS0yNikKICAgIzp1c2UtbW9kdWxlIChndWl4IHBhY2th Z2VzKQogICAjOnVzZS1tb2R1bGUgKGd1aXggZG93bmxvYWQpCiAgICM6dXNlLW1vZHVsZSAoZ3Vp eCBnaXQtZG93bmxvYWQpCiAgICM6dXNlLW1vZHVsZSAoZ3VpeCBzdm4tZG93bmxvYWQpCiAgICM6 dXNlLW1vZHVsZSAoZ3VpeCB1dGlscykgICAgICAgICAgICAgICAgICAgICAgIDtsb2NhdGlvbgor ICAjOnVzZS1tb2R1bGUgKChndWl4IGJ1aWxkIGRvd25sb2FkKSAjOnNlbGVjdCAobWF5YmUtZXhw YW5kLW1pcnJvcnMpKQogICAjOnVzZS1tb2R1bGUgKGpzb24pCiAgICM6dXNlLW1vZHVsZSAoaWNl LTkgbWF0Y2gpCisgICM6dXNlLW1vZHVsZSAoKHdlYiB1cmkpICM6c2VsZWN0IChzdHJpbmctPnVy aSB1cmktPnN0cmluZykpCiAgICM6ZXhwb3J0IChidWlsZGVyKSkKIAogCkBAIC04NCwzMyArODgs NDMgQEAKICAgOzsgTWF4aW11bSBudW1iZXIgb2YgcGFja2FnZXMgc2hvd24gb24gL3BhY2thZ2Vz LgogICAzMCkKIAotKGRlZmluZSAocGFja2FnZXMtanNvbi1idWlsZGVyKQotICAiUmV0dXJuIGEg SlNPTiBwYWdlIGxpc3RpbmcgYWxsIHBhY2thZ2VzLiIKLSAgKGRlZmluZSAob3JpZ2luLT5qc29u IG9yaWdpbikKKyhkZWZpbmUgKG9yaWdpbi0+anNvbiBvcmlnaW4pCiAgICAgKGRlZmluZSBtZXRo b2QKICAgICAgIChvcmlnaW4tbWV0aG9kIG9yaWdpbikpCiAKKyAgICAoZGVmaW5lIHVyaSAgICAg ICAgICAgICAgICAgICAgICAgICA7cmVwcmVzZW50ZWQgYXMgc3RyaW5nCisgICAgICAob3JpZ2lu LXVyaSBvcmlnaW4pKQorCisgICAgKGRlZmluZSAocmVzb2x2ZSB1cmxzKQorICAgICAgKG1hcCB1 cmktPnN0cmluZworICAgICAgICAgICAoYXBwZW5kLW1hcCAoY3V0IG1heWJlLWV4cGFuZC1taXJy b3JzIDw+ICVtaXJyb3JzKQorICAgICAgICAgICAgICAgICAgICAgICAobWFwIHN0cmluZy0+dXJp IHVybHMpKSkpCisKICAgICBgKCh0eXBlIC4gLChjb25kICgoZXE/IHVybC1mZXRjaCBtZXRob2Qp ICd1cmwpCiAgICAgICAgICAgICAgICAgICAgICAoKGVxPyBnaXQtZmV0Y2ggbWV0aG9kKSAnZ2l0 KQogICAgICAgICAgICAgICAgICAgICAgKChlcT8gc3ZuLWZldGNoIG1ldGhvZCkgJ3N2bikKICAg ICAgICAgICAgICAgICAgICAgIChlbHNlICAgICAgICAgICAgICAgICAgICNuaWwpKSkKICAgICAg ICxAKGNvbmQgKChlcT8gdXJsLWZldGNoIG1ldGhvZCkKLSAgICAgICAgICAgICAgIGAoKCJ1cmwi IC4gLChtYXRjaCAob3JpZ2luLXVyaSBvcmlnaW4pCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICgoPyBzdHJpbmc/IHVybCkgKHZlY3RvciB1cmwpKQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoKHVybHMgLi4uKSAobGlzdC0+dmVjdG9yIHVybHMpKSkpKSkKKyAgICAgICAgICAg ICAgIGAoKCJ1cmwiIC4gLChsaXN0LT52ZWN0b3IKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAocmVzb2x2ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWF0Y2ggdXJpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg/IHN0cmluZz8gdXJsKSAobGlzdCB1cmwpKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgodXJscyAuLi4pIHVybHMpKSkpKSkpCiAg ICAgICAgICAgICAgICgoZXE/IGdpdC1mZXRjaCBtZXRob2QpCi0gICAgICAgICAgICAgICBgKCgi Z2l0X3VybCIgLiAsKGdpdC1yZWZlcmVuY2UtdXJsIChvcmlnaW4tdXJpIG9yaWdpbikpKSkpCisg ICAgICAgICAgICAgICBgKCgiZ2l0X3VybCIgLiAsKGdpdC1yZWZlcmVuY2UtdXJsIHVyaSkpKSkK ICAgICAgICAgICAgICAgKChlcT8gc3ZuLWZldGNoIG1ldGhvZCkKLSAgICAgICAgICAgICAgIGAo KCJzdm5fdXJsIiAuICwoc3ZuLXJlZmVyZW5jZS11cmwgKG9yaWdpbi11cmkgb3JpZ2luKSkpKSkK KyAgICAgICAgICAgICAgIGAoKCJzdm5fdXJsIiAuICwoc3ZuLXJlZmVyZW5jZS11cmwgdXJpKSkp KQogICAgICAgICAgICAgICAoZWxzZSAnKCkpKQogICAgICAgLEAoaWYgKGVxPyBtZXRob2QgZ2l0 LWZldGNoKQotICAgICAgICAgICAgYCgoImdpdF9yZWYiIC4gLChnaXQtcmVmZXJlbmNlLWNvbW1p dCAob3JpZ2luLXVyaSBvcmlnaW4pKSkpCisgICAgICAgICAgICBgKCgiZ2l0X3JlZiIgLiAsKGdp dC1yZWZlcmVuY2UtY29tbWl0IHVyaSkpKQogICAgICAgICAgICAgJygpKQogICAgICAgLEAoaWYg KGVxPyBtZXRob2Qgc3ZuLWZldGNoKQogICAgICAgICAgICAgYCgoInN2bl9yZXZpc2lvbiIgLiAs KHN2bi1yZWZlcmVuY2UtcmV2aXNpb24KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAob3JpZ2luLXVyaSBvcmlnaW4pKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdXJpKSkpCiAgICAgICAgICAgICAnKCkpKSkKIAorKGRlZmluZSAocGFja2FnZXMtanNvbi1i dWlsZGVyKQorICAiUmV0dXJuIGEgSlNPTiBwYWdlIGxpc3RpbmcgYWxsIHBhY2thZ2VzLiIKICAg KGRlZmluZSAocGFja2FnZS0+anNvbiBwYWNrYWdlKQogICAgIChkZWZpbmUgY3BlLW5hbWUKICAg ICAgIChhc3NvYy1yZWYgKHBhY2thZ2UtcHJvcGVydGllcyBwYWNrYWdlKSAnY3BlLW5hbWUpKQot LSAKMi4yNS4wCgo= --0000000000009501fb059fe27718 Content-Type: text/x-patch; charset="US-ASCII"; name="v3-0002-website-Provide-JSON-sources-list-used-by-Softwar.patch" Content-Disposition: attachment; filename="v3-0002-website-Provide-JSON-sources-list-used-by-Softwar.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k7aqbgq80 RnJvbSA3MzU1N2JjMDA3NjBiNDQwNGJmZTE3ZWNiM2FjYTk4M2M2ZGNjMTFlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiB6aW1vdW4gPHppbW9uLnRvdXRvdW5lQGdtYWlsLmNvbT4KRGF0 ZTogVHVlLCAxOCBGZWIgMjAyMCAxMzoyNToxNCArMDEwMApTdWJqZWN0OiBbUEFUQ0ggdjMgMi8y XSB3ZWJzaXRlOiBQcm92aWRlIEpTT04gc291cmNlcyBsaXN0IHVzZWQgYnkgU29mdHdhcmUKIEhl cml0YWdlLgoKRm9ybWF0IGRpc2N1c3NlZCBoZXJlIDxodHRwczovL2ZvcmdlLnNvZnR3YXJlaGVy aXRhZ2Uub3JnL0QyMDI1IzUxMjY5Pi4KCiogd2Vic2l0ZS9hcHBzL3BhY2thZ2VzL2J1aWxkZXIu c2NtIChvcmlnaW4tPmpzb24pOiBBZGQgbGlzdCBtb2RpZmllci4KKiB3ZWJzaXRlL2FwcHMvcGFj a2FnZXMvYnVpbGRlci5zY20gKHNvdXJjZXMtanNvbi1idWlsZGVyKTogTmV3IHByb2NlZHVyZS4K LS0tCiB3ZWJzaXRlL2FwcHMvcGFja2FnZXMvYnVpbGRlci5zY20gfCAyMCArKysrKysrKysrKysr KysrKystLQogMSBmaWxlIGNoYW5nZWQsIDE4IGluc2VydGlvbnMoKyksIDIgZGVsZXRpb25zKC0p CgpkaWZmIC0tZ2l0IGEvd2Vic2l0ZS9hcHBzL3BhY2thZ2VzL2J1aWxkZXIuc2NtIGIvd2Vic2l0 ZS9hcHBzL3BhY2thZ2VzL2J1aWxkZXIuc2NtCmluZGV4IGQzYTc3N2UuLjNmYzEyODUgMTAwNjQ0 Ci0tLSBhL3dlYnNpdGUvYXBwcy9wYWNrYWdlcy9idWlsZGVyLnNjbQorKysgYi93ZWJzaXRlL2Fw cHMvcGFja2FnZXMvYnVpbGRlci5zY20KQEAgLTc0LDYgKzc0LDcgQEAKICAgKGZsYXR0ZW4KICAg IChsaXN0CiAgICAgKGluZGV4LWJ1aWxkZXIpCisgICAgKHNvdXJjZXMtanNvbi1idWlsZGVyKQog ICAgIChwYWNrYWdlcy1qc29uLWJ1aWxkZXIpCiAgICAgKHBhY2thZ2VzLWJ1aWxkZXIpCiAgICAg KHBhY2thZ2UtbGlzdC1idWlsZGVyKSkpKQpAQCAtODgsNyArODksNyBAQAogICA7OyBNYXhpbXVt IG51bWJlciBvZiBwYWNrYWdlcyBzaG93biBvbiAvcGFja2FnZXMuCiAgIDMwKQogCi0oZGVmaW5l IChvcmlnaW4tPmpzb24gb3JpZ2luKQorKGRlZmluZSogKG9yaWdpbi0+anNvbiBvcmlnaW4gIzpv cHRpb25hbCAodHJhbnNmb3JtZXIgbGlzdC0+dmVjdG9yKSkKICAgICAoZGVmaW5lIG1ldGhvZAog ICAgICAgKG9yaWdpbi1tZXRob2Qgb3JpZ2luKSkKIApAQCAtMTA1LDcgKzEwNiw3IEBACiAgICAg ICAgICAgICAgICAgICAgICAoKGVxPyBzdm4tZmV0Y2ggbWV0aG9kKSAnc3ZuKQogICAgICAgICAg ICAgICAgICAgICAgKGVsc2UgICAgICAgICAgICAgICAgICAgI25pbCkpKQogICAgICAgLEAoY29u ZCAoKGVxPyB1cmwtZmV0Y2ggbWV0aG9kKQotICAgICAgICAgICAgICAgYCgoInVybCIgLiAsKGxp c3QtPnZlY3RvcgorICAgICAgICAgICAgICAgYCgoInVybCIgLiAsKHRyYW5zZm9ybWVyCiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKHJlc29sdmUKICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKG1hdGNoIHVyaQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPyBzdHJp bmc/IHVybCkgKGxpc3QgdXJsKSkKQEAgLTE1NSw2ICsxNTYsMjEgQEAKIAkgICAgIChsaXN0LT52 ZWN0b3IgKG1hcCBwYWNrYWdlLT5qc29uIChhbGwtcGFja2FnZXMpKSkKICAgICAgICAgICAgICBz Y20tPmpzb24pKQogCisoZGVmaW5lIChzb3VyY2VzLWpzb24tYnVpbGRlcikKKyAgIlJldHVybiBh IEpTT04gcGFnZSBsaXN0aW5nIGFsbCB0aGUgc291cmNlcy4KKworU2VlIDxodHRwczovL2Zvcmdl LnNvZnR3YXJlaGVyaXRhZ2Uub3JnL0QyMDI1IzUxMjY5Pi4iCisgIChkZWZpbmUgKHBhY2thZ2Ut Pmpzb24gcGFja2FnZSkKKyAgICBgKCxAKGlmIChvcmlnaW4/IChwYWNrYWdlLXNvdXJjZSBwYWNr YWdlKSkKKyAgICAgICAgICAgIChvcmlnaW4tPmpzb24gKHBhY2thZ2Utc291cmNlIHBhY2thZ2Up KQorICAgICAgICAgICAgYCgoInR5cGUiIC4gIm5vLW9yaWdpbiIpCisgICAgICAgICAgICAgICgi bmFtZSIgLiAsKHBhY2thZ2UtbmFtZSBwYWNrYWdlKSkpKSkpCisKKyAgKG1ha2UtcGFnZSAic291 cmNlcy5qc29uIgorICAgICAgICAgICAgIGAoKCJzb3VyY2VzIiAuICwobGlzdC0+dmVjdG9yICht YXAgcGFja2FnZS0+anNvbiAoYWxsLXBhY2thZ2VzKSkpKQorICAgICAgICAgICAgICAgKCJ2ZXJz aW9uIiAuICIxIikpCisgICAgICAgICAgICAgc2NtLT5qc29uKSkKKwogKGRlZmluZSAoaW5kZXgt YnVpbGRlcikKICAgIlJldHVybiBhIEhhdW50IHBhZ2UgbGlzdGluZyBzb21lIHJhbmRvbSBwYWNr YWdlcy4iCiAgIChkZWZpbmUgKHNhbXBsZSBuIGZyb20pCi0tIAoyLjI1LjAKCg== --0000000000009501fb059fe27718-- From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] Addition of %content-addressed-mirrors to sources.json (SWH)? References: <20200210170418.32076-1-zimon.toutoune@gmail.com> In-Reply-To: <20200210170418.32076-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Mar 2020 18:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39547@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158325844212124 (code B ref 39547); Tue, 03 Mar 2020 18:01:01 +0000 Received: (at 39547) by debbugs.gnu.org; 3 Mar 2020 18:00:42 +0000 Received: from localhost ([127.0.0.1]:39932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9BqU-00039T-6N for submit@debbugs.gnu.org; Tue, 03 Mar 2020 13:00:42 -0500 Received: from mail-qk1-f181.google.com ([209.85.222.181]:35404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9BqS-00039H-DW for 39547@debbugs.gnu.org; Tue, 03 Mar 2020 13:00:40 -0500 Received: by mail-qk1-f181.google.com with SMTP id 145so4335419qkl.2 for <39547@debbugs.gnu.org>; Tue, 03 Mar 2020 10:00:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=s5h8nH3jNW4Zy+V0etlVOL4iGIhszEvZ577XBBZUMSk=; b=mkypDsNs9PtcdVDN84+KM0FZCWEsX5V4UmtIRyJR6yvlhNfVlhwwLyfnk5Q00b42gb oTDLF4wYLHVb+7/QBSh0so0EuWh1nt/tH7SVSTiWVtIflH+Gr2cleFZRlF5Y8CmziZWE qT4WFz5fe2sM7cSQICdIjxMmR7h11P7gkvsFE8Hig/GwYgA/lWjv0xF/jxgSC83ZCY2E E7O20q292B7X51utM7iSyNMfZG+bRuPozKC/cH3xNd/PM8CWSVX36GfjRuQbQbvcDaC8 bvfxclccuDkDNdm8FNig3+kIebwRpixook07ApjLKKYggdqia+i4xtj8KQeWmaGwvc80 plMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=s5h8nH3jNW4Zy+V0etlVOL4iGIhszEvZ577XBBZUMSk=; b=tEA2DIUbFN1tSalY3Y2/FLEh3qim9vaAEN2rwLKwK+BFxlqCI+v/IF902pTXRvoIth A/aCD6/vSiFmd9loRO+3XG8B/bXEgn87P6P//3hyTyVYaE5wN8aWq8xEWWO6YjWYoMNZ ve30fozdSoK2fEDWlExFUNtJmzaIWS8Epl2Q2SVAUn23EA1XyeaiWz2RkeGyFAuZRSvP Xtj0l/jIDxlrrrHC4Wgeg8wcHQDAvUA2F2MTZpfej5ItR0fS5dz7AfcyxuTqaT6L0MuU bTYf5MBLRhwWeSR6u4JjqeLEWg9vAhFOXuDPGuicawoHVSPIXSgdKAhAJSSZmvdjAIEy yelQ== X-Gm-Message-State: ANhLgQ2LkEPL4MnTLt+mpCsPt47hggQBWYmoHpDORrs+zREW4yGK2yK3 A374XT743OWizpOUjMsfUAAeue2nep/cGsU8YH9+r8+b X-Google-Smtp-Source: ADFU+vv4Wj7UaWNLV5Dv42+GJM8m5TblUoNj8lha+Nt3CcLVClhL0FcwmX1pq6c5jGRvPj4XzD+MScwGe3b341ldIqw= X-Received: by 2002:a37:a496:: with SMTP id n144mr5217914qke.126.1583258434648; Tue, 03 Mar 2020 10:00:34 -0800 (PST) MIME-Version: 1.0 From: zimoun Date: Tue, 3 Mar 2020 19:00:23 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -1.5 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.5 (--) Hi, Some upstream sources could disappear between the moment when the package enters in Guix and the moment when SWH ingests it. (As an edge case, let consider the recent harfbuzz one.) Now the format 'sources.json' should accept an array. Does it make sense to put in this array the content addressed mirrors (ci.guix.gnu.org and tarball.nixos.org)? What do you think? Cheers, simon From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] Addition of %content-addressed-mirrors to sources.json (SWH)? Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Mar 2020 16:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158342516430246 (code B ref 39547); Thu, 05 Mar 2020 16:20:02 +0000 Received: (at 39547) by debbugs.gnu.org; 5 Mar 2020 16:19:24 +0000 Received: from localhost ([127.0.0.1]:43616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9tDX-0007rm-Nw for submit@debbugs.gnu.org; Thu, 05 Mar 2020 11:19:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9tDW-0007rY-B3 for 39547@debbugs.gnu.org; Thu, 05 Mar 2020 11:19:22 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j9tDR-0006Gv-5t; Thu, 05 Mar 2020 11:19:17 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33838 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j9tDQ-0004Xc-L6; Thu, 05 Mar 2020 11:19:16 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 =?UTF-8?Q?Vent=C3=B4se?= an 228 de la =?UTF-8?Q?R=C3=A9volution?= 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: Thu, 05 Mar 2020 17:19:11 +0100 In-Reply-To: (zimoun's message of "Tue, 3 Mar 2020 19:00:23 +0100") Message-ID: <87k13yai68.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello! zimoun skribis: > Some upstream sources could disappear between the moment when the > package enters in Guix and the moment when SWH ingests it. (As an edge > case, let consider the recent harfbuzz one.) > > Now the format 'sources.json' should accept an array. Does it make > sense to put in this array the content addressed mirrors > (ci.guix.gnu.org and tarball.nixos.org)? Yes, I think =E2=80=98sources.json=E2=80=99 should contain, for each item, = a list of URLs rather than a single URL, and mirror:// URLs should be expanded. However, =E2=80=98sources.json=E2=80=99 is currently specified to contain a= single URL, so we=E2=80=99re stuck with a single URL for now. Is that what you meant? Thanks, Ludo=E2=80=99. From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] Addition of %content-addressed-mirrors to sources.json (SWH)? Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 06 Mar 2020 09:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158348681721470 (code B ref 39547); Fri, 06 Mar 2020 09:27:02 +0000 Received: (at 39547) by debbugs.gnu.org; 6 Mar 2020 09:26:57 +0000 Received: from localhost ([127.0.0.1]:44068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jA9Fw-0005aE-U0 for submit@debbugs.gnu.org; Fri, 06 Mar 2020 04:26:57 -0500 Received: from mail-qv1-f48.google.com ([209.85.219.48]:36980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jA9Fv-0005Zz-90 for 39547@debbugs.gnu.org; Fri, 06 Mar 2020 04:26:55 -0500 Received: by mail-qv1-f48.google.com with SMTP id w16so196486qvn.4 for <39547@debbugs.gnu.org>; Fri, 06 Mar 2020 01:26:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=eKBgUTyYnfHNdrStEK7vQoM29ApvJBw+zaC5qXAaVcY=; b=FOcm56iPz71aFthUtsrtHZEPOaJVGJFe3KwifxdgyAyZBYGMKkC8HSwWG/J4FB5aq0 SpeVYSk/K7/Nt/a0bWlTIZCmQQUKfEExfHfFy5qOfF2boCUhfkwLjEcK+g98q/2pDNU6 liDeFcXisR4Ghk9ThgEw+/bABvHL2iyurfQcycm54yi29bnm5I12DHsfBaV9bA8K471M jH3XAv0zwYfuyS4l+yw/ZMYG4TG1IfYfnGLzdttPByoZ/cl3jd0BR/ohA1gMveRhABeT JxoUtM7SOpr9xTAo6CJGczrylP0NRVyThxFKKGoWngOBOWv8LDYRgLWSb4g8c2hUhdeO VFAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=eKBgUTyYnfHNdrStEK7vQoM29ApvJBw+zaC5qXAaVcY=; b=dO00II7oNBV9BrC5nevfQH+QVbcUg532kUfcLvhVWaH7oNDbwXUpJY7ylIDjl/LOQS UEgmBTR7ga+qIvV/3gsydqanTOS4Cp2ouNIPzqcsi1VVClF8rrUYeXSog9e2t2840WTL yPl8XuhPpGthkp732oTcyG74x7IXTEbCy07O3WwlAaRprxN0k0k3pQEK7B/6kY1okUf2 slRg8FWwjgrEP0Leg5sOg+odNluFDEKg8PYGJliTBWPH9H9NZkbHChAYGamKXoooSTqh pVlhF9fgWiEm+Zfr+N3baDWv2tg1JrO6HzS0NDHF5aHz/Q+WoFZnDVLAb+1mL7XrVD6C 81rA== X-Gm-Message-State: ANhLgQ2KUX0BqCkCAxgGq+OKBFX6aMy5fdUjx33Mi0pFYgJEdQ6t70W1 NFhrZJnjVWIBZ+Yj09a3APnuXxLg5Ser7o9yWl8= X-Google-Smtp-Source: ADFU+vszXUJRUbUFz1/Mkl0a8X6WiPpFtFKzz/DjClO5tjPjqAe+ZdUJHvuDdjUphSGQf+wh7mNxalR8bEHTLJV0dj4= X-Received: by 2002:a0c:f98e:: with SMTP id t14mr2047634qvn.74.1583486809350; Fri, 06 Mar 2020 01:26:49 -0800 (PST) MIME-Version: 1.0 References: <87k13yai68.fsf@gnu.org> In-Reply-To: <87k13yai68.fsf@gnu.org> From: zimoun Date: Fri, 6 Mar 2020 10:26:36 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, On Thu, 5 Mar 2020 at 17:19, Ludovic Court=C3=A8s wrote: > zimoun skribis: > > > Some upstream sources could disappear between the moment when the > > package enters in Guix and the moment when SWH ingests it. (As an edge > > case, let consider the recent harfbuzz one.) > > > > Now the format 'sources.json' should accept an array. Does it make > > sense to put in this array the content addressed mirrors > > (ci.guix.gnu.org and tarball.nixos.org)? > > Yes, I think =E2=80=98sources.json=E2=80=99 should contain, for each item= , a list of > URLs rather than a single URL, and mirror:// URLs should be expanded. Yes, now it is accepted [1] and it becomes the format of the 'sources.json' file. [1] https://forge.softwareheritage.org/D2025#65063 The patch set v2 supports the first discussion of the format (single url); which is not relevant anymore. The patch set attached in v3 [2] supports the array of URLs. [2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39547#35 > However, =E2=80=98sources.json=E2=80=99 is currently specified to contain= a single URL, > so we=E2=80=99re stuck with a single URL for now. > > Is that what you meant? What I mean is: append %content-addressed-mirrors for each package in the list of URLs. Cheers, simon From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] Addition of %content-addressed-mirrors to sources.json (SWH)? Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 06 Mar 2020 10:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158349223130025 (code B ref 39547); Fri, 06 Mar 2020 10:58:02 +0000 Received: (at 39547) by debbugs.gnu.org; 6 Mar 2020 10:57:11 +0000 Received: from localhost ([127.0.0.1]:44151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAAfG-0007oD-Ot for submit@debbugs.gnu.org; Fri, 06 Mar 2020 05:57:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAAfF-0007o0-9t for 39547@debbugs.gnu.org; Fri, 06 Mar 2020 05:57:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jAAfA-0007YG-34; Fri, 06 Mar 2020 05:57:04 -0500 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=59910 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jAAf9-0005Zr-0X; Fri, 06 Mar 2020 05:57:03 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87k13yai68.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 =?UTF-8?Q?Vent=C3=B4se?= an 228 de la =?UTF-8?Q?R=C3=A9volution?= 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: Fri, 06 Mar 2020 11:57:01 +0100 In-Reply-To: (zimoun's message of "Fri, 6 Mar 2020 10:26:36 +0100") Message-ID: <87sgiloio2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Simon! zimoun skribis: > On Thu, 5 Mar 2020 at 17:19, Ludovic Court=C3=A8s wrote: [...] >> Yes, I think =E2=80=98sources.json=E2=80=99 should contain, for each ite= m, a list of >> URLs rather than a single URL, and mirror:// URLs should be expanded. > > Yes, now it is accepted [1] and it becomes the format of the > 'sources.json' file. > > [1] https://forge.softwareheritage.org/D2025#65063 Excellent! > The patch set v2 supports the first discussion of the format (single > url); which is not relevant anymore. > The patch set attached in v3 [2] supports the array of URLs. > > [2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39547#35 Oh sorry, I hadn=E2=80=99t seen it. >> However, =E2=80=98sources.json=E2=80=99 is currently specified to contai= n a single URL, >> so we=E2=80=99re stuck with a single URL for now. >> >> Is that what you meant? > > What I mean is: append %content-addressed-mirrors for each package in > the list of URLs. Now I understand. :-) So yes, sure, the array of URLs in =E2=80=98sources.json=E2=80=99 could include a ci.guix.gnu.org URL and mayb= e the other ones in there too. For a subsequent patch I guess? Thanks! Ludo=E2=80=99. From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH v3] sources.json: array instead of list Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 06 Mar 2020 11:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 39547@debbugs.gnu.org Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158349250530493 (code B ref 39547); Fri, 06 Mar 2020 11:02:01 +0000 Received: (at 39547) by debbugs.gnu.org; 6 Mar 2020 11:01:45 +0000 Received: from localhost ([127.0.0.1]:44155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAAjh-0007vl-Cn for submit@debbugs.gnu.org; Fri, 06 Mar 2020 06:01:45 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:42726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAAje-0007vV-OE for 39547@debbugs.gnu.org; Fri, 06 Mar 2020 06:01:43 -0500 X-IronPort-AV: E=Sophos;i="5.70,521,1574118000"; d="scan'208";a="439136304" Received: from unknown (HELO ribbon) ([193.50.110.194]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2020 12:01:36 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200210170418.32076-1-zimon.toutoune@gmail.com> Date: Fri, 06 Mar 2020 12:01:36 +0100 In-Reply-To: (zimoun's message of "Mon, 2 Mar 2020 18:24:49 +0100") Message-ID: <87o8t9oigf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi! zimoun skribis: > Attached, the tiny modification to output the list (array) of URLs > instead of the first one. > The version number is still '1' because I do not know yet if lewo would b= ump it. > Note also that "transformer" is not useful any more because > 'packages-json-builder' and 'sources-json-builder' returns both > vectors now. Cool. > From 57a444f6f215fb6327719161a6e6ad4ad229273f Mon Sep 17 00:00:00 2001 > From: zimoun > Date: Mon, 10 Feb 2020 17:52:13 +0100 > Subject: [PATCH v3 1/2] website: Refactor and resolve mirror:// of JSON > package list. > > * website/apps/packages/builder.scm (origin->json): New procedure. LGTM! > From 73557bc00760b4404bfe17ecb3aca983c6dcc11e Mon Sep 17 00:00:00 2001 > From: zimoun > Date: Tue, 18 Feb 2020 13:25:14 +0100 > Subject: [PATCH v3 2/2] website: Provide JSON sources list used by Softwa= re > Heritage. > > Format discussed here . > > * website/apps/packages/builder.scm (origin->json): Add list modifier. > * website/apps/packages/builder.scm (sources-json-builder): New procedure. Nitpick: no need to repeat the file name here. Also: please mention the addition to the =E2=80=98builder=E2=80=99 procedur= e. > +(define* (origin->json origin #:optional (transformer list->vector)) You can remove this parameter, as you wrote. I can make these changes and push it on your behalf if you want, let me know! Thanks, Ludo=E2=80=99. From unknown Fri Sep 12 11:38:03 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39547] [PATCH v3] sources.json: array instead of list Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Mar 2020 22:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39547 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: "39547@debbugs.gnu.org" <39547@debbugs.gnu.org> Received: via spool by 39547-submit@debbugs.gnu.org id=B39547.158361947718324 (code B ref 39547); Sat, 07 Mar 2020 22:18:02 +0000 Received: (at 39547) by debbugs.gnu.org; 7 Mar 2020 22:17:57 +0000 Received: from localhost ([127.0.0.1]:47716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAhld-0004lU-6I for submit@debbugs.gnu.org; Sat, 07 Mar 2020 17:17:57 -0500 Received: from mail-qk1-f182.google.com ([209.85.222.182]:41922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAhlb-0004lG-CM for 39547@debbugs.gnu.org; Sat, 07 Mar 2020 17:17:55 -0500 Received: by mail-qk1-f182.google.com with SMTP id b5so5844706qkh.8 for <39547@debbugs.gnu.org>; Sat, 07 Mar 2020 14:17:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uHkzM0tpjuX6XKevRGVf4YhgTrje5ReQEPjwBySSP3c=; b=BRZrwISV4rocCIE65j7OIbAOyB4uWwc57SymGvTWfaE/258dmXKYTsstT5ZgFnYYyQ RylXwZ07DNwN4QaHDW3G5AtCBfKHQG2o2rpFpWBnInMWyB4V08Tn8MJ5Oivf0KSwgCPk 8TJy6NHC0AEBDSIHbJhU+vz7Ol/F8QlxheEs8y9lAJ0OEHGQfkHfEyofJrb/2quGe8Bk s9xW1pb2Wiudye1HtqBvbAlz474Oosf1VTogXuXan9P4/3QtBqBL4fEmLpyPiOzye4qB h3hoQjZP6vQrDpPlJf5l6z0SQQpZ2L8CPBYfx+xsioQ62PvG5EuYCuOrHgXxiC/VjGRc QeNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uHkzM0tpjuX6XKevRGVf4YhgTrje5ReQEPjwBySSP3c=; b=BUR3vgP4jK+JSwKeqRVEA4oF6OCP0i3k5ovoRswWaWpNntUs1vDAOEHrvPluFONpX7 hrdO3PU0O6PpirQpMvxJpe0J+dv7KTjCRN1nSwmZPeDiAKagmxnt2udlMgMMT/TyfFnZ OO2mXdChUtJlTyKttMLodmKvSgo0SWL/DgLZck3CNNmhC0GO7d7cWmDmLe16WbP9wgjX 4uAwn7q1Q5GT+v3QeiBKBYG2j63c2y1JBR5oNUiUVnwIGlFjB+CLR6SJsk/GdeLTjhQz 0kd30d82AXgflvBGvXz2jOKnJ+WZlXheUCgwAJTav2AMT9vznxbLzz6FlZePSbWqlBMI VUjA== X-Gm-Message-State: ANhLgQ3VipQOVRnilfThel0o92F8CJ5Le+dK4lGZAgh6UfcZrJaovhBC 5oxAKRBUoZc9eBBP6mEDGXTcCWb+YyUfWtFA25k= X-Google-Smtp-Source: ADFU+vvykvMRnEVnJmIg4XP0zWKHa96iChYGd/OT09r1PK3BKqilgCBtmhuFALl1cwXqRhRolsicq8RqaOJLfvT5/HU= X-Received: by 2002:a05:620a:1092:: with SMTP id g18mr8920280qkk.80.1583619469710; Sat, 07 Mar 2020 14:17:49 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:620a:2050:0:0:0:0 with HTTP; Sat, 7 Mar 2020 14:17:48 -0800 (PST) In-Reply-To: <87o8t9oigf.fsf@gnu.org> References: <20200210170418.32076-1-zimon.toutoune@gmail.com> <87o8t9oigf.fsf@gnu.org> From: zimoun Date: Sat, 7 Mar 2020 23:17:48 +0100 Message-ID: Content-Type: multipart/alternative; boundary="000000000000f39a5b05a04b23e1" X-Spam-Score: -1.5 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.5 (--) --000000000000f39a5b05a04b23e1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ludo, Yes please push. Cheers, simon PS: i am typing with my smartphone because i am sleeping in a hospital (Purpan, Toulouse). I lose part of sensitivity and mobility of my right arm after a shock to my neck during a basket ball party with some friends. Everything is on the process but I cannot say when i will have access to my laptop next ; maybe Tomorrow, maybe one week later. So please go ahead (-: On Friday, 6 March 2020, Ludovic Court=C3=A8s wr= ote: > Hi! > > zimoun skribis: > > > Attached, the tiny modification to output the list (array) of URLs > > instead of the first one. > > The version number is still '1' because I do not know yet if lewo would > bump it. > > Note also that "transformer" is not useful any more because > > 'packages-json-builder' and 'sources-json-builder' returns both > > vectors now. > > Cool. > > > From 57a444f6f215fb6327719161a6e6ad4ad229273f Mon Sep 17 00:00:00 2001 > > From: zimoun > > Date: Mon, 10 Feb 2020 17:52:13 +0100 > > Subject: [PATCH v3 1/2] website: Refactor and resolve mirror:// of JSON > > package list. > > > > * website/apps/packages/builder.scm (origin->json): New procedure. > > LGTM! > > > From 73557bc00760b4404bfe17ecb3aca983c6dcc11e Mon Sep 17 00:00:00 2001 > > From: zimoun > > Date: Tue, 18 Feb 2020 13:25:14 +0100 > > Subject: [PATCH v3 2/2] website: Provide JSON sources list used by > Software > > Heritage. > > > > Format discussed here . > > > > * website/apps/packages/builder.scm (origin->json): Add list modifier. > > * website/apps/packages/builder.scm (sources-json-builder): New > procedure. > > Nitpick: no need to repeat the file name here. > > Also: please mention the addition to the =E2=80=98builder=E2=80=99 proced= ure. > > > +(define* (origin->json origin #:optional (transformer list->vector)) > > You can remove this parameter, as you wrote. > > I can make these changes and push it on your behalf if you want, let me > know! > > Thanks, > Ludo=E2=80=99. > --000000000000f39a5b05a04b23e1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ludo,

Yes please push.

Cheer= s,
simon

PS: i am typing with my smartph= one because i am sleeping in a hospital (Purpan, Toulouse). I lose part of = sensitivity and mobility of my right arm after a shock to my neck during a = basket ball party with some friends. Everything is on the process but I can= not say when i will have access to my laptop next ; maybe Tomorrow, maybe o= ne week later. So please go ahead (-:

On Friday, 6 March 2020, Ludov= ic Court=C3=A8s <ludovic.cou= rtes@inria.fr> wrote:
Hi!

zimoun <zimon.toutoune@gmail= .com> skribis:

> Attached, the tiny modification to output the list (array) of URLs
> instead of the first one.
> The version number is still '1' because I do not know yet if l= ewo would bump it.
> Note also that "transformer" is not useful any more because<= br> > 'packages-json-builder' and 'sources-json-builder' ret= urns both
> vectors now.

Cool.

> From 57a444f6f215fb6327719161a6e6ad4ad229273f Mon Sep 17 00:00:00= 2001
> From: zimoun <zimon.tou= toune@gmail.com>
> Date: Mon, 10 Feb 2020 17:52:13 +0100
> Subject: [PATCH v3 1/2] website: Refactor and resolve mirror:// of JSO= N
>=C2=A0 package list.
>
> * website/apps/packages/builder.scm (origin->json): New proced= ure.

LGTM!

> From 73557bc00760b4404bfe17ecb3aca983c6dcc11e Mon Sep 17 00:00:00= 2001
> From: zimoun <zimon.tou= toune@gmail.com>
> Date: Tue, 18 Feb 2020 13:25:14 +0100
> Subject: [PATCH v3 2/2] website: Provide JSON sources list used by Sof= tware
>=C2=A0 Heritage.
>
> Format discussed here <https://forge.softwareheritage.org/D2= 025#51269>.
>
> * website/apps/packages/builder.scm (origin->json): Add list m= odifier.
> * website/apps/packages/builder.scm (sources-json-builder): New p= rocedure.

Nitpick: no need to repeat the file name here.

Also: please mention the addition to the =E2=80=98builder=E2=80=99 procedur= e.

> +(define* (origin->json origin #:optional (transformer list->vec= tor))

You can remove this parameter, as you wrote.

I can make these changes and push it on your behalf if you want, let me
know!

Thanks,
Ludo=E2=80=99.
--000000000000f39a5b05a04b23e1-- From unknown Fri Sep 12 11:38:03 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: zimoun Subject: bug#39547: closed (Re: [PATCH v3] sources.json: array instead of list) Message-ID: References: <87eeu16eii.fsf@inria.fr> <20200210170418.32076-1-zimon.toutoune@gmail.com> X-Gnu-PR-Message: they-closed 39547 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 39547@debbugs.gnu.org Date: Mon, 09 Mar 2020 09:54:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1583747642-9747-1" This is a multi-part message in MIME format... ------------=_1583747642-9747-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39547: [PATCH] website: Provide JSON sources list used by Software Heritag= e. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39547@debbugs.gnu.org. --=20 39547: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39547 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1583747642-9747-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39547-done) by debbugs.gnu.org; 9 Mar 2020 09:53:18 +0000 Received: from localhost ([127.0.0.1]:49817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBF66-0002WH-FA for submit@debbugs.gnu.org; Mon, 09 Mar 2020 05:53:18 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:51780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBF64-0002W4-BY for 39547-done@debbugs.gnu.org; Mon, 09 Mar 2020 05:53:16 -0400 X-IronPort-AV: E=Sophos;i="5.70,532,1574118000"; d="scan'208";a="341725030" Received: from unknown (HELO ribbon) ([193.50.110.194]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2020 10:53:09 +0100 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: [PATCH v3] sources.json: array instead of list References: <20200210170418.32076-1-zimon.toutoune@gmail.com> <87o8t9oigf.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Vent=C3=B4se?= an 228 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= 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: Mon, 09 Mar 2020 10:53:09 +0100 In-Reply-To: (zimoun's message of "Sat, 7 Mar 2020 23:17:48 +0100") Message-ID: <87eeu16eii.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 39547-done Cc: "39547@debbugs.gnu.org" <39547-done@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi, zimoun skribis: > Yes please push. Done! should show up within an hour. > PS: i am typing with my smartphone because i am sleeping in a hospital > (Purpan, Toulouse). I lose part of sensitivity and mobility of my right a= rm > after a shock to my neck during a basket ball party with some friends. > Everything is on the process but I cannot say when i will have access to = my > laptop next ; maybe Tomorrow, maybe one week later. So please go ahead (-: Ouch, I wish you quick recovery! Take care of yourself, Ludo=E2=80=99. ------------=_1583747642-9747-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 Feb 2020 17:04:37 +0000 Received: from localhost ([127.0.0.1]:55331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1CU6-0004fP-BK for submit@debbugs.gnu.org; Mon, 10 Feb 2020 12:04:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:46211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1CU2-0004fG-J4 for submit@debbugs.gnu.org; Mon, 10 Feb 2020 12:04:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50178) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1CTz-0002oJ-VK for guix-patches@gnu.org; Mon, 10 Feb 2020 12:04:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1CTx-0003q8-Me for guix-patches@gnu.org; Mon, 10 Feb 2020 12:04:27 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:46027) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1CTx-0003nL-Ad for guix-patches@gnu.org; Mon, 10 Feb 2020 12:04:25 -0500 Received: by mail-wr1-x443.google.com with SMTP id g3so7627938wrs.12 for ; Mon, 10 Feb 2020 09:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mosk8DvAhv8UbhMVFP1f25338vyV0ob4vfrXDnT2JP0=; b=ZMs2j6li/XQfyEvlWjtd81YfQuHGbg7Zx2BQYKLMOXp5AWZux/Yojtmvl6llUMytYX jxiRx+ImUfmz9T+jaFBO4YqLWULp5oTmkapEpl1Ll5vYgkvggYJ09kzOJMnHs3r0Aab2 0gABV2Ovjv/ZpNaBU0jh2FF8A1mnVa5OVbFVm2jsjj2sFbZ+7EIgdShQ3It7/RA0fZM8 EXshxED1U3qFLCzi07798VPNkycLFdRHkg0g1S2fft816BMDWS8N6Pot7/nvF/yd9CDE Jz7Dh4Qi09RD+o7edZPaSCcPOkV+RPE7upR/7S+0l1/QZ8T/Iid+7+iKYoaH99v47QsV YEyw== 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:date:message-id:mime-version :content-transfer-encoding; bh=mosk8DvAhv8UbhMVFP1f25338vyV0ob4vfrXDnT2JP0=; b=g0LYY5VhaTEonK8xxUW/gyVySNbDqRJ2EuFwhv/q/3XcLKziMwn2hbKetcbNkMWs8v 1Sxc7C/RPAynmseypEUcgGCXBzYPk9jZECEmA21haH1SkA1wf2ZDMRg1l3CZD+Bwv7NW zndWak1KfGOul0G7gX77DYerPH2gZ4UvBYv0NPkOnHtc70AULdX5/Zpj1Y3Afc5RiFU3 VfakgGV9S7VIaDFtq8B668VF+k0zN+5LK5DyaOUulfCslk3yXEnP/0zhPn4ey64O17aR qRDi0BscznQ53blPj0pyLhR9MqFsfTj9aB2GT/Wb+KzzRZQKn8cnQBU8uEzUHGTEr/TV roSA== X-Gm-Message-State: APjAAAXPia6GDx4ibxi4+a97CYQ05Qa5ocdWJtlvqH4sZFfEAyItFIs5 aHFGq1SmQubn/+PvPOQcIL3v8kq+ X-Google-Smtp-Source: APXvYqxyCxu7xSwZhGX1eSqXrH00JJcblIvBE1EZ7lz23gPNIGFzoEuIR9XvDnFnU/931WFjKToJ/Q== X-Received: by 2002:adf:f3d0:: with SMTP id g16mr3102866wrp.2.1581354262796; Mon, 10 Feb 2020 09:04:22 -0800 (PST) Received: from pfiuh02.univ-paris-diderot.fr ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id f127sm2870wma.4.2020.02.10.09.04.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2020 09:04:22 -0800 (PST) From: zimoun To: guix-patches@gnu.org Subject: [PATCH] website: Provide JSON sources list used by Software Heritage. Date: Mon, 10 Feb 2020 18:04:18 +0100 Message-Id: <20200210170418.32076-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 X-Spam-Score: 3.9 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Format discussed here . * website/apps/packages/builder.scm (sources-json-builder): New procedure. --- website/apps/packages/builder.scm | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) Content analysis details: (3.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: nixo.xyz] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Format discussed here . * website/apps/packages/builder.scm (sources-json-builder): New procedure. --- website/apps/packages/builder.scm | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Format discussed here . * website/apps/packages/builder.scm (sources-json-builder): New procedure. --- website/apps/packages/builder.scm | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm index 9dc44c9..5279096 100644 --- a/website/apps/packages/builder.scm +++ b/website/apps/packages/builder.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2019 Nicolò Balzarotti +;;; Copyright © 2020 Simon Tournier ;;; ;;; Initially written by sirgazil ;;; who waives all copyright interest on this file. @@ -37,6 +38,8 @@ #:use-module (haunt page) #:use-module (haunt utils) #:use-module (srfi srfi-1) + #:use-module ((web uri) #:select (string->uri uri->string uri-scheme)) + #:use-module ((guix build download) #:select (maybe-expand-mirrors)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -70,6 +73,7 @@ (flatten (list (index-builder) + (sources-json-builder) (packages-json-builder) (packages-builder) (package-list-builder)))) @@ -84,6 +88,64 @@ ;; Maximum number of packages shown on /packages. 30) +(define (sources-json-builder) + "Return a JSON page listing all the sources." + (define (origin->json origin) + (define method + (origin-method origin)) + + (define uri ;represented as string + (origin-uri origin)) + + (define (mirror->url uri) + (uri->string (car (maybe-expand-mirrors uri %mirrors)))) + + (define (resolve urls) + (let* ((url (car urls)) + (uri (string->uri url)) + (rest (cdr urls))) + (case (uri-scheme uri) + ((mirror) (mirror->url uri)) + ((http) url) + ((https) url) + (else + (if (null? rest) + url + (resolve rest)))))) + + `((type . ,(cond ((eq? url-fetch method) 'url) + ((eq? git-fetch method) 'git) + ((eq? svn-fetch method) 'svn) + (else #nil))) + ,@(cond ((eq? url-fetch method) + `(("url" . ,(match uri + ((? string? url) (mirror->url (string->uri url))) + ((urls ...) (resolve urls)))))) + ((eq? git-fetch method) + `(("git_url" . ,(git-reference-url uri)))) + ((eq? svn-fetch method) + `(("svn_url" . ,(svn-reference-url uri)))) + (else '())) + ,@(if (eq? method git-fetch) + `(("git_ref" . ,(git-reference-commit uri))) + '()) + ,@(if (eq? method svn-fetch) + `(("svn_revision" . ,(svn-reference-revision + uri))) + '()))) + + (define (package->json package) + `(,@(if (origin? (package-source package)) + (origin->json (package-source package)) + `(("type" . "no-origin") + ("name" . ,(package-name package)))))) + + (make-page "sources.json" + `(("sources" . ,(list->vector (map package->json (all-packages)))) + ("version" . "1")) + scm->json)) + + (define (packages-json-builder) "Return a JSON page listing all packages." (define (origin->json origin) -- 2.23.0 ------------=_1583747642-9747-1--