Repository navigation
tools/check-hash: enhance hash validation and integrate with Make.defs, LVGL, and zlib - #3833
Open
Swatantra-66 wants to merge 1 commit into
Open
Swatantra-66 wants to merge 1 commit into
Swatantra-66 wants to merge 1 commit into
Conversation
1 task done
Enhance tools/check-hash.sh and integrate automated hash checking for external downloads: 1. tools/check-hash.sh: - Replace which with POSIX command -v. - Support md5 alongside sha1/sha224/sha256/sha384/sha512. - Keep 100% shell-based (command -v, awk) without Python dependencies. - Normalize hashes to lowercase for case-insensitive comparison. - Support optional bypass when expected hash is empty, "none", or "skip". - Remove corrupted downloads on hash mismatch. 2. Make.defs: - Centralize CHECKHASH (?= $(APPDIR)$(DELIM)tools$(DELIM)check-hash.sh). 3. graphics/lvgl & system/zlib: - Add SHA256 validation both on download and prior to unpacking. - Add matching URL_HASH in CMakeLists.txt (FetchContent_Declare). Fixes apache#3418. Signed-off-by: Swatantra Yadav <maverickswatantra@gmail.com>
Swatantra-66
force-pushed
the
feature/check-hash
branch
from
October 11, 2026 10:34
e3cc8ab to
0239c5b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses #3418 by enhancing the centralized
tools/check-hash.shscript and integrating SHA256 checksum verification intographics/lvglandsystem/zlibas pilot implementations.tools/check-hash.shEnhancements:whichchecks with POSIXcommand -v.command -v,awk,tr) without Python dependencies.md5alongsidesha1|sha224|sha256|sha384|sha512for legacy packages, while using SHA256+ for new and updated packages.tr '[:upper:]' '[:lower:]'for case-insensitive comparison.skip,none, or empty.rm -f) upon mismatch so subsequent build attempts re-download cleanly.Make.defsCentralization:CHECKHASH ?= $(APPDIR)$(DELIM)tools$(DELIM)check-hash.shunder# Toolsto standardize invocation across all apps Makefiles.graphics/lvgl&system/zlibIntegration:LVGL_TARBALL_SHA256andZLIB_TARBALL_SHA256with?=to allow user overrides.URL_HASH SHA256=...to CMakeFetchContent_Declare.Fixes #3418
Impact
<PKG>_TARBALL_SHA256or bypass validation if using bleeding-edge unversioned sources.Testing
skip/none) -> Emits warning and passes (exit code 0).tools/checkpatch.sh -p HEAD-> 0 errors, 0 warnings.