From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8HlHCMzAA2K8gAEAgWs5BA (envelope-from ) for ; Wed, 09 Feb 2022 14:25:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gFmZBczAA2LO+QAA9RJhRA (envelope-from ) for ; Wed, 09 Feb 2022 14:25:32 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A1BEF1241F for ; Wed, 9 Feb 2022 14:25:31 +0100 (CET) Received: from localhost ([::1]:38824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHmyQ-0004WH-HG for larch@yhetil.org; Wed, 09 Feb 2022 08:25:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHmUw-0004lA-QH for guix-patches@gnu.org; Wed, 09 Feb 2022 07:55:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHmUw-0002Rd-FK for guix-patches@gnu.org; Wed, 09 Feb 2022 07:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nHmUw-0006I9-Ew for guix-patches@gnu.org; Wed, 09 Feb 2022 07:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53818] [PATCH v2 5/7] import: Add 'repology' updater. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Feb 2022 12:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53818 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , 53818@debbugs.gnu.org Received: via spool by 53818-submit@debbugs.gnu.org id=B53818.164441127724145 (code B ref 53818); Wed, 09 Feb 2022 12:55:02 +0000 Received: (at 53818) by debbugs.gnu.org; 9 Feb 2022 12:54:37 +0000 Received: from localhost ([127.0.0.1]:50122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHmUX-0006HN-73 for submit@debbugs.gnu.org; Wed, 09 Feb 2022 07:54:37 -0500 Received: from h178-251-242-94.cust.a3fiber.se ([178.251.242.94]:44138 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHmUU-0006HA-Ng for 53818@debbugs.gnu.org; Wed, 09 Feb 2022 07:54:35 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoctocell.xyz; s=mail; t=1644411269; bh=m2Qb8P1GKGocGTpxmFcX6Vw38Hpj15M05nflGZ6UruI=; h=From:To:Subject:In-Reply-To:References:Date; b=riTGRBUP4E6WJqterhFM8mxCP0mZPQsOkM6t7/YT7m9nludZ/ieh6d20kB2RIGYWw riGPiZW6IvRVMMr8D3x4sctNiZgyQNeO4UTN4l9068M9x9TeM7lYBlMs3bJAYet/bV K3cS+cwXymcPvx2OuUaS85tupswnptSZt4dwW7Gc= In-Reply-To: <3841c2c4ab6dd421237b6b29e9fb746be477380e.camel@telenet.be> References: <98726379214702d0745f56d9f946e792e803d326.1644224421.git.public@yoctocell.xyz> <76a550f4fc82de9491b99786e8086d9d9d8c4c72.camel@telenet.be> <87a6f1zgm1.fsf@yoctocell.xyz> <3841c2c4ab6dd421237b6b29e9fb746be477380e.camel@telenet.be> Date: Wed, 09 Feb 2022 13:54:27 +0100 Message-ID: <87wni4xksc.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644413131; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=m2Qb8P1GKGocGTpxmFcX6Vw38Hpj15M05nflGZ6UruI=; b=T+EGbky0BnfxBUztMmAq3b3hzGGcFa86Q6WiBKb0JX/qporxDiHTfls6qrBcQJ5YaqoT/1 ftJRdqblbwM4YosbgNkwQfsrLGmqBP1UVKB9tNdM9lBT7UFThniAutRc/EViug0hgW3txG sifXS4F4s9HhC6lWszLzMQJTd6gqlRRp/fR87Vb8nTMZ4dapiys7ZajnaC0EX6ZyKtwuUh 8i1Lin2s3UaXf6bbpYFxIwNeUGeHTg+Tg+cUmzYTM9nvEXnpJi2hX3NjHqqW5mcd8P0GB+ J61owvo2j8AkKFp5/M17KGIdQMo14UC2W2aHpz+cFj6q0NR6iThRfj1osGwsag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644413131; a=rsa-sha256; cv=none; b=TPNmvzQvlZSJDCbKP0wf9OxZNuaOQUPbdrTQmQlQxGUuPbQjc3F1Ox4qyzTy/tRm8EuvIe 6rfwaBbtfYvohiPTOwQ1cin1JvOLOda3xdw6IAwNLM1mvKKYPUbMDB4Zlu1PfLHB9tf83Q RIY4AIknGEXAWWN0ofNCCpEDd3tWIAuHE7/Y+O/og5FRDKFnhzFFkLfOOUCWa1Y+w5la8r UdMXnajwfGtPyZWq+eOM0mb8sxk/1PsrzRoJMaeBPTDpvw4oC1v34A/+Eo/UfNZNJbsUob Ebb5upY+YFgEJlo05jbIDOgSEraxP3oAdGKR/Dlw2KfGbuLpLyAjLbBddCA/DQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=riTGRBUP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=riTGRBUP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A1BEF1241F X-Spam-Score: -4.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: qr5Hje1VwNzI --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Maxime schrieb am Dienstag der 08. Februar 2022 um 13:49 +01: > Xinglu Chen schreef op di 08-02-2022 om 13:29 [+0100]: >> > Xinglu Chen schreef op ma 07-02-2022 om 10:07 [+0100]: >> > > +(define (latest-release package) >> > > +=C2=A0 (mock ((guix import json) json-fetch >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambda* (url #:ke= y cached?) >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (json-= string->scm %test-json))) >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (repology-latest-release= package))) >> >=20 >> > It would be nice to verify the URL. >>=20 >> What do you mean with =E2=80=9Cverify=E2=80=9D > > Something along the lines of: > > (lambda* (url #:key cached?) > (if (equal? url > "http://[hostname]/release/information/of/PACKAGE.json") > (json-string->scm ...) > (error "the refresher contacted the wrong URL!"))) Ah, OK, thanks for clarifying! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmIDuYQVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5bHcP/1LMGxz5R88mpiGvHMXEnpVPadry eeKrmZfmiLHjHXAlKGFIVwjVvp0F4MaU8oFuRzk+h++9MZoggp2LaISQdAe4AV8f 9ecU9UC1AGaclOmXRQTgi2ugInfLCIA2T3qh9p2Ed4FPw8TGMl6Dq8HLpnxMGIeO ARAoiu1JH0NDvMKz0qulg2JtDKytAtqIOjLP5sU9682tXfn7HbFF6MnLI5jzqrCC zCBWZ9rgUMuzLoHofbdG+UxFveGy3IOg7Ps17iTH/1MX8eeDaJvJLC9vkSbzW+0P PaQPa7resQ9Ye/vjo2pDXTk0d4W2ig1j0lraZW5flMO1j9qfLgXjqgnrGLyaWRI4 Qg2MsS5kRYrPefSCgLHj89qzPGPASfunJEgZvCM9fsrRs+hmNwLA5ZAS9CHWR2Q4 0YYsXhW0SfmUmSVtCKblVlG8/EUz6fTe9C55cqN2QGJoZe+2akjemeXvkd+5w/uG T1unWuL3XIKj/ub4U0FwW+JjgL87BCIlewBGBAI2EqiQcnQ6oLsrP/ZPUzAHrmX+ MLNQRZyJSzottnFYNkk/DtUEpikbvdq0DJcLreoMJyloXE9yFoo3EaCJ6tWSJWXZ PylttRjVm0rpBD0hxTYKfj17ggRwau2RVOjkRB8QiCFUJWdSvpY0UMJKgu+nzxYx B4blmmBo0ST4Kyyj =ksoR -----END PGP SIGNATURE----- --=-=-=--