Skip to content

Commit b915d9c

Browse files
authored
Merge pull request #264 from datalad/bf-LICENSE
doc: declare licensing via REUSE + DEP-3 patch headers
2 parents 14f90a9 + 0b91cac commit b915d9c

7 files changed

Lines changed: 744 additions & 0 deletions

File tree

.github/workflows/reuse.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-FileCopyrightText: 2020-2026 DataLad Team <team@datalad.org>
2+
# SPDX-License-Identifier: MIT
3+
name: REUSE Compliance
4+
5+
on:
6+
pull_request:
7+
paths:
8+
- 'REUSE.toml'
9+
- 'LICENSES/**'
10+
- 'patches/**'
11+
- '**/*.py'
12+
- '**/*.sh'
13+
- '**/*.yaml'
14+
- '**/*.yml'
15+
- '**/*.md'
16+
- '.github/workflows/reuse.yaml'
17+
push:
18+
branches:
19+
- master
20+
21+
jobs:
22+
reuse:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: REUSE compliance check
27+
uses: fsfe/reuse-action@v5

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@
22
__pycache__/
33
venv/
44
.npm
5+
6+
# Local build artifacts
7+
buildenv.sif
8+
.tox/
9+
.venv*/
10+
.cache/
11+
.mypy_cache/
12+
.ruff_cache/
13+
.pytest_cache/

LICENSES/AGPL-3.0-or-later.txt

Lines changed: 613 additions & 0 deletions
Large diffs are not rendered by default.

LICENSES/MIT.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
MIT License Copyright (c) <year> <copyright holders>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice (including the next
11+
paragraph) shall be included in all copies or substantial portions of the
12+
Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
17+
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
19+
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,25 @@ It is recommended that patches be given names of the form
6363
`YYYYMMDD-{commit}-{brief_description}.patch`, where `{commit}` is the short
6464
hash of the git-annex source code commit against which the patch was made.
6565

66+
New patches should carry a
67+
[DEP-3](https://dep-team.pages.debian.net/deps/dep3/) header at the top of
68+
the file (`git apply` ignores the preamble), including SPDX tags so the
69+
patch remains [REUSE](https://reuse.software/) compliant on its own:
70+
71+
```
72+
Description: <one-line summary>
73+
<if needed - longer explanation: why this patch exists in datalad/git-annex,
74+
what it works around, and who benefits>
75+
Origin: vendor, https://github.com/datalad/git-annex/commit/<sha>
76+
Author: Your Name <you@example.org>
77+
Forwarded: not-needed # or: <URL of upstream submission>
78+
Last-Update: YYYY-MM-DD
79+
SPDX-FileCopyrightText: YEAR Your Name <you@example.org>
80+
SPDX-License-Identifier: AGPL-3.0-or-later
81+
---
82+
diff --git a/...
83+
```
84+
6685
Once a patch PR is merged into `master`, the patch will be applied to all
6786
git-annex builds on all platforms, including release builds. Patches in
6887
`patches/` are applied in lexicographic filename order. If a patch in
@@ -71,6 +90,27 @@ the file from `patches/`, and the patch will be skipped. If a patch fails to
7190
apply, an issue will be automatically created in this repository, and the build
7291
will fail.
7392

93+
## Licensing
94+
95+
Files in the `master` branch (this branch) are
96+
[REUSE](https://reuse.software/) compliant — see [`REUSE.toml`](./REUSE.toml)
97+
and [`LICENSES/`](./LICENSES/) for the authoritative, machine-readable
98+
copyright and license information. In short:
99+
100+
- Repository scaffolding (CI workflows, test drivers, docs, README) is
101+
licensed **MIT** © DataLad Team.
102+
- Files under [`patches/`](./patches/) modify upstream
103+
[git-annex](https://git-annex.branchable.com) source and are therefore
104+
licensed **AGPL-3.0-or-later**. Each patch carries a
105+
[DEP-3](https://dep-team.pages.debian.net/deps/dep3/) header documenting
106+
its description, origin, author, and upstream-forwarding status.
107+
108+
The
109+
[`upstream/master`](https://github.com/datalad/git-annex/tree/upstream/master)
110+
branch is an unmodified mirror of git-annex upstream and follows the
111+
licensing of that source tree (`AGPL-3.0-or-later` as a whole, with
112+
component-level licenses recorded in upstream's own `COPYRIGHT` file).
113+
74114
## Status
75115

76116
[![Update mirror](https://github.com/datalad/git-annex/actions/workflows/update-mirror.yml/badge.svg)](https://github.com/datalad/git-annex/actions/workflows/update-mirror.yml)

REUSE.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version = 1
2+
3+
# Default: DataLad scaffolding for CI / testing / distribution of git-annex.
4+
# Covers root files, GitHub workflows, test client drivers, and docs.
5+
[[annotations]]
6+
path = [
7+
"README.md",
8+
"noxfile.py",
9+
"setup.cfg",
10+
".gitignore",
11+
".pre-commit-config.yaml",
12+
".github/**",
13+
"clients/**",
14+
"docs/**",
15+
]
16+
precedence = "aggregate"
17+
SPDX-FileCopyrightText = "2020-2026 DataLad Team <team@datalad.org>"
18+
SPDX-License-Identifier = "MIT"
19+
20+
# Patches modify git-annex source. As derivative works of git-annex
21+
# (AGPL-3.0-or-later), the patch files inherit that license. Per-file
22+
# DEP-3 / SPDX headers inside individual *.patch files override this
23+
# block (precedence = "closest") to record the actual patch author.
24+
[[annotations]]
25+
path = "patches/**"
26+
precedence = "closest"
27+
SPDX-FileCopyrightText = "2020-2026 DataLad Team <team@datalad.org>"
28+
SPDX-License-Identifier = "AGPL-3.0-or-later"

patches/20240213-3475b09c3e-exclude-git.patch

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Description: Exclude datalad/git-annex CI scaffolding from Debian source package
2+
Origin: vendor, https://github.com/datalad/git-annex/commit/b4a7900e2b
3+
Author: John T. Wodder II <git@varonathe.org>
4+
Forwarded: not-needed
5+
Last-Update: 2024-02-16
6+
SPDX-FileCopyrightText: 2024 John T. Wodder II <git@varonathe.org>
7+
SPDX-License-Identifier: AGPL-3.0-or-later
8+
---
19
diff --git a/debian/source/options b/debian/source/options
210
new file mode 100644
311
index 0000000000..62612d7c71

0 commit comments

Comments
 (0)