From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: [PATCH] import: cpan: Use tls to query api.metacpan.org. Date: Tue, 30 Aug 2016 12:57:47 +0000 Message-ID: <87shtmo1mc.fsf@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beic3-0006eS-4X for guix-devel@gnu.org; Tue, 30 Aug 2016 08:58:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beibw-0006Ue-V0 for guix-devel@gnu.org; Tue, 30 Aug 2016 08:57:58 -0400 Received: from mithlond.libertad.in-berlin.de ([217.197.83.212]:43273 helo=beleriand.n0.is) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beibw-0006UL-Ii for guix-devel@gnu.org; Tue, 30 Aug 2016 08:57:52 -0400 Received: by beleriand.n0.is (OpenSMTPD) with ESMTPSA id 6f272450 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO for ; Tue, 30 Aug 2016 12:57:48 +0000 (UTC) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-import-cpan-Use-tls-to-query-api.metacpan.org.patch Content-Transfer-Encoding: 8bit >From e5fb3767e652af0a94fb9817c81b23f37d676355 Mon Sep 17 00:00:00 2001 From: ng0 Date: Tue, 30 Aug 2016 12:52:51 +0000 Subject: [PATCH] import: cpan: Use tls to query api.metacpan.org. * guix/import/cpan.scm (module->name module)[json-fetch]: Use tls for api.metacpan.org. (cpan-fetch-module)[json-fetch]: Likewise. --- guix/import/cpan.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index 213a155..5d393ac 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Alex Sassmannshausen +;;; Copyright © 2016 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -83,7 +84,7 @@ "Return the base distribution module for a given module. E.g. the 'ok' module is distributed with 'Test::Simple', so (module->dist-name \"ok\") would return \"Test-Simple\"" - (assoc-ref (json-fetch (string-append "http://api.metacpan.org/module/" + (assoc-ref (json-fetch (string-append "https://api.metacpan.org/module/" module)) "distribution")) @@ -91,7 +92,7 @@ return \"Test-Simple\"" "Return an alist representation of the CPAN metadata for the perl module MODULE, or #f on failure. MODULE should be e.g. \"Test::Script\"" ;; This API always returns the latest release of the module. - (json-fetch (string-append "http://api.metacpan.org/release/" + (json-fetch (string-append "https://api.metacpan.org/release/" ;; XXX: The 'release' api requires the "release" ;; name of the package. This substitution seems ;; reasonably consistent across packages. -- 2.9.3 --=-=-= Content-Type: text/plain -- ng0 For non-prism friendly talk find me on http://www.psyced.org --=-=-=--