Make the tar file more deterministic.
Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
diff --git a/open_pdks/run.sh b/open_pdks/run.sh
index 36fb18a..8848d18 100755
--- a/open_pdks/run.sh
+++ b/open_pdks/run.sh
@@ -80,7 +80,21 @@
whoami
ls -l out/pdk-all
cd out/pdk-all
- sudo tar -cvf --xz $TOP_DIR/out/pdk-SKY130A.tar.xz .
+ # Try to create a deterministic tar file
+ # https://reproducible-builds.org/docs/archives/
+ sudo tar \
+ --create \
+ --xz \
+ --verbose \
+ \
+ --mtime='2020-05-07 00:00Z' \
+ --sort=name \
+ --owner=0 \
+ --group=0 \
+ --numeric-owner \
+ --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
+ \
+ --file $TOP_DIR/out/pdk-SKY130A.tar.xz .
)
sudo chown $UID $TOP_DIR/out/*.tar.xz
du -h $TOP_DIR/out/*.tar.xz