mirror of https://github.com/hak5/openwrt.git
build: include package directory in sha256sums when running on buildbot
In order to be able to better compare files to sync in the future, include
all BIN_DIR subdirectories in the checksum calculation.
To not break existing applications, restrict the recursive checksumming to
CONFIG_BUILDBOT for now.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 681e825f8f
)
openwrt-18.06
parent
ef7a6a4d72
commit
3b9bfe8328
2
Makefile
2
Makefile
|
@ -85,7 +85,7 @@ prereq: $(target/stamp-prereq) tmp/.prereq_packages
|
||||||
fi
|
fi
|
||||||
|
|
||||||
checksum: FORCE
|
checksum: FORCE
|
||||||
$(call sha256sums,$(BIN_DIR))
|
$(call sha256sums,$(BIN_DIR),$(CONFIG_BUILDBOT))
|
||||||
|
|
||||||
diffconfig: FORCE
|
diffconfig: FORCE
|
||||||
mkdir -p $(BIN_DIR)
|
mkdir -p $(BIN_DIR)
|
||||||
|
|
3
rules.mk
3
rules.mk
|
@ -391,8 +391,9 @@ endef
|
||||||
|
|
||||||
# Calculate sha256sum of any plain file within a given directory
|
# Calculate sha256sum of any plain file within a given directory
|
||||||
# $(1) => Input directory
|
# $(1) => Input directory
|
||||||
|
# $(2) => If set, recurse into subdirectories
|
||||||
define sha256sums
|
define sha256sums
|
||||||
(cd $(1); find . -maxdepth 1 -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
|
(cd $(1); find . $(if $(2),,-maxdepth 1) -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
|
||||||
xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums)
|
xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue