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

Use Reuse for the license #422

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

olamidepeterojo
Copy link

Fixes #383

# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is C/Javascript-style comments. In Python comments start with a #.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies, i will amend it.

/*
* SPDX-FileCopyrightText: 2024 Red Hat, Inc
*
* SPDX-License-Identifier: GPL-3.0-or-later
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The license is actually GPL-2.0-or-later.

Copy link
Author

@olamidepeterojo olamidepeterojo Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, although someone asked what version of GPL you preferred and you said GPL-3.0-or-later, that's why i made use of it .
so which do you prefer i make use of?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not change the license from what it was before, even though I would prefer GPL-3.0-or-later, the code is currently under GPL-2.0-or-later.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'll update it to GPL-2.0-or-later.

Copy link
Member

@abompard abompard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is lacking the Reuse check itself. You can for example use this block in .pre-commit-config.yml :

  - repo: https://github.com/fsfe/reuse-tool
    rev: v5.0.2
    hooks:
      - id: reuse

@@ -2,7 +2,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still changing the license. By the way, if you start using the SPDX-License-Identifier tag, you can drop this block of text.

@olamidepeterojo olamidepeterojo force-pushed the license branch 2 times, most recently from b5a591a to ec2069c Compare December 21, 2024 15:56
Copy link
Member

@abompard abompard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more comments, mostly related to using a REUSE.toml file.

@@ -1,19 +1,8 @@
# This file is part of fedora_messaging.
# Copyright (C) 2019 Red Hat, Inc.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can drop this line as well.

@@ -1 +1,4 @@
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not make sense for a test fixture, I would add the fixtures to a block in a REUSE.toml file, using a wildcard, such as:

# Test fixtures
[[annotations]]
path = ["tests/fixtures/*"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

This applies to all the files in this directory.

pyproject.toml Outdated
[tool.poetry]
name = "fedora_messaging"
version = "3.6.0"
description = "A set of tools for using Fedora's messaging infrastructure"
authors = [
"Fedora Infrastructure <[email protected]>"
]
license = "GPLv2+"
license = "GPLv3+"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the license.

pyproject.toml Outdated
@@ -1,11 +1,15 @@
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
#
# SPDX-License-Identifier: GPL-2.0-or-later
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not make much sense in the case of this file, because we're talking about project configuration here.
I would add these files to a block in a REUSE.toml file, such as:

# Project configuration
[[annotations]]
path = ["pyproject.toml", "poetry.lock", "codecov.yml", ".*.yml", ".*.yaml", "CODEOWNERS"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

@@ -1,20 +1,7 @@
# This file is part of fedora_messaging.
# Copyright (C) 2019 Red Hat, Inc.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be dropped as well.

Comment on lines 1 to 2
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the hash sign at the beginning of those lines to mark them as comments.

@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 Red Hat, Inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the files in configs can also be covered by a block in a REUSE.toml file, such as:

# configs
[[annotations]]
path = ["configs/*"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

.fmf/version Outdated
@@ -1 +1,4 @@
SPDX-FileCopyrightText: 2024 Red Hat, Inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FMF config files can be covered by a block in a REUSE.toml file, such as:

# FMF
[[annotations]]
path = [".fmf/version", "packit/installation/*.fmf"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

@olamidepeterojo
Copy link
Author

hello, i've made the changes as requested but when i run reuse lint it fails saying the following files listed below do not have license

  • configs\cacert.pem
  • configs\fedora-cert.pem
  • configs\fedora-key.pem
  • configs\fedora.stg-cert.pem
  • configs\fedora.stg-key.pem
  • configs\stg-cacert.pem
  • tests\fixtures\ca_bundle.pem
  • tests\fixtures\cert.pem
  • tests\fixtures\key.pem

@abompard
Copy link
Member

abompard commented Jan 8, 2025

Yes, you can use a REUSE.toml file to cover those files, as indicated in the comments. I don't see it, maybe you forgot to add it to the repo with git add?

@olamidepeterojo
Copy link
Author

I'm surprised as well. i thought i did cause usually i git add .

Copy link
Member

@abompard abompard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some duplication between inline changes and REUSE.toml, and a couple comments about usage of wildcards.

REUSE.toml Outdated
Comment on lines 4 to 65
[[annotations]]
path = ["tests/fixtures/bad_cb"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/ca_bundle.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/cert.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/good_msg_dump.txt"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/invalid_ca.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/invalid_key.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/invalid_msg_dump.txt"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/key.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/msg_without_topic_dump.txt"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/wrong_json_msg_dump.txt"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/ca_bundle.pem"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/cert.pem"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["tests/fixtures/key.pem"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could actually use a wildcard here: tests/fixtures/*. This will make the file much more readable.

CODEOWNERS Outdated
Comment on lines 1 to 4
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
#
# SPDX-License-Identifier: GPL-2.0-or-later

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You no longer need this since you have flagged this file in REUSE.toml.

@@ -1,339 +1,205 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can actually delete this file, it's replaced by the one in the LICENSES directory.

@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 Red Hat, Inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this file since you flagged poetry.lock in REUSE.toml.

REUSE.toml Outdated
Comment on lines 77 to 25
path = ["configs/cacert.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/fedora-cert.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/fedora-key.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/fedora.stg-cert.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/fedora.stg-key.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/stg-cacert.pem.license"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/cacert.pem"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/fedora-cert.pem"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/fedora-key.pem"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/fedora.stg-cert.pem"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/fedora.stg-key.pem"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["configs/stg-cacert.pem"]
SPDX-FileCopyrightText = "2024 Red Hat, Inc"
SPDX-License-Identifier = "GPL-2.0-or-later"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use a wildcard in the path here as well: configs/*

codecov.yml Outdated
Comment on lines 1 to 4
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
#
# SPDX-License-Identifier: GPL-2.0-or-later

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this since you flagged the file in REUSE.toml.

@@ -1,3 +1,6 @@
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you've added it to REUSE.toml, you can drop this change.

Comment on lines 1 to 4
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
#
# SPDX-License-Identifier: GPL-2.0-or-later

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The files in this directory have been added to REUSE.toml, no need for these changes anymore.

Copy link
Member

@abompard abompard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the files in configs/*.license and tests/fixtures/*.license now, since the corresponding files are now covered in REUSE.toml.

@@ -24,7 +28,7 @@ repos:
# Ruff
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: v0.8.6
rev: v0.8.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem necessary, maybe a rebase fallout.

news/383.docs.md Outdated
@@ -0,0 +1,7 @@
<!--
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is still current.

@@ -1 +1,2 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to add an empty line here.

Copy link
Member

@abompard abompard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also remove the news/*.license files as they are covered by REUSE.toml.

.packit.yaml Outdated
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is already covered by the .*.yaml glob in REUSE.toml.

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is already covered by the .*.yaml glob in REUSE.toml.

.readthedocs.yml Outdated
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is already covered by the .*.yml glob in REUSE.toml.

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is already covered by the configs/* glob in REUSE.toml.

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is already covered by the configs/* glob in REUSE.toml.

Comment on lines 1 to 2
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a prefix comment. Systemd unit files are INI files, and therefore can use ; or # as a comment prefix. I would go for # since that's what I see most of the files in /usr/lib/systemd/system using.

Suggested change
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later

Comment on lines 1 to 2
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a comment as well.

Suggested change
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
# SPDX-License-Identifier: GPL-2.0-or-later

Comment on lines 1 to 2
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines must be commented out.

Suggested change
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2024 Red Hat, Inc
# SPDX-License-Identifier: GPL-2.0-or-later

Comment on lines 1 to 6
SPDX-FileCopyrightText: 2024 Red Hat, Inc
SPDX-License-Identifier: GPL-2.0-or-later

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be commented out but it's a plain text file. Maybe rename this file to .md and add the tags in a comment, as for SECURITY.md.

Copy link
Member

@abompard abompard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!
Could you please squash your 3 commits into one? Then it'll be good to merge.

renovate bot and others added 2 commits February 21, 2025 22:24
…v0.8.6 (fedora-infra#428)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

Use Reuse for license

Signed-off-by: Olamide Ojo <[email protected]>
Signed-off-by: Olamide Ojo <[email protected]>
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

Successfully merging this pull request may close these issues.

Use Reuse for the license
2 participants