Skip to content

pkg-download: check hashes before the download (branch yem/download-hash)

Yann E. MORIN buildroot 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 0 repliesNew
  2. v4 posting 2/20 of 4 patches 0 repliesSuperseded
  3. v4 posting 1/24 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v35 patches0 repliesSuperseded
v25 patches0 repliesSuperseded
v14 patches0 repliesSuperseded

Changes in v5 from the cover letter

- clarify the arguments to the check-hash script (Thomas)
- typoes and space-damage (Thomas)

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4support/download: add option parsing to the download wrapperpackage/pkg-download.mk support/download/dl-wrapper support/download/wrapper+191 -1150 replies
2/4pkg-download: check for already downloaded file in the download wrapperpackage/pkg-download.mk support/download/dl-wrapper+5 -80 replies
3/4pkg-download: verify the hashes from the download wrapperpackage/pkg-download.mk support/download/check-hash support/download/dl-wrapper+40 -260 replies
4/4pkg-download: check hashes for locally cached filessupport/download/dl-wrapper+5 -10 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchThomas Petazzoni
1/4
2/4R-b
3/4
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [Buildroot] [PATCH 0/4 v5] pkg-download: check hashes before the download (branch yem/download-hash)

Hello All!

This series introduces a way to check hashes prior to doing a download.

This is required for when upstream silently update their release tarballs without renaming them, and the user is left with a stray locally cached tarball that no longer match the hashes with have for that package.

In so doing, this series:
- moves the check for a cached file into the wrapper;
- moves the post-download check for hashes into the wrapper;
- adds a pre-download check for hashes in the wrapper.

Doing the pre-download checks in the Makefile, like the post-download checks were done, made the Makefile a bit harder to read. On the other hand, we have a download wrapper shell script, so it is easier to do trickey stuff in there (shell syntax) than in the Makefile (make syntax can become unreadable pretty fast).

This has a side effect of cleaning up the pkg-download.mk Makefile, too, but that was not the goal.

Changes v4 -> v5:
- clarify the arguments to the check-hash script (Thomas)
- typoes and space-damage (Thomas)

Changes v3 -> v4:
- remove patch about checking hashes for host-packages (already applied differently by Peter)
- rebased on top of current master

Changes v2 -> v3:
- fix checking hashes for host packages
- fix left-over line continuations

Changes v1 -> v2:
- add options parsing to the wrapper (Thomas)
- typoes (Thomas)
- rename the wrapper to dl-wrapper so it looks better in the traces, and it is not confused with another wrapper

Regards,
Yann E. MORIN.

The following changes since commit f8639c79d8f8af4ac01176e64d69062ac4644561:

ncurses: speed up host build by disabling static library building (2014-12-11 22:52:32 +0100)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/download-hash

for you to fetch changes up to 06b4eb57a7671f63c52d7a71bfc141682fdb0e38:

pkg-download: check hashes for locally cached files (2014-12-11 23:36:23 +0100)

----------------------------------------------------------------
Yann E. MORIN (4):
support/download: add option parsing to the download wrapper
pkg-download: check for already downloaded file in the download wrapper
pkg-download: verify the hashes from the download wrapper
pkg-download: check hashes for locally cached files

 package/pkg-download.mk     |  78 +++++++++---------
 support/download/check-hash |  19 +++--
 support/download/dl-wrapper | 189 ++++++++++++++++++++++++++++++++++++++++++++
 support/download/wrapper    |  99 -----------------------
 4 files changed, 238 insertions(+), 147 deletions(-)
 create mode 100755 support/download/dl-wrapper
 delete mode 100755 support/download/wrapper
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'