License Policy: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(add link to OSD; create section on tri-license compatibility)
No edit summary
Line 98: Line 98:
The following licenses are not compatible with the Tri-License:
The following licenses are not compatible with the Tri-License:
* CC-*
* CC-*
* LGPL
* Apache (will change after MPL 2.0 is released)
* Apache (will change after MPL 2.0 is released)
* LGPL, GPL, or MPL by themselves


===Copying Code===
===Copying Code===

Revision as of 20:33, 3 November 2010

Draft-template-image.png THIS PAGE IS A WORKING DRAFT Pencil-emoji U270F-gray.png
The page may be difficult to navigate, and some information on its subject might be incomplete and/or evolving rapidly.
If you have any questions or ideas, please add them as a new topic on the discussion page.


Version 2.1 draft 1

Introduction

Mozilla has created this policy to govern which licenses are used for source files stored in our code repositories. Developers with check-in privileges to the mozilla.org code repositories must comply with this policy, as agreed to in the Committer's Agreement, unless specifically advised otherwise in writing by Mozilla.

The following is a brief summary of the Mozilla license policy:

  • Newly-added code of a given type must be licensed under terms acceptable for that type of code - typically the Mozilla tri-license.
  • New files in, or modifications to, an existing, consistently-licensed area of code should be under the same license as the existing code.
  • You must consult the licensing team before importing third-party code which is not under the tri-license.

For the complete license policy see the following sections. If you are trying to work out how to license some code, or what to do about code you want to import into the Mozilla repositories, there is a flowchart of the policy to help you.

Types of Code

code-diagram.png

Mozilla Code is code in our repositories which originated with the Mozilla Project.

Third Party Code is code in our repositories which did not originate with the Mozilla Project.

Product Code means all files any part of which are included in nightly binaries of the Mozilla family of Internet clients - Firefox, Thunderbird, SeaMonkey and Camino. Note that this definition excludes the code of tools used merely to build these products, such as system libraries. Code may be both Product Code and Third Party Code.

Support Code is code in our repositories which is Mozilla Code (i.e., it originated with the Mozilla Project) but is not Product Code. Examples include Bugzilla and Bonsai.

Please see the accompanying diagram for the relationship between the four definitions.

Licensing of Mozilla Code

Mozilla Code is code in our repositories which originated with the Mozilla Project, i.e., which was created by a developer who has signed the Committer's Agreement, and who created the code with the intent that it be maintained and distributed by the Mozilla Project.

Mozilla Code that is Product Code must be licensed under the tri-license, unless the code is an addition to Third Party Code that has already been imported to a repository. For details on licensing of Third Party Code, see the appropriate section below.

Mozilla Code that is Support Code should also be licensed under the tri-license, unless it falls into one of the two following exceptions:

Trivial Support Code Exception

Trivial Mozilla-originated Support Code, such as testcases or snippets of code used in documentation, should be put in the public domain in order to facilitate re-use.

To put a piece of trivial Support Code in the public domain, apply the Creative Commons Public Domain Dedication by using the following boilerplate:

Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/

Note that, for historical reasons, some trivial Support Code, such as old code samples in developer.mozilla.org, may be under the MIT license.

Case-by-Case Support Code Exceptions

Some existing non-trivial Support Code is made available under licenses other than the tri-license or Public Domain licenses. If you are adding new code, or making modifications to existing code, in one of these projects, you should use the license which is already associated with these projects- typically MPL, NPL, or MPL/GPL.

Non-trivial Support Code not listed in that page must be under the tri-license. New exceptions for new Support Code may be requested from licensing@mozilla.org, but are not usually granted.

Licensing of Third Party Code

Third Party Code is code in our repositories which did not originate with the Mozilla Project. It is usually, but not always, under its own specific license.

Third Party Code Already in a Repository

When modifying or adding to Third Party Code that has already been checked into a mozilla.org repository by someone else, you should use the license pertaining to that code. The only exception is if you are adding Mozilla-specific files that have no reason to go upstream, such as build system files. In that case, you should use the Mozilla tri-license.

Importing New Third Party Code

If you are planning to import new Third Party Code into a Mozilla repository or a Mozilla product, always consult licensing@mozilla.org first. They can then check whether the license is compatible - even simple-looking licenses can have twists in them - and make sure our requirements are met.

Non-Product Third Party Code must be under an Open Source Definition-compliant license.

Product Code that is Third Party Code must be under the tri-license, or a compatible license (see list below.) The purpose of this rule is to make sure that all users of our code can use the complete code under any one of the three licenses; no group is disadvantaged. A complete list of compatible licenses that we currently use code under, and the code they apply to, can be found by opening about:license in the Firefox browser.

Other Information

Using the Tri-License

For the purposes of this document, the "Mozilla tri-license" is the MPL/GPL/LGPL triple license, allowing use of the file under the terms of any one of:

  • The Mozilla Public License, version 1.1 or later (MPL)
  • The GNU General Public License, version 2 or later (GPL)
  • The GNU Lesser General Public License, version 2.1 or later (LGPL)

To apply the tri-license to new source files, please don't copy boilerplate from existing files - instead, use the appropriate boilerplate license notice.

Licenses Compatible with the Tri-License

The following licenses are compatible with the Tri-License:

  • MIT, BSD, and similar permissive licenses
  • Public Domain dedications

The following licenses are not compatible with the Tri-License:

  • CC-*
  • Apache (will change after MPL 2.0 is released)
  • LGPL, GPL, or MPL by themselves


Copying Code

You may copy code between files with identical licensing terms, or between files where the target file has a subset of the licenses of the source file (e.g. MPL/LGPL/GPL -> MPL). For any other transfer, consult the licensing team first.

Reporting Incompatible Code

If you happen to find a file in the Mozilla source tree under a license which does not conform to the rules above, please report it to licensing@mozilla.org.

Checking In Third-Party Code

After getting permission from licensing@mozilla.org, a developer checking in third-party code should make sure that:

  • The checkin comment contains information (or references to information) sufficient to identify the author of the Code, including at minimum an email address, and ideally the URL of a public source repository where the code was obtained from.
  • about:license is updated to refer to the new code (and new license, if any). Please file a bug in the Licensing component.

Website Licensing

If you are creating a new Mozilla-affiliated website, please check with licensing@mozilla.org to make sure your licensing choice, trademark use, terms of service, privacy policy and other legal terms are appropriate.