mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] ptxd_make_world_init: set invalid proxy value for download prevention to greppable value
@ 2022-05-20 15:32 Bastian Krause
  2022-05-20 15:32 ` [ptxdist] [PATCH 2/2] doc: user_manual: mention download prevention during non-get stages Bastian Krause
  2022-05-25  9:45 ` [ptxdist] [APPLIED] ptxd_make_world_init: set invalid proxy value for download prevention to greppable value Michael Olbrich
  0 siblings, 2 replies; 4+ messages in thread
From: Bastian Krause @ 2022-05-20 15:32 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Krause

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 <bst@pengutronix.de>
---
 scripts/lib/ptxd_make_world_common.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh
index d2d8a247d..5baa497e7 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
 
     #
-- 
2.30.2




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-25  9:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 15:32 [ptxdist] [PATCH 1/2] ptxd_make_world_init: set invalid proxy value for download prevention to greppable value Bastian Krause
2022-05-20 15:32 ` [ptxdist] [PATCH 2/2] doc: user_manual: mention download prevention during non-get stages Bastian Krause
2022-05-25  9:45   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-05-25  9:45 ` [ptxdist] [APPLIED] ptxd_make_world_init: set invalid proxy value for download prevention to greppable value Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox