develooper Front page | perl.perl5.porters | Postings from July 2015

Building perl reproducibly: __DATE__ and __TIME__ usage in perl.c

Thread Next
From:
Niko Tyni
Date:
July 4, 2015 08:11
Subject:
Building perl reproducibly: __DATE__ and __TIME__ usage in perl.c
Message ID:
20150704081051.GA4672@estella.local.invalid
There's quite some momentum in the Debian project and elsewhere
to make package builds reproducible binary-wise, so that a
given source would always yield the same compiled binaries (and
other generated files) when built with the same toolchain. See
https://wiki.debian.org/ReproducibleBuilds for some background, including
current status and rationale.

Lunar <lunar@debian.org> has looked at the perl package [1], and
identified a few places where the build system embeds information
about the build environment. This mainly includes the build
time ($Config{cf_time} and other places) and the build platform
($Config{myuname}, $Config{osvers}).

Most of these are overridable, either with Configure arguments or the
config.over mechanism, and we can use those to set sensible deterministic
values. However, there's at least one place that's not currently
overridable: perl.c embeds the build time in the perl binary with the
__DATE__ and __TIME__ cpp macros, for the "Compiled at ..." information in
"perl -V" output

Would you be willing to accept a patch that makes this __DATE__/__TIME__
usage configurable?  Or would it make sense to just unconditionally
replace the message with $Config{cf_time} information, either at build
or run time?

Please note that the feature is currently conditional with the macros
existing in the first place, so at least theoretically there are already
perls out there lacking the 'Compiled at' line.

[1] https://bugs.debian.org/774422

Many thanks for your work on Perl,
-- 
Niko Tyni   ntyni@debian.org

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About