Skip to content

Commit 6ebe576

Browse files
committed
build: Make dependency package archive timestamps deterministic
1 parent 9e59d21 commit 6ebe576

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

depends/funcs.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ $($(1)_postprocessed): | $($(1)_staged)
233233
touch $$@
234234
$($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed)
235235
echo Caching $(1)...
236-
cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | $(build_TAR) --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -
236+
cd $$($(1)_staging_dir)/$(host_prefix); \
237+
find . ! -name '.stamp_postprocessed' -print0 | TZ=UTC xargs -0r touch -h -m -t 200001011200; \
238+
find . ! -name '.stamp_postprocessed' | LC_ALL=C sort | $(build_TAR) --numeric-owner --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -
237239
mkdir -p $$(@D)
238240
rm -rf $$(@D) && mkdir -p $$(@D)
239241
mv $$($(1)_staging_dir)/$$(@F) $$(@)

0 commit comments

Comments
 (0)