aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
AgeCommit message (Collapse)Author
2017-08-31classes/license: drop erroneous sha256 parameter in LIC_FILES_CHKSUMpaule/lic-sha256-dropPaul Eggleton
In OE-Core commit a48fea275b08ff3d3dfc9a928aeb04768db35873, a check on the value of a "sha256" parameter was added, however there was no mention of this in the commit message and no corresponding code to actually verify the checksum as sha256 was added along with it either, so there's no point in getting the value. Additionally it was assuming that a sha256 value would be present without checking first, with the result that if you leave out the md5 value in a recipe intentionally in order to get it to tell you the correct value on the next build, you got a traceback instead of the appropriate error containing the information. Drop this entirely - if we want to implement this we need to do it properly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-08-03meta: drop do_bootdirectdisk do_vmimg referencesMing Liu
do_bootdirectdisk and do_vmimg had been dropped by commit 929ba563: [ image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD types ] Also drop the references to them and image-vm. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-08license.bbclass: improve reproducibilityJuro Bystricky
Two identical builds can end up having deploy/licenses folders that differ. This is observed in cases where there are several different license files of the same name in different folders, i.e. "COPYING". In those case we have to differentiate the files somehow and we do it via file expensions such as COPYING.0, COPYING.1. However, which file will get which extension is presently random. This means, for example, that COPYING.0 in one build is the same as COPYING.1 in the other (and vice versa). Although there is mothing wrong with this, for the sake of binary reproducibility it is preferable to have a deterministic outcome. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10license: don't assume source files are UTF-8Ross Burton
We can't assume that source files are entirely UTF-8, so when copying the license blocks open the file as binary instead of text. [ YOCTO #11135 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01license.bbclass: run chown only under pseudoMarkus Lehtonen
The copy_license_files() function in license.bbclass is called in two different contexts. First, it is run as part of the do_populate_lic task. In addition, it is called from do_package task when LICENSE_CREATE_PACKAGE is enabled. The function has code that changes the owner of license files to root which is meant only to happend in the latter case - i.e. under do_package which is run under pseudo. Previously, the code was blindly always running chown and just ignored errors that happened when running from do_populate_lic. This patch changes it to be more intelligent, only doing chown when running under pseudo. [YOCTO #10897] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01classes/license.bbclass: Don't copy unneeded licenses by packageAníbal Limón
Usually a recipe only provides one package but when provides more than one package the LICENSE variable per package (i.e. linux-firmware) needs to take into account to avoid unnecesary copy of licenses into packages. The patch validates if LICENSE exists in package LICENSES in order to don't copy unneeded licenses. As result of this patch some packages will not contain licenses there are not into LICENSE variable. For example: acl contains GPLv2+ instead of GPLv2+ and LGPLv2.1+ libacl contains LGPLv2+ instead of GPLv2+ and LGPLv2.1+ This behaviour is declared on the acl recipe as: SUMMARY = "Utilities for managing POSIX Access Control Lists" HOMEPAGE = "http://savannah.nongnu.org/projects/acl/" SECTION = "libs" LICENSE = "LGPLv2.1+ & GPLv2+" LICENSE_${PN} = "GPLv2+" LICENSE_lib${BPN} = "LGPLv2.1+" [YOCTO #10325] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01license.bbclass: Don't copy again LICENSE already handled as no-genericAníbal Limón
The NO_GENERIC_LICENSE mapping was added [1] to enable copy LICENSES from upstream source code into recipe licenses, previously that only common-licenses was processed. This result on copy twice the NO_GENERIC_LICENSE specified because there is a mapping between license in LIC_CHKSUM and NO_GENERIC_LICENSE. In order to avoid double copy one as generic_ and other as LICENSE. keep track of licenses already copied. For linux-firmware the result will be only generic_ licenses into common-licenses. [YOCTO #10325] [1] http://lists.openembedded.org/pipermail/openembedded-core/2015-April/104222.html Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-28kernel, license, sstate, rootfs.py: Remove deploy directory READMEMike Crowe
It isn't clear that the README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file in the deploy directory warrants the complexity it brings elsewhere. Let's just remove it entirely. In particular, if two do_image_complete tasks run in parallel they risk both trying to put their image into ${DEPLOY_DIR_IMAGE} at the same time. Both will contain a README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file. In theory this should be safe because "cp -alf" will just cause one to overwrite the other. Unfortunately, coreutils cp also has a race[1] which means that if one copy creates the file at just the wrong point the other will fail with: cp: cannot create hard link ‘..../tmp-glibc/deploy/images/pantera/README_-_DO_NOT_DELETE_FILES_IN_THIS_D.txt’ to +‘..../tmp-glibc/work/rage_against-oe-linux-gnueabi/my-own-image/1.0-r0/deploy-my-own-image-complete/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt’: File exists [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25680 Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-15classes/license: Respect beginline and endlineJoshua Watt
Recipes have the option of specifying a 'beginline' and 'endline' options in LIC_FILES_CHKSUM which will cause the license bbclass to only extract those specific lines from the license file when generating the license database. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-06meta/scripts: Various getVar/getVarFlag expansion parameter fixesRichard Purdie
There were a few straggling expansion parameter removals left for getVar/getVarFlag where the odd whitespace meant they were missed on previous passes. There were also some plain broken ussages such as: d.getVar('ALTERNATIVE_TARGET', old_name, True) path = d.getVar('PATH', d, True) d.getVar('IMAGE_ROOTFS', 'True') which I've corrected (they happend to work by luck). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVarFlag callsJoshua Lock
getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16meta: remove True option to getVar callsJoshua Lock
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\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-06classes/license: copy licenses even if there are no checksummed filesRoss Burton
Previously do_populate_lic would bail writing the license files (such as the MIT license text) to deploy/licenses/${PN}/ if there were no files listed in LIC_FILES_CHKSUM. In general this isn't a problem since LIC_FILES_CHKSUM was effectively a required field, and for packages which don't have traditional content was generally set to a separate license such as ${COREBASE}/meta/COPYING.MIT. However LIC_FILES_CHKSUM is now only required if there are sources in SRC_URI, so oe-core b18fa5f removed these now redundant values. The unexpected side effect of this is that that recipes that generate their content (such as os-release) or are otherwise "interesting" (such as perf) don't have their license files copied over, resulting in warnings from do_rootfs. Resolve this by not returning early if LIC_FILES_CHKSUM is empty, and always copy the references license files. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-06classes/license: fix handling of symlinks pointed to in LIC_FILES_CHKSUMPaul Eggleton
If you set LIC_FILES_CHKSUM to point to a relative symlink then you'll get "Could not copy license file" warnings in copy_license_files() since the symlink won't be valid after it's copied. If the source is a symlink then we need to dereference it first. I encountered this when I used recipetool on the sources for capnproto, where the c++ directory contains a LICENSE.txt symlink to the LICENSE file in the parent directory, and this symlink ends up being pointed to in LIC_FILES_CHKSUM. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-03license.bbclass: Use bb.fatal() instead of raising FuncFailedUlf Magnusson
This sets a good example and avoids unnecessarily contributing to perceived complexity and cargo culting. Motivating quote below: < kergoth> the *original* intent was for the function/task to error via whatever appropriate means, bb.fatal, whatever, and funcfailed was what you'd catch if you were calling exec_func/exec_task. that is, it's what those functions raise, not what metadata functions should be raising < kergoth> it didn't end up being used that way < kergoth> but there's really never a reason to raise it yourself FuncFailed.__init__ takes a 'name' argument rather than a 'msg' argument, which also shows that the original purpose got lost. Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-25license.bbclass: do not process LICENSE_pn variablesMarkus Lehtonen
The loop iterating over LICENSE_pn variables has never worked. In addition, the LICENSE variable is supposed to contain all licenses defined in LICENSE_pn variables. Thus, it is simpler just to use LICENSE as the data we get is essentially the same. [YOCTO #9499] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-10license: improve handling of license files with identical basenamesMarkus Lehtonen
Previously, find_license_files() in license.bbclass just blindly assumed that all different licenses specified in LIC_FILES_CHKSUM have unique filenames. As a consequence, only the last one of these similarly named license files was copied and the rest were "lost". This patch changes the behavior so that all license files get copied. However, if multiple identically named files are found, they are renamed to <file>.0, <file>.1 etc. The patch also changes the handling of NO_GENERIC_LICENSE slightly. Previously, only basenames of NO_GENERIC_LICENSE and LIC_FILES_CHKSUM were compared when searching for the correct license file. After this patch NO_GENERIC_LICENSE must have the full path, matching what is specified in LIC_FILES_CHKSUM. This is required in order to be able to handle identical filenames (basenames) consistently. For example, if you have: LICENSE = "my-custom-license" LIC_FILES_CHKSUM = "file://src/LICENCE;md5=d41d8cd98f00b204e9800998ecf8427e" you must specify: NO_GENERIC_LICENSE[my-custom-license] = "src/LICENCE" [YOCTO #9663] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2016-07-20classes/license.bbclass: don't set [dirs] and [cleandirs]Ross Burton
There's no need to set these as the restore from sstate will create the directories as required. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-15classes/license: handle EXDEV if hard link to license failsManuel Huber
Hard links can still fail even if st_dev is the same for source and destination. In case of EXDEV error, fall back to copying. Signed-off-by: Manuel Huber <manuel.h87@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-02classes/lib: Update to explictly create lists where neededRichard Purdie
Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to match python3 iter requirementsRichard Purdie
python3 standardises its use of iteration operations. Update the code to match the for python3 requires. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-22license.bbclass: make sure that image manifest dir existsMarkus Lehtonen
Previously, write_deploy_manifest() was relying on write_package_manifest() to create the subdirectory for the manifest file. However, do_rootfs may be an empty function so that write_package_manifest() will not be called and the manifest subdirectory will not be created, causing a build failure. This patch fixes that by creating the directory hierarchy inside write_deploy_manifest(). [YOCTO #9446] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-04-19license.bbclass: do write_deploy_manifest in image postprocessingMarkus Lehtonen
Call write_deploy_manifest() in image postprocessing phase, instead of rootfs postprocessing. The reason being that not necessarily all do_deploy tasks are dependencies of the do_rootfs and we might miss something. [YOCTO #9446] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05license.bbclass: fix warnings when run in unprivileged "container" envBjørn Forsman
An unprivileged "container" environment like this[1] doesn't have root account (uid 0) which causes tons of "Invalid argument" warnings: $ bitbake ... ... WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]' WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]' WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]' ... Fix it by handling EINVAL similar to existing handling of EPERM (which was added for when not running under pseudo). [1]: The real environemnt is buildFHSUserEnv from NixOS/nixpkgs, but a demonstration of the issue can be done like this: $ touch f $ unshare --user --mount chown 0:0 f chown: changing ownership of ‘f’: Invalid argument Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09license.bbclass: fix host contamination warnings for license filesJagadeesh Krishnanjanappa
We get below host contamination warnings of license files for each recipe, when we try to create a separate ${PN}-lic package (which contains license files), by setting LICENSE_CREATE_PACKAGE equal to "1" in local.conf. -- snip -- WARNING: QA Issue: libcgroup: /libcgroup-lic/usr/share/licenses/libcgroup/generic_LGPLv2.1 is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] WARNING: QA Issue: attr: /attr-lic/usr/share/licenses/attr/libattr.c is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] WARNING: QA Issue: bash: /bash-lic/usr/share/licenses/bash/COPYING is owned by uid 5001, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] -- CUT -- Since the license files from source and OE-core, are populated in a normal shell environment rather in pseudo environment (fakeroot); the ownership of these files will be same as host user running bitbake. During the do_package task (which runs in pseudo environment (fakeroot)), os.link preserves the ownership of these license files as host user instead of root user. This causes license files to have UID same as host user id and resulting in above warnings during do_package_qa task. Changing ownership of license files to root user (which has UID and GID as 0) under pseudo environment will solve above warnings, and on exiting pseudo environment the license files will continue to be owned by host user. Perform this manipulation within try/except statements, as tasks which are not exected under pseudo (such as do_populate_lic) result in OSError when trying to change ownership of license files. Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04license.bbclass: add LICENSE_CREATE_PACKAGE to perform_packagecopy vardepsRoss Burton
This class has a perform_packagecopy_prepend() that uses LICENSE_CREATE_PACKAGE, but the BitBake variable dependency code doesn't know that oe.data.typed_value() is a getter. Until BitBake knows this, add an explicit vardeps. [ YOCTO #5635 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-04classes/lib: Add expand parameter to getVarFlagRichard Purdie
This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, True):g' -i `grep -ril getVar *` In this case, the default was False, but True was used since in most cases here expansion would be expected. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20lib/oe/rootfs: Use list_pkgs() instead of list()Mariano Lopez
This patch changes the use list_pkgs() instead of list() from class RpmPkgsList. The change is in two functions, image_list_installed_packages from rootfs.py and sdk_list_installed_packages from sdk.py. With this change the functions calling the functions listed above, must format the output as they required. The formatting can be done using format_pkg_list() from oe.utils. The classes calling the afected functions are changed too with this patch, to keep the same functionality using the new data structure. [YOCTO #7427] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-17license.bbclass: fix license manifestJackie Huang
The license manifest is wrong when there is no spaces before and after separates |&() and we can get warning like: WARNING: The license listed Artistic-1.0GPLv1+ was not in the licenses collected for recipe Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-16license: Fix BB_TASKDEPDATA referencesRichard Purdie
We shouldn't try and expand what is a python dict object and we don't want it to influence the task hashes, task dependencies are already accounted for. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01license.bbclass: Create image license manifestMariano Lopez
This change adds the license_deployed_manifest function that will create the manifest for the packages deployed next to the image but not installed in rootfs. Some examples of these recipes would be the bootloaders, or the kernel. This new function was added to ROOTFS_POSTPROCESS_COMMAND so it will run after every rootfs task. This change also modify the write_license_files because the image manifest is different from the root manifest. [YOCTO #6772] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-01license.bbclass: Add function get_deployed_filesMariano Lopez
This function will get the files that were deployed using the sstate-control manifest file. This will give a better view of what was deployed next to the image. [YOCTO #6772] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-12-01license.bbclass: Added function get_deployed_dependenciesMariano Lopez
This change introduce a new function to get the dependencies that were deployed. It uses BB_TASKDEPDATAto get all the dependencies of the current task, so it is possible to get different packages depending at what point this function is called. [YOCTO #6772] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-12-01license.bbclass: Added get_boot_dependencies functionMariano Lopez
This function gets the dependencies from the classes that create a boot image, this is required because sometimes the bootloader dependecy is in these classes. The current classes covered are bootimg and bootdirectdisk because these are the only clases that add dependencies. [YOCTO #6772] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-12-01license.bbclass: Split license create manifestMariano Lopez
This changes moves the writing of the licenses to a separated function that could be called for other packages. With these change it will be easier to reuse the writing of the license for the packages deployed but not installed in the rootfs. [YOCTO #6772] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-12-01license.bbclass: Write recipeinfo file in license folderMariano Lopez
Currently there is no way to get the recipe version when creating the rootfs. It is needed because the manifest file for the image has to contain this important piece of information. This change writes a new file in the license folder for every recipe. This file is called "recipeinfo" and have the information used to write the manifest file for the recipes deployed next to the image. [YOCTO #6772] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-11-24classes/license: fix intermittent license collection warningPaul Eggleton
Fixes the following warning sometimes appearing during image builds: WARNING: The license listed ABC was not in the licenses collected for recipe xyz The files being looked for here, which runs during do_rootfs, are written out by the do_populate_lic task for each recipe. However, there was no explicit dependency between do_rootfs and all of the do_populate_lic tasks to ensure they had run - only an implicit link via do_build, so it is possible that sometimes they had not depending on how the tasks were scheduled. Add an explicit set of dependencies to fix this. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-29Empty image: package list splitting and iterationAlex Franco
A few short fixes to splitting/iteration done over package lists in license.bbclass, package_manager.py and rootfs.py. [YOCTO #7664] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-31license_class: Fix choose_lic_set into incompatible licenseAníbal Limón
Use canonical_license when doing evaluation of license expresion since INCOMPATIBLE_LICENSE are already canonized. [YOCTO #8080] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-21license_class: Add explicity avoid of CLOSED license in validationsAníbal Limón
The CLOSED license isn't a generic license it is a set and can be any closed source license. [YOCTO #7752] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-09license_class: license_create_manifest improvmentAníbal Limón
Use image_list_installed_packges instead of open manually the package manifest and iterate over it. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-09license: Add support for handle INCOMPATIBLE_LICENSE in manifest creationAníbal Limón
When INCOMPATIBLE_LICENSE's is specified it need to be removed from license.manifest and also avoid copy to target image. Add ManifestVisitor that walk the license string searching for INCOMPATIBLE_LICENSE's if found remove it. [YOCTO #6765] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-09license_class: Generalize license_ok functionAníbal Limón
Add dont_want_licenses as parameter to license_ok function and move it to oe.license module in order to use in other modules. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-09license_class: Reimplemented manifest creation in pythonAníbal Limón
Reimplemented license_manifest_create from shell to python for INCOMPATIBLE_LICENSE handle using oe.license module. Optimizations are made to avoid license copy now uses a hardlink and symbolic link this helps to save space during build. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-30license.bbclass: allow copying license not in common licensesJackie Huang
Some package like linux-firmware has many licenses that aren't in any way common, and new ones will be added from time to time, in order to avoid adding bunch of such common license files that are only applicable to a specific package, NO_GENERIC_LICENSE is added to allow copying license not in common licenses, it should be used in the recipe as: NO_GENERIC_LICENSE[<license_name>] = "<license file in fetched source>" e.g. NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENCE.Abilis.txt" Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
2015-03-21license.bbclass: skip license checking if the package contains no fileChen Qi
If the package doesn't contain any file, then the license isn't relevant as far as the final image is concerned. So we skip the license checking in license_create_manifest if such case. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16license.bbclass: set dirs for do_populate_lic_setsceneRobert Yang
Fixed: ERROR: Build of do_populate_lic failed ERROR: Traceback (most recent call last): File "bitbake/lib/bb/build.py", line 497, in exec_task return _exec_task(fn, task, d, quieterr) File "bitbake/lib/bb/build.py", line 437, in _exec_task exec_func(func, localdata) File "bitbake/lib/bb/build.py", line 212, in exec_func exec_func_python(func, d, runfile, cwd=adir) File "/home/nxadm/nx/ala-blade44.1/builds-2015-03-09-163005/qemuppc_world_oe_bp/bitbake/lib/bb/build.py", line 237, in exec_func_python os.chdir(cwd) OSError: [Errno 2] No such file or directory: 'bitbake_build/tmp/work/ppc7400-wrs-linux/taglib/1.9.1-r0/build' When running setscene, the cwd is $B which maybe removed by autotools.bbclass or cmake.bbclass when rebuild. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-17license.bbclass: fix unexpected operator for LICENSE values with spaceMartin Jansa
* add quotes around pkged_lic so that it works correctly with spaces * fixes following error: run.license_create_manifest.50601: 193: [: GPLv2: unexpected operator Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14oe-pkgdata-util: improve command-line usagePaul Eggleton
* Use argparse instead of optparse for standardised help output, options and a much cleaner code structure * Look up pkgdata directory automatically so the user doesn't have to specify it * Use standard logging NOTE: this does mean a slight change in syntax - if you do want to specify the pkgdata directory (usually only necessary if you're calling it from within the build process) you need to use the parameter -p (or --pkgdata-dir) and specify this before the command, not after it. Examples: oe-pkgdata-util find-path /sbin/mke2fs oe-pkgdata-util lookup-recipe libelf1 oe-pkgdata-util read-value PKGSIZE libc6 oe-pkgdata-util -p /home/user/oe/build/tmp/sysroots/qemux86-64/pkgdata read-value PKGSIZE libc6 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>