From 632764b4074245de82adbba234d072c2f19f3073 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 10 Jul 2023 10:51:42 -0700 Subject: [PATCH] Make tar archives deterministic --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f4648fbf..b205318c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -57,7 +57,8 @@ steps: - mkdir -p deploy/cwtch - cp -r build/linux/x64/release/bundle/* deploy/cwtch - cd deploy - - tar -czf cwtch-`cat ../VERSION`.tar.gz cwtch + # Tar archives need a few tricks to make this deterministic, see https://reproducible-builds.org/docs/archives/ + - tar --sort=name --mtime=`cat COMMIT_DATE` --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime -czf cwtch-`cat ../VERSION`.tar.gz cwtch - rm -r cwtch - name: linux-ui-tests