nsane.bbclass: package_qa_check_license -> populate_lic_qa_checksum
v2 cover nsane.bbclass: package_qa_check_license -> populate_lic_qa_checksum
* V2:
* do_qa_populate_lic -> populate_lic_qa_checksum, RP commentd that do_foo means as task, but it's a function here. So use populate_lic_qa_checksum.
* Keep using MIT for libxsettings-client as Ross suggested.
* V1:
Initial version
// Robert
The following changes since commit e2dbe5eb869b8336b91023b83d7ca866197efa73:
license.bbclass: make sure that image manifest dir exists (2016-04-22 16:28:47 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/lic
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/lic
Robert Yang (6):
insane.bbclass: remove workdir from package_qa_check_license() insane.bbclass: package_qa_check_license -> populate_lic_qa_checksum packagegroup.bbclass: set LICENSE and LIC_FILES_CHKSUM packagegroup-foo.bb: remove LICENSE = "MIT"
meta-world-pkgdata: add LIC_FILES_CHKSUM
libxsettings-client: fix COPYING file
meta/classes/insane.bbclass | 15 ++++++--------- meta/classes/packagegroup.bbclass | 5 +++++ meta/conf/bitbake.conf | 2 +- meta/recipes-core/meta/meta-world-pkgdata.bb | 2 ++ meta/recipes-core/packagegroups/packagegroup-base.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 1 - .../packagegroups/packagegroup-core-buildessential.bb | 1 - .../packagegroups/packagegroup-core-eclipse-debug.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-nfs.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-sdk.bb | 1 - .../packagegroups/packagegroup-core-ssh-dropbear.bb | 1 - .../packagegroups/packagegroup-core-ssh-openssh.bb | 1 - .../packagegroup-core-standalone-sdk-target.bb | 1 - .../packagegroups/packagegroup-core-tools-debug.bb | 1 - .../packagegroups/packagegroup-core-tools-profile.bb | 1 - .../packagegroups/packagegroup-core-tools-testapps.bb | 1 - .../packagegroups/packagegroup-cross-canadian.bb | 1 - .../packagegroups/packagegroup-self-hosted.bb | 1 - .../packagegroups/packagegroup-core-device-devel.bb | 1 - .../packagegroups/packagegroup-core-full-cmdline.bb | 1 - .../packagegroups/packagegroup-core-lsb.bb | 1 - .../libxsettings-client/libxsettings-client_0.10.bb | 13 ++++++++----- .../packagegroups/packagegroup-core-clutter.bb | 1 - .../packagegroups/packagegroup-core-directfb.bb | 1 - .../packagegroups/packagegroup-core-x11-base.bb | 1 - .../packagegroups/packagegroup-core-x11-xserver.bb | 1 - .../packagegroups/packagegroup-core-x11.bb | 1 - .../packagegroups/packagegroup-core-x11-sato.bb | 1 - 28 files changed, 22 insertions(+), 38 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/6 insane.bbclass: remove workdir from package_qa_check_license()
The parameter workdir is not used in package_qa_check_license()
--- meta/classes/insane.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/insane.bbclass +2 -2
@@ -672,7 +672,7 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages): trimmed = path.replace(os.path.join (d.getVar("PKGDEST", True), name), "") package_qa_add_message(messages, "symlink-to-sysroot", "Symlink %s in %s points to TMPDIR" % (trimmed, name)) -def package_qa_check_license(workdir, d): +def package_qa_check_license(d): """ Check for changes in the license files """
@@ -1211,7 +1211,7 @@ Missing inherit gettext?""" % (gt, config)) # Check license variables ########################################################################### - package_qa_check_license(workdir, d) + package_qa_check_license(d) ########################################################################### # Check unrecognised configure options (with a white list)
Signature · 1 line
2.7.4
PATCH v2 2/6 insane.bbclass: package_qa_check_license -> populate_lic_qa_checksum
In reply to Robert YangThe package_qa_check_license() was in do_qa_configure which had a potential problem, when the recipe sets do_configure[noexec] = "1", then the license checking won't run, which may hidden license issues. Rename it to populate_lic_qa_checksum() and run in do_populate_lic[postfuncs] which is more reasonable (when no populate license, no license checking).
--- meta/classes/insane.bbclass | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
meta/classes/insane.bbclass +6 -9
@@ -672,7 +672,9 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages): trimmed = path.replace(os.path.join (d.getVar("PKGDEST", True), name), "") package_qa_add_message(messages, "symlink-to-sysroot", "Symlink %s in %s points to TMPDIR" % (trimmed, name)) -def package_qa_check_license(d): +# Check license variables +do_populate_lic[postfuncs] += "populate_lic_qa_checksum" +python populate_lic_qa_checksum() { """ Check for changes in the license files """
@@ -753,6 +755,7 @@ def package_qa_check_license(d): msg = pn + ": LIC_FILES_CHKSUM is not specified for " + url msg = msg + "\n" + pn + ": The md5 checksum is " + md5chksum package_qa_handle_error("license-checksum", msg, d) +} def package_qa_check_staged(path,d): """
@@ -1208,12 +1211,6 @@ Rerun configure task after fixing this.""") Missing inherit gettext?""" % (gt, config)) ########################################################################### - # Check license variables - ########################################################################### - - package_qa_check_license(d) - - ########################################################################### # Check unrecognised configure options (with a white list) ########################################################################### if bb.data.inherits_class("autotools", d):
@@ -1261,8 +1258,8 @@ python do_qa_unpack() { #addtask qa_staging after do_populate_sysroot before do_build do_populate_sysroot[postfuncs] += "do_qa_staging " -# Check broken config.log files, for packages requiring Gettext which don't -# have it in DEPENDS and for correct LIC_FILES_CHKSUM +# Check broken config.log files, for packages requiring Gettext which +# don't have it in DEPENDS. #addtask qa_configure after do_configure before do_compile do_configure[postfuncs] += "do_qa_configure "
Signature · 1 line
2.7.4
PATCH v2 3/6 packagegroup.bbclass: set LICENSE and LIC_FILES_CHKSUM
In reply to Robert Yang* Use "??=" in bitbake.conf to set LICENSE, so that it can overrided by packagegroup.bbclass and recipes.
* Use "?=" to set LICENSE and LIC_FILES_CHKSUM to MIT by default in packagegroup.bbclass, this won't impact any packagegroup recipes which use non-MIT license, since they can be overrided by the recipe.
--- meta/classes/packagegroup.bbclass | 5 +++++ meta/conf/bitbake.conf | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
meta/classes/packagegroup.bbclass +5 -0
@@ -14,6 +14,11 @@ PACKAGE_ARCH ?= "all" # Fully expanded - so it applies the overrides as well PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}" +LICENSE ?= "MIT" +LIC_FILES_CHKSUM ?= "${@oe.utils.ifelse(d.getVar('LICENSE', True) == 'MIT', \ + 'file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420', \ + '')}" + inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'allarch', '')} # This automatically adds -dbg and -dev flavours of all PACKAGES
meta/conf/bitbake.conf +1 -1
@@ -247,7 +247,7 @@ SUMMARY_${PN}-doc ?= "${SUMMARY} - Documentation files" DESCRIPTION_${PN}-doc ?= "${DESCRIPTION} \ This package contains documentation." -LICENSE = "INVALID" +LICENSE ??= "INVALID" MAINTAINER = "OE-Core Developers <[email protected]>" HOMEPAGE = ""
Signature · 1 line
2.7.4
PATCH v2 4/6 packagegroup-foo.bb: remove LICENSE = "MIT"
In reply to Robert YangIt has been set in packagegroup.bbclass.
--- meta/recipes-core/packagegroups/packagegroup-base.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-nfs.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-sdk.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb | 1 - .../packagegroups/packagegroup-core-standalone-sdk-target.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb | 1 - meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb | 1 - meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb | 1 - meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 1 - meta/recipes-devtools/packagegroups/packagegroup-core-device-devel.bb | 1 - meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb | 1 - meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb | 1 - meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb | 1 - meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb | 1 - meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb | 1 - meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb | 1 - meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb | 1 - meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb | 1 - 23 files changed, 23 deletions(-)
meta/recipes-core/packagegroups/packagegroup-base.bb +0 -1
@@ -1,5 +1,4 @@ SUMMARY = "Merge machine and distro options to create a basic machine task/package" -LICENSE = "MIT" PR = "r83" #
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -1
@@ -4,7 +4,6 @@ SUMMARY = "Minimal boot requirements" DESCRIPTION = "The minimal set of packages required to boot the system" -LICENSE = "MIT" PR = "r17" PACKAGE_ARCH = "${MACHINE_ARCH}"
meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb +0 -1
@@ -4,7 +4,6 @@ # SUMMARY = "Essential build dependencies" -LICENSE = "MIT" inherit packagegroup
meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb +0 -1
@@ -1,5 +1,4 @@ SUMMARY = "Remote debugging tools for Eclipse integration" -LICENSE = "MIT" inherit packagegroup
meta/recipes-core/packagegroups/packagegroup-core-nfs.bb +0 -1
@@ -3,7 +3,6 @@ # SUMMARY = "NFS package groups" -LICENSE = "MIT" PR = "r2" inherit packagegroup
meta/recipes-core/packagegroups/packagegroup-core-sdk.bb +0 -1
@@ -3,7 +3,6 @@ # SUMMARY = "Software development tools" -LICENSE = "MIT" PR = "r9" PACKAGE_ARCH = "${MACHINE_ARCH}"
meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb +0 -1
@@ -1,5 +1,4 @@ SUMMARY = "Dropbear SSH client/server" -LICENSE = "MIT" PR = "r1" inherit packagegroup
meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb +0 -1
@@ -1,5 +1,4 @@ SUMMARY = "OpenSSH SSH client/server" -LICENSE = "MIT" PR = "r1" inherit packagegroup
meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb +0 -1
@@ -1,6 +1,5 @@ SUMMARY = "Target packages for the standalone SDK" PR = "r8" -LICENSE = "MIT" inherit packagegroup
meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb +0 -1
@@ -3,7 +3,6 @@ # SUMMARY = "Debugging tools" -LICENSE = "MIT" inherit packagegroup
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +0 -1
@@ -3,7 +3,6 @@ # SUMMARY = "Profiling tools" -LICENSE = "MIT" PR = "r3"
meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb +0 -1
@@ -3,7 +3,6 @@ # SUMMARY = "Testing tools/applications" -LICENSE = "MIT" PR = "r2"
meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +0 -1
@@ -1,6 +1,5 @@ SUMMARY = "Host SDK package for cross canadian toolchain" PN = "packagegroup-cross-canadian-${MACHINE}" -LICENSE = "MIT" inherit cross-canadian packagegroup
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +0 -1
@@ -5,7 +5,6 @@ SUMMARY = "Self-hosting" DESCRIPTION = "Packages required to run the build system" PR = "r13" -LICENSE = "MIT" inherit packagegroup distro_features_check # rdepends on libx11-dev
meta/recipes-devtools/packagegroups/packagegroup-core-device-devel.bb +0 -1
@@ -1,5 +1,4 @@ SUMMARY = "Provides a small set of tools for development on the device" -LICENSE = "MIT" PR = "r1"
meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb +0 -1
@@ -5,7 +5,6 @@ SUMMARY = "Standard full-featured Linux system" DESCRIPTION = "Package group bringing in packages needed for a more traditional full-featured Linux system" PR = "r6" -LICENSE = "MIT" inherit packagegroup
meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb +0 -1
@@ -5,7 +5,6 @@ SUMMARY = "Linux Standard Base (LSB)" DESCRIPTION = "Packages required to satisfy the Linux Standard Base (LSB) specification" PR = "r10" -LICENSE = "MIT" inherit packagegroup distro_features_check
meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb +0 -1
@@ -3,7 +3,6 @@ # SUMMARY = "Clutter package groups" -LICENSE = "MIT" PR = "r6"
meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb +0 -1
@@ -1,5 +1,4 @@ SUMMARY = "DirectFB without X11" -LICENSE = "MIT" PACKAGE_ARCH = "${MACHINE_ARCH}"
meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb +0 -1
@@ -1,6 +1,5 @@ SUMMARY = "Basic X11 session" DESCRIPTION = "Packages required to set up a basic working X11 session" -LICENSE = "MIT" PR = "r1" inherit packagegroup distro_features_check
meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb +0 -1
@@ -3,7 +3,6 @@ # SUMMARY = "X11 display server" -LICENSE = "MIT" PR = "r40" PACKAGE_ARCH = "${MACHINE_ARCH}"
meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb +0 -1
@@ -2,7 +2,6 @@ # Copyright (C) 2011 Intel Corporation # -LICENSE = "MIT" PR = "r40" inherit packagegroup distro_features_check
meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb +0 -1
@@ -3,7 +3,6 @@ # SUMMARY = "Sato desktop" -LICENSE = "MIT" PR = "r33" PACKAGE_ARCH = "${MACHINE_ARCH}"
Signature · 1 line
2.7.4
PATCH v2 5/6 meta-world-pkgdata: add LIC_FILES_CHKSUM
In reply to Robert YangFixed:
ERROR: meta-world-pkgdata-1.0-r0 do_populate_lic: QA Issue: meta-world-pkgdata: Recipe file does not have license file information (LIC_FILES_CHKSUM) [license-checksum]
--- meta/recipes-core/meta/meta-world-pkgdata.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-core/meta/meta-world-pkgdata.bb +2 -0
@@ -1,5 +1,7 @@ SUMMARY = "Pulls in pkgdata for world" LICENSE = "MIT" +LIC_FILES_CHKSUM ?= "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + INHIBIT_DEFAULT_DEPS = "1" addtask do_allpackagedata before do_build
Signature · 1 line
2.7.4
PATCH v2 6/6 libxsettings-client: fix COPYING file
In reply to Robert YangFixed:
* Move the code of copy COPYING file from do_configure_append() to do_patch[postfuncs] since we had moved license-checksum from do_package_qa to do_populate_lic.
* Add xsettings-client.c and xsettings-common.c to LIC_FILES_CHKSUM.
* Update comments.
--- .../libxsettings-client/libxsettings-client_0.10.bb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
meta/recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb +8 -5
@@ -9,7 +9,9 @@ SECTION = "x/libs" LICENSE = "MIT-style" LIC_FILES_CHKSUM = "file://COPYING;md5=7cfac9d2d4dc3694cc7eb605cf32a69b \ file://xsettings-client.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b \ - file://xsettings-common.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b" + file://xsettings-client.c;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b \ + file://xsettings-common.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b \ + file://xsettings-common.c;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b" DEPENDS = "virtual/libx11" PR = "r5"
@@ -31,10 +33,11 @@ inherit autotools gettext distro_features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" -do_configure_prepend() { - # This package doesn't ship with its own COPYING file and - # autotools will install a GPLv2 one instead of the actual MIT-style license here. - # Add the correct license here to avoid confusion. +do_patch[postfuncs] += "update_copying_file" +update_copying_file() { + # This package ships with a GPLv2 COPYING file, but the author says + # it is actual MIT-style license, add the correct license here to + # avoid confusion. cp -f ${WORKDIR}/MIT-style-license ${S}/COPYING }
Signature · 1 line
2.7.4