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
base: master
from

Conversation

Projects
None yet
3 participants
@jurobystricky
Contributor

jurobystricky commented Oct 27, 2017

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

This comment has been minimized.

Show comment
Hide comment
@jay

jay Oct 27, 2017

Member

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)

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

This comment has been minimized.

Show comment
Hide comment
@jurobystricky

jurobystricky Oct 27, 2017

Contributor

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.

Contributor

jurobystricky commented Oct 27, 2017

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

This comment has been minimized.

Show comment
Hide comment
@jurobystricky

jurobystricky Oct 27, 2017

Contributor

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

Contributor

jurobystricky commented Oct 27, 2017

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

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Oct 27, 2017

Member

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!

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

This comment has been minimized.

Show comment
Hide comment
@jurobystricky

jurobystricky Oct 27, 2017

Contributor

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

Contributor

jurobystricky commented Oct 27, 2017

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

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Oct 27, 2017

Member

I say remove unconditionally

Member

bagder commented Oct 27, 2017

I say remove unconditionally

@jurobystricky

This comment has been minimized.

Show comment
Hide comment
@jurobystricky

jurobystricky Oct 27, 2017

Contributor

OK then. I will create a new pull request.

Contributor

jurobystricky commented Oct 27, 2017

OK then. I will create a new pull request.

mkhelp.pl: support reproducible build
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

bagder approved these changes Oct 30, 2017

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Oct 30, 2017

Member

Excellent, thank you!

Member

bagder commented Oct 30, 2017

Excellent, thank you!

@bagder bagder closed this in 6089aa5 Oct 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment