Skip to content

Commit

Permalink
licensing: remove copyright year and symbol for most source files
Browse files Browse the repository at this point in the history
Cilium source files have a header with a SPDX tag and a copyright
notice, stating that the copyright (for the vast majority of files) goes
to the Authors of Cilium, and containing a year or year range to specify
to what period the copyright extends.

The year, and the copyright symbol ("(C)" or equivalent), are not
necessary in this statement. The CNCF recommends not using the year or
the symbol, to keep files easily 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.

This commit drops the year, year range, and copyright symbol for most of
the codebase.

The files were processed as follows:

    $ cat years.sed
    # Skip after line 6 (branch to end so we still print the line)
    6, $ b
    # Process copyright notice preceded by a SPDX tag
    /^\(#\|\/\/\|\/\*\) *SPDX-License-Identifier: \(GPL-2\.0\|Apache-2\.0\)\( \*\/\)\?$/ {
        N; s/Copyright .* Authors of Cilium/Copyright Authors of Cilium/
    }
    # Process copyright notice followed by a SPDX tag
    /^\(#\|\/\/\|\/\*\) *Copyright .* Authors of Cilium\( \*\/\)\?$/ {
        N; {
            /\(#\|\/\/\|\/\*\) *SPDX-License-Identifier: \(GPL-2\.0\|Apache-2\.0\)\( \*\/\)\?$/ s/Copyright .* Authors of Cilium/Copyright Authors of Cilium/
        }
    }

    $ find bpf bugtool check_codeowners cilium cilium-health \
    clustermesh-apiserver contrib daemon dep.yaml envoy examples hack \
    hubble-relay install jenkinsfiles operator pkg plugins proxylib \
    test tools Makefile* \
        -type f -print0 | xargs -0 -P 8 sed -i -f years.sed

    $ GOPATH=~go make generate-k8s-api

Files under image/ are not updated, because they need some additional
steps to regenerate the images. They will be updated in a follow-up PR.

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

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
  • Loading branch information
qmonnet authored and joestringer committed Feb 17, 2022
1 parent d5edfa1 commit 314ca7b
Show file tree
Hide file tree
Showing 1,814 changed files with 1,814 additions and 1,814 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2021 Authors of Cilium
# Copyright Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

##@ Default
Expand Down
2 changes: 1 addition & 1 deletion Makefile.defs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2020 Authors of Cilium
# Copyright Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

SHELL := /bin/bash
Expand Down
2 changes: 1 addition & 1 deletion Makefile.docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2020 Authors of Cilium
# Copyright Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

DOCKER_BUILDER := default
Expand Down
2 changes: 1 addition & 1 deletion Makefile.quiet
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2020 Authors of Cilium
# Copyright Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

ifeq ($(ROOT_DIR),)
Expand Down
2 changes: 1 addition & 1 deletion api/v1/models/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v1/models/zz_generated.deepequal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bpf/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2021 Authors of Cilium
# Copyright Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

include ../Makefile.defs
Expand Down
2 changes: 1 addition & 1 deletion bpf/Makefile.bpf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2020 Authors of Cilium
# Copyright Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

FLAGS := -I$(ROOT_DIR)/bpf/include -I$(ROOT_DIR)/bpf -D__NR_CPUS__=$(shell nproc --all) -O2 -g
Expand Down
2 changes: 1 addition & 1 deletion bpf/bpf_alignchecker.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2018-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

/* Ensure declaration of notification event types */
#define DEBUG
Expand Down
2 changes: 1 addition & 1 deletion bpf/bpf_features.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */
#ifndef BPF_FEATURES_H_
#define BPF_FEATURES_H_

Expand Down
2 changes: 1 addition & 1 deletion bpf/bpf_host.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#include <bpf/ctx/skb.h>
#include <bpf/api.h>
Expand Down
2 changes: 1 addition & 1 deletion bpf/bpf_lxc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2016-2021 Authors of Cilium */
/* Copyright Authors of Cilium */

#include <bpf/ctx/skb.h>
#include <bpf/api.h>
Expand Down
2 changes: 1 addition & 1 deletion bpf/bpf_network.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2019-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#include <bpf/ctx/skb.h>
#include <bpf/api.h>
Expand Down
2 changes: 1 addition & 1 deletion bpf/bpf_overlay.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2016-2022 Authors of Cilium */
/* Copyright Authors of Cilium */

#include <bpf/ctx/skb.h>
#include <bpf/api.h>
Expand Down
2 changes: 1 addition & 1 deletion bpf/bpf_sock.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2019-2021 Authors of Cilium */
/* Copyright Authors of Cilium */

#include <bpf/ctx/unspec.h>
#include <bpf/api.h>
Expand Down
2 changes: 1 addition & 1 deletion bpf/bpf_xdp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2017-2021 Authors of Cilium */
/* Copyright Authors of Cilium */

#include <bpf/ctx/xdp.h>
#include <bpf/api.h>
Expand Down
2 changes: 1 addition & 1 deletion bpf/cilium-probe-kernel-hz.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#define _GNU_SOURCE

Expand Down
2 changes: 1 addition & 1 deletion bpf/custom/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021 Authors of Cilium
# Copyright Authors of Cilium

include ../../Makefile.defs

Expand Down
2 changes: 1 addition & 1 deletion bpf/ep_config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2021 Authors of Cilium */
/* Copyright Authors of Cilium */

/*
* This is just a dummy header with dummy values to allow for test
Expand Down
2 changes: 1 addition & 1 deletion bpf/filter_config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2017-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

/*
* This is just a dummy header with dummy values to allow for test
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/access.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_ACCESS_H_
#define __BPF_ACCESS_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/api.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_API__
#define __BPF_API__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/builtins.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_BUILTINS__
#define __BPF_BUILTINS__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/compiler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_COMPILER_H_
#define __BPF_COMPILER_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/csum.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_CSUM_H_
#define __BPF_CSUM_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/ctx/common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_CTX_COMMON_H_
#define __BPF_CTX_COMMON_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/ctx/ctx.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_CTX_CTX_H_
#define __BPF_CTX_CTX_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/ctx/skb.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_CTX_SKB_H_
#define __BPF_CTX_SKB_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/ctx/unspec.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_CTX_UNSPEC_H_
#define __BPF_CTX_UNSPEC_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/ctx/xdp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020-2021 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_CTX_XDP_H_
#define __BPF_CTX_XDP_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/errno.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_ERRNO__
#define __BPF_ERRNO__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/features.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef ____BPF_FEATURES____
#define ____BPF_FEATURES____
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/features_skb.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_FEATURES_SKB__
#define __BPF_FEATURES_SKB__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/features_xdp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_FEATURES_XDP__
#define __BPF_FEATURES_XDP__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/helpers.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_HELPERS__
#define __BPF_HELPERS__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/helpers_skb.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_HELPERS_SKB__
#define __BPF_HELPERS_SKB__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/helpers_xdp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_HELPERS_XDP__
#define __BPF_HELPERS_XDP__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/loader.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2021 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_LOADER__
#define __BPF_LOADER__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/section.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2021 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_SECTION__
#define __BPF_SECTION__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/stddef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef NULL
#define NULL ((void *)0)
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/tailcall.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_TAILCALL_H_
#define __BPF_TAILCALL_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/types_mapper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_TYPES_MAPPER__
#define __BPF_TYPES_MAPPER__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/bpf/verifier.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __BPF_VERIFIER__
#define __BPF_VERIFIER__
Expand Down
2 changes: 1 addition & 1 deletion bpf/include/linux/types.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef _LINUX_TYPES_H
#define _LINUX_TYPES_H
Expand Down
2 changes: 1 addition & 1 deletion bpf/init.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright 2016-2020 Authors of Cilium
# Copyright Authors of Cilium

LIB=$1
RUNDIR=$2
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/arp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_ARP__
#define __LIB_ARP__
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2021 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_COMMON_H_
#define __LIB_COMMON_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/conntrack.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_CONNTRACK_H_
#define __LIB_CONNTRACK_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/conntrack_map.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2021 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_CONNTRACK_MAP_H_
#define __LIB_CONNTRACK_MAP_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/csum.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_CSUM_H_
#define __LIB_CSUM_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/dbg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_DBG__
#define __LIB_DBG__
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/drop.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

/*
* Drop & error notification via perf event ring buffer
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/edt.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __EDT_H_
#define __EDT_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/egress_policies.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2021 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_EGRESS_POLICIES_H_
#define __LIB_EGRESS_POLICIES_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/encap.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_ENCAP_H_
#define __LIB_ENCAP_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/encrypt.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_ENCRYPT_H_
#define __LIB_ENCRYPT_H_
Expand Down
2 changes: 1 addition & 1 deletion bpf/lib/endian.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2016-2020 Authors of Cilium */
/* Copyright Authors of Cilium */

#ifndef __LIB_ENDIAN_H_
#define __LIB_ENDIAN_H_
Expand Down
Loading

0 comments on commit 314ca7b

Please sign in to comment.