aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
AgeCommit message (Collapse)Author
2011-12-21license: Fix manifest conditionalBeth Flanagan
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. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-16license.bbclass: remove bashismElizabeth Flanagan
Removing a bashism that was dumping errors into rootfs log. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-12license: PR bump failureElizabeth Flanagan
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] Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
2011-12-10license/copyleft: exception for ast parseElizabeth Flanagan
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. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-10license.bbclass: remove deb exclusionElizabeth Flanagan
This commit requires 4a13766c7b223d as it removes the exclusion of deb package types from license manifest creation. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-10license.bbclass: remove bashism.Elizabeth Flanagan
bashism in create_license_manifest removed. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08[YOCTO #1776] license: manifest and license pathElizabeth Flanagan
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. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
2011-12-08license: split license parsing into oe.licenseChristopher Larson
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 '/'). Signed-off-by: Christopher Larson <kergoth@gmail.com>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-07libcense.bbclass: fix OpenSSL mappingMartin Jansa
[YOCTO #1712] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Fixed YOCTO bug format and location Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-05-29license.bbclass: Infinite recursion of or nodesBeth Flanagan
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. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-05-27license.bbclass: Sane Parsing of licensesBeth Flanagan
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. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-05-17license bbclass: put licenses in DEPLOY_DIR/licenses to avoid sstate ↵Koen Kooi
problems when MACHINE is part of DEPLOY_DIR_IMAGE See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/002535.html for more info. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21Further cleanup of various poky referencesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-01Fixing type: license.bbclassBeth Flanagan
Munged a tab. Fixing Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-03-01Fixing my bad license parsing: license.bbclassBeth Flanagan
Fix to my bad license parsing. Also added the MIT generic license files. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-03-01[BUG:650] Fix LICENSE parsing: license.bblcassBeth Flanagan
LICENSE parsing was missing some cases. Fixed Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-02-03license.bbclass: Add coverage by sstate code (also use cleandirs and dirs ↵Richard Purdie
task attribures for directory handling) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-31license.bbclass: don't mark it as 'nostamp'Kevin Tian
'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-31license.bbclass: handle | (or) in the LICENSE fieldJoshua Lock
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-28Initial commit of license reporting:Beth Flanagan
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