summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2020-10-13classes/waf: Add build and install argumentsJoshua Watt
Adds variables that can be used to allow a recipe to pass extra arguments to `waf build` and `waf install`. In most cases, you want to pass the same arguments to `build` and `install` (since install is a superset of `build`), so by default setting EXTRA_OEWAF_BUILD also affects `waf install`, but this can be overridded. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-10base.bbclass: warn when there is trailing slash in S or B variablesMartin Jansa
* to make sure we won't hit such corner cases in future add a warning to prevent trailing slashes and duplicated slashes even when they in most cases don't cause harm * only a few cases were found in layers included in my world builds: oe-core: 1 meta-oe: 7 meta-python2: 1 meta-qt5: 1 meta-aws: 1 will send patches for these once this warning is approved for oe-core Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-10base.bbclass: use os.path.normpath instead of just comparing WORKDIR and S ↵Martin Jansa
as strings * cannot use os.path.samefile, because S/B might not exist at this time yet * there is issue with PSEUDO_IGNORE_PATHS when some recipe sets e.g. S = "${WORKDIR}/" whole WORKDIR gets added to PSEUDO_IGNORE_PATHS and then the build can fail with various strange errors, in my case do_package was failing when do_package calls: fix_perms(.../1.0-r0/package/etc, 755, 0, 0, /etc) and fails with "[Errno 1] Operation not permitted:" Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-09abi_version,sanity: Tell users TMPDIR must be clean after pseudo changesRichard Purdie
After the recent path ignore changes, there are invalid entries in exiting pseudo databases which will trip up users with the new abort() (proving how common the pseudo potential corrpution is!). Inform them a clean TMPDIR is needed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-08devtool: fix modify with patches in override directoriesRoss Burton
If a recipe applies patches which are in machine-specific override directories, devtool will fail to fetch the patches that don't match the default configuration. For example where there are patches at qemux86/x86.patch and qemuarm/arm.patch: SRC_URI = "file://source" SRC_URI_append_qemuarm = " file://arm.patch" SRC_URI_append_qemux86 = " file://x86.patch" The patch apply phase sets OVERRIDES but does not set FILESOVERRIDES, so it cannot find the patch files as the search path isn't correct. Fix this by setting FILESOVERRIDES too. Also when iterating through the overrides we need to be sure that other overrides that are used are not enabled, so extend no_overrides instead of simply appending the current override. Fixes most but not all of [ YOCTO #14060 ]. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07wic: Handle new PSEUDO_IGNORE_PATHS variableRichard Purdie
Adjust wic to correctly handle the new PSEUDO_IGNORE_PATH variable and avoid inode corruption issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07base/bitbake.conf: Enable pseudo path filteringRichard Purdie
This is a pretty big change to the way pseudo operates when used in OpenEmbedded. Normally, pseudo monitors and logs (adds to its database) any file created or modified whilst in a fakeroot environment. There are large numbers of files we simply don't care about the permissions of whilst in that fakeroot context, for example ${S}, ${B}, ${T}, ${SSTATE_DIR}, the central sstate control directories, This change uses new functionality in pseudo to ignore these directory trees, resulting in a cleaner database with less chance of "stray" mismatches if files are modified outside pseudo context. It also should reduce some overhead from pseudo as the interprocess round trip to the server is avoided. There is a possible complication where some existing recipe may break, for example, we found a recipe which was writing to "${B}/install" for "make install" in do_install and since we listed ${B} as not to be tracked, there were errors trying to chown root for files in this location. This patch fixes a few corner cases in OE-Core when used with this new ignore list: * The archiver directory matched a "${WORKDIR}/deploy*" pattern so was renamed to something else since that directory does need its root permissions * The ${S} and ${B} ignoring is conditional on them being different to ${WORKDIR} * package_write_* task output (the debs/rpms/ipks) are now owned by the build user so we don't want the file ownership information in the hashequiv outhash calculation even if they are built under pseudo. * The fontcache postinstall intercept is run under qemu outside of pseudo context so delete files it may delete up front where pseudo can see this. * SSTATE_DIR is in PSEUDO_PATHS_IGNORE, which is in FAKEROOTENV which is cached by bitbake. We therefore need to trigger reparsing if this changes, which means SSTATE_DIR can be in BB_HASHBASE_WHITELIST but not BB_HASHCONFIG_WHITELIST. Rework the variables to handle this. This otherwise breaks some of our sstate tests in oe-selftest. * Ignore the temp directory wic uses for rebuilding rootfs. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07classes/sanity: Bump minimum python version to 3.5Joshua Watt
Bumps the minimum python version to 3.5 to match bitbake and the test matrix Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-06kernel-fitimage: generate openssl RSA keys for signing fitimageUsama Arif
The keys are only generated if they dont exist. The key generation can be turned off by setting FIT_GENERATE_KEYS to "0". The default key length for private keys is 2048 and the default format for public key certificate is x.509. Signed-off-by: Usama Arif <usama.arif@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30populate_sdk_ext.bbclass: add ESDK_MANIFEST_EXCLUDESChen Qi
Add ESDK_MANIFEST_EXCLUDES to enable excluding items in sdk-conf-manifest. By default, files under conf/ are all added to sdk-conf-manifest, as the manifest file is set to 'conf/*'. However, there are situations where some configuration files under conf/ directory are not intended to be added to sdk-conf-manifest, thus adding ESDK_MANIFEST_EXCLUDES to enable users to do this. This variable takes the form of glob matching. e.g. ESDK_MANIFEST_EXCLUDES = "conf/autogen*" This would exclude all files under conf/ starting with 'autogen' from sdk-conf-manifest. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30cve-check: add CVE_CHECK_REPORT_PATCHED variable to suppress reporting of ↵Chris Laplante
patched CVEs Default behavior is not changed. To suppress patched CVEs, set: CVE_CHECK_REPORT_PATCHED = "" Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30cve-check: introduce CVE_CHECK_RECIPE_FILE variable to allow changing of ↵Chris Laplante
per-recipe check file The addition of this variable also makes it possible to change the output suffix of the check files, e.g. in local.conf: CVE_CHECK_MANIFEST_append = ".txt" CVE_CHECK_RECIPE_FILE_append = ".txt" Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30testimage: Add testimage_dump_target to kwargsSaul Wold
This passes the list of commands to run on the OEQemuTarget when the TargetDumper needs to run in a test context due to a failure on the target. This is added here as a kwargs because the 'd' dictionary is not available in the staticmethod getTarget in the OERuntimeTestContextExecutor class. The OEQemuTarget is different from the QemuTarget which already uses the list of commands from testimage_dump_target from 'd'. The create_dir() is needed to initialize the TargetDumper's dump_dir variable. Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30Space-comma CleanupsJon Mason
Multiple files have " ," instead of ", " in expressions. This changes them to conform to the way the rest of them are done. Found and corrected via: git ls-files | xargs sed --follow-symlinks -i 's/ ,d/, d/g' Signed-off-by: Jon Mason <jon.mason@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30sstate: set mode explicitly when creating directories in sstate-cacheRoss Burton
When creating directories in the sstate-cache, explicitly set the mode passed to mkdir to 0775 so that the directories are group writable, as otherwise they cannot be shared with other users. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30staging: Ensure cleaned dependencies are addedRichard Purdie
Most recipe-sysroot dependencies are handled by these prefuncs. "configure" is special with a decidated task, prepare_recipe_sysroot which runs beforehand. do_prepare_recipe_sysroot does not have to be run before/after fetch/unpack/patch, they're independent tasks. If fetch/unpack/patch have sysroot dependencies and those tasks rerun, stale items from the sysroot could be uninstalled and since prepare_recipe_sysroot doesn't re-run, they could be missing by the time configure runs. Fix this by adding the prefunc for do_configure which would ensure the sysroot is in a good state. This issue can be reproduced by modifying do_unpack and watching binutils-native and vulkan-headers failing due to missing makeinfo or ninja. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-28go-mod.bbclass: use append to add `modcacherw`Peter A. Bigot
This class provided default build flags but includes the base go class which also provides default flags. Use a different mechanism to extend the default flags without discarding `-trimpath` from the base class. Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-28kernel.bbclass: ensure symlink_kernsrc task gets run even with externalsrcRasmus Villemoes
Commit c5dfc2586b41 (kernel.bbclass: run do_symlink_kernsrc before do_patch) fixed a race between do_symlink_kernsrc and do_populate_lic. However, I missed the fact that when externalsrc.bbclass is in use, the do_patch task doesn't exist, meaning that do_symlink_kernsrc now doesn't get run at all, breaking the build. We need this task to run regardless of whether do_patch exists or not, so reinstate the configure->symlink_kernsrc dependency explicitly. Fixes: c5dfc2586b41 (kernel.bbclass: run do_symlink_kernsrc before do_patch) Reported-by: Chanho Park <parkch98@gmail.com> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-28sstate.bbclass: Check file ownership before doing 'touch -a'Norman Stetter
In contrast to 'touching' a file without parameters 'touch -a' can only be performed by the file owner. In case of a shared sstate-cache served locally (e.g. over NFS), where the user running bitbake is not the owner of sstate-cache files, even if he has write access on group level, the sstate_unpack_package task will fail. Checking if the file is owned by the user before attempting to run 'touch -a' on it solves this. Signed-off-by: Norman Stetter <norman.stetter@garz-fricke.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-25kernel-yocto: add KBUILD_DEFCONFIG search location to failure messageBruce Ashfield
It was pointed out that since the check for the existence of KBUILD_DEFCONFIG knows where it is looking, that should be part of the error/log message. We only look in one location for the defconfigs, so add where we checked to the message. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-24qemuboot: Add QB_RNG variableKhem Raj
RNG passthru has been enabled on all qemu machines but its being added to each one of them, with this patch its turned into QB variables which defaults to host passthru, yet it can be overridden if needed via machine or config metadata if needed. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-21testexport: rename create_tarball methodKonrad Weihmann
as otherwise when using it in combination with archiver.bbclass we would have 2 methods of the same name but with different signatures leading to various hard to understand exceptions Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-20image-artifact-names: make variables overridableJens Rehsack
Since the newly introduced image-artifact-names class is inherited at later processing stage, individual IMAGE_NAME settings are overridden (hopefully by accident instead on purpose). Allow derived distributions define their own name schema by setting defaults iwth question mark. Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-16kernel.bbclass: use camelCase notation for bash variables in do_deployMartin Jansa
* to match other variables there like deployDir imageType [YOCTO #12937] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-16kernel.bbclass: eliminate (initramfs_)symlink_name variablesMartin Jansa
* they are used only once, we can use the value directly * notice that .bin extension isn't part of the variable values [YOCTO #12937] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-16kernel.bbclass: use bash variables like imageType, base_name without {}Martin Jansa
* just to make sure it looks like bash variable not bitbake variable in run.do_* scripts [YOCTO #12937] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-16image-artifact-names: introduce new bbclass and move some variables into itMartin Jansa
* similar to kernel-artifact-names for other recipes/bbclasses which need to use some deployed artifacts * bitbake.conf: move IMAGE_BASENAME, IMAGE_VERSION_SUFFIX, IMAGE_NAME, IMAGE_LINK_NAME variables * image_types.bbclass: move IMAGE_NAME_SUFFIX variable * currently IMAGE_NAME_SUFFIX is used only by image.bbclass, image_types.bbclass and meta/recipes-core/images/build-appliance-image_15.0.0.bb but if it's needed by some recipe which isn't itself an image, then it's useful in bitbake.conf, e.g. we have a recipe for creating VirtualBox appliances which combines .wic.vmdk with .ovf file to create .zip with appliance, but for that we need the filename of .wic.vmdk which now contains IMAGE_NAME_SUFFIX https://github.com/webOS-ports/meta-webos-ports/blob/4980ce52a43ac6897657602810313af359f0b839/meta-luneos/recipes-core/images/luneos-emulator-appliance.inc#L24 * we were hardcoding .rootfs suffix where needed, but for quite long time it's configurable with IMAGE_NAME_SUFFIX since: commit 380ee36811939d947024bf78de907e3c071b834f Author: Patrick Ohly <patrick.ohly@intel.com> Date: Mon Mar 7 18:07:52 2016 +0100 image creation: allow overriding .rootfs suffix and might not match with hardcoded .rootfs, so make it easier to use IMAGE_NAME_SUFFIX where needed even without inheritting whole image_types.bbclass [YOCTO #12937] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-15insane: check for missing update-alternatives inheritAndrey Zhizhikin
Add a package QA check to test if the recipe sets ALTERNATIVE variable for any of its packages, and does not inherit update-alternatives class. This causes the do_rootfs to fail since a proper alternative cannot be created. Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-14wic/bootimg-efi: IMAGE_EFI_BOOT_FILES variable added to separate bootimg-efi ↵Khairul Rohaizzat Jamaluddin
and bootimg-partition Due to recent changes in bootimg-efi to include IMAGE_BOOT_FILES, when both bootimg-partition and bootimg-efi occur in a single .wks and IMAGE_BOOT_FILES are defined, files listed in IMAGE_BOOT_FILES will be duplicated in both partition. Since IMAGE_BOOT_FILES are crucial for bootimg-partition, but optional for bootimg-efi, hence allowing bootimg-efi to have the option to ignore it. The new variable, IMAGE_EFI_BOOT_FILES, was added to help handle this issue. Its basic usage is the same as IMAGE_BOOT_FILES. Usage example: ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.img \ This commit is also squashed with the updated testcase to cover for this change. [YOCTO #14011] Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-13populate_sdk_ext: Do not assume local.conf will always existKhem Raj
Some distros may not have local.conf, and use auto.conf or site.conf alone to describe distro config metadata, therefore make code robust to not fail eSDK builds for such setups Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-11cve-update-db-native: use fetch taskRoss Burton
Instead of inventing a new task to fetch the CVE data, use the existing fetch task. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-11license_image.bbclass: Fix symlink to the image license manifest dir creationDiego Sueiro
If IMAGE_LINK_NAME is empty don't try to create the symlink. [YOCTO #14042] Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-11linuxloader.bbclass: Define riscv32 ldso for muslKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-09cve-check: avoid FileNotFoundError if no do_cve_check task has runChris Laplante
For example, if you just run 'bitbake cve-update-db-native' in a clean build system, |cve_tmp_file| won't exist yet. Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-09cve-check/cve-update-db-native: use lockfile to fix usage under multiconfigChris Laplante
Previously CVE_CHECK_DB_FILE / CVE_CHECK_DB_DIR was the same across multiconfigs which led to a race condition wherein multiple cve-update-db-native:do_populate_cve_db tasks could attempt to write to the same sqlite database. This led to the following task failure: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_populate_cve_db(d) 0003: File: '/mnt/data/agent/work/74f119cccb44f133/yocto/sources/poky/meta/recipes-core/meta/cve-update-db-native.bb', lineno: 103, function: do_populate_cve_db 0099: if year == date.today().year: 0100: cve_f.write('CVE database update : %s\n\n' % date.today()) 0101: 0102: cve_f.close() *** 0103: conn.commit() 0104: conn.close() 0105:} 0106: 0107:def initialize_db(c): Exception: sqlite3.OperationalError: disk I/O error Use a lockfile to ensure multiple tasks don't step over each other. Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-08image.bbclass: fix REPRODUCIBLE_TIMESTAMP_ROOTFS referenceMatt Madison
Commit 97b439469a45a089431ca9c31893288c855045f4 added a fallback mechanism for getting the rootfs timestamp. However, it uses curly braces around the variable name, which causes bitbake resolve the variable reference, rather than the shell, so the git timestamp never gets used. Fix the reference to restore the intent of making it a fallback for when there is no git timestamp to retrieve. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05insane: only load real files as ELFRoss Burton
The file path checks are passed an ELF object if the file is an ELF. It doesn't make a lot of sense to load symlinks to ELFs as if they're in the same package then the real file will be checked too. This should speed up do_package_qa slightly as libraries won't be scanned repeatedly. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-03package.bbclass: hash equivalency and pr serviceMark Hatle
When the PR service is enabled a number of small changes may happen to variables. In the do_package step a call to package_get_auto_pr will end up setting PRAUTO and modifying PKGV (if AUTOINC is there). PRAUTO is then used by EXTENDPRAUTO, which is then used to generate PKGR. Since this behavior typically happens BEFORE the BB_UNIHASH is calculated for do_package, we need a way to defer the expansion until after we have the unihash value. Writing out the pkgdata files w/o AUTOPR and PKGV (AUTOINC) expanded to placeholder values is the easiest way to deal with this. All other variables are expanded as expected. In the next task, typically do_packagedata, we will then use the UNIHASH from the do_package to get the PR (AUTOPR) as well as generate the AUTOINC replacement value (now PRSERV_PV_AUTOINC). The do_packagedata then translates the placeholders to the final values when copying the data from pkgdata to pkgdata-pdata-input. Also update the prservice test case. With unihash, just changing the do_package (via a _append) will not change the PR. So write the date to a specific file that is incorporated into the unihash to ensure it is always different for the test. Various assert messages were also updated to make it easier to figure out where/why a problem occured. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-03kernel-yocto: only replace leading -I in include pathsYanfei Xu
We just want to remove the first '-I' in $d, hence removing the g' of sed avoid changing the real path which is include '-I' We also add an anchor to the regex to only match -I at the start of the path. Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02insane: improve gnu-hash-style warningRoss Burton
Instead of showing a filename under packages-split, show the package name and filename inside the package. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02insane: fix gnu-hash-style checkSumit Garg
Fix gnu-hash-style check that always returned True after commit [1] leading to false positive presence of "GNU_HASH" in objdump output. Fixes: 9ff90bf04a4c ("mips: Enable gnu-hash-style on glibc") [1] Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02license_image.bbclass: Create symlink to the image license manifest dirDiego Sueiro
In the LICENSE_DIRECTORY each time an image recipe is built a new directory is created to hold the image license manifests. By creating a symlink to the most recent created image license manifest directory, we make things easier for users to collect and pack the data. Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28kernel-yocto: checksum all modifications to available kernel fragments ↵Bruce Ashfield
directories This is based on the patch from Zhaolong Zhang <zhangzl2013@126.com> [kernel-yocto: checksum indirect cfg and scc files] While the recommended manner to share/reuse feature fragments is to maintain them in a kernel-meta repository and track the changes via the standard SRCREV fetcher mechanism, that method is not always practical for small sets of features or for quick testing of changes. These other flows use .scc files on the SRC_URI. It has been noted that config fragments or other features indirectly included by those .scc files will not trigger the kernel meta-data to be re-run and hence a build can continue with stale data (or not be triggered at all). To solve this issue, we can collect the directories that are searchable via FILESEXTRAPATHS and add them to the do_kernel_metadata task checksum. This allows modifications, additions and removals from the potential kernel feature directories to trigger a re-execution of the meta data task. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28kernel.bbclass: Move away from calling package_get_auto_prMark Hatle
...instead we call read_subpackage_metadata. Calling package_get_auto_pr *should* result in the same PKGV AUTOINC replacement. However, it will also end up changing PKGR differently then do_package as the BB_TASKHASH used will be for the wrong task. Generally this won't cause any real-world issue, but it could cause problems. Moving to read_subpackage_metadata ensures that the values used in do_package will be read in and used for kernel deployment. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28buildhistory.bbclass: Rework to use read_subpackage_metadataMark Hatle
Using this mechanism ensures that we have a single point to implement the loading of the package and subpackage meta data. This also then allows the buildhistory class to use the regular datastore vs it's own custom arrays for processing history items. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28kernel-yocto: allow promotion of configuration warnings to errorsBruce Ashfield
It was requested to add the ability to upgrade configuration warnings to errors, so that they can't be missed in a build. Add a flag KMETA_AUDIT_WERROR, that when set, triggers a bb.fatal at the end of configuration checking if any warnings are found. This is off by default, but is available for those that want to enable it in their kernel recipe or bbappend. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28package.bbclass: explode the RPROVIDES so we don't think the versions are ↵Ross Burton
provides emit_pkgdata() creates symlinks for each of the RPROVIDES in pkgdata/MACHINE/runtime-rprovides. However this string can contain versions which results in directories called (=2.32), so pass the RPROVIDES string through bb.utils.explode_deps() to strip the versions out. Helps mitigate - but not solve - #13999. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-27image_types_wic: Add ASSUME_PROVIDED to WICVARSVijai Kumar K
Add ASSUME_PROVIDED to WICVARS so that wic can use that when running on bitbake environment. This fixes the below build failure in do_image_wic when --include-path is used in wks file. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26kernel.bbclass: Remove do_install[prefunc] no longer neededMark Hatle
Prior work has refactored the do_install task multiple times, and any references to PKGV and PKGR (even indirect ones) have been removed. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26package_tar.bbclass: Sync to the other package_* classesMark Hatle
Sync up the anonymous python definition with the other package_*.bbclass files. This should make future maintenance easier, even though it has no difference in behavior from what was there. Additional, there was a missing deltask in the nopackages.bbclass related to the package_tar which has been corrected. This could cause problems on native recipes when package_tar was enabled. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>