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

Commits on Nov 9, 2022

  1. all: convert to SPDX license headers

    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>
    tklauser committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    13ab3f4 View commit details
    Browse the repository at this point in the history
  2. all: remove year from copyright notice

    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 committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    13e9b2a View commit details
    Browse the repository at this point in the history