[Reproducible-builds] Fun with cwidget documentation

Jérémy Bobbio lunar at debian.org
Tue Sep 23 15:42:32 UTC 2014


Hi!

I took a look at cwidget to understand why it's documentation was
generated in an unreproducible manner.

One issue is the timestamps generated by Doxygen. That's basically
solved by a one-liner:

--- cwidget-0.5.17.orig/Doxyfile.in
+++ cwidget-0.5.17/Doxyfile.in
+HTML_TIMESTAMP         = NO

But that's not enough. `diffp` gave me, for example:

----- ./usr/share/doc/libcwidget-doc/html/documentation/installing.html
-<a href="mailto:alioth-devel at lists.alioth.debian.org">&#x61;l&#x69;&#x6f;t&#x68;&#x2d;&#x64;&#x65;v&#x65;&#x6c;&#x40;&#x6c;is&#x74;s&#x2e;a&#x6c;&#x69;&#x6f;&#x74;&#x68;.&#x64;e&#x62;&#x69;an&#x2e;&#x6f;&#x72;g</a> with instructions on how to
+<a href="mailto:alioth-devel at lists.alioth.debian.org">&#x61;&#x6c;&#x69;&#x6f;&#x74;h&#x2d;dev&#x65;l@l&#x69;&#x73;&#x74;s&#x2e;&#x61;liot&#x68;&#x2e;d&#x65;&#x62;&#x69;an&#x2e;&#x6f;rg</a> with instructions on how to

Part of cwidget documentation is actually generated by Ikiwiki. For this
particular email address, the Markdown source lies in
`doc/ikiwiki/documentation/installing.mdwn`:

    If your operating system is not listed here, please email
    <alioth-devel at lists.alioth.debian.org> with instructions on how to
    install the prerequisites on your operating system.

After digging through Ikiwiki source code, I actually realized the
culprit for this random transformation of email address: discount.
http://sources.debian.net/src/discount/2.1.7-1/generate.c/?hl=770:780#L770
Yes, it contains a macro named “COINTOSS()”. *sigh*

Now, I'm clueless about the best way to tackle this. What I can
think of:

 * discount: kill the `mangle()` function entirely.
 * discount: patch to make usage of `mangle()` an option, argue to make
   off by default. If that's not accepted, also patch Ikiwiki to disable
   mangling.
 * discount: make `mangle()` deterministic (e.g. by using a PRNG
   seeded by something like input file size).
 * ikiwiki: patch the markdown generator to unmangle the email links.
 * cwidget: patch ikiwiki.setup to ask ikiwki to use another markdown
   generator. This means a new Build-Depends.
 * cwidget: patch the documentation source to replace the email links
   by something like `alioth-devel AT lists.alioth.debian.org`.
 * cwdiget: post-process this madness in `debian/rules`.

Any recommandations? Thoughts?

-- 
Lunar                                .''`. 
lunar at debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20140923/88ca9de1/attachment.sig>


More information about the Reproducible-builds mailing list