diff --git a/README.md b/README.md index 0f1b363..b6ec82f 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,10 @@ We plan to regularly release minor and patch versions, whenever new features are ## Licensing -GNU General Public License v3.0 or later. +This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later. -See [COPYING](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text. +See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/community.routeros/blob/main/COPYING) for the full text. + +Parts of the collection are licensed under the [BSD 2-Clause license](https://github.com/ansible-collections/community.routeros/blob/main/LICENSES/BSD-2-Clause.txt). + +Most files in the collection that are not automatically generated have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s). diff --git a/tests/sanity/extra/licenses.py b/tests/sanity/extra/licenses.py index fe02989..4708822 100755 --- a/tests/sanity/extra/licenses.py +++ b/tests/sanity/extra/licenses.py @@ -21,7 +21,7 @@ def find_licenses(filename, relax=False): spdx_license_identifiers = [] other_license_identifiers = [] has_copyright = False - with open(filename, 'r') as f: + with open(filename, 'r', encoding='utf-8') as f: for line in f: line = line.rstrip() if 'Copyright ' in line: @@ -58,6 +58,7 @@ def main(): """Main entry point.""" paths = sys.argv[1:] or sys.stdin.read().splitlines() + # The following paths are allowed to have no license identifier no_comments_allowed = [ 'changelogs/fragments/*.yml', 'tests/sanity/extra/*.json', @@ -68,11 +69,13 @@ def main(): 'COPYING', ] + # Files of this name are allowed to be empty empty_allowed = [ '.keep', '__init__.py', ] + # These files are completely ignored ignore_paths = [ 'CHANGELOG.rst', 'changelogs/changelog.yaml',