Source: node-dommatrix
Version: 1.0.3+dfsg-2
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
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
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- 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 <la...@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
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to