License and documents
This page is for developers and designers who publish a site package, and for reviewers who check one. A package that does not say under which license it is published gives nobody the right to use, change or pass it on. This page explains the two places a package states its license, how Exponential shows them, and what the shipped packages do. It is not legal advice; for choosing a license see Licensing choices: an overview.
Contents
- Two places, both conventions
- The licence element
- How a stored license is shown
- The documents element and documents/LICENCE
- What the shipped packages carry
- Checklist
- Related pages
Two places, both conventions
| Where | Form | Enforced |
|---|---|---|
<licence> in package.xml | An identifier, such as GPL-2.0-or-later | Only by the package creation wizards, which offer a strict choice. An import accepts any text or none |
documents/LICENCE in the archive, named in <documents> | A plain text file | No. The package page links it when it is there |
Both spellings, <licence> and LICENCE, are the literal names the package format uses and stay as they are.
Every package published on the package server is expected to carry both; reviewers check for them
(Contribute your site package).
The licence element
eZPackage::parseDOMTree() reads the text of the first <licence> element and keeps it as it is. When the kernel
writes a package (eZPackage::domStructure()), <licence> follows the <version> and the release <timestamp>:
<version>
<number>6.0</number>
<release>15-stable</release>
</version>
<licence>GPL-2.0-or-later</licence>
<state>stable</state>The creation wizards (kernel/classes/ezpackagecreationhandler.php) refuse a license that is not in
[LicenseSettings] LicenseList[] of settings/package.ini ("choose one from the list") and store the identifier.
A package written by hand should use the same identifiers: an SPDX identifier where one exists
(spdx.org/licenses), otherwise LicenseRef-<name>.
How a stored license is shown
The package page (package/view/full/<name>) shows the license through eZPackageLicense::describe() in
kernel/classes/ezpackagelicense.php:
| Stored value | Shown as |
|---|---|
An identifier of LicenseList[], such as GPL-2.0-or-later | The license's Name= as a link to its URL=, followed by the identifier |
An alias of [LicenseSettings] AliasList[], such as GPL | The license it stands for, plus "stored as GPL" |
| Any other text | The text as it is, without a link |
| Nothing | A dash |
The shipped settings define 46 licenses in nine groups, DefaultLicense=GPL-2.0-or-later, and one alias:
[LicenseSettings]
AliasList[]
AliasList[GPL]=GPL-2.0-or-laterThe comment above it explains why: packages made before the license became a choice store GPL, which always
meant the GNU GPL version 2 or (at your option) any later version, the license of Exponential itself. Adding your
own license to the list is described in
Package licenses and Semantic Versioning.
The documents element and documents/LICENCE
Documents are files for the reader of a package, kept in the documents/ directory of the package
(eZPackage::documentDirectory()). package.xml names each one:
<documents>
<document mime-type="text/plain" name="LICENCE" />
</documents>| Attribute | Read | Notes |
|---|---|---|
name | yes | The file name below documents/ |
mime-type | yes | text/plain when the writer is given none |
os, audience | yes | Optional; the shipped packages leave them out |
What happens to a document:
- Export keeps it:
eZPackage::exportToArchive()copiesdocuments/,files/,simplefiles/,settings/and the sub-directories of the install items, and nothing else. - The package page lists the documents under Details. Each one that is in the archive opens in the page's
contents browser (issue #389); a link straight to the file under
var/storageis refused by the web server. - Nothing refuses a package without documents, or one that names a document it does not carry.
Note
Before 6.0.15 a file at the top of the package that was not in one of the exported directories was lost when the
package was exported again from the administration. From 6.0.15 on the export takes every file and folder at the
top (eZPackage::extraTopLevelEntries(); not hidden ones, not symbolic links). Keep LICENCE in documents/
anyway: that is where the package page lists documents.
What the shipped packages carry
Checked in the two source repositories on 2026-10-18:
- All 16 packages have
<licence>GPL</licence>, shown as "GNU General Public License v2.0 or later (stored as GPL)". - All 16 have
documents/LICENCE, a 15-line GPL notice ("version 2 of the License, or (at your option) any later version"), named in<documents>. - The first line of each names the package ("This file is part of the package ..."). Until 2026-10-19 three of
them named another package, a leftover of copying:
sevenx_multisite_cleannamedsevenx_multisite, and bothsevenx_multisite_democontentpackages namedsevenx_democontent. Fixed in the source repository on 2026-10-19, and the rebuilt packages are on the package server. - Both source repositories have a
LICENSEfile with the full text of the GNU GPL version 2 since 2026-10-19.
Tip
When you fork a package, change the first line of documents/LICENCE to the new package name, and add your own
copyright line if your changes are substantial
(Copyright and author lines).
Checklist
- To do:
<licence>holds an identifier from[LicenseSettings] LicenseList[](orGPL, the alias the shipped packages use). - To do:
documents/LICENCEexists and states the same license. - To do:
<documents>names it withmime-type="text/plain". - To do: The first line of
LICENCEnames this package. - To do: Images, fonts or scripts under other terms are named with their license in the source repository's README (README and repository docs).
Related pages
- Documentation requirements for site packages
- The requirements checklist
- Package licenses and Semantic Versioning
- The LICENSE file of a theme
- Choosing a license in the package wizard
- Site packages: start here
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.