tools: zip: fetch SOURCE_DATE_EPOCH directly

Remove "--mtime" option introduced in commit 18c9faa032 ("tools: zip:
add option for reproducible archives") and instead fetch SOURCE_DATE_EPOCH
environment variable directly in the code.

Ref: https://sourceforge.net/p/infozip/patches/25/
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
This commit is contained in:
Sungbo Eo
2022-02-12 17:01:31 +09:00
parent e42764cc5f
commit 39d06472eb
3 changed files with 41 additions and 146 deletions

View File

@@ -542,7 +542,6 @@ define Build/zip
mkdir $@.tmp
mv $@ $@.tmp/$(word 1,$(1))
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 $@))
rm -rf $@.tmp