This post covers some aspects related to software license Apache License, version 2.0.
Introduction to Apache License, version 2.0
Apache License, version 2.0 is a permissive open-source license.
Apache orginal license was a copy of BSD.
Among the most popular permissive licenses, it is probably the one that protects better the developers without being restrictive (i.e., forcing to keep using the same license).
It is compatible with GNU GPL 3.0 license, but it is not compatible with GPL 2.0.
Apache License, version 2.0 is recognized as open-source license by the Open Source Initiative (OSI). You can find its entry on this external link.
Among the permissive licenses, Apache License v2.0 is the one recommended by the Free Software Foundation because it prevents “patent treachery”. You can read this statement on this external link.
How do I use a Derivative Work of Software with Apache License version 2.0
If you modify the code of an Apache 2.0 License, then it is considered a Derivative Work by the Apache 2.0 Licenses.
The point 4 in the Apache 2.0 License explains what should be done in case of redistribution:
4. 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:
Apache License, version 2.0
- You must give any other recipients of the Work or Derivative Works a copy of this License; and
- You must cause any modified files to carry prominent notices stating that You changed the files; and
- 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
- 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.
There are some discussions about what should be done to redistribute Apache 2.0 code:
- Reddit r/opensource; “Apache 2.0 License; what are the requirements when copying/modifying?“; Reddit
- Quora users; “Can I copy, open source library licensed under Apache License 2.0, change something or something do not copy and make it my own for use in my work as a core library for a commercial project?“; Quora
- Quota users; “Can I use an Apache licensed Github project?“; Quora
Criticism on Apache 2.0
These exceptions address two main criticisms against Apache 2.0:
- Apache 2.0 is not compatible with GPL 1.0 and 2.0, according to FSF
- It does not allow developer to embed portions of the code without being bound by certain conditions of the Apache 2.0. These conditions are Sections 4(a), 4(b), and 4(d). These sections typically concern redistribution of the software, patent rights, and notices and attributions.
This is because Apache 2.0 contains some restrictions not present in GPL 2.0. GPL 3.0 was designed to make it compatible with Apache 2.0. Take into account that GPL 3.0 is still not compatible with previous versions to Apache 2.0.
The OpenBSD project does not consider the Apache License 2.0 to be an acceptable free license because of its patent provisions. The OpenBSD policy believes that when the license forces one to give up a legal right that one otherwise has, that license is no longer free. Moreover, the project objects to involving contract law with copyright law, stating “…Copyright law is somewhat standardized by international agreements, contract law differs wildly among jurisdictions. So what the license means in different jurisdictions may vary and is hard to predict“. You can check it on this external link.
LLVM Exceptions
LLVM exception or LLVM exceptions are a set of exceptions that are sometimes added to Apache 2.0. When a software use this license, its license is described as Apache 2.0 with LLVM exception.
The LLVM exception receives its name from the LLVM set of compiler and toolchain technologies that was the first to use this exception.
Unlike other exceptions like Commons Clause, LLVM exception is designed to be used on a specific license, i.e. Apache 2.0.
LLVM exception tries to cover the main criticism on Apache 2.0 regarding GPL 1-2 compatibility and Apache 2.0 conditions applied to source code released with a different .
The exception allows developers to embed portions of the LLVM source code into their own source code and redistribute them in object form without being bound by certain conditions of the Apache 2.0 license.
An example of software with license Apache 2.0 with LLVM exceptions is Mojo programming language.
You can read more about LLVM exception on this external link.
You can read the original Apache 2.0 with LLVM exception license on this external link.
Compatibilities of Apache 2.0 license and other licenses
The ASF 3rd party license policy clarifies which licenses are compatible with Apache 2.0.
Differences between Apache 2.0 and MIT
Apache 2.0 and MIT are both permissive software licenses.
Apache 2.0 is slighter more restrictive than MIT, and contains some clauses to restrict aspects that MIT does not. These are:
- Trademark protection
- Patent grant / Protection against patent treachery
As a general conclusions, you should use Apache 2.0 if you prioritize developer protection and reusibility rather than flexibility.
MIT is compatible with GPL 2.0, while Apache isn’t.
Some relevant organizations (like Google, Facebook and CNCF) recommends using Apache 2.0 while others (like Microsoft) prefer MIT.
Reasons to use MIT, according to user ssddanbrown on this external link:
The reason a lot of people like the MIT is because it's incredibly short, easy to understand, and the additional practical benefits provided by the Apache license are likely not experienced or observed by many people (Not to say they're not important though)
It's in a similar manner to how the GPL licenses do a really good job at ensuring freedom of the code, and it's users, but to achieve that it's very long, tricky to read and involves additional considerations over permissive license.
Take into account that some projects, including those with MIT, may include contributor license agreement (CLA) that legally covers what the permissive license is not covering.
Reasons to use Apache 2.0, according to user on this external link:
Google and Facebook, along with many other companies, often choose to release their open source code under the Apache license because it offers a balance of strong legal protections and permissive terms. The Apache License provides a clear patent grant, which can be important for companies with large patent portfolios. Additionally, the Apache License includes a contributor license agreement, which can simplify the process of accepting contributions from outside developers. While the BSD and MIT licenses are also permissive, the Apache License's additional legal protections make it an attractive choice for many companies. Ultimately, the choice of license depends on the specific needs and goals of the company and the project.
You might also be interested in…
External References
- TLDRLegal; “Apache License 2.0 explained in Plain English“; TDRLegal
- “The Apache License, Version 2.0 and the Anti-Patent Treachery Clause“
- LLVM exception
[…] You can read more about Apache license, version 2.0 on this post. […]