support/download: generate reproducible Hg archives
PATCH 1/1 support/download: generate reproducible Hg archives
When hg directly creates the output file, the hash for that file changes everytime.
However, if we just tell hg to output the archive on stdout and we do the redirect to the file, then the archive is reproducible.
(The reason is that in the first case, a temporary file is created and then compressed, and gzip is adding the filename and its timestamp in the gzip header, while in the second case, there is no temporary file, and thus no timestamp and thus it is reproducible.)
---
Note: Yegor, you'll now be able to use the 'hg' method to download reproducible archives! Hehe! ;-)
--- support/download/hg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/download/hg +1 -1
@@ -35,4 +35,4 @@ _hg clone ${verbose} --noupdate "'${repo}'" "'${basename}'" _hg archive ${verbose} --repository "'${basename}'" --type tgz \ --prefix "'${basename}'" --rev "'${cset}'" \ - "'${output}'" + - >"${output}"
Signature · 1 line
1.9.1
PATCH 1/1 support/download: generate reproducible Hg archives
Quoted 6 lines · Yann E. MORIN
When hg directly creates the output file, the hash for that file changes everytime.
However, if we just tell hg to output the archive on stdout and we do the redirect to the file, then the archive is reproducible.
Quoted 7 lines
(The reason is that in the first case, a temporary file is created and then compressed, and gzip is adding the filename and its timestamp in the gzip header, while in the second case, there is no temporary file, and thus no timestamp and thus it is reproducible.)
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Yegor Yefremov <[email protected]>
Quoted 20 lines
---
Note: Yegor, you'll now be able to use the 'hg' method to download reproducible archives! Hehe! ;-)--- support/download/hg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)support/download/hg +1
-2@@ -35,4 +35,4 @@ _hg clone ${verbose} --noupdate "'${repo}'" "'${basename}'" _hg archive ${verbose} --repository "'${basename}'" --type tgz \ --prefix "'${basename}'" --rev "'${cset}'" \ - "'${output}'" + - >"${output}" --1.9.1
PATCH 1/1 support/download: generate reproducible Hg archives
In reply to Yann E. MORINQuoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
When hg directly creates the output file, the hash for that file changes everytime.
However, if we just tell hg to output the archive on stdout and we do the redirect to the file, then the archive is reproducible.
(The reason is that in the first case, a temporary file is created and then compressed, and gzip is adding the filename and its timestamp in the gzip header, while in the second case, there is no temporary file, and thus no timestamp and thus it is reproducible.)
Quoted 6 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Yegor Yefremov <[email protected]>---
Note: Yegor, you'll now be able to use the 'hg' method to download reproducible archives! Hehe! ;-)
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard