14

So I'm new to all this licensing jazz, and I've just started work on a project I'd like to one day publish as open source.

I've found a couple of projects so far that have code to accomplish stuff similar to what I'd like to do, and as such I'd like to use it because it is probably more mature/tested than what I'd end up writing at first.

Now here is my problem, some of the code is written under the MIT license and some is written under the EFL (Eiffel Forum License) and some under the Apache license.

I've looked through all 3 licenses, and they seem to be functionally quite similar, differing in small ways such as copyright attribution and something about patents.

Can I, legally, combine code written under these, or any 3 (similar) licenses? How? I'm not sure if this is correct, but as I understand it, if all 3 licenses are GPL compatible I could then license my project as GPL. However, in this case, I think copyleft is unnecessary and not something I'd be very interested in.

Does public domain code combined with licensed code work the same way?

If so, what license can/should I then put my own project code and modifications under?

And third, say I did one day want to go commercial and keep my software closed-source; I completely understand that if I previously released an OS version it would always remain so and people would be able to fork it and so on, but would this triple-mixing have any effect? (I assume it depends on the terms of each license here, I'm only asking if there is something I haven't considered)

7

The best option is to create a NOTICE (or perhaps NOTICE.txt or NOTICE.md) file in the root of your project code containing an introduction/summary, a list of copyright holders/project names and then all three license texts one after the other. And at the top of each source code file make sure you preserve the original copyright/license notice (optionally adding your name and the current year to it).

For binary distributions of the code, you must also have some way to access the license, for example in your "about" screen. The apache license refers to binary distributions as "object" code.

You are not required to distribute the source code at all with any of these licenses. If you only distribute binaries, not the source code, then only your binary needs to comply with the license terms.

If you're not happy about the license requirements, you can always email the project maintainer with your reasoning. They might give you permission to skip some of the requirements or even use a different license entirely – I've had good luck with this approach in the past.


As for what you're required to do (note these restrictions apply to source code and binary distributions of your app!):

MIT and EFL just require that copyright notices and the license text be "included" in you work. You can decide for yourself how to do this, as long as you make a good faith effort that people who want to know what copyright/license applies they can find out.

Apache has clear instructions:

  1. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

    1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
    2. You must cause any modified files to carry prominent notices stating that You changed the files; and
    3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
    4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
6

The GPL has a clause that if any component of the project is licensed under the GPL, the entire project must be licensed under the GPL. This is where license compatibility comes in to the picture.

In your case, there are no clauses in the licenses of your components that forbid distributing the software under "mixed" licenses. You can release your product part MIT licensed, part EFL licensed, part Apache licensed, part licensed to your choice (your part) without any problem.

With public domain code you can do, barring moral rights, which have different implications in different jurisdictions, pretty much anything. Please note that there is not much public domain code available; it would be prudent to double check what you think is public domain actually is public domain (see also How can I place software in the public domain )

There are no additional problems with closing the source under mixed licenses, but do remember you can only close your IP, not anyone elses.

  • Thanks. How would I go about licensing different pieces though? If I use 2 different bits of code under different licences, how would I show which part has what license? And yeah, I did make sure it was actually public domain (I was surprised aswell). – CupOfTea Aug 25 '15 at 12:45
  • 1
    IMO is the best way to go about it putting all licenses in the root of the project, and put a license header in each file, per opensource.stackexchange.com/questions/202/… – Martijn Aug 25 '15 at 12:51
  • If I have multiple multiple instances of code in the same file, each under a different licenses, I should include all the applicable license files in the root, then just put all the applicable headers? Your opinion is appreciated :) Albeit a bit of an ugly solution (3 headers in a file.. ouch) I would assume this is the most "legal" and correct way to do it? – CupOfTea Aug 25 '15 at 14:25
  • 1
    @CupOfTea If you have multiple instances of code under different licenses in a single file you have what is colloquially known as an "unholy mess" ;) If it's based on an old version, and re-licensed to a new version, you could do a your own header, followed by "based on -link to original- by -original copyrightholer- under -original license-" – Martijn Aug 25 '15 at 15:55
  • 1
    If you can link to the original MIT file and EFL file that would leave the least room for confusion. – Martijn Aug 25 '15 at 16:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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