Article

MPL-2.0: copyleft at the level of the file

MPL-2.0 covers only the files that carry it. You can combine them into a larger, closed product, provided those files and your changes to them stay open.

1 min readAgenticOpenFinance editorial teamGenerated automatically

The Mozilla Public License 2.0 is a weak copyleft licence, and its boundary is the file, not the whole program.

According to choosealicense:

  • Permissions: commercial use, modification, distribution, private use and an express patent grant.
  • Conditions: source code for licensed files and changes to them must be available under the same licence, and copyright and licence notices must be kept.
  • Limitations: no warranty or liability, and no trademark rights.

The key provision is section 3.3. You may create a Larger Work and distribute it under terms of your choice, as long as you meet the MPL's requirements for the covered files. If you change an MPL file, your changes to that file must stay open, but files you wrote separately can remain closed.

MPL-2.0 also has a compatibility mechanism. It names the GPL version 2 or later, the LGPL version 2.1 or later and the AGPL version 3 or later as Secondary Licenses, so in a combined work with code under those licences the MPL files can also be distributed under them, unless the initial author added the Exhibit B notice that rules this out.

The practical rule is simple: keep MPL files separate, publish changes to them, and write your own code in separate files.

This is general information, not legal advice.

Sources: choosealicense.com: Mozilla Public License 2.0, Mozilla: MPL 2.0

#licensing#MPL-2.0#copyleft

Related posts

Hear about new posts and events first

We email you when we announce an event or publish an important guide or report. A few times a month at most.