-
Notifications
You must be signed in to change notification settings - Fork 33
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
Improve license parsing #279
Improve license parsing #279
Conversation
e9dcc46
to
61919e1
Compare
579ccb5
to
7db3324
Compare
7db3324
to
117ddb1
Compare
Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution noetic. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro noetic --output-repository-path . --upstream-branch HEAD
…5146 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution melodic. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro melodic --output-repository-path . --upstream-branch HEAD
…3600 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution dashing. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro dashing --output-repository-path . --upstream-branch HEAD
…171906 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution eloquent. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro eloquent --output-repository-path . --upstream-branch HEAD
Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution foxy. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro foxy --output-repository-path . --upstream-branch HEAD
…5327 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution rolling. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro rolling --output-repository-path . --upstream-branch HEAD
f7a38ba
to
1a60953
Compare
1a60953
to
e359385
Compare
…5146 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution melodic. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro melodic --output-repository-path . --upstream-branch HEAD
…3600 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution dashing. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro dashing --output-repository-path . --upstream-branch HEAD
…171906 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution eloquent. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro eloquent --output-repository-path . --upstream-branch HEAD
Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution foxy. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro foxy --output-repository-path . --upstream-branch HEAD
…5327 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution rolling. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro rolling --output-repository-path . --upstream-branch HEAD
9852b10
to
34b5f21
Compare
…5327 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution rolling. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro rolling --output-repository-path . --upstream-branch HEAD
…5146 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution melodic. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro melodic --output-repository-path . --upstream-branch HEAD Signed-off-by: Martin Jansa <martin.jansa@lge.com>
…3600 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution dashing. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro dashing --output-repository-path . --upstream-branch HEAD Signed-off-by: Martin Jansa <martin.jansa@lge.com>
…171906 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution eloquent. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro eloquent --output-repository-path . --upstream-branch HEAD Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution foxy. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro foxy --output-repository-path . --upstream-branch HEAD Signed-off-by: Martin Jansa <martin.jansa@lge.com>
…5327 Regenerate with superflore modified to better parse the license values as implemented in: ros-infrastructure/superflore#279 Recipes generated by superflore for all packages in ROS distribution rolling. This pull request was generated by running the following command: superflore-gen-oe-recipes --dry-run --no-branch --ros-distro rolling --output-repository-path . --upstream-branch HEAD
"zlib-acknowledgement", | ||
"ZPL-1.1", | ||
"ZPL-2.0", | ||
"ZPL-2.1"] |
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.
👀 @shr-project wow, that's got to be all of them now.
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.
@shr-project this is above and beyond what I was looking for. Thanks a million! 👍 from me.
@shr-project In which order should I merge #279, #280, #281? Let me know and I'll start hitting merge buttons. :) |
Please DON'T SQUASH the commits when merging, it will be impossible to review and understand the commits after they are squashed. |
5881fd8
cfb2d70
to
4d9fa14
Compare
* instead of trying to guess what the owner meant * exact string replacements are safer than parsing with regular expressions because the license value is often quite creative * these statistics from old regexp implementation are just from regenerated melodic recipes: A) clearly wrong replacements 1 "BSD & CreativeCommons-by-nc-4.0" -> "BSD & CC-BY-SA-3.0" 1 "BSD & GPLv3 & LGPLv3" -> "BSD & GPL-3 & LGPL-2" 1 "BSD,-Apache-2.0" -> "BSD-2" 1 "CreativeCommons-Attribution-NonCommercial-ShareAlike-4.0-International" -> "CC-BY-SA-3.0" 1 "LGPL3" -> "LGPL-2" 2 "Creative-Commons-BY-NC-ND-3.0" -> "CC-BY-NC-ND-4.0" 4 "GPLv3 & LGPLv3 & BSD" -> "GPL-3 & LGPL-2 & BSD" 17 "GPLv3" -> "GPL-3" 21 "LGPLv3" -> "LGPL-2" B) not clearly wrong, but guessing too much about version and often incorrectly (after inspection of the actual source files) 1 "Apache-License-2.0 & LGPL" -> "Apache-2.0 & LGPL-2" 1 "BSD & LGPL & GPL-for-sigblock" -> "BSD & LGPL-2 & GPL-1" 1 "LGPL & proprietary" -> "LGPL-2 & proprietary" 2 "BSD & Creative-Commons" -> "BSD & CC-BY-SA-3.0" 4 "Apache" -> "Apache-1.0" 5 "GNU-Lesser-General-Public-License-LGPL-" -> "LGPL-2" 15 "GPL" -> "GPL-1" 23 "LGPL" -> "LGPL-2" * and in some cases it was loosing some useful information: 1 "BSD,-Apache-2.0" -> "BSD-2" 1 "BSD,-LGPL" -> "BSD" 1 "BSD,-some-icons-are-licensed-under-the-GNU-Lesser-General-Public-License-LGPL-or-Creative-Commons-Attribution-Noncommercial-3.0-License" -> "BSD" 1 "BSD,GPL-because-of-list.h;-other-files-released-under-BSD,GPL" -> "BSD" 1 "BSD,LGPL,Apache-2.0" -> "BSD-2" 1 "BSD,LGPL,LGPL-amcl-" -> "BSD" 1 "GPL-because-of-list.h;-other-files-released-under-BSD" -> "GPL-1" 1 "GPLv2-with-linking-exception" -> "GPL-2" 2 "BSD,-GPL" -> "BSD" 8 "BSD-3-Clause" -> "BSD" * fixes: ros-infrastructure#271
* 'Apache' doesn't always mean version 1 in 'Apache-1.0' * 'GPL' doesn't always mean version 1 in 'GPL-1' * 'Mozilla Public License' doesn't always mean version 2.0 in 'MPL-2.0' * 'BSD License 2.0' doesn't always mean clause-2 in 'BSD-2' * 'Creative Commons' doesn't always mean Creative Commons Attribution Share Alike 3.0 in 'CC-BY-SA-3.0' * to be safe leave the orignal value and catkin_pkg package.xml validation will hopefully notify component developer to better specify the version based on the real source files - instead of superflore guessing what was meant by that * fixes: ros-infrastructure#271 Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Signed-off-by: Martin Jansa <martin.jansa@lge.com>
…t original value in comment * print the original value from package.xml whenever the get_license function modified, this makes it easier to review what superflore did in the recipe and makes some more creative values more readable e.g. "HEBI C++ Software License (https://www.hebirobotics.com/softwarelicense)" instead of: "HEBI-C-Software-License-https-www.hebirobotics.com-softwarelicense-" or "N/A" instead of "N-A" Signed-off-by: Martin Jansa <martin.jansa@lge.com>
* replace spaces with dashes in these 4 cases which weren't mapped to valid SPDX (which would be without spaces) Signed-off-by: Martin Jansa <martin.jansa@lge.com>
4d9fa14
to
2f8fdc1
Compare
@allenh1 Even though this PR affects more than the OpenEmbedded portions of the code, since you've already approved it, I'm going to merge it. |
Fixes #271
Corresponding changes for catkin_pkg:
ros-infrastructure/catkin_pkg#296
and rosdistro:
ros/rosdistro#26601