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

Allow to override build date with SOURCE_DATE_EPOCH #3221

Merged
merged 1 commit into from Oct 15, 2018

Conversation

Projects
None yet
3 participants
@bmwiedemann
Contributor

bmwiedemann commented Oct 14, 2018

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated master/src/CHANGES.txt directory (and read the README.txt in that directory)
  • I have updated the appropriate documentation

Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
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.

Also consistently use ISO 8601 date format
to be understood everywhere.
Also use gmtime to be independent of timezone.

@bdbaddog

This comment has been minimized.

Contributor

bdbaddog commented Oct 14, 2018

Please update CHANGES.txt

So if SOURCE_DATE_EPOCH is not set, this is still changing the default format of the time/datestamp in the distibuted code right?

@bdbaddog

This comment has been minimized.

Contributor

bdbaddog commented Oct 14, 2018

Also, am I understanding the motivation correctly.
That since binary distributions are produced that setting SOURCE_DATE_EPOCH you can eliminate any datestamps from being changes and so a simple (binary?) diff of packages could ensure that the package hasn't been altered

@bmwiedemann

This comment has been minimized.

Contributor

bmwiedemann commented Oct 14, 2018

The results should be bit-identical, so you can just compare the hash/digest of the resulting packages. We are nearly there (e.g. it is working for 95% of 11000 openSUSE packages already)

Yes, it would change the date format. If there are many parsers around, we could leave the SConstruct version as is, but I guess, few people care about the man-page header.

@bdbaddog

This comment has been minimized.

Contributor

bdbaddog commented Oct 14, 2018

o.k. I'm going to leave this up for a few days and float the PR to our users mailing list.
I can't think of any good reason not to merge this though, but I like to give our users a heads up.
Maybe add in the CHANGES.txt that the effect will be datestamps in docs and embedded in code will change format even when SOURCE_DATE_EPOCH is not specified?

@bmwiedemann

This comment has been minimized.

Contributor

bmwiedemann commented Oct 14, 2018

The man-page format is also particularly hard to understand (without looking at the source) - e.g. is 01/02/2018 January or February?

Will add a CHANGES.txt entry.

@bdbaddog

This comment has been minimized.

Contributor

bdbaddog commented Oct 14, 2018

US date formatting so January.

@bmwiedemann

This comment has been minimized.

Contributor

bmwiedemann commented Oct 14, 2018

In Germany, 01.02.2018 is the first of February and I don't want to know how many other variants exist around the world.

@bdbaddog

This comment has been minimized.

Contributor

bdbaddog commented Oct 14, 2018

Indeed. One of many locale based date/time/etc variations.

@coveralls

This comment has been minimized.

coveralls commented Oct 14, 2018

Coverage Status

Coverage remained the same at 79.953% when pulling a61f52d on bmwiedemann:date into 0c20ae2 on SCons:master.

@@ -162,6 +162,10 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
Three uses of variables not defined are changed.
- Some script changes in trying to find scons engine
From Bernhard M. Wiedemann:
- Allow to override build date with SOURCE_DATE_EPOCH

This comment has been minimized.

@bdbaddog

bdbaddog Oct 14, 2018

Contributor

Please add a note that this is only about building SCons packages and not universal to builds done by scons when building other software.

Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
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.

Also consistently use ISO 8601 date format
to be understood everywhere.
Also use gmtime to be independent of timezone.

@bdbaddog bdbaddog merged commit e6d3391 into SCons:master Oct 15, 2018

3 of 4 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
WIP ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 79.953%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment