[Pkg-javascript-devel] Bug#1012614: node-dommatrix: please make the build reproducible

Chris Lamb lamby at debian.org
Fri Jun 10 11:32:42 BST 2022


Source: node-dommatrix
Version: 1.0.3+dfsg-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
the node-dommatrix package could not be built reproducibly.

This is because it generates a "Copyright (C) ..." message based on
the current year. A patch is attached that uses the value from the
SOURCE_DATE_EPOCH environment variable instead.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible_build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible_build.patch	2022-06-10 06:54:23.072659922 +0100
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2022-06-10
+
+--- node-dommatrix-1.0.3+dfsg.orig/rollup.config.js
++++ node-dommatrix-1.0.3+dfsg/rollup.config.js
+@@ -10,7 +10,7 @@ const { FORMAT } = process.env; // JS um
+ const INPUT = process.env.INPUTFILE;
+ const OUTPUTC = process.env.OUTPUTFILE;
+ 
+-const year = (new Date()).getFullYear();
++const year = (new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime())).getFullYear();
+ 
+ const banner = `/*!
+ * DOMMatrix v${pkg.version} (${pkg.homepage})
--- a/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series	2022-06-10 06:54:21.912658401 +0100
@@ -0,0 +1 @@
+reproducible_build.patch


More information about the Pkg-javascript-devel mailing list