Skip to content

Commit

Permalink
license: removes copyright year and uses SPDX ID (#224)
Browse files Browse the repository at this point in the history
As a small project, we have to conserve resources and not sign up for
work that isn't required. I've recently realized many commerical and/or
CNCF projects both use SPDX IDs and also don't bother with copyright
year. If their legal team is ok with this, surely a volunteer team
without access to one, should be, too! Doing so accomplishes the
following:

* significantly increases readability of files, particularly small ones
* removes beginning of year maintenance, which cause a lot of FUD last
year. IIRC some deployment failed and hours were spent in spite of docs.
* eliminates the need to do a full source check out, just to satisfy the
license plugin. This means we can use actions/checkout defaults.

Same as openzipkin/zipkin-reporter-java#257

---------

Signed-off-by: Adrian Cole <adrian@tetrate.io>
  • Loading branch information
codefromthecrypt authored Apr 14, 2024
1 parent 80de04c commit 62c0a38
Show file tree
Hide file tree
Showing 70 changed files with 130 additions and 728 deletions.
13 changes: 2 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
#
# Copyright 2016-2018 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

root = true
Expand Down
15 changes: 3 additions & 12 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,8 @@ If you are adding a new file it should have a header like below. This
can be automatically added by running `./mvnw com.mycila:license-maven-plugin:format`.

```
/**
* Copyright 2019 The OpenZipkin 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 OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
```
1 change: 0 additions & 1 deletion .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
# Prevent use of implicit GitHub Actions read-only token GITHUB_TOKEN. We don't deploy on
# the tag MAJOR.MINOR.PATCH event, but we still need to deploy the maven-release-plugin master commit.
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 1 # only need the HEAD commit as license check isn't run
- name: Setup java
uses: actions/setup-java@v4
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
# Prevent use of implicit GitHub Actions read-only token GITHUB_TOKEN.
# We push Javadocs to the gh-pages branch on commit.
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 0 # allow build-bin/idl_to_gh_pages to get the full history
- name: Setup java
uses: actions/setup-java@v4
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/docker_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # only needed to get the sha label
# Don't attempt to cache Docker. Sensitive information can be stolen
# via forks, and login session ends up in ~/.docker. This is ok because
# we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner.
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # full git history for license check
- name: Cache local Maven repository
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -58,8 +56,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # -Dlicense.skip=true, so we don't need a full clone
- name: Cache local Maven repository
uses: actions/cache@v3
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yamllint --format github .github/workflows/readme_test.yml
# yamllint --format github .github/workflows/test_readme.yml
---
name: readme_test
name: test_readme

# These test build commands mentioned in various README.md files.
#
Expand All @@ -13,13 +13,11 @@ on:
paths-ignore: '**/*.md'

jobs:
readme_test:
zipkin-dependencies:
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup java
uses: actions/setup-java@v4
with:
Expand Down
13 changes: 2 additions & 11 deletions .settings.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2020 The OpenZipkin 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 OpenZipkin Authors
SPDX-License-Identifier: Apache-2.0
-->
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down
17 changes: 0 additions & 17 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,6 @@ Here's an example of a snapshot deploy with specified credentials.
$ export GPG_TTY=$(tty) && GPG_PASSPHRASE=whackamole SONATYPE_USER=adrianmole SONATYPE_PASSWORD=ed6f20bde9123bbb2312b221 build-bin/build-bin/maven/maven_deploy
```

## First release of the year

The license plugin verifies license headers of files include a copyright notice indicating the years a file was affected.
This information is taken from git history. There's a once-a-year problem with files that include version numbers (pom.xml).
When a release tag is made, it increments version numbers, then commits them to git. On the first release of the year,
further commands will fail due to the version increments invalidating the copyright statement. The way to sort this out is
the following:

Before you do the first release of the year, move the SNAPSHOT version back and forth from whatever the current is.
In-between, re-apply the licenses.
```bash
$ ./mvnw versions:set -DnewVersion=1.3.3-SNAPSHOT -DgenerateBackupPoms=false
$ ./mvnw com.mycila:license-maven-plugin:format
$ ./mvnw versions:set -DnewVersion=1.3.2-SNAPSHOT -DgenerateBackupPoms=false
$ git commit -am"Adjusts copyright headers for this year"
```

## Manually releasing

If for some reason, you lost access to CI or otherwise cannot get automation to work, bear in mind
Expand Down
4 changes: 0 additions & 4 deletions build-bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # full git history for license check
- name: Test
run: |
build-bin/configure_test
Expand Down Expand Up @@ -117,8 +115,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # only needed to get the sha label
- name: Configure Deploy
run: build-bin/configure_deploy
env:
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/configure_docker
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# Defends against build outages caused by Docker Hub (docker.io) pull rate limits.
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/configure_docker_push
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# Ensures Docker is logged in and it can build multi-architecture.
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_arch
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This script gets a normalized name for the architecture as used in Docker. This will be a subset
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_args
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2024 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This builds common docker arguments used by docker_build and docker_push.
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_build
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/docker/docker_push
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2023 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This script pushes images to GitHub Container Registry (ghcr.io).
Expand Down
13 changes: 2 additions & 11 deletions build-bin/git/login_git
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/git/version_from_trigger_tag
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This script echos a `MAJOR.MINOR.PATCH` version tag based on..
Expand Down
13 changes: 2 additions & 11 deletions build-bin/gpg/configure_gpg
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2020 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This script prepares GPG, needed to sign jars for Sonatype deployment during `maven_deploy`
Expand Down
13 changes: 2 additions & 11 deletions build-bin/maven/maven_build
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2024 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/maven/maven_build_or_unjar
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2024 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
13 changes: 2 additions & 11 deletions build-bin/maven/maven_deploy
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/sh
#
# Copyright 2016-2024 The OpenZipkin 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 OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

set -ue
Expand Down
Loading

0 comments on commit 62c0a38

Please sign in to comment.