Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] License Related Patches
@ 2012-02-24 22:17 Beth Flanagan
  2012-02-24 22:17 ` [PATCH 1/3] less_444.bb: Adding license email from author Beth Flanagan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Beth Flanagan @ 2012-02-24 22:17 UTC (permalink / raw)
  To: openembedded-core

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(-)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] less_444.bb: Adding license email from author
  2012-02-24 22:17 [PATCH 0/3] License Related Patches Beth Flanagan
@ 2012-02-24 22:17 ` Beth Flanagan
  2012-02-24 22:17 ` [PATCH 2/3] license.bbclass: Gather Pkg level licenses Beth Flanagan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Beth Flanagan @ 2012-02-24 22:17 UTC (permalink / raw)
  To: openembedded-core

From: Elizabeth Flanagan <elizabeth.flanagan@intel.com>

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.

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/recipes-extended/less/less_444.bb |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/less/less_444.bb b/meta/recipes-extended/less/less_444.bb
index f413ba0..fb7059d 100644
--- a/meta/recipes-extended/less/less_444.bb
+++ b/meta/recipes-extended/less/less_444.bb
@@ -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 <markn@greenwoodsoftware.com>
+# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
+# 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 \
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] license.bbclass: Gather Pkg level licenses
  2012-02-24 22:17 [PATCH 0/3] License Related Patches Beth Flanagan
  2012-02-24 22:17 ` [PATCH 1/3] less_444.bb: Adding license email from author Beth Flanagan
@ 2012-02-24 22:17 ` Beth Flanagan
  2012-02-24 22:17 ` [PATCH 3/3] license.bbclass: Symbolic links of generic license Beth Flanagan
  2012-02-26  1:51 ` [PATCH 0/3] License Related Patches Saul Wold
  3 siblings, 0 replies; 5+ messages in thread
From: Beth Flanagan @ 2012-02-24 22:17 UTC (permalink / raw)
  To: openembedded-core

From: Elizabeth Flanagan <elizabeth.flanagan@intel.com>

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.

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/classes/license.bbclass |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 10a937b..11908d9 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -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)
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] license.bbclass: Symbolic links of generic license
  2012-02-24 22:17 [PATCH 0/3] License Related Patches Beth Flanagan
  2012-02-24 22:17 ` [PATCH 1/3] less_444.bb: Adding license email from author Beth Flanagan
  2012-02-24 22:17 ` [PATCH 2/3] license.bbclass: Gather Pkg level licenses Beth Flanagan
@ 2012-02-24 22:17 ` Beth Flanagan
  2012-02-26  1:51 ` [PATCH 0/3] License Related Patches Saul Wold
  3 siblings, 0 replies; 5+ messages in thread
From: Beth Flanagan @ 2012-02-24 22:17 UTC (permalink / raw)
  To: openembedded-core

From: Elizabeth Flanagan <elizabeth.flanagan@intel.com>

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.

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/classes/license.bbclass |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 11908d9..cfc9eaf 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -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
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] License Related Patches
  2012-02-24 22:17 [PATCH 0/3] License Related Patches Beth Flanagan
                   ` (2 preceding siblings ...)
  2012-02-24 22:17 ` [PATCH 3/3] license.bbclass: Symbolic links of generic license Beth Flanagan
@ 2012-02-26  1:51 ` Saul Wold
  3 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-02-26  1:51 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 02/24/2012 02:17 PM, Beth Flanagan wrote:
> 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(-)
>
Merged into OE-core

Thanks
	Sau!

>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-26  1:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-24 22:17 [PATCH 0/3] License Related Patches Beth Flanagan
2012-02-24 22:17 ` [PATCH 1/3] less_444.bb: Adding license email from author Beth Flanagan
2012-02-24 22:17 ` [PATCH 2/3] license.bbclass: Gather Pkg level licenses Beth Flanagan
2012-02-24 22:17 ` [PATCH 3/3] license.bbclass: Symbolic links of generic license Beth Flanagan
2012-02-26  1:51 ` [PATCH 0/3] License Related Patches Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox