From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH] import: cpan: Use tls to query api.metacpan.org. Date: Tue, 30 Aug 2016 11:49:04 -0500 Message-ID: <20160830114904.2ec3512c@openmailbox.org> References: <87shtmo1mc.fsf@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bemDv-0007bI-Ez for guix-devel@gnu.org; Tue, 30 Aug 2016 12:49:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bemDq-0000VJ-Lc for guix-devel@gnu.org; Tue, 30 Aug 2016 12:49:18 -0400 Received: from smtp4.openmailbox.org ([62.4.1.38]:50971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bemDq-0000VD-Bu for guix-devel@gnu.org; Tue, 30 Aug 2016 12:49:14 -0400 In-Reply-To: <87shtmo1mc.fsf@we.make.ritual.n0.is> 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: ng0 Cc: guix-devel@gnu.org On Tue, 30 Aug 2016 12:57:47 +0000 ng0 wrote: > 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. >=20 > * 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(-) >=20 > 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 =C2=A9 2014 Eric Bavier > ;;; Copyright =C2=A9 2015 Mark H Weaver > ;;; Copyright =C2=A9 2016 Alex Sassmannshausen > +;;; Copyright =C2=A9 2016 ng0 This patch may be one of those cases, discussed recently on the mailing list, where a copyright addition is not appropriate. > ;;; > ;;; 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")) > =20 > @@ -91,7 +92,7 @@ return \"Test-Simple\"" > "Return an alist representation of the CPAN metadata for the perl modu= le 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 "rel= ease" > ;; name of the package. This substitution = seems > ;; reasonably consistent across packages. Otherwise LGTM, `~Eric