summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-01-02 16:06:42 +0100
committerPeter Korsgaard <peter@korsgaard.com>2016-01-03 21:51:50 +0100
commitefe7f684a66b54bf133e6b377b19653a163c89e0 (patch)
tree775772123fcb1fdfc1d000b9f631392cc2110f9d
parent2565b56a11213f14239f7dc7b212855b9987d648 (diff)
downloadbuildroot-efe7f684a66b54bf133e6b377b19653a163c89e0.tar.gz
buildroot-efe7f684a66b54bf133e6b377b19653a163c89e0.zip
support/download: generate reproducible Bazaar archives
Similarly to what has previously been done for the Hg download backend, instruct bzr to generate the archive on stdout, so that we can generate reproducible archives. When instructing bzr to generate the output file by itself, it uses a temporary file that is then fed to gzip, which in turn stores the timestamp of that file in the generated archive, whereas when the output is generated on stdout, there is no timestamp, so the archive is then reproducible. Bizarely enough, we can tell 'bazaar' not to generate a bazaar in the archive. Cool, uh? ;-] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rwxr-xr-xsupport/download/bzr4
1 files changed, 3 insertions, 1 deletions
diff --git a/support/download/bzr b/support/download/bzr
index cec9ce8f37..a8a8887151 100755
--- a/support/download/bzr
+++ b/support/download/bzr
@@ -32,4 +32,6 @@ _bzr() {
eval ${BZR} "${@}"
}
-_bzr export ${verbose} --root="'${basename}/'" --format=tgz "'${output}'" "'${repo}'" -r "'${rev}'"
+_bzr export ${verbose} --root="'${basename}/'" --format=tgz \
+ --per-file-timestamps - "'${repo}'" -r "'${rev}'" \
+ >"${output}"
OpenPOWER on IntegriCloud