When should I add a copyright at the top of a source file? [closed]

asked 2020-04-16 22:30:56 -0500

DanRose gravatar image

Most files in ROS2 have a copyright at the top. (seemingly all c, cpp, h,hpp files and most py files, though not most xml, rst, md, or yml files)

  1. What files should have a copyright? What files don't? All the above formats theoretically could have a copyright.
  2. If I submit a pull request, when should I add my name to the copyright on top? If I edit a single character? If I add a function? If I rewrite 50% of the file?
edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by tfoote
close date 2020-04-17 00:19:35.116368


This is a generic copyright question and not ROS specific. There are many articles covering this topic online from lawyers and other experts.

tfoote gravatar image tfoote  ( 2020-04-17 00:18:49 -0500 )edit

Isn't closing this a bit harsh?

I agree it may not be entirely on-topic, but I guess @DanRose is asking (perhaps only implicitly) whether there are any differences between how this is done "in ROS2" compared to the practices in the wider OSS community.

Especially the second question (about when adding copyright) seems valid. Even if the answer would be "we follow this-and-this approach/style" that could be answered here.

Seeing as most ROS 2 repositories are still under direct control of OR, asking how these kind of things are handled there seems like an OK question for ROS Answers to me.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-17 03:15:26 -0500 )edit

This question does not have a single answer. There are differences based on what license you're using, what jurisdiction you reside in, what jursdiction the project is administered under to mention a few.

This is a well documented topic with 2.2 billion other results.

ROS 1 or 2 is just like any other open source project and should follow all the same best practices for copyright. That's why this is not the right forum, as it's not ROS specific. It's something that ROS users may find useful. , but we shouldn't try to reproduce our own non-expert version of those best practices that will go stale as the state of copyright law and associated best practices evolve over time. We should leverage the other resources available through the greater open source community.

tfoote gravatar image tfoote  ( 2020-04-17 04:30:49 -0500 )edit

But we enforce copyrights on top of all source files as per the developer guide;

“Each source file must have a license and copyright statement, checked with an automated linter.“

Sure there’s a legal question but what is the established norm in the ROS community?

DanRose gravatar image DanRose  ( 2020-04-17 05:17:44 -0500 )edit

As stated in the developer guide that's our recommended policy for copyrights headers to be in all source files. If you're not doing that you're leaving the code potentially legally ambiguous to it's state.

There's a difference between source code and data. And documentation may follow a different pattern and or license as well. Your question is to define what a source file is and I'll again go back to saying that there's a lot of material out there that you should read up on with content from lawyers to help you understand the difference. Any summary or reduction that I or anyone else gives here will be incomplete and out of date moderately quickly.

In the second question there are also definitions of "significant" contributions that you should read up on what the best legal advise is. But again it's not ...(more)

tfoote gravatar image tfoote  ( 2020-04-17 16:23:20 -0500 )edit
  1. Saying you need a copyright header that may or may not be exhaustive leaves things similarly legally ambiguous! Is it supposed to be exhaustive or not?
  2. Everything I've seen says data is equally subject to copyright as source code. And setup.py is unambiguously source code.
  3. I'm looking for rough guidance and community expectations.
  4. I have seen everything online from "copyrights are useless on source code so don't put them" to "require full copyright assignment for every contribution so you know that you are the sole owner". This gives me zero guidance: https://en.wikipedia.org/wiki/Segal%2...
  5. Presumably, a lawyer was consulted when deciding to add the DCO to many core packages. Is there maybe some paper trail of what went into that which might give me a clue?
DanRose gravatar image DanRose  ( 2020-04-17 19:36:39 -0500 )edit