From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1547502-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 2838815800A
	for <garchives@archives.gentoo.org>; Sat, 19 Aug 2023 14:49:51 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 62A632BC01A;
	Sat, 19 Aug 2023 14:49:50 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 4B3CF2BC01A
	for <gentoo-commits@lists.gentoo.org>; Sat, 19 Aug 2023 14:49:50 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 313E734101F
	for <gentoo-commits@lists.gentoo.org>; Sat, 19 Aug 2023 14:49:49 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 8F1C2FCE
	for <gentoo-commits@lists.gentoo.org>; Sat, 19 Aug 2023 14:49:47 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1692456573.aa37e3993866f1d75e855f8c7300749fadd846af.sam@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/emerge-webrsync
X-VCS-Directories: bin/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: aa37e3993866f1d75e855f8c7300749fadd846af
X-VCS-Branch: master
Date: Sat, 19 Aug 2023 14:49:47 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 5d6627f0-b430-4d78-85a5-8aae169115b5
X-Archives-Hash: 86b9a1b07676ff34d3fa12c743dd808d

commit:     aa37e3993866f1d75e855f8c7300749fadd846af
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 19 13:49:53 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 19 14:49:33 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=aa37e399

emerge-webrsync: pass --proxy to gemato if http_proxy or https_proxy is set

Make sure we pass proxy settings down into gemato.

We include a fallback w/ https_proxy, but note that gnupg doesn't actually use
https_proxy but we've had cases reported where users only have https_proxy and
not http_proxy set, so include this to help them out too.

Bug: https://bugs.gentoo.org/691434
Bug: https://bugs.gentoo.org/835927
Bug: https://bugs.gentoo.org/911629
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/emerge-webrsync | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 7ef6d0d5a9..fea0085682 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -290,6 +290,13 @@ check_file_signature_gemato() {
 			-K "${key}"
 		)
 
+
+		if [[ -n ${http_proxy} || -n ${https_proxy} ]] ; then
+			gemato_args+=(
+				--proxy "${http_proxy:-${https_proxy}}"
+			)
+		fi
+
 		[[ -n ${PORTAGE_GPG_KEY_SERVER} ]] && gemato_args+=( --keyserver "${PORTAGE_GPG_KEY_SERVER}" )
 		[[ ${PORTAGE_QUIET} == 1 ]] && gemato_args+=( --quiet )
 		[[ ${do_debug} == 1 ]] && gemato_args+=( --debug )