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

Chris Larson clarson at kergoth.com
Wed Dec 7 22:50:52 UTC 2011


On Wed, Dec 7, 2011 at 2:53 PM, Khem Raj <raj.khem at gmail.com> wrote:
>> 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.

Fair enough. It'd probably be useful to hook something in to use the
output of this class to produce a tree of just the sources that went
into a given image or sdk, to go alongside the new manifests. I think
this is good to go in though, I'll submit a second patch in the next
day or two to enhance it to cover more, unless someone disagrees with
that approach.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics




More information about the Openembedded-core mailing list