From patchwork Mon Oct 12 21:09:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 24598 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B218D27BBEB; Mon, 12 Oct 2020 22:15:53 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6A94827BBEA for ; Mon, 12 Oct 2020 22:15:53 +0100 (BST) Received: from localhost ([::1]:45298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS5Ae-0000H5-Jw for patchwork@mira.cbaines.net; Mon, 12 Oct 2020 17:15:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS55z-0005pf-A1 for guix-patches@gnu.org; Mon, 12 Oct 2020 17:11:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kS55z-0006yY-0k for guix-patches@gnu.org; Mon, 12 Oct 2020 17:11:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kS55y-00065Q-Sn for guix-patches@gnu.org; Mon, 12 Oct 2020 17:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43968] [PATCH 3/3] git: Support HTTP and HTTPS proxies. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Oct 2020 21:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43968 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43968@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 43968-submit@debbugs.gnu.org id=B43968.160253702023327 (code B ref 43968); Mon, 12 Oct 2020 21:11:02 +0000 Received: (at 43968) by debbugs.gnu.org; 12 Oct 2020 21:10:20 +0000 Received: from localhost ([127.0.0.1]:44094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kS55I-000645-Ht for submit@debbugs.gnu.org; Mon, 12 Oct 2020 17:10:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kS55C-00063W-1Q for 43968@debbugs.gnu.org; Mon, 12 Oct 2020 17:10:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50498) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS556-0006ii-Rh; Mon, 12 Oct 2020 17:10:08 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54554 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kS556-0005SP-0y; Mon, 12 Oct 2020 17:10:08 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 12 Oct 2020 23:09:55 +0200 Message-Id: <20201012210955.8753-3-ludo@gnu.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012210955.8753-1-ludo@gnu.org> References: <20201012210955.8753-1-ludo@gnu.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This allows 'guix pull' and similar to fetch code over a proxy. * guix/git.scm (make-default-fetch-options): Pass #:proxy-url. --- guix/git.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/git.scm b/guix/git.scm index b81a011443..364b4997ae 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -161,11 +161,14 @@ the 'SSL_CERT_FILE' and 'SSL_CERT_DIR' environment variables." (define (make-default-fetch-options) "Return the default fetch options." (let ((auth-method (%make-auth-ssh-agent))) - ;; The #:transfer-progress option appeared in Guile-Git 0.4.0. Omit it - ;; when using an older version. + ;; The #:transfer-progress and #:proxy-url options appeared in Guile-Git + ;; 0.4.0. Omit them when using an older version. (catch 'wrong-number-of-args (lambda () (make-fetch-options auth-method + ;; Guile-Git doesn't distinguish between these. + #:proxy-url (or (getenv "http_proxy") + (getenv "https_proxy")) #:transfer-progress (and (isatty? (current-error-port)) show-progress)))