Skip to content

Lint license check overhaul

Michael Pöhn requested to merge uniqx/fdroidserver:lint-license-overhaul into master

This adds a couple of new configuration options to config.py to allow more fine-grained control over lint license checks.

Until now our default lint behavior was to check whether a license name is a standardized SPDX license ID. So eg. lint happily accepts Adobe-2006 which is not recognized as libre by FSF and also not accepted as open source by OSI. This MR changes the default behavior to require a license for apps to be either approved by FSF or OSI.

I added settings for disabling this lint check, allow all licenses with SPDX license IDs (our old behavior) and also adding a list of custom license names.

I've documented all details in example/config.py:

# `fdroid lint` checks licenses in all metadata against a built agains 
# white lists. By default we will require license metadata to be present
# and only allow FSF or OSI approved licenses. We're using the
# standardized SPDX license IDs.
#
# lint_license_check_disabled = False
# lint_license_allow_fsf_approved = True
# lint_license_allow_osi_approved = True

# You can also configure `fdroid lint` to allow all licenses registered
# with SPDX and even add custom licenses you would like to allow in your
# repository.
#
# lint_license_allow_spdx_all = False
# lint_license_additional = (
#     'Custom-License-A',
#     'Another-License',
# )

Merge request reports