Page MenuHomeFreeBSD

stand: Use SOURCE_DATE_EPOCH in newvers.sh
ClosedPublic

Authored by cperciva on Mon, Feb 3, 4:12 AM.
Tags
None
Referenced Files
F109356189: D48803.diff
Mon, Feb 3, 11:59 PM
Unknown Object (File)
Mon, Feb 3, 7:55 AM
Unknown Object (File)
Mon, Feb 3, 7:55 AM
Subscribers

Details

Summary

The newvers.sh script is used to generate vers.c for 10 programs (at
latest count on amd64): 4 EFI loaders, 3 x86 loaders, two userboots,
and one kboot. When building without MK_REPRODUCIBLE_BUILD this
resulted in 10 different timestamps being compiled into various files.

If SOURCE_DATE_EPOCH is set, use that value rather than the current
date and time.

Sponsored by: Amazon

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62214
Build 59098: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mon, Feb 3, 4:15 AM

Context which probably doesn't need to be in the commit message: I'd like to make builds on HEAD *reproducible* even if they're not *deterministic*, i.e. given a build I want to be able to extract environment settings which will allow the same build to be reproduced. This will be easier if I can SOURCE_DATE_EPOCH?= a single SOURCE_DATE_EPOCH value and have it apply to all of the loader binaries.

OK. My preference would be to remove the date altogether, regardless of build settings, but this is an incremental step at least.

This revision was automatically updated to reflect the committed changes.