From 29793cb7f8f7e6234c09c4156c720b30aaebae1c Mon Sep 17 00:00:00 2001 From: Tan Yifeng Date: Fri, 2 Sep 2022 11:13:41 +0800 Subject: [PATCH] images.mk: make sort result stable to generate the same image tag at diffrent machines Signed-off-by: Tan Yifeng --- tools/images.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/images.mk b/tools/images.mk index 9cbea47a7..f15e31680 100644 --- a/tools/images.mk +++ b/tools/images.mk @@ -76,7 +76,7 @@ dockerfile = $$(if [ -f "$(call path,$(1))/Dockerfile.$(ARCH)" ]; then echo Dock # The tag construct is used to memoize the image generated (see README.md). # This scheme is used to enable aggressive caching in a central repository, but # ensuring that images will always be sourced using the local files. -tag = $(shell cd images && find $(subst _,/,$(1)) -type f | sort | xargs -n 1 sha256sum | sha256sum - | cut -c 1-16) +tag = $(shell cd images && find $(subst _,/,$(1)) -type f | sort -f -d | xargs -n 1 sha256sum | sha256sum - | cut -c 1-16) remote_image = $(REMOTE_IMAGE_PREFIX)/$(subst _,/,$(1))_$(ARCH) local_image = $(LOCAL_IMAGE_PREFIX)/$(subst _,/,$(1))