fortran-lang / registry

Registry for Fortran package manager
MIT License
8 stars 3 forks source link

`BSD-3` license not recognized #30

Closed perazz closed 1 year ago

perazz commented 1 year ago

Low priority issue.

I'm playing with the fpm publish command a bit and I've found that fitpack cannot be uploaded:

federico@Federicos-MBP fitpack % fpmx publish --token=XXXXXX
 Uploading package ...
{"code":400,"message":"Invalid license identifier"}

The license in fpm.toml is BSD-3. Any hints @arteevraina @henilp105 ?

minhqdao commented 1 year ago

The license has to be specified in the SPDX format. Try BSD-3-Clause. That should work.

perazz commented 1 year ago

I see. I think fpm should definitely prompt it to the user then, I believe that was part of the package validation effort, what is its status?

minhqdao commented 1 year ago

No, that should come from the backend. The reason is that we're using a Python package for that on the backend. If the license is not recognized, an error should be returned with an error message that is as accurate as possible, e.g. "License identifier 'BSD-3' is not part of he SPDX License List.". That will then be displayed to the user.

Could we get something like that? @arteevraina @henilp105

henilp105 commented 1 year ago

Thanks @perazz @minhqdao , I have patched this here: https://github.com/henilp105/registry/commit/3e998c214d8c9333eb4f28b5023eacb34265f9b5 , this will notify the user for the spdx license requirement.

arteevraina commented 1 year ago

I see. I think fpm should definitely prompt it to the user then, I believe that was part of the package validation effort, what is its status?

I think the fact that registry is allowing to upload packages with only spdx-license identifiers is itself one of steps of package validation.

Regarding this requirement it has been quickly solved by @henilp105. Should be there in subsequent backend releases. https://github.com/fortran-lang/registry/pull/28/commits/3e998c214d8c9333eb4f28b5023eacb34265f9b5#diff-057993efe883364e92663f0d8fa5d1bcfcaee943d6dce70eb2b64ef1ecb5a2e6R152

perazz commented 1 year ago

Fantastic @henilp105, thank you! Looks good to me.