Skip to content
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

mkhelp.pl: support reproducible build #2026

Closed
wants to merge 1 commit into from

Conversation

jurobystricky
Copy link
Contributor

If the environment contains SOURCE_DATE_EPOCH, generate output such as:

  • Generation time: reproducible build, date unspecified

Instead of the usual output based on the current date such as:

  • Generation time: Tue Oct-24 18:01:41 2017

This will improve reproducibility. The generated string is only
part of a comment, so there should be no adverse consequences.

Signed-off-by: Juro Bystricky juro.bystricky@intel.com

@jay
Copy link
Member

jay commented Oct 27, 2017

If the environment contains SOURCE_DATE_EPOCH, generate output such as:

Generation time: reproducible build, date unspecified

From what I'm reading isn't that variable part of a spec that is supposed to have the seconds in it. See https://reproducible-builds.org/specs/source-date-epoch/

I don't see "date unspecified" covered (though I just did some cursory searching). Also note we have an SHA256 generated in the comment area that may do what you want. (Edit: ignore the SHA256 comment I was thinking of mk-ca-bundle)

@jurobystricky
Copy link
Contributor Author

Yes, SOURCE_DATE_EPOCH does contain an "epoch" value. So it is tempting to print that value instead of the build time. However, I replicated the approach I have seen in openssl, where they issue an identical message: "reproducible build: date unspecified". Claiming that the "Generation time" is the time specified by SOURCE_DATE_EPOCH would not be entirely true.

@jurobystricky
Copy link
Contributor Author

Another approach would be not to generate the whole line "Generation time: ..." at all.

@bagder
Copy link
Member

bagder commented Oct 27, 2017

I don't think the time string serves any good purpose there so I think the simpler option of just removing it is the better one here!

@jurobystricky
Copy link
Contributor Author

Remove unconditionally or only when SOURCE_DATE_EPOCH is present?
If there is no good purpose, then unconditional removal would be probably best.

@bagder
Copy link
Member

bagder commented Oct 27, 2017

I say remove unconditionally

@jurobystricky
Copy link
Contributor Author

OK then. I will create a new pull request.

Do not generate line with the current date, such as:

* Generation time: Tue Oct-24 18:01:41 2017

This will improve reproducibility. The generated string is only
part of a comment, so there should be no adverse consequences.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
@bagder
Copy link
Member

bagder commented Oct 30, 2017

Excellent, thank you!

@bagder bagder closed this in 6089aa5 Oct 30, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants