prefetch-npm-deps: fix hash stability

GNU tar will apparently silently include mtime of files if --mtime is
passed with an unrecognized date format. This led to hash instability
from those mtimes and this fixes it to force all mtimes to epoch
timestamp 0.
This commit is contained in:
Lily Foster 2022-11-23 16:31:44 -05:00 committed by Winter
parent 125bd1f0b5
commit b023946d2b
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@
hash = "sha256-X9mCwPqV5yP0S2GonNvpYnLSLJMd/SUIked+hMRxDpA="; hash = "sha256-X9mCwPqV5yP0S2GonNvpYnLSLJMd/SUIked+hMRxDpA=";
}; };
hash = "sha256-5Mg7KDJLMM5e/7BCHGinGAnBRft2ySQzvKW06p3u/0o="; hash = "sha256-tEdElWJ+KBTxBobzXBpPopQSwK2usGW/it1+yfbVzBw=";
}; };
linkDependencies = makeTest { linkDependencies = makeTest {
@ -107,7 +107,7 @@
hash = "sha256-1fGNxYJi1I4cXK/jinNG+Y6tPEOhP3QAqWOBEQttS9E="; hash = "sha256-1fGNxYJi1I4cXK/jinNG+Y6tPEOhP3QAqWOBEQttS9E=";
}; };
hash = "sha256-8xF8F74nHwL9KPN2QLsxnfvsk0rNCKOZniYJQCD5u/I="; hash = "sha256-+KA8/orSBJ4EhuSyQO8IKSxsN/FAsYU3lOzq+awuxNQ=";
}; };
}; };

View File

@ -421,7 +421,7 @@ fn main() -> anyhow::Result<()> {
data = Command::new("tar") data = Command::new("tar")
.args([ .args([
"--sort=name", "--sort=name",
"--mtime=0", "--mtime=@0",
"--owner=0", "--owner=0",
"--group=0", "--group=0",
"--numeric-owner", "--numeric-owner",