From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Janssen Subject: Re: [PATCH] gnu: r-curl: Respect CURL_CA_BUNDLE variable. Date: Tue, 13 Sep 2016 23:53:33 +0200 Message-ID: <87d1k7sbz6.fsf@gnu.org> References: <20160907145659.7543-1-ricardo.wurmus@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjvdG-0000mo-3C for guix-devel@gnu.org; Tue, 13 Sep 2016 17:52:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjvdB-0006Na-Rh for guix-devel@gnu.org; Tue, 13 Sep 2016 17:52:45 -0400 In-reply-to: <20160907145659.7543-1-ricardo.wurmus@mdc-berlin.de> 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: Ricardo Wurmus Cc: guix-devel@gnu.org Ricardo Wurmus writes: > * gnu/packages/web.scm (r-curl)[arguments]: Add phase > "allow-CURL_CA_BUNDLE". > --- > gnu/packages/web.scm | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm > index 87bc3e2..321a250 100644 > --- a/gnu/packages/web.scm > +++ b/gnu/packages/web.scm > @@ -3168,6 +3168,19 @@ applications.") > (base32 > "1p24bcaf1wbfdi1r9ibyyp0l0zp4kzs4g3srv8vikz93hycm1qa6")))) > (build-system r-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + ;; The environment variable CURL_CA_BUNDLE is only respected when > + ;; running Windows, so we disable the platform checks. > + (add-after 'unpack 'allow-CURL_CA_BUNDLE > + (lambda _ > + (substitute* "R/onload.R" > + (("if \\(!grepl\\(\"mingw\".*") > + "if (FALSE)\n")) > + (substitute* "src/handle.c" > + (("#ifdef _WIN32") "#if 1")) > + #t))))) > (inputs > `(("libcurl" ,curl))) > (home-page "https://github.com/jeroenooms/curl") This patch was essential to me being able to interact with HTTPS urls in R. As far as I understand, by default, R only looks for CURL_CA_BUNDLE on Windows, but with this patch it looks for CURL_CA_BUNDLE on GNU/Linux as well. Is this correct? I can confirm it works for me, so I'd like to see this patch pushed. Kind regards, Roel Janssen