Bug#949684: mcomix: please make the build reproducible

Chris Lamb lamby at debian.org
Thu Jan 23 16:04:16 GMT 2020


Source: mcomix
Version: 1.2.1mcomix3+git20200122-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: filesystem
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] I noticed that
mcomix could not be built reproducibly.

Specifically, variations were observed between the modification times
of the /usr/share/mcomix directory between two builds:

  - 2020-01-22 05:02:54
  + 2020-01-17 13:20:55

The first of these is the time taken the latest entry in the Debian
changelog via the SOURCE_DATE_EPOCH[1] mechanism and the second is
upstream's original timestamp.

After some investigation I discovered that this was due to the
nondeterministic ordering of files in UNIX filesystems: upstream's
installer.py script was attempting to ensure that generated GNU
gettext .po files were created in directories that inherited the
original timestamps around them. However, if these .po files happened
to be processed for install before, for example, the Python scripts,
due to the order in which they existed on the filesystem, then it
would inherit a different timestamp and result in the variation seen
above.

This non-intuitive result has — of course — a trivial-looking fix,
namely to ensure that upstreams's installer.py script recurses into
any subdirectories in a sorted and thus determinstic order:

     def scandir(root,dest,pool=None):
         for r,dl,fl in walk(root):
    +        dl.sort()
             for f in fl:
                 yield r,f,dest,pool
 

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mcomix.diff.txt
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20200123/f09ad55a/attachment.txt>


More information about the Reproducible-bugs mailing list