[PATCH] use SOURCE_DATE_EPOCH for timestamp if available

Eli Schwartz eschwartz at archlinux.org
Fri May 14 11:20:32 UTC 2021


On 5/14/21 12:55 AM, Ariadne Conill wrote:
> Hello,
> 
> On Thu, 13 May 2021, Paul Spooren wrote:
> 
>> The SOURCE_DATE_EPOCH is an effort of the Reproducible Builds
>> organization to make timestamps/build dates in compiled tools
>> deterministic over several repetitive builds.
>>
>> Busybox shows by default the build date timestamp which changes whenever
>> compiled. To have a reasonable accurate build date while staying
>> reproducible, it's possible to use the *date of last source
>> modification* rather than the current time and date.
>>
>> Further information on SOURCE_DATE_EPOCH are available online [1].
>>
>> This patch modifies `confdata.c` so that the content of the
>> SOURCE_DATE_EPOCH env variable is used as timestamp.
>>
>> To be independent of different timezones between builds, whenever
>> SOURCE_DATE_EPOCH is defined the GMT time is used.
> 
> This patch looks fine.  Alpine would like this as well, as we are
> starting to work on reproducible builds.
> 
> Ariadne

At the moment, my build for Arch Linux is reproducible (has been since
mid 2018) due to exporting KCONFIG_NOTIMESTAMP=1

That being said, for overall consistency and coherency, the spec at
https://reproducible-builds.org does recommend every program respect one
variable, $SOURCE_DATE_EPOCH, rather than needing to specify a different
variable for each program.

So this patch is good for me too, because it means I can delete a
special case.

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20210514/e5a7da2b/attachment-0001.asc>


More information about the busybox mailing list