-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add ambiguation for some packages and additional licenses #9
Add ambiguation for some packages and additional licenses #9
Conversation
* license cleaning: add removal of `/():` * fix some license duplicates * license cleaning: convert licence to license * split licenses by ` OR ` * fix package counter * add many licenses or license versions * print usage hint to stderr These changes reduce the number of “non-free” packages from 202 to 162 in synced repositories of Manjaro Linux (estimated with `vrms -g`)
licenses = [] | ||
for l in pkg.licenses: | ||
licenses.extend(l.split(' OR ')) | ||
self.packages.append(Package(pkg.name, licenses)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think OR
should be a special case, we should check if at least one of the OR
terms is free, and if so, discard the commercial alternatives. At least that's how I'd interpret that legally, I am not a lawyer though.
Funny enough, earlier I was thinking of some over-engineered solution of creating some parser for AND and OR alternative licenses, and resolving them to see if the product can be used with a free license. But honestly just splitting the string on OR
probably works just as well, no need for a parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, doesn't this conflict with things like GPL2-or-later
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, doesn't this conflict with things like
GPL2-or-later
?
Could indeed be if someone declared it as e.g. custom:GPL2 OR later
, because it is before the cleaning. I agree it’s not the cleanest hack, but for the given packages (five in Manjaro) it works.
cloud-init: ['GPL-3.0-only OR Apache-2.0']
maturin: ['Apache-2.0 OR MIT']
openpgp-card-tools: ['Apache-2.0 OR MIT']
python-maturin: ['Apache-2.0 OR MIT']
snd: ['BSD-2-Clause', 'GPL-2.0-or-later OR GL2PS', 'LLGPL', 'TCL']
But I agree that proper treatment would be of course better. This would also include the proper treatment of exceptions and their splitting word WITH
.
If you prefer I can also remove this addition for now. And in future we can think about how to implement this properly. Let me know!
I hesitated a bit to merge all these, since #8 is still open, and we'd have to reorganize them anyway. But at least I did glance at the licenses and they seem legit to me, so let's just merge them in the meantime |
Based on PR #7 some more license variations and some packages with corrected license information