From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 25 May 2022 11:50:22 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ntneo-008VWR-CH for lore@lore.pengutronix.de; Wed, 25 May 2022 11:50:22 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ntnen-0004pS-L6; Wed, 25 May 2022 11:50:21 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntnaJ-00006c-Mg; Wed, 25 May 2022 11:45:43 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1ntnaK-004RCm-8L; Wed, 25 May 2022 11:45:42 +0200 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1ntnaI-00BwpG-9e; Wed, 25 May 2022 11:45:42 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Wed, 25 May 2022 11:45:42 +0200 Message-Id: <20220525094542.2847691-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520153210.7158-1-bst@pengutronix.de> References: <20220520153210.7158-1-bst@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] ptxd_make_world_init: set invalid proxy value for download prevention to greppable value X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Bastian Krause Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as c39d7fba235985a37abbaf36c3c8926f9e2e40d1. Michael [sent from post-receive hook] On Wed, 25 May 2022 11:45:42 +0200, Bastian Krause wrote: > In case a download is triggered in a non-get stage, e.g. in a code > signing provider missing the ptx/online-code-signing-provider macro, > a proxy error is printed in most cases. > > Help the confused developers by giving them an invalid proxy value that > is self-explanatory and greppable. > > In my case the proxy error message from the online code signing provider > was: > > proxyconnect tcp: dial tcp: lookup -: no such host > > With this patch it is now: > > proxyconnect tcp: dial tcp: lookup PTXDIST-UNALLOWED-DOWNLOAD: no such host > > Signed-off-by: Bastian Krause > Message-Id: <20220520153210.7158-1-bst@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh > index d2d8a247dd39..5baa497e77cf 100644 > --- a/scripts/lib/ptxd_make_world_common.sh > +++ b/scripts/lib/ptxd_make_world_common.sh > @@ -415,7 +415,8 @@ ptxd_make_world_init() { > # try to prevent downloads outside the get stage > # > if [ "${pkg_stage}" != "get" ]; then > - pkg_env="HTTPS_PROXY=- HTTP_PROXY=- https_proxy=- http_proxy=- ${pkg_env}" > + local invalid_proxy="PTXDIST-UNALLOWED-DOWNLOAD" > + pkg_env="HTTPS_PROXY=$invalid_proxy HTTP_PROXY=$invalid_proxy https_proxy=$invalid_proxy http_proxy=$invalid_proxy ${pkg_env}" > fi > > #