Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: make reproducible find_md5 hash
While experimenting with the AUTOREMOVE option in search of a way to use prebuilt host tools in different buildroot, it was discovered that the md5 generated by find_md5 in depends.mk is not reproducible. Currently the hash is generated by the path of the file in addition to the file mod time. Out of confusion, probably, there was an idea that such command was used on the package build_dir. Reality is that this command is run on the package files. (Makefile, patches, src) This is problematic because the package Makefile (for example) change at each git clone and base the hash on the Makefile mtime is doesn't really reflect if the Makefile actually changes across a buildroot or not. A better approach is to generate an hash of each file and then generate an hash on the sort hard list. This way we remove the problem of git clone setting a wrong mtime while keeping the integrity of checking if a file changed for the package as any change will result in a different hash. This way the same hash is produced on different buildroot if the package files didn't change. Fixes: 36e0268 ("build: find_md5 list with mod time and sorted") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
- Loading branch information