Bug#774422: Building perl reproducibly: __DATE__ and __TIME__ usage in perl.c

Niko Tyni ntyni at debian.org
Sat Jul 4 08:10:51 UTC 2015


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 at 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 at debian.org




More information about the Perl-maintainers mailing list