From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WH02F4B+AmIwMwAAgWs5BA (envelope-from ) for ; Tue, 08 Feb 2022 15:30:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0M7nD4B+AmJjbgAAG6o9tA (envelope-from ) for ; Tue, 08 Feb 2022 15:30:24 +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 E0FD6153FA for ; Tue, 8 Feb 2022 15:30:23 +0100 (CET) Received: from localhost ([::1]:36444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHRVf-0007OR-0g for larch@yhetil.org; Tue, 08 Feb 2022 09:30:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHPwZ-0002HQ-2b for guix-patches@gnu.org; Tue, 08 Feb 2022 07:50:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHPwY-0005kr-P4 for guix-patches@gnu.org; Tue, 08 Feb 2022 07:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nHPwY-0002NE-Nz for guix-patches@gnu.org; Tue, 08 Feb 2022 07:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53818] [PATCH v2 5/7] import: Add 'repology' updater. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Feb 2022 12:50: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: Xinglu Chen , 53818@debbugs.gnu.org Received: via spool by 53818-submit@debbugs.gnu.org id=B53818.16443245669078 (code B ref 53818); Tue, 08 Feb 2022 12:50:02 +0000 Received: (at 53818) by debbugs.gnu.org; 8 Feb 2022 12:49:26 +0000 Received: from localhost ([127.0.0.1]:45790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHPvy-0002MM-Ba for submit@debbugs.gnu.org; Tue, 08 Feb 2022 07:49:26 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:38808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHPvv-0002MD-RA for 53818@debbugs.gnu.org; Tue, 08 Feb 2022 07:49:24 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by albert.telenet-ops.be with bizsmtp id scpN2600v4UW6Th06cpNa4; Tue, 08 Feb 2022 13:49:22 +0100 Message-ID: <3841c2c4ab6dd421237b6b29e9fb746be477380e.camel@telenet.be> From: Maxime Devos Date: Tue, 08 Feb 2022 13:49:22 +0100 In-Reply-To: <87a6f1zgm1.fsf@yoctocell.xyz> References: <98726379214702d0745f56d9f946e792e803d326.1644224421.git.public@yoctocell.xyz> <76a550f4fc82de9491b99786e8086d9d9d8c4c72.camel@telenet.be> <87a6f1zgm1.fsf@yoctocell.xyz> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-rwtF/jLvimDhciWk3Eap" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1644324562; bh=h/dXFKcaaDvSldAgS3VuWYNaAyECC2Vxodmd+wczWYY=; h=Subject:From:To:Date:In-Reply-To:References; b=OjTLsiEBdwLRvARAsqDbt+9yJ+wsSO2CTG377c2iMy9byBpsKsbDFHOs2Vl8ac/N3 XMS+JulriDuHjeBS02jT6yFSLoN6Wxx3D+WCpZpnEOLTck9kW83itcdSy8BA21Oj5T ZNcA/MbDWn7lXodTH96iGlGHqLwL45PpaY9SNwmWBS+TmB5Fa8TVZipncFlc/cT0wd tRssvjRVcixaU5OANYlLdWsQ4oJRdvki+jl1/9vbezaU4oIgyO3/CK81IWw4cs4Ncz zXwr6vdmIROtXOnodOA3fTwbe5vxQB+0xZ3l1/HjoWOFTJU83gSL/9bCztxCCKPPHF Rqpp2pXYeYShg== 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=1644330624; 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=h/dXFKcaaDvSldAgS3VuWYNaAyECC2Vxodmd+wczWYY=; b=sQwpUy0oB8kw5z5r1Dcvz+Y3Te6hIHT9eLaAt1RL1IQMfRAoARhw1lvyfI67wZMcN+w46N Loin+sptRV3oBdqkGNaD2a460FJe5oJtXIY2Iejr0iDVCSz7WhF0hkQl+AYUW8v9aTfqKa yaAIy9ZZ0emzp/SMr492B9U7NGYJP4kkYp9VvCtJ0YuI1kf+j7CGYJ0E8hZUQZ2IMLGz5b z6KtIvIYhgSjEACALMBjPTvU7iVREe+np5mWk1hWqTVHwanCSltRHP+a6wZzp6EwSTBdei YTON+w0ZK71Oo9ebfL37zXgsSengCYswa3UWXbW9FmzHZwFF6j1vJRQSJBE66A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644330624; a=rsa-sha256; cv=none; b=c7CzguByxlTHRCwbHJHSXH3//mEbk9QNYmQo6a5qrebvxkqq0k0kof+nvfeoUL3XPHkyQu UNB3WxOvdoco2mrRlPcmUR9aAUFLL2iLwvHPQ+MR76C5lB+DDmOtUvudUfVu+8z8E2mK3r wltddlTFe6p25lDhwhMJyhe83vbsGwSnrTEwdnAsUOIPSiLFZPD8ZTz3put+yAgSl3uGze /B92005NzTXAqL+98Z+oB3nK1n0WkY4C6kTCJ35ihL76xZKsnneFKe9ASef95r53R//mnJ E8sohjWpk4Qm45cW7W9vy16o2mnEbiPzVhv95xsUDIu0tu+R/5mPz+Zc/KBAtA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=OjTLsiEB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (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.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=OjTLsiEB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (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: E0FD6153FA X-Spam-Score: -4.23 X-Migadu-Scanner: scn1.migadu.com X-TUID: GN0Fn18pUwKC --=-rwtF/jLvimDhciWk3Eap Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 #:key= cached?) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (json-s= tring->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!"))) Greetings, Maxime. --=-rwtF/jLvimDhciWk3Eap Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYgJm0hccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qGTAQDjW09xDSUrA1D2i4VliqSyNbQy Lk9HWvwLA4eKTnxLhwD+JV9Ev7v+6vOS/KlZG265AHxFc9jIbjKrthWx2XS/OwU= =Zb1R -----END PGP SIGNATURE----- --=-rwtF/jLvimDhciWk3Eap--