From 70e05c2a08b76d2fc7a062817353dfd1d879cb20 Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Wed, 10 Jul 2019 16:40:28 +0530 Subject: Make build reproducible --- debian/patches/remove-unsupported-syntax.patch | 4 ++-- debian/patches/reproducible_build.diff | 15 +++++++++++++++ debian/patches/series | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 debian/patches/reproducible_build.diff diff --git a/debian/patches/remove-unsupported-syntax.patch b/debian/patches/remove-unsupported-syntax.patch index 163dac1..bf1b359 100644 --- a/debian/patches/remove-unsupported-syntax.patch +++ b/debian/patches/remove-unsupported-syntax.patch @@ -1,5 +1,5 @@ -This syntax is not supported by packaged rollup/node yet. -We use uglifyjs.terser command to minify. +This syntax is not supported in packaged rollup/node yet. +Minified file is generated by uglifyjs.terser command line. --- a/rollup.config.js +++ b/rollup.config.js diff --git a/debian/patches/reproducible_build.diff b/debian/patches/reproducible_build.diff new file mode 100644 index 0000000..289e06d --- /dev/null +++ b/debian/patches/reproducible_build.diff @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb +Last-Update: 2019-06-20 + +--- a/rollup.config.js ++++ b/rollup.config.js +@@ -9,7 +9,7 @@ + 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: [] diff --git a/debian/patches/series b/debian/patches/series index d95325b..ba4f208 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ remove-unsupported-syntax.patch +reproducible_build.diff -- cgit v1.2.3