[Pkg-javascript-devel] Bug#1003646: node-ramda: please make the build reproducible

Chris Lamb lamby at debian.org
Thu Jan 13 08:23:32 GMT 2022


Source: node-ramda
Version: 0.27.2+dfsg+~0.27.63-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-ramda could not be built reproducibly.

This is because the copyright message automatically updated to the
current year. Patch attached that uses SOURCE_DATE_EPOCH [1] instead.

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/


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-01-13 08:20:07.293460728 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2022-01-13
+
+--- node-ramda-0.27.2+dfsg+~0.27.63.orig/rollup.config.js
++++ node-ramda-0.27.2+dfsg+~0.27.63/rollup.config.js
+@@ -3,7 +3,7 @@ var pkg = require('./package.json');
+ 
+ var banner = '//  Ramda v' + pkg.version + '\n'
+   + '//  https://github.com/ramda/ramda\n'
+-  + '//  (c) 2013-' + new Date().getFullYear() + ' Scott Sauyet, Michael Hurley, and David Chambers\n'
++  + '//  (c) 2013-' + (new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime())).getFullYear() + ' Scott Sauyet, Michael Hurley, and David Chambers\n'
+   + '//  Ramda may be freely distributed under the MIT license.\n';
+ 
+ var input = 'source/index.js';
--- a/debian/patches/series	2022-01-13 08:16:42.304394741 +0000
--- b/debian/patches/series	2022-01-13 08:20:06.453449469 +0000
@@ -1 +1,2 @@
 fix-rollup-config.patch
+reproducible-build.patch


More information about the Pkg-javascript-devel mailing list