Source: less.js
Version: 3.13.0+dfsg-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
less.js could not be built reproducibly.

This is because it embeds the current build date. Patch attached that
uses SOURCE_DATE_EPOCH [1] if available.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.patch   1970-01-01 01:00:00.000000000 
+0100
--- b/debian/patches/reproducible-build.patch   2020-11-10 10:16:10.357693628 
+0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <[email protected]>
+Last-Update: 2020-11-10
+
+--- less.js-3.13.0+dfsg.orig/packages/less/build/banner.js
++++ less.js-3.13.0+dfsg/packages/less/build/banner.js
+@@ -5,7 +5,7 @@ module.exports =
+  * Less - ${ pkg.description } v${ pkg.version }
+  * http://lesscss.org
+  * 
+- * Copyright (c) 2009-${new Date().getFullYear()}, ${ pkg.author.name } <${ 
pkg.author.email }>
++ * Copyright (c) 2009-${(new Date(process.env.SOURCE_DATE_EPOCH ? 
(process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime())).getFullYear()}, 
${ pkg.author.name } <${ pkg.author.email }>
+  * Licensed under the ${ pkg.license } License.
+  *
+  * @license ${ pkg.license }
--- a/debian/patches/series     2020-11-10 10:12:01.127276693 +0000
--- b/debian/patches/series     2020-11-10 10:16:07.205662027 +0000
@@ -1 +1,2 @@
 use-packaged-plugins.patch
+reproducible-build.patch
-- 
Pkg-javascript-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to