Skip to content

created.rid: use SOURCE_DATE_EPOCH #1602

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

Closed
wants to merge 1 commit into from
Closed

Conversation

bmwiedemann
Copy link

use SOURCE_DATE_EPOCH instead of current time in created.rid top line
to enable reproducible builds of ruby docs

See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

@@ -232,6 +232,9 @@ def store= store

def update_output_dir(op_dir, time, last = {})
return if @options.dry_run or not @options.update_output_dir
unless ENV['SOURCE_DATE_EPOCH'].nil?
time = Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider setting this at the update_output_dir callsites, rather than overwriting it at the 'last moment'? (Perhap there are multiple ones)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

atm there is mostly the "generate" caller, if we do not count tests, so it could also be done there

use SOURCE_DATE_EPOCH instead of current time in created.rid top line
to enable reproducible builds of ruby docs

See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
@hsbt
Copy link
Member

hsbt commented Dec 14, 2017

@bmwiedemann Can you file this issue to the upstream repository (https://github.com/ruby/rdoc)?

Thanks.

@hsbt hsbt closed this Dec 14, 2017
@bmwiedemann
Copy link
Author

filed ruby/rdoc#570

@bmwiedemann bmwiedemann deleted the rb1 branch March 7, 2018 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants