Commit b023946d authored by Lily Foster's avatar Lily Foster Committed by Winter
Browse files

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.
parent 125bd1f0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@
            hash = "sha256-X9mCwPqV5yP0S2GonNvpYnLSLJMd/SUIked+hMRxDpA=";
          };

          hash = "sha256-5Mg7KDJLMM5e/7BCHGinGAnBRft2ySQzvKW06p3u/0o=";
          hash = "sha256-tEdElWJ+KBTxBobzXBpPopQSwK2usGW/it1+yfbVzBw=";
        };

        linkDependencies = makeTest {
@@ -107,7 +107,7 @@
            hash = "sha256-1fGNxYJi1I4cXK/jinNG+Y6tPEOhP3QAqWOBEQttS9E=";
          };

          hash = "sha256-8xF8F74nHwL9KPN2QLsxnfvsk0rNCKOZniYJQCD5u/I=";
          hash = "sha256-+KA8/orSBJ4EhuSyQO8IKSxsN/FAsYU3lOzq+awuxNQ=";
        };
      };

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