[Reproducible-builds] Bug#786978: python2.7: please make the build reproducible

Jérémy Bobbio lunar at debian.org
Wed May 27 10:46:30 UTC 2015


Source: python2.7
Version: 2.7.10-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that python2.7 could not be built reproducibly.

The attached patch fixes several timestamps related issues:

 * A C header is generated defining the `DATE` and `TIME` macros using
   the time of the latest debian/changelog entry. The header is further
   given through `-imacros` in CPPFLAGS.
 * The time of the latest debian/changelog entry is given to sphinx via
   `SPHINXOPTS`. This will fix variations in the documentation.
 * `-n` is given to gzip when compressing devhelp to avoid a timestamp.

How DATE and TIME is set is slightly different from how it's done in
#786959 and #786965 for python 3.{5,4} as the configure script had
different quoting rules.

Unfortunately, this only makes python2.7 reproducible when
`noopt` is in `DEB_BUILD_OPTIONS`. Otherwise, objects contain random
names due to `-ffat-lto-objects`, but this ought to be fixed in GCC.

Having `nobench` in `DEB_BUILD_OPTIONS` is also required, as otherwise
`pybench.log` will contain uname output and time measurements depending
on the system work load. I'm not sure what's best for this last issue.

 [1]: https://wiki.debian.org/ReproducibleBuilds

-- 
Lunar                                .''`. 
lunar at debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python2.7_2.7.10-1_reproducible.diff
Type: text/x-diff
Size: 3862 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20150527/ca6fdd55/attachment.diff>
-------------- 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/20150527/ca6fdd55/attachment.sig>


More information about the Reproducible-builds mailing list