[Pkg-javascript-devel] Bug#1012387: coffeescript: please make the build reproducible
Chris Lamb
lamby at debian.org
Mon Jun 6 09:37:41 BST 2022
Source: coffeescript
Version: 2.7.0-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
coffeescript could not be built reproducibly.
This is because it uses the current build date when generating years in
copyright headers. A patch is attached that seeds this date from the
value of SOURCE_DATE_EPOCH [1]
[0] https://reproducible-builds.org/
[1] https://reproducible-builds.org/docs/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-06-06 09:30:12.420262570 +0100
@@ -0,0 +1,23 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2022-06-06
+
+--- coffeescript-2.7.0.orig/Cakefile
++++ coffeescript-2.7.0/Cakefile
+@@ -16,12 +16,15 @@ unless process.env.NODE_DISABLE_COLORS
+ reset = '\x1B[0m'
+
+ # Built file header.
++now = new Date()
++if process.env.SOURCE_DATE_EPOCH
++ now = new Date((process.env.SOURCE_DATE_EPOCH * 1000) + (now.getTimezoneOffset() * 60000))
+ header = """
+ /**
+ * CoffeeScript Compiler v#{CoffeeScript.VERSION}
+ * https://coffeescript.org
+ *
+- * Copyright 2011-#{new Date().getFullYear()}, Jeremy Ashkenas
++ * Copyright 2011-#{now.getFullYear()}, Jeremy Ashkenas
+ * Released under the MIT License
+ */
+ """
--- a/debian/patches/series 2022-06-06 09:06:57.161874011 +0100
--- b/debian/patches/series 2022-06-06 09:21:57.567702386 +0100
@@ -1,2 +1,3 @@
fix-node-path.patch
privacy.patch
+reproducible-build.patch
More information about the Pkg-javascript-devel
mailing list