Skip to content

Commit

Permalink
[chore] use license shortform (#22052)
Browse files Browse the repository at this point in the history
This change updates the license across all the files to use the SPDX format, and adds a check for the presence
of that line in `make checklicense`.

Fix #22043

---------

Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
Alex Boten authored May 18, 2023
1 parent c8da52b commit 5133f4c
Show file tree
Hide file tree
Showing 3,290 changed files with 3,308 additions and 39,495 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
15 changes: 2 additions & 13 deletions .github/workflows/scripts/add-codeowners-to-pr.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#
# Adds code owners without write access as reviewers on a PR. Note that
# the code owners must still be a member of the `open-telemetry`
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/add-component-options.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env sh
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#
# Takes the list of components from the CODEOWNERS file and inserts them
# as a YAML list in a GitHub issue template, then prints out the resulting
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/add-labels.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#
#

Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/check-codeowners.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash

# Copyright The OpenTelemetry Authors.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

#
# verifies:
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/check-collector-module-version.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash

# Copyright The OpenTelemetry Authors

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

#
# verifies if the collector components are using the main core collector version
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/scripts/dependabot-pr.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/bin/zsh -ex

# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0

git config user.name opentelemetrybot
git config user.email [email protected]
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/generate-component-labels.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#
# Note that there is a 50-character limit on labels, so some components may
# not have a corresponding label.
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/get-codeowners.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#
# This script checks the GitHub CODEOWNERS file for any code owners
# of contrib components and returns a string of the code owners if it
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/get-components.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env sh
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#
# Get a list of components within the repository that have some form of ownership
# ascribed to them.
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/mark-issues-as-stale.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#
# This script checks for issues that have been inactive for a certain number
# of days. Any inactive issues have codeowners pinged for labels corresponding
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/ping-codeowners-issues.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#
#

Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/ping-codeowners-on-new-issue.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#
#

Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/scripts/ping-codeowners-prs.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
#
# Copyright The OpenTelemetry Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
#

set -euo pipefail
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/scripts/release-prepare-release.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/bin/bash -ex

# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0

make chlog-update VERSION="v${CANDIDATE_BETA}"
git config user.name opentelemetrybot
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/scripts/set_release_tag.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/bin/bash -ex

# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0

TAG="${GITHUB_REF##*/}"
if [[ $TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+.* ]]
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/scripts/setup_e2e_tests.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/bin/bash

# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0

TESTS="$(make -s -C testbed list-tests | xargs echo|sed 's/ /|/g')"
TESTS=(${TESTS//|/ })
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/scripts/setup_stability_tests.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/bin/bash -ex

# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0

TESTS="$(make -s -C testbed list-stability-tests | xargs echo|sed 's/ /|/g')"

Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/scripts/verify-dist-files-exist.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
#!/bin/bash

# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0

files=(
bin/otelcontribcol_darwin_arm64
Expand Down
3 changes: 2 additions & 1 deletion Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ benchmark:

.PHONY: addlicense
addlicense: $(ADDLICENCESE)
@ADDLICENCESEOUT=`$(ADDLICENCESE) -y "" -c 'The OpenTelemetry Authors' $(ALL_SRC) 2>&1`; \
@ADDLICENCESEOUT=`$(ADDLICENCESE) -s=only -y "" -c 'The OpenTelemetry Authors' $(ALL_SRC) 2>&1`; \
if [ "$$ADDLICENCESEOUT" ]; then \
echo "$(ADDLICENCESE) FAILED => add License errors:\n"; \
echo "$$ADDLICENCESEOUT\n"; \
Expand All @@ -130,6 +130,7 @@ addlicense: $(ADDLICENCESE)
checklicense: $(ADDLICENCESE)
@licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path '**/third_party/*') ; do \
awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=3 { found=1; next } END { if (!found) print FILENAME }' $$f; \
awk '/SPDX-License-Identifier: Apache-2.0|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \
done); \
if [ -n "$${licRes}" ]; then \
echo "license header checking failed:"; echo "$${licRes}"; \
Expand Down
Loading

0 comments on commit 5133f4c

Please sign in to comment.