Skip to content

Commit

Permalink
Make FeDHCP reuse-compliant (#81)
Browse files Browse the repository at this point in the history
* Make FeDHCP reuse-compliant

* Add `reuse` workflow`

* Fix typo in bulk license path
  • Loading branch information
damyan authored Feb 19, 2024
1 parent a91c7f8 commit 782a90d
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 31 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: REUSE Compliance Check

on: pull_request

jobs:
test:
name: reuse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
30 changes: 30 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: FeDHCP
Upstream-Contact: IronCore authors <[email protected]>
Source: https://github.com/ironcore-dev/FeDHCP

# --------------------------------------------------
# source code

Files:
.github/*
.gitignore
.golangci.yaml
Dockerfile
Makefile
config/*
config.yml
go.mod
go.sum
hack/*
Copyright: 2024 SAP SE or an SAP affiliate company and IronCore contributors
License: MIT

# --------------------------------------------------
# documentation

Files:
docs/*
README.md
Copyright: 2024 SAP SE or an SAP affiliate company and IronCore contributors
License: MIT
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2022 coredhcp, SAP SE
Copyright (c) 2018-2024 coredhcp, SAP SE

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
9 changes: 9 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ help: ## Display this help.

.PHONY: addlicense
addlicense: ## Add license headers to all go files.
find . -name '*.go' -exec go run github.com/google/addlicense -c 'OnMetal authors' {} +
find . -name '*.go' -exec go run github.com/google/addlicense -f hack/license-header.txt {} +

.PHONY: checklicense
checklicense: ## Check that every file has a license header present.
Expand Down
2 changes: 2 additions & 0 deletions hack/license-header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
SPDX-License-Identifier: MIT
15 changes: 2 additions & 13 deletions hack/tools.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright 2022 OnMetal 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-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
// SPDX-License-Identifier: MIT

//go:build tools

Expand Down
9 changes: 3 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright 2018-present the CoreDHCP Authors. All rights reserved
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
// SPDX-License-Identifier: MIT

// This is a generated file, edits should be made in the corresponding source file
// And this file regenerated using `coredhcp-generator --from core-plugins.txt`
package main

import (
Expand All @@ -21,9 +18,9 @@ import (
pl_mtu "github.com/coredhcp/coredhcp/plugins/mtu"
pl_searchdomains "github.com/coredhcp/coredhcp/plugins/searchdomains"
pl_serverid "github.com/coredhcp/coredhcp/plugins/serverid"
pl_bluefield "github.com/onmetal/fedhcp/plugins/bluefield"
pl_ipam "github.com/onmetal/fedhcp/plugins/ipam"
pl_onmetal "github.com/onmetal/fedhcp/plugins/onmetal"
pl_bluefield "github.com/onmetal/fedhcp/plugins/bluefield"
pl_pxeboot "github.com/onmetal/fedhcp/plugins/pxeboot"

"github.com/sirupsen/logrus"
Expand Down
3 changes: 3 additions & 0 deletions plugins/bluefield/plugin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
// SPDX-License-Identifier: MIT

package bluefield

import (
Expand Down
3 changes: 3 additions & 0 deletions plugins/ipam/k8s.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
// SPDX-License-Identifier: MIT

package ipam

import (
Expand Down
5 changes: 2 additions & 3 deletions plugins/ipam/plugin.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-present the CoreDHCP Authors. All rights reserved
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
// SPDX-License-Identifier: MIT

package ipam

Expand Down
5 changes: 2 additions & 3 deletions plugins/onmetal/plugin.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-present the CoreDHCP Authors. All rights reserved
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
// SPDX-License-Identifier: MIT

package onmetal

Expand Down
5 changes: 2 additions & 3 deletions plugins/pxeboot/pxeboot.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018-present the CoreDHCP Authors. All rights reserved
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors
// SPDX-License-Identifier: MIT

// Package nbp implements handling of an NBP (Network Boot Program) using an
// URL, e.g. http://[fe80::abcd:efff:fe12:3456]/my-nbp or tftp://10.0.0.1/my-nbp .
Expand Down

0 comments on commit 782a90d

Please sign in to comment.