diff --git a/cli/build/docs/readme/generate.py b/cli/build/docs/readme/generate.py index 2dfd75b7cf..a6ed290612 100644 --- a/cli/build/docs/readme/generate.py +++ b/cli/build/docs/readme/generate.py @@ -31,7 +31,11 @@ from utils.cache.yaml import load_yaml from utils.meta.identity import by_name, profile_url from utils.roles.deploy import role_has_stack from utils.roles.entity.name import entity_name -from utils.roles.mapping import ROLE_FILE_META_MAIN, ROLE_FILE_README +from utils.licensing.roles import OWN_LICENSE, declared +from utils.roles.mapping import ( + ROLE_FILE_META_MAIN, + ROLE_FILE_README, +) from utils.roles.meta_lookup import get_role_guide_companions from utils.roles.validation.invokable import _get_invokable_paths, _is_role_invokable from utils.software import SOFTWARE_REPOSITORY, deploy_image @@ -107,6 +111,29 @@ def _base_context(role_dir, role_name: str, app_name: str, *, invokable: bool) - ), "software_repository": SOFTWARE_REPOSITORY, "application_deploy_image": deploy_image(), + "application_license": _software_license(role_dir), + } + + +def _software_license(role_dir) -> dict | None: + """Return the licence of the software the role deploys, or None. + + The single source is ``meta/license.yml``; the README states it rather + than holding a second copy, because the licence of the deployed software + is a different fact from this repository's own licence that Credits names. + + Args: + role_dir: the role directory. + """ + entry = declared(role_dir) + if entry is None or not entry.spdx: + return None + return { + "spdx": entry.spdx, + "source": entry.url, + "commercial": entry.context.commercial, + "duties": entry.context.duties, + "is_own": entry.spdx == OWN_LICENSE, } diff --git a/docs/architecture/licensing.rst b/docs/architecture/licensing.rst new file mode 100644 index 0000000000..e7c2d0b921 --- /dev/null +++ b/docs/architecture/licensing.rst @@ -0,0 +1,19 @@ +Licence Context +=============== + +A role's licence and the licence of the software it deploys are two different +questions. This repository's licence governs its own code; the application a +role installs carries its own terms, and that is usually where a restriction +on commercial use actually sits. + +The page below answers the second question per role as a matrix of one column +per right, grouped by what the licence permits. Each role names its licence in +``meta//license.yml``; the rights of a named licence live once in +``meta/licenses.yml``, and the groupings are derived from them. A role that +declares nothing is listed as undetermined rather than left out, so a gap +never reads as permission. + +.. toctree:: + :maxdepth: 1 + + /generated/licensing diff --git a/meta/licenses.yml b/meta/licenses.yml new file mode 100644 index 0000000000..b3cb01abb5 --- /dev/null +++ b/meta/licenses.yml @@ -0,0 +1,602 @@ +--- +# Rights per licence, one entry per SPDX id. A role names an id in its +# meta/license.yml; field meanings and the AND/OR folding live in +# utils/licensing/rights.py. +# +# A LicenseRef- id belongs here only when it recurs or appears inside an +# expression; a one-off vendor EULA writes its rights inline in the role's +# meta/license.yml instead. + +MIT: + url: https://spdx.org/licenses/MIT.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +BSD-2-Clause: + url: https://spdx.org/licenses/BSD-2-Clause.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +BSD-3-Clause: + url: https://spdx.org/licenses/BSD-3-Clause.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +PostgreSQL: + url: https://spdx.org/licenses/PostgreSQL.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +OLDAP-2.8: + url: https://spdx.org/licenses/OLDAP-2.8.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +CC0-1.0: + url: https://spdx.org/licenses/CC0-1.0.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: false + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +Apache-2.0: + url: https://spdx.org/licenses/Apache-2.0.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: true + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +MPL-1.1: + url: https://spdx.org/licenses/MPL-1.1.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: false + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +MPL-2.0: + url: https://spdx.org/licenses/MPL-2.0.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: false + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +EPL-1.0: + url: https://spdx.org/licenses/EPL-1.0.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: false + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +LGPL-2.1-only: + url: https://spdx.org/licenses/LGPL-2.1-only.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +LGPL-2.1-or-later: + url: https://spdx.org/licenses/LGPL-2.1-or-later.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +LGPL-3.0-only: + url: https://spdx.org/licenses/LGPL-3.0-only.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +LGPL-3.0-or-later: + url: https://spdx.org/licenses/LGPL-3.0-or-later.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +GPL-2.0-only: + url: https://spdx.org/licenses/GPL-2.0-only.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +GPL-2.0-or-later: + url: https://spdx.org/licenses/GPL-2.0-or-later.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +GPL-3.0-only: + url: https://spdx.org/licenses/GPL-3.0-only.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +GPL-3.0-or-later: + url: https://spdx.org/licenses/GPL-3.0-or-later.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + +OSL-3.0: + url: https://spdx.org/licenses/OSL-3.0.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: false + disclose_source: true + network_use_disclose: true + same_license: true + liability: true + warranty: true + trademark_use: false + +EUPL-1.2: + url: https://spdx.org/licenses/EUPL-1.2.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: true + same_license: true + liability: true + warranty: true + trademark_use: false + +AGPL-3.0-only: + url: https://spdx.org/licenses/AGPL-3.0-only.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: true + same_license: true + liability: true + warranty: true + trademark_use: false + +AGPL-3.0-or-later: + url: https://spdx.org/licenses/AGPL-3.0-or-later.html + open_source: true + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: true + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: true + same_license: true + liability: true + warranty: true + trademark_use: false + +Elastic-2.0: + url: https://www.elastic.co/licensing/elastic-license + open_source: false + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +BUSL-1.1: + url: https://spdx.org/licenses/BUSL-1.1.html + open_source: false + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: true + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +SSPL-1.0: + url: https://spdx.org/licenses/SSPL-1.0.html + open_source: false + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: true + disclose_source: true + network_use_disclose: true + same_license: true + liability: true + warranty: true + trademark_use: false + +CC-BY-NC-4.0: + url: https://spdx.org/licenses/CC-BY-NC-4.0.html + open_source: false + commercial_use: false + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: true + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +CC-BY-NC-ND-4.0: + url: https://spdx.org/licenses/CC-BY-NC-ND-4.0.html + open_source: false + commercial_use: false + modifications: false + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +LicenseRef-RSALv2: + url: https://redis.io/legal/rsalv2-agreement/ + open_source: false + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +LicenseRef-Baserow-Premium: + url: https://github.com/bram2w/baserow/blob/master/premium/LICENSE + open_source: false + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +LicenseRef-Baserow-Enterprise: + url: https://github.com/bram2w/baserow/blob/master/enterprise/LICENSE + open_source: false + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +LicenseRef-BerriAI-Enterprise: + url: https://github.com/BerriAI/litellm/blob/main/LICENSE + open_source: false + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +LicenseRef-FlowiseAI-Commercial: + url: https://github.com/FlowiseAI/Flowise/blob/main/LICENSE.md + open_source: false + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + +LicenseRef-Infinito-Nexus-Community: + url: https://s.infinito.nexus/license + open_source: false + commercial_use: false + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false diff --git a/roles/drv-epson-multiprinter/meta/license.yml b/roles/drv-epson-multiprinter/meta/license.yml new file mode 100644 index 0000000000..feafbc5c3f --- /dev/null +++ b/roles/drv-epson-multiprinter/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-EPSON-EULA +url: https://aur.archlinux.org/packages/epson-inkjet-printer-escpr2 +rights: + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/drv-intel/meta/license.yml b/roles/drv-intel/meta/license.yml new file mode 100644 index 0000000000..c0000bef03 --- /dev/null +++ b/roles/drv-intel/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT AND BSD-3-Clause +url: https://github.com/intel/media-driver/blob/master/LICENSE.md diff --git a/roles/drv-lid-switch/meta/license.yml b/roles/drv-lid-switch/meta/license.yml new file mode 100644 index 0000000000..966b233ac5 --- /dev/null +++ b/roles/drv-lid-switch/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://pypi.org/pypi/setup-hibernate/json diff --git a/roles/drv-non-free/meta/license.yml b/roles/drv-non-free/meta/license.yml new file mode 100644 index 0000000000..4893b88e65 --- /dev/null +++ b/roles/drv-non-free/meta/license.yml @@ -0,0 +1,2 @@ +# nocheck: license-declared mhwd picks the nonfree PCI 0300 profile from the host's GPU at deploy time, so the installed payload differs per machine and no single licence covers it; Manjaro's mhwd repositories are not publicly indexed, so no declaration could be read +--- diff --git a/roles/dsk-base/meta/license.yml b/roles/dsk-base/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/dsk-base/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/dsk-blender/meta/license.yml b/roles/dsk-blender/meta/license.yml new file mode 100644 index 0000000000..6022eeb323 --- /dev/null +++ b/roles/dsk-blender/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://www.blender.org/about/license/ diff --git a/roles/dsk-bluray-player/meta/license.yml b/roles/dsk-bluray-player/meta/license.yml new file mode 100644 index 0000000000..bd6dd36525 --- /dev/null +++ b/roles/dsk-bluray-player/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later AND LGPL-2.1-only +url: https://archlinux.org/packages/search/json/?name=vlc diff --git a/roles/dsk-chromium/meta/license.yml b/roles/dsk-chromium/meta/license.yml new file mode 100644 index 0000000000..31a985a749 --- /dev/null +++ b/roles/dsk-chromium/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: BSD-3-Clause +url: https://github.com/chromium/chromium/blob/main/LICENSE diff --git a/roles/dsk-code/meta/license.yml b/roles/dsk-code/meta/license.yml new file mode 100644 index 0000000000..4a733fc99e --- /dev/null +++ b/roles/dsk-code/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/microsoft/vscode/blob/main/LICENSE.txt diff --git a/roles/dsk-copyq/meta/license.yml b/roles/dsk-copyq/meta/license.yml new file mode 100644 index 0000000000..e1724cfa30 --- /dev/null +++ b/roles/dsk-copyq/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-or-later +url: https://archlinux.org/packages/search/json/?name=copyq diff --git a/roles/dsk-docker/meta/license.yml b/roles/dsk-docker/meta/license.yml new file mode 100644 index 0000000000..da6c0bd9fd --- /dev/null +++ b/roles/dsk-docker/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/moby/moby/blob/master/LICENSE diff --git a/roles/dsk-dotlinker/meta/license.yml b/roles/dsk-dotlinker/meta/license.yml new file mode 100644 index 0000000000..b53083d79d --- /dev/null +++ b/roles/dsk-dotlinker/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/kevinveenbirkenbach/dotlinker/blob/main/LICENSE diff --git a/roles/dsk-firefox/meta/license.yml b/roles/dsk-firefox/meta/license.yml new file mode 100644 index 0000000000..49541a26d6 --- /dev/null +++ b/roles/dsk-firefox/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-2.0 +url: https://archlinux.org/packages/search/json/?name=firefox diff --git a/roles/dsk-git/meta/license.yml b/roles/dsk-git/meta/license.yml new file mode 100644 index 0000000000..f3835e9666 --- /dev/null +++ b/roles/dsk-git/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://archlinux.org/packages/search/json/?name=git diff --git a/roles/dsk-gnome-caffeine/meta/license.yml b/roles/dsk-gnome-caffeine/meta/license.yml new file mode 100644 index 0000000000..14473ec0ce --- /dev/null +++ b/roles/dsk-gnome-caffeine/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-or-later +url: https://codeberg.org/WhyNotHugo/caffeine-ng/raw/branch/main/LICENCE diff --git a/roles/dsk-gnome-extensions/meta/license.yml b/roles/dsk-gnome-extensions/meta/license.yml new file mode 100644 index 0000000000..200d44edb4 --- /dev/null +++ b/roles/dsk-gnome-extensions/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/kevinveenbirkenbach/cli-gnome-extension-manager/blob/main/LICENSE diff --git a/roles/dsk-gnome-terminal/meta/license.yml b/roles/dsk-gnome-terminal/meta/license.yml new file mode 100644 index 0000000000..81706fa077 --- /dev/null +++ b/roles/dsk-gnome-terminal/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-only +url: https://archlinux.org/packages/search/json/?name=gnome-terminal diff --git a/roles/dsk-gnome/meta/license.yml b/roles/dsk-gnome/meta/license.yml new file mode 100644 index 0000000000..75f868e9e6 --- /dev/null +++ b/roles/dsk-gnome/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://metadata.ftp-master.debian.org/changelogs/main/g/gnome-shell/unstable_copyright diff --git a/roles/dsk-gnt-claude/meta/license.yml b/roles/dsk-gnt-claude/meta/license.yml new file mode 100644 index 0000000000..af52b84ec5 --- /dev/null +++ b/roles/dsk-gnt-claude/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-Anthropic-Commercial-Terms +url: https://github.com/anthropics/claude-code/blob/main/LICENSE.md +rights: + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/dsk-gnt-codex/meta/license.yml b/roles/dsk-gnt-codex/meta/license.yml new file mode 100644 index 0000000000..2679825a62 --- /dev/null +++ b/roles/dsk-gnt-codex/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/openai/codex/blob/main/LICENSE diff --git a/roles/dsk-gnt-cursor/meta/license.yml b/roles/dsk-gnt-cursor/meta/license.yml new file mode 100644 index 0000000000..7910c2c4bc --- /dev/null +++ b/roles/dsk-gnt-cursor/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-Cursor-EULA +url: https://cursor.com/terms-of-service +rights: + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/dsk-gnt-pi/meta/license.yml b/roles/dsk-gnt-pi/meta/license.yml new file mode 100644 index 0000000000..3f1916a587 --- /dev/null +++ b/roles/dsk-gnt-pi/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/earendil-works/pi/blob/main/LICENSE diff --git a/roles/dsk-gnucash/meta/license.yml b/roles/dsk-gnucash/meta/license.yml new file mode 100644 index 0000000000..dd6a5a21de --- /dev/null +++ b/roles/dsk-gnucash/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only OR GPL-3.0-only +url: https://github.com/Gnucash/gnucash/blob/stable/LICENSE diff --git a/roles/dsk-jrnl/meta/license.yml b/roles/dsk-jrnl/meta/license.yml new file mode 100644 index 0000000000..2e501a5cd7 --- /dev/null +++ b/roles/dsk-jrnl/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-only +url: https://github.com/jrnl-org/jrnl/blob/main/LICENSE.md diff --git a/roles/dsk-keepassxc/meta/license.yml b/roles/dsk-keepassxc/meta/license.yml new file mode 100644 index 0000000000..13416eb0ae --- /dev/null +++ b/roles/dsk-keepassxc/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only OR GPL-3.0-only +url: https://github.com/keepassxreboot/keepassxc/blob/develop/COPYING diff --git a/roles/dsk-laya/meta/license.yml b/roles/dsk-laya/meta/license.yml new file mode 100644 index 0000000000..e2f4d0b881 --- /dev/null +++ b/roles/dsk-laya/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/aayushch/laya/blob/main/LICENSE diff --git a/roles/dsk-libreoffice/meta/license.yml b/roles/dsk-libreoffice/meta/license.yml new file mode 100644 index 0000000000..eba7428acf --- /dev/null +++ b/roles/dsk-libreoffice/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-2.0 AND LGPL-3.0-or-later +url: https://archlinux.org/packages/search/json/?name=libreoffice-fresh diff --git a/roles/dsk-micro/meta/license.yml b/roles/dsk-micro/meta/license.yml new file mode 100644 index 0000000000..c09add3599 --- /dev/null +++ b/roles/dsk-micro/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/micro-editor/micro/blob/master/LICENSE diff --git a/roles/dsk-neovim/meta/license.yml b/roles/dsk-neovim/meta/license.yml new file mode 100644 index 0000000000..4397c7882c --- /dev/null +++ b/roles/dsk-neovim/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/neovim/neovim/blob/master/LICENSE.txt diff --git a/roles/dsk-nextcloud/meta/license.yml b/roles/dsk-nextcloud/meta/license.yml new file mode 100644 index 0000000000..5948cf4f18 --- /dev/null +++ b/roles/dsk-nextcloud/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://archlinux.org/packages/search/json/?name=nextcloud-client diff --git a/roles/dsk-obs/meta/license.yml b/roles/dsk-obs/meta/license.yml new file mode 100644 index 0000000000..0613ec599f --- /dev/null +++ b/roles/dsk-obs/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://archlinux.org/packages/search/json/?name=obs-studio diff --git a/roles/dsk-qbittorrent/meta/license.yml b/roles/dsk-qbittorrent/meta/license.yml new file mode 100644 index 0000000000..f0297619d1 --- /dev/null +++ b/roles/dsk-qbittorrent/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-or-later +url: https://github.com/qbittorrent/qBittorrent/blob/master/COPYING diff --git a/roles/dsk-retroarch/meta/license.yml b/roles/dsk-retroarch/meta/license.yml new file mode 100644 index 0000000000..dd84b44031 --- /dev/null +++ b/roles/dsk-retroarch/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-only +url: https://archlinux.org/packages/search/json/?name=retroarch diff --git a/roles/dsk-spotify/meta/license.yml b/roles/dsk-spotify/meta/license.yml new file mode 100644 index 0000000000..315d2b16df --- /dev/null +++ b/roles/dsk-spotify/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-Spotify-EULA +url: https://www.spotify.com/us/legal/end-user-agreement/ +rights: + commercial_use: false + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/dsk-ssh/meta/license.yml b/roles/dsk-ssh/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/dsk-ssh/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/dsk-torbrowser/meta/license.yml b/roles/dsk-torbrowser/meta/license.yml new file mode 100644 index 0000000000..2b622a4c71 --- /dev/null +++ b/roles/dsk-torbrowser/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-2.0 +url: https://gitlab.torproject.org/tpo/applications/tor-browser/-/raw/tor-browser-153.5.0esr-16.0-1/toolkit/content/license.html diff --git a/roles/dsk-virtualbox/meta/license.yml b/roles/dsk-virtualbox/meta/license.yml new file mode 100644 index 0000000000..f90972b496 --- /dev/null +++ b/roles/dsk-virtualbox/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-Oracle-VirtualBox-PUEL +url: https://www.virtualbox.org/wiki/VirtualBox_PUEL +rights: + commercial_use: false + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/dsk-zoom/meta/license.yml b/roles/dsk-zoom/meta/license.yml new file mode 100644 index 0000000000..60b7340fa0 --- /dev/null +++ b/roles/dsk-zoom/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-Zoom-Terms-of-Service +url: https://explore.zoom.us/en/terms/ +rights: + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/gen-hunspell/meta/license.yml b/roles/gen-hunspell/meta/license.yml new file mode 100644 index 0000000000..b0380a2c51 --- /dev/null +++ b/roles/gen-hunspell/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later +url: https://raw.githubusercontent.com/hunspell/hunspell/master/license.hunspell diff --git a/roles/svc-ai-agent-broker/meta/license.yml b/roles/svc-ai-agent-broker/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/svc-ai-agent-broker/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/svc-ai-jupyter/meta/license.yml b/roles/svc-ai-jupyter/meta/license.yml new file mode 100644 index 0000000000..092be39693 --- /dev/null +++ b/roles/svc-ai-jupyter/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: BSD-3-Clause +url: https://github.com/jupyter/docker-stacks/blob/main/LICENSE.md diff --git a/roles/svc-ai-libretranslate-engine/meta/license.yml b/roles/svc-ai-libretranslate-engine/meta/license.yml new file mode 100644 index 0000000000..e6ca45503c --- /dev/null +++ b/roles/svc-ai-libretranslate-engine/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/LibreTranslate/LibreTranslate/blob/v1.9.6/LICENSE diff --git a/roles/svc-ai-litellm/meta/license.yml b/roles/svc-ai-litellm/meta/license.yml new file mode 100644 index 0000000000..58b47c11ce --- /dev/null +++ b/roles/svc-ai-litellm/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/BerriAI/litellm/blob/main/LICENSE diff --git a/roles/svc-ai-lmstudio/meta/license.yml b/roles/svc-ai-lmstudio/meta/license.yml new file mode 100644 index 0000000000..a157bd5f7f --- /dev/null +++ b/roles/svc-ai-lmstudio/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-LM-Studio-Terms +url: https://lmstudio.ai/terms +rights: + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/svc-ai-ltengine/meta/license.yml b/roles/svc-ai-ltengine/meta/license.yml new file mode 100644 index 0000000000..d6358416af --- /dev/null +++ b/roles/svc-ai-ltengine/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/LibreTranslate/LTEngine/blob/9b748ddd84c02da9569bd96db3cf33c53e4665fa/LICENSE diff --git a/roles/svc-ai-mcp-adapter/meta/license.yml b/roles/svc-ai-mcp-adapter/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/svc-ai-mcp-adapter/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/svc-ai-nllb-engine/meta/info.yml b/roles/svc-ai-nllb-engine/meta/info.yml index 55624a3466..e52e86fbc7 100644 --- a/roles/svc-ai-nllb-engine/meta/info.yml +++ b/roles/svc-ai-nllb-engine/meta/info.yml @@ -2,4 +2,4 @@ # nocheck: info-media no official demo video logo: class: "" -homepage: https://ai.meta.com/research/no-language-left-behind/ +homepage: https://huggingface.co/facebook/nllb-200-distilled-600M diff --git a/roles/svc-ai-nllb-engine/meta/license.yml b/roles/svc-ai-nllb-engine/meta/license.yml new file mode 100644 index 0000000000..6e6b5c798e --- /dev/null +++ b/roles/svc-ai-nllb-engine/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: CC-BY-NC-4.0 +url: https://huggingface.co/facebook/nllb-200-distilled-600M diff --git a/roles/svc-ai-ollama/meta/license.yml b/roles/svc-ai-ollama/meta/license.yml new file mode 100644 index 0000000000..7f867025b6 --- /dev/null +++ b/roles/svc-ai-ollama/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/ollama/ollama/blob/main/LICENSE diff --git a/roles/svc-ai-robot/meta/license.yml b/roles/svc-ai-robot/meta/license.yml new file mode 100644 index 0000000000..a94d8fb73d --- /dev/null +++ b/roles/svc-ai-robot/meta/license.yml @@ -0,0 +1,2 @@ +# nocheck: license-declared installs nothing; it only asserts that web-app-hermes or web-app-openclaw is present and reports the device grant, so the licence belongs to the agent role. +--- diff --git a/roles/svc-ai-s1/meta/license.yml b/roles/svc-ai-s1/meta/license.yml new file mode 100644 index 0000000000..ea7dc3f4ca --- /dev/null +++ b/roles/svc-ai-s1/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://huggingface.co/convaiinnovations/laya diff --git a/roles/svc-ai-searxng/meta/license.yml b/roles/svc-ai-searxng/meta/license.yml new file mode 100644 index 0000000000..1d4e5f5222 --- /dev/null +++ b/roles/svc-ai-searxng/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/searxng/searxng/blob/master/LICENSE diff --git a/roles/svc-ai-tika/meta/license.yml b/roles/svc-ai-tika/meta/license.yml new file mode 100644 index 0000000000..9cd5c7e1ce --- /dev/null +++ b/roles/svc-ai-tika/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/apache/tika/blob/main/LICENSE.txt diff --git a/roles/svc-bkp-local-2-device/meta/license.yml b/roles/svc-bkp-local-2-device/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/svc-bkp-local-2-device/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/svc-bkp-nfs-2-local/meta/license.yml b/roles/svc-bkp-nfs-2-local/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/svc-bkp-nfs-2-local/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/svc-bkp-remote-2-local/meta/license.yml b/roles/svc-bkp-remote-2-local/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/svc-bkp-remote-2-local/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/svc-bkp-secrets-2-local/meta/license.yml b/roles/svc-bkp-secrets-2-local/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/svc-bkp-secrets-2-local/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/svc-bkp-volume-2-local/meta/license.yml b/roles/svc-bkp-volume-2-local/meta/license.yml new file mode 100644 index 0000000000..4552bb732a --- /dev/null +++ b/roles/svc-bkp-volume-2-local/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/kevinveenbirkenbach/backup-docker-to-local/blob/main/LICENSE diff --git a/roles/svc-cache-package/meta/license.yml b/roles/svc-cache-package/meta/license.yml new file mode 100644 index 0000000000..10778e1c70 --- /dev/null +++ b/roles/svc-cache-package/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: EPL-1.0 +url: https://github.com/sonatype/nexus-public/blob/release-3.91.1-04/LICENSE.txt diff --git a/roles/svc-db-elasticsearch/meta/license.yml b/roles/svc-db-elasticsearch/meta/license.yml new file mode 100644 index 0000000000..a35811d749 --- /dev/null +++ b/roles/svc-db-elasticsearch/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Elastic-2.0 OR SSPL-1.0 OR AGPL-3.0-only +url: https://github.com/elastic/elasticsearch/blob/v9.5.5/LICENSE.txt diff --git a/roles/svc-db-mariadb/meta/license.yml b/roles/svc-db-mariadb/meta/license.yml new file mode 100644 index 0000000000..25d5ed0a2b --- /dev/null +++ b/roles/svc-db-mariadb/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://github.com/MariaDB/server/blob/main/COPYING diff --git a/roles/svc-db-memcached/meta/license.yml b/roles/svc-db-memcached/meta/license.yml new file mode 100644 index 0000000000..502e0b182c --- /dev/null +++ b/roles/svc-db-memcached/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: BSD-3-Clause +url: https://github.com/memcached/memcached/blob/master/LICENSE diff --git a/roles/svc-db-openldap/meta/license.yml b/roles/svc-db-openldap/meta/license.yml new file mode 100644 index 0000000000..e3068ab9bd --- /dev/null +++ b/roles/svc-db-openldap/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: OLDAP-2.8 +url: https://www.openldap.org/software/release/license.html diff --git a/roles/svc-db-postgres/meta/license.yml b/roles/svc-db-postgres/meta/license.yml new file mode 100644 index 0000000000..f9f3862a12 --- /dev/null +++ b/roles/svc-db-postgres/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: PostgreSQL +url: https://github.com/postgres/postgres/blob/master/COPYRIGHT diff --git a/roles/svc-db-qdrant/meta/license.yml b/roles/svc-db-qdrant/meta/license.yml new file mode 100644 index 0000000000..5e776823d5 --- /dev/null +++ b/roles/svc-db-qdrant/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/qdrant/qdrant/blob/master/LICENSE diff --git a/roles/svc-db-rabbitmq/meta/license.yml b/roles/svc-db-rabbitmq/meta/license.yml new file mode 100644 index 0000000000..08b488865b --- /dev/null +++ b/roles/svc-db-rabbitmq/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-2.0 +url: https://github.com/rabbitmq/rabbitmq-server/blob/main/LICENSE diff --git a/roles/svc-db-redis/meta/license.yml b/roles/svc-db-redis/meta/license.yml new file mode 100644 index 0000000000..b636abe260 --- /dev/null +++ b/roles/svc-db-redis/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only OR LicenseRef-RSALv2 OR SSPL-1.0 +url: https://github.com/redis/redis/blob/8.10.2/LICENSE.txt diff --git a/roles/svc-db-typesense/meta/license.yml b/roles/svc-db-typesense/meta/license.yml new file mode 100644 index 0000000000..d9663e94ce --- /dev/null +++ b/roles/svc-db-typesense/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-only +url: https://github.com/typesense/typesense/blob/v0.25.2/LICENSE.txt diff --git a/roles/svc-dns-unbound/meta/license.yml b/roles/svc-dns-unbound/meta/license.yml new file mode 100644 index 0000000000..2e80ab2525 --- /dev/null +++ b/roles/svc-dns-unbound/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: BSD-3-Clause +url: https://github.com/NLnetLabs/unbound/blob/master/LICENSE diff --git a/roles/svc-net-firewall/meta/license.yml b/roles/svc-net-firewall/meta/license.yml new file mode 100644 index 0000000000..c536a26ba4 --- /dev/null +++ b/roles/svc-net-firewall/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://sources.debian.org/data/main/n/nftables/1.1.3-1/COPYING diff --git a/roles/svc-net-tor-smtp/meta/license.yml b/roles/svc-net-tor-smtp/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/svc-net-tor-smtp/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/svc-net-tor/meta/license.yml b/roles/svc-net-tor/meta/license.yml new file mode 100644 index 0000000000..60890f9d53 --- /dev/null +++ b/roles/svc-net-tor/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: BSD-3-Clause +url: https://gitlab.torproject.org/tpo/core/tor/-/raw/main/LICENSE diff --git a/roles/svc-net-wireguard/meta/license.yml b/roles/svc-net-wireguard/meta/license.yml new file mode 100644 index 0000000000..42edb18ea3 --- /dev/null +++ b/roles/svc-net-wireguard/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://git.zx2c4.com/wireguard-tools/plain/COPYING diff --git a/roles/svc-opt-keyboard-color/meta/license.yml b/roles/svc-opt-keyboard-color/meta/license.yml new file mode 100644 index 0000000000..286656a871 --- /dev/null +++ b/roles/svc-opt-keyboard-color/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/Askannz/msi-perkeyrgb/blob/master/LICENSE diff --git a/roles/svc-opt-ssd-hdd/meta/license.yml b/roles/svc-opt-ssd-hdd/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/svc-opt-ssd-hdd/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/svc-opt-swapfile/meta/license.yml b/roles/svc-opt-swapfile/meta/license.yml new file mode 100644 index 0000000000..854b6d9240 --- /dev/null +++ b/roles/svc-opt-swapfile/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/kevinveenbirkenbach/swap-forge/blob/main/pyproject.toml diff --git a/roles/svc-prx-openresty/meta/license.yml b/roles/svc-prx-openresty/meta/license.yml new file mode 100644 index 0000000000..1bf37312aa --- /dev/null +++ b/roles/svc-prx-openresty/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: BSD-2-Clause +url: https://github.com/openresty/openresty/blob/master/COPYRIGHT diff --git a/roles/svc-registry-cache/meta/license.yml b/roles/svc-registry-cache/meta/license.yml new file mode 100644 index 0000000000..ceae8c3802 --- /dev/null +++ b/roles/svc-registry-cache/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/distribution/distribution/blob/main/LICENSE diff --git a/roles/svc-registry-docker/meta/license.yml b/roles/svc-registry-docker/meta/license.yml new file mode 100644 index 0000000000..ceae8c3802 --- /dev/null +++ b/roles/svc-registry-docker/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/distribution/distribution/blob/main/LICENSE diff --git a/roles/svc-runner/meta/license.yml b/roles/svc-runner/meta/license.yml new file mode 100644 index 0000000000..417214956f --- /dev/null +++ b/roles/svc-runner/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/actions/runner/blob/main/LICENSE diff --git a/roles/svc-storage-nfs-client/meta/license.yml b/roles/svc-storage-nfs-client/meta/license.yml new file mode 100644 index 0000000000..368c17f2b4 --- /dev/null +++ b/roles/svc-storage-nfs-client/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://sources.debian.org/data/main/n/nfs-utils/1%3A2.8.3-1/COPYING diff --git a/roles/svc-storage-nfs-server/meta/license.yml b/roles/svc-storage-nfs-server/meta/license.yml new file mode 100644 index 0000000000..368c17f2b4 --- /dev/null +++ b/roles/svc-storage-nfs-server/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://sources.debian.org/data/main/n/nfs-utils/1%3A2.8.3-1/COPYING diff --git a/roles/svc-swarm-manager/meta/license.yml b/roles/svc-swarm-manager/meta/license.yml new file mode 100644 index 0000000000..8ec66557d0 --- /dev/null +++ b/roles/svc-swarm-manager/meta/license.yml @@ -0,0 +1,2 @@ +# nocheck: license-declared tasks/main.yml is empty, so the role installs no software whose licence could be declared. +--- diff --git a/roles/svc-swarm-node/meta/license.yml b/roles/svc-swarm-node/meta/license.yml new file mode 100644 index 0000000000..19c698fab1 --- /dev/null +++ b/roles/svc-swarm-node/meta/license.yml @@ -0,0 +1,2 @@ +# nocheck: license-declared ships no payload and installs nothing; it runs swarm commands against the Docker Engine another role installs, which declares the engine's licence. +--- diff --git a/roles/svc-virt-kata/meta/license.yml b/roles/svc-virt-kata/meta/license.yml new file mode 100644 index 0000000000..183b4ecbfd --- /dev/null +++ b/roles/svc-virt-kata/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/google/gvisor/blob/master/LICENSE diff --git a/roles/update/meta/license.yml b/roles/update/meta/license.yml new file mode 100644 index 0000000000..336048dc95 --- /dev/null +++ b/roles/update/meta/license.yml @@ -0,0 +1,2 @@ +# nocheck: license-declared Dispatches the host's own package manager (apt/pacman/dnf) to refresh and upgrade already-installed OS packages; it installs no software of its own, so there is no single licence to declare. +--- diff --git a/roles/web-app-akaunting/meta/license.yml b/roles/web-app-akaunting/meta/license.yml new file mode 100644 index 0000000000..862c7db816 --- /dev/null +++ b/roles/web-app-akaunting/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: BUSL-1.1 +url: https://github.com/akaunting/akaunting/blob/master/LICENSE.txt diff --git a/roles/web-app-baserow/meta/license.yml b/roles/web-app-baserow/meta/license.yml new file mode 100644 index 0000000000..029236d6bb --- /dev/null +++ b/roles/web-app-baserow/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT AND LicenseRef-Baserow-Premium AND LicenseRef-Baserow-Enterprise +url: https://github.com/bram2w/baserow/blob/master/LICENSE diff --git a/roles/web-app-bigbluebutton/meta/license.yml b/roles/web-app-bigbluebutton/meta/license.yml new file mode 100644 index 0000000000..ab57deb0b8 --- /dev/null +++ b/roles/web-app-bigbluebutton/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LGPL-3.0-or-later +url: https://github.com/bigbluebutton/bigbluebutton/blob/develop/LICENSE diff --git a/roles/web-app-bluesky/meta/license.yml b/roles/web-app-bluesky/meta/license.yml new file mode 100644 index 0000000000..5ad30b882b --- /dev/null +++ b/roles/web-app-bluesky/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT OR Apache-2.0 +url: https://github.com/bluesky-social/pds/blob/main/LICENSE.txt diff --git a/roles/web-app-bookwyrm/meta/license.yml b/roles/web-app-bookwyrm/meta/license.yml new file mode 100644 index 0000000000..aad79bfdf9 --- /dev/null +++ b/roles/web-app-bookwyrm/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-ACSL-1.4 +url: https://github.com/bookwyrm-social/bookwyrm/blob/main/LICENSE.md +rights: + commercial_use: false + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/web-app-bridgy-fed/meta/license.yml b/roles/web-app-bridgy-fed/meta/license.yml new file mode 100644 index 0000000000..fe6a000660 --- /dev/null +++ b/roles/web-app-bridgy-fed/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: CC0-1.0 +url: https://github.com/snarfed/bridgy-fed/blob/main/LICENSE diff --git a/roles/web-app-checkmk/meta/license.yml b/roles/web-app-checkmk/meta/license.yml new file mode 100644 index 0000000000..055d049b1e --- /dev/null +++ b/roles/web-app-checkmk/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://github.com/Checkmk/checkmk/blob/master/COPYING diff --git a/roles/web-app-chess/meta/license.yml b/roles/web-app-chess/meta/license.yml new file mode 100644 index 0000000000..147b283f53 --- /dev/null +++ b/roles/web-app-chess/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/kevinveenbirkenbach/fedi-chess/blob/master/LICENSE diff --git a/roles/web-app-confluence/meta/license.yml b/roles/web-app-confluence/meta/license.yml new file mode 100644 index 0000000000..0e57a3fb09 --- /dev/null +++ b/roles/web-app-confluence/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-Atlassian-Customer-Agreement +url: https://www.atlassian.com/legal/atlassian-customer-agreement +rights: + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/web-app-dashboard/meta/license.yml b/roles/web-app-dashboard/meta/license.yml new file mode 100644 index 0000000000..107d91a12d --- /dev/null +++ b/roles/web-app-dashboard/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/kevinveenbirkenbach/port-ui/blob/main/LICENSE diff --git a/roles/web-app-decidim/meta/license.yml b/roles/web-app-decidim/meta/license.yml new file mode 100644 index 0000000000..305c3d3804 --- /dev/null +++ b/roles/web-app-decidim/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/decidim/decidim/blob/develop/LICENSE-AGPLv3.txt diff --git a/roles/web-app-discourse/meta/license.yml b/roles/web-app-discourse/meta/license.yml new file mode 100644 index 0000000000..46ce9bcbec --- /dev/null +++ b/roles/web-app-discourse/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://github.com/discourse/discourse/blob/main/LICENSE.txt diff --git a/roles/web-app-docs/files/playwright/playwright.spec.js b/roles/web-app-docs/files/playwright/playwright.spec.js index e75e785e5c..d9f6b1088d 100644 --- a/roles/web-app-docs/files/playwright/playwright.spec.js +++ b/roles/web-app-docs/files/playwright/playwright.spec.js @@ -16,6 +16,7 @@ require("./test-versions").register(shared); require("./test-languages").register(shared); require("./test-on-demand-build").register(shared); require("./test-yaml-page").register(shared); +require("./test-licensing-page").register(shared); require("./test-design"); test("guest: public-landing → auth chain → never authenticated", async ({ page }) => { diff --git a/roles/web-app-docs/files/playwright/test-licensing-page.js b/roles/web-app-docs/files/playwright/test-licensing-page.js new file mode 100644 index 0000000000..3d526eab15 --- /dev/null +++ b/roles/web-app-docs/files/playwright/test-licensing-page.js @@ -0,0 +1,88 @@ +const { test, expect } = require("@playwright/test"); +const { resolveTimeout } = require("./timeouts"); +const { gotoOnion } = require("./personas"); + +const LICENSING_PAGE = "/generated/licensing.html"; +const RIGHT_COLUMNS = [ + "Commercial use", + "Modifications", + "Distribution", + "Private use", + "Patent use", + "Self host", + "Include copyright", + "Document changes", + "Disclose source", + "Network use disclose", + "Same license", + "Liability", + "Warranty", + "Trademark use", +]; + +exports.register = function (shared) { + test("the licence page carries a rights matrix for every role", async ({ page, request }) => { + test.setTimeout(resolveTimeout(5_400_000)); // the English Sphinx build of the deployed working tree + await shared.pollStatus( + request, + `${shared.appBaseUrl}${LICENSING_PAGE}`, + 200, + "Expected the deployed licence page to finish building before it is asserted", + 5_300_000, + ); + + const response = await gotoOnion(page, `${shared.appBaseUrl}${LICENSING_PAGE}`); + expect(response, `Expected a response for ${LICENSING_PAGE}`).toBeTruthy(); + expect(response.status(), `Expected ${LICENSING_PAGE} to be served`).toBe(200); + + await expect( + page.getByRole("heading", { name: /^Licence contexts/ }), + "Expected the generated page title; matched by prefix because docutils appends " + + "its permalink pilcrow as a bare text node", + ).toBeVisible({ timeout: resolveTimeout(30_000) }); + + const tables = page.locator("table"); + const tableCount = await tables.count(); + expect(tableCount, "Expected one matrix per licence context").toBeGreaterThan(1); + + const headers = tables.first().locator("thead th"); + await expect( + headers, + `Expected Role, Licence and one column per right (${RIGHT_COLUMNS.length})`, + ).toHaveCount(RIGHT_COLUMNS.length + 2); + for (const [index, label] of RIGHT_COLUMNS.entries()) { + await expect(headers.nth(index + 2)).toHaveText(label); + } + + await expect( + page.getByRole("heading", { name: /^Network copyleft/ }), + "Expected the network-copyleft section: the catalogue holds AGPL roles, and the " + + "heading is derived from their rights rather than declared, so its absence means " + + "the derivation stopped working", + ).toBeVisible(); + + await expect( + page.getByRole("heading", { name: /^Not yet determined/ }), + "Expected no undetermined section: every invokable role resolves to a licence, and " + + "tests/lint/ansible/roles/meta/test_license_declared.py refuses a commit that " + + "breaks that", + ).toHaveCount(0); + + // The role cell is an inline literal, which docutils and Sphinx wrap in + // different elements, so the row is found by its text, not by a tag. + const nextcloud = page.locator("tr", { hasText: "web-app-nextcloud" }); + await expect( + nextcloud, + "Expected one row for web-app-nextcloud, which anchors the page to the declared data", + ).toHaveCount(1); + await expect( + nextcloud.locator("a", { hasText: "AGPL-3.0-or-later" }), + "Expected Nextcloud's licence to be the one its own SPDX headers state, linked to " + + "the url meta/license.yml records", + ).toHaveCount(1); + await expect( + nextcloud.locator("td").nth(RIGHT_COLUMNS.indexOf("Network use disclose") + 1), + "Expected the AGPL network clause to reach the matrix cell", + ).toHaveText("yes"); + }); +}; diff --git a/roles/web-app-docs/files/python/infinito_docs/commands.py b/roles/web-app-docs/files/python/infinito_docs/commands.py index 92e3c21e6d..9d37b2b7a8 100644 --- a/roles/web-app-docs/files/python/infinito_docs/commands.py +++ b/roles/web-app-docs/files/python/infinito_docs/commands.py @@ -104,6 +104,13 @@ def generate_commands(src): "--output-dir", generated / "integrations", ), + _generator( + "licensing", + "--roles-dir", + src / "roles", + "--output", + generated / "licensing.rst", + ), _generator("readmes", "--generated-dir", generated), _module( "cli.build.docs.readme", diff --git a/roles/web-app-docs/files/python/infinito_docs/generators/licensing.py b/roles/web-app-docs/files/python/infinito_docs/generators/licensing.py new file mode 100644 index 0000000000..6dff411b89 --- /dev/null +++ b/roles/web-app-docs/files/python/infinito_docs/generators/licensing.py @@ -0,0 +1,189 @@ +"""Generate the licence-context page: in which context each role may be used. + +Usage: + python -m infinito_docs.generators.licensing --roles-dir DIR --output FILE + +Every invokable role is listed. A role whose licence could not be resolved +appears under "Not yet determined" rather than being left out, because a gap +that is invisible reads as safe. +""" + +from __future__ import annotations + +import argparse +from pathlib import Path + +from utils.licensing.contexts import CONTEXTS, UNKNOWN +from utils.licensing.rights import DISCLAIMERS, DUTIES, GRANTS, NOT_GRANTED +from utils.licensing.roles import Declared, declared, deploys_nothing +from utils.roles.required_by_coverage import role_is_invokable + +COLUMNS: tuple[tuple[str, str], ...] = tuple( + (field, field.replace("_", " ").capitalize()) + for field in GRANTS + DUTIES + DISCLAIMERS + NOT_GRANTED +) + +HEADER = """\ +.. _generated-licensing: + +Licence contexts +================ + +The Infinito.Nexus licence governs this repository's own code. It says nothing +about the software a role deploys, and that is where a restriction on +commercial use usually sits. This page answers, per role, what the deployed +software's own licence allows. + +Each role declares its licence in ``meta//license.yml``; the rights of a +named licence live once in ``meta/licenses.yml``. The context headings below +are derived from those rights, not declared, so a heading can never contradict +the matrix under it. + +``yes`` means the licence grants the permission, imposes the duty, or +disclaims the liability named in the column; ``no`` means it does not. This +page is not legal advice. + +""" + +FOOTER = """ +.. note:: + + Generated from ``meta//license.yml`` and ``meta/licenses.yml``. + Correct a row at its source, never here. +""" + + +def _mark(value: bool | None) -> str: + """Return the cell for one boolean. + + Args: + value: the right's value, or None when the licence is unresolved. + + A bare ``-`` would be read as a bullet marker and render as an empty + cell, which is indistinguishable from a missing value. + """ + if value is None: + return "unknown" + return "yes" if value else "no" + + +def _collect( + roles_dir: Path, +) -> tuple[dict[str, list[tuple[str, Declared | None]]], list[str]]: + """Group every invokable role by its derived licence context. + + Args: + roles_dir: the repository's roles directory. + + Returns: + The grouping, and the roles that declare they deploy no third-party + software. Those carry no licence to classify, so listing them under + "not yet determined" would report a gap where there is none. + """ + grouped: dict[str, list[tuple[str, Declared | None]]] = { + context.key: [] for context in CONTEXTS + } + nothing: list[str] = [] + for role_dir in sorted(roles_dir.iterdir()): + if not role_dir.is_dir() or not role_is_invokable(role_dir.name): + continue + if deploys_nothing(role_dir): + nothing.append(role_dir.name) + continue + entry = declared(role_dir) + key = entry.context.key if entry is not None else UNKNOWN.key + grouped[key].append((role_dir.name, entry)) + return grouped, nothing + + +def _row(name: str, entry: Declared | None) -> list[str]: + """Return one matrix row. + + Args: + name: the role name. + entry: its declaration, or None when the role declares none. + """ + spdx = entry.spdx if entry is not None and entry.spdx else "not determined" + licence = f"`{spdx} <{entry.url}>`_" if entry is not None and entry.url else spdx + rights = entry.rights if entry is not None else None + return [ + f"``{name}``", + licence, + *[ + _mark(None if rights is None else bool(rights.get(field))) + for field, _ in COLUMNS + ], + ] + + +def _section(context, entries: list[tuple[str, Declared | None]]) -> str: + """Render one context's heading, verdict and matrix. + + Args: + context: the context being rendered. + entries: its roles, each with its declaration. + """ + lines = [ + context.title, + "-" * len(context.title), + "", + f"**Commercial use:** {context.commercial}.", + "", + f"**You owe:** {context.duties}.", + "", + ".. list-table::", + " :header-rows: 1", + " :stub-columns: 1", + "", + ] + header = ["Role", "Licence", *[label for _, label in COLUMNS]] + for row in (header, *(_row(name, entry) for name, entry in entries)): + lines.append(f" * - {row[0]}") + lines += [f" - {cell}" for cell in row[1:]] + lines.append("") + return "\n".join(lines) + + +def generate(roles_dir: Path, output: Path) -> int: + """Write the licence-context page and return the number of roles on it. + + Args: + roles_dir: the repository's roles directory. + output: the ``.rst`` file to write. + """ + grouped, nothing = _collect(roles_dir) + sections = [ + _section(context, grouped[context.key]) + for context in CONTEXTS + if grouped[context.key] + ] + if nothing: + listed = ", ".join(f"``{role}``" for role in nothing) + sections.append( + "Deploying no third-party software\n" + "---------------------------------\n\n" + "These roles install nothing of their own, so the question this " + f"page answers does not arise for them: {listed}.\n" + ) + output.parent.mkdir(parents=True, exist_ok=True) + output.write_text(HEADER + "\n".join(sections) + FOOTER, encoding="utf-8") + return sum(len(entries) for entries in grouped.values()) + len(nothing) + + +def main(argv=None): + """Entry point. + + Args: + argv: command line arguments, or None to read ``sys.argv``. + """ + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--roles-dir", required=True, type=Path) + parser.add_argument("--output", required=True, type=Path) + args = parser.parse_args(argv) + count = generate(args.roles_dir, args.output) + print(f"licensing: {count} roles -> {args.output}") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/roles/web-app-docs/meta/license.yml b/roles/web-app-docs/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-app-docs/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-app-erpnext/meta/license.yml b/roles/web-app-erpnext/meta/license.yml new file mode 100644 index 0000000000..fcb76db94b --- /dev/null +++ b/roles/web-app-erpnext/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-only +url: https://github.com/frappe/erpnext/blob/develop/license.txt diff --git a/roles/web-app-espocrm/meta/license.yml b/roles/web-app-espocrm/meta/license.yml new file mode 100644 index 0000000000..12a06ef3bb --- /dev/null +++ b/roles/web-app-espocrm/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/espocrm/espocrm/blob/master/LICENSE.txt diff --git a/roles/web-app-fediwall/meta/license.yml b/roles/web-app-fediwall/meta/license.yml new file mode 100644 index 0000000000..f3327fbb74 --- /dev/null +++ b/roles/web-app-fediwall/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/defnull/fediwall/blob/main/LICENSE diff --git a/roles/web-app-fider/meta/license.yml b/roles/web-app-fider/meta/license.yml new file mode 100644 index 0000000000..863a89bb8a --- /dev/null +++ b/roles/web-app-fider/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/getfider/fider/blob/main/LICENSE diff --git a/roles/web-app-flowise/meta/license.yml b/roles/web-app-flowise/meta/license.yml new file mode 100644 index 0000000000..a16b98d35c --- /dev/null +++ b/roles/web-app-flowise/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 AND LicenseRef-FlowiseAI-Commercial +url: https://github.com/FlowiseAI/Flowise/blob/main/LICENSE.md diff --git a/roles/web-app-friendica/meta/license.yml b/roles/web-app-friendica/meta/license.yml new file mode 100644 index 0000000000..5963967e70 --- /dev/null +++ b/roles/web-app-friendica/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/friendica/friendica/blob/develop/LICENSE diff --git a/roles/web-app-funkwhale/meta/license.yml b/roles/web-app-funkwhale/meta/license.yml new file mode 100644 index 0000000000..94957573cc --- /dev/null +++ b/roles/web-app-funkwhale/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://dev.funkwhale.audio/funkwhale/funkwhale/-/blob/stable/LICENSE diff --git a/roles/web-app-fusiondirectory/meta/license.yml b/roles/web-app-fusiondirectory/meta/license.yml new file mode 100644 index 0000000000..25993384de --- /dev/null +++ b/roles/web-app-fusiondirectory/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://github.com/fusiondirectory/fusiondirectory/blob/php8/LICENSE diff --git a/roles/web-app-gitea/meta/license.yml b/roles/web-app-gitea/meta/license.yml new file mode 100644 index 0000000000..900b6ea5e1 --- /dev/null +++ b/roles/web-app-gitea/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/go-gitea/gitea/blob/main/LICENSE diff --git a/roles/web-app-gitlab/meta/license.yml b/roles/web-app-gitlab/meta/license.yml new file mode 100644 index 0000000000..3d187e3eaf --- /dev/null +++ b/roles/web-app-gitlab/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/gitlabhq/gitlabhq/blob/master/LICENSE diff --git a/roles/web-app-hermes/meta/license.yml b/roles/web-app-hermes/meta/license.yml new file mode 100644 index 0000000000..5097393f60 --- /dev/null +++ b/roles/web-app-hermes/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/NousResearch/hermes-agent/blob/main/LICENSE diff --git a/roles/web-app-homeassistant/meta/license.yml b/roles/web-app-homeassistant/meta/license.yml new file mode 100644 index 0000000000..568176d41e --- /dev/null +++ b/roles/web-app-homeassistant/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/home-assistant/core/blob/dev/LICENSE.md diff --git a/roles/web-app-hugo/meta/license.yml b/roles/web-app-hugo/meta/license.yml new file mode 100644 index 0000000000..ccdce855bb --- /dev/null +++ b/roles/web-app-hugo/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/gohugoio/hugo/blob/master/LICENSE diff --git a/roles/web-app-jellyfin/meta/license.yml b/roles/web-app-jellyfin/meta/license.yml new file mode 100644 index 0000000000..7bf6d52526 --- /dev/null +++ b/roles/web-app-jellyfin/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://github.com/jellyfin/jellyfin/blob/master/LICENSE diff --git a/roles/web-app-jenkins/meta/license.yml b/roles/web-app-jenkins/meta/license.yml new file mode 100644 index 0000000000..354a5fce3e --- /dev/null +++ b/roles/web-app-jenkins/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/jenkinsci/jenkins/blob/master/LICENSE.txt diff --git a/roles/web-app-jira/meta/license.yml b/roles/web-app-jira/meta/license.yml new file mode 100644 index 0000000000..0e57a3fb09 --- /dev/null +++ b/roles/web-app-jira/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-Atlassian-Customer-Agreement +url: https://www.atlassian.com/legal/atlassian-customer-agreement +rights: + commercial_use: true + modifications: false + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/web-app-jitsi/meta/license.yml b/roles/web-app-jitsi/meta/license.yml new file mode 100644 index 0000000000..209a86c0f9 --- /dev/null +++ b/roles/web-app-jitsi/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/jitsi/jitsi-meet/blob/master/LICENSE diff --git a/roles/web-app-joomla/meta/license.yml b/roles/web-app-joomla/meta/license.yml new file mode 100644 index 0000000000..28a4ca8127 --- /dev/null +++ b/roles/web-app-joomla/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://github.com/joomla/joomla-cms/blob/6.2-dev/LICENSE.txt diff --git a/roles/web-app-keycloak/meta/license.yml b/roles/web-app-keycloak/meta/license.yml new file mode 100644 index 0000000000..de06ab64b5 --- /dev/null +++ b/roles/web-app-keycloak/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/keycloak/keycloak/blob/main/LICENSE.txt diff --git a/roles/web-app-kix/meta/license.yml b/roles/web-app-kix/meta/license.yml new file mode 100644 index 0000000000..9b3219d3f0 --- /dev/null +++ b/roles/web-app-kix/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/kix-service-software/kix-backend/blob/master/LICENSE diff --git a/roles/web-app-lam/meta/license.yml b/roles/web-app-lam/meta/license.yml new file mode 100644 index 0000000000..4c72d52081 --- /dev/null +++ b/roles/web-app-lam/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-or-later +url: https://github.com/LDAPAccountManager/lam/blob/develop/lam/copyright diff --git a/roles/web-app-listmonk/meta/license.yml b/roles/web-app-listmonk/meta/license.yml new file mode 100644 index 0000000000..e33db178b3 --- /dev/null +++ b/roles/web-app-listmonk/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/knadh/listmonk/blob/master/LICENSE diff --git a/roles/web-app-litellm/meta/license.yml b/roles/web-app-litellm/meta/license.yml new file mode 100644 index 0000000000..64c9e9bb9a --- /dev/null +++ b/roles/web-app-litellm/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT AND LicenseRef-BerriAI-Enterprise +url: https://github.com/BerriAI/litellm/blob/main/LICENSE diff --git a/roles/web-app-littlejs/meta/license.yml b/roles/web-app-littlejs/meta/license.yml new file mode 100644 index 0000000000..677a2b2e8a --- /dev/null +++ b/roles/web-app-littlejs/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/KilledByAPixel/LittleJS/blob/main/LICENSE diff --git a/roles/web-app-magento/meta/license.yml b/roles/web-app-magento/meta/license.yml new file mode 100644 index 0000000000..9e67e46f73 --- /dev/null +++ b/roles/web-app-magento/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: OSL-3.0 +url: https://github.com/magento/magento2/blob/2.4-develop/LICENSE.txt diff --git a/roles/web-app-mailu/meta/license.yml b/roles/web-app-mailu/meta/license.yml new file mode 100644 index 0000000000..1747eeb0cf --- /dev/null +++ b/roles/web-app-mailu/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/Mailu/Mailu/blob/master/LICENSE.md diff --git a/roles/web-app-mastodon/meta/license.yml b/roles/web-app-mastodon/meta/license.yml new file mode 100644 index 0000000000..92b4016c1d --- /dev/null +++ b/roles/web-app-mastodon/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/mastodon/mastodon/blob/main/LICENSE diff --git a/roles/web-app-matomo/meta/license.yml b/roles/web-app-matomo/meta/license.yml new file mode 100644 index 0000000000..23f09f68f4 --- /dev/null +++ b/roles/web-app-matomo/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-or-later +url: https://github.com/matomo-org/matomo/blob/5.x-dev/LICENSE diff --git a/roles/web-app-matrix/meta/license.yml b/roles/web-app-matrix/meta/license.yml new file mode 100644 index 0000000000..93962bfd4c --- /dev/null +++ b/roles/web-app-matrix/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/element-hq/synapse/blob/v1.163.0/LICENSE-AGPL-3.0 diff --git a/roles/web-app-mattermost/meta/license.yml b/roles/web-app-mattermost/meta/license.yml new file mode 100644 index 0000000000..d29f62e5a2 --- /dev/null +++ b/roles/web-app-mattermost/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/mattermost/mattermost/blob/master/LICENSE.txt diff --git a/roles/web-app-mediawiki/meta/license.yml b/roles/web-app-mediawiki/meta/license.yml new file mode 100644 index 0000000000..c52e192fb1 --- /dev/null +++ b/roles/web-app-mediawiki/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://github.com/wikimedia/mediawiki/blob/master/COPYING diff --git a/roles/web-app-meta/meta/license.yml b/roles/web-app-meta/meta/license.yml new file mode 100644 index 0000000000..8dde88541b --- /dev/null +++ b/roles/web-app-meta/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/kevinveenbirkenbach/meta-infinite-graph/blob/main/README.md diff --git a/roles/web-app-mini-qr/meta/license.yml b/roles/web-app-mini-qr/meta/license.yml new file mode 100644 index 0000000000..16dd1438be --- /dev/null +++ b/roles/web-app-mini-qr/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-or-later +url: https://github.com/lyqht/mini-qr/blob/main/LICENSE diff --git a/roles/web-app-minio/meta/license.yml b/roles/web-app-minio/meta/license.yml new file mode 100644 index 0000000000..13d26a6c1d --- /dev/null +++ b/roles/web-app-minio/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/minio/minio/blob/master/LICENSE diff --git a/roles/web-app-mobilizon/meta/license.yml b/roles/web-app-mobilizon/meta/license.yml new file mode 100644 index 0000000000..b3ee61ad6d --- /dev/null +++ b/roles/web-app-mobilizon/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://framagit.org/framasoft/mobilizon/-/blob/main/LICENSE diff --git a/roles/web-app-moodle/meta/license.yml b/roles/web-app-moodle/meta/license.yml new file mode 100644 index 0000000000..6f1ef31877 --- /dev/null +++ b/roles/web-app-moodle/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-or-later +url: https://github.com/moodle/moodle/blob/main/COPYING.txt diff --git a/roles/web-app-n8n/meta/license.yml b/roles/web-app-n8n/meta/license.yml new file mode 100644 index 0000000000..94feddc21e --- /dev/null +++ b/roles/web-app-n8n/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-n8n-Sustainable-Use-License +url: https://github.com/n8n-io/n8n/blob/master/LICENSE.md +rights: + commercial_use: true + modifications: true + distribution: false + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: true + disclose_source: false + network_use_disclose: false + same_license: true + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/web-app-navigator/meta/license.yml b/roles/web-app-navigator/meta/license.yml new file mode 100644 index 0000000000..0999b2501e --- /dev/null +++ b/roles/web-app-navigator/meta/license.yml @@ -0,0 +1,2 @@ +# nocheck: license-declared the deployed artefact is github.com/kevinveenbirkenbach/infinito-presentation, which carries no LICENSE file and states no licence in its README, so no licence could be read +--- diff --git a/roles/web-app-nextcloud/meta/license.yml b/roles/web-app-nextcloud/meta/license.yml new file mode 100644 index 0000000000..bacb971e8c --- /dev/null +++ b/roles/web-app-nextcloud/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/nextcloud/server/blob/master/COPYING diff --git a/roles/web-app-odoo/meta/license.yml b/roles/web-app-odoo/meta/license.yml new file mode 100644 index 0000000000..610b545da8 --- /dev/null +++ b/roles/web-app-odoo/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LGPL-3.0-only +url: https://github.com/odoo/odoo/blob/20.0/LICENSE diff --git a/roles/web-app-openbao/meta/license.yml b/roles/web-app-openbao/meta/license.yml new file mode 100644 index 0000000000..06af8487d3 --- /dev/null +++ b/roles/web-app-openbao/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-2.0 +url: https://github.com/openbao/openbao/blob/main/LICENSE diff --git a/roles/web-app-openclaw/meta/license.yml b/roles/web-app-openclaw/meta/license.yml new file mode 100644 index 0000000000..d11401191c --- /dev/null +++ b/roles/web-app-openclaw/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/openclaw/openclaw/blob/main/LICENSE diff --git a/roles/web-app-opencloud/meta/license.yml b/roles/web-app-opencloud/meta/license.yml new file mode 100644 index 0000000000..7f9837b77c --- /dev/null +++ b/roles/web-app-opencloud/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/opencloud-eu/opencloud/blob/main/LICENSE diff --git a/roles/web-app-openproject/meta/license.yml b/roles/web-app-openproject/meta/license.yml new file mode 100644 index 0000000000..2f088971c7 --- /dev/null +++ b/roles/web-app-openproject/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-only +url: https://github.com/opf/openproject/blob/dev/LICENSE diff --git a/roles/web-app-opentalk/meta/license.yml b/roles/web-app-opentalk/meta/license.yml new file mode 100644 index 0000000000..6463ac051e --- /dev/null +++ b/roles/web-app-opentalk/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: EUPL-1.2 AND CC-BY-NC-ND-4.0 +url: https://gitlab.opencode.de/opentalk/web-frontend/-/blob/main/REUSE.toml diff --git a/roles/web-app-openwebui/meta/license.yml b/roles/web-app-openwebui/meta/license.yml new file mode 100644 index 0000000000..3c15aa3657 --- /dev/null +++ b/roles/web-app-openwebui/meta/license.yml @@ -0,0 +1,19 @@ +--- +spdx: LicenseRef-Open-WebUI-License +url: https://github.com/open-webui/open-webui/blob/main/LICENSE +rights: + commercial_use: true + modifications: true + distribution: true + private_use: true + patent_use: false + self_host: true + include_copyright: true + document_changes: false + disclose_source: false + network_use_disclose: false + same_license: false + liability: true + warranty: true + trademark_use: false + open_source: false diff --git a/roles/web-app-peertube/meta/license.yml b/roles/web-app-peertube/meta/license.yml new file mode 100644 index 0000000000..e3c55c581f --- /dev/null +++ b/roles/web-app-peertube/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE diff --git a/roles/web-app-penpot/meta/license.yml b/roles/web-app-penpot/meta/license.yml new file mode 100644 index 0000000000..607e2ff159 --- /dev/null +++ b/roles/web-app-penpot/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-2.0 +url: https://github.com/penpot/penpot/blob/develop/LICENSE diff --git a/roles/web-app-pgadmin/meta/license.yml b/roles/web-app-pgadmin/meta/license.yml new file mode 100644 index 0000000000..bb951bd24b --- /dev/null +++ b/roles/web-app-pgadmin/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: PostgreSQL +url: https://github.com/pgadmin-org/pgadmin4/blob/master/LICENSE diff --git a/roles/web-app-phpldapadmin/meta/license.yml b/roles/web-app-phpldapadmin/meta/license.yml new file mode 100644 index 0000000000..808e492b69 --- /dev/null +++ b/roles/web-app-phpldapadmin/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://github.com/leenooks/phpLDAPadmin/blob/master/LICENSE diff --git a/roles/web-app-phpmyadmin/meta/license.yml b/roles/web-app-phpmyadmin/meta/license.yml new file mode 100644 index 0000000000..37f0d74436 --- /dev/null +++ b/roles/web-app-phpmyadmin/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only +url: https://github.com/phpmyadmin/phpmyadmin/blob/master/LICENSE diff --git a/roles/web-app-pihole/meta/license.yml b/roles/web-app-pihole/meta/license.yml new file mode 100644 index 0000000000..cb8e660076 --- /dev/null +++ b/roles/web-app-pihole/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: EUPL-1.2 +url: https://github.com/pi-hole/pi-hole/blob/master/LICENSE diff --git a/roles/web-app-pixelfed/meta/license.yml b/roles/web-app-pixelfed/meta/license.yml new file mode 100644 index 0000000000..e74f272944 --- /dev/null +++ b/roles/web-app-pixelfed/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/pixelfed/pixelfed/blob/dev/LICENSE diff --git a/roles/web-app-postmarks/meta/license.yml b/roles/web-app-postmarks/meta/license.yml new file mode 100644 index 0000000000..0a4f5116a3 --- /dev/null +++ b/roles/web-app-postmarks/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/ckolderup/postmarks/blob/main/LICENSE.md diff --git a/roles/web-app-pretix/meta/license.yml b/roles/web-app-pretix/meta/license.yml new file mode 100644 index 0000000000..1d4c3f99c6 --- /dev/null +++ b/roles/web-app-pretix/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/pretix/pretix/blob/master/LICENSE diff --git a/roles/web-app-prometheus/meta/license.yml b/roles/web-app-prometheus/meta/license.yml new file mode 100644 index 0000000000..2259ed6bf6 --- /dev/null +++ b/roles/web-app-prometheus/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/prometheus/prometheus/blob/main/LICENSE diff --git a/roles/web-app-roulette-wheel/meta/license.yml b/roles/web-app-roulette-wheel/meta/license.yml new file mode 100644 index 0000000000..fa9fee32d1 --- /dev/null +++ b/roles/web-app-roulette-wheel/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/kevinveenbirkenbach/roulette-wheel/blob/master/LICENSE.md diff --git a/roles/web-app-seaweedfs/meta/license.yml b/roles/web-app-seaweedfs/meta/license.yml new file mode 100644 index 0000000000..acefd3e603 --- /dev/null +++ b/roles/web-app-seaweedfs/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://github.com/seaweedfs/seaweedfs/blob/master/LICENSE diff --git a/roles/web-app-semaphore/meta/license.yml b/roles/web-app-semaphore/meta/license.yml new file mode 100644 index 0000000000..873383c7d4 --- /dev/null +++ b/roles/web-app-semaphore/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/semaphoreui/semaphore/blob/develop/LICENSE diff --git a/roles/web-app-shopware/meta/license.yml b/roles/web-app-shopware/meta/license.yml new file mode 100644 index 0000000000..7dfd9a2975 --- /dev/null +++ b/roles/web-app-shopware/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/shopware/shopware/blob/trunk/LICENSE diff --git a/roles/web-app-snipe-it/meta/license.yml b/roles/web-app-snipe-it/meta/license.yml new file mode 100644 index 0000000000..92e3607b48 --- /dev/null +++ b/roles/web-app-snipe-it/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-or-later +url: https://github.com/snipe/snipe-it/blob/master/LICENSE diff --git a/roles/web-app-socialhome/meta/license.yml b/roles/web-app-socialhome/meta/license.yml new file mode 100644 index 0000000000..ef2a362473 --- /dev/null +++ b/roles/web-app-socialhome/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-2.0 +url: https://github.com/social-home-io/socialhome/blob/main/LICENSE diff --git a/roles/web-app-stalwart/meta/license.yml b/roles/web-app-stalwart/meta/license.yml new file mode 100644 index 0000000000..bc7b2452d6 --- /dev/null +++ b/roles/web-app-stalwart/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/stalwartlabs/stalwart/blob/main/LICENSES/AGPL-3.0-only.txt diff --git a/roles/web-app-suitecrm/meta/license.yml b/roles/web-app-suitecrm/meta/license.yml new file mode 100644 index 0000000000..3678e1555d --- /dev/null +++ b/roles/web-app-suitecrm/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/salesagility/SuiteCRM-Core/blob/hotfix/LICENSE.txt diff --git a/roles/web-app-taiga/meta/license.yml b/roles/web-app-taiga/meta/license.yml new file mode 100644 index 0000000000..260a23790b --- /dev/null +++ b/roles/web-app-taiga/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-2.0 +url: https://github.com/taigaio/taiga-back/blob/main/LICENSE diff --git a/roles/web-app-wazuh/meta/license.yml b/roles/web-app-wazuh/meta/license.yml new file mode 100644 index 0000000000..4279487508 --- /dev/null +++ b/roles/web-app-wazuh/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-only AND AGPL-3.0-or-later +url: https://github.com/wazuh/wazuh/blob/main/LICENSE diff --git a/roles/web-app-weblate/meta/license.yml b/roles/web-app-weblate/meta/license.yml new file mode 100644 index 0000000000..32b5d29c4c --- /dev/null +++ b/roles/web-app-weblate/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-3.0-or-later +url: https://github.com/WeblateOrg/weblate/blob/main/LICENSE diff --git a/roles/web-app-wordpress/meta/license.yml b/roles/web-app-wordpress/meta/license.yml new file mode 100644 index 0000000000..0568733327 --- /dev/null +++ b/roles/web-app-wordpress/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://github.com/WordPress/WordPress/blob/master/license.txt diff --git a/roles/web-app-xwiki/meta/license.yml b/roles/web-app-xwiki/meta/license.yml new file mode 100644 index 0000000000..11c38f780e --- /dev/null +++ b/roles/web-app-xwiki/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LGPL-2.1-only +url: https://github.com/xwiki/xwiki-platform/blob/master/LICENSE diff --git a/roles/web-app-yourls/meta/license.yml b/roles/web-app-yourls/meta/license.yml new file mode 100644 index 0000000000..296d3f946e --- /dev/null +++ b/roles/web-app-yourls/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://github.com/YOURLS/YOURLS/blob/master/LICENSE diff --git a/roles/web-app-zammad/meta/license.yml b/roles/web-app-zammad/meta/license.yml new file mode 100644 index 0000000000..73fcbae47f --- /dev/null +++ b/roles/web-app-zammad/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://github.com/zammad/zammad/blob/develop/LICENSE diff --git a/roles/web-opt-rdr-domains/meta/license.yml b/roles/web-opt-rdr-domains/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-opt-rdr-domains/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-opt-rdr-www/meta/license.yml b/roles/web-opt-rdr-www/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-opt-rdr-www/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-api/meta/license.yml b/roles/web-svc-api/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-api/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-asset/meta/license.yml b/roles/web-svc-asset/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-asset/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-cdn/meta/license.yml b/roles/web-svc-cdn/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-cdn/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-collabora/meta/license.yml b/roles/web-svc-collabora/meta/license.yml new file mode 100644 index 0000000000..7d134ed47e --- /dev/null +++ b/roles/web-svc-collabora/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MPL-2.0 +url: https://raw.githubusercontent.com/CollaboraOnline/online/master/COPYING diff --git a/roles/web-svc-coturn/meta/license.yml b/roles/web-svc-coturn/meta/license.yml new file mode 100644 index 0000000000..a9e9191def --- /dev/null +++ b/roles/web-svc-coturn/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: BSD-3-Clause +url: https://raw.githubusercontent.com/coturn/coturn/master/LICENSE diff --git a/roles/web-svc-design/meta/license.yml b/roles/web-svc-design/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-design/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-file/meta/license.yml b/roles/web-svc-file/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-file/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-html/meta/license.yml b/roles/web-svc-html/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-html/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-legal/meta/license.yml b/roles/web-svc-legal/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-legal/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-libretranslate/meta/license.yml b/roles/web-svc-libretranslate/meta/license.yml new file mode 100644 index 0000000000..89b3a0045a --- /dev/null +++ b/roles/web-svc-libretranslate/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://raw.githubusercontent.com/LibreTranslate/LibreTranslate/main/LICENSE diff --git a/roles/web-svc-logout/meta/license.yml b/roles/web-svc-logout/meta/license.yml new file mode 100644 index 0000000000..d410069d88 --- /dev/null +++ b/roles/web-svc-logout/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: MIT +url: https://raw.githubusercontent.com/kevinveenbirkenbach/universal-logout/main/LICENSE diff --git a/roles/web-svc-mirror/meta/license.yml b/roles/web-svc-mirror/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-mirror/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-onlyoffice/meta/license.yml b/roles/web-svc-onlyoffice/meta/license.yml new file mode 100644 index 0000000000..5248ef5fff --- /dev/null +++ b/roles/web-svc-onlyoffice/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: AGPL-3.0-only +url: https://raw.githubusercontent.com/ONLYOFFICE/DocumentServer/master/LICENSE diff --git a/roles/web-svc-s1/meta/license.yml b/roles/web-svc-s1/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-s1/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-seaweedfs/meta/license.yml b/roles/web-svc-seaweedfs/meta/license.yml new file mode 100644 index 0000000000..48b319de44 --- /dev/null +++ b/roles/web-svc-seaweedfs/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: Apache-2.0 +url: https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/LICENSE diff --git a/roles/web-svc-simpleicons/meta/license.yml b/roles/web-svc-simpleicons/meta/license.yml new file mode 100644 index 0000000000..e8d5137f9a --- /dev/null +++ b/roles/web-svc-simpleicons/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: CC0-1.0 +url: https://raw.githubusercontent.com/simple-icons/simple-icons/develop/LICENSE.md diff --git a/roles/web-svc-translate/meta/license.yml b/roles/web-svc-translate/meta/license.yml new file mode 100644 index 0000000000..f12b5dfa79 --- /dev/null +++ b/roles/web-svc-translate/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: LicenseRef-Infinito-Nexus-Community +url: https://github.com/infinito-nexus/core/blob/main/LICENSE.md diff --git a/roles/web-svc-xmpp/meta/license.yml b/roles/web-svc-xmpp/meta/license.yml new file mode 100644 index 0000000000..2030e88182 --- /dev/null +++ b/roles/web-svc-xmpp/meta/license.yml @@ -0,0 +1,3 @@ +--- +spdx: GPL-2.0-or-later +url: https://raw.githubusercontent.com/processone/ejabberd/master/COPYING diff --git a/templates/roles/README.md.j2.tmpl b/templates/roles/README.md.j2.tmpl index 84cd906aa0..93c4958895 100644 --- a/templates/roles/README.md.j2.tmpl +++ b/templates/roles/README.md.j2.tmpl @@ -162,3 +162,10 @@ The inventory under `$WORKDIR` is written by the container as `root`, including Part of the [Infinito.Nexus Project](https://s.infinito.nexus/code) and maintained by [Kevin Veen-Birkenbach](https://www.veen.world). Licensed under the [Infinito.Nexus Community License (Non-Commercial)](https://s.infinito.nexus/license). +{% if application_license %} +{% if application_license.is_own -%} +This role deploys no third-party application, so the licence above is the only one that applies. +{%- else -%} +That licence covers this role. The software it deploys is a separate grant: [{{ application_license.spdx }}]({{ application_license.source }}), under which commercial use is {{ application_license.commercial }}. You owe its authors this much: {{ application_license.duties }}. Permission for one of the two is not permission for the other. +{%- endif %} +{%- endif %} diff --git a/tests/lint/ansible/roles/meta/test_cache_host_ownership.py b/tests/lint/ansible/roles/meta/test_cache_host_ownership.py index e33aa96390..bce6458cf2 100644 --- a/tests/lint/ansible/roles/meta/test_cache_host_ownership.py +++ b/tests/lint/ansible/roles/meta/test_cache_host_ownership.py @@ -22,7 +22,8 @@ role's own ``meta/networks.yml`` is read separately, and a README naming an upstream is prose rather than a fetch. ``meta/info.yml`` is skipped for that second reason: its ``homepage`` is where a human reads about the application, so a role whose upstream publishes on a cached domain would otherwise be -charged with fetching from it. +charged with fetching from it. ``meta/license.yml`` is skipped for the same +reason: its ``url`` cites where the licence was read, and nothing fetches it. Fix a violation by moving the declaration to the role that fetches. Where two roles genuinely share an upstream, only one can own it; mark that entry @@ -52,7 +53,11 @@ import yaml from utils.cache.files import iter_project_files, read_text from utils.cache.yaml import load_yaml_any -from utils.roles.mapping import ROLE_FILE_META_INFO, ROLE_FILE_META_NETWORKS +from utils.roles.mapping import ( + ROLE_FILE_META_INFO, + ROLE_FILE_META_LICENSE, + ROLE_FILE_META_NETWORKS, +) from . import PROJECT_ROOT @@ -61,7 +66,11 @@ ROLES_DIR = PROJECT_ROOT / "roles" NETWORKS = ROLE_FILE_META_NETWORKS SHARED_OWNER = "svc-cache-package" SCANNED_SUFFIXES = (".yml", ".yaml", ".j2", ".py", ".sh", "Dockerfile") -UNFETCHED = (Path(NETWORKS).name, Path(ROLE_FILE_META_INFO).name) +UNFETCHED = ( + Path(NETWORKS).name, + Path(ROLE_FILE_META_INFO).name, + Path(ROLE_FILE_META_LICENSE).name, +) def _cache_hosts(role_dir) -> dict: diff --git a/tests/lint/ansible/roles/meta/test_info.py b/tests/lint/ansible/roles/meta/test_info.py index e574b68e1d..40db4ccffa 100644 --- a/tests/lint/ansible/roles/meta/test_info.py +++ b/tests/lint/ansible/roles/meta/test_info.py @@ -7,6 +7,8 @@ * file-root convention: the file's content IS the value of ``applications..info`` — there is NO wrapping ``info:`` key; * allowed top-level keys: ``logo``, ``homepage``, ``video``, ``display``; + the licence of the deployed software lives in ``meta/license.yml``, + which ``test_license_declared.py`` guards; * ``logo`` is a mapping with at least a string ``class:`` field; * ``homepage`` and ``video`` are non-empty strings; * ``display`` is a bool; diff --git a/tests/lint/ansible/roles/meta/test_license_declared.py b/tests/lint/ansible/roles/meta/test_license_declared.py new file mode 100644 index 0000000000..4083cc2610 --- /dev/null +++ b/tests/lint/ansible/roles/meta/test_license_declared.py @@ -0,0 +1,131 @@ +"""Lint guard: ``roles//meta/license.yml``. + +Every invokable role names the licence of the software it deploys. The project +licence governs this repository's code and says nothing about the application a +role installs, which is where a restriction on commercial use usually sits: a +deployment cleared to use Infinito.Nexus commercially is still barred from +NLLB-200's weights. + +The file carries ``spdx`` (one id, or ids joined by ``AND`` / ``OR``), ``url`` +naming where the licence was read, and ``rights`` only for a grant +``meta/licenses.yml`` does not carry. A role that installs no software of its +own says so with ``# nocheck: license-declared `` in the file's head. +""" + +from __future__ import annotations + +import unittest +from typing import TYPE_CHECKING + +from utils.annotations.suppress import is_suppressed_in_head +from utils.cache.files import PROJECT_ROOT, read_text +from utils.cache.yaml import load_yaml_any +from utils.licensing.rights import FIELDS, resolve +from utils.roles.mapping import ROLE_FILE_META_LICENSE +from utils.roles.required_by_coverage import role_is_invokable + +if TYPE_CHECKING: + from pathlib import Path + +ROLES_DIR = PROJECT_ROOT / "roles" + +_RULE = "license-declared" +_ALLOWED_KEYS = frozenset({"spdx", "url", "rights"}) +_RIGHT_KEYS = frozenset((*FIELDS, "open_source")) + + +def _suppressed(path: Path) -> bool: + """Whether the role opted out in the head of its licence file. + + Args: + path: the role's ``meta/license.yml``. + """ + if not path.is_file(): + return False + return is_suppressed_in_head(read_text(str(path)).splitlines(), _RULE) + + +def _problems(role: str, path: Path) -> list[str]: + """Return what is wrong with one role's licence file. + + Args: + role: the role name, used in the message. + path: the role's ``meta/license.yml``. + """ + if not path.is_file(): + return [f"{role}: no meta/license.yml"] + if _suppressed(path): + return [] + + parsed = load_yaml_any(str(path), default_if_missing={}) or {} + if not isinstance(parsed, dict): + return [f"{role}: meta/license.yml must be a mapping"] + + found: list[str] = [] + unknown = sorted(set(parsed) - _ALLOWED_KEYS) + if unknown: + found.append(f"{role}: non-allowlisted key(s) {unknown}") + + for field in ("spdx", "url"): + value = parsed.get(field) + if not isinstance(value, str) or not value.strip(): + found.append(f"{role}: `{field}` must be a non-empty string") + + inline = parsed.get("rights") + if inline is not None: + if not isinstance(inline, dict): + found.append(f"{role}: `rights` must be a mapping") + else: + wrong = sorted(set(inline) ^ _RIGHT_KEYS) + if wrong: + found.append( + f"{role}: `rights` must hold exactly {sorted(_RIGHT_KEYS)}" + ) + elif any(not isinstance(value, bool) for value in inline.values()): + found.append(f"{role}: every `rights` value must be a bool") + + spdx = parsed.get("spdx") + if ( + isinstance(spdx, str) + and spdx.strip() + and not found + and resolve(spdx, inline if isinstance(inline, dict) else None) is None + ): + found.append( + f"{role}: `{spdx}` names no entry in meta/licenses.yml and the " + "role declares no inline `rights`" + ) + + return found + + +def offenders() -> list[str]: + """Return every invokable role whose licence declaration is missing or wrong.""" + if not ROLES_DIR.is_dir(): + return [] + found: list[str] = [] + for role_dir in sorted(ROLES_DIR.iterdir()): + if not role_dir.is_dir() or not role_is_invokable(role_dir.name): + continue + found.extend(_problems(role_dir.name, role_dir / ROLE_FILE_META_LICENSE)) + return found + + +class TestLicenseDeclared(unittest.TestCase): + def test_every_invokable_role_names_its_software_licence(self) -> None: + found = offenders() + report = "\n".join(f" - {problem}" for problem in found) + self.assertFalse( + found, + f"{len(found)} problem(s) with the declared licence of the software " + "these roles deploy, so the licence-context page cannot say whether " + f"they may be used commercially:\n{report}\n\n" + "Add meta/license.yml with `spdx` and the `url` you read it from, " + "add the id to meta/licenses.yml or give the role inline `rights`, " + f"or say why there is nothing to declare with `# nocheck: {_RULE} " + "`.", + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/unit/python/roles/web-app-docs/files/infinito_docs/generators/test_licensing.py b/tests/unit/python/roles/web-app-docs/files/infinito_docs/generators/test_licensing.py new file mode 100644 index 0000000000..971d138e93 --- /dev/null +++ b/tests/unit/python/roles/web-app-docs/files/infinito_docs/generators/test_licensing.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +import importlib +import sys +import unittest +from pathlib import Path +from tempfile import TemporaryDirectory + +from utils.cache.files import read_text +from utils.roles.mapping import ROLE_FILE_META_LICENSE + +from . import PROJECT_ROOT + +_TOOLING = str(PROJECT_ROOT / "roles" / "web-app-docs" / "files" / "python") +if _TOOLING not in sys.path: + sys.path.insert(0, _TOOLING) + +licensing = importlib.import_module("infinito_docs.generators.licensing") + +_AGPL = "---\nspdx: AGPL-3.0-or-later\nurl: https://example.invalid/COPYING\n" +_MIT = "---\nspdx: MIT\nurl: https://example.invalid/LICENSE\n" +_NOTHING = "# nocheck: license-declared installs nothing of its own\n---\n" + +_INLINE = ( + "---\nspdx: LicenseRef-Probe-EULA\nurl: https://example.invalid/eula\nrights:\n" + + "\n".join( + f" {field}: {'true' if field in ('private_use', 'self_host', 'commercial_use') else 'false'}" + for field in ( + "commercial_use", + "modifications", + "distribution", + "private_use", + "patent_use", + "self_host", + "include_copyright", + "document_changes", + "disclose_source", + "network_use_disclose", + "same_license", + "liability", + "warranty", + "trademark_use", + "open_source", + ) + ) +) + + +def _render(roles: dict[str, str]) -> str: + """Render the page for *roles* and return it. + + Args: + roles: ``{role name: body of its meta/license.yml}``; an empty body + declares no licence file at all. + """ + with TemporaryDirectory() as tmp: + roles_dir = Path(tmp) / "roles" + for name, body in roles.items(): + path = roles_dir / name / ROLE_FILE_META_LICENSE + path.parent.mkdir(parents=True) + if body: + path.write_text(body, encoding="utf-8") + output = Path(tmp) / "out" / "licensing.rst" + licensing.generate(roles_dir, output) + return read_text(str(output)) + + +class TestLicensingGenerator(unittest.TestCase): + def test_a_role_is_grouped_by_the_context_its_rights_derive(self): + page = _render({"web-app-alpha": _AGPL, "web-app-beta": _MIT}) + self.assertIn("Network copyleft", page) + self.assertIn("Permissive", page) + self.assertIn("AGPL-3.0-or-later", page) + self.assertIn("MIT", page) + + def test_the_matrix_carries_one_column_per_right(self): + page = _render({"web-app-alpha": _MIT}) + header = page[page.index("* - Role") : page.index("* - ``web-app-alpha``")] + self.assertEqual(len(licensing.COLUMNS) + 1, header.count(" - ")) + + def test_an_agpl_role_is_marked_as_owing_network_disclosure(self): + page = _render({"web-app-alpha": _AGPL}) + row = page[page.index("* - ``web-app-alpha``") :] + cells = [ + line.strip()[2:] + for line in row.splitlines()[1:] + if line.startswith(" - ") + ] + index = [field for field, _ in licensing.COLUMNS].index("network_use_disclose") + self.assertEqual("yes", cells[index + 1]) + + def test_a_right_the_licence_withholds_renders_as_a_word(self): + page = _render({"web-app-alpha": _MIT}) + row = page[page.index("* - ``web-app-alpha``") :] + cells = [ + line.strip()[2:] + for line in row.splitlines()[1:] + if line.startswith(" - ") + ] + index = [field for field, _ in licensing.COLUMNS].index("patent_use") + self.assertEqual("no", cells[index + 1]) + + def test_inline_rights_resolve_without_a_table_entry(self): + page = _render({"web-app-alpha": _INLINE}) + self.assertIn("web-app-alpha", page) + self.assertNotIn("Not yet determined", page) + + def test_a_role_without_a_licence_file_is_listed_as_undetermined(self): + page = _render({"web-app-alpha": ""}) + self.assertIn("Not yet determined", page) + self.assertIn("web-app-alpha", page) + + def test_a_role_that_deploys_nothing_is_not_reported_as_a_gap(self): + page = _render({"web-app-alpha": _NOTHING}) + self.assertIn("Deploying no third-party software", page) + self.assertNotIn("Not yet determined", page) + + def test_a_non_invokable_role_is_left_off_the_page(self): + page = _render({"web-app-alpha": _MIT, "sys-ctl-cln-gamma": _MIT}) + self.assertIn("web-app-alpha", page) + self.assertNotIn("sys-ctl-cln-gamma", page) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/unit/python/roles/web-app-docs/files/infinito_docs/test_commands.py b/tests/unit/python/roles/web-app-docs/files/infinito_docs/test_commands.py index 10de0eb8c5..84e40d2cd5 100644 --- a/tests/unit/python/roles/web-app-docs/files/infinito_docs/test_commands.py +++ b/tests/unit/python/roles/web-app-docs/files/infinito_docs/test_commands.py @@ -62,6 +62,7 @@ class TestProgress(unittest.TestCase): "infinito_docs.generators.aliases", "infinito_docs.generators.cli_commands", "infinito_docs.generators.integrations", + "infinito_docs.generators.licensing", "infinito_docs.generators.readmes", "cli.build.docs.readme", "cli.build.docs.readme.overview", diff --git a/tests/unit/python/utils/licensing/__init__.py b/tests/unit/python/utils/licensing/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/python/utils/licensing/test_rights.py b/tests/unit/python/utils/licensing/test_rights.py new file mode 100644 index 0000000000..ceca90039a --- /dev/null +++ b/tests/unit/python/utils/licensing/test_rights.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +import unittest + +from utils.licensing.rights import FIELDS, context_of, resolve, table + +EXPECTED_CONTEXT = { + "MIT": "permissive", + "Apache-2.0": "permissive", + "BSD-3-Clause": "permissive", + "CC0-1.0": "permissive", + "PostgreSQL": "permissive", + "GPL-2.0-only": "copyleft", + "GPL-3.0-only": "copyleft", + "LGPL-3.0-or-later": "copyleft", + "MPL-2.0": "copyleft", + "EPL-1.0": "copyleft", + "AGPL-3.0-only": "copyleft-network", + "AGPL-3.0-or-later": "copyleft-network", + "EUPL-1.2": "copyleft-network", + "OSL-3.0": "copyleft-network", + "Elastic-2.0": "source-available", + "BUSL-1.1": "source-available", + "SSPL-1.0": "source-available", + "CC-BY-NC-4.0": "non-commercial", + "LicenseRef-Infinito-Nexus-Community": "non-commercial", + "LicenseRef-Baserow-Premium": "proprietary", +} + +EXPECTED_EXPRESSION = { + "MIT AND BSD-3-Clause": "permissive", + "MPL-2.0 AND LGPL-3.0-or-later": "copyleft", + "EUPL-1.2 AND CC-BY-NC-ND-4.0": "non-commercial", + "MIT AND LicenseRef-Baserow-Premium": "proprietary", + "MIT OR Apache-2.0": "permissive", + "GPL-2.0-only OR GPL-3.0-only": "copyleft", + "AGPL-3.0-only OR LicenseRef-RSALv2 OR SSPL-1.0": "copyleft-network", + "Elastic-2.0 OR SSPL-1.0 OR AGPL-3.0-only": "copyleft-network", +} + + +class TestLicenceTable(unittest.TestCase): + def test_every_entry_declares_every_field(self): + incomplete = { + name: sorted({*FIELDS, "open_source"} - set(row)) + for name, row in table().items() + if {*FIELDS, "open_source"} - set(row) + } + self.assertEqual({}, incomplete) + + def test_every_value_is_a_bool(self): + wrong = [ + f"{name}.{field}" + for name, row in table().items() + for field in (*FIELDS, "open_source") + if not isinstance(row.get(field), bool) + ] + self.assertEqual([], wrong) + + +class TestContextDerivation(unittest.TestCase): + def test_each_licence_derives_its_expected_context(self): + for spdx, expected in EXPECTED_CONTEXT.items(): + with self.subTest(spdx=spdx): + self.assertEqual(expected, context_of(resolve(spdx, None)).key) + + def test_an_unknown_id_without_inline_rights_is_unknown(self): + self.assertIsNone(resolve("Not-A-Real-Licence-9.9", None)) + self.assertEqual("unknown", context_of(None).key) + + +class TestExpressions(unittest.TestCase): + def test_each_expression_derives_its_expected_context(self): + for expression, expected in EXPECTED_EXPRESSION.items(): + with self.subTest(expression=expression): + self.assertEqual(expected, context_of(resolve(expression, None)).key) + + def test_and_takes_the_strictest_duty_of_either_side(self): + folded = resolve("MIT AND AGPL-3.0-only", None) + self.assertTrue(folded["network_use_disclose"]) + self.assertTrue(folded["include_copyright"]) + + def test_or_keeps_one_whole_licence_rather_than_mixing_fields(self): + chosen = resolve("AGPL-3.0-only OR LicenseRef-RSALv2 OR SSPL-1.0", None) + self.assertEqual(chosen, table()["AGPL-3.0-only"]) + + def test_an_expression_naming_one_unknown_id_falls_back_to_inline_rights(self): + inline = dict.fromkeys((*FIELDS, "open_source"), False) + inline["commercial_use"] = True + inline["modifications"] = True + self.assertEqual( + "source-available", + context_of(resolve("LicenseRef-Probe-EULA", inline)).key, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/utils/licensing/__init__.py b/utils/licensing/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/utils/licensing/contexts.py b/utils/licensing/contexts.py new file mode 100644 index 0000000000..05d41e4172 --- /dev/null +++ b/utils/licensing/contexts.py @@ -0,0 +1,93 @@ +"""In which context a role's deployed software may be used. + +The project licence governs this repository's own code. It does not reach the +software a role deploys, and that software is where the restriction usually +sits: a deployment holding written permission for commercial use of +Infinito.Nexus is still barred from NLLB-200's weights, which are CC BY-NC. + +A boolean would be wrong for most of the catalogue, because the common answer +is neither yes nor no but "yes, and offering it as a service obliges you to +publish your changes". The classes below keep that distinction. + +``unknown`` is a legitimate value and the default for anything unread. A gap +has to be visible; a role silently absent from the index would read as safe. +""" + +from __future__ import annotations + +from typing import NamedTuple + + +class Context(NamedTuple): + """One licence class and what it permits. + + Args: + key: the value written in ``meta/info.yml``. + title: heading for the generated page. + commercial: short verdict on commercial use. + duties: what the deployer owes beyond using it. + """ + + key: str + title: str + commercial: str + duties: str + + +PERMISSIVE = Context( + "permissive", + "Permissive", + "allowed", + "keep the copyright notice and the licence text", +) +COPYLEFT = Context( + "copyleft", + "Copyleft", + "allowed", + "publish the source of changes you distribute", +) +COPYLEFT_NETWORK = Context( + "copyleft-network", + "Network copyleft", + "allowed", + "publish the source of changes once you offer it over a network, " + "which a hosted deployment does", +) +SOURCE_AVAILABLE = Context( + "source-available", + "Source available, not open source", + "restricted by the vendor's terms", + "read the licence before offering it as a service; several forbid exactly that", +) +NON_COMMERCIAL = Context( + "non-commercial", + "Non-commercial only", + "prohibited", + "use privately or for education; a commercial deployment needs a separate grant", +) +PROPRIETARY = Context( + "proprietary", + "Proprietary", + "decided by the vendor's agreement", + "accept the vendor's terms; redistribution is usually forbidden", +) +UNKNOWN = Context( + "unknown", + "Not yet determined", + "unknown, assume the strictest", + "establish the licence before relying on this role commercially", +) + +CONTEXTS: tuple[Context, ...] = ( + PERMISSIVE, + COPYLEFT, + COPYLEFT_NETWORK, + SOURCE_AVAILABLE, + NON_COMMERCIAL, + PROPRIETARY, + UNKNOWN, +) + +BY_KEY: dict[str, Context] = {context.key: context for context in CONTEXTS} + +ORDER: tuple[str, ...] = tuple(context.key for context in CONTEXTS) diff --git a/utils/licensing/rights.py b/utils/licensing/rights.py new file mode 100644 index 0000000000..7c4357044e --- /dev/null +++ b/utils/licensing/rights.py @@ -0,0 +1,143 @@ +"""What a licence grants, requires and disclaims, as one boolean per field. + +The fields are the taxonomy ``choosealicense.com`` publishes, so each value is +checkable against an outside source instead of this repository's opinion: + +* **Grants** -- ``commercial_use``, ``modifications``, ``distribution``, + ``private_use``, ``patent_use``, ``self_host``. True when the licence allows + it. ``self_host`` is the question this repository actually asks and the one + field the upstream taxonomy has no column for. +* **Duties** -- ``include_copyright``, ``document_changes``, + ``disclose_source``, ``network_use_disclose``, ``same_license``. True when + the licence demands it. +* **Disclaimers** -- ``liability``, ``warranty``. True when the licence + disclaims it, which is the normal case and favours the author. +* **Not granted** -- ``trademark_use``. True only where the licence grants + trademark rights, which almost none do. + +``open_source`` is not a right. It records whether the licence meets the Open +Source Definition and is the only thing that separates a source-available +grant (Elastic-2.0, BUSL, SSPL, the n8n Sustainable Use Licence) from a +permissive one: those four allow commercial use and modification, so no column +of the taxonomy tells them apart. + +An expression combines ids with ``AND`` and ``OR``. ``AND`` means every licence +applies at once, so the strictest wins: grants intersect, duties and +disclaimers union. ``OR`` means the licensee picks one whole licence, so the +alternative with the most favourable context wins and its own row is used. +Folding ``OR`` field by field would invent a licence nobody offers: Redis under +``AGPL-3.0-only OR RSALv2 OR SSPL-1.0`` would come out carrying no duty at all, +because no single duty is common to all three. +""" + +from __future__ import annotations + +from utils.cache.files import PROJECT_ROOT +from utils.cache.yaml import load_yaml +from utils.licensing.contexts import ( + COPYLEFT, + COPYLEFT_NETWORK, + NON_COMMERCIAL, + ORDER, + PERMISSIVE, + PROPRIETARY, + SOURCE_AVAILABLE, + UNKNOWN, + Context, +) + +TABLE = PROJECT_ROOT / "meta" / "licenses.yml" + +GRANTS = ( + "commercial_use", + "modifications", + "distribution", + "private_use", + "patent_use", + "self_host", +) +DUTIES = ( + "include_copyright", + "document_changes", + "disclose_source", + "network_use_disclose", + "same_license", +) +DISCLAIMERS = ("liability", "warranty") +NOT_GRANTED = ("trademark_use",) + +FIELDS = GRANTS + DUTIES + DISCLAIMERS + NOT_GRANTED + +_FLAG = "open_source" + + +def table() -> dict[str, dict[str, bool]]: + """Return the licence table keyed by SPDX id.""" + return load_yaml(str(TABLE)) + + +def _all_of(rows: list[dict[str, bool]]) -> dict[str, bool]: + """Fold licences that apply simultaneously into one row. + + Args: + rows: the rights of each licence joined by ``AND``. + """ + folded: dict[str, bool] = {} + for field in (*FIELDS, _FLAG): + values = [bool(row.get(field)) for row in rows] + folded[field] = ( + all(values) if field in GRANTS + NOT_GRANTED + (_FLAG,) else any(values) + ) + return folded + + +def resolve(expression: str, inline: dict[str, bool] | None) -> dict[str, bool] | None: + """Return the rights of an SPDX expression, or None when unknown. + + Args: + expression: one id, or ids joined by ``AND`` / ``OR``; ``OR`` binds + loosest, so ``A AND B OR C`` reads as ``(A AND B) OR C``. + inline: rights the role declares itself, used when the expression + names a single id the table does not carry. + """ + known = table() + alternatives = [part.strip() for part in expression.split(" OR ")] + resolved: list[dict[str, bool]] = [] + + for alternative in alternatives: + ids = [part.strip() for part in alternative.split(" AND ")] + rows = [known[one] for one in ids if one in known] + if len(rows) != len(ids): + if len(ids) == 1 and inline is not None: + rows = [inline] + else: + return None + resolved.append(rows[0] if len(rows) == 1 else _all_of(rows)) + + return min(resolved, key=lambda row: ORDER.index(context_of(row).key)) + + +def context_of(rights: dict[str, bool] | None) -> Context: + """Classify rights into the context the generated page groups by. + + Args: + rights: a resolved rights row, or None when the licence is unread. + + The order is the discriminating one, not the order of the fields. + ``commercial_use`` is asked first because it is the question a deployer + brings to the page; a vendor grant that reserves commercial use is + non-commercial even though it is also closed. + """ + if rights is None: + return UNKNOWN + if not rights.get("commercial_use"): + return NON_COMMERCIAL + if not rights.get("modifications"): + return PROPRIETARY + if not rights.get(_FLAG): + return SOURCE_AVAILABLE + if rights.get("network_use_disclose"): + return COPYLEFT_NETWORK + if rights.get("same_license"): + return COPYLEFT + return PERMISSIVE diff --git a/utils/licensing/roles.py b/utils/licensing/roles.py new file mode 100644 index 0000000000..222af67dc1 --- /dev/null +++ b/utils/licensing/roles.py @@ -0,0 +1,67 @@ +"""A role's declared licence, resolved against the central table.""" + +from __future__ import annotations + +from typing import TYPE_CHECKING, NamedTuple + +from utils.annotations.suppress import is_suppressed_in_head +from utils.cache.files import read_text +from utils.cache.yaml import load_yaml +from utils.licensing.rights import context_of, resolve +from utils.roles.mapping import ROLE_FILE_META_LICENSE + +if TYPE_CHECKING: + from pathlib import Path + + from utils.licensing.contexts import Context + +RULE = "license-declared" +OWN_LICENSE = "LicenseRef-Infinito-Nexus-Community" + + +def deploys_nothing(role_dir: Path) -> bool: + """Whether the role declares that it installs no third-party software. + + Args: + role_dir: the role's directory. + """ + path = role_dir / ROLE_FILE_META_LICENSE + if not path.is_file(): + return False + return is_suppressed_in_head(read_text(str(path)).splitlines(), RULE) + + +class Declared(NamedTuple): + """What a role says about the licence of the software it deploys. + + Args: + spdx: the SPDX expression, empty when the role declares none. + url: where the licence was read. + rights: the resolved rights row, None when no table entry matches. + context: the class the generated page groups the role under. + """ + + spdx: str + url: str + rights: dict[str, bool] | None + context: Context + + +def declared(role_dir: Path) -> Declared | None: + """Return a role's licence, or None when it declares no licence file. + + Args: + role_dir: the role's directory. + """ + path = role_dir / ROLE_FILE_META_LICENSE + if not path.is_file(): + return None + parsed = load_yaml(str(path)) + if not isinstance(parsed, dict): + return None + spdx = str(parsed.get("spdx", "")).strip() + inline = parsed.get("rights") + rights = ( + resolve(spdx, inline if isinstance(inline, dict) else None) if spdx else None + ) + return Declared(spdx, str(parsed.get("url", "")), rights, context_of(rights)) diff --git a/utils/roles/mapping.py b/utils/roles/mapping.py index 941b3c7af8..8f2866653b 100644 --- a/utils/roles/mapping.py +++ b/utils/roles/mapping.py @@ -184,6 +184,7 @@ ROLE_FILE_META_RBAC = "meta/rbac.yml" ROLE_FILE_META_VOLUMES = "meta/volumes.yml" ROLE_FILE_META_SECRETS = "meta/secrets.yml" ROLE_FILE_META_INFO = "meta/info.yml" +ROLE_FILE_META_LICENSE = "meta/license.yml" ROLE_FILE_META_USERS = "meta/users.yml" ROLE_FILE_META_TESTS = "meta/tests.yml" @@ -356,6 +357,14 @@ ROLE_FILES: dict[str, dict[str, object]] = { "description": ("Optional dashboard / UI metadata (logo, label) for the role."), "types": _all(mandatory=False), }, + ROLE_FILE_META_LICENSE: { + "description": ( + "Licence of the software the role deploys: the SPDX expression, " + "where it was read, and inline rights for a grant the central " + "table does not carry." + ), + "types": _all(mandatory=False), + }, ROLE_FILE_META_MCP: { "description": ( "Model Context Protocol capability of the role: direction, transport, "