From 10edaaa7f11b84156264f74d803375a982805e30 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 21 Nov 2024 15:55:06 +0100 Subject: [PATCH] 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. --- .github/workflows/build_docs.yaml | 3 +- .reuse/dep5 | 176 -------------- REUSE.toml | 230 ++++++++++++++++++ .../mcu-board-support/LICENSES/Apache-2.0.txt | 1 - .../LICENSES/GPL-3.0-only.txt | 1 - .../LicenseRef-Slint-Royalty-free-2.0.md | 1 - .../LICENSES/LicenseRef-Slint-Software-3.0.md | 1 - examples/mcu-board-support/LICENSES/MIT.txt | 1 - xtask/src/reuse_compliance_check.rs | 6 +- 9 files changed, 235 insertions(+), 185 deletions(-) delete mode 100644 .reuse/dep5 create mode 100644 REUSE.toml delete mode 120000 examples/mcu-board-support/LICENSES/Apache-2.0.txt delete mode 120000 examples/mcu-board-support/LICENSES/GPL-3.0-only.txt delete mode 120000 examples/mcu-board-support/LICENSES/LicenseRef-Slint-Royalty-free-2.0.md delete mode 120000 examples/mcu-board-support/LICENSES/LicenseRef-Slint-Software-3.0.md delete mode 120000 examples/mcu-board-support/LICENSES/MIT.txt diff --git a/.github/workflows/build_docs.yaml b/.github/workflows/build_docs.yaml index 42cc0a108..cea2c2f49 100644 --- a/.github/workflows/build_docs.yaml +++ b/.github/workflows/build_docs.yaml @@ -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 diff --git a/.reuse/dep5 b/.reuse/dep5 deleted file mode 100644 index 5c26d6d78..000000000 --- a/.reuse/dep5 +++ /dev/null @@ -1,176 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: slint -Upstream-Contact: Slint Developers -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 -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 -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 -License: MIT - -Files: api/cpp/tests/redpixel.png -Copyright: Copyright © SixtyFPS GmbH -License: MIT - -Files: examples/*/LC_MESSAGES/*.mo examples/*/sdkconfig* demos/*/LC_MESSAGES/*.mo demos/*/sdkconfig* -Copyright: Copyright © SixtyFPS GmbH -License: MIT - -Files: .github/issue_template.md .github/pull_request_template.md -Copyright: Copyright © SixtyFPS GmbH -License: MIT - -Files: docs/src/utils/_templates/*.md -Copyright: Copyright © SixtyFPS GmbH -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 -License: MIT - -Files: api/*/*.json -Copyright: Copyright © SixtyFPS GmbH -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 -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 -License: CC-BY-4.0 - -Files: demos/printerdemo/ui/images/*.svg -Copyright: CoreyGinnivan -License: Unlicense - -Files: examples/iot-dashboard/images/*.svg examples/iot-dashboard/images/*.png -Copyright: Uwe Rathmann -License: LicenseRef-qskinny - -Files: editors/sublime/LSP.sublime-settings -Copyright: Copyright © SixtyFPS GmbH -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 -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 -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 -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 -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 -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 -License: CC-BY-4.0 - -Files: examples/carousel/fonts/*.ttf -Copyright: Roboto -License: Apache-2.0 - -Files: examples/*/esp-idf/*/partitions.csv examples/*/esp-idf/partitions.csv demos/*/esp-idf/partitions.csv -Copyright: Copyright © SixtyFPS GmbH -License: MIT - -Files: internal/compiler/widgets/fluent/_*.svg -Copyright: Copyright © Microsoft Corporation -License: MIT - -Files: internal/compiler/widgets/material/_*.svg -Copyright: Material Icons -License: Apache-2.0 - -Files: internal/compiler/widgets/cupertino/_*.svg -Copyright: Material Icons -License: Apache-2.0 - -Files: internal/compiler/widgets/qt/_*.svg -Copyright: Material Icons -License: Apache-2.0 - -Files: examples/todo-mvc/assets/*.svg -Copyright: Material Icons -License: Apache-2.0 - -Files: internal/compiler/widgets/cosmic/_*.svg -Copyright: "Cosmic Icons" by System76 -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 -License: MIT - -Files: demos/energy-monitor/ui/assets/spyrosoft-logo.svg -Copyright: Copyright © Spyrosoft Solutions GmbH -License: CC-BY-4.0 - -Files: demos/printerdemo/zephyr/VERSION -Copyright: Copyright © SixtyFPS GmbH -License: MIT - -Files: examples/dial/images/*.png -Copyright: Copyright © SixtyFPS GmbH -License: MIT - -Files: examples/sprite-sheet/images/*.png -Copyright: Copyright © SixtyFPS GmbH -License: MIT - -Files: examples/orbit-animation/images/*.png examples/orbit-animation/images/*.svg -Copyright: Copyright © SixtyFPS GmbH -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 -License: MIT - -Files: examples/fancy-switches/images/*.png examples/fancy-switches/images/*.svg -Copyright: Copyright © SixtyFPS GmbH -License: MIT - -Files: demos/weather-demo/index.html -Copyright: Copyright © SixtyFPS GmbH -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 -License: MIT - -Files: demos/weather-demo/ui/assets/icons/*.svg -Copyright: Fontawesome project -License: CC-BY-4.0 - -Files: demos/weather-demo/ui/assets/weathericons-font.ttf -Copyright: Weather Icons -License: OFL-1.1 - -Files: demos/weather-demo/android-res/*/ic_launcher.png -Copyright: Copyright © Felgo GmbH -License: CC-BY-ND-4.0 - -Files: demos/weather-demo/ui/assets/felgo-logo.svg -Copyright: Copyright © Felgo GmbH -License: CC-BY-ND-4.0 diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 000000000..5bbf027c1 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,230 @@ +version = 1 +SPDX-PackageName = "slint" +SPDX-PackageSupplier = "Slint Developers " +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 " +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 " +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 " +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 " +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 " +SPDX-License-Identifier = "CC-BY-4.0" + +[[annotations]] +path = "demos/printerdemo/ui/images/**.svg" +precedence = "aggregate" +SPDX-FileCopyrightText = "CoreyGinnivan " +SPDX-License-Identifier = "Unlicense" + +[[annotations]] +path = [ + "examples/iot-dashboard/images/**.svg", + "examples/iot-dashboard/images/**.png", +] +precedence = "aggregate" +SPDX-FileCopyrightText = "Uwe Rathmann " +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 " +SPDX-License-Identifier = "CC-BY-4.0" + +[[annotations]] +path = "examples/carousel/fonts/**.ttf" +precedence = "aggregate" +SPDX-FileCopyrightText = "Roboto " +SPDX-License-Identifier = "Apache-2.0" + +[[annotations]] +path = "internal/compiler/widgets/fluent/_**.svg" +precedence = "aggregate" +SPDX-FileCopyrightText = "Copyright © Microsoft Corporation " +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 " +SPDX-License-Identifier = "Apache-2.0" + +[[annotations]] +path = "internal/compiler/widgets/cosmic/_**.svg" +precedence = "aggregate" +SPDX-FileCopyrightText = "\"Cosmic Icons\" by System76 " +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 " +SPDX-License-Identifier = "CC-BY-4.0" + +[[annotations]] +path = "demos/weather-demo/ui/assets/weathericons-font.ttf" +precedence = "aggregate" +SPDX-FileCopyrightText = "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 " +SPDX-License-Identifier = "CC-BY-ND-4.0" diff --git a/examples/mcu-board-support/LICENSES/Apache-2.0.txt b/examples/mcu-board-support/LICENSES/Apache-2.0.txt deleted file mode 120000 index 85e6c3285..000000000 --- a/examples/mcu-board-support/LICENSES/Apache-2.0.txt +++ /dev/null @@ -1 +0,0 @@ -../../../LICENSES/Apache-2.0.txt \ No newline at end of file diff --git a/examples/mcu-board-support/LICENSES/GPL-3.0-only.txt b/examples/mcu-board-support/LICENSES/GPL-3.0-only.txt deleted file mode 120000 index 33fa08595..000000000 --- a/examples/mcu-board-support/LICENSES/GPL-3.0-only.txt +++ /dev/null @@ -1 +0,0 @@ -../../../LICENSES/GPL-3.0-only.txt \ No newline at end of file diff --git a/examples/mcu-board-support/LICENSES/LicenseRef-Slint-Royalty-free-2.0.md b/examples/mcu-board-support/LICENSES/LicenseRef-Slint-Royalty-free-2.0.md deleted file mode 120000 index 8a9df1ca5..000000000 --- a/examples/mcu-board-support/LICENSES/LicenseRef-Slint-Royalty-free-2.0.md +++ /dev/null @@ -1 +0,0 @@ -../../../LICENSES/LicenseRef-Slint-Royalty-free-2.0.md \ No newline at end of file diff --git a/examples/mcu-board-support/LICENSES/LicenseRef-Slint-Software-3.0.md b/examples/mcu-board-support/LICENSES/LicenseRef-Slint-Software-3.0.md deleted file mode 120000 index fda05e95c..000000000 --- a/examples/mcu-board-support/LICENSES/LicenseRef-Slint-Software-3.0.md +++ /dev/null @@ -1 +0,0 @@ -../../../LICENSES/LicenseRef-Slint-Software-3.0.md \ No newline at end of file diff --git a/examples/mcu-board-support/LICENSES/MIT.txt b/examples/mcu-board-support/LICENSES/MIT.txt deleted file mode 120000 index 311c4dbf0..000000000 --- a/examples/mcu-board-support/LICENSES/MIT.txt +++ /dev/null @@ -1 +0,0 @@ -../../../LICENSES/MIT.txt \ No newline at end of file diff --git a/xtask/src/reuse_compliance_check.rs b/xtask/src/reuse_compliance_check.rs index 604470421..1e0d5d75b 100644 --- a/xtask/src/reuse_compliance_check.rs +++ b/xtask/src/reuse_compliance_check.rs @@ -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()?;