aboutsummaryrefslogtreecommitdiffstats
path: root/include/image-commands.mk
diff options
context:
space:
mode:
authorSungbo Eo <mans0n@gorani.run>2022-02-12 17:01:31 +0900
committerSungbo Eo <mans0n@gorani.run>2022-03-09 15:38:23 +0900
commite42764cc5fa364e9fa553903c56191484738965e (patch)
treecd8de2a7916138a0adc0dc57427ad9508bb7f912 /include/image-commands.mk
parented364cd4b03b289a7bb4b32c350c46eddeb6b6b9 (diff)
downloadupstream-e42764cc5fa364e9fa553903c56191484738965e.tar.gz
upstream-e42764cc5fa364e9fa553903c56191484738965e.tar.bz2
upstream-e42764cc5fa364e9fa553903c56191484738965e.zip
build: image: use UTC for zip timestamp
Zip uses DOS timestamp for mtime which is stored in local time and hence depends on the timezone of the build system. Force zip to use UTC timezone to make image builds more reproducible. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Diffstat (limited to 'include/image-commands.mk')
-rw-r--r--include/image-commands.mk3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 939f5ef2db..21f851d205 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -541,8 +541,7 @@ define Build/zip
rm -rf $@.tmp
mkdir $@.tmp
mv $@ $@.tmp/$(word 1,$(1))
-
- $(STAGING_DIR_HOST)/bin/zip -j -X \
+ TZ=UTC $(STAGING_DIR_HOST)/bin/zip -j -X \
$(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \
$(wordlist 2,$(words $(1)),$(1)) \
$@ $@.tmp/$(if $(word 1,$(1)),$(word 1,$(1)),$$(basename $@))