support/download: really, really make git archives reproducible
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 27 Feb 2016 22:03:15 +0000 (23:03 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 27 Feb 2016 22:13:55 +0000 (23:13 +0100)
The way we use it, gzip will store the current time in the header, which
leads to unreproducible archives.

Fix that by telling gzip to not store the name and date of the file it
compresses, with the -n option. Since it compresses its stdin, there was
already no filename stored; now there's even no date stored.

Note: gzip has had -n since at least 1.2.4, released in 1993, so
virtually every gzip out there nowadays has it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/download/git

index e342ed31aa0bf0361dff93676c1fbabb98f10f99..314b388fbc9a6782d30849c40fe9a963181bcf6f 100755 (executable)
@@ -55,4 +55,4 @@ fi
 GIT_DIR="${basename}" \
 _git archive --prefix="'${basename}/'" -o "'${output}.tmp'" --format=tar "'${cset}'"
 
-gzip <"${output}.tmp" >"${output}"
+gzip -n <"${output}.tmp" >"${output}"