LICENSE_FLAGS, a replacement for COMMERCIAL_LICENSE, v3
cover LICENSE_FLAGS, a replacement for COMMERCIAL_LICENSE, v3
From: Tom Zanussi <[email protected]>
This patchset is a replacement for COMMERCIAL_LICENSE called LICENSE_FLAGS.
Please see the commit message for '[PATCH 1/5] base.bbclass: add support
for LICENSE_FLAGS' for an explanation of the LICENSE_FLAGS mechanism.
v3 changes:
- add back an accidentally-stripped comment in PATCH 1.
v2 changes, reflecting comments from Phil Blundell and Paul Eggleton:
- This version converts all the existing packages listed in COMMERCIAL_LICENSE to the equivalent "commercial_${PN}" LICENSE_FLAGS. This allows each package to be added to or removed from the whitelist instead of the previously too-broad 'Commercial' flags for those packages.
- Changes all values to lowercase.
- The new commit message should explain the mechanism and how it can be used a little better.
For some background on these changes, the original proposal for the functionality covered by this replacement was drafted by Saul Wold - the relevant details of that proposal are copied below:
***
There has been some issues raised with the initial implementation of COMMERCIAL_LICENSE and we are looking for ways to address this. Currently COMMERCIAL_LICENSE (C_L) is defined in default-distrovars.conf to contain a list of packages that have additional license requirements when used commercially (such as royalty requirements, or acknowledging some type of commercial T&Cs). These packages are skipped during parsing.
It currently contains a number of Audio and Video packages that require additional licensing terms when used commercially. As we add additional layers, some of these layers want to add additional package to the C_L list, but how to easily enable them.
Since local.conf, where you would normally override things like this, is read in before base.bbclass, which contains tools like oe_filter_out() to modify lists, we can't use that mechanism.
That's the background, now for the proposal.
Do away with C_L and C_*_PLUGINS, move to a "Named Bit Flag" list in LICENSE_FLAGS, each recipe can then maintain their flags directly, instead of in a shared location like default-distrovars.conf.
LICENSE_FLAGS_WHITELIST would be set in local.conf with the values that are acceptable to include in this image, by default it would be blank.
Possible values for LICENSE_FLAGS could be:
- Binary - provides some kind of binary with no source
- Patent - provides a potential infringing item, that some may not want
- Commercial - include recipes that may have commercial T&C
- Commercial_${PN} - commercial licenses specific to ${PN}
- License_${PN} - include a recipe that has a specific license
- maybe similar or different than Commercial_${PN}
***
[T&C = Terms and Conditions]
[NOTE: the above are only 'possible values' that particular license flags could take. The above are not proposals for specific flags that will be implemented - it's completely up to the package maintainers to define appropriate flags for their packages.]
Note that there's no policy attached to any of the above license types
- this is simply string-matching that can be used for the purpose of screening packages - if the strings match, the recipe gets in, if not, it doesn't i.e. during parsing, we would inspect the recipe's data for LICENSE_FLAGS and if it has a value then try to match against the WHITELIST - if it matches it gets added to the parsed list, if there is no match then it gets Skip_Package()'ed.
The following changes since commit 468998cddbe1a803096c9b357e1b5daa3b7e8c2e:
Dongxiao Xu (1):
command.py: add parseConfigurationFiles API
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/license-flags.v3
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/license-flags.v3
Tom Zanussi (5):
base.bbclass: add support for LICENSE_FLAGS
Add LICENSE_FLAGS to packages mentioned in COMMERCIAL_LICENSE base.bbclass: remove COMMERCIAL_LICENSE code default-distrovars.inc: remove COMMERCIAL_LICENSE et al documentation-audit.sh: remove COMMERCIAL_LICENSE warning
meta/classes/base.bbclass | 24 +++++++++++++++----- meta/conf/distro/include/default-distrovars.inc | 5 ---- .../gstreamer/gst-fluendo-mp3_0.10.16.bb | 1 + .../gstreamer/gst-openmax_0.10.1.bb | 1 + .../gstreamer/gst-plugins-ugly_0.10.18.bb | 1 + meta/recipes-multimedia/lame/lame_3.99.3.bb | 2 + meta/recipes-multimedia/libmad/libmad_0.15.1b.bb | 1 + meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb | 1 + meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb | 1 + meta/recipes-qt/qt-apps/qmmp_0.5.2.bb | 1 + scripts/contrib/documentation-audit.sh | 3 +- 11 files changed, 29 insertions(+), 12 deletions(-)
PATCH 1/5 base.bbclass: add support for LICENSE_FLAGS
From: Tom Zanussi <[email protected]>
LICENSE_FLAGS are a per-recipe replacement for the COMMERCIAL_LICENSE mechanism.
In the COMMERCIAL_LICENSE mechanism, any package name mentioned in the global COMMERCIAL_LICENSE list is 'blacklisted' from being included in an image. To allow the blacklisted package into the image, the corresponding packages need to be removed from the COMMERCIAL_LICENSE list. This mechanism relies on a global list defined in default-distrovars.inc.
The LICENSE_FLAGS mechanism essentially implements the same thing but turns the global blacklist into a per-recipe whitelist. Any recipe can optionally define one or more 'license flags'; if defined, each of the license flags defined for a recipe must have matching entries in a global LICENSE_FLAGS_WHITELIST variable. Typically a recipe will have a single license flag specific to itself, which allows it to be individually toggled on and off. For example, a package named 'foo' might define a single license flag, 'commercial_foo':
LICENSE_FLAGS = "commercial_foo"
This says that in order for the foo package to be included in the image, the string 'commercial_foo' must appear in the LICENSE_FLAGS_WHITELIST variable:
LICENSE_FLAGS_WHITELIST = "commercial_foo"
Because the typical case is indeed to create LICENSE_FLAGS containing the package name, the LICENSE_FLAGS could just as well have been specified as:
LICENSE_FLAGS = "commercial_${PN}
which would pick up the package name automatically.
The mechanism has the word 'flags' in the name because although the typical case is to specify a single string to match as above, the user can add additional strings that might be thought of additional 'attributes' of a license that also need to be matched. This allows for the creation and specification of license categories that could be used to flexibly match sets of packages that match certain attributes without forcing them to all be specified individually. For example, a particular set of recipes that are typically used together might all contain a 'commercial_video' flag. Additionally, some of them might specify an additional 'binary' flag meaning that it's not possible to get the source for those packages. Specifying both 'commercial_video and binary' in the LICENSE_FLAGS_WHITELIST would allow them all to be pulled in, but if 'binary' was missing, it would only allow those packages that had source to be allowed in to the image.
The current behavior of COMMERCIAL_LICENSE is replicated as mentioned above by having the current set of COMMERCIAL_LICENSE flags implement their using LICENSE_FLAGS = "commercial_${PN}.
That being the case, the current COMMERCIAL_LICENSE can equivalently be specified in the new scheme by putting the below in local.conf:
# This is a list of packages that require a commercial license to ship
# product. If shipped as part of an image these packages may have # implications so they are disabled by default. To enable them, # un-comment the below as appropriate. #LICENSE_FLAGS_WHITELIST = "commercial_gst-fluendo-mp3 \ # commercial_gst-openmax \ # commercial_gst-plugins-ugly \ # commercial_lame \ # commercial_libmad \ # commercial_libomxil \ # commercial_mpeg2dec \ # commercial_qmmp"
The above allows all of the current COMMERCIAL_LICENSE packages in - to disallow a particular package from appearing in the image, simply remove it from the whitelist.
--- meta/classes/base.bbclass | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
meta/classes/base.bbclass +19 -0
@@ -349,6 +349,25 @@ python () { if license == "INVALID": bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn) + def skip_package(pn, flag): + bb.debug(1, "Skipping %s because it has a restricted license (%s) not" + " whitelisted in LICENSE_FLAGS_WHITELIST" % (pn, flag)) + raise bb.parse.SkipPackage("because it may require a special license" + " to ship in a product (listed in LICENSE_FLAGS)") + + def all_license_flags_match(flags, whitelist): + for flag in flags.split(): + if not flag in whitelist.split(): + return False + return True + + license_flags = d.getVar('LICENSE_FLAGS', True) + if license_flags: + license_flags_whitelist = d.getVar('LICENSE_FLAGS_WHITELIST', True) + if not license_flags_whitelist or not all_license_flags_match( + license_flags, license_flags_whitelist): + skip_package(pn, license_flags) + commercial_license = " %s " % d.getVar('COMMERCIAL_LICENSE', 1) import re pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+")
Signature · 1 line
1.7.0.4
Re: [PATCH 1/5] base.bbclass: add support for LICENSE_FLAGS
Quoted 59 lines · On 01/06/2012 06:34 PM, [email protected] wrote:
From: Tom Zanussi<[email protected]>
LICENSE_FLAGSare a per-recipe replacement for theCOMMERCIAL_LICENSEmechanism.In the
COMMERCIAL_LICENSEmechanism, any package name mentioned in the globalCOMMERCIAL_LICENSElist is 'blacklisted' from being included in an image. To allow the blacklisted package into the image, the corresponding packages need to be removed from theCOMMERCIAL_LICENSElist. This mechanism relies on a global list defined in default-distrovars.inc.The
LICENSE_FLAGSmechanism essentially implements the same thing but turns the global blacklist into a per-recipe whitelist. Any recipe can optionally define one or more 'license flags'; if defined, each of the license flags defined for a recipe must have matching entries in a globalLICENSE_FLAGS_WHITELISTvariable. Typically a recipe will have a single license flag specific to itself, which allows it to be individually toggled on and off. For example, a package named 'foo' might define a single license flag, 'commercial_foo':
LICENSE_FLAGS= "commercial_foo"This says that in order for the foo package to be included in the image, the string '
commercial_foo' must appear in theLICENSE_FLAGS_WHITELISTvariable:
LICENSE_FLAGS_WHITELIST= "commercial_foo"Because the typical case is indeed to create
LICENSE_FLAGScontaining the package name, theLICENSE_FLAGScould just as well have been specified as:
LICENSE_FLAGS= "commercial_${PN}which would pick up the package name automatically.
The mechanism has the word 'flags' in the name because although the typical case is to specify a single string to match as above, the user can add additional strings that might be thought of additional 'attributes' of a license that also need to be matched. This allows for the creation and specification of license categories that could be used to flexibly match sets of packages that match certain attributes without forcing them to all be specified individually. For example, a particular set of recipes that are typically used together might all contain a '
commercial_video' flag. Additionally, some of them might specify an additional 'binary' flag meaning that it's not possible to get the source for those packages. Specifying both 'commercial_videoand binary' in theLICENSE_FLAGS_WHITELISTwould allow them all to be pulled in, but if 'binary' was missing, it would only allow those packages that had source to be allowed in to the image.The current behavior of
COMMERCIAL_LICENSEis replicated as mentioned above by having the current set ofCOMMERCIAL_LICENSEflags implement their usingLICENSE_FLAGS= "commercial_${PN}.That being the case, the current
COMMERCIAL_LICENSEcan equivalently be specified in the new scheme by putting the below in local.conf:
Quoted 13 lines
# This is a list of packages that require a commercial license to ship # product. If shipped as part of an image these packages may have # implications so they are disabled by default. To enable them, # un-comment the below as appropriate. #LICENSE_FLAGS_WHITELIST = "commercial_gst-fluendo-mp3 \ # commercial_gst-openmax \ # commercial_gst-plugins-ugly \ # commercial_lame \ # commercial_libmad \ # commercial_libomxil \ # commercial_mpeg2dec \ # commercial_qmmp"
Would it not make sense to add this to local.conf.sample.extended in meta-yocto?
This won't hold up this patch set.
Sau!
Quoted 39 lines
The above allows all of the current
COMMERCIAL_LICENSEpackages in - to disallow a particular package from appearing in the image, simply remove it from the whitelist.Signed-off-by Tom Zanussi<[email protected]>--- meta/classes/base.bbclass | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)meta/classes/base.bbclass +19
-0@@ -349,6 +349,25 @@ python () { if license == "INVALID": bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn) + def skip_package(pn, flag): + bb.debug(1, "Skipping %s because it has a restricted license (%s) not" + " whitelisted in LICENSE_FLAGS_WHITELIST" % (pn, flag)) + raise bb.parse.SkipPackage("because it may require a special license" + " to ship in a product (listed in LICENSE_FLAGS)") + + def all_license_flags_match(flags, whitelist): + for flag in flags.split(): + if not flag in whitelist.split(): + return False + return True + + license_flags = d.getVar('LICENSE_FLAGS', True) + if license_flags: + license_flags_whitelist = d.getVar('LICENSE_FLAGS_WHITELIST', True) + if not license_flags_whitelist or not all_license_flags_match( + license_flags, license_flags_whitelist): + skip_package(pn, license_flags) + commercial_license = " %s " % d.getVar('COMMERCIAL_LICENSE', 1) import re pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+")
Re: [PATCH 1/5] base.bbclass: add support for LICENSE_FLAGS
Quoted 73 lines · Saul Wold
Quoted 59 lines · On 01/06/2012 06:34 PM, [email protected] wrote:
From: Tom Zanussi<[email protected]>
LICENSE_FLAGSare a per-recipe replacement for theCOMMERCIAL_LICENSEmechanism.In the
COMMERCIAL_LICENSEmechanism, any package name mentioned in the globalCOMMERCIAL_LICENSElist is 'blacklisted' from being included in an image. To allow the blacklisted package into the image, the corresponding packages need to be removed from theCOMMERCIAL_LICENSElist. This mechanism relies on a global list defined in default-distrovars.inc.The
LICENSE_FLAGSmechanism essentially implements the same thing but turns the global blacklist into a per-recipe whitelist. Any recipe can optionally define one or more 'license flags'; if defined, each of the license flags defined for a recipe must have matching entries in a globalLICENSE_FLAGS_WHITELISTvariable. Typically a recipe will have a single license flag specific to itself, which allows it to be individually toggled on and off. For example, a package named 'foo' might define a single license flag, 'commercial_foo':
LICENSE_FLAGS= "commercial_foo"This says that in order for the foo package to be included in the image, the string '
commercial_foo' must appear in theLICENSE_FLAGS_WHITELISTvariable:
LICENSE_FLAGS_WHITELIST= "commercial_foo"Because the typical case is indeed to create
LICENSE_FLAGScontaining the package name, theLICENSE_FLAGScould just as well have been specified as:
LICENSE_FLAGS= "commercial_${PN}which would pick up the package name automatically.
The mechanism has the word 'flags' in the name because although the typical case is to specify a single string to match as above, the user can add additional strings that might be thought of additional 'attributes' of a license that also need to be matched. This allows for the creation and specification of license categories that could be used to flexibly match sets of packages that match certain attributes without forcing them to all be specified individually. For example, a particular set of recipes that are typically used together might all contain a '
commercial_video' flag. Additionally, some of them might specify an additional 'binary' flag meaning that it's not possible to get the source for those packages. Specifying both 'commercial_videoand binary' in theLICENSE_FLAGS_WHITELISTwould allow them all to be pulled in, but if 'binary' was missing, it would only allow those packages that had source to be allowed in to the image.The current behavior of
COMMERCIAL_LICENSEis replicated as mentioned above by having the current set ofCOMMERCIAL_LICENSEflags implement their usingLICENSE_FLAGS= "commercial_${PN}.That being the case, the current
COMMERCIAL_LICENSEcan equivalently be specified in the new scheme by putting the below in local.conf:Quoted 13 lines
# This is a list of packages that require a commercial license to ship # product. If shipped as part of an image these packages may have # implications so they are disabled by default. To enable them, # un-comment the below as appropriate. #LICENSE_FLAGS_WHITELIST = "commercial_gst-fluendo-mp3 \ # commercial_gst-openmax \ # commercial_gst-plugins-ugly \ # commercial_lame \ # commercial_libmad \ # commercial_libomxil \ # commercial_mpeg2dec \ # commercial_qmmp"
Quoted 3 lines
Would it not make sense to add this to local.conf.sample.extended in meta-yocto?
Yes, I was going to do that, but didn't want to bother if it wasn't going anywhere. I'll send a patch for it...
Tom
Quoted 49 lines
This won't hold up this patch set.
Sau!
Quoted 29 lines
The above allows all of the current
COMMERCIAL_LICENSEpackages in - to disallow a particular package from appearing in the image, simply remove it from the whitelist.Signed-off-by Tom Zanussi<[email protected]>--- meta/classes/base.bbclass | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)meta/classes/base.bbclass +12
-0@@ -349,6 +349,25 @@ python () { if license == "INVALID": bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn) + def skip_package(pn, flag): + bb.debug(1, "Skipping %s because it has a restricted license (%s) not" + " whitelisted in LICENSE_FLAGS_WHITELIST" % (pn, flag)) + raise bb.parse.SkipPackage("because it may require a special license" + " to ship in a product (listed in LICENSE_FLAGS)") + + def all_license_flags_match(flags, whitelist): + for flag in flags.split(): + if not flag in whitelist.split(): + return False + return True +meta/classes/base.bbclass python () { · line 373
Quoted 10 lines
meta/classes/base.bbclass +7
-0+ license_flags = d.getVar('LICENSE_FLAGS', True) + if license_flags: + license_flags_whitelist = d.getVar('LICENSE_FLAGS_WHITELIST', True) + if not license_flags_whitelist or not all_license_flags_match( + license_flags, license_flags_whitelist): + skip_package(pn, license_flags) + commercial_license = " %s " % d.getVar('COMMERCIAL_LICENSE', 1) import re pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+")_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/5] base.bbclass: add support for LICENSE_FLAGS
Quoted 74 lines · Tom Zanussi
Quoted 73 lines · Saul Wold
Quoted 72 lines · On 01/06/2012 06:34 PM, [email protected] wrote:
From: Tom Zanussi<[email protected]>
LICENSE_FLAGSare a per-recipe replacement for theCOMMERCIAL_LICENSEmechanism.In the
COMMERCIAL_LICENSEmechanism, any package name mentioned in the globalCOMMERCIAL_LICENSElist is 'blacklisted' from being included in an image. To allow the blacklisted package into the image, the corresponding packages need to be removed from theCOMMERCIAL_LICENSElist. This mechanism relies on a global list defined in default-distrovars.inc.The
LICENSE_FLAGSmechanism essentially implements the same thing but turns the global blacklist into a per-recipe whitelist. Any recipe can optionally define one or more 'license flags'; if defined, each of the license flags defined for a recipe must have matching entries in a globalLICENSE_FLAGS_WHITELISTvariable. Typically a recipe will have a single license flag specific to itself, which allows it to be individually toggled on and off. For example, a package named 'foo' might define a single license flag, 'commercial_foo':
LICENSE_FLAGS= "commercial_foo"This says that in order for the foo package to be included in the image, the string '
commercial_foo' must appear in theLICENSE_FLAGS_WHITELISTvariable:
LICENSE_FLAGS_WHITELIST= "commercial_foo"Because the typical case is indeed to create
LICENSE_FLAGScontaining the package name, theLICENSE_FLAGScould just as well have been specified as:
LICENSE_FLAGS= "commercial_${PN}which would pick up the package name automatically.
The mechanism has the word 'flags' in the name because although the typical case is to specify a single string to match as above, the user can add additional strings that might be thought of additional 'attributes' of a license that also need to be matched. This allows for the creation and specification of license categories that could be used to flexibly match sets of packages that match certain attributes without forcing them to all be specified individually. For example, a particular set of recipes that are typically used together might all contain a '
commercial_video' flag. Additionally, some of them might specify an additional 'binary' flag meaning that it's not possible to get the source for those packages. Specifying both 'commercial_videoand binary' in theLICENSE_FLAGS_WHITELISTwould allow them all to be pulled in, but if 'binary' was missing, it would only allow those packages that had source to be allowed in to the image.The current behavior of
COMMERCIAL_LICENSEis replicated as mentioned above by having the current set ofCOMMERCIAL_LICENSEflags implement their usingLICENSE_FLAGS= "commercial_${PN}.That being the case, the current
COMMERCIAL_LICENSEcan equivalently be specified in the new scheme by putting the below in local.conf:# This is a list of packages that require a commercial license to ship # product. If shipped as part of an image these packages may have # implications so they are disabled by default. To enable them, # un-comment the below as appropriate. #LICENSE_FLAGS_WHITELIST = "commercial_gst-fluendo-mp3 \ # commercial_gst-openmax \ # commercial_gst-plugins-ugly \ # commercial_lame \ # commercial_libmad \ # commercial_libomxil \ # commercial_mpeg2dec \ # commercial_qmmp"
Quoted 54 lines
Quoted 3 lines
Would it not make sense to add this to local.conf.sample.extended in meta-yocto?
Yes, I was going to do that, but didn't want to bother if it wasn't going anywhere. I'll send a patch for it...
Tom
Quoted 45 lines
This won't hold up this patch set.
Sau!
Quoted 39 lines
The above allows all of the current
COMMERCIAL_LICENSEpackages in - to disallow a particular package from appearing in the image, simply remove it from the whitelist.Signed-off-by Tom Zanussi<[email protected]>--- meta/classes/base.bbclass | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)meta/classes/base.bbclass +19
-0@@ -349,6 +349,25 @@ python () { if license == "INVALID": bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn) + def skip_package(pn, flag): + bb.debug(1, "Skipping %s because it has a restricted license (%s) not" + " whitelisted in LICENSE_FLAGS_WHITELIST" % (pn, flag)) + raise bb.parse.SkipPackage("because it may require a special license" + " to ship in a product (listed in LICENSE_FLAGS)") + + def all_license_flags_match(flags, whitelist): + for flag in flags.split(): + if not flag in whitelist.split(): + return False + return True + + license_flags = d.getVar('LICENSE_FLAGS', True) + if license_flags: + license_flags_whitelist = d.getVar('LICENSE_FLAGS_WHITELIST', True) + if not license_flags_whitelist or not all_license_flags_match( + license_flags, license_flags_whitelist): + skip_package(pn, license_flags) + commercial_license = " %s " % d.getVar('COMMERCIAL_LICENSE', 1) import re pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+")
With all the discussion about License related stuff on the list and IRC, I think we should be creating a bbclass to define and hold these flags.
Then there is just a call from base.bbclass into check_license_flags
and return True/False for the skip_package().
And based on a comment from Chris L. on the IRC, will this handle package level LICENSE_FLAGS, this is recipe level currently, correct?
It could be you have some recipe with multiple binaries (for example) some are OK and some are not and they are packaged separately. Can the LICENSE_FLAGS handle this?
Sau!
Quoted 12 lines
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/5] base.bbclass: add support for LICENSE_FLAGS
Quoted 129 lines · Saul Wold
Quoted 74 lines · Tom Zanussi
Quoted 73 lines · Saul Wold
Quoted 72 lines · On 01/06/2012 06:34 PM, [email protected] wrote:
From: Tom Zanussi<[email protected]>
LICENSE_FLAGSare a per-recipe replacement for theCOMMERCIAL_LICENSEmechanism.In the
COMMERCIAL_LICENSEmechanism, any package name mentioned in the globalCOMMERCIAL_LICENSElist is 'blacklisted' from being included in an image. To allow the blacklisted package into the image, the corresponding packages need to be removed from theCOMMERCIAL_LICENSElist. This mechanism relies on a global list defined in default-distrovars.inc.The
LICENSE_FLAGSmechanism essentially implements the same thing but turns the global blacklist into a per-recipe whitelist. Any recipe can optionally define one or more 'license flags'; if defined, each of the license flags defined for a recipe must have matching entries in a globalLICENSE_FLAGS_WHITELISTvariable. Typically a recipe will have a single license flag specific to itself, which allows it to be individually toggled on and off. For example, a package named 'foo' might define a single license flag, 'commercial_foo':
LICENSE_FLAGS= "commercial_foo"This says that in order for the foo package to be included in the image, the string '
commercial_foo' must appear in theLICENSE_FLAGS_WHITELISTvariable:
LICENSE_FLAGS_WHITELIST= "commercial_foo"Because the typical case is indeed to create
LICENSE_FLAGScontaining the package name, theLICENSE_FLAGScould just as well have been specified as:
LICENSE_FLAGS= "commercial_${PN}which would pick up the package name automatically.
The mechanism has the word 'flags' in the name because although the typical case is to specify a single string to match as above, the user can add additional strings that might be thought of additional 'attributes' of a license that also need to be matched. This allows for the creation and specification of license categories that could be used to flexibly match sets of packages that match certain attributes without forcing them to all be specified individually. For example, a particular set of recipes that are typically used together might all contain a '
commercial_video' flag. Additionally, some of them might specify an additional 'binary' flag meaning that it's not possible to get the source for those packages. Specifying both 'commercial_videoand binary' in theLICENSE_FLAGS_WHITELISTwould allow them all to be pulled in, but if 'binary' was missing, it would only allow those packages that had source to be allowed in to the image.The current behavior of
COMMERCIAL_LICENSEis replicated as mentioned above by having the current set ofCOMMERCIAL_LICENSEflags implement their usingLICENSE_FLAGS= "commercial_${PN}.That being the case, the current
COMMERCIAL_LICENSEcan equivalently be specified in the new scheme by putting the below in local.conf:# This is a list of packages that require a commercial license to ship # product. If shipped as part of an image these packages may have # implications so they are disabled by default. To enable them, # un-comment the below as appropriate. #LICENSE_FLAGS_WHITELIST = "commercial_gst-fluendo-mp3 \ # commercial_gst-openmax \ # commercial_gst-plugins-ugly \ # commercial_lame \ # commercial_libmad \ # commercial_libomxil \ # commercial_mpeg2dec \ # commercial_qmmp"Quoted 54 lines
Quoted 3 lines
Would it not make sense to add this to local.conf.sample.extended in meta-yocto?
Yes, I was going to do that, but didn't want to bother if it wasn't going anywhere. I'll send a patch for it...
Tom
Quoted 45 lines
This won't hold up this patch set.
Sau!
Quoted 39 lines
The above allows all of the current
COMMERCIAL_LICENSEpackages in - to disallow a particular package from appearing in the image, simply remove it from the whitelist.Signed-off-by Tom Zanussi<[email protected]>--- meta/classes/base.bbclass | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)meta/classes/base.bbclass +19
-0@@ -349,6 +349,25 @@ python () { if license == "INVALID": bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn) + def skip_package(pn, flag): + bb.debug(1, "Skipping %s because it has a restricted license (%s) not" + " whitelisted in LICENSE_FLAGS_WHITELIST" % (pn, flag)) + raise bb.parse.SkipPackage("because it may require a special license" + " to ship in a product (listed in LICENSE_FLAGS)") + + def all_license_flags_match(flags, whitelist): + for flag in flags.split(): + if not flag in whitelist.split(): + return False + return True + + license_flags = d.getVar('LICENSE_FLAGS', True) + if license_flags: + license_flags_whitelist = d.getVar('LICENSE_FLAGS_WHITELIST', True) + if not license_flags_whitelist or not all_license_flags_match( + license_flags, license_flags_whitelist): + skip_package(pn, license_flags) + commercial_license = " %s " % d.getVar('COMMERCIAL_LICENSE', 1) import re pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+")
Quoted 5 lines
With all the discussion about License related stuff on the list and IRC, I think we should be creating a bbclass to define and hold these flags.
Then there is just a call from base.bbclass intocheck_license_flags
and return True/False for theskip_package().
So move this code into a separate .bbclass, ok.
Quoted 3 lines
And based on a comment from Chris L. on the IRC, will this handle package level
LICENSE_FLAGS, this is recipe level currently, correct?
Right.
Quoted 4 lines
It could be you have some recipe with multiple binaries (for example) some are OK and some are not and they are packaged separately. Can the
LICENSE_FLAGShandle this?
No, I don't think so, there's just the per-recipe LICENSE_FLAGS. How would that be expanded to per-package?
Tom
Quoted 14 lines
Sau!
Quoted 12 lines
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/5] base.bbclass: add support for LICENSE_FLAGS
Quoted 5 lines · Tom Zanussi
Quoted 4 lines · Saul Wold
Quoted 3 lines · Tom Zanussi
Quoted 2 lines · Saul Wold
Quoted 1 line · On 01/06/2012 06:34 PM, [email protected] wrote:
From: Tom Zanussi<[email protected]>
<SNIP>
Quoted 9 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
With all the discussion about License related stuff on the list and IRC, I think we should be creating a bbclass to define and hold these flags.
Then there is just a call from base.bbclass intocheck_license_flags
and return True/False for theskip_package().So move this code into a separate .bbclass, ok.
Move this code the license.bbclass or meta/lib/oe/licensee.py as appropriate.
Quoted 6 lines
Quoted 3 lines
And based on a comment from Chris L. on the IRC, will this handle package level
LICENSE_FLAGS, this is recipe level currently, correct?Right.
Quoted 8 lines
Quoted 4 lines
It could be you have some recipe with multiple binaries (for example) some are OK and some are not and they are packaged separately. Can the
LICENSE_FLAGShandle this?No, I don't think so, there's just the per-recipe
LICENSE_FLAGS. How would that be expanded to per-package?
I verified with Richard, I thought we could do per-package, we can not currently, so LICENSE_FLAGS will be per-recipe now.
Possibly change in the future would be per-package.
Thanks for your work on this, I you have had to do some reworks, we are just trying to get it right.
Sau!
Quoted 19 lines
Tom
Quoted 14 lines
Sau!
Quoted 12 lines
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
PATCH 2/5 Add LICENSE_FLAGS to packages mentioned in COMMERCIAL_LICENSE
In reply to [email protected]From: Tom Zanussi <[email protected]>
Per-recipe LICENSE_FLAGS replace the global COMMERCIAL_LICENSE list; add LICENSE_FLAGS varables to each the recipes mentioned in that list:
- lame
- gst-fluendo-mp3
- gst-openmax
- gst-plugins-ugly
- libmad
- libomxil
- mpeg2dec
- qmmp
--- .../gstreamer/gst-fluendo-mp3_0.10.16.bb | 1 + .../gstreamer/gst-openmax_0.10.1.bb | 1 + .../gstreamer/gst-plugins-ugly_0.10.18.bb | 1 + meta/recipes-multimedia/lame/lame_3.99.3.bb | 2 ++ meta/recipes-multimedia/libmad/libmad_0.15.1b.bb | 1 + meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb | 1 + meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb | 1 + meta/recipes-qt/qt-apps/qmmp_0.5.2.bb | 1 + 8 files changed, 9 insertions(+), 0 deletions(-)
meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.16.bb +1 -0
@@ -2,6 +2,7 @@ require gst-fluendo.inc LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=98326cbb1723a5a97e9b1db62e9faa05" +LICENSE_FLAGS = "commercial_${PN}" acpaths = "-I ${S}/common/m4 -I ${S}/m4"
meta/recipes-multimedia/gstreamer/gst-openmax_0.10.1.bb +1 -0
@@ -1,6 +1,7 @@ DEPENDS = "gstreamer" RDEPENDS_${PN} = "libomxil" LICENSE = "LGPLv2.1" +LICENSE_FLAGS = "commercial_${PN}" LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24 \ file://util/sem.h;beginline=1;endline=20;md5=accce5550d5583b839b441a0623f09fc"
meta/recipes-multimedia/gstreamer/gst-plugins-ugly_0.10.18.bb +1 -0
@@ -1,6 +1,7 @@ require gst-plugins.inc LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" +LICENSE_FLAGS = "commercial_${PN}" LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ file://gst/synaesthesia/synaescope.h;beginline=1;endline=20;md5=99f301df7b80490c6ff8305fcc712838 \ file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068 \
meta/recipes-multimedia/lame/lame_3.99.3.bb +2 -0
@@ -3,6 +3,8 @@ HOMEPAGE = "http://sourceforge.net/projects/lame/files/lame/" BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290" SECTION = "console/utils" LICENSE = "LGPLv2+" +LICENSE_FLAGS = "commercial_${PN}" + LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \ file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b PR = "r0"
meta/recipes-multimedia/libmad/libmad_0.15.1b.bb +1 -0
@@ -2,6 +2,7 @@ DESCRIPTION = "MPEG Audio Decoder Library" HOMEPAGE = "http://sourceforge.net/projects/mad/" BUGTRACKER = "http://sourceforge.net/tracker/?group_id=12349&atid=112349" LICENSE = "GPLv2+" +LICENSE_FLAGS = "commercial_${PN}" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://COPYRIGHT;md5=8e55eb14894e782b84488d5a239bc23d \ file://version.h;beginline=1;endline=8;md5=aa07311dd39288d4349f28e1de516454"
meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb +1 -0
@@ -1,6 +1,7 @@ DESCRIPTION = "Bellagio OpenMAX Integration Layer" HOMEPAGE = "http://omxil.sourceforge.net/" LICENSE = "LGPLv2.1+" +LICENSE_FLAGS = "commercial_${PN}" LIC_FILES_CHKSUM = "file://COPYING;md5=ae6f0f4dbc7ac193b50f323a6ae191cb \ file://src/omxcore.h;beginline=1;endline=27;md5=806b1e5566c06486fe8e42b461e03a90" DEPENDS = "libvorbis libogg alsa-lib libmad"
meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb +1 -0
@@ -2,6 +2,7 @@ DESCRIPTION = "Library and test program for decoding mpeg-2 and mpeg-1 video str HOMEPAGE = "http://libmpeg2.sourceforge.net/" SECTION = "libs" LICENSE = "GPLv2+" +LICENSE_FLAGS = "commercial_${PN}" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://include/mpeg2.h;beginline=1;endline=22;md5=ead62602d4638329d3b5b86a55803154"
meta/recipes-qt/qt-apps/qmmp_0.5.2.bb +1 -0
@@ -1,6 +1,7 @@ DESCRIPTION = "Qmmp (Qt-based Multimedia Player) is an audio-player, written with help of Qt library" HOMEPAGE = "http://qmmp.ylsoftware.com" LICENSE = "GPLv2" +LICENSE_FLAGS = "commercial_${PN}" LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" SECTION = "multimedia"
Signature · 1 line
1.7.0.4
PATCH 3/5 base.bbclass: remove COMMERCIAL_LICENSE code
In reply to [email protected]From: Tom Zanussi <[email protected]>
The COMMERCIAL_LICENSE mechanism has been superseded by LICENSE_FLAGS so remove the code that implements COMMERCIAL_LICENSE.
--- meta/classes/base.bbclass | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-)
meta/classes/base.bbclass +0 -7
@@ -368,13 +368,6 @@ python () { license_flags, license_flags_whitelist): skip_package(pn, license_flags) - commercial_license = " %s " % d.getVar('COMMERCIAL_LICENSE', 1) - import re - pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+") - if commercial_license and re.search(pnr, commercial_license): - bb.debug(1, "Skipping %s because it's commercially licensed" % pn) - raise bb.parse.SkipPackage("because it may require a commercial license to ship in a product (listed in COMMERCIAL_LICENSE)") - # If we're building a target package we need to use fakeroot (pseudo) # in order to capture permissions, owners, groups and special files if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
Signature · 1 line
1.7.0.4
PATCH 4/5 default-distrovars.inc: remove COMMERCIAL_LICENSE et al
In reply to [email protected]From: Tom Zanussi <[email protected]>
The global COMMERCIAL_LICENSE mechanism has been obsoleted by per-recipe LICENSE_FLAGS, so remove the related variables.
--- meta/conf/distro/include/default-distrovars.inc | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
meta/conf/distro/include/default-distrovars.inc +0 -5
@@ -26,11 +26,6 @@ HOSTTOOLS_WHITELIST_GPLv3 ?= "" WHITELIST_GPLv3 ?= "less" LGPLv2_WHITELIST_GPLv3 ?= "libassuan gnutls libtasn1 libidn libgcc gcc-runtime" -# This is a list of packages that require a commercial license to ship -# product. If shipped as part of an image these packages may have -# implications so they are disabled by default -COMMERCIAL_LICENSE ?= "lame gst-fluendo-mp3 libmad mpeg2dec ffmpeg qmmp ${COMMERCIAL_LICENSE_DEPENDEES}" -COMMERCIAL_LICENSE_DEPENDEES ?= "gst-plugins-ugly libomxil gst-openmax" COMMERCIAL_AUDIO_PLUGINS ?= "" # COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse" COMMERCIAL_VIDEO_PLUGINS ?= ""
Signature · 1 line
1.7.0.4
PATCH 5/5 documentation-audit.sh: remove COMMERCIAL_LICENSE warning
In reply to [email protected]From: Tom Zanussi <[email protected]>
COMMERCIAL_LICENSE no longer exists; the equivalent functionality is now has been replaced by LICENSE_FLAGS_WHITELIST, so replace the COMMERCIAL_LICENSE warning with a similarly equivalent warning.
--- scripts/contrib/documentation-audit.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
scripts/contrib/documentation-audit.sh +2 -1
@@ -25,7 +25,8 @@ if [ -z "$BITBAKE" ]; then fi echo "REMINDER: you need to build for MACHINE=qemux86 or you won't get useful results" -echo "REMINDER: you need to have COMMERCIAL_LICENSE = \"\" in local.conf or you'll get false positives" +echo "REMINDER: you need to set LICENSE_FLAGS_WHITELIST appropriately in local.conf or " +echo " you'll get false positives. For example, LICENSE_FLAGS_WHITELIST = \"Commercial\"" for pkg in `bitbake -s | awk '{ print \$1 }'`; do if [[ "$pkg" == "Loading" || "$pkg" == "Loaded" ||
Signature · 1 line
1.7.0.4
Quoted 7 lines · On Fri, Jan 6, 2012 at 7:34 PM, <[email protected]> wrote:
Possible values for
LICENSE_FLAGScould be:
- Binary - provides some kind of binary with no source
- Patent - provides a potential infringing item, that some may not want
- Commercial - include recipes that may have commercial T&C
- Commercial_${PN} - commercial licenses specific to ${PN}
- License_${PN} - include a recipe that has a specific license
- maybe similar or different than Commercial_${PN}
It's a minor gripe really, but why the capitalization here? Other similar variables which define lists of words to control behavior (e.g. MACHINE_FEATURES, DISTRO_FEATURES, IMAGE_FEATURES, and others) have an all-lowercase convention. I think this should behave similarly, for consistency.
Signature · 1 line
Christopher Larson
Quoted 9 lines · Chris Larson
Quoted 7 lines · On Fri, Jan 6, 2012 at 7:34 PM, <[email protected]> wrote:
Possible values for
LICENSE_FLAGScould be:
- Binary - provides some kind of binary with no source
- Patent - provides a potential infringing item, that some may not want
- Commercial - include recipes that may have commercial T&C
- Commercial_${PN} - commercial licenses specific to ${PN}
- License_${PN} - include a recipe that has a specific license
- maybe similar or different than Commercial_${PN}
Quoted 5 lines
It's a minor gripe really, but why the capitalization here? Other similar variables which define lists of words to control behavior (e.g.
MACHINE_FEATURES,DISTRO_FEATURES,IMAGE_FEATURES, and others) have an all-lowercase convention. I think this should behave similarly, for consistency.
Right, the cover letter quotes the original e-mail that does have them with caps. The patches themselves use all-lowercase, though.
Thanks,
Tom
Quoted 64 lines · On Fri, Jan 6, 2012 at 6:34 PM, <[email protected]> wrote:
From: Tom Zanussi <[email protected]>
This patchset is a replacement for
COMMERCIAL_LICENSEcalledLICENSE_FLAGS.Please see the commit message for '[PATCH 1/5] base.bbclass: add support for
LICENSE_FLAGS' for an explanation of theLICENSE_FLAGSmechanism.v3 changes:
- add back an accidentally-stripped comment in PATCH 1.
v2 changes, reflecting comments from Phil Blundell and Paul Eggleton:
- This version converts all the existing packages listed in
COMMERCIAL_LICENSEto the equivalent "commercial_${PN}"LICENSE_FLAGS. This allows each package to be added to or removed from the whitelist instead of the previously too-broad 'Commercial' flags for those packages.- Changes all values to lowercase.
- The new commit message should explain the mechanism and how it can be used a little better.
For some background on these changes, the original proposal for the functionality covered by this replacement was drafted by Saul Wold - the relevant details of that proposal are copied below:
***
There has been some issues raised with the initial implementation of
COMMERCIAL_LICENSEand we are looking for ways to address this. CurrentlyCOMMERCIAL_LICENSE(C_L) is defined in default-distrovars.conf to contain a list of packages that have additional license requirements when used commercially (such as royalty requirements, or acknowledging some type of commercial T&Cs). These packages are skipped during parsing.It currently contains a number of Audio and Video packages that require additional licensing terms when used commercially. As we add additional layers, some of these layers want to add additional package to the
C_Llist, but how to easily enable them.Since local.conf, where you would normally override things like this, is read in before base.bbclass, which contains tools like
oe_filter_out()to modify lists, we can't use that mechanism.That's the background, now for the proposal.
Do away with
C_Land C_*_PLUGINS, move to a "Named Bit Flag" list inLICENSE_FLAGS, each recipe can then maintain their flags directly, instead of in a shared location like default-distrovars.conf.
LICENSE_FLAGS_WHITELISTwould be set in local.conf with the values that are acceptable to include in this image, by default it would be blank.Possible values for
LICENSE_FLAGScould be:
- Binary - provides some kind of binary with no source
- Patent - provides a potential infringing item, that some may not want
- Commercial - include recipes that may have commercial T&C
- Commercial_${PN} - commercial licenses specific to ${PN}
- License_${PN} - include a recipe that has a specific license
- maybe similar or different than Commercial_${PN}
Quoted 8 lines
***
[T&C = Terms and Conditions]
[NOTE: the above are only 'possible values' that particular license flags could take. The above are not proposals for specific flags that will be implemented - it's completely up to the package maintainers to define appropriate flags for their packages.]
Tom,
I know I would like to see a proposed group of flags. I can see this being used elsewhere at a later date and the thought of no standardization around this field worries me a bit.
-b
Quoted 43 lines
Note that there's no policy attached to any of the above license types
- this is simply string-matching that can be used for the purpose of screening packages - if the strings match, the recipe gets in, if not, it doesn't i.e. during parsing, we would inspect the recipe's data forLICENSE_FLAGSand if it has a value then try to match against the WHITELIST - if it matches it gets added to the parsed list, if there is no match then it gets Skip_Package()'ed.The following changes since commit
468998cddbe1a803096c9b357e1b5daa3b7e8c2e:
Dongxiao Xu (1):
command.py: add parseConfigurationFiles APIare available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/license-flags.v3
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/license-flags.v3Tom Zanussi (5):
base.bbclass: add support forLICENSE_FLAGS
AddLICENSE_FLAGSto packages mentioned inCOMMERCIAL_LICENSEbase.bbclass: removeCOMMERCIAL_LICENSEcode default-distrovars.inc: removeCOMMERCIAL_LICENSEet aldocumentation-audit.sh: removeCOMMERCIAL_LICENSEwarningmeta/classes/base.bbclass | 24 +++++++++++++++----- meta/conf/distro/include/default-distrovars.inc | 5 ---- .../gstreamer/gst-fluendo-mp3_0.10.16.bb | 1 + .../gstreamer/gst-openmax_0.10.1.bb | 1 + .../gstreamer/gst-plugins-ugly_0.10.18.bb | 1 + meta/recipes-multimedia/lame/lame_3.99.3.bb | 2 + meta/recipes-multimedia/libmad/libmad_0.15.1b.bb | 1 + meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb | 1 + meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb | 1 + meta/recipes-qt/qt-apps/qmmp_0.5.2.bb | 1 +
scripts/contrib/documentation-audit.sh| 3 +-11 files changed, 29 insertions(+), 12 deletions(-)_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 3 lines
Elizabeth Flanagan Yocto Project Build and Release
Quoted 74 lines · Elizabeth
Quoted 64 lines · On Fri, Jan 6, 2012 at 6:34 PM, <[email protected]> wrote:
From: Tom Zanussi <[email protected]>
This patchset is a replacement for
COMMERCIAL_LICENSEcalledLICENSE_FLAGS.Please see the commit message for '[PATCH 1/5] base.bbclass: add support
forLICENSE_FLAGS' for an explanation of theLICENSE_FLAGSmechanism.v3 changes:
- add back an accidentally-stripped comment in PATCH 1.
v2 changes, reflecting comments from Phil Blundell and Paul Eggleton:
- This version converts all the existing packages listed in
COMMERCIAL_LICENSEto the equivalent "commercial_${PN}"LICENSE_FLAGS. This allows each package to be added to or removed from the whitelist instead of the previously too-broad 'Commercial' flags for those packages.- Changes all values to lowercase.
- The new commit message should explain the mechanism and how it can be used a little better.
For some background on these changes, the original proposal for the functionality covered by this replacement was drafted by Saul Wold - the relevant details of that proposal are copied below:
***
There has been some issues raised with the initial implementation of
COMMERCIAL_LICENSEand we are looking for ways to address this. CurrentlyCOMMERCIAL_LICENSE(C_L) is defined in default-distrovars.conf to contain a list of packages that have additional license requirements when used commercially (such as royalty requirements, or acknowledging some type of commercial T&Cs). These packages are skipped during parsing.It currently contains a number of Audio and Video packages that require additional licensing terms when used commercially. As we add additional layers, some of these layers want to add additional package to the
C_Llist, but how to easily enable them.Since local.conf, where you would normally override things like this, is read in before base.bbclass, which contains tools like
oe_filter_out()to modify lists, we can't use that mechanism.That's the background, now for the proposal.
Do away with
C_Land C_*_PLUGINS, move to a "Named Bit Flag" list inLICENSE_FLAGS, each recipe can then maintain their flags directly, instead of in a shared location like default-distrovars.conf.
LICENSE_FLAGS_WHITELISTwould be set in local.conf with the values that are acceptable to include in this image, by default it would be blank.Possible values for
LICENSE_FLAGScould be:
- Binary - provides some kind of binary with no source
- Patent - provides a potential infringing item, that some may not want
- Commercial - include recipes that may have commercial T&C
- Commercial_${PN} - commercial licenses specific to ${PN}
- License_${PN} - include a recipe that has a specific license
- maybe similar or different than Commercial_${PN}Quoted 8 lines
***
[T&C = Terms and Conditions]
[NOTE: the above are only 'possible values' that particular license flags could take. The above are not proposals for specific flags that will be implemented - it's completely up to the package maintainers to define appropriate flags for their packages.]
Quoted 6 lines
Tom,
I know I would like to see a proposed group of flags. I can see this being used elsewhere at a later date and the thought of no standardization around this field worries me a bit.
The patchset essentially just provides the mechanism. As far as concrete flags, it so far translates the existing COMMERCIAL type to commercial_${PN}. I guess more would be defined as needed, but if there are requirements for specific groups now, please don't hesitate to propose them...
Tom
Quoted 48 lines
-b
Quoted 43 lines
Note that there's no policy attached to any of the above license types
- this is simply string-matching that can be used for the purpose of screening packages - if the strings match, the recipe gets in, if not, it doesn't i.e. during parsing, we would inspect the recipe's data forLICENSE_FLAGSand if it has a value then try to match against the WHITELIST - if it matches it gets added to the parsed list, if there is no match then it gets Skip_Package()'ed.The following changes since commit
468998cddbe1a803096c9b357e1b5daa3b7e8c2e:
Dongxiao Xu (1):
command.py: add parseConfigurationFiles APIare available in the git repository at:
git://git.yoctoproject.org/poky-contrib.gittzanussi/license-flags.v3
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/license-flags.v3Tom Zanussi (5):
base.bbclass: add support forLICENSE_FLAGS
AddLICENSE_FLAGSto packages mentioned inCOMMERCIAL_LICENSEbase.bbclass: removeCOMMERCIAL_LICENSEcode default-distrovars.inc: removeCOMMERCIAL_LICENSEet aldocumentation-audit.sh: removeCOMMERCIAL_LICENSEwarningmeta/classes/base.bbclass | 24 +++++++++++++++----- meta/conf/distro/include/default-distrovars.inc | 5 ---- .../gstreamer/gst-fluendo-mp3_0.10.16.bb | 1 + .../gstreamer/gst-openmax_0.10.1.bb | 1 + .../gstreamer/gst-plugins-ugly_0.10.18.bb | 1 + meta/recipes-multimedia/lame/lame_3.99.3.bb | 2 + meta/recipes-multimedia/libmad/libmad_0.15.1b.bb | 1 + meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb | 1 + meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb | 1 + meta/recipes-qt/qt-apps/qmmp_0.5.2.bb | 1 + scripts/contrib/documentation-audit.sh | 3 +- 11 files changed, 29 insertions(+), 12 deletions(-)_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core