Skip to content

Commit

Permalink
all: remove year from copyright notice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tklauser committed Nov 9, 2022
1 parent b36b657 commit 409a6ff
Show file tree
Hide file tree
Showing 55 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion cmd/common/config/flags.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package config

Expand Down
2 changes: 1 addition & 1 deletion cmd/common/config/viper.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package config

Expand Down
2 changes: 1 addition & 1 deletion cmd/common/conn/conn.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package conn

Expand Down
2 changes: 1 addition & 1 deletion cmd/common/conn/tls.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package conn

Expand Down
2 changes: 1 addition & 1 deletion cmd/common/doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

// Package common implements utilities that are meant to be used commonly by
// all sub-commands to ensure consistency across them.
Expand Down
2 changes: 1 addition & 1 deletion cmd/common/template/usage.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package template

Expand Down
2 changes: 1 addition & 1 deletion cmd/common/template/usage_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package template

Expand Down
2 changes: 1 addition & 1 deletion cmd/common/validate/doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

// Package validate implements utilities to validate the command configuration
// by, for example, validating a set of given options.
Expand Down
2 changes: 1 addition & 1 deletion cmd/common/validate/flag.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package validate

Expand Down
2 changes: 1 addition & 1 deletion cmd/common/validate/tls.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package validate

Expand Down
2 changes: 1 addition & 1 deletion cmd/config/config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package config

Expand Down
2 changes: 1 addition & 1 deletion cmd/config/get.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package config

Expand Down
2 changes: 1 addition & 1 deletion cmd/config/reset.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package config

Expand Down
2 changes: 1 addition & 1 deletion cmd/config/set.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package config

Expand Down
2 changes: 1 addition & 1 deletion cmd/config/view.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package config

Expand Down
2 changes: 1 addition & 1 deletion cmd/list/list.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package list

Expand Down
2 changes: 1 addition & 1 deletion cmd/list/node.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package list

Expand Down
2 changes: 1 addition & 1 deletion cmd/list/node_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package list

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/agent_events.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/agent_events_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/debug_events.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/debug_events_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/events.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/flows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019-2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/flows_filter.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019-2020 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/flows_filter_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/flows_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/identity.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/io_reader_observer.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/io_reader_observer_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/observe.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019-2021 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/workload.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/observe/workload_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Authors of Hubble
// Copyright Authors of Hubble

package observe

Expand Down
2 changes: 1 addition & 1 deletion cmd/record/record.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package record

Expand Down
2 changes: 1 addition & 1 deletion cmd/record/tty_linux.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

//go:build linux

Expand Down
2 changes: 1 addition & 1 deletion cmd/record/tty_others.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

//go:build !linux

Expand Down
2 changes: 1 addition & 1 deletion cmd/reflect/reflect.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package reflect

Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2017-2020 Authors of Hubble
// Copyright Authors of Hubble

package cmd

Expand Down
2 changes: 1 addition & 1 deletion cmd/status/status.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019 Authors of Hubble
// Copyright Authors of Hubble

package status

Expand Down
2 changes: 1 addition & 1 deletion cmd/version/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package version

Expand Down
2 changes: 1 addition & 1 deletion cmd/watch/peer.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package watch

Expand Down
2 changes: 1 addition & 1 deletion cmd/watch/peer_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package watch

Expand Down
2 changes: 1 addition & 1 deletion cmd/watch/watch.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package watch

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019 Authors of Hubble
// Copyright Authors of Hubble

// Ensure build fails on versions of Go that are not supported by Hubble.
// This build tag should be kept in sync with the version specified in go.mod.
Expand Down
2 changes: 1 addition & 1 deletion pkg/defaults/defaults.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package defaults

Expand Down
2 changes: 1 addition & 1 deletion pkg/logger/logger.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package logger

Expand Down
2 changes: 1 addition & 1 deletion pkg/printer/color.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package printer

Expand Down
2 changes: 1 addition & 1 deletion pkg/printer/formatter.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package printer

Expand Down
2 changes: 1 addition & 1 deletion pkg/printer/formatter_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Hubble
// Copyright Authors of Hubble

package printer

Expand Down
2 changes: 1 addition & 1 deletion pkg/printer/options.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019-2021 Authors of Hubble
// Copyright Authors of Hubble

package printer

Expand Down
2 changes: 1 addition & 1 deletion pkg/printer/printer.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019-2021 Authors of Hubble
// Copyright Authors of Hubble

package printer

Expand Down
2 changes: 1 addition & 1 deletion pkg/printer/printer_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019 Authors of Hubble
// Copyright Authors of Hubble

package printer

Expand Down
2 changes: 1 addition & 1 deletion pkg/time/time.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019 Authors of Hubble
// Copyright Authors of Hubble

package time

Expand Down
2 changes: 1 addition & 1 deletion pkg/time/time_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2019 Authors of Hubble
// Copyright Authors of Hubble

package time

Expand Down
2 changes: 1 addition & 1 deletion pkg/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Hubble
// Copyright Authors of Hubble

package pkg

Expand Down

0 comments on commit 409a6ff

Please sign in to comment.