diff options
author | Jerome Forissier <jerome.forissier@linaro.org> | 2017-12-07 17:43:25 +0100 |
---|---|---|
committer | Jérôme Forissier <jerome.forissier@linaro.org> | 2018-01-10 19:09:42 +0100 |
commit | 537ee7428d8210ab6fb64bb715b523915db6c9fa (patch) | |
tree | 05688813fafc2f30add3d3e04aeae226417d66b7 /documentation | |
parent | 513b7c9c1e37d6dbdbd3492ebe0d199e29a9124e (diff) |
Document copyright and license header rules
Add a file to explain how the copyright and license information should
be described in source files. We are essentially following the Linux
kernel guidelines which are currently being discussed [1].
[1] https://patchwork.kernel.org/patch/10091607/
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Joakim Bech <joakim.bech@linaro.org>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/copyright_and_license_headers.rst | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/documentation/copyright_and_license_headers.rst b/documentation/copyright_and_license_headers.rst new file mode 100644 index 00000000..91dd1460 --- /dev/null +++ b/documentation/copyright_and_license_headers.rst @@ -0,0 +1,37 @@ +OP-TEE copyright and license headers +==================================== + +This document defines the format of the copyright and license headers in OP-TEE +source files. Such headers shall comply with the rules described here, which +are compatible with the rules adopted by the Linux kernel community. + +New source files +---------------- + +- (Rule 1.1) Shall contain exactly one SPDX license identifier, which can + express a single or multiple licenses (refer to SPDX_ for syntax details) +- (Rule 1.2) The SPDX license identifier shall be added as a comment line. It + shall be the first possible line in the file which can contain a comment. + The comment style shall depend on the file type: +- (Rule 1.2.1) C source: // SPDX-License-Identifier: <expression> +- (Rule 1.2.2) C header: /* SPDX-License-Identifier: <expression> */ +- (Rule 1.2.3) Assembly: /* SPDX-License-Identifier: <expression> */ +- (Rule 1.2.4) Python, shell: # SPDX-License-Identifier: <expression> +- (Rule 1.3) Shall contain at least one copyright line +- (Rule 1.4) Shall not contain the mention 'All rights reserved' + +Note that files imported from external projects are not new files. The rules +for pre-existing files (below) apply. + +Pre-existing or imported files +------------------------------ + +- (Rule 2.1) SPDX license identifiers shall be added according to the license + notice(s) in the file and the rules above (1.1 and 1.2*) +- (Rule 2.2) It is recommended that license notices be removed once the + corresponding identifier has been added. Note however that this may only be + done by the copyright holder(s) of the file. +- (Rule 2.3) Similar to 2.2, and subject to the same conditions, the text: + "All rights reserved" shall be removed also. + +.. _SPDX: https://spdx.org/licenses/ |