edk2
edk2 copied to clipboard
EmbeddedPkg/VirtualRealTimeClockLib: Support SOURCE_DATE_EPOCH
RISC-V ovmf used VirtualRealTimeClockLib but the default epoch is a compilation time. It causes that the RISC-V ovmf binary image is NOT reproducible.
This patch added the support of SOURCE_DATE_EPOCH by printenv command. If SOURCE_DATE_EPOCH be found then we use it as BUILD_EPOCH. Otherwise we run date command for setting BUILD_EPOCH.
For distributions want a reproducible RISC-V ovmf image, they should export SOURCE_DATE_EPOCH environment variable before building ovmf.
References: https://reproducible-builds.org/docs/source-date-epoch/ Cc: Pete Batard [email protected] Cc: Ard Biesheuvel [email protected]
This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
Hi,
Baseo n the CI result, does that mean printenv SOURCE_DATE_EPOCH || date +%s command not be supported by azure-pipelines's shell?
How can I debug it? On azure?
Thanks a lot!
For reference: https://edk2.groups.io/g/devel/message/119756
Thanks for Leif's suggestion. I will send a new push request.
@joeyli No need to close the PR - you can simply force-push the new version to the branch the PR was created from.
@joeyli No need to close the PR - you can simply force-push the new version to the branch the PR was created from.
Thanks for your reminder! But I have closed the old PR and submit a new pull request:
https://github.com/tianocore/edk2/pull/5845
Joey Lee