Source: node-cssstyle Version: 2.3.0-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0] we noticed that node-cssstyle could not be built reproducibly. This is because the latest version includes the build date (commented out) in files that have been autogenerated. Patch attached that simply drops these lines. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1969-12-31 16:00:00.000000000 -0800 --- b/debian/patches/reproducible-build.patch 2021-11-17 07:52:07.789701056 -0800 @@ -0,0 +1,52 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2021-11-17 + +--- node-cssstyle-2.3.0.orig/scripts/download_latest_properties.js ++++ node-cssstyle-2.3.0/scripts/download_latest_properties.js +@@ -60,12 +60,7 @@ request(url, function(error, response, b + encoding: 'utf-8', + }); + +- var date_today = new Date(); +- out_file.write( +- "'use strict';\n\n// autogenerated - " + +- (date_today.getMonth() + 1 + '/' + date_today.getDate() + '/' + date_today.getFullYear()) + +- '\n\n' +- ); ++ out_file.write("'use strict';\n\n"); + out_file.write('/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\n'); + out_file.write( + 'module.exports = new Set(' + +--- node-cssstyle-2.3.0.orig/scripts/generate_implemented_properties.js ++++ node-cssstyle-2.3.0/scripts/generate_implemented_properties.js +@@ -14,12 +14,7 @@ const dashedProperties = fs + const out_file = fs.createWriteStream(path.resolve(__dirname, '../lib/implementedProperties.js'), { + encoding: 'utf-8', + }); +-var date_today = new Date(); +-out_file.write( +- "'use strict';\n\n// autogenerated - " + +- (date_today.getMonth() + 1 + '/' + date_today.getDate() + '/' + date_today.getFullYear()) + +- '\n\n' +-); ++out_file.write("'use strict';\n\n"); + out_file.write('/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\n'); + + const statements = []; +--- node-cssstyle-2.3.0.orig/scripts/generate_properties.js ++++ node-cssstyle-2.3.0/scripts/generate_properties.js +@@ -26,12 +26,7 @@ var property_files = fs + var out_file = fs.createWriteStream(path.resolve(__dirname, '../lib/properties.js'), { + encoding: 'utf-8', + }); +-var date_today = new Date(); +-out_file.write( +- "'use strict';\n\n// autogenerated - " + +- (date_today.getMonth() + 1 + '/' + date_today.getDate() + '/' + date_today.getFullYear()) + +- '\n\n' +-); ++out_file.write("'use strict';\n\n"); + out_file.write('/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\n'); + + function isModuleDotExports(node) { --- a/debian/patches/series 2021-11-17 07:23:44.796541523 -0800 --- b/debian/patches/series 2021-11-17 07:52:06.773706298 -0800 @@ -1 +1,2 @@ fix-for-babel7.patch +reproducible-build.patch