From 95fb3b205828354a9351f83442d7913ba775ad3c Mon Sep 17 00:00:00 2001 From: Emanuele Gallone Date: Tue, 8 Mar 2022 14:40:19 +0100 Subject: [PATCH] Fix reuse. Introduce dep5 file and uniform copyright headers --- .github/workflows/golangci-lint.yml | 3 ++- .github/workflows/main.yml | 2 +- .github/workflows/reuse.yml | 2 +- .github/workflows/run-unit-test.yml | 3 +++ .golangci.yml | 2 +- .reuse/dep5 | 12 +++++++++++ LICENSE => LICENSES/Apache-2.0.txt | 28 ++----------------------- Makefile | 2 +- api/pfcpsim.pb.go | 2 +- api/pfcpsim.proto | 2 +- cmd/pfcpctl/main.go | 2 +- cmd/pfcpsim/main.go | 6 ++---- internal/pfcpsim/helpers.go | 6 ++---- internal/pfcpsim/server.go | 6 ++---- internal/pfcpsim/state.go | 6 ++---- pkg/pfcpsim/errors.go | 3 +++ pkg/pfcpsim/pfcpsim.go | 2 +- pkg/pfcpsim/session.go | 3 +++ pkg/pfcpsim/session/far_builder.go | 3 +++ pkg/pfcpsim/session/far_builder_test.go | 3 +++ pkg/pfcpsim/session/ies.go | 2 +- pkg/pfcpsim/session/pdr_builder.go | 3 +++ pkg/pfcpsim/session/pdr_builder_test.go | 6 ++---- pkg/pfcpsim/session/qer_builder.go | 3 +++ pkg/pfcpsim/session/qer_builder_test.go | 6 ++---- 25 files changed, 58 insertions(+), 60 deletions(-) create mode 100644 .reuse/dep5 rename LICENSE => LICENSES/Apache-2.0.txt (89%) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 6adeea6..05a4f11 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Open Networking Foundation +# Copyright 2022-present Open Networking Foundation + name: golangci-lint on: [push, pull_request] jobs: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 32ef65a..2dc8b6a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Open Networking Foundation +# Copyright 2022-present Open Networking Foundation name: Publish pfcpsim on: [pull_request, push] diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 8de8d61..55d8d74 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -1,5 +1,5 @@ -# Copyright 2022-present Open Networking Foundation # SPDX-License-Identifier: Apache-2.0 +# Copyright 2022-present Open Networking Foundation name: REUSE diff --git a/.github/workflows/run-unit-test.yml b/.github/workflows/run-unit-test.yml index 7570e40..460f28e 100644 --- a/.github/workflows/run-unit-test.yml +++ b/.github/workflows/run-unit-test.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022-present Open Networking Foundation + name: Unit tests on: [push, pull_request] diff --git a/.golangci.yml b/.golangci.yml index 2ccac13..f632cd1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Open Networking Foundation +# Copyright 2022-present Open Networking Foundation # golangci-lint configuration used for CI run: diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 0000000..cb7ca2e --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,12 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: pfcpsim +Upstream-Contact: OMEC Developers +Source: https://github.com/omec-project/pfcpsim + +Files: api/**/*.pb.go +Copyright: 2022-present Open Networking Foundation +License: Apache-2.0 + +Files: VERSION README.md go.mod go.sum docs/images/schema.svg +Copyright: 2022-present Open Networking Foundation +License: Apache-2.0 diff --git a/LICENSE b/LICENSES/Apache-2.0.txt similarity index 89% rename from LICENSE rename to LICENSES/Apache-2.0.txt index 261eeb9..4947287 100644 --- a/LICENSE +++ b/LICENSES/Apache-2.0.txt @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -173,29 +174,4 @@ incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/Makefile b/Makefile index f036265..8b88df1 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ test: .coverage go test -race -coverprofile=.coverage/coverage-unit.txt -covermode=atomic -v ./... reuse-lint: - docker run --rm -v ${CURRENT_DIR}:/up4 -w /up4 omecproject/reuse-verify:latest reuse lint + docker run --rm -v $(CURDIR):/pfcpsim -w /pfcpsim omecproject/reuse-verify:latest reuse lint build-proto: @echo "Compiling proto files..." diff --git a/api/pfcpsim.pb.go b/api/pfcpsim.pb.go index 1ce2ede..3232810 100644 --- a/api/pfcpsim.pb.go +++ b/api/pfcpsim.pb.go @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -//Copyright 2022-present Open Networking Foundation +// Copyright 2022-present Open Networking Foundation // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/api/pfcpsim.proto b/api/pfcpsim.proto index 5189318..29317fb 100644 --- a/api/pfcpsim.proto +++ b/api/pfcpsim.proto @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -//Copyright 2022-present Open Networking Foundation +// Copyright 2022-present Open Networking Foundation syntax = "proto3"; package api; diff --git a/cmd/pfcpctl/main.go b/cmd/pfcpctl/main.go index c87d6d5..071568e 100644 --- a/cmd/pfcpctl/main.go +++ b/cmd/pfcpctl/main.go @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -// Copyright 2022 Open Networking Foundation +// Copyright 2022-present Open Networking Foundation package main diff --git a/cmd/pfcpsim/main.go b/cmd/pfcpsim/main.go index 603dc55..546aaa0 100644 --- a/cmd/pfcpsim/main.go +++ b/cmd/pfcpsim/main.go @@ -1,7 +1,5 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright 2022 Open Networking Foundation - */ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation package main diff --git a/internal/pfcpsim/helpers.go b/internal/pfcpsim/helpers.go index 7526c11..3ca108e 100644 --- a/internal/pfcpsim/helpers.go +++ b/internal/pfcpsim/helpers.go @@ -1,7 +1,5 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright 2022 Open Networking Foundation - */ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation package pfcpsim diff --git a/internal/pfcpsim/server.go b/internal/pfcpsim/server.go index bc3fdbc..e84fb8b 100644 --- a/internal/pfcpsim/server.go +++ b/internal/pfcpsim/server.go @@ -1,7 +1,5 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright 2022 Open Networking Foundation - */ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation package pfcpsim diff --git a/internal/pfcpsim/state.go b/internal/pfcpsim/state.go index 271cf90..7493829 100644 --- a/internal/pfcpsim/state.go +++ b/internal/pfcpsim/state.go @@ -1,7 +1,5 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright 2022 Open Networking Foundation - */ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation package pfcpsim diff --git a/pkg/pfcpsim/errors.go b/pkg/pfcpsim/errors.go index 5f351ed..a5af560 100644 --- a/pkg/pfcpsim/errors.go +++ b/pkg/pfcpsim/errors.go @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation + package pfcpsim import ( diff --git a/pkg/pfcpsim/pfcpsim.go b/pkg/pfcpsim/pfcpsim.go index 3db4292..66cc786 100644 --- a/pkg/pfcpsim/pfcpsim.go +++ b/pkg/pfcpsim/pfcpsim.go @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -// Copyright 2022 Open Networking Foundation +// Copyright 2022-present Open Networking Foundation package pfcpsim diff --git a/pkg/pfcpsim/session.go b/pkg/pfcpsim/session.go index 808d5b7..8b334d7 100644 --- a/pkg/pfcpsim/session.go +++ b/pkg/pfcpsim/session.go @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation + package pfcpsim type PFCPSession struct { diff --git a/pkg/pfcpsim/session/far_builder.go b/pkg/pfcpsim/session/far_builder.go index c3e8030..32fa580 100644 --- a/pkg/pfcpsim/session/far_builder.go +++ b/pkg/pfcpsim/session/far_builder.go @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation + package session import ( diff --git a/pkg/pfcpsim/session/far_builder_test.go b/pkg/pfcpsim/session/far_builder_test.go index b45da5a..9f3a5e5 100644 --- a/pkg/pfcpsim/session/far_builder_test.go +++ b/pkg/pfcpsim/session/far_builder_test.go @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation + package session import ( diff --git a/pkg/pfcpsim/session/ies.go b/pkg/pfcpsim/session/ies.go index ec1351d..d2f2c32 100644 --- a/pkg/pfcpsim/session/ies.go +++ b/pkg/pfcpsim/session/ies.go @@ -1,5 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 -// Copyright 2022 Open Networking Foundation +// Copyright 2022-present Open Networking Foundation package session diff --git a/pkg/pfcpsim/session/pdr_builder.go b/pkg/pfcpsim/session/pdr_builder.go index 1b62300..457b443 100644 --- a/pkg/pfcpsim/session/pdr_builder.go +++ b/pkg/pfcpsim/session/pdr_builder.go @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation + package session import ( diff --git a/pkg/pfcpsim/session/pdr_builder_test.go b/pkg/pfcpsim/session/pdr_builder_test.go index 6d14db8..22a62fd 100644 --- a/pkg/pfcpsim/session/pdr_builder_test.go +++ b/pkg/pfcpsim/session/pdr_builder_test.go @@ -1,7 +1,5 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright 2022 Open Networking Foundation - */ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation package session diff --git a/pkg/pfcpsim/session/qer_builder.go b/pkg/pfcpsim/session/qer_builder.go index 27debe9..a107e08 100644 --- a/pkg/pfcpsim/session/qer_builder.go +++ b/pkg/pfcpsim/session/qer_builder.go @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation + package session import "github.com/wmnsk/go-pfcp/ie" diff --git a/pkg/pfcpsim/session/qer_builder_test.go b/pkg/pfcpsim/session/qer_builder_test.go index 75dd0a5..fa4f521 100644 --- a/pkg/pfcpsim/session/qer_builder_test.go +++ b/pkg/pfcpsim/session/qer_builder_test.go @@ -1,7 +1,5 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * Copyright 2022 Open Networking Foundation - */ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022-present Open Networking Foundation package session