Ask Your Question

Whats the proper way to use a proprietary software license according to ament_copyright?

asked 2020-02-05 06:42:25 -0600

I'm exploring ROS2, and I'm currently looking into unit testing.

I'm running the following commands,

colcon test
colcon test-result --verbose

I'm always getting a warning for a missing license:

test/ copyright=My Company (2020), license=<unknown>

This is the header for my file:

# Copyright 2020 My Company
# Proprietary License

Whats the proper text to include in the header for the warning to go away, for a Proprietary Software License? I've taken a look at the ament_copyright documentation but I didn't find an answer to my question.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2020-02-05 07:31:04 -0600

gvdhoorn gravatar image

updated 2020-02-05 12:47:14 -0600

According to ament_copyright/doc/index.rst:

The package uses Python entry points to get all list of known licenses and copyright holder. You can implement a custom package and contribute more implementations to these entry points or extend this package with more licenses.

It's rather terse, but that would seem to be the way to add custom licenses.

Using a separate package to host them and extend ament_copyright seems like a nice clean approach. Not sure what the runtime overhead of that would be though.

edit flag offensive delete link more


Python entrypoints are very low overhead. All the existing licenses are already entrypoints even for the "default" ones. As an example of what it takes to add a license see: including registering the entrypoint. That registration can be done from any python package in the workspace.

tfoote gravatar imagetfoote ( 2020-02-05 13:16:00 -0600 )edit

Extending the package seems like a very good option for this use case, I'll give it a try and report on my findings.

Gonçalo Cabrita gravatar imageGonçalo Cabrita ( 2020-02-05 13:22:52 -0600 )edit

So I just experimented cloning the ament_copyright package to my workspace, added my proprietary license to ament_copyright (on my workspace) as suggested by Tully and it works beautifully. In my opinion this is a great solution for proprietary software.

Gonçalo Cabrita gravatar imageGonçalo Cabrita ( 2020-02-10 09:46:30 -0600 )edit

I believe the idea is to create a new package, host your files in there and then extend ament_copyright by registering an entrypoint with ament_copyright.

That would avoid you having to maintain a fork of the package while still being able to add the custom license check.

gvdhoorn gravatar imagegvdhoorn ( 2020-02-10 09:50:39 -0600 )edit

Exactly what @gvdhoorn said. You should create your own package and export the entry point for ament_copyright to find. What you did to extend ament_copyright to support your package can be done in any python package you include in your workspace. I'd suggest a dedicated package mycompany_ament_copyright.

tfoote gravatar imagetfoote ( 2020-02-10 19:22:59 -0600 )edit

answered 2020-02-05 11:19:33 -0600

Dirk Thomas gravatar image

updated 2020-02-05 11:21:02 -0600

The other choice is to simply not use ament_copyrightif you are using a not supported license and don't want to provide an entry point for it (see how to do that when using ament_lint_auto.

edit flag offensive delete link more


That's definitely an option, thinking about it licensing is extremely relevant for open source software, maybe not so much on an enterprise environment. Still I'd rather have proprietary disclaimers on all files.

Gonçalo Cabrita gravatar imageGonçalo Cabrita ( 2020-02-05 13:21:40 -0600 )edit

I wasn't suggesting to drop the information from the files. I am suggesting not to use the linter.

Dirk Thomas gravatar imageDirk Thomas ( 2020-02-05 13:45:16 -0600 )edit

Yes I understood that, let me rephrase, I like having the information on the files thus I like the idea of having the tests looking for it.

Gonçalo Cabrita gravatar imageGonçalo Cabrita ( 2020-02-05 13:49:48 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-02-05 06:42:25 -0600

Seen: 16 times

Last updated: Feb 05