Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Prepare 3.2 version of specification #133

Merged
merged 55 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
d3e4bc1
Bump to 3.2
carmenbianca Oct 17, 2023
8f7fa84
Add Snippet as defined term
carmenbianca Oct 17, 2023
e7e6051
Reformat section
carmenbianca Oct 17, 2023
4741404
Improve wording of paragraph
carmenbianca Oct 17, 2023
d547fb0
Improve definition of Copyright Notices
carmenbianca Oct 17, 2023
2993608
Spelling
carmenbianca Oct 17, 2023
9f9ebbf
Improve order of precedence
carmenbianca Oct 17, 2023
0426d6c
Yank 3.1 in change log
carmenbianca Oct 17, 2023
779c2f7
Adjust and add change log entries
carmenbianca Oct 17, 2023
5cfce12
Improve Snippet section
carmenbianca Oct 24, 2023
26018ff
Add 'Contributors to project' as example
carmenbianca Oct 24, 2023
19aa3a1
Add REUSE.toml
carmenbianca Jan 4, 2024
363300a
Ignore COPYING and LICENSE
carmenbianca Jan 4, 2024
f1fffdb
Remove unneeded capital letter
carmenbianca Jan 4, 2024
ffadfd5
Add extra example
carmenbianca Feb 2, 2024
327414a
Clarify override of `.license` files
carmenbianca Feb 2, 2024
27f1b16
Reword comment headers to correctly use MUST
carmenbianca Feb 2, 2024
f5cb72d
Remove a superfluous text now that snippets exist
carmenbianca Feb 2, 2024
a5675b1
Added hyperlink to Format of Copyright Notices section
carmenbianca Feb 2, 2024
0132b66
Move ignore block to own section
carmenbianca Feb 2, 2024
f7035cb
Improve the wording for the precedence algorithms
carmenbianca Feb 2, 2024
541c026
Add a missing word
carmenbianca Feb 29, 2024
8a45ad4
Make copyright and licensing keys optional in toml
carmenbianca Mar 1, 2024
dd8acc2
Clarify glob matches
carmenbianca Mar 1, 2024
0dc31da
REUSE.toml and DEP5 are mutually exclusive
carmenbianca Mar 1, 2024
895e3a9
Do not match base name
carmenbianca Mar 1, 2024
c239896
Backticks around REUSE.toml
carmenbianca Mar 1, 2024
3e840f7
Reword path key
carmenbianca Mar 1, 2024
8869ee1
Rename toml precedence type to override
carmenbianca Mar 1, 2024
3fd4eec
COPYING and LICENSE can take file extensions
carmenbianca Apr 27, 2024
e6af184
Update change log
carmenbianca Apr 27, 2024
ce294f2
Small fixes
carmenbianca Apr 27, 2024
ce8b980
Remove empty lines in change log
carmenbianca Apr 27, 2024
1952f88
Make snippets and ignore block sections subsections of comment header
carmenbianca Apr 27, 2024
25e6376
Improve DEP5 example to match REUSE.toml example
carmenbianca Apr 27, 2024
88b37eb
Add 'comprehensive' goal to introduction blurb
carmenbianca Apr 27, 2024
00e6295
More accurate description of glob matching
carmenbianca Apr 27, 2024
70995dd
Add unreleased section to change log
carmenbianca Apr 28, 2024
ce8588d
Move deprecation notice to its own section in change log
carmenbianca Apr 28, 2024
b0ee22a
Clarify COPYING and LICENSE inclusion
carmenbianca Apr 28, 2024
dc41318
Specify that non-license files cannot be in LICENSES/
carmenbianca Apr 28, 2024
ce4c36a
Replace NGO with Organisation
carmenbianca Apr 28, 2024
16f0b6e
Easier language for Snippets
carmenbianca Apr 28, 2024
7eefa3c
Recommend comment header above all others
carmenbianca Apr 28, 2024
21dd034
Allow user to include other keys and tables in TOML
carmenbianca Apr 28, 2024
9496bdd
Be more explicit about path separators
carmenbianca Apr 28, 2024
1a36bd0
Be more explicit about DEP5 deprecation
carmenbianca Apr 28, 2024
2be6315
Fix John's e-mail
carmenbianca Apr 28, 2024
2f73815
Simplify globbing
carmenbianca Apr 28, 2024
3f8ea8f
Reduce spacing between list elements
carmenbianca Apr 28, 2024
4e15864
Replace Copyright and Licensing Information with Licensing Information
carmenbianca May 21, 2024
738c41b
Add clearer (but tautological) information
carmenbianca May 21, 2024
5e6e482
Define TOML in spec
carmenbianca May 21, 2024
7bddcad
More explicitly state that REUSE.toml only covers its own directory
carmenbianca May 21, 2024
72aa8a8
Explicitly mention `.license` files
carmenbianca May 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@ following sections:

The versions follow [semantic versioning](https://semver.org).

## Unreleased - YYYY-MM-DD

### Changed
### Deprecated
### Removed
### Fixed
### Security
### Added

## 3.1 - 2023-06-21
## 3.2 - YYYY-MM-DD
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved

### Added

Expand Down Expand Up @@ -59,7 +50,7 @@ The versions follow [semantic versioning](https://semver.org).

- URLs to currently applicable SPDX specification. (#49)

- Define current order or precedence. (#131)
- Define an order or precedence. (formerly #131, overhauled in #133)

### Changed

Expand All @@ -72,6 +63,12 @@ The versions follow [semantic versioning](https://semver.org).

- Minor typos and grammar mistakes. Thanks @jlovejoy and @Jayman2000!

- Improved definition of Copyright Notices. (#133)

## 3.1 - 2023-06-21 [YANKED]

This version was yanked soon after release after a new definition of the order
of precedence broke compatibility.

## 3.0 - 2019-08-07

Expand Down
120 changes: 67 additions & 53 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# SPDX-FileCopyrightText: 2019 Free Software Foundation Europe e.V.
# SPDX-License-Identifier: CC-BY-SA-4.0

title: "REUSE Specification – Version 3.1"
title: "REUSE Specification – Version 3.2"
---

This specification defines a standardized method for declaring copyright and
This specification defines a standardised method for declaring copyright and
licensing for software projects. The goal of the specification is to have
unambiguous, human- and machine-readable copyright and licensing information for
each individual file in a project. Ideally this information is embedded into
Expand Down Expand Up @@ -35,6 +35,9 @@ These are the definitions for some of the terms used in this specification:
copyright holders of a file or work, and describes under which licenses the
file or work is made available.

- Copyright Notice --- a line of text that conveys copyright of a copyright
holder.
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved

- Covered File --- any file in a Project, except for
- The License Files.
- The files belonging to the Project's version control system (example:
Expand All @@ -54,6 +57,9 @@ These are the definitions for some of the terms used in this specification:

- Commentable File --- a plain text file that can contain comments.

- Snippet --- a portion of text in a Commentable File to which different
Copyright and Licensing Information applies.

- Uncommentable File --- either a plain text file that cannot contain comments
or a file that is not a plain text file.

Expand Down Expand Up @@ -95,16 +101,17 @@ Everything that applies to licenses in this section also applies to license
exceptions, with the exception that it is NOT possible to have a license
exception that does not exist in the SPDX License List.

For avoidance of doubt, in practice this means that for every license and exception
that is part of any SPDX License Expression in any Copyright and Licensing Information
associated with any Covered File, there MUST exist a License File as defined in this section.
For avoidance of doubt, in practice this means that for every license and
exception that is part of any SPDX License Expression in any Copyright and
Licensing Information associated with any Covered File, there MUST exist a
License File as defined in this section.

## Copyright and Licensing Information

Each Covered File MUST have Copyright and Licensing Information associated with
it. There are two ways to associate Copyright and Licensing Information with a
file. In addition, there is a way to associate Copyright and Licensing
Information with a snippet.
Information with a Snippet.

### Comment headers

Expand All @@ -113,21 +120,16 @@ contain comments at the top of the file (comment header) that declare that
file's Copyright and Licensing Information.

For Uncommentable Files, the comment header that declares the file's Copyright
and Licensing Information SHOULD be in an adjacent UTF-8 encoded text file of the same
and Licensing Information MUST be in an adjacent UTF-8 encoded text file of the same
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved
name with the additional extension `.license` (example: `cat.jpg.license` if the
original file is `cat.jpg`).

`.license` files MAY be used with Commentable Files, but it is still RECOMMENDED
that comment headers be put inside Commentable Files.

The comment header MUST contain one or more `SPDX-FileCopyrightText` tags, and one or
more `SPDX-License-Identifier` tags. A tag is followed by a colon, followed by
a text value, and terminated by a newline.

The `SPDX-FileCopyrightText` tag MUST be followed by a copyright notice.

Instead of the `SPDX-FileCopyrightText` tag, the symbol `©`, or the word `Copyright` MAY
be used, in which case a colon is not needed.
The comment header MUST contain one or more Copyright Notices and one or more
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved
`SPDX-License-Identifier` tag-value pairs. A tag is followed by a colon,
followed by a text value, and terminated by a newline.

The `SPDX-License-Identifier` tag MUST be followed by a valid SPDX License
Expression describing the licensing of the file (example:
Expand All @@ -139,17 +141,17 @@ An example of a comment header:

```
# SPDX-FileCopyrightText: 2016, 2018-2019 Jane Doe <[email protected]>
# SPDX-FileCopyrightText: 2019 Example Company
# SPDX-FileCopyrightText: 2019 Example NGO
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved
#
# SPDX-License-Identifier: GPL-3.0-or-later
```

carmenbianca marked this conversation as resolved.
Show resolved Hide resolved
If these tags are additionally used in the file without describing the file's
actual license or copyright but for example as part of an output command or
documentation, these occurrences MAY be put between two comments:
`REUSE-IgnoreStart` and `REUSE-IgnoreEnd`. The REUSE Tool then ignores all tags
within. This technique MUST NOT be used to ignore valid tags for licensing or
copyright.
actual license or copyright (for example: as part of an output command or
documentation), these occurrences SHOULD be put between two comments:
`REUSE-IgnoreStart` and `REUSE-IgnoreEnd`. The REUSE Tool then ignores all
Copyright and Licensing Information between these comments. This technique MUST
NOT be used to ignore valid Copyright and Licensing Information.

An example for an ignored block:

Expand All @@ -164,35 +166,31 @@ echo "SPDX-License-Identifier: MIT" > file.txt
# REUSE-IgnoreEnd
```

### In-line snippet comments
### In-line Snippet comments

If a copyright and/or licensing info is to apply only to a certain snippet
instead of the whole file, SPDX snippet tags SHOULD be used (as defined in [SPDX
Specification, Annex H](https://spdx.github.io/spdx-spec/v2.3/file-tags/#h3-snippet-tags-format)).
If some Copyright and Licensing Information inside of a Commentable File is to
apply only to a certain Snippet instead of the whole file, SPDX snippet tags
MUST be used for that Snippet (as defined in [SPDX Specification, Annex
H](https://spdx.github.io/spdx-spec/v2.3/file-tags/#h3-snippet-tags-format)).
This means that Copyright Notices inside of Snippets MUST be prefixed with
`SPDX-SnippetCopyrightText`.
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved

Such an annotated snippet block MUST start with `SPDX-SnippetBegin` to mark its
beginning and end with `SPDX-SnippetEnd` to mark the snippet's end.
Like with comment headers, the SPDX snippet tags SHOULD be commented.

Do note that SPDX snippet tags MUST start with `SPDX-Snippet`, meaning that the
correct copyright notice in a snippet is `SPDX-SnippetCopyrightText`.
A Snippet SHOULD contain both a Copyright Notice and an SPDX License Expression.

Example:

```
# SPDX-SnippetBegin
# SPDX-License-Identifier: MIT
# SPDX-SnippetCopyrightText: 2022 Jane Doe <[email protected]>
# SPDX-License-Identifier: MIT

{$snippet_code_goes_here}
print("Hello, world!")

# SPDX-SnippetEnd
```

Snippets may nest, and this is denoted by having
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved
`SPDX-SnippetBegin`/`SPDX-SnippetEnd` pairs within other pairs, in the same way
that parentheses nest in mathematical expressions. In the case of nested
snippets, the SPDX file tags are considered to apply to the inner-most snippet.

### DEP5

Alternatively, Copyright and Licensing Information MAY be associated with a
Expand All @@ -206,7 +204,8 @@ root of the Project (i.e. `.reuse/dep5`).
The `License` tag MUST be followed by a valid SPDX License Expression describing
the licensing of the associated files.

The `Copyright` tag MUST be followed by a copyright notice.
The `Copyright` tag MUST be followed by a Copyright Notice. The prefix of the
Copyright Notice MAY be omitted.

An example of a DEP5 file:

Expand All @@ -223,41 +222,56 @@ License: GPL-3.0-or-later

## Order of precedence

Copyright and Licensing Information is considered according to the
following order of precedence:
If a Commentable File contains Copyright and Licensing Information but also has
an adjacent `.license` file, then the Copyright and Licensing Information
defined in the `.license` file takes precedence, and the Commentable File's
contents are ignored.

Copyright and Licensing Information defined in `.reuse/dep5` is aggregated with
the Copyright and Licensing Information found in the Covered Files or in their
adjacent `.license` files. For clarity, this means that if the SPDX License
Expressions in a file's comment header and in the section for that file in
`.reuse/dep5` do not agree with each other, then both SPDX License Expressions
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved
will apply to the file.

1. Information defined in the `.license` file.
2. Information defined in the Commentable File.
3. Information defined in `.reuse/dep5`.
## Format of Copyright Notices

There is no merging of information from different sources. Only the
source with the highest precedence is considered.
A Copyright Notice MUST start with a tag, word or symbol (collectively:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, we can be bold enough to make it stricter and deprecate all Copyright Notices that do not start with the appropriate SPDX tag.

Allowing for other formats was a temporary workaround that made sense to lessen the barrier for wider adoption, when REUSE was still new and we were inventing things that did not exist yet. But with SPDX File Tags (and SPDX Snippet Tags) now being a thing in an ISO standard, all we’re doing here is encouraging people to ignore part of the SPDX ISO standard.

Even within REUSE itself it causes inconsistency:

  • dep5 requires a Copyright tag, and so do we
  • reuse.yaml I very much imagine cannot work without relying on a tag
  • the in-line Snippets section explicitly says that SPDX Snippet Tags have to be used (makes sense, since the whole thing is covered within the SPDX spec now)
  • it is only the per-file copyright notice where we still allow a more lax approach

prefixes) from the following list:

## Format of copyright notices
- `SPDX-FileCopyrightText` (or `SPDX-SnippetCopyrightText` in Snippets)
- Copyright
- ©

A copyright notice MUST be prefixed by a tag, symbol or word denoting a
copyright notice as described in this specification.
It is RECOMMENDED to use the `SPDX-FileCopyrightText` tag. You MAY add '(C)',
'(c)' or '©' after the prefix.

The copyright notice MUST contain the name of the copyright holder. The
A Copyright Notice MUST be terminated by a newline.

The Copyright Notice MUST contain the name of the copyright holder. The
copyright notice SHOULD contain the year of publication and the contact address
of the copyright holder. The order of these items SHOULD be: year, name, contact
address.

The year of publication MAY be a single year, multiple years, or a span of
years.

The copyright holder MAY be an individual, list of individuals, group, legal
entity, or any other descriptor by which one can easily identify the
copyright holder(s).
The copyright holder SHOULD be an individual, list of individuals, group, legal
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved
entity, or any other descriptor by which one can easily identify the copyright
holder(s).

Any contact address SHOULD be in between angle brackets.

Examples of valid copyright notices:
You MAY add any further information to the Copyright Notice.

Examples of valid Copyright Notices:

```
SPDX-FileCopyrightText: 2019 Jane Doe <[email protected]>
SPDX-FileCopyrightText: © 2019 John Doe <[email protected]>
SPDX-FileCopyrightText: Contributors to Example Project <https://project.example.com>
SPDX-SnippetCopyrightText: (C) Example Cooperative <[email protected]>
© Example Corporation <https://corp.example.com>
Copyright 2016, 2018-2019 Joe Anybody
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved
Copyright (c) Alice
Copyright (c) Alice, some rights reserved
carmenbianca marked this conversation as resolved.
Show resolved Hide resolved
```