Commit Graph

38 Commits

Author SHA1 Message Date
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Paul Eggleton 2fefa9c335 classes/license: fix manifest to work with deb
Prepend the license manifest creation call to ROOTFS_POSTPROCESS_COMMAND
instead of appending to ROOTFS_POSTINSTALL_COMMAND. The latter is not
implemented for the deb backend (and probably ought to just be removed
completely), and by using _prepend we can still ensure it occurs before
package info is removed (and before buildhistory in case it is needed
there in future).

(From OE-Core rev: 56fafe083fdb63f156a081344fb1d836e3182bf0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09 16:58:58 +01:00
Elizabeth Flanagan 885e1f7e68 license.bbclass: optimize pkg runtime data
This fixes an ugly way I was trying to find pkg runtime
data for package and license manifest creation.

rootfs generation times for core-image-minimal:

Prior to patch
real	0m41.570s
user	1m40.466s
sys	0m6.768s

With patch
real	0m27.527s
user	0m9.833s
sys	0m3.496s

(From OE-Core rev: 664bbf3207c229eef5ef94a08713a652f33a8466)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>

Conflicts:

	meta/classes/license.bbclass
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-05 23:04:59 +01:00
Elizabeth Flanagan f25a6c09da license.bbclass: Adding PV to package.manifest
Per request, adding the package version to the package manifest
file.

(From OE-Core rev: bf216369f3131ad38c0b2b92620e4805ca9eecb9)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-05 23:04:59 +01:00
Andrei Gherzan 1dc560c9d2 license.bbclass: Check if copyfile succeeded with isfile
A cleaner way to check if copyfile suceeded is to use os.path.isfile.
In this way we can omit warns in some python versions where copyfile
return the same non-0 value even is this action is successfull.

(From OE-Core rev: fa51fe19a1dc1ddc4c9ec879a782953fd6a15117)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-04 17:17:51 +01:00
Eric Bénard 3774cf0fdc license.bbclass: remove existing license.manifest before appending new data
without this fix, we append license each time we build again the same image,
ending with a large not up to date file.

(From OE-Core rev: 2d49a8f659694b60cdb706e8993cd9550e2002bd)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-29 16:50:06 +01:00
Elizabeth Flanagan 7fdf6b522f license.bbclass: Style guide compliance
4 spaces. Correcting some bash whitespace in license to comply
with the style guide.

(From OE-Core rev: 0945bf7871fd33df3587cdfb1290b028d7843915)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25 12:23:38 +01:00
Elizabeth Flanagan bdf2d94c35 INCOMPATIBLE_LICENSE: support for spdx and pkg licenses
This adds a few things to the incompatible license functionality

1. INCOMPATIBLE_LICENSE was unable to distinguish any variation
within LICENSE (e.g. GPLv3 v. GPLv3.0). This now utilizes the
SPDXLICENSEMAP of the license indicated as INCOMPATIBLE_LICENSE

2. Given a recipe where the main LICENSE was incompatible but
a package of the recipe was compatible, the entire recipe would
be excluded. This allows us some finer grained control over what
exactly gets excluded.

(From OE-Core rev: a8d7246f7b13ef2636c325263c8bfa22552d7a57)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25 12:23:38 +01:00
Elizabeth Flanagan a3da6c381f license.bbclass: Whitespace standardization
Removing tabs within check_license_flags to standardize to
4 space tabbing

(From OE-Core rev: 178be339e09078c56a5231a10551f3b9aed16f9c)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25 12:23:38 +01:00
Elizabeth Flanagan 5de2b70afc license.bbclass: Add spdx mapping to GPL-1.0
Perl is GPL-1.0. For consistency sake, adding an spdx map for
GPLv1

(From OE-Core rev: 2bc1d04e62a8c84e3195d538f844e90c32df8acc)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25 12:23:37 +01:00
Robert P. J. Day 9e3c79cfe8 Fix common typoes "existant", "dependant" and variations
Fix a couple common typoes, all contained within comments so there
should be no effect on functionality.

(From OE-Core rev: dc52c3cbf3a7b7242d53019f7643495eb40c0566)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-22 16:47:06 +00:00
Richard Purdie e25a02eb2b license.bbclass: Add mapping for LGPLv2.0, pango uses it
(From OE-Core rev: 3b9256140bde09f8319a96bc8cbe15288ff5899b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-13 11:45:06 +00: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
Elizabeth Flanagan d7cef163e4 license.bbclass: Symbolic links of generic license
This is to reduce the size of licenses added to images. With this
commit license.manifest, original license and generic license
adds about .5M to a core-image-minimal image, substantially less
than what is currently occuring when COPY_LIC_MANIFEST and
COPY_LIC_DIRS are set.

(From OE-Core rev: 2c753a714c1ee2b7c6479836f47aeec182ca3670)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 23:25:52 +00:00
Elizabeth Flanagan 5272e883ff license.bbclass: Gather Pkg level licenses
We should look for LICENSE at a package level first. If it's
not found, we should use the recipe level LICENSE. This adds a
bit more granularity to license manifests where needed.

(From OE-Core rev: d50dd280f52587b6225bc5db3c9e85f78107f5f5)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 23:25:52 +00:00
Tom Zanussi b68ea54360 license.bbclass: add support for LICENSE_FLAGS
LICENSE_FLAGS are a per-recipe replacement for the COMMERCIAL_LICENSE
mechanism.

In the COMMERCIAL_LICENSE mechanism, any package name mentioned in the
global COMMERCIAL_LICENSE list is 'blacklisted' from being included in
an image.  To allow the blacklisted package into the image, the
corresponding packages need to be removed from the COMMERCIAL_LICENSE
list.  This mechanism relies on a global list defined in
default-distrovars.inc.

The LICENSE_FLAGS mechanism essentially implements the same thing but
turns the global blacklist into a per-recipe whitelist.  Any recipe
can optionally define one or more 'license flags'; if defined, each of
the license flags defined for a recipe must have matching entries in a
global LICENSE_FLAGS_WHITELIST variable.

The definition of 'matching' is simple, but there are a couple things
users need to know in order to correctly and effectively use it.
Before we test a flag against the whitelist, we append _${PN} to it,
thus automatically making each LICENSE_FLAG recipe-specific.  We then
try to match that string against the whitelist.  So if the user
specifies LICENSE_FLAGS = 'commercial' for recipe 'foo', the string
'commercial_foo' should be specified in the whitelist in order for it
to match.

However, the user can also broaden the match by putting any
'_'-separated beginning subset of a LICENSE_FLAG in the whitelist,
which will also match e.g. simply specifying 'commercial' in the
whitelist would match any expanded LICENSE_FLAG starting with
'commercial' such as 'commercial_foo' and 'commercial_bar' which are
the strings that would have been automatically generated if those
recipes had simply specified LICENSE_FLAGS = 'commercial'

This allows for a range of specificity for the items in the whitelist,
from more general to perfectly specific.  So users have the choice of
exhaustively enumerating each license flag in the whitelist to allow
only those specific recipes into the image, or of using a more general
string to pick up anything matching just the first component(s).

Note that this scheme works even if the flag already has _pn appended
- the extra _pn is redundant, but doesn't affect the outcome e.g. a
license flag of 'commercial_1.2_foo' would turn into
'commercial_1.2_foo_foo' and would match both the general 'commercial'
and the specific 'commercial_1.2_foo' as expected (it would also match
commercial_1.2_foo_foo' and 'commercial_1.2', which don't make much
sense as far as something a user would think of specifying in the
whitelist).  For a versioned string, the user could instead specify
'commercial_foo_1.2', which would turn into 'commercial_foo_1.2_foo',
but which would as expected allow the user to pick up this package
along with anything else 'commercial' by specifying 'commercial' in
the whitelist, or anything with a 'commercial_foo' license regardless
of version by using 'commercial_foo' in the whitelist, or
'commercial_foo_1.1' to be completely specific about package and
version.

The current behavior of COMMERCIAL_LICENSE is replicated as mentioned
above by having the current set of COMMERCIAL_LICENSE flags
implemented using LICENSE_FLAGS = "commercial".

That being the case, the current COMMERCIAL_LICENSE can equivalently
be specified in the new scheme by putting the below in local.conf:

 # This is a list of packages that require a commercial license to ship
 # product. If shipped as part of an image these packages may have
 # implications so they are disabled by default.  To enable them,
 # un-comment the below as appropriate.
 #LICENSE_FLAGS_WHITELIST = "commercial_gst-fluendo-mp3 \
 #                           commercial_gst-openmax \
 #                           commercial_gst-plugins-ugly \
 #                           commercial_lame \
 #                           commercial_libmad \
 #                           commercial_libomxil \
 #                           commercial_mpeg2dec \
 #                           commercial_qmmp"

The above allows all of the current COMMERCIAL_LICENSE packages in -
to disallow a particular package from appearing in the image, simply
remove it from the whitelist.  To allow them all in, you could also
specify LICENSE_FLAGS_WHITELIST = "commercial".

(From OE-Core rev: a2760661b8c7a4a1b6f2e556853b3a9ae38cbcb5)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-24 11:54:15 +00:00
Andrei Gherzan 4005c3ff5e license.bbclass base.bbclass: support for 'or' operand in LICENSE and for SPDX license names
A new function was defined in license.bbclass in order to correctly exclude packages where OE-Style licence naming
is used. In this way licenses as GPL-3, GPLv3, GPLv3.0 etc will be excluded from a non-GPLv3 build. This function
takes into consideration if 'or' operand is used.
The function defined in license.bbclass is called in base.bbclass where packages are excluded based on
INCOMPATIBLE_LICENSE variable.

[YOCTO #1884]
[YOCTO #1844]

(From OE-Core rev: 28456593be0b7e15bb51595d547d7e5347cce24b)

Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-10 17:40:44 +00:00
Beth Flanagan 2ee3156284 license: Fix manifest conditional
The manifest conditionals COPY_LIC_MANIFEST and COPY_LIC_DIRS
were returning true due to missing quotes in the bash test. This
made images larger than expected.

(From OE-Core rev: dc751b9c637db0d442ef553f0b0568cb493f3cd3)

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-21 17:16:29 +00:00
Elizabeth Flanagan ee2af267b7 license.bbclass: remove bashism
Removing a bashism that was dumping errors into rootfs log.

(From OE-Core rev: 3e05acab1c119a3b2a4703ea8729cc768935d36e)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-16 16:50:46 +00:00
Elizabeth Flanagan bd75266ab3 license: PR bump failure
This addtask for do_populate_lic should be reverted back
to before do_package as before do_compile causes failures
when recipes are updated.

[YOCTO #1819]

(From OE-Core rev: 513c620815fcf8e7bcc9ac38a916850ad6173a16)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-12 21:50:20 +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
Elizabeth Flanagan 45f6a21065 license.bbclass: remove deb exclusion
This commit requires 4a13766c7b223d as it removes the exclusion
of deb package types from license manifest creation.

(From OE-Core rev: 5328587ecaa14a54ad7bced6f7ead218471dbf86)

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
Elizabeth Flanagan 50195e4af1 license.bbclass: remove bashism.
bashism in create_license_manifest removed.

(From OE-Core rev: 035a569d5241be9a217dbdbd6650ee04c4c4d67f)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-10 00:18:14 +00:00
Elizabeth Flanagan cb91ef9310 license: manifest and license path
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.

(From OE-Core rev: 558b5043e1d5a36caff137093fd04abcf025af1c)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:30 +00:00
Christopher Larson a57de1ac9d license: split license parsing into oe.license
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 '/').

(From OE-Core rev: 20d4068045c76e9dc2aff0c152dd02d6a109c9dd)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:29 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Martin Jansa fc50781c34 libcense.bbclass: fix OpenSSL mapping
[YOCTO #1712]

(From OE-Core rev: 56799ebcb5c55a7fc75458fc2be2e69a67e8fd21)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

Fixed YOCTO bug format and location

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-07 14:05:38 +00:00
Beth Flanagan d43fa5f348 license.bbclass: Infinite recursion of or nodes
This fixes two bugs. When populate_lic was hitting | it was going
into an infinite recursion of the node.

Also, some LICENSE fields may start with "(". We want to avoid
invalid python syntax here, so we strip out the whitespace.

(From OE-Core rev: 160621bd9679201e352cc80b22aa2f6e25827576)

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-29 09:40:03 +01:00
Beth Flanagan 1169f1b066 license.bbclass: Sane Parsing of licenses
This is a first pass at sane license parsing, using python
abstract syntax trees.

A few notes on this since ast is not generally used. I massage
the LICENSE field to be more pythonesque and then create an ast.

I then dump the ast and using a LicenseVisitor class, recurse
through the tree, looking for licenses. I then copy and link.

It's cleaner, allows for easier addition of logic and while it
takes slightly more CPU, it's also slightly faster in initial
small scale tests.

It doesn't recognize the '+' or '*' modifiers to the licenses yet
nor does it know what to do with bitors (|), since I'm not even
sure what to do with them.

(From OE-Core rev: 2a90a3a41978a5470962b315e007351b8e80820c)

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 23:36:24 +01:00
Koen Kooi e62569a2ee license bbclass: put licenses in DEPLOY_DIR/licenses to avoid sstate problems when MACHINE is part of DEPLOY_DIR_IMAGE
See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/002535.html for more info.

(From OE-Core rev: d5936d179cf5eaa4930dca317cd0f4a7f1959005)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-17 15:14:45 +01:00
Richard Purdie 65f4b65410 Further cleanup of various poky references
(From OE-Core rev: fe73ea8c510877fe4e3c117985e8f3d0b79ddf1b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 12:56:16 +01:00
Beth Flanagan 136ba6a3c4 Fixing type: license.bbclass
Munged a tab. Fixing

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-02-26 14:15:50 -08:00
Beth Flanagan d041ab31a1 Fixing my bad license parsing: license.bbclass
Fix to my bad license parsing. Also added the MIT generic license
files.

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-02-26 14:04:41 -08:00
Beth Flanagan 3c0522e944 [BUG:650] Fix LICENSE parsing: license.bblcass
LICENSE parsing was missing some cases. Fixed

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-02-25 16:39:08 -08:00
Richard Purdie 9b2fd4b0fe license.bbclass: Add coverage by sstate code (also use cleandirs and dirs task attribures for directory handling)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-03 12:33:18 +00:00
Kevin Tian eb879e2ef8 license.bbclass: don't mark it as 'nostamp'
'nostamp' is normally used for some standalone tasks like clean, checkuri, etc.
It doesn't make sense to mark do_populate_lic as 'nostamp', which is depended
by do_package. No stamp file in the build dependency chain implicates that
do_package needs to be reinvoked and thus further do_package_write* stuff.

This together with another sstate bug fully confused recent master, that people
keep observing unnecessary do_package rebuilt with or without change. Below is
a short explanation for two behaviors we observed:

a) a fresh build, and then bitbake same target w/o any change. User will observe
one unnecessary rebuild and then later rebuild is fine:
    [1st rebuild]
    * do_populate_lic has no stamp, and thus do_package is thought not current
    * do_package_setscene is then invoked with stamp file created
    * then later do_package_write*** also are rebuilt
    [2nd and later rebuild]
    * do_populate_lic has no stamp, and thus do_package is thought not current
    * do_package_setscene has stamp file and thus no need to re-execute setscene
    * thus no further rebuild required

b) a fresh build, and then adjust order of PACKAGE_CLASSES. There's one bug
regarding to PACKAGE_CLASSES and do_package_setscene, that only switch the
order in PACKAGE_CLASSES generates different checksum. In this case user may
observe up to 3 rebuilds when switching package_rpm/package_ipk back and forth.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2011-01-31 16:21:48 +00:00
Joshua Lock 92f1b4976b license.bbclass: handle | (or) in the LICENSE field
The class strips out operators from the LICENSE field and to reduce it to a
list of license, | was missing but is quite frequently used so add it to the
list of replaced characters.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-01-31 11:11:30 +00:00
Beth Flanagan 4bda50f289 Initial commit of license reporting:
This is an intial commit for the license reporting system. A few notes:
The LICENSE fields needs to be standardized throughout poky. As it
stands, we throw a warning if the license file is not found (either
because it does not exist or because LICENSE_FILE_CHKSUM is munged)
in the generic license directory. This should eventually become an
error.

I've seen a few places where Apache-v2.0 is written differently and
I'm sure this will throw the above warning. This does not put the
license data on the rootfs. Also, I provide both the actual license
text and a link to the best guess of the generic_license. That guessing
is not very robust and I'm loath to get into a bunch of pattern matching
rather than standardize LICENSE.

This adds one new param to poky.conf and one new to license.bbclass:

LICENSE_DIR: the base directory we copy all the license results to (set
in license.bbclass)
COMMON_LICENSE_DIR: this is the directory that holds all the common
generic license files. currently meta/files/common-licenses (set in
poky.conf)

TODO:
- We should verify the common-licenses. I stripped these from my Ubuntu
  10.10 system.
- We should allow the capability of licenses on the rootfs, although the
  resulting image created would be a lot larger.
- More common-licenses. I don't include bzip, zlib, ICS.... I should,
  but that means tracking down a lot of licenses.
- General cleanup of licensing and standardization of names. We should
  standardize on a naming convention. What's in licenses.conf should
  match up with what is in the recipes which should match with what is
  in common-licenses. Outside the scope of this though. See:
  http://bugzilla.pokylinux.org/show_bug.cgi?id=650
2011-01-28 16:49:13 +00:00