0

I would like to write a script, that generates .hash file for buildroot package of my app. I have problem with generating hash of tar.gz of whole git package automatically. I can do it by hand, copying hash, that Buildroot computes, and shows, when it gets wrong hash, but I want it to be done automatically.

Does anyone knows how Buildroot generates tar.gz archive from cloned repo? I know, that hash is computed in the same way by me and by Buildroot (I computed hash of file generated by Buildroot, and stored in dl folder).

Staszek
  • 849
  • 11
  • 28

1 Answers1

1

Buildroot clones the git repo using the script in support/download/git. The top of that script contains its documentation. You should call it as:

GIT=git support/download/git \
    atest-7ef095044a858f59981ad08283aea719ee005b46.tar.gz \
    https://github.com/amouiche/atest \
    7ef095044a858f59981ad08283aea719ee005b46 \
    atest-7ef095044a858f59981ad08283aea719ee005b46

(I've taken an existing, pretty small repository as an example here.) (Yes, I realize this invocation is absolutely not user-friendly. It is not supposed to be called by a user :-).

Alternatively, you can just create a .hash file with the wrong hash and let Buildroot download the file. It will print that the hash is wrong and there it will also report the correct hash. A future release of Buildroot should make this even easier.

Arnout
  • 2,927
  • 16
  • 24