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

Convert to SPDX license headers and remove copyright year #812

Merged
merged 2 commits into from
Nov 9, 2022

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented Nov 9, 2022

Follow similar changes in the Cilium repo.

See individual commits for details.

Generated by running the spdxconv tool (tools/spdxconv in the Cilium
repo) over the entire code base.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
Hubble source files have a header with a SPDX tag and a copyright
notice, stating that the copyright goes to the Authors of Hubble, and
containing a year or year range to specify to what period the copyright
extends.

The year or year range are not necessary in this statement. The CNCF
recommends not using the year or the copyright symbol, to keep files
easy to process [0]. The history of the source code is conserved through
the version control system, and is easily available for all to check
out.

[0] https://github.com/cncf/foundation/blob/main/copyright-notices.md#copyright-notices

Drop the year and year range for the entire codebase.

The files were processed as follows:

$ cat years.sed
6, $ b
/^\(#\|\/\/\|\/\*\) *SPDX-License-Identifier: \(GPL-2\.0\|Apache-2\.0\)\( \*\/\)\?$/ {
    N; s/Copyright .* Authors of Hubble/Copyright Authors of Hubble/
}
/^\(#\|\/\/\|\/\*\) *Copyright .* Authors of Hubble\( \*\/\)\?$/ {
    N; {
	/\(#\|\/\/\|\/\*\) *SPDX-License-Identifier: \(GPL-2\.0\|Apache-2\.0\)\( \*\/\)\?$/ s/Copyright .* Authors of Hubble/Copyright Authors of Hubble/
    }
}
$ find main.go cmd pkg -type f -print0 | xargs -0 -P 8 sed -i -f years.sed

Also add copyright headers to some Go source files that were previously
missing the headers.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser requested a review from a team as a code owner November 9, 2022 14:38
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label PR is blocked until the release note is set label Nov 9, 2022
@tklauser tklauser added the release-note/misc This PR makes changes that have no direct user impact. label Nov 9, 2022
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label PR is blocked until the release note is set label Nov 9, 2022
Copy link
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

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

Awesome, thanks a lot for taking care of this!

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 9, 2022
@tklauser tklauser merged commit 409a6ff into master Nov 9, 2022
@tklauser tklauser deleted the pr/tklauser/spdx-headers branch November 9, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants