Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(unify) Use SPDX for copyright and reuse. #146

Closed
schmidtw opened this issue Aug 14, 2023 · 1 comment
Closed

(unify) Use SPDX for copyright and reuse. #146

schmidtw opened this issue Aug 14, 2023 · 1 comment

Comments

@schmidtw
Copy link
Member

Copyright header update

Replace the full apache header at the top of each file with this:

// SPDX-FileCopyrightText: {{DATE}} Comcast Cable Communications Management, LLC
// SPDX-License-Identifier: Apache-2.0

Replacing {{DATE}} with the copyright date in the file.

For all go files that are not generated and are missing this header add it.

Reuse preparation

Install: reuse

Create a directory named .reuse.

Add the file .reuse/deb5 with contents based on this:

Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: {{REPO}}
Upstream-Contact: {{MAINTAINER}}
Source: https://github.com/xmidt-org/{{REPO}}

Files: .golangci.yml
Copyright: SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
License: Apache-2.0

Files: go.mod
Copyright: SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
License: Apache-2.0

Files: go.sum
Copyright: SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
License: Apache-2.0

Files: .gitignore
Copyright: SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
License: Apache-2.0

Files: MAINTAINERS.md
Copyright: SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
License: Apache-2.0

Files: README.md
Copyright: SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
License: Apache-2.0

Files: .whitesource
Copyright: SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
License: Apache-2.0

You may need to add/change files that cannot have copyright headers later.

Installing licenses

Run:

reuse download Apache-2.0

Checking the repo is compliant

Run:

reuse lint

you should see something similar to this:

# SUMMARY

* Bad licenses:
* Deprecated licenses:
* Licenses without file extension:
* Missing licenses:
* Unused licenses:
* Used licenses: Apache-2.0
* Read errors: 0
* Files with copyright information: 14 / 14
* Files with license information: 14 / 14

Congratulations! Your project is compliant with version 3.0 of the REUSE Specification :-)

If not, fix the issues.

Enable copyright checking in the action

In .github.workflows/ci.yml remove the line copyright-skip: true.

@schmidtw
Copy link
Member Author

Completed by #214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant