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

DOC: make the documentation reproducible when rebuilt #652

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

smcv
Copy link
Contributor

@smcv smcv commented Jul 31, 2024

  • From: @lamby

    Make the documentation reproducible when rebuilt

    The Reproducible Builds project aims to arrange for rebuilding the same
    source code in a sufficiently similar environment to produce the same
    installable packages every time, as a way to discourage supply-chain
    attacks by making it possible to verify that a particular installable
    package was built from the claimed source code.

    Previously, if meson-python was built twice, at least a year apart,
    then its documentation would contain different copyright dates. The
    SOURCE_DATE_EPOCH environment variable is used here to avoid that
    difference: the intention is that environments that want to produce
    reproducible packages will set SOURCE_DATE_EPOCH to some suitable fixed
    date (perhaps the date of the most recent git commit) which is held
    constant across rebuilds.

    See the specification for SOURCE_DATE_EPOCH for more details:
    https://reproducible-builds.org/docs/source-date-epoch/

    [smcv: Added commit message]

    Co-authored-by: @smcv


The actual change here is a patch originally sent to https://bugs.debian.org/1076806.

The Reproducible Builds project aims to arrange for rebuilding the same
source code in a sufficiently similar environment to produce the same
installable packages every time, as a way to discourage supply-chain
attacks by making it possible to verify that a particular installable
package was built from the claimed source code.

Previously, if meson-python was built twice, at least a year apart,
then its documentation would contain different copyright dates. The
SOURCE_DATE_EPOCH environment variable is used here to avoid that
difference: the intention is that environments that want to produce
reproducible packages will set SOURCE_DATE_EPOCH to some suitable fixed
date (perhaps the date of the most recent git commit) which is held
constant across rebuilds.

See the specification for SOURCE_DATE_EPOCH for more details:
https://reproducible-builds.org/docs/source-date-epoch/

[smcv: Added commit message]

Co-authored-by: Simon McVittie <[email protected]>
@lamby
Copy link
Contributor

lamby commented Jul 31, 2024

Thanks for forwarding this upstream, @smcv !

@smcv
Copy link
Contributor Author

smcv commented Jul 31, 2024

I hope you're sufficiently happy with the long commit message that I added. I didn't want to leave it at just what you said in the original patch, because as an upstream developer (in other projects, not this one), if I received a similar patch without having the context of knowing about the reproducible builds goal within Debian, I would have wanted to see more details in the commit message before accepting it.

@lamby
Copy link
Contributor

lamby commented Jul 31, 2024

Oh, very happy. In fact, I may use this as a template to improve my own PRs. Thanks :)

@rgommers rgommers changed the title Make the documentation reproducible when rebuilt DOC: make the documentation reproducible when rebuilt Aug 2, 2024
@rgommers rgommers added the documentation Improvements or additions to documentation label Aug 2, 2024
Copy link
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @smcv and @lamby. Build reproducibility improvements are always very welcome!

@rgommers rgommers added this to the v0.17.0 milestone Aug 2, 2024
@rgommers rgommers merged commit a933796 into mesonbuild:main Aug 2, 2024
11 of 15 checks passed
@smcv smcv deleted the reproducible-docs branch August 2, 2024 12:32
@rgommers rgommers mentioned this pull request Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants