Bug#923169: node-lunr: please make the build reproducible

Chris Lamb lamby at debian.org
Sun Feb 24 18:07:16 GMT 2019


Source: node-lunr
Version: 2.3.5~dfsg-6
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-lunr could not be built reproducibly.

This is because it embeds the current year in the source.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org 🍥 chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/2003-reproducible-build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/2003-reproducible-build.patch	2019-02-24 19:05:58.182962181 +0100
@@ -0,0 +1,18 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2019-02-24
+
+--- node-lunr-2.3.5~dfsg.orig/Makefile
++++ node-lunr-2.3.5~dfsg/Makefile
+@@ -21,7 +21,11 @@ SRC = lib/lunr.js \
+ 	lib/query_lexer.js \
+ 	lib/query_parser.js \
+ 
++ifdef SOURCE_DATE_EPOCH
++YEAR = $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" +%Y 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" +%Y 2>/dev/null || date -u +%Y)
++else
+ YEAR = $(shell date +%Y)
++endif
+ VERSION = $(shell cat VERSION)
+ 
+ NODE ?= $(shell which node)
--- a/debian/patches/series	2019-02-24 19:00:23.550240149 +0100
--- b/debian/patches/series	2019-02-24 19:05:56.986952891 +0100
@@ -1,2 +1,3 @@
 2001_avoid_npm.patch
 2002-fix-with-new-chai.patch
+2003-reproducible-build.patch


More information about the Reproducible-bugs mailing list