-
Notifications
You must be signed in to change notification settings - Fork 92
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
Validate license values #296
Open
shr-project
wants to merge
6
commits into
ros-infrastructure:master
Choose a base branch
from
shr-project:jansa/license
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
89ed4b4
validate: extend the license validation
shr-project b0f58cf
package_templates.py: Use more specific TODO license TODO-CATKIN-PACK…
shr-project ab319ed
test_templates.py: use unambiguous BSD-3-Clause license instead of ju…
shr-project 80984fe
validate: map_license_to_spdx: define the mapping based on rosdistro …
shr-project 5f61240
validate: map_license_to_common: remove apostrophe from uwsim_bullet'…
shr-project 21a07b3
validate: validate_licenses_multiple_values: show different warning
shr-project File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>valid_metapackage</description> | ||
|
||
<maintainer email="[email protected]">user</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<run_depend>foo</run_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>invalid_cmake</description> | ||
|
||
<maintainer email="[email protected]">user</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<run_depend>foo</run_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>invalid_depends</description> | ||
|
||
<maintainer email="[email protected]">user</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<run_depend>foo</run_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>leftover_files</description> | ||
|
||
<maintainer email="[email protected]">user</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<run_depend>foo</run_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>no_buildtool_depend_catkin</description> | ||
|
||
<maintainer email="[email protected]">user</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
|
||
<run_depend>foo</run_depend> | ||
<run_depend>bar</run_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>no_cmake</description> | ||
|
||
<maintainer email="[email protected]">user</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<run_depend>foo</run_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>no_metapackage_tag</description> | ||
|
||
<maintainer email="[email protected]">user</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<run_depend>foo</run_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>valid_metapackage</description> | ||
|
||
<maintainer email="[email protected]">user</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<run_depend>foo</run_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>valid_metapackage</description> | ||
|
||
<maintainer email="[email protected]">user</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<exec_depend>foo</exec_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<description>valid_package description</description> | ||
|
||
<maintainer email="[email protected]">üser</maintainer> | ||
<license>BSD</license> | ||
<license>BSD-3-Clause</license> | ||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<run_depend>foo</run_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
I don't have an answer, but I'm afraid embedding a (huge) list of license names can be a maintenance burden (I saw you described how you made it, but still would require manual invocation in the future when updating the list is needed. Also as a disclaimer, I'm not a maintainer on this repo). Wish there's a standalone tool that provides such a list.
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.
Well, my hope is that this list is only temporary and component owners will start using valid identifiers in package.xml and eventually only the validation function will stay and all the replacements won't be needed. So the only maintenance should be to drop it in some far future.
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.
Also the list isn't complete (and cannot be), because on of the most common issues is using license like LGPL without a version, but here without checking the actual component source we cannot replace it with anything more accurate, all we can do is to show and warning and hope that the owner will improve the package.xml.
I still plan to extend the list to cover most common cases of listing multiple licenses in one tag instead of using multiple of them - just using & as separator - together with slightly different warning message suggesting to split them into multiple tags.
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.
that would be great, but I would say this is not something we can expect (ie, the: "component owners will start using valid identifiers in package.xml and eventually only the validation function will stay and all the replacements won't be needed" part).
As of today, there are 5946 packages in the
ros/rosdistro
db alone, with many more not registered anywhere (ie: hosted somewhere publicly but not part of a distribution). Many of those packages are old and will not be updated, but even the more recent ones will have a significant nr which will not be updated.If you add this list, I expect it to be necessary for at least until Noetic EOLs, and probably also for a few ROS 2 versions (if you intend to add this functionality to a ROS 2 tool as well). We're talking 5+ years here.
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.
Yes, that's the far future for removal, but in the meantime we shouldn't need to update the list.
The replacements are just to have some immediate improvements where possible, while showing the corresponding SPDX in warning message. And not to regress from what superflore currently does with regexp replacements.
It's not meant to be perfect and it cannot be without parsing the actual source files with something like scancode-toolkit, because in some cases the valid identifier in package.xml doesn't match with the actual license and catkin_pkg nor superflore could detect that (even to show another warning).