diff --git a/.github/actions/gh-metrics.js b/.github/actions/gh-metrics.js index c27b019a..2da9fc0b 100644 --- a/.github/actions/gh-metrics.js +++ b/.github/actions/gh-metrics.js @@ -1,3 +1,6 @@ +// Copyright New Relic, Inc. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + import {Octokit} from "@octokit/action"; import * as fs from 'fs'; import * as path from 'path'; diff --git a/Makefile b/Makefile index 4285a7bb..2d4c19a7 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ TOOLS_PKG_NAMES := $(shell grep -E $(TOOLS_MOD_REGEX) < $(TOOLS_MOD_DIR)/tools.g TOOLS_BIN_NAMES := $(addprefix $(TOOLS_BIN_DIR)/, $(notdir $(shell echo $(TOOLS_PKG_NAMES)))) GO_LICENCE_DETECTOR := $(TOOLS_BIN_DIR)/go-licence-detector GO_LICENCE_DETECTOR_CONFIG := $(SRC_ROOT)/internal/assets/license/rules.json +NRLICENSE := $(TOOLS_BIN_DIR)/nrlicense DISTRIBUTIONS ?= "nrdot-collector-host,nrdot-collector-k8s,nrdot-collector,nrdot-collector-experimental" @@ -145,15 +146,22 @@ $(TOOLS_BIN_DIR): $(TOOLS_BIN_NAMES): $(TOOLS_BIN_DIR) $(TOOLS_MOD_DIR)/go.mod cd $(TOOLS_MOD_DIR) && $(GOCMD) build -o $@ -trimpath $(filter %/$(notdir $@),$(TOOLS_PKG_NAMES)) -FILENAME?=$(shell git branch --show-current) +# postinstall.sh, preinstall.sh, and preremove.sh have OTel headers which would be overwritten were they not excluded. +HEADER_GEN_FILES=$(shell find $(SRC_ROOT)/. -type f \( -name '*.go' -o -name '*.js' -o -name '*.sh' \) ! -name 'pre*' ! -name 'post*') NOTICE_OUTPUT?=THIRD_PARTY_NOTICES.md +FIRST_COMMIT_HASH=6451f322bfe1e62962d3d87b50d785de8048e865 .PHONY: licenses -licenses: go generate-sources $(GO_LICENCE_DETECTOR) +licenses: go generate-sources $(GO_LICENCE_DETECTOR) $(NRLICENSE) @./scripts/licenses.sh -d "${DISTRIBUTIONS}" -b ${GO_LICENCE_DETECTOR} -n ${NOTICE_OUTPUT} -g ${GO} + @$(NRLICENSE) --fix --fork-commit ${FIRST_COMMIT_HASH} ${HEADER_GEN_FILES} + +.PHONY: headers-check +headers-check: $(NRLICENSE) + @$(NRLICENSE) --check --fork-commit ${FIRST_COMMIT_HASH} ${HEADER_GEN_FILES} .PHONY: licenses-check -licenses-check: licenses +licenses-check: headers-check licenses @git diff --name-only | grep -q $(NOTICE_OUTPUT) \ && { \ echo "Third party notices out of date, please run \"make licenses\" and commit the changes in this PR.";\ diff --git a/cmd/goreleaser/internal/configure.go b/cmd/goreleaser/internal/configure.go index e515d200..33058c17 100644 --- a/cmd/goreleaser/internal/configure.go +++ b/cmd/goreleaser/internal/configure.go @@ -1,3 +1,6 @@ +// Copyright New Relic, Inc. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + // 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 diff --git a/cmd/goreleaser/main.go b/cmd/goreleaser/main.go index 819cc59a..90b1f6c7 100644 --- a/cmd/goreleaser/main.go +++ b/cmd/goreleaser/main.go @@ -1,3 +1,6 @@ +// Copyright New Relic, Inc. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + // 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 diff --git a/cmd/nrdot-collector-builder/cmd/manifest.go b/cmd/nrdot-collector-builder/cmd/manifest.go index 2f5bd058..1aa5a495 100644 --- a/cmd/nrdot-collector-builder/cmd/manifest.go +++ b/cmd/nrdot-collector-builder/cmd/manifest.go @@ -1,5 +1,6 @@ -// Copyright 2025 New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 + package cmd import ( diff --git a/cmd/nrdot-collector-builder/cmd/manifest/update.go b/cmd/nrdot-collector-builder/cmd/manifest/update.go index 789656d7..372bfaad 100644 --- a/cmd/nrdot-collector-builder/cmd/manifest/update.go +++ b/cmd/nrdot-collector-builder/cmd/manifest/update.go @@ -1,5 +1,6 @@ -// Copyright 2025 New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 + package manifest import ( diff --git a/cmd/nrdot-collector-builder/cmd/manifest/update_test.go b/cmd/nrdot-collector-builder/cmd/manifest/update_test.go index da85a78b..0419d952 100644 --- a/cmd/nrdot-collector-builder/cmd/manifest/update_test.go +++ b/cmd/nrdot-collector-builder/cmd/manifest/update_test.go @@ -1,5 +1,6 @@ -// Copyright 2025 New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 + package manifest import ( diff --git a/cmd/nrdot-collector-builder/cmd/root.go b/cmd/nrdot-collector-builder/cmd/root.go index 473dc146..96dc7238 100644 --- a/cmd/nrdot-collector-builder/cmd/root.go +++ b/cmd/nrdot-collector-builder/cmd/root.go @@ -1,5 +1,6 @@ -// Copyright 2025 New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 + package cmd import ( diff --git a/cmd/nrdot-collector-builder/internal/manifest/config.go b/cmd/nrdot-collector-builder/internal/manifest/config.go index 3a28cade..294e2c17 100644 --- a/cmd/nrdot-collector-builder/internal/manifest/config.go +++ b/cmd/nrdot-collector-builder/internal/manifest/config.go @@ -1,5 +1,6 @@ -// Copyright 2025 New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 + package manifest import ( diff --git a/cmd/nrdot-collector-builder/internal/manifest/config_test.go b/cmd/nrdot-collector-builder/internal/manifest/config_test.go index 14158b03..98bb9237 100644 --- a/cmd/nrdot-collector-builder/internal/manifest/config_test.go +++ b/cmd/nrdot-collector-builder/internal/manifest/config_test.go @@ -1,5 +1,6 @@ -// Copyright 2025 New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 + package manifest import ( diff --git a/cmd/nrdot-collector-builder/internal/manifest/main.go b/cmd/nrdot-collector-builder/internal/manifest/main.go index a71efa34..3fc8429c 100644 --- a/cmd/nrdot-collector-builder/internal/manifest/main.go +++ b/cmd/nrdot-collector-builder/internal/manifest/main.go @@ -1,5 +1,6 @@ -// Copyright 2025 New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 + package manifest import ( diff --git a/cmd/nrdot-collector-builder/internal/manifest/main_test.go b/cmd/nrdot-collector-builder/internal/manifest/main_test.go index 3816217f..e51b96b2 100644 --- a/cmd/nrdot-collector-builder/internal/manifest/main_test.go +++ b/cmd/nrdot-collector-builder/internal/manifest/main_test.go @@ -1,5 +1,6 @@ -// Copyright 2025 New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 + package manifest import ( diff --git a/cmd/nrdot-collector-builder/main.go b/cmd/nrdot-collector-builder/main.go index 5ef8853f..8d0a4c92 100644 --- a/cmd/nrdot-collector-builder/main.go +++ b/cmd/nrdot-collector-builder/main.go @@ -1,5 +1,6 @@ -// Copyright 2025 New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 + package main import "newrelic-collector-builder/cmd" diff --git a/distributions/nrdot-collector-experimental/THIRD_PARTY_NOTICES.md b/distributions/nrdot-collector-experimental/THIRD_PARTY_NOTICES.md index 4f416bac..0f47da0e 100644 --- a/distributions/nrdot-collector-experimental/THIRD_PARTY_NOTICES.md +++ b/distributions/nrdot-collector-experimental/THIRD_PARTY_NOTICES.md @@ -1,6 +1,6 @@ # Third Party Notices -The New Relic infrastructure agent uses source code from third party libraries which carry their own copyright notices +New Relic Distributions of OpenTelemetry use source code from third party libraries which carry their own copyright notices and license terms. These notices are provided below. In the event that a required notice is missing or incorrect, please notify us by e-mailing diff --git a/distributions/nrdot-collector-host/THIRD_PARTY_NOTICES.md b/distributions/nrdot-collector-host/THIRD_PARTY_NOTICES.md index dce84469..d621c680 100644 --- a/distributions/nrdot-collector-host/THIRD_PARTY_NOTICES.md +++ b/distributions/nrdot-collector-host/THIRD_PARTY_NOTICES.md @@ -1,6 +1,6 @@ # Third Party Notices -The New Relic infrastructure agent uses source code from third party libraries which carry their own copyright notices +New Relic Distributions of OpenTelemetry use source code from third party libraries which carry their own copyright notices and license terms. These notices are provided below. In the event that a required notice is missing or incorrect, please notify us by e-mailing diff --git a/distributions/nrdot-collector-host/assert-invariants-agent-control.sh b/distributions/nrdot-collector-host/assert-invariants-agent-control.sh index 69029ade..d198c514 100755 --- a/distributions/nrdot-collector-host/assert-invariants-agent-control.sh +++ b/distributions/nrdot-collector-host/assert-invariants-agent-control.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + set -e yq --version | grep -E -q '4\.[0-9]+\.[0-9]+' || { echo $? && echo "yq version 4.x.x is expected, but was '$(yq --version)'"; exit 1; } diff --git a/distributions/nrdot-collector-k8s/THIRD_PARTY_NOTICES.md b/distributions/nrdot-collector-k8s/THIRD_PARTY_NOTICES.md index 56689257..3877248e 100644 --- a/distributions/nrdot-collector-k8s/THIRD_PARTY_NOTICES.md +++ b/distributions/nrdot-collector-k8s/THIRD_PARTY_NOTICES.md @@ -1,6 +1,6 @@ # Third Party Notices -The New Relic infrastructure agent uses source code from third party libraries which carry their own copyright notices +New Relic Distributions of OpenTelemetry use source code from third party libraries which carry their own copyright notices and license terms. These notices are provided below. In the event that a required notice is missing or incorrect, please notify us by e-mailing diff --git a/distributions/nrdot-collector/THIRD_PARTY_NOTICES.md b/distributions/nrdot-collector/THIRD_PARTY_NOTICES.md index 1be33908..ca347df1 100644 --- a/distributions/nrdot-collector/THIRD_PARTY_NOTICES.md +++ b/distributions/nrdot-collector/THIRD_PARTY_NOTICES.md @@ -1,6 +1,6 @@ # Third Party Notices -The New Relic infrastructure agent uses source code from third party libraries which carry their own copyright notices +New Relic Distributions of OpenTelemetry use source code from third party libraries which carry their own copyright notices and license terms. These notices are provided below. In the event that a required notice is missing or incorrect, please notify us by e-mailing diff --git a/distributions/nrdot-collector/assert-invariants-agent-control.sh b/distributions/nrdot-collector/assert-invariants-agent-control.sh index a3cf7c79..2e04814e 100755 --- a/distributions/nrdot-collector/assert-invariants-agent-control.sh +++ b/distributions/nrdot-collector/assert-invariants-agent-control.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + set -e yq --version | grep -E -q '4\.[0-9]+\.[0-9]+' || { echo $? && echo "yq version 4.x.x is expected, but was '$(yq --version)'"; exit 1; } diff --git a/fips/fips.go b/fips/fips.go index f2bb5383..dea6c23a 100644 --- a/fips/fips.go +++ b/fips/fips.go @@ -1,3 +1,6 @@ +// Copyright New Relic, Inc. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + //go:build goexperiment.boringcrypto package main diff --git a/fips/validation/validate.sh b/fips/validation/validate.sh index 233201d2..0241477d 100755 --- a/fips/validation/validate.sh +++ b/fips/validation/validate.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + set -euo pipefail # Colors diff --git a/internal/assets/license/THIRD_PARTY_NOTICES.md.tmpl b/internal/assets/license/THIRD_PARTY_NOTICES.md.tmpl index 51e85968..c55170b3 100644 --- a/internal/assets/license/THIRD_PARTY_NOTICES.md.tmpl +++ b/internal/assets/license/THIRD_PARTY_NOTICES.md.tmpl @@ -12,7 +12,7 @@ Distributed under the following license(s): # Third Party Notices -The New Relic infrastructure agent uses source code from third party libraries which carry their own copyright notices +New Relic Distributions of OpenTelemetry use source code from third party libraries which carry their own copyright notices and license terms. These notices are provided below. In the event that a required notice is missing or incorrect, please notify us by e-mailing diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 281ca660..d3ebc85f 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -1,15 +1,17 @@ module github.com/newrelic/nrdot-collector-releases/internal/tools -go 1.23 +go 1.24.0 -require go.elastic.co/go-licence-detector v0.7.0 +toolchain go1.24.6 + +require ( + github.com/newrelic/nrdot-collector-components/cmd/nrlicense v0.142.1 + go.elastic.co/go-licence-detector v0.7.0 +) require ( github.com/cyphar/filepath-securejoin v0.4.0 // indirect - github.com/gobuffalo/here v0.6.7 // indirect github.com/google/licenseclassifier v0.0.0-20250108172508-0c3884c4cd43 // indirect - github.com/karrick/godirwalk v1.15.6 // indirect - github.com/markbates/pkger v0.17.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/sync v0.10.0 // indirect diff --git a/internal/tools/go.sum b/internal/tools/go.sum index d73a8d57..e37205c0 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -1,80 +1,39 @@ -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= -github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/cyphar/filepath-securejoin v0.4.0 h1:PioTG9TBRSApBpYGnDU8HC+miIsX8vitBH9LGNNMoLQ= github.com/cyphar/filepath-securejoin v0.4.0/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gobuffalo/here v0.6.0 h1:hYrd0a6gDmWxBM4TnrGw8mQg24iSVoIkHEk7FodQcBI= -github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= -github.com/gobuffalo/here v0.6.7 h1:hpfhh+kt2y9JLDfhYUxxCRxQol540jsVfKUZzjlbp8o= -github.com/gobuffalo/here v0.6.7/go.mod h1:vuCfanjqckTuRlqAitJz6QC4ABNnS27wLb816UhsPcc= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0 h1:OggOMmdI0JLwg1FkOKH9S7fVHF0oEm8PX6S8kAdpOps= -github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M= github.com/google/licenseclassifier v0.0.0-20250108172508-0c3884c4cd43 h1:KvqPipDBTmDrRe6gLp1+7YXKVIbd6z1Y3AI4hautrV0= github.com/google/licenseclassifier v0.0.0-20250108172508-0c3884c4cd43/go.mod h1:jkYIPv59uiw+1MxTWlqQEKebsUDV1DCXQtBBn5lVzf4= github.com/google/licenseclassifier/v2 v2.0.0-alpha.1/go.mod h1:YAgBGGTeNDMU+WfIgaFvjZe4rudym4f6nIn8ZH5X+VM= -github.com/karrick/godirwalk v1.15.6 h1:Yf2mmR8TJy+8Fa0SuQVto5SYap6IF7lNVX4Jdl8G1qA= -github.com/karrick/godirwalk v1.15.6/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/markbates/pkger v0.17.0 h1:RFfyBPufP2V6cddUyyEVSHBpaAnM1WzaMNyqomeT+iY= -github.com/markbates/pkger v0.17.0/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/newrelic/nrdot-collector-components/cmd/nrlicense v0.142.1 h1:zrBmD440d50i08rul3CjOtrPbNLY7Pc4TUzZlBnjXWk= +github.com/newrelic/nrdot-collector-components/cmd/nrlicense v0.142.1/go.mod h1:nytHD5jP79MOGsgH7myQtXWpM+tKTsR9KYOIheODlPk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -go.elastic.co/go-licence-detector v0.6.0 h1:QJ+cUIHC0JpxEKgp5Bj0pabEiOOt9H1O9CCcUNe6yRQ= -go.elastic.co/go-licence-detector v0.6.0/go.mod h1:fSJQU8au4SAgDK+UQFbgUPsXKYNBDv4E/dwWevrMpXU= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.elastic.co/go-licence-detector v0.7.0 h1:qC31sfyfNcNx/zMYcLABU0ac3MbGHZgksCAb5lMDUMg= go.elastic.co/go-licence-detector v0.7.0/go.mod h1:f5ty8pjynzQD8BcS+s0qtlOGKc35/HKQxCVi8SHhV5k= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/tools/tools.go b/internal/tools/tools.go index 93e0d633..0765a04f 100644 --- a/internal/tools/tools.go +++ b/internal/tools/tools.go @@ -1,4 +1,4 @@ -// Copyright New Relic Corporation. All rights reserved. +// Copyright New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 //go:build tools @@ -6,5 +6,6 @@ package tools // import "github.com/newrelic/opentelemetry-collector-components/internal/tools" import ( + _ "github.com/newrelic/nrdot-collector-components/cmd/nrlicense" _ "go.elastic.co/go-licence-detector" ) diff --git a/scripts/build.sh b/scripts/build.sh index 9bb329c0..f0077694 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 REPO_DIR="$( cd "$(dirname "$( dirname "${BASH_SOURCE[0]}" )")" &> /dev/null && pwd )" BUILDER='' diff --git a/scripts/bump-component-versions.sh b/scripts/bump-component-versions.sh index a94dfc75..158279b8 100755 --- a/scripts/bump-component-versions.sh +++ b/scripts/bump-component-versions.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + set -e GO='' diff --git a/scripts/bump-nrdot-version.sh b/scripts/bump-nrdot-version.sh index 06738c98..ad01f634 100755 --- a/scripts/bump-nrdot-version.sh +++ b/scripts/bump-nrdot-version.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + # Simple script to bump versions for new release to document all places that need to be updated set -e old_version=1.7.0 diff --git a/scripts/generate-goreleaser.sh b/scripts/generate-goreleaser.sh index d39a318d..237e3d99 100755 --- a/scripts/generate-goreleaser.sh +++ b/scripts/generate-goreleaser.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 GO='' diff --git a/scripts/get-core-component-version.sh b/scripts/get-core-component-version.sh index 63d1f11b..e09a3c9b 100755 --- a/scripts/get-core-component-version.sh +++ b/scripts/get-core-component-version.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 # This script validates that all manifest.yaml files in the distributions directory have the same version number. # If they do, it prints the version number to stdout and exits with status 0. diff --git a/scripts/get-otel-collector-chart-version.sh b/scripts/get-otel-collector-chart-version.sh index 95c84589..c2712a86 100755 --- a/scripts/get-otel-collector-chart-version.sh +++ b/scripts/get-otel-collector-chart-version.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + REPO_DIR="$( cd "$(dirname "$( dirname "${BASH_SOURCE[0]}" )")" &> /dev/null && pwd )" collector_component_version=$(${REPO_DIR}/scripts/get-core-component-version.sh) diff --git a/scripts/get-version.sh b/scripts/get-version.sh index 2db6568a..39196ab0 100755 --- a/scripts/get-version.sh +++ b/scripts/get-version.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 # This script validates that all manifest.yaml files in the distributions directory have the same version number. # If they do, it prints the version number to stdout and exits with status 0. diff --git a/scripts/licenses.sh b/scripts/licenses.sh index 8e2c1391..074f553b 100755 --- a/scripts/licenses.sh +++ b/scripts/licenses.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 REPO_DIR="$( cd "$(dirname "$( dirname "${BASH_SOURCE[0]}" )")" &> /dev/null && pwd )" diff --git a/scripts/validate-goreleaser-build.sh b/scripts/validate-goreleaser-build.sh index 1db7fc9e..f9cf5206 100755 --- a/scripts/validate-goreleaser-build.sh +++ b/scripts/validate-goreleaser-build.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + # Script to validate a goreleaser distribution's dist file set -e @@ -94,4 +97,4 @@ else fi done echo "✅ Archives and Packages validated!" -fi \ No newline at end of file +fi diff --git a/scripts/validate-source-files.sh b/scripts/validate-source-files.sh index c714fa3e..4151c56f 100755 --- a/scripts/validate-source-files.sh +++ b/scripts/validate-source-files.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright New Relic, Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + # Simple script to validate whether a distribution's OCB-generated source files exist. set -e @@ -51,4 +54,4 @@ if [ ${#missing_files[@]} -eq 0 ]; then else echo "❌ files not found: ${missing_files[*]}" exit 1 -fi \ No newline at end of file +fi