-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
copyright: Apply substitutions only to current-year entries, and disallow future year insertion #12516
copyright: Apply substitutions only to current-year entries, and disallow future year insertion #12516
Conversation
…tution: 1. The ``SOURCE_DATE_EPOCH`` year must be greater than the local system-clock year. 2. The year(s) to be substituted must match the local system-clock year.
…ht-as-configured const variable.
…`) must be earlier than the current year.
…ution-preconditions
A belated note that this discussion has begun, and can be found at: https://lists.reproducible-builds.org/pipermail/rb-general/2024-July/003458.html |
This comment was marked as outdated.
This comment was marked as outdated.
…ution-preconditions Conflicts: CHANGES.rst tests/test_config/test_config.py tests/test_config/test_correct_year.py
…ution-preconditions # Conflicts: # CHANGES.rst
I've pushed a commit to simplify the replacements a bit, but I'm not happy with the tests at present -- we should keep the current tests and add the new ones on top, rather than replacing. I'm working on this now. A |
…ution-preconditions # Conflicts: # tests/test_config/test_config.py # tests/test_config/test_correct_year.py
I'm happier with the current state, but will hold off on merging in case I've missed a test case or scenerio that you think is important to test. A |
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@AA-Turner Ok, this is ready from my perspective. Thanks for adding some momentum to it. |
Thank you @jayaddison -- I'll update #12910, do review that PR if you have time. A |
Thanks very much @AA-Turner - and will do 👍 |
Feature or Bugfix
Purpose
Allow downstream projects to opt-out of copyright year substitution using a configuration setting.conf.py
.Detail
Adds a default-enabledcopyright_build_year_substitution
config setting.conf.py
copyright notices that are configured to containdatetime.today().year
or similar as current-year.SOURCE_DATE_EPOCH
(build time) isgreater thanless than the matching copyright notice year.Relates
Edit: logical fixup for greater-than vs less-than condition.
Edit: typo fixup
Edit: remove config setting changes