0001-sounds-do-not-download-and-check-sha1s.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From 3e8a9e9a1c7eae515eb628778c3c8a04338b3bb3 Mon Sep 17 00:00:00 2001
  2. From: "Yann E. MORIN" <yann.morin.1998@free.fr>
  3. Date: Tue, 27 Dec 2016 11:21:09 +0100
  4. Subject: [PATCH] sounds: do not download and check sha1s
  5. To validate the sound archives, the corresponding sha1s are also
  6. downloaded from the same location, and that download is done at install
  7. time.
  8. However, that poses at least two problems:
  9. - in Buildroot, we already have validated the downloads with the sha1s
  10. anyway, and trying to download anything at install time is not
  11. always possible (e.g. for off-line builds);
  12. - since the download scheme is not secured (plain http), a
  13. man-in-the-middle for the sounds will also be able to MITM the
  14. download of the sha1s, so there is absolutely no additional safety
  15. in doing so.
  16. So we just do without the sha1 download and checks.
  17. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  18. ---
  19. sounds/Makefile | 10 ----------
  20. 1 file changed, 10 deletions(-)
  21. diff --git a/sounds/Makefile b/sounds/Makefile
  22. index 84d0f45..7a80d56 100644
  23. --- a/sounds/Makefile
  24. +++ b/sounds/Makefile
  25. @@ -100,17 +100,7 @@ ifneq ($(SOUNDS_CACHE_DIR),)
  26. if test ! -f "$$(SOUNDS_CACHE_DIR)/$$@"; then \
  27. (cd "$$(SOUNDS_CACHE_DIR)"; $$(DOWNLOAD) $$(SOUNDS_URL)/$$@); \
  28. fi; \
  29. - if test ! -f "$$(SOUNDS_CACHE_DIR)/$$@.sha1"; then \
  30. - (cd "$$(SOUNDS_CACHE_DIR)"; $$(DOWNLOAD) $$(SOUNDS_URL)/$$@.sha1); \
  31. - fi; \
  32. $$(LN) -sf "$$(SOUNDS_CACHE_DIR)/$$@" .; \
  33. - $$(LN) -sf "$$(SOUNDS_CACHE_DIR)/$$@.sha1" .; \
  34. - $$(SHA1SUM) -c --status $$@.sha1 || \
  35. - ( \
  36. - rm -f "$$(SOUNDS_CACHE_DIR)/$$@" "$$(SOUNDS_CACHE_DIR)/$$@.sha1" $$@ $$@.sha1; \
  37. - echo "Bad checksum: $$@" 1>&2; \
  38. - exit 1; \
  39. - ) || exit 1; \
  40. fi
  41. else
  42. $(CMD_PREFIX) \
  43. --
  44. 2.7.4