[Pkg-javascript-devel] Bug#793127: pdf.js: please support timestamps from environment

Dhole dhole at openmailbox.org
Tue Jul 21 14:29:12 UTC 2015


Source: pdf.js
Version: 1.1.215+dfsg-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that pdf.js could not be built reproducibly.

The attached patch removes timezone-varying timestamps from the
files compressed with zip. Once applied, pdf.js can be built
reproducibly in our current experimental framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds


Regards,
-- 
Dhole
-------------- next part --------------
diff -Nru pdf.js-1.1.215+dfsg/debian/changelog pdf.js-1.1.215+dfsg/debian/changelog
--- pdf.js-1.1.215+dfsg/debian/changelog	2015-06-20 21:59:19.000000000 +0200
+++ pdf.js-1.1.215+dfsg/debian/changelog	2015-07-21 16:12:20.000000000 +0200
@@ -1,3 +1,11 @@
+pdf.js (1.1.215+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Set TZ=UTC before calls to zip in make.js to make package build 
+    reproducibly.
+
+ -- Dhole <dhole at openmailbox.org>  Tue, 21 Jul 2015 16:11:47 +0200
+
 pdf.js (1.1.215+dfsg-1) unstable; urgency=medium
 
   * Update upstream changelog
diff -Nru pdf.js-1.1.215+dfsg/debian/patches/fix-timezone-in-zip pdf.js-1.1.215+dfsg/debian/patches/fix-timezone-in-zip
--- pdf.js-1.1.215+dfsg/debian/patches/fix-timezone-in-zip	1970-01-01 01:00:00.000000000 +0100
+++ pdf.js-1.1.215+dfsg/debian/patches/fix-timezone-in-zip	2015-07-21 16:13:08.000000000 +0200
@@ -0,0 +1,23 @@
+Description: Fix timezone in zip calls
+ .
+ pdf.js (1.1.215+dfsg-1.1) UNRELEASED; urgency=medium
+ .
+   * Non-maintainer upload.
+   * Set TZ=UTC before calls to zip in make.js to make package build
+     reproducibly.
+Author: Dhole <dhole at openmailbox.org>
+
+---
+
+--- pdf.js-1.1.215+dfsg.orig/make.js
++++ pdf.js-1.1.215+dfsg/make.js
+@@ -831,6 +831,9 @@ target.firefox = function() {
+   sed('-i', /.*PDFJS_SUPPORTED_LOCALES.*\n/, chromeManifest,
+       FIREFOX_BUILD_DIR + '/chrome.manifest');
+ 
++  // Set timezone to UTC before calling zip to get reproducible results.
++  process.env.TZ = 'UTC';
++
+   // Create the xpi
+   cd(FIREFOX_BUILD_DIR);
+   exec('zip -r ' + FIREFOX_EXTENSION_NAME + ' ' +
diff -Nru pdf.js-1.1.215+dfsg/debian/patches/series pdf.js-1.1.215+dfsg/debian/patches/series
--- pdf.js-1.1.215+dfsg/debian/patches/series	2015-06-20 21:24:40.000000000 +0200
+++ pdf.js-1.1.215+dfsg/debian/patches/series	2015-07-21 16:12:43.000000000 +0200
@@ -2,3 +2,4 @@
 0002-Fix-build-versions-in-generated-file.patch
 0003-Add-adobe-CMaps.patch
 0012-Revert-Remove-ShellJS-copy-and-use-the-NPM-version.patch
+fix-timezone-in-zip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20150721/f296b57a/attachment.sig>


More information about the Pkg-javascript-devel mailing list