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 #553

Closed
wants to merge 1 commit into from

Conversation

bmwiedemann
Copy link
Contributor

cmake already uses SOURCE_DATE_EPOCH for its TIMESTAMP function.

Makefile could use it as well as documented in
https://reproducible-builds.org/docs/source-date-epoch/

Note: cmake codepath needs testing. I only tested the Makefile part.

cmake uses SOURCE_DATE_EPOCH for TIMESTAMP

Makefile could use it as well as documented in
https://reproducible-builds.org/docs/source-date-epoch/

Also use UTC to be independent of timezone.

cmake codepath needs testing
@@ -93,7 +93,7 @@ tar: doc

doc/%.1 doc/%.7: doc/%.txt version.mk
$(call colorecho,DOC,$@)
$(VERBOSE) $(A2X) -f manpage -a "herbstluftwmversion=herbstluftwm $(VERSION)" -a "date=`date +%Y-%m-%d`" $<
$(VERBOSE) $(A2X) -f manpage -a "herbstluftwmversion=herbstluftwm $(VERSION)" -a "date=`date -u -r NEWS %Y-%m-%d`" $<
Copy link
Member

Choose a reason for hiding this comment

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

When using a file's modification date, I think one should use $< because the modification date of NEWS is independent from the man page modification date.

Copy link
Member

Choose a reason for hiding this comment

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

I'm wrong for released versions. I think it is fine as it is!

@t-wissmann
Copy link
Member

Your changes improve the build system, and I don't want to discard your contribution. However, the development in the master branch is paused in favor of the winterbreeze branch, and the entire content of master will be discarded soon. The winterbreeze branch is "ahead of master" (in the git language), so I'd like not to commit to the master branch (except for bug fixes).

You are welcome to do these changes in the winterbreeze branch (the resepctive file is doc/CMakeLists.txt; the entire build system is cmake based now).

@t-wissmann t-wissmann closed this Jul 7, 2019
mergify bot pushed a commit that referenced this pull request Nov 5, 2020
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](https://reproducible-builds.org/) for [openSUSE](https://en.opensuse.org/openSUSE:Reproducible_Builds).
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