reuse: Update to a newer reuse version

Update from reuse 2 as packaged by Ubuntu to reuse 5
from pypi.

This moves configuration from .reuse/dep5 into REUSE.toml.

Make sure to only have one entry per license with all
the file under that license in one place.

This does change some licenses in demos and examples from
our triple-license to MIT. I *think* those were meant to
be under MIT all along as all docs and examples are supposed
to be MIT.
This commit is contained in:
Tobias Hunger 2024-11-21 15:55:06 +01:00 committed by Tobias Hunger
parent 83ae918d76
commit 10edaaa7f1
9 changed files with 235 additions and 185 deletions

View file

@ -65,7 +65,8 @@ jobs:
tool_name: xtask license_header
level: error
fail_on_error: true
- run: sudo apt-get install reuse
- run: sudo apt-get install pipx
- run: pipx install reuse
- name: Check reuse compliance
run: cargo xtask check_reuse_compliance

View file

@ -1,176 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: slint
Upstream-Contact: Slint Developers <info@slint.dev>
Source: https://slint.dev/
Files: */slint-icon-*.svg */slint-icon-*.png */slint-icon-*.pdf */slint-logo-*.svg */slint-logo-*.png */slint-logo-*.pdf */MadeWithSlint-*.svg */MadeWithSlint-*.png */MadeWithSlint-*.pdf
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: CC-BY-ND-4.0
Files: .gitattributes .gitignore */.gitignore .dockerignore .vscode/* cspell.json rustfmt.toml .mailmap */.eslintrc.yml Cargo.lock */.npmignore biome.json package-lock.json docs/search/scraper-config.json pnpm-lock.yaml package.json
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: api/cpp/docs/*/*.html api/cpp/docs/*/*.css docs/*/*.css docs/*/*.html docs/*/book.toml docs/*/package.json
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: api/cpp/tests/redpixel.png
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: examples/*/LC_MESSAGES/*.mo examples/*/sdkconfig* demos/*/LC_MESSAGES/*.mo demos/*/sdkconfig*
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: .github/issue_template.md .github/pull_request_template.md
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: docs/src/utils/_templates/*.md
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: docs/src/assets/*.svg docs/src/assets/*.webp docs/src/assets/getting-started/*.webp docs/playwright.config.ts docs/*.mjs docs/*.json docs/public/*.svg docs/src/misc/*.json docs/src/misc/*.jsonc docs/src/content/docs/reference/elements/*.png
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: api/*/*.json
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: examples/*.json examples/*/README examples/*/README.txt examples/cpp/qt_viewer/interface.ui demos/*.json demos/*/README
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: examples/memory/icons/*.svg examples/memory/icons/*.png
Copyright: Fontawesome project <https://fontawesome.com/license/free>
License: CC-BY-4.0
Files: demos/printerdemo/ui/images/*.svg
Copyright: CoreyGinnivan <https://github.com/CoreyGinnivan/system-uicons>
License: Unlicense
Files: examples/iot-dashboard/images/*.svg examples/iot-dashboard/images/*.png
Copyright: Uwe Rathmann <https://github.com/uwerat/qskinny/tree/master/examples/iotdashboard/images>
License: LicenseRef-qskinny
Files: editors/sublime/LSP.sublime-settings
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: tools/slintpad/*.html tools/slintpad/styles/*.css tools/slintpad/*.json
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: editors/vscode/*.json editors/vscode/css/*.css editors/tree-sitter-slint/corpus/*.txt editors/vscode/tests/grammar/*.slint
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: tests/screenshots/**/*.png
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: api/node/__test__/resources/*.png
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: examples/carousel/icons/*.svg
Copyright: Material Icons <https://fonts.google.com/icons?selected=Material+Iconse>
License: Apache-2.0
Files: tools/lsp/ui/assets/chevron-down.svg tools/lsp/ui/assets/inspect.svg tools/lsp/ui/assets/layout-sidebar*.svg tools/lsp/ui/assets/sync.svg
Copyright: Codicon Icons <https://github.com/microsoft/vscode-codicons/>
License: CC-BY-4.0
Files: examples/carousel/fonts/*.ttf
Copyright: Roboto <https://fonts.google.com/specimen/Roboto/about>
License: Apache-2.0
Files: examples/*/esp-idf/*/partitions.csv examples/*/esp-idf/partitions.csv demos/*/esp-idf/partitions.csv
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: internal/compiler/widgets/fluent/_*.svg
Copyright: Copyright © Microsoft Corporation <https://github.com/microsoft/fluentui-system-icons/blob/main/LICENSE>
License: MIT
Files: internal/compiler/widgets/material/_*.svg
Copyright: Material Icons <https://github.com/material-icons/material-icons/blob/master/LICENSE>
License: Apache-2.0
Files: internal/compiler/widgets/cupertino/_*.svg
Copyright: Material Icons <https://github.com/material-icons/material-icons/blob/master/LICENSE>
License: Apache-2.0
Files: internal/compiler/widgets/qt/_*.svg
Copyright: Material Icons <https://github.com/material-icons/material-icons/blob/master/LICENSE>
License: Apache-2.0
Files: examples/todo-mvc/assets/*.svg
Copyright: Material Icons <https://github.com/material-icons/material-icons/blob/master/LICENSE>
License: Apache-2.0
Files: internal/compiler/widgets/cosmic/_*.svg
Copyright: "Cosmic Icons" by System76 <https://github.com/pop-os/cosmic-icons>
License: CC-BY-SA-4.0
Files: internal/backends/linuxkms/mouse-pointer.svg examples/virtual_keyboard/ui/assets/*.svg examples/ffmpeg/pause.svg examples/ffmpeg/play.svg examples/gstreamer-player/*.svg examples/uefi-demo/resource/cursor.png
Copyright: Copyright © 2018 Dave Gandy & Fork Awesome
License: MIT
Files: demos/energy-monitor/ui/assets/sunny.svg demos/energy-monitor/ui/assets/settings.svg demos/energy-monitor/ui/assets/information.svg demos/energy-monitor/ui/assets/cloudy.svg demos/energy-monitor/ui/assets/cloud.svg demos/energy-monitor/ui/assets/check.svg demos/energy-monitor/ui/assets/arrow-right.svg demos/energy-monitor/ui/assets/arrow-left.svg demos/energy-monitor/ui/assets/dashboard.svg
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: demos/energy-monitor/ui/assets/spyrosoft-logo.svg
Copyright: Copyright © Spyrosoft Solutions GmbH <office@spyro-soft.com>
License: CC-BY-4.0
Files: demos/printerdemo/zephyr/VERSION
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: examples/dial/images/*.png
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: examples/sprite-sheet/images/*.png
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: examples/orbit-animation/images/*.png examples/orbit-animation/images/*.svg
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: demos/home-automation/ui/images/*.png demos/home-automation/ui/images/*.svg demos/home-automation/ui/images/*.jpg
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: examples/fancy-switches/images/*.png examples/fancy-switches/images/*.svg
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: demos/weather-demo/index.html
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: demos/weather-demo/docs/*.png
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: MIT
Files: demos/weather-demo/ui/assets/icons/*.svg
Copyright: Fontawesome project <https://fontawesome.com/license/free>
License: CC-BY-4.0
Files: demos/weather-demo/ui/assets/weathericons-font.ttf
Copyright: Weather Icons <http://erikflowers.github.io/weather-icons/>
License: OFL-1.1
Files: demos/weather-demo/android-res/*/ic_launcher.png
Copyright: Copyright © Felgo GmbH <contact@felgo.com>
License: CC-BY-ND-4.0
Files: demos/weather-demo/ui/assets/felgo-logo.svg
Copyright: Copyright © Felgo GmbH <contact@felgo.com>
License: CC-BY-ND-4.0

230
REUSE.toml Normal file
View file

@ -0,0 +1,230 @@
version = 1
SPDX-PackageName = "slint"
SPDX-PackageSupplier = "Slint Developers <info@slint.dev>"
SPDX-PackageDownloadLocation = "https://slint.dev/"
[[annotations]]
path = [
"**/MadeWithSlint-**.pdf",
"**/MadeWithSlint-**.png",
"**/MadeWithSlint-**.svg",
"**/slint-icon-**.pdf",
"**/slint-icon-**.png",
"**/slint-icon-**.svg",
"**/slint-logo-**.pdf",
"**/slint-logo-**.png",
"**/slint-logo-**.svg",
"docs/src/content/docs/reference/elements/slint-logo.png",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Copyright © SixtyFPS GmbH <info@slint.dev>"
SPDX-License-Identifier = "CC-BY-ND-4.0"
[[annotations]]
path = [
"**/.eslintrc.yml",
"**/.gitignore",
"**/.npmignore",
".dockerignore",
".gitattributes",
".gitignore",
".mailmap",
".vscode/**",
"Cargo.lock",
"REUSE.toml",
"biome.json",
"cspell.json",
"docs/search/scraper-config.json",
"package.json",
"pnpm-lock.yaml",
"rustfmt.toml",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Copyright © SixtyFPS GmbH <info@slint.dev>"
SPDX-License-Identifier = "GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0"
[[annotations]]
path = [
".github/issue_template.md",
".github/pull_request_template.md",
"api/cpp/docs/**/**.css",
"api/cpp/docs/**/**.html",
"api/cpp/tests/redpixel.png",
"demos/**.json",
"demos/**/LC_MESSAGES/**.mo",
"demos/**/README",
"demos/**/esp-idf/partitions.csv",
"demos/**/sdkconfig**",
"demos/energy-monitor/ui/assets/arrow-left.svg",
"demos/energy-monitor/ui/assets/arrow-right.svg",
"demos/energy-monitor/ui/assets/check.svg",
"demos/energy-monitor/ui/assets/cloud.svg",
"demos/energy-monitor/ui/assets/cloudy.svg",
"demos/energy-monitor/ui/assets/dashboard.svg",
"demos/energy-monitor/ui/assets/information.svg",
"demos/energy-monitor/ui/assets/settings.svg",
"demos/energy-monitor/ui/assets/sunny.svg",
"demos/home-automation/ui/images/**.jpg",
"demos/home-automation/ui/images/**.png",
"demos/home-automation/ui/images/**.svg",
"demos/printerdemo/zephyr/VERSION",
"demos/weather-demo/docs/**.png",
"demos/weather-demo/index.html",
"docs/**.json",
"docs/**.mjs",
"docs/**/**.css",
"docs/**/**.html",
"docs/**/book.toml",
"docs/**/package.json",
"docs/playwright.config.ts",
"docs/public/**.svg",
"docs/src/assets/**.svg",
"docs/src/assets/**.webp",
"docs/src/assets/getting-started/**.webp",
"docs/src/content/docs/reference/elements/mini-banner.png",
"docs/src/misc/**.json",
"docs/src/misc/**.jsonc",
"docs/src/utils/_templates/**.md",
"examples/**.json",
"examples/**/LC_MESSAGES/**.mo",
"examples/**/README",
"examples/**/README.txt",
"examples/**/esp-idf/**/partitions.csv",
"examples/**/esp-idf/partitions.csv",
"examples/**/sdkconfig**",
"examples/cpp/qt_viewer/interface.ui",
"examples/dial/images/**.png",
"examples/fancy-switches/images/**.png",
"examples/fancy-switches/images/**.svg",
"examples/orbit-animation/images/**.png",
"examples/orbit-animation/images/**.svg",
"examples/sprite-sheet/images/**.png",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Copyright © SixtyFPS GmbH <info@slint.dev>"
SPDX-License-Identifier = "MIT"
[[annotations]]
path = [
"api/**/**.json",
"api/node/__test__/resources/**.png",
"editors/sublime/LSP.sublime-settings",
"editors/tree-sitter-slint/corpus/**.txt",
"editors/vscode/**.json",
"editors/vscode/css/**.css",
"editors/vscode/tests/grammar/**.slint",
"tests/screenshots/**/**.png",
"tools/slintpad/**.html",
"tools/slintpad/**.json",
"tools/slintpad/styles/**.css",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Copyright © SixtyFPS GmbH <info@slint.dev>"
SPDX-License-Identifier = "GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0"
[[annotations]]
path = [
"demos/weather-demo/ui/assets/icons/**.svg",
"examples/memory/icons/**.png",
"examples/memory/icons/**.svg",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Fontawesome project <https://fontawesome.com/license/free>"
SPDX-License-Identifier = "CC-BY-4.0"
[[annotations]]
path = "demos/printerdemo/ui/images/**.svg"
precedence = "aggregate"
SPDX-FileCopyrightText = "CoreyGinnivan <https://github.com/CoreyGinnivan/system-uicons>"
SPDX-License-Identifier = "Unlicense"
[[annotations]]
path = [
"examples/iot-dashboard/images/**.svg",
"examples/iot-dashboard/images/**.png",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Uwe Rathmann <https://github.com/uwerat/qskinny/tree/master/examples/iotdashboard/images>"
SPDX-License-Identifier = "LicenseRef-qskinny"
[[annotations]]
path = [
"tools/lsp/ui/assets/chevron-down.svg",
"tools/lsp/ui/assets/inspect.svg",
"tools/lsp/ui/assets/layout-sidebar**.svg",
"tools/lsp/ui/assets/sync.svg",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Codicon Icons <https://github.com/microsoft/vscode-codicons/>"
SPDX-License-Identifier = "CC-BY-4.0"
[[annotations]]
path = "examples/carousel/fonts/**.ttf"
precedence = "aggregate"
SPDX-FileCopyrightText = "Roboto <https://fonts.google.com/specimen/Roboto/about>"
SPDX-License-Identifier = "Apache-2.0"
[[annotations]]
path = "internal/compiler/widgets/fluent/_**.svg"
precedence = "aggregate"
SPDX-FileCopyrightText = "Copyright © Microsoft Corporation <https://github.com/microsoft/fluentui-system-icons/blob/main/LICENSE>"
SPDX-License-Identifier = "MIT"
[[annotations]]
path = [
"internal/compiler/widgets/material/_**.svg",
"examples/carousel/icons/**.svg",
"internal/compiler/widgets/cupertino/_**.svg",
"internal/compiler/widgets/qt/_**.svg",
"examples/todo-mvc/assets/**.svg",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Material Icons <https://github.com/material-icons/material-icons/blob/master/LICENSE>"
SPDX-License-Identifier = "Apache-2.0"
[[annotations]]
path = "internal/compiler/widgets/cosmic/_**.svg"
precedence = "aggregate"
SPDX-FileCopyrightText = "\"Cosmic Icons\" by System76 <https://github.com/pop-os/cosmic-icons>"
SPDX-License-Identifier = "CC-BY-SA-4.0"
[[annotations]]
path = [
"internal/backends/linuxkms/mouse-pointer.svg",
"examples/virtual_keyboard/ui/assets/**.svg",
"examples/ffmpeg/pause.svg",
"examples/ffmpeg/play.svg",
"examples/gstreamer-player/**.svg",
"examples/uefi-demo/resource/cursor.png",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Copyright © 2018 Dave Gandy & Fork Awesome"
SPDX-License-Identifier = "MIT"
[[annotations]]
path = "demos/energy-monitor/ui/assets/spyrosoft-logo.svg"
precedence = "aggregate"
SPDX-FileCopyrightText = "Copyright © Spyrosoft Solutions GmbH <office@spyro-soft.com>"
SPDX-License-Identifier = "CC-BY-4.0"
[[annotations]]
path = "demos/weather-demo/ui/assets/weathericons-font.ttf"
precedence = "aggregate"
SPDX-FileCopyrightText = "Weather Icons <http://erikflowers.github.io/weather-icons/>"
SPDX-License-Identifier = "OFL-1.1"
[[annotations]]
path = [
"demos/weather-demo/android-res/**/ic_launcher.png",
"demos/weather-demo/ui/assets/felgo-logo.svg",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Copyright © Felgo GmbH <contact@felgo.com>"
SPDX-License-Identifier = "CC-BY-ND-4.0"

View file

@ -1 +0,0 @@
../../../LICENSES/Apache-2.0.txt

View file

@ -1 +0,0 @@
../../../LICENSES/GPL-3.0-only.txt

View file

@ -1 +0,0 @@
../../../LICENSES/LicenseRef-Slint-Royalty-free-2.0.md

View file

@ -1 +0,0 @@
../../../LICENSES/LicenseRef-Slint-Software-3.0.md

View file

@ -1 +0,0 @@
../../../LICENSES/MIT.txt

View file

@ -357,10 +357,10 @@ impl ReuseComplianceCheck {
pub fn check_reuse_compliance(&self) -> Result<()> {
if !std::env::current_dir()
.context("Can not access current work directory")?
.join(".reuse")
.is_dir()
.join("REUSE.toml")
.is_file()
{
anyhow::bail!("No .reuse directory found in current directory");
anyhow::bail!("No REUSE.toml file found in current directory");
}
let sh = Shell::new()?;