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

Generate LICENSE files on ros2 pkg create. #650

Merged
merged 3 commits into from
Jun 23, 2021

Conversation

clalancette
Copy link
Contributor

That is, if the '--license' command-line argument is one of
the ones that ament_copyright knows, fetch the license text
out of ament_copyright and place it in 'LICENSE' at the
root of the package.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

Here's the current list of strings that will trigger the creation of the LICENSE file:

  • Apache License, Version 2.0
  • Boost Software License - Version 1.0
  • BSD License 2.0
  • 2-Clause BSD License
  • 3-Clause BSD License
  • GNU General Public License 3.0
  • GNU Lesser General Public License 3.0
  • MIT License
  • MIT-0 License

One thing to be aware of here is that this is the first use of ament_copyright in an exec_depend. I don't think that should be a problem, but it is something to think about.

An enhancement we could do here is to add the SPDX identifiers to the license tuple in ament_copyright, and then use that instead. I don't mind strongly which way we go, but we should think about it and be deliberate; changing it later on will be difficult. Feedback is most welcome.

@nuclearsandwich @tfoote @gbalke @ros2/team FYI.

That is, if the '--license' command-line argument is one of
the ones that ament_copyright knows, fetch the license text
out of ament_copyright and place it in 'LICENSE' at the
root of the package.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@jacobperron
Copy link
Member

Supporting the SPDX identifier seems a little more friendly to me, since that might be what some users want to appear in the package.xml.

@wjwwood
Copy link
Member

wjwwood commented Jun 17, 2021

I agree about the SPDX stuff. I've already seen two packages use that in their package.xml files during my ros/rosdistro cycle.

@tfoote
Copy link
Contributor

tfoote commented Jun 17, 2021

+1 for SPDX support it will make our lives much simpler in the future for auditing

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor Author

All right, I've switched this over to using SPDX identifiers instead. This PR now requires ament/ament_lint#315 to go in first.

Copy link
Member

@audrow audrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Copy link
Member

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just a question

ros2pkg/test/test_cli.py Outdated Show resolved Hide resolved
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor Author

@ros-pull-request-builder retest this please

@clalancette
Copy link
Contributor Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor Author

All right, approved, CI is green. Going to merge, thanks everyone!

@clalancette clalancette merged commit 5c99e5f into master Jun 23, 2021
@delete-merged-branch delete-merged-branch bot deleted the clalancette/generate-licenses branch June 23, 2021 15:41
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.

5 participants