Commit Graph

18 Commits

Author SHA1 Message Date
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Robert Yang 4a91e1449b archiver.bbclass: make it can filter the license
* Filter the license (default: no), the recipe whose license in
  COPYLEFT_LICENSE_INCLUDE will be included, and in
  COPYLEFT_LICENSE_EXCLUDE will be excluded.

* The user can set the recipe type that would be archived (native,
  target, and so on), deafult to all.

The copyleft_filter.bbclass is come from copyleft_compliance.bbclass,
which is used by both copyleft_compliance.bbclass and archiver.bbclass.

[YOCTO #5740]

(From OE-Core rev: 0e798d5cbcf585535e19633828dc540a282261fc)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25 09:55:35 +00:00
Robert Yang 1f44904dae archiver.bbclass: move a few code to copyleft_compliance.bbclass
Move the code which is only used by copyleft_compliance.bbclass from
archiver.bbclassc, and remove the "inherit archiver" from
copyleft_compliance.bbclass.

The archiver.bbclass is used for archiving various types of sources, but
the copyleft_compliance.bbclass is used for analysing the license, they
don't have much relationships.

[YOCTO #4986]
[YOCTO #5113]

(From OE-Core rev: 578830fe2ff279ea620916ea711b80dc1b29a275)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 17:15:27 +00:00
Richard Purdie 554c892ccf meta: Don't use deprecated bitbake API
These have been deprecated for a long time, convert the remaining
references to the correct modules and prepare for removal of the
compatibility support from bitbake.

(From OE-Core rev: 6a39835af2b2b3c7797fe05479341d71a3f3aaf6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-01 15:51:42 +01:00
Christopher Larson 126844d0e1 copyleft_compliance: set 'dirs' flag on task
Without this, due to bitbake defaulting to ${B}, it's possible to get ${S}
inadvertantly created before do_unpack, breaking the unpack of git sources,
which expect the destination to not exist.

(From OE-Core rev: 694a15382fe9f3749ffdc0168a6dc2da8a29ae2d)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 16:16:02 +01:00
Christopher Larson 29f8701402 copyleft_compliance: handle localpaths ending with '/'
(From OE-Core rev: 1f30d2eb2ef45550c71969c735275db1448b6ac6)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:56:00 +01:00
Christopher Larson af19d889ef copyleft_compliance: force the symlink creation
(From OE-Core rev: 74b82fd4cc3e5eec611800935f1c89db3bac9971)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Gilbert Coville <gilbert_coville@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 14:43:24 +00:00
Christopher Larson db51e36b8e copyleft_compliance: grab the scm mirror tarballs
If the mirror tarball is available, it's a better choice for this than the
repository directory.

(From OE-Core rev: 8183962869363731acf57f2f531da737512f0f2f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Gilbert Coville <gilbert_coville@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 14:43:24 +00:00
Robert Yang 4396677ade copyleft_compliance.bbclass: remove the duplicated code
A part of the code in copyleft_compliance.bbclass is duplicated to
archiver.bbclass, remove the duplicated lines.

[YOCTO #2619]

(From OE-Core rev: 731e1171d6c35ed086b36c081f48dba2015319f8)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-29 16:02:08 -07:00
Richard Purdie 73cf0335c4 Remove a number of unneeded import os/bb calls
The bb and os modules are always imported so having these extra import calls
are a waste of space/execution time. They also set a bad example for people
copy and pasting code so clean them up.

(From OE-Core rev: 7d674820958be3a7051ea619effe1a6061d9cbe2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 12:24:50 +01:00
Eric Bénard 9ce92e439f copyleft_compliance: also print the reason for including a package
(From OE-Core rev: 20996da46aff03e61de50444ab3a0ab46c057dfd)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-04 17:17:51 +01:00
Richard Purdie 06f2f8ce0a meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Using "1" with getVar is bad coding style and "True" is preferred.
This patch is a sed over the meta directory of the form:

sed \
 -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \
 -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \
 -i `grep -ril getVar *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:22:56 -08:00
Christopher Larson 19247e44a3 oe.license: avoid the need to catch SyntaxError
(From OE-Core rev: cace9ddc0edd654877d968643960fa4343472b58)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-17 14:53:19 +00:00
Christopher Larson 7ce97336aa oe.license: add is_included convenience function
Given a license string and whitelist and blacklist, determine if the
license string matches the whitelist and does not match the blacklist.

When encountering an OR, it prefers the side with the highest weight (more
included licenses). It then checks the inclusion of the flattened list of
licenses from there.

Returns a tuple holding the boolean state and a list of the applicable
licenses which were excluded (or None, if the state is True)

Examples:

    is_included, excluded = oe.license.is_included(licensestr, ['GPL*', 'LGPL*'])
    is_included, excluded = oe.license.is_included(licensestr, blacklist=['Proprietary', 'CLOSED'])

(From OE-Core rev: 7903433898b4683a1c09cc9a6a379421bc9bbd58)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-17 14:53:19 +00:00
Christopher Larson 49a0821376 copyleft_compliance: add debug message with the reason for exclusion
(From OE-Core rev: 02101bbe08a5cd6e5eecb21f2095c15ebfe9287f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-17 14:53:19 +00:00
Christopher Larson 6d73a199e4 copyleft_compliance: add control of recipe types to include
In this context, recipe "type" refers to whether it is 'target', 'native',
'cross', etc. COPYLEFT_RECIPE_TYPES is a space separated list of types to
include. It defaults to 'target'.

(From OE-Core rev: 045e8a409ffe23d4f562b2982bfeee6e45f3c0d9)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-17 14:53:19 +00:00
Elizabeth Flanagan 924b1e47ab license/copyleft: exception for ast parse
As the standard for LICENSE format is not well defined, we
may well run into issues where LICENSE cannot be parsed via
ast. In cases like this, we need to warn and continue.

(From OE-Core rev: 07f94fa1d661d38b775ce2d99b84e5610c369392)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-10 00:18:15 +00:00
Christopher Larson d334527c1f Add copyleft compliance class
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.

(From OE-Core rev: f0c36abba71c261f33c9906f122dd6cd9ed19221)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:30 +00:00