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

Add ambiguation for some packages and additional licenses #9

Merged

Conversation

mahlzahn
Copy link

Based on PR #7 some more license variations and some packages with corrected license information

im397 and others added 5 commits October 3, 2023 19:47
* 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))
Copy link
Owner

@gardenappl gardenappl Oct 15, 2023

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.

Copy link
Owner

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?

Copy link
Author

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!

@gardenappl gardenappl merged commit 9b13102 into gardenappl:main Oct 22, 2023
@gardenappl
Copy link
Owner

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

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.

3 participants