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

Change GPL-2 to GPL-2.0-only instead of GPL-2.0-or-later #60

Merged
merged 1 commit into from
May 7, 2023

Conversation

cbrueffer
Copy link
Contributor

R packages have the license key "GPL (>= 2)" for GPL-2.0-or-later (see https://r-pkgs.org/license.html#key-files). Nothing indicates that "GPL-2" should include later versions of the GPL.

R packages have the license key "GPL (>= 2)" for GPL-2.0-or-later
(see https://r-pkgs.org/license.html#key-files). Nothing indicates
that "GPL-2" should include later versions of the GPL.
@cbrueffer
Copy link
Contributor Author

Thanks @bgruening , could you merge as well?

@bgruening bgruening merged commit e1aaa46 into bgruening:main May 7, 2023
@bgruening
Copy link
Owner

Sure. Thanks @cbrueffer

@jdblischak
Copy link
Collaborator

The problem is that the string GPL-2 that the regex is matching comes from conda skeleton.

# Changing GPL-2 to GPL-2.0-only
line = re.sub('license: GPL-2$', 'license: GPL-2.0-only', line)

# Changing GPL-2 to GPL-2.0-only
meta_new <- str_replace(meta_new, "license: GPL-2$", "license: GPL-2.0-only")

Thus even R packages that specify GPL (>= 2), eg {nanotime}, are assigned GPL-2.0-only when they should be GPL-2.0-or-later. The only way to get it right for both license strings would be to parse the field License in DESCRIPTION, but that seems like way too much for this hacky script to handle robustly.

Ideally the CRAN skeleton would be updated to use the SPDX identifiers, but I don't have the bandwidth to implement this (nor the clout to get it merged). Issues about migrating to SPDX have been open for years (conda/conda-build#2015, conda/conda#5280).

Unfortunately grayskull doesn't get it right either

grayskull --version
## 2.5.3
grayskull cran r-nanotime
grep license r-nanotime/meta.yaml
##   license: NGPL

@cbrueffer cbrueffer deleted the spdx-gpl-2-fix branch June 7, 2024 06:59
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.

None yet

3 participants