Bug 576 - COMMERCIAL_LICENSE causes confusion
Summary: COMMERCIAL_LICENSE causes confusion
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.0 M4
Assignee: Scott Rifenbark
QA Contact:
URL: b0d04bf99838d64e71ccd43d587d6641aaa26038
Whiteboard: 04-jan-2012: Fixed/Resolved
Depends on:
Blocks:
 
Reported: 2010-12-09 08:48 UTC by Joshua Lock - Disabled
Modified: 2012-01-04 08:22 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Lock - Disabled 2010-12-09 08:48:36 UTC
I keep seeing even experienced folk stumbling over why various multimedia packages are unable to be built.

There are two main issues here:

1) We only document the COMMERCIAL_LICENSE variables in the poky.conf file, we definitely need this to be better documented elsewhere

2) The code in base.bbclass prints a message with bb.debug and raises bb.parse.SkipMessage, neither of which cause any message to be output to the user.

Can we print a list of all skipped packages, and why, at the end of the parse?
Comment 1 Saul Wold 2010-12-09 10:17:03 UTC
Originally the code was adding a NOTE during parsing of the bb files, but it was deemed too verbose!  If there is a way to print that list after parsing that would be good, my bitbake/python-fu was not strong enough for that.


Documentation needs to be created to clarify the enabling of COMMERCIAL_LICENSE recipes.

Engineers view of this:

This is a combination of removing the commercial recipes from the COMMERCIAL_LICENSE tag and adding them the the appropriate (typically all) the COMMERCIAL_*_PLUGINS need to be uncommented.

Typically this is done by adding the following lines to one's local.conf:

COMMERCIAL_LICENSE = ""
#COMMERCIAL_AUDIO_PLUGINS ?= ""
COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
# COMMERCIAL_VIDEO_PLUGINS ?= ""
COMMERCIAL_VIDEO_PLUGINS ?= "gst-plugins-ugly-mpeg2dec gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
# COMMERCIAL_QT ?= ""
COMMERCIAL_QT ?= "qmmp"
Comment 2 Scott Rifenbark 2010-12-09 10:48:31 UTC
Would Chapter 3 (Extending Poky) be an appropriate area in the Poky Reference Manual to add a section clarifying the enabling of COMMERCIAL_LICENSE
recipes?
Comment 3 Joshua Lock - Disabled 2010-12-14 10:02:26 UTC
As far as I can tell this being unset won't stop anyone building our default images so I think that section makes most sense.
Comment 4 Scott Rifenbark 2011-02-07 13:19:15 UTC
Here is what I would like to put in section 3 of the Poky Reference Manual to address the problem of building recipes with packages that have commercial licensing implications.  I would like to make this the new section 3.5.

----------

3.5  Enabling Commercially Licensed Recipes
===========================================

By default, Poky disables certain packages that have commercial licensing implications.  For example, if an image ships with a licensed version of an audio player that makes use of a particular decoder package then the  product could have licensing implications.  You can see the packages that are disabled by examining code in the $HOME/poky/meta/conf/distro/poky.conf file.  See the following related code from the configuration file:
  
# 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_AUDIO_PLUGINS ?= ""

# COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"

COMMERCIAL_VIDEO_PLUGINS ?= ""

# COMMERCIAL_VIDEO_PLUGINS ?= "gst-plugins-ugly-mpeg2dec gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"

COMMERCIAL_QT ?= ""

# COMMERCIAL_QT ?= "qmmp"

# Set of common licenses used for license.bbclass

COMMON_LICENSE_DIR ??= "${POKYBASE}/meta/files/common-licenses"


Looking at the code in poky.conf you can see that the COMMERCIAL_LICENSE variable lists several packages.  This definition essentially marks them as having potential commercial licensing problems.  Furthermore, the variables COMMERCIAL_AUDIO_PLUGINS, COMMERCIAL_VIDEO_PLUGINS, and COMMERCIAL_QT have no definitions allow for no exceptions.   

If you want to be able to build images using these packages you can edit your conf/local.conf file found in the build directory to override these defaults.  For example, adding the following code to the poky.conf file allows all recipes that use the default disabled packages to now build.

COMMERCIAL_LICENSE = ""
#COMMERCIAL_AUDIO_PLUGINS ?= ""
COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
# COMMERCIAL_VIDEO_PLUGINS ?= ""
COMMERCIAL_VIDEO_PLUGINS ?= "gst-plugins-ugly-mpeg2dec gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
# COMMERCIAL_QT ?= ""
COMMERCIAL_QT ?= "qmmp"
Comment 5 Scott Rifenbark 2011-03-03 03:58:08 UTC
The proposed change is on review.  I have received suggestions from RP and am about ready to implement them.
Comment 6 Scott Rifenbark 2011-12-14 16:59:13 UTC
This is what I will add to the YP Reference Manual in chapter 3.  I am not sure where it is going yet.  I need to check it out.

--------------------

By default, Poky disables components that have commercial licensing requirements.
The following four statements in the $HOMe/poky/meta/conf/distro/poky.conf file
disable components:

    COMMERCIAL_LICENSE ?= "lame gst-fluendo-mp3 libmad mpeg2dec ffmpeg qmmp"
    COMMERCIAL_AUDIO_PLUGINS ?= ""
    COMMERCIAL_VIDEO_PLUGINS ?= ""
    COMMERCIAL_QT ?= "qmmp"

If you want to enable these components you can do so by making sure you have the 
following statements in the configuration file:

    COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
    COMMERCIAL_VIDEO_PLUGINS = "gst-plugins-ugly-mpeg2dec gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
    COMMERCIAL_LICENSE = ""
    COMMERCIAL_QT = ""

Excluding a package name from the COMMERCIAL_LICENSE or COMMERCIAL_QT
statement enables that package.  

Specifying audio and video plug-ins as part of the 
COMMERCIAL_AUDIO_PLUGINS and COMMERCIAL_VIDEO_PLUGINS statements includes 
the plug-ins into built images - thus adding support for media formats.
Comment 7 Scott Rifenbark 2012-01-04 08:22:28 UTC
I restructured parts of chapter 3 and 4 in the YP Reference manual.  Chapter 3 (Extending) had a "Tracking Licenses" section in it.  I moved this section to the new "Technical Details" chapter and renamed it simply "Licenses".  Within the new section is the tracking information as well as the new information on how to enable recipes with commercial licensing requirements.  

The fix has been pushed to yocto-docs/master and the commit ID is
b0d04bf99838d64e71ccd43d587d6641aaa26038