[source] base-files: allow skipping of hash verification
LEDE Commits
lede-commits at lists.infradead.org
Thu Dec 14 00:29:59 PST 2017
blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/f4b9d9d6f13c898d473ce678234339e4a9dba5b2
commit f4b9d9d6f13c898d473ce678234339e4a9dba5b2
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue Dec 12 14:55:11 2017 +0100
base-files: allow skipping of hash verification
When calling a download target, hash verification is now completely
skipped if we set PKG_HASH=skip.
This allows to easily bump package version:
$ make package/<mypackage>/download PKG_HASH=skip V=s
$ make package/<mypackage>/check FIXUP=1 V=s
This will download the new version of the package, and then automatically
update PKG_HASH with the hash of the new version. Of course, it is still
the responsibility of the packager to ensure that the new tarball is
legitimate, because it is downloaded from a possibly untrusted source.
Fixes: b30ba14e ("scripts/download.pl: fail loudly if provided hash is unsupported")
Signed-off-by: Baptiste Jonglez <git at bitsofnetworks.org>
Signed-off-by: Jo-Philipp Wich <jo at mein.io>
Acked-by: Stijn Tintel <stijn at linux-ipv6.be>
Signed-off-by: John Crispin <john at phrozen.org>
---
scripts/download.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/download.pl b/scripts/download.pl
index 7754089..f5c3f71 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -88,7 +88,7 @@ sub download_cmd($) {
}
my $hash_cmd = hash_cmd();
-$hash_cmd or die "Cannot find appropriate hash command, ensure the provided hash is either a MD5 or SHA256 checksum.\n";
+$hash_cmd or ($file_hash eq "skip") or die "Cannot find appropriate hash command, ensure the provided hash is either a MD5 or SHA256 checksum.\n";
sub download
{
More information about the lede-commits
mailing list