Source: node-d3-scale-chromatic Version: 1.3.3-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that node-d3-scale-chromatic could not be built reproducibly. This is because it was embedding another build date in a "banner" comment: │ │ │ │ │ -// https://d3js.org/d3-scale-chromatic/ v1.3.3 Copyright 2019 Mike Bostock │ │ │ │ │ +// https://d3js.org/d3-scale-chromatic/ v1.3.3 Copyright 2020 Mike Bostock Patch attached that uses SOURCE_DATE_EPOCH. [0] https://reproducible-builds.org/ [1] https://reproducible-builds.org/specs/source-date-epoch/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible_build.diff 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible_build.diff 2019-06-22 11:23:58.585967793 +0100 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2019-06-22 + +--- node-d3-scale-chromatic-1.3.3.orig/rollup.config.js ++++ node-d3-scale-chromatic-1.3.3/rollup.config.js +@@ -9,7 +9,7 @@ const config = { + format: "umd", + indent: false, + extend: true, +- banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`, ++ banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime())).getFullYear()} ${meta.author.name}`, + globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"}))) + }, + plugins: [] --- a/debian/patches/series 2019-06-22 11:22:44.761320178 +0100 --- b/debian/patches/series 2019-06-22 11:23:39.485800279 +0100 @@ -1 +1,2 @@ fix_rollup_config.diff +reproducible_build.diff