New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make build date reproducible #229
Make build date reproducible #229
Conversation
|
@jelly Could you please run |
To make aardvark-dns bit by bit reproducible the embedded build date needs to adhere to the SOURCE_DATE_EPOCH standard. So a rebuilder can set SOURCE_DATE_EPOCH to the build binary's build date and reproduce the binary succesfully. https://reproducible-builds.org/docs/source-date-epoch/ Signed-off-by: Jelle van der Waa <jelle@archlinux.org>
eefd7db
to
ad541ca
Compare
Woops, sorry! |
| let now = Utc::now(); | ||
| let now = match env::var("SOURCE_DATE_EPOCH") { | ||
| Ok(val) => { | ||
| let naive = NaiveDateTime::from_timestamp(val.parse::<i64>().unwrap(), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: The unwrap here will cause build to exit with error so maybe error can be handled here, but since this is only used while performing build so this is looks fine and not worth a repush.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think unwrap is fine in the build file, I mean what do we want to do with the error anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jelly , PR LGTM just one non-blocking ( not worth a repush ) nit.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, jelly The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
@jelly Can you open the same patch against netavark please? |
Sure! |
To make aardvark-dns bit by bit reproducible the embedded build date needs to adhere to the SOURCE_DATE_EPOCH standard. So a rebuilder can set SOURCE_DATE_EPOCH to the build binary's build date and reproduce the binary succesfully.
https://reproducible-builds.org/docs/source-date-epoch/
Signed-off-by: Jelle van der Waa jelle@archlinux.org
Our reproducible test output before this change: https://reproducible.archlinux.org/api/v0/builds/343291/diffoscope