Source: node-rollup Version: 0.50.0-1 Severity: wishlist Tags: patch User: [email protected] Usertags: timestamps X-Debbugs-Cc: [email protected]
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that node-rollup could not be built reproducibly as it encodes the current build time via "new Date()". Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` [email protected] / chris-lamb.co.uk `-
--- a/debian/patches/0001-reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/0001-reproducible-build.patch 2018-03-02 09:41:49.392154726 +0000 @@ -0,0 +1,19 @@ +Description: Make the build reproducible +Author: Chris Lamb <[email protected]> +Last-Update: 2018-03-02 + +--- node-rollup-0.50.0.orig/rollup.config.js ++++ node-rollup-0.50.0/rollup.config.js +@@ -14,9 +14,11 @@ const commitHash = (function() { + } + })(); + ++const now = new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime()); ++ + const banner = readFileSync('src/banner.js', 'utf-8') + .replace('${version}', pkg.version) +- .replace('${time}', new Date()) ++ .replace('${time}', now.toUTCString()) + .replace('${commitHash}', commitHash); + + export default [ --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2018-03-02 09:20:55.357126507 +0000 @@ -0,0 +1 @@ +0001-reproducible-build.patch
-- Pkg-javascript-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel
