Bug#1139655: node-egjs-hammerjs: please make the build reproducible
Chris Lamb
lamby at debian.org
Wed Jun 10 17:52:50 BST 2026
Source: node-egjs-hammerjs
Version: 2.0.17-1
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
node-egjs-hammerjs could not be built reproducibly.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch 1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/reproducible-build.patch 2026-06-10 09:27:47.984382789 -0700
@@ -0,0 +1,17 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2026-06-10
+
+--- node-egjs-hammerjs-2.0.17.orig/banner.js
++++ node-egjs-hammerjs-2.0.17/banner.js
+@@ -1,7 +1,8 @@
+ var pkg = require("./package.json");
+-var date = new Date();
++var epoch = Number(process.env["SOURCE_DATE_EPOCH"]);
++var date = Number.isInteger(epoch) ? new Date(epoch * 1000) : new Date();
+
+-module.exports = `/*! ${pkg.title || pkg.name} - v${pkg.version} - ${[ date.getFullYear(), ('0' + (date.getMonth() + 1)).slice(-2), ('0' + date.getDate()).slice(-2)].join('-')}
++module.exports = `/*! ${pkg.title || pkg.name} - v${pkg.version} - ${[ date.getUTCFullYear(), ('0' + (date.getUTCMonth() + 1)).slice(-2), ('0' + date.getUTCDate()).slice(-2)].join('-')}
+ * ${pkg.homepage}
+ *
+ * Forked By Naver egjs
--- a/debian/patches/series 1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/series 2026-06-10 09:16:34.871252168 -0700
@@ -0,0 +1 @@
+reproducible-build.patch
More information about the Reproducible-bugs
mailing list