* [PATCH v2 0/2] More reasonable LIC_FILES_CHKSUM enforcement @ 2016-05-09 22:25 Paul Eggleton 2016-05-09 22:25 ` [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set Paul Eggleton 2016-05-09 22:25 ` [PATCH v2 2/2] Drop unneeded LIC_FILES_CHKSUM values Paul Eggleton 0 siblings, 2 replies; 6+ messages in thread From: Paul Eggleton @ 2016-05-09 22:25 UTC (permalink / raw) To: openembedded-core Requiring every image recipe to set LIC_FILES_CHKSUM is a bit extreme. Here's a better way to handle the check as well as a patch dropping LIC_FILES_CHKSUM where it isn't needed afterwards. Changes since v1: * Preserve the LIC_FILES_CHKSUM value in wic-image-minimal since I missed that it does in fact have SRC_URI set. The following changes since commit ece101be5158beee709cdfbb85ecdbdc8d9fb864: test-empty-image: Fix LIC_FILES_CHKSUM typo (2016-05-06 10:47:59 +0100) are available in the git repository at: git://git.openembedded.org/openembedded-core-contrib paule/lic-files-chksum http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/lic-files-chksum Paul Eggleton (2): classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set Drop unneeded LIC_FILES_CHKSUM values meta-selftest/recipes-test/images/test-empty-image.bb | 1 - meta/classes/core-image.bbclass | 3 --- meta/classes/insane.bbclass | 6 +++--- meta/classes/packagegroup.bbclass | 3 --- meta/recipes-core/meta/meta-world-pkgdata.bb | 1 - meta/recipes-graphics/images/core-image-directfb.bb | 4 ---- 6 files changed, 3 insertions(+), 15 deletions(-) -- 2.5.5 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set 2016-05-09 22:25 [PATCH v2 0/2] More reasonable LIC_FILES_CHKSUM enforcement Paul Eggleton @ 2016-05-09 22:25 ` Paul Eggleton 2016-05-09 23:18 ` Mark Hatle ` (2 more replies) 2016-05-09 22:25 ` [PATCH v2 2/2] Drop unneeded LIC_FILES_CHKSUM values Paul Eggleton 1 sibling, 3 replies; 6+ messages in thread From: Paul Eggleton @ 2016-05-09 22:25 UTC (permalink / raw) To: openembedded-core Recipes such as images and packagegroups don't actually fetch or build any source, so there's really no point having LIC_FILES_CHKSUM set. Forcing users to set it (as we have done for images inheriting image.bbclass) just makes things more difficult for the user for no discernable benefit. The easiest way to adjust this check is simply to skip it if SRC_URI is not set since this is a pretty good indicator that no source is being pulled in. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> --- meta/classes/insane.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 097dc3a..0b151c2 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -681,15 +681,15 @@ python populate_lic_qa_checksum() { import tempfile sane = True - lic_files = d.getVar('LIC_FILES_CHKSUM', True) + lic_files = d.getVar('LIC_FILES_CHKSUM', True) or '' lic = d.getVar('LICENSE', True) pn = d.getVar('PN', True) if lic == "CLOSED": return - if not lic_files: - package_qa_handle_error("license-checksum", pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)", d) + if not lic_files and d.getVar('SRC_URI', True): + package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d) return srcdir = d.getVar('S', True) -- 2.5.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set 2016-05-09 22:25 ` [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set Paul Eggleton @ 2016-05-09 23:18 ` Mark Hatle 2016-05-09 23:29 ` Khem Raj 2016-05-11 9:36 ` Richard Purdie 2 siblings, 0 replies; 6+ messages in thread From: Mark Hatle @ 2016-05-09 23:18 UTC (permalink / raw) To: openembedded-core On 5/9/16 5:25 PM, Paul Eggleton wrote: > Recipes such as images and packagegroups don't actually fetch or build > any source, so there's really no point having LIC_FILES_CHKSUM set. > Forcing users to set it (as we have done for images inheriting > image.bbclass) just makes things more difficult for the user for no > discernable benefit. The easiest way to adjust this check is simply to > skip it if SRC_URI is not set since this is a pretty good indicator that > no source is being pulled in. > > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> I think this is a good idea. I'd not considered empty SRC_URI as a pointer to no LIC_FILES_CHKSUM, but it makes sense to me. --Mark > --- > meta/classes/insane.bbclass | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass > index 097dc3a..0b151c2 100644 > --- a/meta/classes/insane.bbclass > +++ b/meta/classes/insane.bbclass > @@ -681,15 +681,15 @@ python populate_lic_qa_checksum() { > import tempfile > sane = True > > - lic_files = d.getVar('LIC_FILES_CHKSUM', True) > + lic_files = d.getVar('LIC_FILES_CHKSUM', True) or '' > lic = d.getVar('LICENSE', True) > pn = d.getVar('PN', True) > > if lic == "CLOSED": > return > > - if not lic_files: > - package_qa_handle_error("license-checksum", pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)", d) > + if not lic_files and d.getVar('SRC_URI', True): > + package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d) > return > > srcdir = d.getVar('S', True) > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set 2016-05-09 22:25 ` [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set Paul Eggleton 2016-05-09 23:18 ` Mark Hatle @ 2016-05-09 23:29 ` Khem Raj 2016-05-11 9:36 ` Richard Purdie 2 siblings, 0 replies; 6+ messages in thread From: Khem Raj @ 2016-05-09 23:29 UTC (permalink / raw) To: Paul Eggleton; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 2158 bytes --] > On May 9, 2016, at 3:25 PM, Paul Eggleton <paul.eggleton@linux.intel.com> wrote: > > Recipes such as images and packagegroups don't actually fetch or build > any source, so there's really no point having LIC_FILES_CHKSUM set. > Forcing users to set it (as we have done for images inheriting > image.bbclass) just makes things more difficult for the user for no > discernable benefit. The easiest way to adjust this check is simply to > skip it if SRC_URI is not set since this is a pretty good indicator that > no source is being pulled in. Looks fine idea. May be we also need to improve docs for LIC_FILES_CHKSUM LIC_FILES_CHKSUM[doc] = "Checksums of the license text in the recipe source code.” someone new can think the sources referred to are recipe source itself. > > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> > --- > meta/classes/insane.bbclass | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass > index 097dc3a..0b151c2 100644 > --- a/meta/classes/insane.bbclass > +++ b/meta/classes/insane.bbclass > @@ -681,15 +681,15 @@ python populate_lic_qa_checksum() { > import tempfile > sane = True > > - lic_files = d.getVar('LIC_FILES_CHKSUM', True) > + lic_files = d.getVar('LIC_FILES_CHKSUM', True) or '' > lic = d.getVar('LICENSE', True) > pn = d.getVar('PN', True) > > if lic == "CLOSED": > return > > - if not lic_files: > - package_qa_handle_error("license-checksum", pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)", d) > + if not lic_files and d.getVar('SRC_URI', True): > + package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d) > return > > srcdir = d.getVar('S', True) > -- > 2.5.5 > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core [-- Attachment #2: Message signed with OpenPGP using GPGMail --] [-- Type: application/pgp-signature, Size: 211 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set 2016-05-09 22:25 ` [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set Paul Eggleton 2016-05-09 23:18 ` Mark Hatle 2016-05-09 23:29 ` Khem Raj @ 2016-05-11 9:36 ` Richard Purdie 2 siblings, 0 replies; 6+ messages in thread From: Richard Purdie @ 2016-05-11 9:36 UTC (permalink / raw) To: Paul Eggleton, openembedded-core, Robert Yang On Tue, 2016-05-10 at 10:25 +1200, Paul Eggleton wrote: > Recipes such as images and packagegroups don't actually fetch or > build > any source, so there's really no point having LIC_FILES_CHKSUM set. > Forcing users to set it (as we have done for images inheriting > image.bbclass) just makes things more difficult for the user for no > discernable benefit. The easiest way to adjust this check is simply > to > skip it if SRC_URI is not set since this is a pretty good indicator > that > no source is being pulled in. > > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> > --- > meta/classes/insane.bbclass | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) One reason -next has sat as long as I couldn't figure out who broke the lic-checksums sanity test. The answer is Robert's patch did, then this one did as well, making it hard to blame any one person. I've merged a fix into master along with the other patches. Cheers, Richard ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] Drop unneeded LIC_FILES_CHKSUM values 2016-05-09 22:25 [PATCH v2 0/2] More reasonable LIC_FILES_CHKSUM enforcement Paul Eggleton 2016-05-09 22:25 ` [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set Paul Eggleton @ 2016-05-09 22:25 ` Paul Eggleton 1 sibling, 0 replies; 6+ messages in thread From: Paul Eggleton @ 2016-05-09 22:25 UTC (permalink / raw) To: openembedded-core With the changes to insane.bbclass we don't need LIC_FILES_CHKSUM to be set for recipes that don't actually pull in any source. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> --- meta-selftest/recipes-test/images/test-empty-image.bb | 1 - meta/classes/core-image.bbclass | 3 --- meta/classes/packagegroup.bbclass | 3 --- meta/recipes-core/meta/meta-world-pkgdata.bb | 1 - meta/recipes-graphics/images/core-image-directfb.bb | 4 ---- 5 files changed, 12 deletions(-) diff --git a/meta-selftest/recipes-test/images/test-empty-image.bb b/meta-selftest/recipes-test/images/test-empty-image.bb index 7847f83..88d8d61 100644 --- a/meta-selftest/recipes-test/images/test-empty-image.bb +++ b/meta-selftest/recipes-test/images/test-empty-image.bb @@ -2,6 +2,5 @@ SUMMARY = "An empty image." IMAGE_INSTALL = "" IMAGE_LINGUAS = "" PACKAGE_INSTALL = "" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" inherit image diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass index 705cad8..8431440 100644 --- a/meta/classes/core-image.bbclass +++ b/meta/classes/core-image.bbclass @@ -2,9 +2,6 @@ # # Copyright (C) 2007-2011 Linux Foundation -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - # IMAGE_FEATURES control content of the core reference images # # By default we install packagegroup-core-boot and packagegroup-base-extended packages; diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass index 3674894..3928c8a 100644 --- a/meta/classes/packagegroup.bbclass +++ b/meta/classes/packagegroup.bbclass @@ -15,9 +15,6 @@ PACKAGE_ARCH ?= "all" 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', '')} diff --git a/meta/recipes-core/meta/meta-world-pkgdata.bb b/meta/recipes-core/meta/meta-world-pkgdata.bb index b3989cd..81c8647 100644 --- a/meta/recipes-core/meta/meta-world-pkgdata.bb +++ b/meta/recipes-core/meta/meta-world-pkgdata.bb @@ -1,6 +1,5 @@ SUMMARY = "Pulls in pkgdata for world" LICENSE = "MIT" -LIC_FILES_CHKSUM ?= "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" INHIBIT_DEFAULT_DEPS = "1" diff --git a/meta/recipes-graphics/images/core-image-directfb.bb b/meta/recipes-graphics/images/core-image-directfb.bb index 5641195..c6ce658 100644 --- a/meta/recipes-graphics/images/core-image-directfb.bb +++ b/meta/recipes-graphics/images/core-image-directfb.bb @@ -1,10 +1,6 @@ SUMMARY = "An image that uses DirectFB instead of X11" LICENSE = "MIT" - -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - inherit core-image distro_features_check REQUIRED_DISTRO_FEATURES = "directfb" -- 2.5.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-05-11 9:48 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-05-09 22:25 [PATCH v2 0/2] More reasonable LIC_FILES_CHKSUM enforcement Paul Eggleton 2016-05-09 22:25 ` [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set Paul Eggleton 2016-05-09 23:18 ` Mark Hatle 2016-05-09 23:29 ` Khem Raj 2016-05-11 9:36 ` Richard Purdie 2016-05-09 22:25 ` [PATCH v2 2/2] Drop unneeded LIC_FILES_CHKSUM values Paul Eggleton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox