I want to reuse some code licensed under a BSD license but I don't know how to make it clear what I wrote, what I have reused and what I have modified.
Say the project I want to reuse code from has the following directory structure:
project/
|-- LICENSE.txt
|-- module1/
| |-- file1.c
| |-- file2.c
| `-- file3.c
|-- module2/
`-- module3/
and the contents of LICENSE.txt is a BSD license, i.e. its contents are:
Copyright (c) <year>, <copyright holder>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
[...]
(See wikipedia for a template of the full text.)
Also, the copyright is only stated in the LICENSE.txt file and not in every individual source code file.
If I now copy everything under project/module1/ to my own project:
my_project/
|-- module1/
| |-- file1.c
| |-- file2.c
| `-- file3.c
|-- my_file1.c
|-- my_file2.c
|-- my_source_code1/
`-- my_source_code2/
How should I state that I am not the copyright holder of the files under module1? Would it be enough to copy the original LICENSE.txt, with the original copyright holder in it's header, to the module1 subdirectory? Or should I add a copyright header to each individual file?
What if I modify any of the files under module1? Should I then somehow add myself as an additional copyright holder for the files I modified?
Note: I am perfectly fine with using the same (or a compatible) license for the code I wrote.
You don't want to take any chances here of misinterpretation of copyright. So, I would go as far as the following structure:
my_project/
|-- the_other_project
| |-- LICENSE.txt
| |-- module1/
| | |-- file1.c
| | |-- file2.c
| | `-- file3.c
|-- my_file1.c
|-- my_file2.c
|-- my_source_code1/
`-- my_source_code2/
In addition to this:
That's if you are not doing too many modifications to the other source code. If you are rewriting everything, simply mention in your license the origin of the other code.
Copy LICENSE.txt
in your module1
dir, and mention in your docs (README, LICENSE, etc.) that you use this part of the project. BSD style license is very liberal: as long as you give due credit and respect its requirements (this usually involves providing the unmodified license and copyright notices), you can do whatever you want with the code.
If you modify any file, a good practice is to mention it in the file header, around your changes, and in your global docs. If the modified files had no copyright notice, just add one describing your changes. That way users can known which files were modified, who did it, why and how.
It's that simple: do it in a very descriptive way. There is no formal procedure to follow, contrary to GPL style licenses. This is more documentation than legal work.
I like to have the license referenced inside a comment in the source code - it is easier that way as people are more likely to open a source file and play around than examine the directory structure first. A simple comment stating that the code is copyrighted to X and is licensed by Y just helps to direct someone to the appropriate license file.
I just found Maintaining Permissive-Licensed Files in a GPL-Licensed Project: Guidelines for Developers, published by the Software Freedom Law Center. Although it talks specifically about incorporating BSD style licenses (they call them permissive) into GPL licensed code, I think the recommendation in section 2.1, Including unmodified permissive-licensed files, would be a good general recommendation. I quote:
If the external project uses the single COPYRIGHT file method, the developer should copy the names of all the copyright holders from that file and place them, along with any copyright, permission, and warranty disclaimer notices required by the permissive license, at the top of the incorporated source file.
In case you modify the included files and your project is GPL, there are two relevant sections in the mentioned document:
The case where you modify the included files and your project is not GPL is obviously not addressed by the document. But from what I have gathered from the other answers, I would say, as long as the license you use for your project is not viral, that the proper thing to do would be to just add yourself as a copyright holder to the copyright header of the file you modified and mention the origin of the included code somewhere in your docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With