Apache 2.0 licence: notices, modifications and patents
Using Apache 2.0 code in a product: the licence, changed files, NOTICE and patent clause scope, with a delivery example.
A library modified before delivery
You fix an Apache 2.0 library and integrate it into software delivered to a client. You can keep your modifications private and sell that software. Before sending it, you still need to include the licence, identify changed files and reproduce applicable attributions.
Apache 2.0 is a permissive licence, like MIT. It allows commercial use without requiring publication of your application’s source code. It specifies redistribution conditions in more detail and also grants certain patent rights. Its SPDX identifier is Apache-2.0; the name refers to a reusable licence, including for projects outside the Apache foundation.
What section 4 requires you to pass on
The redistribution conditions apply to copies of the software and derivative works, distributed in source or compiled form. To prepare delivery of a modified version, I would review the four requirements of section 4:
- Give recipients a copy of the Apache 2.0 licence. A line in an inventory does not replace the full text.
- Ensure modified files carry prominent notices stating that they have changed. A Git history missing from the delivery is not enough to identify these changes in the files.
- Preserve, in the source of distributed derivative works, the copyright, patent, trademark and attribution notices applicable to the reused code.
- If the original distribution includes a NOTICE file, reproduce the relevant attribution notices in the distributed derivative work, in one of the locations permitted by the licence.
These obligations allow binary distribution without publishing source code. You can apply other terms to your modifications or the product as a whole, provided that redistribution of the original component complies with Apache 2.0.
NOTICE: retain the relevant attributions
LICENSE contains the licence text. NOTICE collects attribution information that section 4 requires you to reproduce when such a file exists upstream. Its contents do not change the licence. The absence of an upstream NOTICE does not create a general obligation to invent one for every Apache 2.0 component.
Attributions can be reproduced in an included NOTICE, in supplied source code or documentation, or in a software display wherever third-party notices normally appear. Notices unrelated to any retained part may be omitted. I would record that choice so it can be reviewed at the next update.
In our fictional example, the delivery includes the compiled program and a third-party licences folder containing the Apache 2.0 text and relevant attributions from the upstream NOTICE. Modified source files also carry a change notice. A comment like this can describe the work without replacing the original notices:
// Modifié par Équipe Exemple : adaptation du délai de connexion.
// Conserver également les avis d’origine applicables à ce fichier.Check this arrangement in the archive actually delivered. The English licence text must remain included; a French translation helps readers, but the foundation states that only the English text is authoritative.
A patent licence with a defined scope
Copyright permits reuse of the code. A patent may cover an invention implemented by that code: that is a separate question. Section 3 of Apache 2.0 provides an explicit grant of certain patent rights from each contributor.
It covers claims that the contributor can license and that would necessarily be infringed by their contribution alone, or combined with the work to which it was submitted. It therefore does not cover all their patents and does not guarantee the absence of third-party patents.
The section also provides for termination: if you bring patent litigation alleging that the software or an incorporated contribution infringes a patent, the patent licences granted for that software terminate on the date the litigation is filed. The text includes certain counterclaims. This clause concerns those patent rights; it does not say that all copyright rights disappear whenever any dispute arises.
Useful distinctions from MIT and the GPL
MIT mainly requires preservation of its notices and does not express the same explicit patent grant. Apache 2.0 additionally formalises notices for modified files and handling of NOTICE when one exists. Both allow proprietary products: neither, on its own, requires you to publish your modifications.
The Apache FAQ states compatibility with GPL version 3, but not GPL version 2 only. A combination subject to the GPL may therefore impose additional obligations on the distributed result. For a component labelled GPL-2.0-or-later, the option to choose a later version deserves a separate check; do not reduce the analysis to the word ‘GPL’.
Apache 2.0 does not grant a general right to use the original project’s trademarks. Describing a component’s origin and reproducing its attributions does not let you present your product as endorsed by its authors. It also provides for supply without warranties, subject to applicable law or a written agreement.
Choosing Apache 2.0 for your own code
If you hold the necessary rights, put the official text in LICENSE and adapt the headers to your rights holders. The FAQ also suggests short headers using SPDX-License-Identifier: Apache-2.0. The identifier helps identify the licence; keep the full text in the project and distributions.
I would then check a specific deliverable: the components actually included, their versions, changed files and attributions to pass on. These guidelines concern the standard licence. A separate contribution agreement or a combination of licences may require further analysis before distribution.
Sources and useful links
- Apache Software Foundation: official text, sections 3 to 9 and application
- Apache: FAQ on redistribution, patents and GPL compatibility
- SPDX: Apache-2.0 identifier and redistribution conditions
- GitHub Choose a License: Apache 2.0 permissions and limitations
- Open Source Initiative: MIT text to compare required notices
- Read version numbers before updating a dependency
- Taking over a project: find its dependencies and documentation