aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2016-10-03syslinux.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-10-03grub-efi.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-10-03useradd-staticids.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-10-03package_rpm.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-10-03package_deb.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-10-03package_ipk.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-10-03base.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-10-03classes/native: set lt_cv_sys_lib_dlsearch_path_specRoss Burton
This variable is used by libtool to know what paths are on the default loader search path. As we have modified loader paths, native.bbclass can tell libtool that both the sysroot libdir and the host library paths are searched, so no RPATHs for those will be generated. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-03classes/cross: set lt_cv_sys_lib_dlsearch_path_specRoss Burton
This variable is used by libtool to know what paths are on the default loader search path. As we have modified loader paths, cross.bbclass can tell libtool that both the sysroot libdir and the host library paths are searched, so no RPATHs for those will be generated. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-30allarch: Fixes to stop rebuilds when change multilibsRichard Purdie
When changing multilibs, allarch recipes should not be rebuilding. This adds enough variable exclusions to make this work properly. Future regressions will be prevented with new testing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-30nativesdk: Don't enable MULTILIBSRichard Purdie
package_write_rpm references the MULTILIBS variable and the checksums of nativesdk recipes were changing as a result of this. We don't need/want MULTILIBS values for nativesdk so disable this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-30subprocess: remove Popen in favor of check_outputStephano Cetola
This begins moving away from the deprecated subprocess calls in an effort to eventually move to some more global abstraction using the run convenience method provided in python 3.5. [ YOCTO #9342 ] Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-30grub-efi.bbclass: Add a space between root and append parameterRaymond Tan
Add a space between the root and append parameter, similar to syslinux.bbclass, in creating the final grub.cfg. Without this, the final kernel boot parameters will concatenate into strings like root=/dev/ram0console=ttyS0... Signed-off-by: Raymond Tan <raymond.tan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30multilib_header: avoid sstate checksum issues for -nativesdk recipesJoshua Lock
Much as with -native recipes, as addressed in commit b15730caf0d4c40271796887505507f2501958bb, arch specific variables like MIPSPKGSFX_ABI were affecting -nativesdk sstate checksums for recipes like nativesdk-glibc-initial. Disable multilib_header for nativesdk as we don't use multilibs in this scenario. [YOCTO #10320] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30image-buildinfo: restore trailing newlineAndré Draszik
The last line in the generated /etc/build doesn't end with a newline anymore, restore it. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-29cross-canadian/libgcc-common: Fixes for arm multilibRichard Purdie
Arm is unusual in that we force it to "linux-gnueabi" and "linux" doesn't build. This was causing problems for multilib configurations which were assuming "linux" was the default compiler rather than linux-gnueabi. This change does two things, ensures symlinks are generated for linux-gnueabi and also adapts the libgcc code to account for the difference on arm. It still needs to immediately expand/save TARGET_VENDOR but we defer deciding what TARGET_OS should be until we know TARGET_ARCH (which the multilib code may change). [YOCTO #8642] Note that sanity tests of a 32 bit arm multilib still break due to issues with the kernel headers on a mixed bit system. This looks to be a general headers issue for the platform though and a different type of bug. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28qemuboot: don't fail when QB_DEFAULT_KERNEL isn't symlinkMartin Jansa
* in some cases we might set QB_DEFAULT_KERNEL to the real filename instead of symlink and then this whole readlink work around actually breaks the build, because os.readlink fails on normal files: >>> os.readlink('deploy/images/qemux86/bzImage-linux-yocto-qemux86-master-20160927084848.bin') 'bzImage-linux-yocto-qemux86.bin' >>> os.readlink('deploy/images/qemux86/bzImage-linux-yocto-qemux86.bin') Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 22] Invalid argument: '/jenkins/mjansa/build-starfish-master-mcf/BUILD/deploy/images/qemux86/bzImage-linux-yocto-qemux86.bin' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28populate_sdk_base.bbclass: fix broken variablesIoan-Adrian Ratiu
This function never worked because the SDK_OUTPUT and SDKPATH vars are written bash-style in a python function. The only reason it never failed a build is because the function bails out the start because of the flag CHECK_SDK_SYSROOTS. And I guess nobody tested with CHECK_SDK_SYSROOTS enabled until now. Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28image_types.bbclass: remove redundant dependencyEd Bartosh
Removed parted-native dependency from do_image_wic as it's already mentioned in IMAGE_DEPENDS_wic variable. Thanks to Christopher Larson for pointing out to this. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-28SDK: Allow changing SDKMACHINE without wiping TMP folderJuro Bystricky
When changing SDKMACHINE, we may encounter an error forcing us to wipe the TMP folder. Since only SDK_ARCH is captured in the PN of the crosssdk recipes, changes to SDK_OS result in conflicts. Eventually we hit the error: ERROR: ...: The recipe <...> is trying to install files into a shared area when those files already exist. The build has stopped as continuing in this scenario WILL break things This patchset addresses the problem by SDK_SYS as the recipe name suffix instead of SDK_ARCH. [YOCTO #9281] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28archive.bbclass: fix do_ar_original archiving of multiple source reposPatrick Ohly
When a recipe uses more than one source which isn't a plain file (for example, multiple git repos), then do_ar_original created the source archives using the same filename and thus only archived one source. The "name" parameter is used as file suffix to create unique names for each source, leading to archives following this pattern: deploy/${TARGET_SYS}/${PF}/${PF}[-<name>].tar.gz. The ${PF} part is a bit redundant, which may or may not be desirable. The patch is more localized this way (no need to modify create_tarball()). For example, meta-oic's iotivity_1.1.1.bb uses: url_iotivity = "git://github.com/iotivity/iotivity.git" branch_iotivity = "1.1-rel" SRC_URI = "${url_iotivity};destsuffix=${S};branch=${branch_iotivity};protocol=http;" url_tinycbor = "git://github.com/01org/tinycbor.git" SRC_URI += "${url_tinycbor};name=tinycbor;destsuffix=${S}/extlibs/tinycbor/tinycbor;protocol=http" url_hippomocks = "git://github.com/dascandy/hippomocks.git" SRC_URI += "${url_hippomocks};name=hippomocks;destsuffix=${S}/extlibs/hippomocks-master;protocol=http" SRC_URI += "file://hippomocks_mips_patch" url_gtest = "http://pkgs.fedoraproject.org/repo/pkgs/gtest/gtest-1.7.0.zip/2d6ec8ccdf5c46b05ba54a9fd1d130d7/gtest-1.7.0.zip" SRC_URI += "${url_gtest};name=gtest;subdir=${BP}/extlibs/gtest" url_sqlite = "http://www.sqlite.org/2015/sqlite-amalgamation-3081101.zip" SRC_URI += "${url_sqlite};name=sqlite3;subdir=${BP}/extlibs/sqlite3;unpack=false" These now get archived in deploy/sources/*/iotivity-1.1.1-r2/ as: gtest-1.7.0.zip iotivity-1.1.1-r2-recipe.tar.gz sqlite-amalgamation-3081101.zip hippomocks_mips_patch iotivity-1.1.1-r2.tar.gz iotivity-1.1.1-r2-hippomocks.tar.gz iotivity-1.1.1-r2-tinycbor.tar.gz Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28archiver.bbclass: ignore unpack sub-directories in do_ar_originalPatrick Ohly
Support for absolute paths in the "subdir" parameter was recently added (bitbake rev: c3873346c6fa). The git fetcher has supported absolute paths in "destsuffix" already before. When the path is absolute as in destsuffix=${S}/foobar, the tmpdir used by do_ar_original gets ignored, which breaks: - source code archiving (tmpdir is empty) - compilation due to race conditions (for example, ${S} getting modified by do_ar_original while do_compile runs) To solve this, these parameters get removed from URLs before instantiating the fetcher for them. This is done unconditionally also for relative paths, because these paths are not useful when archiving the original source (upstream source does not have them, they only get used by the recipe during compilation). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-27utils: Add all_multilib_tune_list functionRichard Purdie
Its useful to be able to query a list of variables to obtain the values in each multilib context. This adds such a function which works even if called in the non-default recipe context. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-27autotools.bbclass: use python3 instead of python (v2)Markus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23qemu.bbclass: Allow use different QEMU binary depending of targetOtavio Salvador
There are architectures which support running in 32 and 64 bit flavours however the simulation is provided in a specific QEMU setting, requiring us to use a different binary. This patch allow this to be done using, for example: QEMU_TARGET_BINARY_ppce5500 = "qemu-ppc64abi32" Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23scons.bbclass: rework parameters for install taskAndreas Müller
Fixes: * During install all files were recompiled -> redurced build time * For some recipes we found lot of links to build host image path Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23testimage.bbclass: Add package manager dependencyMariano Lopez
The feature to install packages in the target requires to build the package manager. It would fail, with very obtuse errors, if a test requires to install something and the package manager hasn't been build. This will add the package manager as dependency for testimage. [YOCTO #10260] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-23toolchain-scripts-base: add base class for toolchain_create_sdk_versionJoshua Lock
We use toolchain_create_sdk_version() in buildtools-tarball but don't want the extra classes toolchain-scripts pulls in, therefore split out a separate base class for this function which both toolchain-scripts and the buildtools-tarball can inherit. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22base.bbclass: Drop unnecessary dirs settingRichard Purdie
${D} is listed in cleandirs so no need to list it in dirs as well. The default directory is ${B} so this is a cleanup which should have no changes to the execution. [YOCTO #10017] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22autotools/siteinfo: Tweak CONFIG_SITE handling for determism/racesRichard Purdie
As things stand there are multiple races in the CONFIG_SITE handling where checksums can change depending on whether site directories exist or not when parsing happens. This is bad. Secondly, there is a build race that occurs if you build virtuals in parallel with the "main" recipe, since the main recipe is parsed when the virtual is (since it sets variables like BBCLASSEXTEND) and with the current code, it may look for files and directories which could be created/destroyed which the loop is executing. This is also bad. The aclocal-copy directory should only ever be accessed by the call from autotools.bbclass. This changes the parameter name to make it clear and ensures all callers have the right usage, neatly avoiding all the problems above. Also added better comments. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21kernel.bbclass: Add kernel_version_sanity_check functionCalifornia Sullivan
The kernel being built should match what the recipe claims it is building. This function ensures that happens by comparing the version information in the kernel's Makefile to the PV the recipe is using. v2 changes: * Match against PV instead of LINUX_VERSION * Match against EXTRAVERSION as well (e.g., -rc4) * Cleaned up version string building Fixes [YOCTO #6767]. Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21populate_sdk_base: fix support for changing SDKMACHINE settingsJoshua Lock
Include SDKMACHINE in the tasks stamp information and the name of the sstate-inputdirs so that changing SDKMACHINE doesn't result in valid output of the task being deleted when SDKMACHINE is changed. Without this patch changing SDKMACHINE and building an SDK resulted in toolchain installers for other SDKMACHINE's being deleted from the deploy directoy. [YOCTO #10275] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20image_types: add parted-native to do_image_wic dependsEd Bartosh
As parted is always used by wic it makes sense to make do_image_wic dependent on parted-native:do_populate_sysroot. This should help to avoid adding it to all wic image recipes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-20qemuboot.bbclass: don't fail on very first buildAndré Draszik
During the very first build, the DEPLOY_DIR_IMAGE directory might not have been created yet, causing the creation of the qemuboot.conf config file to fail. This is because write_qemuboot_conf() runs at rootfs creation time, i.e. before deploy. So let's create the directory if necessary before trying to write the config file. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20externalsrc.bbclass: Make reparsing work for BBCLASSEXTENDed recipesPeter Kjellerstedt
To make sure changes to any source files are detected when externalsrc is used, it sets BB_DONT_CACHE to force the recipe to be reparsed every time. Previously, this was done conditionally based on whether EXTERNALSRC was set. This worked fine for building the base recipe. But if one tried to build, e.g., a native version of it (provided via BBCLASSEXTEND), the recipe would not be reparsed as expected. To solve the above problem, BB_DONT_CACHE is now set for the base recipe if EXTERNALSRC is set for it or any of it derivatives. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19kernel.bbclass: assign INITRAMFS_BASE_NAME using ?=Andre McCurdy
Default values for KERNEL_IMAGE_BASE_NAME and MODULE_IMAGE_BASE_NAME are already assigned using ?= and anyone wanting to over-ride one is likely to want to over-ride them all. Make the three consistent with each other. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19qemuboot: also write the kernel link name to the conf fileJoshua Lock
This will allow runqemu to fall back to trying the link name when a file matching the full name can't be found. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19qemuboot: write the full kernel filename, not the link nameJoshua Lock
KERNEL_IMAGETYPE gives the filename of a symlink to the kernel, which may not be available i.e. if the user downloads some build artefacts to run on a local machine. It's also possible that the link will point to a newer kernel than was intended for use with the rootfs in the qemuboot.conf. It's much more reliable to read the name of the file KERNEL_IMAGETYPE is linking to and assign the full filename to QB_DEFAULT_KERNEL. [YOCTO #10285] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16sanity.bbclass: split out config re-parse checkMarkus Lehtonen
Split out the functionality doing configuration re-parse check into a separate event handler that is hooked into ConfigParsed event. This will make config re-parsing actually work. Re-parsing in bitbake is triggered by setting BB_INVALIDCONF whose value is checked after configuration has been parsed (after ConfigParsed event). However, previously BB_INVALIDCONF was set in SanityCheck event handler which caused re-parsing never to happen. [YOCTO #10188] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16useradd_base.bbclass: Do not mess with the gshadow file in the sysrootPeter Kjellerstedt
Previously, if the gshadow file did not exist in the sysroot when perform_groupmems() was run, it would be temporarily created and removed again afterwards. This was supposedly due to groupmems failing if it does not exist. However, based on empirical testing and examination of the source code for groupmems, it should not fail if the gshadow file does not exist when groupmems is started. But it WILL fail if the file is removed sometime after its existence has been check at the beginning of the execution, but before it needs to be modified. And this is exactly what the previous code in perform_groupmems() could cause if multiple tasks simultaneously modified users or groups. It could cause any of the useradd, groupadd and groupmems commands to fail as long as at least one other recipe invoked perform_groupmems(). Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16cve-check.bbclass: Add classMariano Lopez
This class adds a new task for all the recipes to use cve-check-tool in order to look for public CVEs affecting the packages generated. It is possible to use this class when building an image, building a recipe, or using the "world" or "universe" cases. In order to use this class it must be inherited and it will add the task automatically to every recipe. [YOCTO #7515] Co-authored by Ross Burton & Mariano Lopez Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-15sanity: make license QA failures fatal againRoss Burton
Previous work to clean up the license QA code (oe-core fbdf977) had the side effect that failing the license sanity check (bad or missing LIC_FILES_CHKSUM) would emit an error message but wouldn't actually abort the build. Solve this by changing populate_lic_qa_checksum() so that it tracks if the message class was in ERROR_QA and if so, aborts the function. [ YOCTO #10280 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15sstate: Add postrm command supportRichard Purdie
There are some issues in sstate which can't be handled by file removal alone. Currently there is no way to execute a command against sstate and doing so is potentially problematic for things like dependencies. This patch adds a mechanism where any "postrm" script is executed if its present allowing some openjade/sgml issues to be resolved. [YOCTO #8273] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15image.bbclass: add IMAGE_DEVICE_TABLE to rootfs[vardeps]Andre McCurdy
IMAGE_DEVICE_TABLE and IMAGE_DEVICE_TABLES are both referenced by _create_devfs, therefore ensure that rootfs is rebuilt if changes are made to either variable. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14classes/populate_sdk_ext: ensure we clean the right temporary TMPDIR pathPaul Eggleton
After we run the build system within the eSDK internally as part of the sstate filtering that happens during do_populate_sdk_ext, we need to ensure that the TMPDIR created during that process gets deleted. However we were using the TMPDIR path for the build producing the eSDK which may not be the same (since that value would typically be filtered out) thus if the user had set TMPDIR to something other than the default, the temporary TMPDIR would not be deleted which not only led to extraneous junk entering the SDK but also failures during install because the TMPDIR path was different. In order to fix this, force TMPDIR to a known value during the sstate filtering run so we know what to delete afterwards. Fixes [YOCTO #10210]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14autotools: Correctly filter m4 files view to setscene dependenciesRichard Purdie
Currently when you run builds from sstate, you can see warnings like: WARNING: systemd-1_230+gitAUTOINC+3a74d4fc90-r0 do_configure: /data/poky-master/tmp-glibc/sstate-control/manifest-intel-corei7-64-glibc-initial.populate_sysroot not found WARNING: systemd-1_230+gitAUTOINC+3a74d4fc90-r0 do_configure: /data/poky-master/tmp-glibc/sstate-control/manifest-intel-corei7-64-libgcc-initial.populate_sysroot not found This is due to co_configure wanting to copy a limited number of m4 macros, only listed in a recipes DEPENDS but that set is still larger than the set of recipes which get restored from sstate. For build determinism and to avoid these warnings, we need to make this function match what the sstate code does. We really don't want to duplicate the functionality since keeping things in sync would be hard so we create a data structure which can be passed into the same underlying function, setscene_depvalid(). [YOCTO #10030] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14kernel-yocto: remove do_shared_workdir from SRCTREECOVEREDTASKSAndré Draszik
Various recipes depend on the kernel's do_shared_workdir task, a quick grep suggests all external kernel modules (via module.bbclass), but also perf, and potentially any additional headers as outlined in linux-libc-headers.inc are affected. Having do_shared_workdir in SRCTREECOVEREDTASKS means this task is removed when externalsrc is enabled, making all those recipes fail as the task they depend on, virtual/kernel:do_shared_workdir, doesn't exist. Remove do_shared_workdir from SRCTREECOVEREDTASKS so that all those recipes work even if externalsrc is activated. According to the comment in here, the reason for do_shared_workdir to be removed as a task is because it modifies the source tree, but that doesn't seem to be case. Signed-off-by: Andre Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14image.bbclass: also mask debugfs versions of masked imagesAndré Draszik
When IMAGE_GEN_DEBUGFS is enabled, and IMAGE_FSTYPES_DEBUGFS is left at its default (as suggested by local.conf.sample.extended), recipe parsing fails: bitbake kern-tools-native # or anything else for that matter ERROR: <poky.git>/meta/recipes-core/images/build-appliance-image_15.0.0.bb: No IMAGE_CMD defined for IMAGE_FSTYPES entry 'debugfs_vmdk' - possibly invalid type name or missing support class ERROR: Failed to parse recipe: <poky.git>/meta/recipes-core/images/build-appliance-image_15.0.0.bb Summary: There was 1 WARNING message shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code. i.e. bitbake doesn't even finish parsing... Since IMAGE_FSTYPES_DEBUGFS is based on IMAGE_FSTYPES, and since the build-appliance-image is setting IMAGE_FSTYPES to vmdk, image.bbclass/image_types.bbclass will be trying to build a debugfs_vmdk, causing the error, as this is not implemented. One solution to solving this problem could be as simple as adding a line IMAGE_FSTYPES_DEBUGFS_remove = "vmdk" to the build-appliance-image recipe, but that is very specific to the error encountered and carries the risk of the error being reintroduced in another recipe. Another solution could be to add 'debugfs_vmdk' to IMAGE_TYPES_MASKED in image-vm.bbclass, but again, this approach doesn't seem generic enough. None of the live and vm type images have an implementation for building a debugfs version, it doesn't seem to make sense to build debugfs versions of any of them anyway, and given IMAGE_TYPES_MASKED appears to be intended for those image types exclusively, it seems the right approach is to unconditionally also mask all debugfs_ flavours from IMAGE_TYPES_MASKED to achieve a generic solution. Do that so. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-14image.bbclass: do not check size of the debugfs imageAndré Draszik
The debugfs is supposed to be used in addition to the normal image for debugging purposes, it doesn't make sense to artificially limit its maximum size. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-14sstate.bbclass: normalize whitelisted pathsMax Krummenacher
Without this a whitelisted path containing /../ breaks the test for a file allowed to be provided by more than one recipe. Noticed when local.conf contains: DEPLOY_DIR = "${TOPDIR}/../deploy" |ERROR: core-image-minimal-1.0-r0 do_image_complete: The recipe | core-image-minimal is trying to install files into a shared area when those | files already exist. Those files and their manifest location are: | .../poky/deploy/images/qemux86/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt | Matched in b'manifest-qemux86-linux-yocto.deploy' Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Ross Burton <ross.burton@intel.com>