1

I'm using some modified MIT licensed code directly in my project and am concerned about how to correctly attribute it.

The code in question does not have license text in each file, only a single LICENSE file at top level. I have included the contents of that file in my own licenses file. In this file I also have the licenses for other libraries I use, but these are all unmodified and live in separate directories in the project making the origin clear.

I am concerned that this leaves it unclear as to what the origin of any particular piece of code is in my project. I'm curious if this is actually an issue and if it is, how could I manage this better?

Thanks

5
  • Did you cut and paste the MIT licensed content directly into your own source files?
    – jwdonahue
    Commented Feb 25, 2020 at 23:36
  • No, I added the files unmodified then began making changes. After making extensive changes though, it's essentially indistinguishable from having cut/paste without looking at commit history since the original files have no license text. This is what I'm feeling uneasy about.
    – timklatt
    Commented Feb 25, 2020 at 23:42
  • 1
    I would add a comment to the top of those files stating where the code originated and pointing to the MIT license. Something like // Copied and modified from ProjectWhatever under MIT License vX.Y. You might want to add a mention of the git hash, or equivalent, that you forked off of as well. That will aid future maintainers, should they wish to check the recent history of the original work for tips on how to fix whatever zero day bug they are trying to fix.
    – jwdonahue
    Commented Feb 25, 2020 at 23:49
  • pretty sure legal questions are off topic
    – Martin K
    Commented Feb 26, 2020 at 7:34
  • 1
    @MartinK it seems to be very much about traceability and source code attribution/management as well
    – Christophe
    Commented Feb 26, 2020 at 8:25

1 Answer 1

1

Neglecting to put their MIT license into the source files is a mistake on the part of the original authors. In your copy of the files, you can just add this for them.

In your top-level LICENSE file, there is no need to repeat the license of those files; just a brief copyright notice and a mention that they are used under a MIT license. If someone opens those files, they will see the detailed license.

In the middle of your license you can have something like.

Program uses the following files from other authors;
see their respective license headers for more details:
string.c list.c tree.c: Copyright 2013-2019 M. Y. Helper, MIT License
regex.c: Copyright 1993 Pat M. Atcher, BSD2 License

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.