Skip to content

Simplify license headers#285

Merged
rockdaboot merged 1 commit into
masterfrom
simplify-copyright
Jul 12, 2026
Merged

Simplify license headers#285
rockdaboot merged 1 commit into
masterfrom
simplify-copyright

Conversation

@rockdaboot

Copy link
Copy Markdown
Owner

Problem

Maintenance burden due to having copyright years in every source code file.

Suggestion to reduce maintenance burden

  • remove copyright years and instead refer to git history
  • remove license text from files and refer to LICENSE file
  • add SPDX-License-Identifier to files

Remark

This PR is not complete yet.
If/When we find consent, I'll amend all files appropriately.
Please let me know what you think, @eli-schwartz

Fixes #284

@rockdaboot
rockdaboot requested a review from eli-schwartz July 5, 2026 21:00
@rockdaboot rockdaboot self-assigned this Jul 5, 2026
@rockdaboot

Copy link
Copy Markdown
Owner Author

The git reference doesn't apply to tarballs. Maybe we need the copyright years in LICENSE and COPYING.

@eli-schwartz

Copy link
Copy Markdown
Collaborator

It is possible to have gitattributes export-subst replace a template with information from a git commit. This is often used to do stuff like set version numbers in git-archive tarballs based on the git tag associated with the archive.

It works with git autogenerated "source code" tarballs, which can cover people downloading the wrong release asset. And you can also have make distcheck write out this information.

So, if you want to avoid manually updating the copyright year, that's what I'd do.

@rockdaboot

Copy link
Copy Markdown
Owner Author

It is possible to have gitattributes export-subst replace a template with information from a git commit. This is often used to do stuff like set version numbers in git-archive tarballs based on the git tag associated with the archive.

It works with git autogenerated "source code" tarballs, which can cover people downloading the wrong release asset. And you can also have make distcheck write out this information.

So, if you want to avoid manually updating the copyright year, that's what I'd do.

Thanks @eli-schwartz, just learned about export-subst.

There are tools like license checkers that read LICENSE etc. and other files from git. Not sure how they deal with a format/template instead of a concrete date/year.

Atm, I'd prefer not using templates and manually update the copyright year at max once a year just in the LICENSE file. Since we already use AM_INIT_AUTOMAKE([foreign]), we can safely remove COPYING (it is identical to LICENSE). And follow the points mentioned in the issue description.

Not set in stone though, we can improve in the future using templates, if we feel confident about the possible corner cases.

@rockdaboot
rockdaboot force-pushed the simplify-copyright branch 3 times, most recently from 10c78bf to 390796a Compare July 12, 2026 16:40
@rockdaboot
rockdaboot force-pushed the simplify-copyright branch from 390796a to d5a5c09 Compare July 12, 2026 17:06
@rockdaboot
rockdaboot marked this pull request as ready for review July 12, 2026 17:09
@rockdaboot
rockdaboot merged commit da54796 into master Jul 12, 2026
10 checks passed
@rockdaboot
rockdaboot deleted the simplify-copyright branch July 12, 2026 17: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.

Copyright year inconsistency: main 2014-2022, src files end at 2015

2 participants