All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 8/8 v4] support/download: do not accept exlcuded files with ashes
Date: Tue, 14 Apr 2015 01:56:02 +0200	[thread overview]
Message-ID: <552C5792.6090606@mind.be> (raw)
In-Reply-To: <ee02447feb64c265dcf5e7a60dddb630c7dc9402.1428512075.git.yann.morin.1998@free.fr>

 In subject: excluded hashes

 However, I'm not so sure of this one. Let's say that I configure a custom
toolchain that comes from Linaro, and later on upstream buildroot adds official
support for this toolchain including a hash, then suddenly I'll get an error for
my custom toolchain...

 Also:

On 08/04/15 18:57, Yann E. MORIN wrote:
> If a file is excluded from checking its hashes, it must effectively have
> no hash for it.
> 
> So, if an excluded file indeed has at least one hash, there is an issue
> somewhere; that file should probably not be excluded.
> 
> When this happens, bail out in error.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> ---
>  support/download/check-hash | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/support/download/check-hash b/support/download/check-hash
> index 96f5965..849637e 100755
> --- a/support/download/check-hash
> +++ b/support/download/check-hash
> @@ -18,6 +18,9 @@ set -e
>  #       one of its hashes
>  #   3:  the hash file exists and there was no hash to check the file against
>  #   4:  the hash file exists and at least one hash type is unknown
> +#   5:  the hash file exists and there was at least one hash for the file
> +#       to check and all those hashes did match, but the file is excluded
> +#       from being checked
>  
>  while getopts :q OPT; do
>      case "${OPT}" in
> @@ -106,4 +109,11 @@ if [ ${nb_checks} -eq 0 ]; then
>      done
>      printf "ERROR: No hash found for %s\n" "${base}" >&2
>      exit 3
> +else
> +    for f in ${BR_NO_CHECK_HASH_FOR}; do
> +        if [ "${f}" = "${base}" ]; then
> +            printf "ERROR: Hash found for excluded %s\n" "${base}" >&2
> +            exit 5
> +        fi
> +    done

 I'd move this check before actually checking the hash; I have the feeling it
will be pretty likely that the hashes will mismatch when this error occurs, and
then this error is probably the root issue.

 Regards,
 Arnout

>  fi
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

      reply	other threads:[~2015-04-13 23:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 16:57 [Buildroot] [PATCH 0/8 v4] toolchain: better handle hashes (branch yem/dl-hash-toolchains) Yann E. MORIN
2015-04-08 16:57 ` [Buildroot] [PATCH 1/8 v4] package/gcc: add hashes Yann E. MORIN
2015-04-13 23:32   ` Arnout Vandecappelle
2015-04-19  9:13     ` Yann E. MORIN
2015-04-08 16:57 ` [Buildroot] [PATCH 2/8 v4] package/binutils: " Yann E. MORIN
2015-04-13 23:35   ` Arnout Vandecappelle
2015-04-08 16:57 ` [Buildroot] [PATCH 3/8 v4] package/uclibc: add missing hash for eXtensa Yann E. MORIN
2015-04-13 23:36   ` Arnout Vandecappelle
2015-04-08 16:57 ` [Buildroot] [PATCH 4/8 v4] support/download: add possibility to not fail on missing hash Yann E. MORIN
2015-04-13 23:43   ` Arnout Vandecappelle
2015-04-19  9:42     ` Yann E. MORIN
2015-04-08 16:57 ` [Buildroot] [PATCH 5/8 v4] toolchain/external: ignore missing hash for custom downloaded toolchain Yann E. MORIN
2015-04-13 23:44   ` Arnout Vandecappelle
2015-04-08 16:57 ` [Buildroot] [PATCH 6/8 v4] package/uclibc: ignore missing hash for snapshots Yann E. MORIN
2015-04-13 23:45   ` Arnout Vandecappelle
2015-04-08 16:57 ` [Buildroot] [PATCH 7/8 v4] support/download: restore mandatory check of hashes Yann E. MORIN
2015-04-13 23:46   ` Arnout Vandecappelle
2015-04-08 16:57 ` [Buildroot] [PATCH 8/8 v4] support/download: do not accept exlcuded files with ashes Yann E. MORIN
2015-04-13 23:56   ` Arnout Vandecappelle [this message]

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=552C5792.6090606@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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 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.