-
Notifications
You must be signed in to change notification settings - Fork 47
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
RAT-469: Fixes to correctly detect additional valid licenses #413
RAT-469: Fixes to correctly detect additional valid licenses #413
Conversation
Thanks for raising this issue! Should we replace all comments in the AbstractRatMojo as WDYT? |
@Claudenw apart from the fact the IT needs to be adapted once the patch is applied I wonder why GPL is not yet recognized and logged explicitly. |
Gpl is not allowed at apache. So you have to add to the defaults
…On Wed 11 Dec 2024, 15:12 P. Ottlinger, ***@***.***> wrote:
@Claudenw <https://github.com/Claudenw> apart from the fact the IT needs
to be adapted once the patch is applied I wonder why GPL is not yet
recognized and logged explicitly.
—
Reply to this email directly, view it on GitHub
<#413 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASTVHTSDPYQ6L3UFPJJEC32FBI4BAVCNFSM6AAAAABTLVX2FKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZWGI3TCMJQGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Claudenw I added GPL as a valid license - I always thought this could be configured and I do not need to add a new defaults.xml file in my project. I used the proposed changes in https://github.com/ottlinger/mailclena/pull/573/files and applied it to an integration test within RAT. |
I think I mistyped. I said "So you have to add to the defaults" when what I meant was you need to add GPL-1, GPL-2, or GPL-3 as an approved license ID or add GPL as an approved license family. The licenses are defined but they are not listed approved. |
I think we need to step through each of them and make a decision. "" is not always wrong but there are better solutions for most entries. I think this falls under the documentation verification step that we should get to in mid Jan. |
…ror' into Changes_for_invalid_license_error
…id_license_error' into Changes_for_invalid_license_error
If I have a look at the log of the integration test I see:
could this be the cause for not recognizing GPL but labeling it UNKNOWN? |
First GPL should be recognized as a license FAMILY it is in the default.xml
This indicates that at least 2 configurations were read and that the LicenseFamilies were defined in both. I don't see how this happens but the warning is there so that if you accidentally overwrite an existing license you get warned. |
Just wanted to make sure that the IGNORE does not mean that any such license will be ignored. |
I merged in master and HeaderCheckWorkerTest is broken. @Claudenw Is it intended that the license family "unknown" is approved by default?
|
In this case "IGNORE" is the action taken. It is configurable in software
but not config.
…On Thu 12 Dec 2024, 14:30 P. Ottlinger, ***@***.***> wrote:
First GPL should be recognized as a license FAMILY it is in the
default.xml GPL1, GPL2, and GPL3 should be recognised as license IDs also
in the default.xml
[WARNING] Duplicate LicenseFamily category: W3C (action: IGNORE)
[WARNING] Duplicate LicenseFamily category: W3CD (action: IGNORE)
This indicates that at least 2 configurations were read and that the
LicenseFamilies were defined in both. I don't see how this happens but the
warning is there so that if you accidentally overwrite an existing license
you get warned.
Just wanted to make sure that the IGNORE does not mean that any such
license will be ignored.
—
Reply to this email directly, view it on GitHub
<#413 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASTVHRK6X52X3H7F6TT5YD2FGMZ3AVCNFSM6AAAAABTLVX2FKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZZGEYTKOJQHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Nope. Unknown lice se can not be approved unless specifically added by the
user. I will check on this this weekend
…On Thu 12 Dec 2024, 14:44 P. Ottlinger, ***@***.***> wrote:
I merged in master and HeaderCheckWorkerTest is broken.
@Claudenw <https://github.com/Claudenw> Is it intended that the license
family "unknown" is approved by default?
+++ b/apache-rat-core/src/test/java/org/apache/rat/analysis/HeaderCheckWorkerTest.java
@@ -43,8 +43,8 @@ public class HeaderCheckWorkerTest {
ILicense matcher = new TestingLicense("test", "test");
HeaderCheckWorker worker = new HeaderCheckWorker(new TestingMatcher(), new StringReader(""), Lists.list(matcher), subject);
worker.read();
- assertThat(subject.getMetaData().unapprovedLicenses().count()).isEqualTo(1);
- assertThat(subject.getMetaData().unapprovedLicenses().collect(Collectors.toList()).get(0).getLicenseFamily()).isEqualTo(ILicenseFamily.UNKNOWN);
+ assertThat(subject.getMetaData().approvedLicenses().count()).isEqualTo(1);
+ assertThat(subject.getMetaData().approvedLicenses().collect(Collectors.toList()).get(0).getLicenseFamily()).isEqualTo(ILicenseFamily.UNKNOWN);
}
—
Reply to this email directly, view it on GitHub
<#413 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASTVHQVV46VIDZC2AXX3Y32FGOK7AVCNFSM6AAAAABTLVX2FKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZZGE2DSNRRGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…s need to be put under the existing configuration instead a newly/non-existing config
I changed the default text in ef5c93b |
apache-rat-core/src/test/java/org/apache/rat/analysis/PolicyTest.java
Outdated
Show resolved
Hide resolved
apache-rat-core/src/test/java/org/apache/rat/license/LicenseSetFactoryTest.java
Outdated
Show resolved
Hide resolved
apache-rat-core/src/main/java/org/apache/rat/license/LicenseSetFactory.java
Outdated
Show resolved
Hide resolved
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.
Thanks for having another deeper look into the matter and for fixing the tests.
GPL content is still recognised as UNKNOWN even if configured as an approvedLicense. |
A regression was spotted when another valid license was configured ..... but not properly reported.
If you configure GPL to be a valid license the recognition failed to pass.