aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2016-02-27 23:03:15 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2016-02-27 23:13:55 +0100
commit87731820926cd6f51879d7b89687bfec2e615b3d (patch)
tree90ac7cfb39a19d8f6d032740a3a31d16fc993daa
parent7f3a52f981274da2db17500a0908466d6aed83c7 (diff)
downloadbuildroot-87731820926cd6f51879d7b89687bfec2e615b3d.tar.gz
buildroot-87731820926cd6f51879d7b89687bfec2e615b3d.tar.bz2
support/download: really, really make git archives reproducible
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>
-rwxr-xr-xsupport/download/git2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/download/git b/support/download/git
index e342ed31aa..314b388fbc 100755
--- a/support/download/git
+++ b/support/download/git
@@ -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}"