Bug#884402: sonic-pi: please make the documentation build reproducible
Chris Lamb
lamby at debian.org
Thu Dec 14 20:36:37 UTC 2017
Source: sonic-pi
Version: 2.10.0~repack-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: hashordering
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that sonic-pi could not be built reproducibly.
This is because it iterates over internal data structures (hashes)
in a non-deterministic order. It also sorts a list only concerned
about the length of the fields, rather than (also) considering the
alphanumeric sort, leading to nondeterminstic output.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/08-reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/08-reproducible-build.patch 2017-12-14 20:19:58.810609009 +0000
@@ -0,0 +1,33 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2017-12-14
+
+--- sonic-pi-2.10.0~repack.orig/app/server/bin/qt-doc.rb
++++ sonic-pi-2.10.0~repack/app/server/bin/qt-doc.rb
+@@ -173,7 +173,7 @@ make_tutorial = lambda do |lang|
+ tutorial_html_map[name] = html
+ end
+
+- make_tab.call("tutorial", tutorial_html_map, false, false, false, true, true, lang)
++ make_tab.call("tutorial", tutorial_html_map, false, true, false, true, true, lang)
+ end
+
+
+@@ -212,7 +212,7 @@ languages = Dir.
+ select {|f| File.directory? f}.
+ map {|f| File.basename f}.
+ select {|n| n != "en"}.
+- sort_by {|n| -n.length}
++ sort_by {|n| [-n.length, n] }
+
+ docs << "\n QString systemLocale = QLocale::system().name();\n\n" unless languages.empty?
+
+@@ -228,7 +228,7 @@ docs << "{\n" unless (languages.empty?)
+ make_tutorial.call("en")
+ docs << "}\n" unless (languages.empty?)
+
+-make_tab.call("examples", example_html_map, false, false, false, true)
++make_tab.call("examples", example_html_map, false, true, false, true)
+ make_tab.call("synths", SonicPi::Synths::SynthInfo.synth_doc_html_map, :titleize, true, true, true)
+ make_tab.call("fx", SonicPi::Synths::SynthInfo.fx_doc_html_map, :titleize, true, true, true)
+ make_tab.call("samples", SonicPi::Synths::SynthInfo.samples_doc_html_map, false, true, false, true)
--- a/debian/patches/series 2017-12-14 17:10:24.032228403 +0000
--- b/debian/patches/series 2017-12-14 17:46:52.167610816 +0000
@@ -5,3 +5,4 @@
05-doc-base-index.patch
06-paths.patch
07-examples-path.patch
+08-reproducible-build.patch
More information about the Reproducible-bugs
mailing list