Merged license wrangling changes
cover Merged license wrangling changes
These are the changes from the RFCs Chris Larson and I sent out this weekend merged into one branch. Trimmed the PULL down some as there are a number of license text diffs that cause send-patch-request to choke.
The following changes since commit 2a9b24dee8b927488c5c50010418d87f7cea090a:
OECore license fixes: meta/* (2011-12-06 14:33:18 -0800)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib eflanagan/license_m1
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=eflanagan/license_m1
Christopher Larson (4):
oe.test_types: move into an oe.tests package
license: split license parsing into oe.license
oe.license: add license flattening code
Add copyleft compliance class
Elizabeth Flanagan (2):
[YOCTO #1776] license: manifest and license path OECore license fixes: meta/*
meta/classes/copyleft_compliance.bbclass | 94 +++
meta/classes/license.bbclass | 259 +++++---
meta/classes/package.bbclass | 1 +
meta/classes/rootfs_ipk.bbclass | 3 +
meta/classes/rootfs_rpm.bbclass | 3 +
meta/conf/licenses.conf | 54 ++-
meta/files/common-licenses/AFL-1 | 92 ---
meta/files/common-licenses/AFL-2 | 155 -----
meta/files/common-licenses/AGPL-3 | 213 ------
meta/files/common-licenses/APL-1 | 327 ----------
meta/files/common-licenses/APSL-1 | 334 ----------
meta/files/common-licenses/APSL-2 | 337 ----------
meta/files/common-licenses/Adobe | 14 +
meta/files/common-licenses/Apache-1 | 59 --
meta/files/common-licenses/Apache-2 | 203 ------
meta/files/common-licenses/Artistic | 131 ----
meta/files/common-licenses/Artistic-1 | 97 ---
meta/files/common-licenses/Artistic-2 | 202 ------
meta/files/common-licenses/BSL-1 | 25 -
meta/files/common-licenses/BitstreamVera | 160 +++++
meta/files/common-licenses/CATOSL-1 | 335 ----------
meta/files/common-licenses/CC-BY-1 | 185 ------
meta/files/common-licenses/CC-BY-2 | 205 ------
meta/files/common-licenses/CC-BY-3 | 283 --------
meta/files/common-licenses/CC-BY-NC-1 | 194 ------
meta/files/common-licenses/CC-BY-NC-2 | 220 -------
meta/files/common-licenses/CC-BY-NC-3 | 297 ---------
meta/files/common-licenses/CC-BY-NC-ND-1 | 146 -----
meta/files/common-licenses/CC-BY-NC-ND-2 | 209 ------
meta/files/common-licenses/CC-BY-NC-ND-3 | 272 --------
meta/files/common-licenses/CC-BY-NC-SA-1 | 209 ------
meta/files/common-licenses/CC-BY-NC-SA-2 | 242 -------
meta/files/common-licenses/CC-BY-NC-SA-3 | 320 ---------
meta/files/common-licenses/CC-BY-ND-2 | 194 ------
meta/files/common-licenses/CC-BY-ND-3 | 259 --------
meta/files/common-licenses/CC-BY-SA-1 | 201 ------
meta/files/common-licenses/CC-BY-SA-2 | 227 -------
meta/files/common-licenses/CC-BY-SA-3 | 319 ---------
meta/files/common-licenses/CDDL-1 | 313 ---------
meta/files/common-licenses/CECILL-1 | 462 -------------
meta/files/common-licenses/CECILL-2 | 451 -------------
meta/files/common-licenses/CPAL-1 | 435 -------------
meta/files/common-licenses/CPL-1 | 250 --------
meta/files/common-licenses/CUA-OPL-1 | 482 --------------
meta/files/common-licenses/DSSSL | 49 ++
meta/files/common-licenses/ECL-1 | 61 --
meta/files/common-licenses/ECL-2 | 218 -------
meta/files/common-licenses/EDL-1.0 | 13 +
meta/files/common-licenses/EFL-1 | 30 -
meta/files/common-licenses/EFL-2 | 27 -
meta/files/common-licenses/EPL-1 | 204 ------
meta/files/common-licenses/EUPL-1 | 302 ---------
meta/files/common-licenses/Elfutils-Exception | 12 +
meta/files/common-licenses/ErlPL-1 | 293 ---------
meta/files/common-licenses/Frameworx-1 | 181 ------
meta/files/common-licenses/FreeType | 170 +++++
meta/files/common-licenses/GPL-1 | 259 --------
meta/files/common-licenses/GPL-1.0+ | 252 --------
meta/files/common-licenses/GPL-2 | 23 -
.../common-licenses/GPL-2,0-with-GCC-exception | 17 -
.../common-licenses/GPL-2,0-with-font-exception | 18 -
meta/files/common-licenses/GPL-2.0+ | 132 ----
.../common-licenses/GPL-2.0-with-GCC-exception | 13 +-
.../common-licenses/GPL-2.0-with-font-exception | 14 +-
meta/files/common-licenses/GPL-3 | 70 --
meta/files/common-licenses/GPL-3.0 | 224 +++++++-
meta/files/common-licenses/GPL-3.0+ | 3 -
meta/files/common-licenses/IPL-1 | 222 -------
meta/files/common-licenses/LGPL-2 | 461 -------------
meta/files/common-licenses/LGPL-2.0 | 189 ++++++-
meta/files/common-licenses/LGPL-2.0+ | 173 -----
meta/files/common-licenses/LGPL-2.1+ | 176 -----
meta/files/common-licenses/LGPL-3 | 147 -----
meta/files/common-licenses/LGPL-3.0 | 53 +-
meta/files/common-licenses/LGPL-3.0+ | 66 --
meta/files/common-licenses/LPL-1 | 213 ------
meta/files/common-licenses/LPPL-1 | 422 ------------
meta/files/common-licenses/MIT-style | 1 -
meta/files/common-licenses/MPL-1 | 433 -------------
meta/files/common-licenses/NASA-1 | 246 -------
meta/files/common-licenses/NPOSL-3 | 206 ------
meta/files/common-licenses/OASIS | 13 +
meta/files/common-licenses/OCLC-2 | 207 ------
meta/files/common-licenses/OFL-1 | 96 ---
meta/files/common-licenses/OLDAP-2 | 54 --
meta/files/common-licenses/OSL-1 | 172 -----
meta/files/common-licenses/OSL-1.0 | 2 +-
meta/files/common-licenses/OSL-2 | 171 -----
meta/files/common-licenses/OSL-3 | 157 -----
meta/files/common-licenses/PHP-3 | 70 --
meta/files/common-licenses/Proprietary | 1 +
meta/files/common-licenses/Python-2 | 192 ------
meta/files/common-licenses/QPL-1 | 96 ---
meta/files/common-licenses/RPL-1 | 582 -----------------
meta/files/common-licenses/RPSL-1 | 535 ----------------
meta/files/common-licenses/SPL | 519 ---------------
meta/files/common-licenses/Simple-2 | 53 --
meta/files/common-licenses/UCB | 26 +
meta/files/common-licenses/VSL-1 | 54 --
meta/files/common-licenses/Watcom-1 | 389 -----------
meta/files/common-licenses/XFree86-1 | 50 --
meta/files/common-licenses/YPL-1 | 140 ----
meta/files/common-licenses/ZPL-1 | 60 --
meta/files/common-licenses/ZPL-2 | 44 --
meta/files/common-licenses/Zimbra-1 | 140 ----
meta/files/common-licenses/eCos-2 | 38 --
meta/lib/oe/license.py | 62 ++
.../CC-BY-ND-1 => lib/oe/tests/__init__.py} | 0
meta/lib/oe/tests/test_license.py | 68 ++
meta/lib/oe/{ => tests}/test_types.py | 0
.../base-files/base-files/licenses/Artistic | 131 ----
.../base-files/base-files/licenses/BSD | 26 -
.../base-files/base-files/licenses/GFDL-1.2 | 397 ------------
.../base-files/base-files/licenses/GPL-3 | 676 --------------------
.../base-files/base-files/licenses/LGPL-2 | 481 --------------
.../base-files/base-files/licenses/LGPL-2.1 | 510 ---------------
.../base-files/base-files/licenses/LGPL-3 | 165 -----
meta/recipes-core/base-files/base-files_3.0.14.bb | 20 +-
meta/recipes-core/busybox/busybox.inc | 3 +-
meta/recipes-core/busybox/busybox_1.19.3.bb | 2 +-
.../gettext/gettext-minimal-native_0.18.1.1.bb | 4 +-
meta/recipes-core/gettext/gettext_0.18.1.1.bb | 4 +-
meta/recipes-core/jpeg/jpeg_8c.bb | 4 +-
meta/recipes-devtools/elfutils/elfutils_0.148.bb | 4 +-
meta/recipes-devtools/python/python-pyrex_0.9.9.bb | 4 +-
.../squashfs-tools/squashfs-tools_4.2.bb | 4 +-
meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb | 4 +-
meta/recipes-devtools/tcltk/tcl_8.5.11.bb | 4 +-
.../transfig/transfig-native_3.2.5d.bb | 4 +-
meta/recipes-extended/byacc/byacc_20110908.bb | 10 +-
meta/recipes-extended/bzip2/bzip2_1.0.6.bb | 4 +-
meta/recipes-extended/less/less_444.bb | 7 +-
.../tcp-wrappers/tcp-wrappers_7.6.bb | 4 +-
meta/recipes-extended/unzip/unzip_6.0.bb | 4 +-
meta/recipes-extended/xinetd/xinetd_2.3.14.bb | 5 +-
meta/recipes-extended/zip/zip.inc | 2 +-
meta/recipes-extended/zip/zip_3.0.bb | 2 +-
.../recipes-gnome/gnome/gnome-icon-theme_2.31.0.bb | 4 +-
meta/recipes-graphics/clutter/clutter-box2d.inc | 2 +-
meta/recipes-graphics/clutter/clutter-box2d_git.bb | 2 +-
meta/recipes-graphics/freetype/freetype_2.4.6.bb | 4 +-
.../ttf-fonts/ttf-bitstream-vera_1.10.bb | 4 +-
meta/recipes-graphics/xorg-app/xrandr_1.3.5.bb | 4 +-
.../recipes-graphics/xorg-font/font-alias_1.0.3.bb | 4 +-
meta/recipes-graphics/xorg-font/font-util_1.2.0.bb | 5 +-
.../linux-firmware/linux-firmware_git.bb | 5 +
meta/recipes-multimedia/libtiff/tiff_3.9.5.bb | 4 +-
.../matchbox-theme-sato/matchbox-theme-sato.inc | 2 +-
.../matchbox-theme-sato/matchbox-theme-sato_0.1.bb | 2 +-
.../sato-icon-theme/sato-icon-theme.inc | 2 +-
.../sato-icon-theme/sato-icon-theme_0.4.1.bb | 2 +-
meta/recipes-support/boost/boost.inc | 4 +-
152 files changed, 1440 insertions(+), 20152 deletions(-)
create mode 100644 meta/classes/copyleft_compliance.bbclass
delete mode 100644 meta/files/common-licenses/AFL-1
delete mode 100644 meta/files/common-licenses/AFL-2
delete mode 100644 meta/files/common-licenses/AGPL-3
delete mode 100644 meta/files/common-licenses/APL-1
delete mode 100644 meta/files/common-licenses/APSL-1
delete mode 100644 meta/files/common-licenses/APSL-2
create mode 100644 meta/files/common-licenses/Adobe
delete mode 100644 meta/files/common-licenses/Apache-1
delete mode 100644 meta/files/common-licenses/Apache-2
delete mode 100644 meta/files/common-licenses/Artistic
delete mode 100644 meta/files/common-licenses/Artistic-1
delete mode 100644 meta/files/common-licenses/Artistic-2
delete mode 100644 meta/files/common-licenses/BSL-1
create mode 100644 meta/files/common-licenses/BitstreamVera
delete mode 100644 meta/files/common-licenses/CATOSL-1
delete mode 100644 meta/files/common-licenses/CC-BY-1
delete mode 100644 meta/files/common-licenses/CC-BY-2
delete mode 100644 meta/files/common-licenses/CC-BY-3
delete mode 100644 meta/files/common-licenses/CC-BY-NC-1
delete mode 100644 meta/files/common-licenses/CC-BY-NC-2
delete mode 100644 meta/files/common-licenses/CC-BY-NC-3
delete mode 100644 meta/files/common-licenses/CC-BY-NC-ND-1
delete mode 100644 meta/files/common-licenses/CC-BY-NC-ND-2
delete mode 100644 meta/files/common-licenses/CC-BY-NC-ND-3
delete mode 100644 meta/files/common-licenses/CC-BY-NC-SA-1
delete mode 100644 meta/files/common-licenses/CC-BY-NC-SA-2
delete mode 100644 meta/files/common-licenses/CC-BY-NC-SA-3
delete mode 100644 meta/files/common-licenses/CC-BY-ND-2
delete mode 100644 meta/files/common-licenses/CC-BY-ND-3
delete mode 100644 meta/files/common-licenses/CC-BY-SA-1
delete mode 100644 meta/files/common-licenses/CC-BY-SA-2
delete mode 100644 meta/files/common-licenses/CC-BY-SA-3
delete mode 100644 meta/files/common-licenses/CDDL-1
delete mode 100644 meta/files/common-licenses/CECILL-1
delete mode 100644 meta/files/common-licenses/CECILL-2
delete mode 100644 meta/files/common-licenses/CPAL-1
delete mode 100644 meta/files/common-licenses/CPL-1
delete mode 100644 meta/files/common-licenses/CUA-OPL-1
create mode 100644 meta/files/common-licenses/DSSSL
delete mode 100644 meta/files/common-licenses/ECL-1
delete mode 100644 meta/files/common-licenses/ECL-2
create mode 100644 meta/files/common-licenses/EDL-1.0
delete mode 100644 meta/files/common-licenses/EFL-1
delete mode 100644 meta/files/common-licenses/EFL-2
delete mode 100644 meta/files/common-licenses/EPL-1
delete mode 100644 meta/files/common-licenses/EUPL-1
create mode 100644 meta/files/common-licenses/Elfutils-Exception
delete mode 100644 meta/files/common-licenses/ErlPL-1
delete mode 100644 meta/files/common-licenses/Frameworx-1
create mode 100644 meta/files/common-licenses/FreeType
delete mode 100644 meta/files/common-licenses/GPL-1
delete mode 100644 meta/files/common-licenses/GPL-1.0+
delete mode 100644 meta/files/common-licenses/GPL-2
delete mode 100644 meta/files/common-licenses/GPL-2,0-with-GCC-exception
delete mode 100644 meta/files/common-licenses/GPL-2,0-with-font-exception
delete mode 100644 meta/files/common-licenses/GPL-2.0+
delete mode 100644 meta/files/common-licenses/GPL-3
delete mode 100644 meta/files/common-licenses/GPL-3.0+
delete mode 100644 meta/files/common-licenses/IPL-1
delete mode 100644 meta/files/common-licenses/LGPL-2
delete mode 100644 meta/files/common-licenses/LGPL-2.0+
delete mode 100644 meta/files/common-licenses/LGPL-2.1+
delete mode 100644 meta/files/common-licenses/LGPL-3
delete mode 100644 meta/files/common-licenses/LGPL-3.0+
delete mode 100644 meta/files/common-licenses/LPL-1
delete mode 100644 meta/files/common-licenses/LPPL-1
delete mode 120000 meta/files/common-licenses/MIT-style
delete mode 100644 meta/files/common-licenses/MPL-1
delete mode 100644 meta/files/common-licenses/NASA-1
delete mode 100644 meta/files/common-licenses/NPOSL-3
create mode 100644 meta/files/common-licenses/OASIS
delete mode 100644 meta/files/common-licenses/OCLC-2
delete mode 100644 meta/files/common-licenses/OFL-1
delete mode 100644 meta/files/common-licenses/OLDAP-2
delete mode 100644 meta/files/common-licenses/OSL-1
delete mode 100644 meta/files/common-licenses/OSL-2
delete mode 100644 meta/files/common-licenses/OSL-3
delete mode 100644 meta/files/common-licenses/PHP-3
create mode 100644 meta/files/common-licenses/Proprietary
delete mode 100644 meta/files/common-licenses/Python-2
delete mode 100644 meta/files/common-licenses/QPL-1
delete mode 100644 meta/files/common-licenses/RPL-1
delete mode 100644 meta/files/common-licenses/RPSL-1
delete mode 100644 meta/files/common-licenses/SPL
delete mode 100644 meta/files/common-licenses/Simple-2
create mode 100644 meta/files/common-licenses/UCB
delete mode 100644 meta/files/common-licenses/VSL-1
delete mode 100644 meta/files/common-licenses/Watcom-1
delete mode 100644 meta/files/common-licenses/XFree86-1
delete mode 100644 meta/files/common-licenses/YPL-1
delete mode 100644 meta/files/common-licenses/ZPL-1
delete mode 100644 meta/files/common-licenses/ZPL-2
delete mode 100644 meta/files/common-licenses/Zimbra-1
delete mode 100644 meta/files/common-licenses/eCos-2
create mode 100644 meta/lib/oe/license.py
rename meta/{files/common-licenses/CC-BY-ND-1 => lib/oe/tests/__init__.py} (100%)
create mode 100644 meta/lib/oe/tests/test_license.py
rename meta/lib/oe/{ => tests}/test_types.py (100%)
delete mode 100644 meta/recipes-core/base-files/base-files/licenses/Artistic
delete mode 100644 meta/recipes-core/base-files/base-files/licenses/BSD
delete mode 100644 meta/recipes-core/base-files/base-files/licenses/GFDL-1.2
delete mode 100644 meta/recipes-core/base-files/base-files/licenses/GPL-3
delete mode 100644 meta/recipes-core/base-files/base-files/licenses/LGPL-2
delete mode 100644 meta/recipes-core/base-files/base-files/licenses/LGPL-2.1
delete mode 100644 meta/recipes-core/base-files/base-files/licenses/LGPL-3PATCH 1/6 oe.test_types: move into an oe.tests package
From: Christopher Larson <[email protected]>
---
meta/lib/oe/{ => tests}/test_types.py | 0
1 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 meta/lib/oe/tests/__init__.py
rename meta/lib/oe/{ => tests}/test_types.py (100%)meta/lib/oe/tests/__init__.py new file +0 -0
meta/lib/oe/tests/test_types.py renamed from meta/lib/oe/test_types.py +0 -0
Signature · 1 line
1.7.1
PATCH 2/6 license: split license parsing into oe.license
From: Christopher Larson <[email protected]>
In addition to moving this functionality to oe.license, makes the string preparation more picky before passing it off to the ast compilation. This ensures that LICENSE entries like 'GPL/BSD' are seen as invalid (due to the presence of the unsupported '/').
--- meta/classes/license.bbclass | 59 ++++++++++++------------------------ meta/lib/oe/license.py | 32 ++++++++++++++++++++ meta/lib/oe/tests/test_license.py | 38 +++++++++++++++++++++++ 3 files changed, 90 insertions(+), 39 deletions(-) create mode 100644 meta/lib/oe/license.py create mode 100644 meta/lib/oe/tests/test_license.py
meta/classes/license.bbclass +20 -39
@@ -1,17 +1,17 @@ # Populates LICENSE_DIRECTORY as set in distro config with the license files as set by -# LIC_FILES_CHKSUM. +# LIC_FILES_CHKSUM. # TODO: # - We should also enable the ability to put the generated license directory onto the # rootfs # - Gather up more generic licenses -# - There is a real issue revolving around license naming standards. See license names +# - There is a real issue revolving around license naming standards. See license names # licenses.conf and compare them to the license names in the recipes. You'll see some # differences and that should be corrected. LICENSE_DIRECTORY ??= "${DEPLOY_DIR}/licenses" LICSSTATEDIR = "${WORKDIR}/license-destdir/" -addtask populate_lic after do_patch before do_package +addtask populate_lic after do_patch before do_package do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" do_populate_lic[cleandirs] = "${LICSSTATEDIR}"
@@ -20,7 +20,7 @@ do_populate_lic[cleandirs] = "${LICSSTATEDIR}" # break the non-standardized license names that we find in LICENSE, we'll set # up a bunch of VarFlags to accomodate non-SPDX license names. # -# We should really discuss standardizing this field, but that's a longer term goal. +# We should really discuss standardizing this field, but that's a longer term goal. # For now, we can do this and it should grab the most common LICENSE naming variations. #GPL variations
@@ -57,37 +57,25 @@ python do_populate_lic() { import os import bb import shutil - import ast - - class LicenseVisitor(ast.NodeVisitor): - def generic_visit(self, node): - ast.NodeVisitor.generic_visit(self, node) + import oe.license + class FindVisitor(oe.license.LicenseVisitor): def visit_Str(self, node): # # Until I figure out what to do with # the two modifiers I support (or greater = + # and "with exceptions" being * - # we'll just strip out the modifier and put + # we'll just strip out the modifier and put # the base license. find_license(node.s.replace("+", "").replace("*", "")) - ast.NodeVisitor.generic_visit(self, node) - - def visit_BinOp(self, node): - op = node.op - if isinstance(op, ast.BitOr): - x = LicenseVisitor() - x.visit(node.left) - x.visit(node.right) - else: - ast.NodeVisitor.generic_visit(self, node) + self.generic_visit(node) def copy_license(source, destination, file_name): try: bb.copyfile(os.path.join(source, file_name), os.path.join(destination, file_name)) except: bb.warn("%s: No generic license file exists for: %s at %s" % (pn, file_name, source)) - pass + pass def link_license(source, destination, file_name): try:
@@ -108,8 +96,8 @@ python do_populate_lic() { # Great, there is an SPDXLICENSEMAP. We can copy! bb.note("We need to use a SPDXLICENSEMAP for %s" % (license_type)) spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type) - copy_license(generic_directory, gen_lic_dest, spdx_generic) - link_license(gen_lic_dest, destdir, spdx_generic) + copy_license(generic_directory, gen_lic_dest, spdx_generic) + link_license(gen_lic_dest, destdir, spdx_generic) else: # And here is where we warn people that their licenses are lousy bb.warn("%s: No generic license file exists for: %s at %s" % (pn, license_type, generic_directory))
@@ -117,7 +105,7 @@ python do_populate_lic() { pass elif os.path.isfile(os.path.join(generic_directory, license_type)): copy_license(generic_directory, gen_lic_dest, license_type) - link_license(gen_lic_dest, destdir, license_type) + link_license(gen_lic_dest, destdir, license_type) # All the license types for the package license_types = d.getVar('LICENSE', True)
@@ -130,7 +118,7 @@ python do_populate_lic() { srcdir = d.getVar('S', True) # Directory we store the generic licenses as set in the distro configuration generic_directory = d.getVar('COMMON_LICENSE_DIR', True) - + try: bb.mkdirhier(destdir) except:
@@ -153,21 +141,14 @@ python do_populate_lic() { # If the copy didn't occur, something horrible went wrong and we fail out if ret is False or ret == 0: bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % srclicfile) - + gen_lic_dest = os.path.join(d.getVar('LICENSE_DIRECTORY', True), "common-licenses") - - clean_licenses = "" - - for x in license_types.replace("(", " ( ").replace(")", " ) ").split(): - if ((x != "(") and (x != ")") and (x != "&") and (x != "|")): - clean_licenses += "'" + x + "'" - else: - clean_licenses += " " + x + " " - - # lstrip any possible indents, since ast needs python syntax. - node = ast.parse(clean_licenses.lstrip()) - v = LicenseVisitor() - v.visit(node) + + v = FindVisitor() + try: + v.visit_string(license_types) + except oe.license.InvalidLicense as exc: + bb.fatal("%s: %s" % (d.getVar('PF', True), exc)) } SSTATETASKS += "do_populate_lic"
meta/lib/oe/license.py new file +32 -0
@@ -0,0 +1,32 @@ +# vi:sts=4:sw=4:et +"""Code for parsing OpenEmbedded license strings""" + +import ast +import re + +class InvalidLicense(StandardError): + def __init__(self, license): + self.license = license + StandardError.__init__(self) + + def __str__(self): + return "invalid license '%s'" % self.license + +license_operator = re.compile('([&|() ])') +license_pattern = re.compile('[a-zA-Z0-9.+_\-]+$') + +class LicenseVisitor(ast.NodeVisitor): + """Syntax tree visitor which can accept OpenEmbedded license strings""" + def visit_string(self, licensestr): + new_elements = [] + elements = filter(lambda x: x.strip(), license_operator.split(licensestr)) + for pos, element in enumerate(elements): + if license_pattern.match(element): + if pos > 0 and license_pattern.match(elements[pos-1]): + new_elements.append('&') + element = '"' + element + '"' + elif not license_operator.match(element): + raise InvalidLicense(element) + new_elements.append(element) + + self.visit(ast.parse(' '.join(new_elements)))
meta/lib/oe/tests/test_license.py new file +38 -0
@@ -0,0 +1,38 @@ +import unittest +import oe.license + +class SeenVisitor(oe.license.LicenseVisitor): + def __init__(self): + self.seen = [] + oe.license.LicenseVisitor.__init__(self) + + def visit_Str(self, node): + self.seen.append(node.s) + +class TestSingleLicense(unittest.TestCase): + licenses = [ + "GPLv2", + "LGPL-2.0", + "Artistic", + "MIT", + "GPLv3+", + "FOO_BAR", + ] + invalid_licenses = ["GPL/BSD"] + + @staticmethod + def parse(licensestr): + visitor = SeenVisitor() + visitor.visit_string(licensestr) + return visitor.seen + + def test_single_licenses(self): + for license in self.licenses: + licenses = self.parse(license) + self.assertListEqual(licenses, [license]) + + def test_invalid_licenses(self): + for license in self.invalid_licenses: + with self.assertRaises(oe.license.InvalidLicense) as cm: + self.parse(license) + self.assertEqual(cm.exception.license, license)
Signature · 1 line
1.7.1
PATCH 3/6 oe.license: add license flattening code
In reply to Beth FlanaganFrom: Christopher Larson <[email protected]>
This flattens a license tree by selecting one side of each OR operation (chosen via the user supplied function).
--- meta/lib/oe/license.py | 30 ++++++++++++++++++++++++++++++ meta/lib/oe/tests/test_license.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 0 deletions(-)
meta/lib/oe/license.py +30 -0
@@ -30,3 +30,33 @@ class LicenseVisitor(ast.NodeVisitor): new_elements.append(element) self.visit(ast.parse(' '.join(new_elements))) + +class FlattenVisitor(LicenseVisitor): + """Flatten a license tree (parsed from a string) by selecting one of each + set of OR options, in the way the user specifies""" + def __init__(self, choose_licenses): + self.choose_licenses = choose_licenses + self.licenses = [] + LicenseVisitor.__init__(self) + + def visit_Str(self, node): + self.licenses.append(node.s) + + def visit_BinOp(self, node): + if isinstance(node.op, ast.BitOr): + left = FlattenVisitor(self.choose_licenses) + left.visit(node.left) + + right = FlattenVisitor(self.choose_licenses) + right.visit(node.right) + + selected = self.choose_licenses(left.licenses, right.licenses) + self.licenses.extend(selected) + else: + self.generic_visit(node) + +def flattened_licenses(licensestr, choose_licenses): + """Given a license string and choose_licenses function, return a flat list of licenses""" + flatten = FlattenVisitor(choose_licenses) + flatten.visit_string(licensestr) + return flatten.licenses
meta/lib/oe/tests/test_license.py +30 -0
@@ -36,3 +36,33 @@ class TestSingleLicense(unittest.TestCase): with self.assertRaises(oe.license.InvalidLicense) as cm: self.parse(license) self.assertEqual(cm.exception.license, license) + +class TestSimpleCombinations(unittest.TestCase): + tests = { + "FOO&BAR": ["FOO", "BAR"], + "BAZ & MOO": ["BAZ", "MOO"], + "ALPHA|BETA": ["ALPHA"], + "BAZ&MOO|FOO": ["FOO"], + "FOO&BAR|BAZ": ["FOO", "BAR"], + } + preferred = ["ALPHA", "FOO", "BAR"] + + def test_tests(self): + def choose(a, b): + if all(lic in self.preferred for lic in b): + return b + else: + return a + + for license, expected in self.tests.items(): + licenses = oe.license.flattened_licenses(license, choose) + self.assertListEqual(licenses, expected) + +class TestComplexCombinations(TestSimpleCombinations): + tests = { + "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"], + "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"], + "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"], + "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0", "BSD-4-clause", "MIT"], + } + preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"]
Signature · 1 line
1.7.1
PATCH 4/6 Add copyleft compliance class
In reply to Beth FlanaganFrom: Christopher Larson <[email protected]>
Deploys 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.
--- meta/classes/copyleft_compliance.bbclass | 94 ++++++++++++++++++++++++++++++ 1 files changed, 94 insertions(+), 0 deletions(-) create mode 100644 meta/classes/copyleft_compliance.bbclass
meta/classes/copyleft_compliance.bbclass new file +94 -0
@@ -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'): + # not a target recipe + return + + include = oe.data.typed_value('COPYLEFT_LICENSE_INCLUDE', d) + exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d) + + def include_license(license): + if any(fnmatch(license, pattern) for pattern in exclude): + return False + if any(fnmatch(license, pattern) for pattern in include): + return True + return False + + def choose_licenses(a, b): + """Select the left option in an OR if all its licenses are to be included""" + if all(include_license(lic) for lic in a): + return a + else: + return b + + try: + licenses = oe.license.flattened_licenses(d.getVar('LICENSE', True), choose_licenses) + except oe.license.InvalidLicense as exc: + bb.fatal('%s: %s' % (d.getVar('PF', True), exc)) + + return all(include_license(lic) for lic in licenses) + +python do_prepare_copyleft_sources () { + """Populate a tree of the recipe sources and emit patch series files""" + import os.path + import shutil + + if not copyleft_should_include(d): + return + + sources_dir = d.getVar('COPYLEFT_SOURCES_DIR', 1) + src_uri = d.getVar('SRC_URI', 1).split() + fetch = bb.fetch2.Fetch(src_uri, d) + ud = fetch.ud + + locals = (fetch.localpath(url) for url in fetch.urls) + localpaths = [local for local in locals if not local.endswith('.bb')] + if not localpaths: + return + + pf = d.getVar('PF', True) + dest = os.path.join(sources_dir, pf) + shutil.rmtree(dest, ignore_errors=True) + bb.mkdirhier(dest) + + for path in localpaths: + os.symlink(path, os.path.join(dest, os.path.basename(path))) + + patches = src_patches(d) + for patch in patches: + _, _, local, _, _, parm = bb.decodeurl(patch) + patchdir = parm.get('patchdir') + if patchdir: + series = os.path.join(dest, 'series.subdir.%s' % patchdir.replace('/', '_')) + else: + series = os.path.join(dest, 'series') + + with open(series, 'a') as s: + s.write('%s -p%s\n' % (os.path.basename(local), parm['striplevel'])) +} + +addtask prepare_copyleft_sources after do_fetch before do_build +do_build[recrdeptask] += 'do_prepare_copyleft_sources'
Signature · 1 line
1.7.1
PATCH 5/6 license: manifest and license path
In reply to Beth FlanaganFrom: Elizabeth Flanagan <[email protected]>
This is a fairly large commit, so I want to step through some of what this accomplishes:
1. Additional licenses
I've added/modified/corrected some of the common licenses within OE-core in prep. for a major license audit. Most of these are in SPDX format. A few, there is no OSI equivalent.
2. Additional SPDX mappings
I've added some additional SPDX mappings to account for removing some duplicate licenses. (ie GPL-2 and GPL-2.0 were the same) I've also remapped a few things to more accurately reflect what they should be pointing at.
Note: Artistic/LGPL/GPL/MPL. Quite a few LICENSE fields list these licenses. They make no sense and need auditing. In a future commit I have some fixes to particularly egregious LICENSE fields, but a full audit should be done. I've listed to obvious candidates at:
https://wiki.yoctoproject.org/wiki/License_Audit
3. License manifest
We now have a license manifest generation that occurs in rootfs for everything BUT .deb. This requires the changes Paul Eggleton has done to rootfs_* particularly the list_installed_packages function. The manifest is accurate during a parallel bitbake now (Weee!) and is prime for my planned SPDX format manifest during the next period.
4. License manifest on image.
We also want the ability to add licenses to the image. This functionality is also in base-files and will be stripped out in my next commit. The manifest is not added by default and is a two var setting in license.conf:
If I want *just* the manifest on the image (small) then I set:COPY_LIC_MANIFEST = "1"
This copies the manifest to:
/usr/share/common-licenses/license.manifest
If I want the actual PKG license text on the image (much larger) I need to set both both COPY_LIC_MANIFEST and COPY_LIC_DIRS in license.conf. This will create:
/usr/share/common-licenses/(package name)/(licenses in LIC_SRC_URI)
Word of warning. This can be larger than wanted depending on image and is probably ripe for linking licenses, but I ran out of time this week to get that done.
5. Custom License search path.
We now have the ability to add licenses to the build without touching common-licenses. This is set via license.conf:
LICENSE_PATH += "/path/to/custom/licenses"
You want to make sure the license is unique. license.bbclass picks the first license it finds.
--- meta/classes/license.bbclass | 222 ++++++--- meta/classes/package.bbclass | 1 + meta/classes/rootfs_ipk.bbclass | 3 + meta/classes/rootfs_rpm.bbclass | 3 + meta/conf/licenses.conf | 54 ++- meta/files/common-licenses/AFL-1 | 92 --- meta/files/common-licenses/AFL-2 | 155 ------ meta/files/common-licenses/AGPL-3 | 213 ------- meta/files/common-licenses/APL-1 | 327 ----------- meta/files/common-licenses/APSL-1 | 334 ----------- meta/files/common-licenses/APSL-2 | 337 ----------- meta/files/common-licenses/Adobe | 14 + meta/files/common-licenses/Apache-1 | 59 -- meta/files/common-licenses/Apache-2 | 203 ------- meta/files/common-licenses/Artistic | 131 ----- meta/files/common-licenses/Artistic-1 | 97 ---- meta/files/common-licenses/Artistic-2 | 202 ------- meta/files/common-licenses/BSL-1 | 25 - meta/files/common-licenses/BitstreamVera | 160 ++++++ meta/files/common-licenses/CATOSL-1 | 335 ----------- meta/files/common-licenses/CC-BY-1 | 185 ------- meta/files/common-licenses/CC-BY-2 | 205 ------- meta/files/common-licenses/CC-BY-3 | 283 ---------- meta/files/common-licenses/CC-BY-NC-1 | 194 ------- meta/files/common-licenses/CC-BY-NC-2 | 220 -------- meta/files/common-licenses/CC-BY-NC-3 | 297 ---------- meta/files/common-licenses/CC-BY-NC-ND-1 | 146 ----- meta/files/common-licenses/CC-BY-NC-ND-2 | 209 ------- meta/files/common-licenses/CC-BY-NC-ND-3 | 272 --------- meta/files/common-licenses/CC-BY-NC-SA-1 | 209 ------- meta/files/common-licenses/CC-BY-NC-SA-2 | 242 -------- meta/files/common-licenses/CC-BY-NC-SA-3 | 320 ----------- meta/files/common-licenses/CC-BY-ND-2 | 194 ------- meta/files/common-licenses/CC-BY-ND-3 | 259 --------- meta/files/common-licenses/CC-BY-SA-1 | 201 ------- meta/files/common-licenses/CC-BY-SA-2 | 227 -------- meta/files/common-licenses/CC-BY-SA-3 | 319 ----------- meta/files/common-licenses/CDDL-1 | 313 ----------- meta/files/common-licenses/CECILL-1 | 462 ---------------- meta/files/common-licenses/CECILL-2 | 451 --------------- meta/files/common-licenses/CPAL-1 | 435 --------------- meta/files/common-licenses/CPL-1 | 250 --------- meta/files/common-licenses/CUA-OPL-1 | 482 ---------------- meta/files/common-licenses/DSSSL | 49 ++ meta/files/common-licenses/ECL-1 | 61 -- meta/files/common-licenses/ECL-2 | 218 -------- meta/files/common-licenses/EDL-1.0 | 13 + meta/files/common-licenses/EFL-1 | 30 - meta/files/common-licenses/EFL-2 | 27 - meta/files/common-licenses/EPL-1 | 204 ------- meta/files/common-licenses/EUPL-1 | 302 ---------- meta/files/common-licenses/Elfutils-Exception | 12 + meta/files/common-licenses/ErlPL-1 | 293 ---------- meta/files/common-licenses/Frameworx-1 | 181 ------ meta/files/common-licenses/FreeType | 170 ++++++ meta/files/common-licenses/GPL-1 | 259 --------- meta/files/common-licenses/GPL-1.0+ | 252 --------- meta/files/common-licenses/GPL-2 | 23 - .../common-licenses/GPL-2,0-with-GCC-exception | 17 - .../common-licenses/GPL-2,0-with-font-exception | 18 - meta/files/common-licenses/GPL-2.0+ | 132 ----- .../common-licenses/GPL-2.0-with-GCC-exception | 13 +- .../common-licenses/GPL-2.0-with-font-exception | 14 +- meta/files/common-licenses/GPL-3 | 70 --- meta/files/common-licenses/GPL-3.0 | 224 ++++++++- meta/files/common-licenses/GPL-3.0+ | 3 - meta/files/common-licenses/IPL-1 | 222 -------- meta/files/common-licenses/LGPL-2 | 461 ---------------- meta/files/common-licenses/LGPL-2.0 | 189 ++++++- meta/files/common-licenses/LGPL-2.0+ | 173 ------ meta/files/common-licenses/LGPL-2.1+ | 176 ------ meta/files/common-licenses/LGPL-3 | 147 ----- meta/files/common-licenses/LGPL-3.0 | 53 +- meta/files/common-licenses/LGPL-3.0+ | 66 --- meta/files/common-licenses/LPL-1 | 213 ------- meta/files/common-licenses/LPPL-1 | 422 -------------- meta/files/common-licenses/MIT-style | 1 - meta/files/common-licenses/MPL-1 | 433 --------------- meta/files/common-licenses/NASA-1 | 246 --------- meta/files/common-licenses/NPOSL-3 | 206 ------- meta/files/common-licenses/OASIS | 13 + meta/files/common-licenses/OCLC-2 | 207 ------- meta/files/common-licenses/OFL-1 | 96 ---- meta/files/common-licenses/OLDAP-2 | 54 -- meta/files/common-licenses/OSL-1 | 172 ------ meta/files/common-licenses/OSL-1.0 | 2 +- meta/files/common-licenses/OSL-2 | 171 ------ meta/files/common-licenses/OSL-3 | 157 ------ meta/files/common-licenses/PHP-3 | 70 --- meta/files/common-licenses/Proprietary | 1 + meta/files/common-licenses/Python-2 | 192 ------- meta/files/common-licenses/QPL-1 | 96 ---- meta/files/common-licenses/RPL-1 | 582 -------------------- meta/files/common-licenses/RPSL-1 | 535 ------------------ meta/files/common-licenses/SPL | 519 ----------------- meta/files/common-licenses/Simple-2 | 53 -- meta/files/common-licenses/UCB | 26 + meta/files/common-licenses/VSL-1 | 54 -- meta/files/common-licenses/Watcom-1 | 389 ------------- meta/files/common-licenses/XFree86-1 | 50 -- meta/files/common-licenses/YPL-1 | 140 ----- meta/files/common-licenses/ZPL-1 | 60 -- meta/files/common-licenses/ZPL-2 | 44 -- meta/files/common-licenses/Zimbra-1 | 140 ----- meta/files/common-licenses/eCos-2 | 38 -- 105 files changed, 1126 insertions(+), 17670 deletions(-) delete mode 100644 meta/files/common-licenses/AFL-1 delete mode 100644 meta/files/common-licenses/AFL-2 delete mode 100644 meta/files/common-licenses/AGPL-3 delete mode 100644 meta/files/common-licenses/APL-1 delete mode 100644 meta/files/common-licenses/APSL-1 delete mode 100644 meta/files/common-licenses/APSL-2 create mode 100644 meta/files/common-licenses/Adobe delete mode 100644 meta/files/common-licenses/Apache-1 delete mode 100644 meta/files/common-licenses/Apache-2 delete mode 100644 meta/files/common-licenses/Artistic delete mode 100644 meta/files/common-licenses/Artistic-1 delete mode 100644 meta/files/common-licenses/Artistic-2 delete mode 100644 meta/files/common-licenses/BSL-1 create mode 100644 meta/files/common-licenses/BitstreamVera delete mode 100644 meta/files/common-licenses/CATOSL-1 delete mode 100644 meta/files/common-licenses/CC-BY-1 delete mode 100644 meta/files/common-licenses/CC-BY-2 delete mode 100644 meta/files/common-licenses/CC-BY-3 delete mode 100644 meta/files/common-licenses/CC-BY-NC-1 delete mode 100644 meta/files/common-licenses/CC-BY-NC-2 delete mode 100644 meta/files/common-licenses/CC-BY-NC-3 delete mode 100644 meta/files/common-licenses/CC-BY-NC-ND-1 delete mode 100644 meta/files/common-licenses/CC-BY-NC-ND-2 delete mode 100644 meta/files/common-licenses/CC-BY-NC-ND-3 delete mode 100644 meta/files/common-licenses/CC-BY-NC-SA-1 delete mode 100644 meta/files/common-licenses/CC-BY-NC-SA-2 delete mode 100644 meta/files/common-licenses/CC-BY-NC-SA-3 delete mode 100644 meta/files/common-licenses/CC-BY-ND-1 delete mode 100644 meta/files/common-licenses/CC-BY-ND-2 delete mode 100644 meta/files/common-licenses/CC-BY-ND-3 delete mode 100644 meta/files/common-licenses/CC-BY-SA-1 delete mode 100644 meta/files/common-licenses/CC-BY-SA-2 delete mode 100644 meta/files/common-licenses/CC-BY-SA-3 delete mode 100644 meta/files/common-licenses/CDDL-1 delete mode 100644 meta/files/common-licenses/CECILL-1 delete mode 100644 meta/files/common-licenses/CECILL-2 delete mode 100644 meta/files/common-licenses/CPAL-1 delete mode 100644 meta/files/common-licenses/CPL-1 delete mode 100644 meta/files/common-licenses/CUA-OPL-1 create mode 100644 meta/files/common-licenses/DSSSL delete mode 100644 meta/files/common-licenses/ECL-1 delete mode 100644 meta/files/common-licenses/ECL-2 create mode 100644 meta/files/common-licenses/EDL-1.0 delete mode 100644 meta/files/common-licenses/EFL-1 delete mode 100644 meta/files/common-licenses/EFL-2 delete mode 100644 meta/files/common-licenses/EPL-1 delete mode 100644 meta/files/common-licenses/EUPL-1 create mode 100644 meta/files/common-licenses/Elfutils-Exception delete mode 100644 meta/files/common-licenses/ErlPL-1 delete mode 100644 meta/files/common-licenses/Frameworx-1 create mode 100644 meta/files/common-licenses/FreeType delete mode 100644 meta/files/common-licenses/GPL-1 delete mode 100644 meta/files/common-licenses/GPL-1.0+ delete mode 100644 meta/files/common-licenses/GPL-2 delete mode 100644 meta/files/common-licenses/GPL-2,0-with-GCC-exception delete mode 100644 meta/files/common-licenses/GPL-2,0-with-font-exception delete mode 100644 meta/files/common-licenses/GPL-2.0+ delete mode 100644 meta/files/common-licenses/GPL-3 delete mode 100644 meta/files/common-licenses/GPL-3.0+ delete mode 100644 meta/files/common-licenses/IPL-1 delete mode 100644 meta/files/common-licenses/LGPL-2 delete mode 100644 meta/files/common-licenses/LGPL-2.0+ delete mode 100644 meta/files/common-licenses/LGPL-2.1+ delete mode 100644 meta/files/common-licenses/LGPL-3 delete mode 100644 meta/files/common-licenses/LGPL-3.0+ delete mode 100644 meta/files/common-licenses/LPL-1 delete mode 100644 meta/files/common-licenses/LPPL-1 delete mode 120000 meta/files/common-licenses/MIT-style delete mode 100644 meta/files/common-licenses/MPL-1 delete mode 100644 meta/files/common-licenses/NASA-1 delete mode 100644 meta/files/common-licenses/NPOSL-3 create mode 100644 meta/files/common-licenses/OASIS delete mode 100644 meta/files/common-licenses/OCLC-2 delete mode 100644 meta/files/common-licenses/OFL-1 delete mode 100644 meta/files/common-licenses/OLDAP-2 delete mode 100644 meta/files/common-licenses/OSL-1 delete mode 100644 meta/files/common-licenses/OSL-2 delete mode 100644 meta/files/common-licenses/OSL-3 delete mode 100644 meta/files/common-licenses/PHP-3 create mode 100644 meta/files/common-licenses/Proprietary delete mode 100644 meta/files/common-licenses/Python-2 delete mode 100644 meta/files/common-licenses/QPL-1 delete mode 100644 meta/files/common-licenses/RPL-1 delete mode 100644 meta/files/common-licenses/RPSL-1 delete mode 100644 meta/files/common-licenses/SPL delete mode 100644 meta/files/common-licenses/Simple-2 create mode 100644 meta/files/common-licenses/UCB delete mode 100644 meta/files/common-licenses/VSL-1 delete mode 100644 meta/files/common-licenses/Watcom-1 delete mode 100644 meta/files/common-licenses/XFree86-1 delete mode 100644 meta/files/common-licenses/YPL-1 delete mode 100644 meta/files/common-licenses/ZPL-1 delete mode 100644 meta/files/common-licenses/ZPL-2 delete mode 100644 meta/files/common-licenses/Zimbra-1 delete mode 100644 meta/files/common-licenses/eCos-2
meta/classes/license.bbclass +157 -65
@@ -1,17 +1,14 @@ +inherit buildhistory # Populates LICENSE_DIRECTORY as set in distro config with the license files as set by # LIC_FILES_CHKSUM. +# LIC_FILES_CHKSUM. # TODO: -# - We should also enable the ability to put the generated license directory onto the -# rootfs -# - Gather up more generic licenses -# - There is a real issue revolving around license naming standards. See license names -# licenses.conf and compare them to the license names in the recipes. You'll see some -# differences and that should be corrected. +# - There is a real issue revolving around license naming standards. LICENSE_DIRECTORY ??= "${DEPLOY_DIR}/licenses" LICSSTATEDIR = "${WORKDIR}/license-destdir/" -addtask populate_lic after do_patch before do_package +addtask populate_lic after do_patch before do_compile do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" do_populate_lic[cleandirs] = "${LICSSTATEDIR}"
@@ -22,33 +19,124 @@ do_populate_lic[cleandirs] = "${LICSSTATEDIR}" # # We should really discuss standardizing this field, but that's a longer term goal. # For now, we can do this and it should grab the most common LICENSE naming variations. - -#GPL variations -SPDXLICENSEMAP[GPL] = "GPL-1" -SPDXLICENSEMAP[GPLv2] = "GPL-2" -SPDXLICENSEMAP[GPLv3] = "GPL-3" +# +# Changing GPL mapping to GPL-2 as it's not very likely to be GPL-1 +# We should NEVER have a GPL/LGPL without a version!!!! +# Any mapping to MPL/LGPL/GPL should be fixed +# see: https://wiki.yoctoproject.org/wiki/License_Audit + +# GPL variations +SPDXLICENSEMAP[GPL] = "GPL-2.0" +SPDXLICENSEMAP[GPL-2] = "GPL-2.0" +SPDXLICENSEMAP[GPLv2] = "GPL-2.0" +SPDXLICENSEMAP[GPL-3] = "GPL-3.0" +SPDXLICENSEMAP[GPLv3] = "GPL-3.0" #LGPL variations -SPDXLICENSEMAP[LGPL] = "LGPL-2" -SPDXLICENSEMAP[LGPLv2] = "LGPL-2" +SPDXLICENSEMAP[LGPL] = "LGPL-2.0" +SPDXLICENSEMAP[LGPLv2] = "LGPL-2.0" SPDXLICENSEMAP[LGPL2.1] = "LGPL-2.1" SPDXLICENSEMAP[LGPLv2.1] = "LGPL-2.1" -SPDXLICENSEMAP[LGPLv3] = "LGPL-3" +SPDXLICENSEMAP[LGPLv3] = "LGPL-3.0" #MPL variations -SPDXLICENSEMAP[MPL] = "MPL-1" -SPDXLICENSEMAP[MPLv1] = "MPL-1" -SPDXLICENSEMAP[MPLv1.1] = "MPL-1" +SPDXLICENSEMAP[MPL] = "MPL-1.0" +SPDXLICENSEMAP[MPL-1] = "MPL-1.0" +SPDXLICENSEMAP[MPLv1] = "MPL-1.0" +SPDXLICENSEMAP[MPLv1.1] = "MPL-1.1" #MIT variations SPDXLICENSEMAP[MIT-X] = "MIT" +SPDXLICENSEMAP[MIT-style] = "MIT" #Openssl variations SPDXLICENSEMAP[openssl] = "OpenSSL" +#Python variations +SPDXLICENSEMAP[PSF] = "Python-2.0" +SPDXLICENSEMAP[PSFv2] = "Python-2.0" +SPDXLICENSEMAP[Python-2] = "Python-2.0" + +#Apache variations +SPDXLICENSEMAP[Apachev2] = "Apache-2.0" +SPDXLICENSEMAP[Apache-2] = "Apache-2.0" + +#Artistic variations +SPDXLICENSEMAP[Artistic] = "Artistic-1.0" +SPDXLICENSEMAP[Artisticv1] = "Artistic-1.0" +SPDXLICENSEMAP[Artistic-1] = "Artistic-1.0" + +#Academic variations +SPDXLICENSEMAP[AFL-2] = "AFL-2.0" +SPDXLICENSEMAP[AFL-1] = "AFL-1.2" +SPDXLICENSEMAP[AFLv2] = "AFL-2.0" +SPDXLICENSEMAP[AFLv1] = "AFL-1.2" + #Other variations -SPDXLICENSEMAP[AFL2.1] = "AFL-2" -SPDXLICENSEMAP[EPLv1.0] = "EPL-1" +SPDXLICENSEMAP[EPLv1.0] = "EPL-1.0" + +license_create_manifest() { + mkdir -p ${LICENSE_DIRECTORY}/${IMAGE_NAME} + # Get list of installed packages + list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest + INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest` + # list of installed packages is broken for deb + if [ ${IMAGE_PKGTYPE} != "deb" ]; then + + for pkg in ${INSTALLED_PKGS}; do + # not the best way to do this but licenses are not arch dependant iirc + files=`find ${TMPDIR}/pkgdata/*/runtime -name ${pkg}| head -1` + for filename in $files; do + pkged_pn="$(sed -n 's/^PN: //p' ${filename})" + pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})" + # check to see if the package name exists in the manifest. if so, bail. + if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then + # exclude local recipes + if [ ! ${pkged_pn} == "*locale*" ]; then + echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + echo "LICENSE: " >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + for lic in ${pkged_lic}; do + if [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic}" ]; then + echo ${lic}|sed s'/generic_//'g >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + else + echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + fi + done + echo "" >> ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest + fi + fi + done + done + fi + + # 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 + + 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 + # 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} + fi + done + done + fi + fi + +} + python do_populate_lic() { """
@@ -59,6 +147,26 @@ python do_populate_lic() { import shutil import oe.license + # All the license types for the package + 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) + # The base directory we wrangle licenses to + destdir = os.path.join(d.getVar('LICSSTATEDIR', True), pn) + # The license files are located in S/LIC_FILE_CHECKSUM. + srcdir = d.getVar('S', True) + # Directory we store the generic licenses as set in the distro configuration + generic_directory = d.getVar('COMMON_LICENSE_DIR', True) + license_source_dirs = [] + license_source_dirs.append(generic_directory) + try: + additional_lic_dirs = d.getVar('LICENSE_DIR', True).split() + for lic_dir in additional_lic_dirs: + license_source_dirs.append(lic_dir) + except: + pass + class FindVisitor(oe.license.LicenseVisitor): def visit_Str(self, node): #
@@ -70,55 +178,42 @@ python do_populate_lic() { find_license(node.s.replace("+", "").replace("*", "")) self.generic_visit(node) - def copy_license(source, destination, file_name): - try: - bb.copyfile(os.path.join(source, file_name), os.path.join(destination, file_name)) - except: - bb.warn("%s: No generic license file exists for: %s at %s" % (pn, file_name, source)) - pass - - def link_license(source, destination, file_name): - try: - os.symlink(os.path.join(source, file_name), os.path.join(destination, "generic_" + file_name)) - except: - bb.warn("%s: Could not symlink: %s at %s to %s at %s" % (pn, file_name, source, file_name, destination)) - pass - def find_license(license_type): try: bb.mkdirhier(gen_lic_dest) except: pass - + spdx_generic = "" + license_source = "" # If the generic does not exist we need to check to see if there is an SPDX mapping to it - if not os.path.isfile(os.path.join(generic_directory, license_type)): - if d.getVarFlag('SPDXLICENSEMAP', license_type) != None: - # Great, there is an SPDXLICENSEMAP. We can copy! - bb.note("We need to use a SPDXLICENSEMAP for %s" % (license_type)) - spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type) - copy_license(generic_directory, gen_lic_dest, spdx_generic) - link_license(gen_lic_dest, destdir, spdx_generic) - else: - # And here is where we warn people that their licenses are lousy - bb.warn("%s: No generic license file exists for: %s at %s" % (pn, license_type, generic_directory)) - bb.warn("%s: There is also no SPDXLICENSEMAP for this license type: %s at %s" % (pn, license_type, generic_directory)) - pass - elif os.path.isfile(os.path.join(generic_directory, license_type)): - copy_license(generic_directory, gen_lic_dest, license_type) - link_license(gen_lic_dest, destdir, license_type) - - # All the license types for the package - 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) - # The base directory we wrangle licenses to - destdir = os.path.join(d.getVar('LICSSTATEDIR', True), pn) - # The license files are located in S/LIC_FILE_CHECKSUM. - srcdir = d.getVar('S', True) - # Directory we store the generic licenses as set in the distro configuration - generic_directory = d.getVar('COMMON_LICENSE_DIR', True) + for lic_dir in license_source_dirs: + if not os.path.isfile(os.path.join(lic_dir, license_type)): + if d.getVarFlag('SPDXLICENSEMAP', license_type) != None: + # Great, there is an SPDXLICENSEMAP. We can copy! + bb.note("We need to use a SPDXLICENSEMAP for %s" % (license_type)) + spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type) + license_source = lic_dir + break + elif os.path.isfile(os.path.join(lic_dir, license_type)): + spdx_generic = license_type + license_source = lic_dir + break + + if spdx_generic!="" and license_source!="": + # we really should copy to generic_ + spdx_generic, however, that ends up messing the manifest + # audit up. This should be fixed in emit_pkgdata (or, we actually got and fix all the recipes) + ret = bb.copyfile(os.path.join(license_source, spdx_generic), os.path.join(os.path.join(d.getVar('LICSSTATEDIR', True), pn), "generic_" + license_type)) + # If the copy didn't occur, something horrible went wrong and we fail out + if ret is False or ret == 0: + bb.warn("%s for %s could not be copied for some reason. It may not exist. WARN for now." % (spdx_generic, pn)) + + else: + # And here is where we warn people that their licenses are lousy + bb.warn("%s: No generic license file exists for: %s in any provider" % (pn, license_type)) + bb.warn("%s: There is also no SPDXLICENSEMAP for this license type: %s in any provider" % (pn, license_type)) + pass + try: bb.mkdirhier(destdir) except:
@@ -142,8 +237,6 @@ python do_populate_lic() { if ret is False or ret == 0: bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % srclicfile) - gen_lic_dest = os.path.join(d.getVar('LICENSE_DIRECTORY', True), "common-licenses") - v = FindVisitor() try: v.visit_string(license_types)
@@ -160,4 +253,3 @@ python do_populate_lic_setscene () { sstate_setscene(d) } addtask do_populate_lic_setscene -
meta/classes/package.bbclass +1 -0
@@ -1065,6 +1065,7 @@ python emit_pkgdata() { write_if_exists(sf, pkg, 'PR') write_if_exists(sf, pkg, 'PKGV') write_if_exists(sf, pkg, 'PKGR') + write_if_exists(sf, pkg, 'LICENSE') write_if_exists(sf, pkg, 'DESCRIPTION') write_if_exists(sf, pkg, 'SUMMARY') write_if_exists(sf, pkg, 'RDEPENDS')
meta/classes/rootfs_ipk.bbclass +3 -0
@@ -62,6 +62,9 @@ fakeroot rootfs_ipk_do_rootfs () { package_install_internal_ipk + # create license manifest + license_create_manifest + #post install export D=${IMAGE_ROOTFS} export OFFLINE_ROOT=${IMAGE_ROOTFS}
meta/classes/rootfs_rpm.bbclass +3 -0
@@ -99,6 +99,9 @@ EOF package_install_internal_rpm + # create license manifest + license_create_manifest + export D=${IMAGE_ROOTFS} export OFFLINE_ROOT=${IMAGE_ROOTFS} export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
meta/conf/licenses.conf +50 -4
55 lines not on this page · raw message
PATCH 6/6 OECore license fixes: meta/*
In reply to Beth FlanaganFrom: Elizabeth Flanagan <[email protected]>
This is a quick audit of only the most obviously wrong licenses found within OECore. These fixes fall into four areas:
- LICENSE field had incorrect format so that the parser choked
- LICENSE field has a license with no version
- LICENSE field was actually incorrect
- LICENSE field has an imaginary license that didn't exist
This fixes most of the LICENSE warnings thrown, along with my prior commit adding additional licenses to common-licenses and additional SPDXLICENSEMAP entries.
HOWEVER..... there is much to be done on the license front. For a list of recipes with licenses that need obvious fixing see:
https://wiki.yoctoproject.org/wiki/License_Audit
That said, I would suggest another license audit as I've found enough inconsistencies. A good suggestion is when in doubt, look at how openSuse or Gentoo or Debian license the package.
--- .../base-files/base-files/licenses/Artistic | 131 ---- .../base-files/base-files/licenses/BSD | 26 - .../base-files/base-files/licenses/GFDL-1.2 | 397 ------------ .../base-files/base-files/licenses/GPL-3 | 676 -------------------- .../base-files/base-files/licenses/LGPL-2 | 481 -------------- .../base-files/base-files/licenses/LGPL-2.1 | 510 --------------- .../base-files/base-files/licenses/LGPL-3 | 165 ----- meta/recipes-core/base-files/base-files_3.0.14.bb | 20 +- meta/recipes-core/busybox/busybox.inc | 3 +- meta/recipes-core/busybox/busybox_1.19.3.bb | 2 +- .../gettext/gettext-minimal-native_0.18.1.1.bb | 4 +- meta/recipes-core/gettext/gettext_0.18.1.1.bb | 4 +- meta/recipes-core/jpeg/jpeg_8c.bb | 4 +- meta/recipes-devtools/elfutils/elfutils_0.148.bb | 4 +- meta/recipes-devtools/python/python-pyrex_0.9.9.bb | 4 +- .../squashfs-tools/squashfs-tools_4.2.bb | 4 +- meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb | 4 +- meta/recipes-devtools/tcltk/tcl_8.5.11.bb | 4 +- .../transfig/transfig-native_3.2.5d.bb | 4 +- meta/recipes-extended/byacc/byacc_20110908.bb | 10 +- meta/recipes-extended/bzip2/bzip2_1.0.6.bb | 4 +- meta/recipes-extended/less/less_444.bb | 7 +- .../tcp-wrappers/tcp-wrappers_7.6.bb | 4 +- meta/recipes-extended/unzip/unzip_6.0.bb | 4 +- meta/recipes-extended/xinetd/xinetd_2.3.14.bb | 5 +- meta/recipes-extended/zip/zip.inc | 2 +- meta/recipes-extended/zip/zip_3.0.bb | 2 +- .../recipes-gnome/gnome/gnome-icon-theme_2.31.0.bb | 4 +- meta/recipes-graphics/clutter/clutter-box2d.inc | 2 +- meta/recipes-graphics/clutter/clutter-box2d_git.bb | 2 +- meta/recipes-graphics/freetype/freetype_2.4.6.bb | 4 +- .../ttf-fonts/ttf-bitstream-vera_1.10.bb | 4 +- meta/recipes-graphics/xorg-app/xrandr_1.3.5.bb | 4 +- .../recipes-graphics/xorg-font/font-alias_1.0.3.bb | 4 +- meta/recipes-graphics/xorg-font/font-util_1.2.0.bb | 5 +- .../linux-firmware/linux-firmware_git.bb | 5 + meta/recipes-multimedia/libtiff/tiff_3.9.5.bb | 4 +- .../matchbox-theme-sato/matchbox-theme-sato.inc | 2 +- .../matchbox-theme-sato/matchbox-theme-sato_0.1.bb | 2 +- .../sato-icon-theme/sato-icon-theme.inc | 2 +- .../sato-icon-theme/sato-icon-theme_0.4.1.bb | 2 +- meta/recipes-support/boost/boost.inc | 4 +- 42 files changed, 81 insertions(+), 2454 deletions(-) delete mode 100644 meta/recipes-core/base-files/base-files/licenses/Artistic delete mode 100644 meta/recipes-core/base-files/base-files/licenses/BSD delete mode 100644 meta/recipes-core/base-files/base-files/licenses/GFDL-1.2 delete mode 100644 meta/recipes-core/base-files/base-files/licenses/GPL-3 delete mode 100644 meta/recipes-core/base-files/base-files/licenses/LGPL-2 delete mode 100644 meta/recipes-core/base-files/base-files/licenses/LGPL-2.1 delete mode 100644 meta/recipes-core/base-files/base-files/licenses/LGPL-3
(NOTE: Removed common-license diffs)
meta/recipes-core/base-files/base-files_3.0.14.bb +8 -12
@@ -1,9 +1,15 @@ SUMMARY = "Miscellaneous files for the base system." DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system." SECTION = "base" -PR = "r69" +PR = "r70" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f" +# Removed all license related tasks in this recipe as license.bbclass +# now deals with this. In order to get accurate licensing on to the image: +# Set COPY_LIC_MANIFEST to just copy just the license.manifest to the image +# For the manifest and the license text for each package: +# Set COPY_LIC_MANIFEST and COPY_LIC_DIRS + SRC_URI = "file://rotation \ file://nsswitch.conf \ file://motd \
@@ -18,14 +24,8 @@ SRC_URI = "file://rotation \ file://usbd \ file://share/dot.bashrc \ file://share/dot.profile \ - file://licenses/BSD \ file://licenses/GPL-2 \ - file://licenses/GPL-3 \ - file://licenses/LGPL-2 \ - file://licenses/LGPL-2.1 \ - file://licenses/LGPL-3 \ - file://licenses/GFDL-1.2 \ - file://licenses/Artistic" + " S = "${WORKDIR}" INHIBIT_DEFAULT_DEPS = "1"
@@ -103,10 +103,6 @@ do_install () { install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd - for license in BSD GPL-2 LGPL-2 LGPL-2.1 Artistic GPL-3 LGPL-3 GFDL-1.2; do - install -m 0644 ${WORKDIR}/licenses/$license ${D}${datadir}/common-licenses/ - done - ln -sf /proc/mounts ${D}${sysconfdir}/mtab }
meta/recipes-core/busybox/busybox.inc +2 -1
@@ -5,7 +5,8 @@ BUGTRACKER = "https://bugs.busybox.net/" # bzip2 applet in busybox is based on lightly-modified bzip2 source # the GPL is version 2 only -LICENSE = "GPLv2 & bzip2" +# bzip2 is not a bzip2 license (no such thing) +LICENSE = "GPLv2 & BSD-4-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=de10de48642ab74318e893a61105afbb" SECTION = "base"
meta/recipes-core/busybox/busybox_1.19.3.bb +1 -1
@@ -1,5 +1,5 @@ require busybox.inc -PR = "r0" +PR = "r1" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://udhcpscript.patch \
meta/recipes-core/gettext/gettext-minimal-native_0.18.1.1.bb +2 -2
@@ -4,12 +4,12 @@ SRC_URI = "file://aclocal.tgz \ INHIBIT_DEFAULT_DEPS = "1" INHIBIT_AUTOTOOLS_DEPS = "1" -LICENSE = "FSF-Unlimited" +LICENSE = "GPL-3+ & LGPL-2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" inherit native -PR = "r1" +PR = "r2" S = "${WORKDIR}"
meta/recipes-core/gettext/gettext_0.18.1.1.bb +2 -2
@@ -2,10 +2,10 @@ SUMMARY = "Utilities and libraries for producing multi-lingual messages." DESCRIPTION = "Gettext offers to programmers, translators, and even users, a well integrated set of tools and documentation. Specifically, the GNU `gettext' utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable strings, or already translated strings." HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" SECTION = "libs" -LICENSE = "GPLv3" +LICENSE = "GPL-3+ & LGPL-2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -PR = "r5" +PR = "r6" DEPENDS = "libxml2-native gettext-native virtual/libiconv ncurses expat" DEPENDS_virtclass-native = "libxml2-native" PROVIDES = "virtual/libintl virtual/gettext"
meta/recipes-core/jpeg/jpeg_8c.bb +2 -2
@@ -3,7 +3,7 @@ DESCRIPTION = "libjpeg contains a library for handling the JPEG (JFIF) image for HOMEPAGE = "http://www.ijg.org/" BUGTRACKER = "" -LICENSE ="jpeg" +LICENSE ="BSD-3-Clause" LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=12;md5=78fa8dbac547bb5b2a0e6457a6cfe21d \ file://jpeglib.h;endline=14;md5=22f1e0f8fc71f6f7563146d3b210dbe5 \ file://djpeg.c;endline=13;md5=ca89254925da06fef47e4b6468233432"
@@ -13,7 +13,7 @@ SECTION = "libs" DEPENDS = "libtool-cross" DEPENDS_virtclass-native = "libtool-native" -PR = "r1" +PR = "r2" SRC_URI = "http://www.ijg.org/files/jpegsrc.v${PV}.tar.gz \ file://debian-libjpeg7_7-1.diff;"
meta/recipes-devtools/elfutils/elfutils_0.148.bb +2 -2
@@ -1,12 +1,12 @@ DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects." HOMEPAGE = "https://fedorahosted.org/elfutils" SECTION = "base" -LICENSE = "(GPLv2 & Exception)" +LICENSE = "(GPL-2+ & Elfutils-Exception)" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3\ file://EXCEPTION;md5=570adcb0c1218ab57f2249c67d0ce417" DEPENDS = "libtool bzip2 zlib" -PR = "r3" +PR = "r4" SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/elfutils-${PV}.tar.bz2"
meta/recipes-devtools/python/python-pyrex_0.9.9.bb +2 -2
@@ -2,10 +2,10 @@ DESCRIPTION = "Pyrex is a language specially designed for writing Python extensi It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \ and the messy, low-level world of C." SECTION = "devel/python" -LICENSE = "Apache-2" +LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=771d472f53f933033f57eeee7808e5bd" SRCNAME = "Pyrex" -PR = "ml1" +PR = "ml2" SRC_URI = "\ http://www.cosc.canterbury.ac.nz/greg.ewing/python/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb +2 -2
@@ -2,12 +2,12 @@ # and I don't think the kernel supports it any more. DESCRIPTION = "Tools to manipulate Squashfs filesystems." SECTION = "base" -LICENSE = "GPLv2 & Public Domain" +LICENSE = "GPL-2 & PD" LIC_FILES_CHKSUM = "file://../COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ file://../../7zC.txt;beginline=12;endline=16;md5=2056cd6d919ebc3807602143c7449a7c \ " DEPENDS = "attr zlib xz" -PR = "r0" +PR = "1" SRC_URI = "${SOURCEFORGE_MIRROR}/squashfs/squashfs${PV}.tar.gz;name=squashfs \ http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2;name=lzma \
meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb +2 -2
@@ -2,13 +2,13 @@ DESCRIPTION = "Target Communication Framework" HOMEPAGE = "http://wiki.eclipse.org/TCF" BUGTRACKER = "https://bugs.eclipse.org/bugs/" -LICENSE = "EPL-1 | EDLv1.0" +LICENSE = "EPL-1.0 | EDL-1.0" LIC_FILES_CHKSUM = "file://../epl-v10.html;md5=7aa4215a330a0a4f6a1cbf8da1a0879f \ file://edl-v10.html;md5=522a390a83dc186513f0500543ad3679" SRCREV = "1855" PV = "0.0+svnr${SRCPV}" -PR = "r2" +PR = "r3" SRC_URI = "svn://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk;module=agent;proto=http \ http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/epl-v10.html;name=epl \
meta/recipes-devtools/tcltk/tcl_8.5.11.bb +2 -2
@@ -1,5 +1,5 @@ DESCRIPTION = "Tool Command Language" -LICENSE = "tcl" +LICENSE = "BSD-3-Clause" SECTION = "devel/tcltk" HOMEPAGE = "http://tcl.sourceforge.net" DEPENDS = "tcl-native"
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://../license.terms;md5=a47a9be26d03f925fc1fbd2784f27e11 file://../win/license.terms;md5=a47a9be26d03f925fc1fbd2784f27e11 \ " -PR = "r0" +PR = "r2" BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl${PV}-src.tar.gz \ file://tcl-add-soname.patch"
meta/recipes-devtools/transfig/transfig-native_3.2.5d.bb +2 -2
@@ -3,9 +3,9 @@ DESCRIPTION = "This package contains utilities (mainly fig2dev) to \ handle XFig (Facility for Interactive Generation of figures) files." HOMEPAGE = "http://www-epb.lbl.gov/xfig/" SECTION = "console/utils" -LICENSE = "xfig" +LICENSE = "MIT" LIC_FILES_CHKSUM = "file://fig2dev/fig2dev.c;endline=16;md5=6bab01e017409cf9ab21d3e953b793f7" -PR = "r0" +PR = "r1" DEPENDS = "imake-native xorg-cf-files-native zlib-native jpeg-native libpng-native libxpm-native"
meta/recipes-extended/byacc/byacc_20110908.bb +8 -2
@@ -1,5 +1,11 @@ -PR = "r0" -LICENSE="other-BSD" +PR = "r1" + +# Sigh. This is one of those places where everyone licenses it differently. Someone +# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that: +# "I've found no reliable source which states that byacc must bear a UCB copyright." +# Setting to PD as this is what the upstream has it as. + +LICENSE="PD" LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=4dc4c30f840a7203fb6edf20b3db849e" require byacc.inc
meta/recipes-extended/bzip2/bzip2_1.0.6.bb +2 -2
@@ -4,9 +4,9 @@ Huffman coding. Compression is generally considerably better than that achieved LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors." HOMEPAGE = "http://www.bzip.org/" SECTION = "console/utils" -LICENSE = "bzip2" +LICENSE = "BSD-4-Clause" LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2" -PR = "r3" +PR = "r4" SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \ file://configure.ac \
meta/recipes-extended/less/less_444.bb +5 -2
@@ -7,11 +7,14 @@ SECTION = "console/utils" # (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less # less is a 2-clause BSD-like permissive license -LICENSE = "GPLv3+ | less" +# Reading LICENSE and COPYING indicate that GPL-3+ is suffient. +# openSuse .spec and Debian seem to agree here. setting to GPL-3+ + +LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ file://LICENSE;md5=1237c0f825bb36122b0b2b486ffbe6be" DEPENDS = "ncurses" -PR = "r0" +PR = "r1" SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz"
meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +2 -2
@@ -3,9 +3,9 @@ DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \ services." SECTION = "console/network" -LICENSE = "tcp-wrappers" +LICENSE = "BSD" LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" -PR ="r7" +PR ="r8" PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev ${PN} ${PN}-doc"
meta/recipes-extended/unzip/unzip_6.0.bb +2 -2
@@ -1,10 +1,10 @@ DESCRIPTION = "A (de)compression library for the ZIP format" HOMEPAGE = "http://www.info-zip.org" SECTION = "console/utils" -LICENSE = "Info-ZIP" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29" PE = "1" -PR = "r1" +PR = "r2" SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \ file://avoid-strip.patch"
meta/recipes-extended/xinetd/xinetd_2.3.14.bb +3 -2
@@ -2,11 +2,12 @@ DESCRIPTION = "Highly configurable, modular and secure inetd" HOMEPAGE = "http://www.xinetd.org" # xinetd is a BSD-like license -LICENSE = "xinetd" +# Apple and Gentoo say BSD here. +LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8" DEPENDS = "" -PR ="r0" +PR ="r1" SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \ file://xinetd.init \
meta/recipes-extended/zip/zip.inc +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "Archiver for .zip files" HOMEPAGE = "http://www.info-zip.org" SECTION = "console/utils" -LICENSE = "Info-ZIP" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d" SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz"
meta/recipes-extended/zip/zip_3.0.bb +1 -1
@@ -1,6 +1,6 @@ require zip.inc -PR="r0" +PR="r1" # zip-2.32 still uses directory name of zip-2.30 S = "${WORKDIR}/zip30"
meta/recipes-gnome/gnome/gnome-icon-theme_2.31.0.bb +2 -2
@@ -2,14 +2,14 @@ DESCRIPTION = "GNOME 2 default icon themes" HOMEPAGE = "http://www.gnome.org/" BUGTRACKER = "https://bugzilla.gnome.org/" -LICENSE = "LGPLv3 | BY-SAv3" +LICENSE = "LGPLv3+ | CC-BY-SA-3.0" LIC_FILES_CHKSUM = "file://COPYING;md5=e7e289d90fc8bdceed5e3f142f98229e" SECTION = "x11/gnome" DEPENDS = "icon-naming-utils-native glib-2.0 intltool-native" RDEPENDS_${PN} = "hicolor-icon-theme" RRECOMMENDS_${PN} = "librsvg-gtk" -PR = "r1" +PR = "r2" FILES_${PN} += "${datadir}/*"
meta/recipes-graphics/clutter/clutter-box2d.inc +1 -1
@@ -1,6 +1,6 @@ DESCRIPTION = "Clutter Box2D" HOMEPAGE = "http://www.clutter-project.org/" -LICENSE = "LGPL-2.1" +LICENSE = "LGPLv2.1+" # The main clutter lib is machine specific so we need to be too PACKAGE_ARCH = "${MACHINE_ARCH}"
meta/recipes-graphics/clutter/clutter-box2d_git.bb +1 -1
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://box2d/License.txt;md5=e5d39ad91f7dc4692dcdb1d85139ec6 SRCREV = "de5452e56b537a11fd7f9453d048ff4b4793b5a2" PV = "0.12.1+git${SRCPV}" -PR = "r0" +PR = "r1" SRC_URI = "git://git.gnome.org/clutter-box2d.git"
meta/recipes-graphics/freetype/freetype_2.4.6.bb +2 -2
@@ -6,14 +6,14 @@ image generation tools, and many other products as well." HOMEPAGE = "http://www.freetype.org/" BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype" -LICENSE = "FreeTypeLicense | GPLv2+" +LICENSE = "FreeType | GPLv2+" LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=28d5381b1bef2649c59f20c20bae4f39 \ file://docs/FTL.TXT;md5=d479e83797f699fe873b38dadd0fcd4c \ file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec" SECTION = "libs" -PR = "r1" +PR = "r2" SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \ file://no-hardcode.patch"
meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb +2 -2
@@ -5,9 +5,9 @@ and bold). In addition Fontconfig/Xft2 can artificially oblique the \ serif faces for you: this loses hinting and distorts the faces slightly, \ but is visibly different than normal and bold, and reasonably pleasing." SECTION = "x11/fonts" -LICENSE = "Bitstream_Vera" +LICENSE = "BitstreamVera" LIC_FILES_CHKSUM = "file://COPYRIGHT.TXT;md5=27d7484b1e18d0ee4ce538644a3f04be" -PR = "r5" +PR = "r6" RDEPENDS_${PN} = "fontconfig-utils" inherit allarch
meta/recipes-graphics/xorg-app/xrandr_1.3.5.bb +2 -2
@@ -6,11 +6,11 @@ DESCRIPTION = "Xrandr is used to set the size, orientation and/or \ reflection of the outputs for a screen. It can also set the screen \ size." -LICENSE= "BSD-X" +LICENSE= "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=fe1608bdb33cf8c62a4438f7d34679b3" DEPENDS += "libxrandr libxrender" PE = "1" -PR = "r0" +PR = "r1" SRC_URI[md5sum] = "9735173a84dca9b05e06fd4686196b07" SRC_URI[sha256sum] = "1059ff7a9ad0df8e00a765ffa4e08a505304c02663112da370ac7082030b980e"
meta/recipes-graphics/xorg-font/font-alias_1.0.3.bb +2 -2
@@ -2,7 +2,7 @@ DESCRIPTION = "X font aliases." require xorg-font-common.inc -LICENSE = "Font-Alias" +LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=bf0158b89be493d523d69d9f29265038 \ file://cyrillic/fonts.alias;md5=f40795b0640d6785826aecd3b16f6124 \ file://75dpi/fonts.alias;md5=6bc48023f2ae7f3bfc105db7b0ee6b49 \
@@ -18,7 +18,7 @@ RDEPENDS_${PN}_virtclass-native = "font-util-native" inherit allarch PE = "1" -PR = "${INC_PR}.2" +PR = "${INC_PR}.3" SRC_URI[md5sum] = "6d25f64796fef34b53b439c2e9efa562" SRC_URI[sha256sum] = "8b453b2aae1cfa8090009ca037037b8c5e333550651d5a158b7264ce1d472c9a"
meta/recipes-graphics/xorg-font/font-util_1.2.0.bb +3 -2
@@ -2,7 +2,8 @@ DESCRIPTION = "X.Org font package creation/installation utilities" require xorg-font-common.inc -LICENSE = "BSD & MIT-style & Unicode" +#Unicode is MIT +LICENSE = "BSD & MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=c0067273d90f6336008cb2504e14bd32 \ file://ucs2any.c;endline=28;md5=8357dc567fc628bd12696f15b2a33bcb \ file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \
@@ -13,7 +14,7 @@ DEPENDS_virtclass-native = "util-macros-native" RDEPENDS_${PN} = "mkfontdir mkfontscale encodings" RDEPENDS_${PN}_virtclass-native = "mkfontdir-native mkfontscale-native" -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" do_configure_prepend() { sed -i "s#MAPFILES_PATH=\`pkg-config#MAPFILES_PATH=\`PKG_CONFIG_PATH=\"${STAGING_LIBDIR_NATIVE}/pkg-config\" pkg-config#g" fontutil.m4.in
meta/recipes-kernel/linux-firmware/linux-firmware_git.bb +5 -0
@@ -1,5 +1,10 @@ DESCRIPTION = "Firmware files for use with Linux kernel" SECTION = "kernel" +# Notes: +# This is kind of a mess. Each bit of firmware has their own license. Some free +# some not. Leaving this as Proprietary for now, but this recipe should be probably +# be rethought out a bit more around how it deals with licenses. + LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE.radeon_rlc;md5=4c243f7854d2884b483abda991adef43 \
meta/recipes-multimedia/libtiff/tiff_3.9.5.bb +2 -2
@@ -1,9 +1,9 @@ DESCRIPTION = "This software provides support for the Tag Image File Format (TIFF)" -LICENSE = "${PN}" +LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" HOMEPAGE = "http://www.remotesensing.org/libtiff/" DEPENDS = "zlib jpeg lzo" -PR = "r0" +PR = "r1" SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \ file://libtool2.patch"
meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "Matchbox window manager Sato themes" HOMEPAGE = "http://www.matchbox-project.org/" BUGTRACKER = "http://bugzilla.openedhand.com/" -LICENSE = "CCPL" +LICENSE = "CC-BY-SA-3.0" LIC_FILES_CHKSUM = "file://COPYING;md5=aae86bb34b0a83716ca09f4e783d6ba4" DEPENDS = "matchbox-wm"
meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_0.1.bb +1 -1
@@ -1,6 +1,6 @@ require matchbox-theme-sato.inc -PR = "r0" +PR = "r1" SRC_URI = "http://pokylinux.org/releases/sato/matchbox-theme-sato-0.1.tar.gz"
meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "Sato Icon Theme" HOMEPAGE = "http://www.o-hand.com" BUGTRACKER = "http://bugzilla.openedhand.com/" -LICENSE = "CCPL" +LICENSE = "CC-BY-SA-3.0" LIC_FILES_CHKSUM = "file://COPYING;md5=56a830bbe6e4697fe6cbbae01bb7c2b2" SECTION = "x11"
meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb +1 -1
@@ -2,7 +2,7 @@ require sato-icon-theme.inc DEPENDS += "icon-naming-utils-native" -PR = "r1" +PR = "r2" SRC_URI = "http://pokylinux.org/releases/sato/${BPN}-${PV}.tar.gz \ file://iconpath-option.patch"
meta/recipes-support/boost/boost.inc +2 -2
@@ -8,7 +8,7 @@ HOMEPAGE = "http://www.boost.org/" SECTION = "libs" DEPENDS = "boost-native zlib" DEPENDS_virtclass-native = "" -LICENSE = "Boost" +LICENSE = "BSL-1 & MIT & Python-2.0" ARM_INSTRUCTION_SET = "arm"
@@ -16,7 +16,7 @@ BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}" BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}" BOOST_P = "boost_${BOOST_VER}" -INC_PR = "r0" +INC_PR = "r1" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BOOST_P}.tar.bz2"
Signature · 1 line
1.7.1
Please ignore. I meant to send this to OE-core.
-b