From: Bastian Krause <bst@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Bastian Krause <bst@pengutronix.de>
Subject: [ptxdist] [PATCH 1/2] ptxd_make_world_init: set invalid proxy value for download prevention to greppable value
Date: Fri, 20 May 2022 17:32:09 +0200 [thread overview]
Message-ID: <20220520153210.7158-1-bst@pengutronix.de> (raw)
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
next reply other threads:[~2022-05-20 15:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 15:32 Bastian Krause [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220520153210.7158-1-bst@pengutronix.de \
--to=bst@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox