[Reproducible-builds] GSoC 2015 Week 6: Move forward reproducible builds
dhole at openmailbox.org
Mon Jul 6 00:33:37 UTC 2015
This week I have been working on patching toolchain packages in relation
to the proposed timestamp standardization.
I have patched gcc to read the SOURCE_DATE_EPOCH environment variable
and in case it is set, change the behavior of the macro __DATE__ and
__TIME__ substitution: instead of writing the local date/time, the one
provided by the env variable is used. I also wrote a patch to replace
the behavior of the __TIMESTAMP__ macro (which embeds the source file
mtime during the preprocessing step) to use the timestamp from
SOURCE_DATE_EPOCH only if it is older than the file mtime (that is,
clamping the timestamp). The later patch has not been sent yet as it
feels more intrusive.
I sent the patch for __DATE__ and __TIME__ to the gcc upstream mailing
There's been some discussion and some ideas from the gcc people, but no
maintainer has replied yet (only maintainers can decide if a patch gets
accepted or not).
Since other other people in the project are adopting the use of
SOURCE_DATE_EPOCH to normalize timestamps, I wrote a patch for debhelper
(a Debian package used during package builds) to export the
SOURCE_DATE_EPOCH with the latests debian/changelog entry timestamp. I
also added a change to debhelper to help reproducible builds which
consists on setting TZ=UTC (that is setting the exported variable
defining the timezone to UTC so that during bluilds a normalized
timezone is found).
The debhelper commit can be found here:
After committing the change, I built the package and uploaded it to the
reproducible repository so that it can be used in our custom toolchain
and test it on jenkins.
I updated two wiki entries:
- info about gcc patch regarding the C timestamp macro issue:
- info about debhelp update
For next week I plan on continue looking at toolchain packages that
could implement the use of SOURCE_DATE_EPOCH (mostly documentation
generators such as docbook-xsl) and write patches for them
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the Reproducible-builds