aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-12-02 12:44:07 +0000
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-12-02 12:44:07 +0000
commit6ebe57622cb70df529879b15f291166177f2827c (patch)
tree086d70b1a7f1c471d8c17f372a726f4aae01329b /depends
parent9e59d21fbe5746b220f35b0a5a735198c3e6dcdb (diff)
build: Make dependency package archive timestamps deterministic
Diffstat (limited to 'depends')
-rw-r--r--depends/funcs.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/depends/funcs.mk b/depends/funcs.mk
index a00f380236..404eca9551 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -233,7 +233,9 @@ $($(1)_postprocessed): | $($(1)_staged)
touch $$@
$($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed)
echo Caching $(1)...
- cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | $(build_TAR) --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -
+ cd $$($(1)_staging_dir)/$(host_prefix); \
+ find . ! -name '.stamp_postprocessed' -print0 | TZ=UTC xargs -0r touch -h -m -t 200001011200; \
+ find . ! -name '.stamp_postprocessed' | LC_ALL=C sort | $(build_TAR) --numeric-owner --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -
mkdir -p $$(@D)
rm -rf $$(@D) && mkdir -p $$(@D)
mv $$($(1)_staging_dir)/$$(@F) $$(@)