copyright file format

The Debian people have engineered a Copyright file format using the standard field-name / value pair of the control format. This format is also supported by the wpkg tool via the libdebpackages library.

The file format makes use of empty lines. Each group of lines represent a block of information. There are 3 types of blocks:

  • The Header block that describes the project globally and that must appear first;
  • The Files block which is used to specify the license of a file or group of files, it is expected that at least one such block exist in a copyright file;
  • The License block which describes a license that the header or a File block may reference.

From my understanding, the list of File and License blocks does not need to follow a specific order. They just need to be there. Especially, all references to licenses in File and Header blocks need to all be satisfied one way or the other, however, the file is expected to be read in full before such references get resolved.

The following is the list of fields. The order in which fields are defined is not important. The name of the field is case insensitive. The value may be case insensitive or not. Debian makes sure that certain fields have certain formats. We are more flexible although we do check a few fields that are expected to be defined on a single line.

Comment (Header, Files, License: optional)

A free text field giving additional information about the project copyright, the files, or the license where it appears.

Copyright (Header: optional; Files: required)

The copyright of the project (header) or part of the project (Files). The copyright notice is often different for different directories because it is often that different libraries are used in the same project.

Disclaimer (Header: optional)

The disclaimer explains how none of the authors can ever be responsible for anything and such.

Files (Files: required)

Define a list of files that are assigned the license defined in this block.

The files are defined as full path to the file (from the root of the project), patterns, and directories. In the latter, all the files under that directory are considered to all have this license. All the glob patterns supported by the uri_filename implementation are supported here too. This includes the asterisk (*), the question mark (?), and the character groups ([A-Z]). Multiple patterns can be defined when separated by white spaces (which means the format does not support filenames with spaces.)

Note that if multiple Files blocks match a filename, the last one is chosen.

Format (Header: required)

This field describes the format of the copyright file. Debian uses their official documentation page as the format URI:

http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

We propose that you link to our page when using a copyright file with wpkg, although wpkg accepts any valid URI.

http://windowspackager.org/documentation/implementation-details/file-formats/copyright-file-format/1.0

License (Header: optional; Files, License: required)

The License field may be a one line reference to License blocks or a full license. In case of a License block, it is expected to only be a full license. The first line is always the name of the license. Multiple licenses can be specified on the first line when the field is used in the Header.

Note that Debian accepts a small set of short license names such as GPL-2.1. We may offer such licenses at some point although it would require the user to install a license package to get the complete license on their system (which Debian does!)

Source (Header: optional)

Typically the URI to the source project. It may also be a free form text explaining the origin of the project.

Upstream-Contact (Header: optional)

In most cases, the author(s) of the original package.

Upstream-Name (Header: optional)

In most cases, the name of the original package.

Syndicate content