debug files are not deterministic
After fixing #24999 (moved), when building the 8.0a2 release we noticed that the *-debug.tar.gz files are not deterministic.
It seems that the only difference is in the gzip timestamp, according to the diffoscope output:
--- tor-linux32-debug.tar.gz
+++ ../alpha/unsigned/8.0a2-build2/tor-linux32-debug.tar.gz
├── metadata
│ @@ -1 +1 @@
│ -gzip compressed data, last modified: Wed Feb 21 12:09:06 2018, from Unix
│ +gzip compressed data, last modified: Wed Feb 21 11:41:29 2018, from Unix
We can fix that by using the -n
gzip flag:
-n --no-name
When compressing, do not save the original file name and time stamp
by default. (The original name is always saved if the name had to
be truncated.) When decompressing, do not restore the original file
name if present (remove only the gzip suffix from the compressed
file name) and do not restore the original time stamp if present
(copy it from the compressed file). This option is the default when
decompressing.
An other solution is to create tar.xz
files instead of tar.gz
. This would also create smaller files.