aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2015-04-01 00:15:03 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-04-03 14:08:00 +0200
commit1ba85b7f874d926412eb4687e303cea441d65fec (patch)
tree789d824917094e9c6a05da4653fc65e84769e73f /support
parent1286222597d960b31567d30acdc01932c1f37afe (diff)
downloadbuildroot-1ba85b7f874d926412eb4687e303cea441d65fec.tar.gz
buildroot-1ba85b7f874d926412eb4687e303cea441d65fec.tar.bz2
support/download: add explicit no-hash support
Add support to explicitly state that an archive has no hash. This can be used for archives downloaded from a repository, like a git-clone or a subversion checkout, or using the github helper. This will come in handy when we'll eventually make hashes mandatory as soon as a .hash file exists: for some packages, like gcc, some versions are downloaded as archives from upstream, while other versions may come from a GitHub repository (via the github herlper). In this case, a .hash file would exist, that contains hashes for the downloaded tarballs, but archives downloaded from the repository would not have a hash (since it is currently not possible to have reproducible such archives). So, we'd need a way to explicitly state there is no hash, on purpose, for those archives. So, add 'none' as a new type of hash. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support')
-rwxr-xr-xsupport/download/check-hash4
1 files changed, 4 insertions, 0 deletions
diff --git a/support/download/check-hash b/support/download/check-hash
index cee64ef310..7a30d5b311 100755
--- a/support/download/check-hash
+++ b/support/download/check-hash
@@ -38,7 +38,11 @@ check_one_hash() {
# Note: md5 is supported, but undocumented on purpose.
# Note: sha3 is not supported, since there is currently no implementation
# (the NIST has yet to publish the parameters).
+ # Note: 'none' means there is explicitly no hash for that file.
case "${_h}" in
+ none)
+ return 0
+ ;;
md5|sha1) ;;
sha224|sha256|sha384|sha512) ;;
*) # Unknown hash, exit with error