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

Make man page date reproducible #1029

Merged
merged 3 commits into from Nov 5, 2020
Merged

Conversation

bmwiedemann
Copy link
Contributor

Make man page date reproducible

See https://reproducible-builds.org/ for why this is good

CMake already uses SOURCE_DATE_EPOCH for TIMESTAMP
The SOURCE_DATE_EPOCH variable is documented in
https://reproducible-builds.org/docs/source-date-epoch/

Also use UTC to be independent of timezone.

This is mostly a rebase of #553 that I finally managed to test on 0.9.0 now.

This PR was done while working on reproducible builds for openSUSE.

See https://reproducible-builds.org/ for why this is good

CMake already uses SOURCE_DATE_EPOCH for TIMESTAMP
The SOURCE_DATE_EPOCH variable is documented in
https://reproducible-builds.org/docs/source-date-epoch/

Also use UTC to be independent of timezone.
Copy link
Member

@t-wissmann t-wissmann left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it! Sorry that I forgot about your original PR after winterbreeze had been merged.

Am I correct, that now, package maintainers can set BUILD_DATE manually to achieve a reproducable build? By the way, for the man pages in released versions, the man page date can also be taken from the first line matching Release.* on .* and only for git versions we need to improvise (e.g. take a TIMESTAMP or look up the git log)

@bmwiedemann
Copy link
Contributor Author

bmwiedemann commented Nov 5, 2020

maintainers can set SOURCE_DATE_EPOCH and cmake will use that to fill BUILD_DATE.
rpmbuild and Debian's and ArchLinux' package build automatically set SOURCE_DATE_EPOCH to the latest package changelog entry date, so it can be reproducible by default there.

For reproducible git builds, you could set it to git log -1 --format=%ct

@codecov
Copy link

codecov bot commented Nov 5, 2020

Codecov Report

Merging #1029 into master will increase coverage by 0.0%.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #1029   +/-   ##
======================================
  Coverage    90.0%   90.0%           
======================================
  Files         102     102           
  Lines        8633    8633           
======================================
+ Hits         7777    7778    +1     
+ Misses        856     855    -1     

@mergify mergify bot merged commit 10b540c into herbstluftwm:master Nov 5, 2020
@bmwiedemann bmwiedemann deleted the date branch November 5, 2020 10:10
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.

None yet

2 participants