* [Buildroot] [PATCH] boot/barebox-aux: exclude git downloads from hash check
@ 2020-03-19 21:56 Yann E. MORIN
2020-03-20 7:48 ` Yegor Yefremov
2020-03-27 23:06 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Yann E. MORIN @ 2020-03-19 21:56 UTC (permalink / raw)
To: buildroot
When barebox, and thus barebox-aux, are downloaded from a git tree, then
barebox-aux download fails because a hash check is attempted on the
downloaded archive:
Could not fetch special ref 'v2020.03.0'; assuming it is not special.
ERROR: No hash found for barebox-aux-v2020.03.0.tar.gz
This is because we only exclude from the check the archive of the bare
barebox:
BR_NO_CHECK_HASH_FOR += $(BAREBOX_SOURCE)
However, the default name of an archive is based on the package name,
which for barebox-aux is not 'barebox'.
Since barebox-aux really uses the exact same source as the bare barebox,
it should also share the archive name.
This has two direct consequences and advantages:
- the hash check is completely avoided for the barebox-aux archive;
- the barebox-aux archive is not downloaded as it is already
downloaded for barebox.
Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
Note: that last claim about the download being done only once requires
that a previous patch be applied first (with typoes fixed):
https://patchwork.ozlabs.org/patch/1258482/
---
boot/barebox/barebox.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 3d7492598f..1efe5665de 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -25,6 +25,10 @@ $(1)_SOURCE = $$(notdir $$($(1)_TARBALL))
else ifeq ($$(BR2_TARGET_BAREBOX_CUSTOM_GIT),y)
$(1)_SITE = $$(call qstrip,$$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL))
$(1)_SITE_METHOD = git
+# Override the default value of _SOURCE to 'barebox-*' so that it is not
+# downloaded a second time for barebox-aux; also alows avoiding the hash
+# check:
+$(1)_SOURCE = barebox-$$($(1)_VERSION).tar.gz
else
# Handle stable official Barebox versions
$(1)_SOURCE = barebox-$$($(1)_VERSION).tar.bz2
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] boot/barebox-aux: exclude git downloads from hash check
2020-03-19 21:56 [Buildroot] [PATCH] boot/barebox-aux: exclude git downloads from hash check Yann E. MORIN
@ 2020-03-20 7:48 ` Yegor Yefremov
2020-03-27 23:06 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Yegor Yefremov @ 2020-03-20 7:48 UTC (permalink / raw)
To: buildroot
On Thu, Mar 19, 2020 at 10:57 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> When barebox, and thus barebox-aux, are downloaded from a git tree, then
> barebox-aux download fails because a hash check is attempted on the
> downloaded archive:
>
> Could not fetch special ref 'v2020.03.0'; assuming it is not special.
> ERROR: No hash found for barebox-aux-v2020.03.0.tar.gz
>
> This is because we only exclude from the check the archive of the bare
> barebox:
>
> BR_NO_CHECK_HASH_FOR += $(BAREBOX_SOURCE)
>
> However, the default name of an archive is based on the package name,
> which for barebox-aux is not 'barebox'.
>
> Since barebox-aux really uses the exact same source as the bare barebox,
> it should also share the archive name.
>
> This has two direct consequences and advantages:
>
> - the hash check is completely avoided for the barebox-aux archive;
>
> - the barebox-aux archive is not downloaded as it is already
> downloaded for barebox.
>
> Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
>
> ---
> Note: that last claim about the download being done only once requires
> that a previous patch be applied first (with typoes fixed):
> https://patchwork.ozlabs.org/patch/1258482/
> ---
> boot/barebox/barebox.mk | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
> index 3d7492598f..1efe5665de 100644
> --- a/boot/barebox/barebox.mk
> +++ b/boot/barebox/barebox.mk
> @@ -25,6 +25,10 @@ $(1)_SOURCE = $$(notdir $$($(1)_TARBALL))
> else ifeq ($$(BR2_TARGET_BAREBOX_CUSTOM_GIT),y)
> $(1)_SITE = $$(call qstrip,$$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL))
> $(1)_SITE_METHOD = git
> +# Override the default value of _SOURCE to 'barebox-*' so that it is not
> +# downloaded a second time for barebox-aux; also alows avoiding the hash
> +# check:
> +$(1)_SOURCE = barebox-$$($(1)_VERSION).tar.gz
> else
> # Handle stable official Barebox versions
> $(1)_SOURCE = barebox-$$($(1)_VERSION).tar.bz2
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] boot/barebox-aux: exclude git downloads from hash check
2020-03-19 21:56 [Buildroot] [PATCH] boot/barebox-aux: exclude git downloads from hash check Yann E. MORIN
2020-03-20 7:48 ` Yegor Yefremov
@ 2020-03-27 23:06 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-03-27 23:06 UTC (permalink / raw)
To: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> When barebox, and thus barebox-aux, are downloaded from a git tree, then
> barebox-aux download fails because a hash check is attempted on the
> downloaded archive:
> Could not fetch special ref 'v2020.03.0'; assuming it is not special.
> ERROR: No hash found for barebox-aux-v2020.03.0.tar.gz
> This is because we only exclude from the check the archive of the bare
> barebox:
> BR_NO_CHECK_HASH_FOR += $(BAREBOX_SOURCE)
> However, the default name of an archive is based on the package name,
> which for barebox-aux is not 'barebox'.
> Since barebox-aux really uses the exact same source as the bare barebox,
> it should also share the archive name.
> This has two direct consequences and advantages:
> - the hash check is completely avoided for the barebox-aux archive;
> - the barebox-aux archive is not downloaded as it is already
> downloaded for barebox.
> Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
> Note: that last claim about the download being done only once requires
> that a previous patch be applied first (with typoes fixed):
> https://patchwork.ozlabs.org/patch/1258482/
Committed to 2019.02.x, 2019.11.x and 2020.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-27 23:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 21:56 [Buildroot] [PATCH] boot/barebox-aux: exclude git downloads from hash check Yann E. MORIN
2020-03-20 7:48 ` Yegor Yefremov
2020-03-27 23:06 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.