utils/add-custom-hashes: add script to manage global patch dir hashes

Add a script to manage the .hash files in the BR2_GLOBAL_PATCH_DIR for
packages using custom versions.

To use it, run in a configured Buildroot directory, E.G.

  make foo_defconfig; ./utils/add-custom-hashes

We support multiple patch directories in BR2_GLOBAL_PATCH_DIR.  If multiple
directories are specified then use the last one as that is likely to be the
most specific one.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[Peter: silence command -v invocation]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 4984d0f230)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Peter Korsgaard
2023-11-07 13:44:38 +01:00
parent 943a1d15cf
commit 83b09400dd
2 changed files with 105 additions and 0 deletions

View File

@@ -79,3 +79,5 @@ the first file to exist is used to check a package download:
* +<global-patch-dir>/<packagename>/<packageversion>/<packagename>.hash+
* +<global-patch-dir>/<packagename>/<packagename>.hash+
The +utils/add-custom-hashes+ script can be used to generate these files.