License Related Patches
cover License Related Patches
A few license related patches:
1. Per a request from Mark Hatle, adding the email from Mark Nudelman to me which allows us to use BSD license as opposed to the less license within the recipe.
2. Next patch looks for package level LICENSE. If it finds it, it uses it. If not it falls back to LICENSE.
3. A bit of space optimization around copying licenses to the image. When COPY_LIC_MANIFEST and COPY_LIC_DIRS are set we copy the generic licenses once if found and then symlink to it from each /usr/share/common-licenses/${pkg} directory.
The following changes since commit 21ddc964ced18d4f1058c003f46acc2c7f1f1fe3:
scripts/hob: Launch the new hob (2012-02-24 18:09:20 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib eflanagan/license_fixes
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=eflanagan/license_fixes
Elizabeth Flanagan (3):
less_444.bb: Adding license email from author license.bbclass: Gather Pkg level licenses license.bbclass: Symbolic links of generic license
meta/classes/license.bbclass | 32 +++++++++++++++++++++++--------- meta/recipes-extended/less/less_444.bb | 15 ++++++++++++--- 2 files changed, 35 insertions(+), 12 deletions(-)
PATCH 1/3 less_444.bb: Adding license email from author
From: Elizabeth Flanagan <[email protected]>
This slipped off my plate. Adding the email response from the author of less which allows us to use a generic BSD instead of the less license.
--- meta/recipes-extended/less/less_444.bb | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-)
meta/recipes-extended/less/less_444.bb +12 -3
@@ -6,9 +6,18 @@ HOMEPAGE = "http://www.greenwoodsoftware.com/" SECTION = "console/utils" # (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less -# less is a 2-clause BSD-like permissive license -# Mark Nudelman (author of less) has given permission to utilize a generic -# 2-clause BSD +# Including email author giving permissing to use BSD +# +# From: Mark Nudelman <[email protected]> +# To: Elizabeth Flanagan <[email protected] +# Date: 12/19/11 +# +# Hi Elizabeth, +# Using a generic BSD license for less is fine with me. +# Thanks, +# +# --Mark +# LICENSE = "GPLv3+ | BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
Signature · 1 line
1.7.1
PATCH 2/3 license.bbclass: Gather Pkg level licenses
From: Elizabeth Flanagan <[email protected]>
We should look for LICENSE at a package level first. If it's not found, we should use the recipe level LICENSE. This adds a bit more granularity to license manifests where needed.
--- meta/classes/license.bbclass | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
meta/classes/license.bbclass +14 -2
@@ -140,8 +140,20 @@ python do_populate_lic() { import shutil import oe.license - # All the license types for the package - license_types = d.getVar('LICENSE', True) + pn = d.getVar('PN', True) + for package in d.getVar('PACKAGES', True): + if d.getVar('LICENSE_' + pn + '-' + package, True): + license_types = license_types + ' & ' + \ + d.getVar('LICENSE_' + pn + '-' + package, True) + + #If we get here with no license types, then that means we have a recipe + #level license. If so, we grab only those. + try: + license_types + except NameError: + # All the license types at the recipe level + license_types = d.getVar('LICENSE', True) + # All the license files for the package lic_files = d.getVar('LIC_FILES_CHKSUM', True) pn = d.getVar('PN', True)
Signature · 1 line
1.7.1
PATCH 3/3 license.bbclass: Symbolic links of generic license
In reply to Beth FlanaganFrom: Elizabeth Flanagan <[email protected]>
This is to reduce the size of licenses added to images. With this commit license.manifest, original license and generic license adds about .5M to a core-image-minimal image, substantially less than what is currently occuring when COPY_LIC_MANIFEST and COPY_LIC_DIRS are set.
--- meta/classes/license.bbclass | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
meta/classes/license.bbclass +9 -7
@@ -106,22 +106,24 @@ license_create_manifest() { # Two options here: # - Just copy the manifest # - Copy the manifest and the license directories - # This will make your image a bit larger, however - # if you are concerned about license compliance - # and delivery this should cover all your bases - + # With both options set we see a .5 M increase in core-image-minimal if [ -n "${COPY_LIC_MANIFEST}" ]; then mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/ cp ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest ${IMAGE_ROOTFS}/usr/share/common-licenses/license.manifest if [ -n "${COPY_LIC_DIRS}" ]; then for pkg in ${INSTALLED_PKGS}; do mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg} - for lic in `ls ${LICENSE_DIRECTORY}/${pkged_pn}`; do + for lic in `ls ${LICENSE_DIRECTORY}/${pkg}`; do # Really don't need to copy the generics as they're # represented in the manifest and in the actual pkg licenses # Doing so would make your image quite a bit larger - if [ ! ${lic} = "generic_*" ]; then - cp ${LICENSE_DIRECTORY}/${pkged_pn}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic} + if [[ "${lic}" != "generic_"* ]]; then + cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic} + elif [[ "${lic}" == "generic_"* ]]; then + if [ ! -f ${IMAGE_ROOTFS}/usr/share/common-licenses/${lic} ]; then + cp ${LICENSE_DIRECTORY}/${pkg}/${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/ + fi + ln -s ../${lic} ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}/${lic} fi done done
Signature · 1 line
1.7.1
Saul Wold
AppliedQuoted 22 lines · Beth Flanagan
A few license related patches:
1. Per a request from Mark Hatle, adding the email from Mark Nudelman to me which allows us to use BSD license as opposed to the less license within the recipe.
2. Next patch looks for package level LICENSE. If it finds it, it uses it. If not it falls back to LICENSE.
3. A bit of space optimization around copying licenses to the image. When
COPY_LIC_MANIFESTandCOPY_LIC_DIRSare set we copy the generic licenses once if found and then symlink to it from each/usr/share/common-licenses/${pkg}directory.The following changes since commit
21ddc964ced18d4f1058c003f46acc2c7f1f1fe3:scripts/hob: Launch the new hob (2012-02-24 18:09:20 +0000)are available in the git repository at:
git://git.yoctoproject.org/poky-contribeflanagan/license_fixes
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=eflanagan/license_fixes
Quoted 9 lines
Elizabeth Flanagan (3):
less_444.bb: Adding license email from author license.bbclass: Gather Pkg level licenses license.bbclass: Symbolic links of generic licensemeta/classes/license.bbclass | 32 +++++++++++++++++++++++--------- meta/recipes-extended/less/less_444.bb | 15 ++++++++++++--- 2 files changed, 35 insertions(+), 12 deletions(-)
Merged into OE-core
Thanks
Sau!
Quoted 6 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core