Page MenuHomeFreeBSD

stand: Use SOURCE_DATE_EPOCH in newvers.sh
ClosedPublic

Authored by cperciva on Feb 3 2025, 4:12 AM.
Tags
None
Referenced Files
F112601145: D48803.diff
Thu, Mar 20, 9:06 AM
Unknown Object (File)
Sun, Mar 2, 11:16 PM
Unknown Object (File)
Feb 14 2025, 3:47 PM
Unknown Object (File)
Feb 13 2025, 7:24 PM
Unknown Object (File)
Feb 10 2025, 7:46 AM
Unknown Object (File)
Feb 9 2025, 2:21 PM
Unknown Object (File)
Feb 8 2025, 3:17 AM
Unknown Object (File)
Feb 3 2025, 11:59 PM
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.Feb 3 2025, 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.