Przeglądaj źródła

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 <[email protected]>
Signed-off-by: Jo-Philipp Wich <[email protected]>
Acked-by: Stijn Tintel <[email protected]>
Signed-off-by: John Crispin <[email protected]>
Jo-Philipp Wich 7 lat temu
rodzic
commit
f4b9d9d6f1
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      scripts/download.pl

+ 1 - 1
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
 {