Source: pdf.js
Version: 1.1.215+dfsg-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@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
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 <dh...@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 <dh...@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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to