openwrt/include
Christian Marangi 53a08e3743
build: make find_md5 reproducible with AUTOREMOVE
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 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 hash 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.

Introduce a new kind of find_md5 function, find_md5_reproducible that
apply this new logic and limit it only with AUTOREMOVE option set to
prevent any kind of slowdown due to additional hash generation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-30 22:26:51 +02:00
..
site
autotools.mk libiconv-stub: remove 2022-07-15 15:21:44 +02:00
bpf.mk
cmake.mk
debug.mk
depends.mk build: make find_md5 reproducible with AUTOREMOVE 2022-09-30 22:26:51 +02:00
device_table.txt
download.mk
feeds.mk
hardened-ld-pie.specs
hardening.mk
host-build.mk build: make find_md5 reproducible with AUTOREMOVE 2022-09-30 22:26:51 +02:00
image-commands.mk image-commands: fix generating out-of-tree DTO 2022-07-30 19:04:36 +02:00
image.mk imagebuilder: clean KDIR_TMP before building 2022-09-10 21:07:24 +02:00
kernel-5.10 kernel: bump 5.10 to 5.10.144 2022-09-22 12:46:55 +02:00
kernel-5.15 kernel: bump 5.15 to 5.15.69 2022-09-22 12:46:55 +02:00
kernel-build.mk build: make find_md5 reproducible with AUTOREMOVE 2022-09-30 22:26:51 +02:00
kernel-defaults.mk uml: headers are not exportable 2022-09-24 23:52:14 +02:00
kernel-version.mk
kernel.mk kernel: filter -no-plt from KCFLAGS 2022-06-21 16:41:17 +01:00
logo.png
logo.svg
meson.mk tools/meson: update to 0.61.4 2022-04-09 15:56:04 +02:00
netfilter.mk kernel: kmod-ipt-ulog: Remove package 2022-08-10 21:36:17 +02:00
nls.mk libiconv-stub: remove 2022-07-15 15:21:44 +02:00
openssl-engine.mk openssl: move engine.mk to INCLUDE_DIR 2022-03-23 23:13:51 +00:00
package-bin.mk
package-defaults.mk
package-dumpinfo.mk
package-ipkg.mk
package-seccomp.mk
package.mk build: make find_md5 reproducible with AUTOREMOVE 2022-09-30 22:26:51 +02:00
prereq-build.mk include/prereq-build: fix ldconfig-stub symlink on macos and BSD OSs 2022-09-27 16:54:42 +02:00
prereq.mk
quilt.mk quilt.mk: fix typo in the Host section 2022-03-19 16:13:58 +01:00
rootfs.mk
scan.awk
scan.mk build: fix find warning with SCAN_EXTRA 2022-06-05 15:38:27 +02:00
shell.sh
subdir.mk
target.mk build: fix issues with targets installed via feeds 2022-09-27 13:41:12 +02:00
toolchain-build.mk toolchain: fix dangling symlink to self in FixupLibdir 2022-07-01 19:17:36 +02:00
toplevel.mk build: export STAGING_DIR_HOST in toplevel make code 2022-09-05 11:17:19 +02:00
trusted-firmware-a.mk trusted-firmware-a.mk: pass DTC path similar to u-boot.mk 2022-08-28 19:01:55 +01:00
u-boot.mk u-boot.mk: add LOCALVERSION (explicitly specify OpenWrt build) 2022-02-28 23:54:52 +01:00
uclibc++.mk
unpack.mk
verbose.mk verbose.mk: print ERROR messages in non-verbose 2022-02-28 23:52:13 +01:00
version.mk