Source: node-package-preamble Version: 0.1.0-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: toolchain timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that node-package-preamble generates output that is not reproducible which is affecting the reproducibility of (at least) 5 packages. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
diff --git a/bin/preamble b/bin/preamble index a563140..be96d96 100755 --- a/bin/preamble +++ b/bin/preamble @@ -3,12 +3,17 @@ var os = require("os"), fs = require("fs"); +var now = new Date(); +if (process.env.SOURCE_DATE_EPOCH) { + now = new Date((process.env.SOURCE_DATE_EPOCH * 1000) + (now.getTimezoneOffset() * 60000)); +} + fs.readFile("package.json", "utf8", function(error, text) { if (error) throw error; var json = JSON.parse(text); process.stdout.write("// " + (json.homepage || json.name) + " Version " + json.version + "." - + " Copyright " + (new Date).getFullYear() + + " Copyright " + now.getFullYear() + " " + json.author.name + (/\.$/.test(json.author.name) ? "" : ".") + os.EOL); });
-- Pkg-javascript-devel mailing list Pkg-javascript-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel