[Python-modules-commits] [sphinx] 01/01: Backport upstream reproducibility fix for htmlhelp and qthelp builders.

Dmitry Shachnev mitya57 at moszumanska.debian.org
Thu Dec 28 11:21:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

mitya57 pushed a commit to branch debian/master
in repository sphinx.

commit 7fdb852d2dd07dc9a07941744c290f903b97b7ae
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Thu Dec 28 14:19:10 2017 +0300

    Backport upstream reproducibility fix for htmlhelp and qthelp builders.
    
    Closes: #884010.
---
 debian/changelog                          |  2 ++
 debian/patches/reproducible_htmlhelp.diff | 39 +++++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 3 files changed, 42 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index afbe650..8c876e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 sphinx (1.6.5-4) UNRELEASED; urgency=medium
 
   * Change python3.6-2to3 dependencies to python3-lib2to3.
+  * Backport upstream reproducibility fix for htmlhelp and qthelp builders
+    (reproducible_htmlhelp.diff; closes: #884010).
 
  -- Dmitry Shachnev <mitya57 at debian.org>  Thu, 28 Dec 2017 14:04:30 +0300
 
diff --git a/debian/patches/reproducible_htmlhelp.diff b/debian/patches/reproducible_htmlhelp.diff
new file mode 100644
index 0000000..fe221d1
--- /dev/null
+++ b/debian/patches/reproducible_htmlhelp.diff
@@ -0,0 +1,39 @@
+From: Dmitry Shachnev <mitya57 at gmail.com>
+Date: Tue, 12 Dec 2017 00:12:45 +0300
+Subject: Fix for reproducibility of htmlhelp and qthelp builds
+
+Make sure the generated list of files is sorted.
+This is similar to what was applied to EPub builder in 0b7c73a981.
+
+(cherry picked from commit 1502fbda61240aae8ee799dc67c0536e0a210327)
+---
+ sphinx/builders/htmlhelp.py | 2 +-
+ sphinx/builders/qthelp.py   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sphinx/builders/htmlhelp.py b/sphinx/builders/htmlhelp.py
+index 764b01a..c2e3bbe 100644
+--- a/sphinx/builders/htmlhelp.py
++++ b/sphinx/builders/htmlhelp.py
+@@ -246,7 +246,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
+             olen = len(outdir)
+             for root, dirs, files in os.walk(outdir):
+                 staticdir = root.startswith(path.join(outdir, '_static'))
+-                for fn in files:
++                for fn in sorted(files):
+                     if (staticdir and not fn.endswith('.js')) or \
+                        fn.endswith('.html'):
+                         print(path.join(root, fn)[olen:].replace(os.sep, '\\'),
+diff --git a/sphinx/builders/qthelp.py b/sphinx/builders/qthelp.py
+index b1c94c5..14979fe 100644
+--- a/sphinx/builders/qthelp.py
++++ b/sphinx/builders/qthelp.py
+@@ -188,7 +188,7 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
+         for root, dirs, files in os.walk(outdir):
+             resourcedir = root.startswith(staticdir) or \
+                 root.startswith(imagesdir)
+-            for fn in files:
++            for fn in sorted(files):
+                 if (resourcedir and not fn.endswith('.js')) or \
+                    fn.endswith('.html'):
+                     filename = path.join(root, fn)[olen:]
diff --git a/debian/patches/series b/debian/patches/series
index 8d4523e..9a89940 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ skip_tests_network.diff
 no_require_websupport.diff
 reproducible_dicts.diff
 reproducible_epub.diff
+reproducible_htmlhelp.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sphinx.git



More information about the Python-modules-commits mailing list