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

please correct your license to ne a vaild SPDX expression #33

Closed
HansHammel opened this issue Jan 9, 2017 · 21 comments
Closed

please correct your license to ne a vaild SPDX expression #33

HansHammel opened this issue Jan 9, 2017 · 21 comments

Comments

@HansHammel
Copy link

you are missing the brackets see https://github.com/david-a-wheeler/spdx-tutorial#spdx-tutorial for examples

@jrburke
Copy link
Owner

jrburke commented Jan 9, 2017

I do not use tooling with SPDX, so I am not sure what is correct here. @graingert since you touched this before, is adding () around the license string compatible with the tools you use?

@graingert
Copy link
Contributor

graingert commented Jan 9, 2017

Brackets are implicit in node license field. When you publish npm will tell you if it's not valid.

@HansHammel
Copy link
Author

@graingert
Copy link
Contributor

graingert commented Jan 9, 2017

If I set the license field to random nonsense I get:

npm WARN [email protected] license should be a valid SPDX license expression

with or without the brackets I don't get that message.

@HansHammel
Copy link
Author

HansHammel commented Jan 9, 2017

I dont use docker here, but I guess thats an escape problem of the docker scripts, try escaping the braces with a backslash or double them, maybe both and we will see. Or, maybe we should file an issue to docker. As there is no docker script in your repo and I dont know your tool-chain I can't tell...

@graingert
Copy link
Contributor

@HansHammel docker?

@c-okelly
Copy link

c-okelly commented Aug 10, 2017

Without the brackets your licence is recognised as a custom licence type instead of the combination of a BSD-3-Clause OR MIT licence. So while it is still the correct format in a sense its is correct but it's not setting the type you would think. I have made the proposed changes in my pull request #34

Doc link
SPDX: https://www.npmjs.com/package/spdx#disjunctive-or-operator
Yarn: https://yarnpkg.com/lang/en/docs/package-json/#toc-license
NPM: https://docs.npmjs.com/files/package.json#license

@graingert
Copy link
Contributor

> require('spdx').parse('LGPL-2.1 OR MIT')
{ conjunction: 'or',
  left: { license: 'LGPL-2.1' },
  right: { license: 'MIT' } }
> 

@graingert
Copy link
Contributor

Without the brackets your licence is recognised as a custom licence type

by what software?

@c-okelly
Copy link

c-okelly commented Aug 10, 2017

We use sonatype software to identify javascript licences and when it is not int the correct format it can't seem to figure out the license. Though I do see that it still works with the spdx library and for NPM.

https://www.sonatype.com/

@graingert
Copy link
Contributor

@c-okelly sounds like a sonatype bug.

@c-okelly
Copy link

Something it should handle for sure but the documentation does have the brackets.

@graingert
Copy link
Contributor

graingert commented Aug 10, 2017

@c-okelly the ABNF is pretty somewhat clear: https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60

@c-okelly
Copy link

"Composite License Expressions

More expressive composite license expressions can be constructed using "OR", "AND", and "WITH" operators similar to constructing mathematical expressions using arithmetic operators. For the Tag:value format, any license expression that consists of more than one license identifier and/or LicenseRef, should be encapsulated by parentheses: "( )". This has been specified to facilitate expression parsing. Nested parentheses can also be used to specify an order of precedence which is discussed in more detail in subsection (4)."

Tbh I'm not sure even after reading it but this is the most relevant section I could find? Though it only says should not must.

@graingert
Copy link
Contributor

@c-okelly that only applies to the 'Tag:value' format

@graingert
Copy link
Contributor

And 'Tag:value' format is specific to RDFa

@c-okelly
Copy link

@graingert Would it be possible to close the issue accordingly then?

Thanks,

C

@jrburke jrburke closed this as completed Aug 11, 2017
@graingert
Copy link
Contributor

graingert commented Aug 11, 2017

@c-okelly can you raise an issue with sonatype and link to it from here? So that people who find this issue via google can continue the discussion there rather than here.

@c-okelly
Copy link

@graingert I have raised the issue with them but they have no tracking facility.

@graingert
Copy link
Contributor

@c-okelly
Copy link

c-okelly commented Aug 11, 2017

@graingert Honestly man this is about as far as i'm interested. We are on a trail license with them for one of their products and they won't explain how their "algorithm" actually works. I've given all this information about this and other issues for licensing back to their customer support.The SPDX documentation is vague at best as highlighted in this issue. There is a good chance this is not the actual issue anyway but it was a place to start.

jslicense/spdx-expression-parse.js#20

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

No branches or pull requests

4 participants