xsltproc produces nondeterministic output
While working on reproducible builds for openSUSE, I found that our gsequencer package contained random variations in its documentation even when I tried to make builds as deterministic as possible.
Using xsltproc from libxslt-1.1.34
Actual Result:
for i in $(seq 1 6) ; do cd /path/to/gsequencer
&& xsltproc --output /tmp/out/ --xinclude \
/usr/share/xml/docbook/stylesheet/nwalsh/current/htmlhelp/htmlhelp.xsl docs/developersBook.xml 2>&1 |
grep title ; md5sum /tmp/out/htmlhelp.hhp ; done
Request for title of element with no title: code (contained in )
0456050f6e7c2247a691e06509febfff /tmp/out/htmlhelp.hhp
e774452ce564e240d02a34bc1cec7c50 /tmp/out/htmlhelp.hhp
e774452ce564e240d02a34bc1cec7c50 /tmp/out/htmlhelp.hhp
Request for title of element with no title: code (contained in )
0456050f6e7c2247a691e06509febfff /tmp/out/htmlhelp.hhp
e774452ce564e240d02a34bc1cec7c50 /tmp/out/htmlhelp.hhp
e774452ce564e240d02a34bc1cec7c50 /tmp/out/htmlhelp.hhp
Expected Result: output should be deterministic.
diffs between output files look thusly:
--- old//usr/share/doc/libags-audio-doc/html/htmlhelp.hhp 2020-03-13 00:00:00.000000000 +0000
+++ new//usr/share/doc/libags-audio-doc/html/htmlhelp.hhp 2020-03-13 00:00:00.000000000 +0000
@@ -8,11 +8,11 @@
Display compile progress=Yes
Full-text search=Yes
Language=0x0409 English (UNITED STATES)
-Title=Advanced Gtk+ Sequencer
+Title=Advanced Gtk+ Sequencer???TITLE???
Enhanced decompilation=No
[WINDOWS]
-Main="Advanced Gtk+ Sequencer","toc.hhc",,"index.html","index.html",,,,,0x2520,,0x603006,,,,,,,,0
+Main="Advanced Gtk+ Sequencer???TITLE???","toc.hhc",,"index.html","index.html",,,,,0x2520,,0x603006,,,,,,,,0
This xsltproc output line might be related:
Note: namesp. cut : stripped namespace before processing Advanced Gtk+ Sequencer
See also https://reproducible-builds.org/ for why this matters.
Edited by Bernhard M. Wiedemann