There is a simple project licensed under BSD3 that provides a CMake module. The project has a CMake build system that builds an example document by including the provided module. The CMake module has the BSD3 license and copyright included within it, which I assume applies to the entire project, not just that file.

To mesh this project with my own, I have modified the build system. I have captured these changes in a patch file. While the project containing the patch doesn't include the original project, it does contain a few lines of code from the build system inside that patch file as context for my changes.

Since I am relatively new to working with open source licenses, I am wondering what is the appropriate way to mark the project to ensure the terms of the original license are fulfilled. I know I need to include the original copyright, license, and disclaimer, and I would like to release my own code/changes under an equally permissive license (BSD2, BSD3, or MIT), but I am unsure how to differentiate what parts are covered by which license.

2 Answers 2


There are few ways to solve your problem. In order to be legally safest I would find those few lines from the original project, mark them with comments /* Name of the original copyright holder + BSD3 */, and then would include the original license along side with your own. Since you are going to release your own project as open source, then those lines might get erased in the future. When that happens with all those lines, then you can scrap the old license.

If you want to avoid this situation with your own project and mark each line written by a contributor then it would be necessary to sign CLA's with your contributors.

Good luck!

  • Perfect, so a license file that is essentially: "My copyright, BSD-3, Original Copyright, BSD-3" then add the comment as you state on each of the patch file lines that are from or derived from the original project. Should there be a line in the license file referencing the comment? e.g. "Lines including <comment> are covered by the following copyright/license"? Apr 21, 2019 at 15:16
  • @GodricSeer Oh, you're right. Add an explanation about the licenses and commented lines somewhere in a readme or license file. That should be sufficient.
    – Smart455
    Apr 21, 2019 at 15:28
  • 1
    Copyright does not work on a line-by-line basis. Therefor, it is pointless for copyright purposes to mark individual lines with who wrote them. Apr 22, 2019 at 8:09
  • @BartvanIngenSchenau You have the right to have your own opinion. That's why it's good to have different answers from different perspectives. Too bad you also think that everything you disagree with would somehow be incorrect. You also fail to understand that something that the law requires doesn't necessarily have to be convenient to the coder or to the manager/maintainer of open source project.
    – Smart455
    Apr 22, 2019 at 13:44
  • 2
    @Smart455 When we talk about law, the only thing that really counts is the text of the law and how it gets interpreted by judges in their rulings. Opinions by others can be helpful, depending on the qualifications of the one giving the opinion and the availability of verifiable references to more qualified sources. Unsubstantiated opinions by random strangers on the internet rank completely at the bottom. So, I repeat, can you substantiate your claims with regard to how copyright law works? Apr 22, 2019 at 18:32

A patch file has a distinctive format that allows a tool to recreate a derived work from an original work. In order to correctly do that, the tool must be given the correct (version of the) original work.

This means that for your patch file to be effective, you need to tell recipients of your project which third-party project it is based upon and then you can document there as well what license that project is under and fulfill your license obligations.

If you copied more from the original project than those few lines of context in a patch file, then it is considered wiser to mention both licenses in a LICENSE file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.