[OE-core] [PATCH 4/8] Add copyleft compliance class

Khem Raj raj.khem at gmail.com
Wed Dec 7 21:53:06 UTC 2011


On (07/12/11 11:34), Beth Flanagan wrote:
> From: Christopher Larson <kergoth at gmail.com>
> 
> Deploys sources for recipes for compliance with copyleft-style licenses
> Defaults to using symlinks, as it's a quick operation, and one can easily
> follow the links when making use of the files (e.g. tar with the -h arg).
> 
> By default, includes all GPL and LGPL, and excludes CLOSED and Proprietary.
> 
> Signed-off-by: Christopher Larson <kergoth at gmail.com>
> ---
>  meta/classes/copyleft_compliance.bbclass |   94 ++++++++++++++++++++++++++++++
>  1 files changed, 94 insertions(+), 0 deletions(-)
>  create mode 100644 meta/classes/copyleft_compliance.bbclass
> 
> diff --git a/meta/classes/copyleft_compliance.bbclass b/meta/classes/copyleft_compliance.bbclass
> new file mode 100644
> index 0000000..5d9ab11
> --- /dev/null
> +++ b/meta/classes/copyleft_compliance.bbclass
> @@ -0,0 +1,94 @@
> +# Deploy sources for recipes for compliance with copyleft-style licenses
> +# Defaults to using symlinks, as it's a quick operation, and one can easily
> +# follow the links when making use of the files (e.g. tar with the -h arg).
> +#
> +# By default, includes all GPL and LGPL, and excludes CLOSED and Proprietary.
> +#
> +# vi:sts=4:sw=4:et
> +
> +COPYLEFT_SOURCES_DIR ?= '${DEPLOY_DIR}/copyleft_sources'
> +
> +COPYLEFT_LICENSE_INCLUDE ?= 'GPL* LGPL*'
> +COPYLEFT_LICENSE_INCLUDE[type] = 'list'
> +COPYLEFT_LICENSE_INCLUDE[doc] = 'Space separated list of globs which include licenses'
> +
> +COPYLEFT_LICENSE_EXCLUDE ?= 'CLOSED Proprietary'
> +COPYLEFT_LICENSE_EXCLUDE[type] = 'list'
> +COPYLEFT_LICENSE_INCLUDE[doc] = 'Space separated list of globs which exclude licenses'
> +
> +
> +def copyleft_should_include(d):
> +    """Determine if this recipe's sources should be deployed for compliance"""
> +    import ast
> +    import oe.license
> +    from fnmatch import fnmatchcase as fnmatch
> +
> +    if oe.utils.inherits(d, 'native', 'nativesdk', 'cross', 'crossdk'):

we do ship some of them in SDK so IMO they should not be excluded.




More information about the Openembedded-core mailing list