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

LicenseCompareHelper: Apache-1.0 & 1.1 license texts published by Apache not recognised #184

Closed
pmonks opened this issue Jun 29, 2023 · 6 comments

Comments

@pmonks
Copy link
Collaborator

pmonks commented Jun 29, 2023

The license text for Apache-1.1 published by Apache is not being recognised by org.spdx.utility.compare.LicenseCompareHelper.isStandardLicenseWithinText().

Note: tested with Spdx-Java-Library v1.1.7.

@pmonks
Copy link
Collaborator Author

pmonks commented Jun 29, 2023

Note sure if this is useful (given the extraneous prefix and suffix text in the source text), but the "difference message" in the DifferenceDescription object returned from org.spdx.utility.compare.LicenseCompareHelper.isTextStandardLicense() says:

Variable text rule combined-bullet-Clause5 did not match the compare text starting at line spdx/Spdx-Java-Library#38 column spdx/Spdx-Java-Library#1 "5" while processing rule var: combined-bullet-Clause5.  Last optional text was not found due to the optional difference:
	Normal text of license does not match starting at line spdx/Spdx-Java-Library#1 column spdx/Spdx-Java-Library#4 "an" when comparing to template text "Apache License 1.1

"

@pmonks
Copy link
Collaborator Author

pmonks commented Jul 10, 2023

I'm seeing the same behaviour with the Apache-1.0 text published by Apache too.

@pmonks pmonks changed the title LicenseCompareHelper: Apache-1.1 license text published by Apache not recognised LicenseCompareHelper: Apache-1.0 & 1.1 license texts published by Apache not recognised Jul 10, 2023
@sdheh
Copy link

sdheh commented Nov 27, 2023

This could be the same problem of dealing with multiple spaces when matching with a var rule as in spdx/license-list-XML#2264 and spdx/license-list-XML#2266. There are multiple spaces in point 5 and it has a var rule.

@sdheh
Copy link

sdheh commented Nov 27, 2023

I verified that replacing all new lines and multiple spaces by single spaces results in the Apache-1.1 text to be correctly identified but not the Apache-1.0 text.
The Apache 1.0 text differs in bullet 5:
"appear in their names, without prior" instead of "appear in their name, without prior" so this is a bug in the template.

@goneall
Copy link
Member

goneall commented Dec 13, 2023

This should now be fixed with PR #221

@goneall goneall closed this as completed Dec 13, 2023
@pmonks
Copy link
Collaborator Author

pmonks commented Dec 18, 2023

This should now be fixed with PR #221

Minor clarification: this is still failing, but that's due to spdx/license-list-XML#2259 and spdx/license-list-XML#2270 (i.e. PR #221 has fixed any Spdx-Java-Library specific problems involved in this behaviour).

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

3 participants