* [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
* [ptxdist] [PATCH 2/2] doc: user_manual: mention download prevention during non-get stages
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 ` 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
1 sibling, 1 reply; 4+ messages in thread
From: Bastian Krause @ 2022-05-20 15:32 UTC (permalink / raw)
To: ptxdist; +Cc: Bastian Krause
Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
doc/user_manual.inc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/user_manual.inc b/doc/user_manual.inc
index 2adcd964c..6bd534f3d 100644
--- a/doc/user_manual.inc
+++ b/doc/user_manual.inc
@@ -125,6 +125,10 @@ download an archive currently not existing on the development host. But
there are ways to prevent PTXdist from doing so (refer to section
:ref:`source-arch-loc`).
+.. note:: PTXdist tries to prevent downloads outside of the *get* stage
+ by setting certain widespread proxy environment variables to an
+ inexistent host name.
+
First steps with PTXdist
------------------------
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [APPLIED] ptxd_make_world_init: set invalid proxy value for download prevention to greppable value
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 ` Michael Olbrich
1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2022-05-25 9:45 UTC (permalink / raw)
To: ptxdist; +Cc: Bastian Krause
Thanks, applied as c39d7fba235985a37abbaf36c3c8926f9e2e40d1.
Michael
[sent from post-receive hook]
On Wed, 25 May 2022 11:45:42 +0200, Bastian Krause <bst@pengutronix.de> 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 <bst@pengutronix.de>
> Message-Id: <20220520153210.7158-1-bst@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> 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
>
> #
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [APPLIED] doc: user_manual: mention download prevention during non-get stages
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 ` Michael Olbrich
0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2022-05-25 9:45 UTC (permalink / raw)
To: ptxdist; +Cc: Bastian Krause
Thanks, applied as 6d4a7426324b7f9ed7603ab56ae2ca0eb02b7f80.
Michael
[sent from post-receive hook]
On Wed, 25 May 2022 11:45:43 +0200, Bastian Krause <bst@pengutronix.de> wrote:
> Signed-off-by: Bastian Krause <bst@pengutronix.de>
> Message-Id: <20220520153210.7158-2-bst@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/doc/user_manual.inc b/doc/user_manual.inc
> index 2adcd964cddc..6bd534f3d8a1 100644
> --- a/doc/user_manual.inc
> +++ b/doc/user_manual.inc
> @@ -125,6 +125,10 @@ download an archive currently not existing on the development host. But
> there are ways to prevent PTXdist from doing so (refer to section
> :ref:`source-arch-loc`).
>
> +.. note:: PTXdist tries to prevent downloads outside of the *get* stage
> + by setting certain widespread proxy environment variables to an
> + inexistent host name.
> +
> First steps with PTXdist
> ------------------------
>
^ 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