summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2019-10-08systemd.bbclass: add RMINITDIR for nativesdk buildsTrevor Gamblin
nativesdk builds such as nativesdk-dnf are installing systemd service files, leading bitbake to throw installed-vs-shipped warnings, but these are not needed in nativesdk: WARNING: nativesdk-dnf-4.2.2-r0 do_package: QA Issue: nativesdk-dnf: Files/directories were installed but not shipped in any package: /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic.timer /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-makecache.timer /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic.service /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-makecache.service /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-notifyonly.timer /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-download.service /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-download.timer /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-notifyonly.service /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-install.timer /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-install.service Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. nativesdk-dnf: 13 installed and not shipped files. [installed-vs-shipped] Rather than have each recipe remove the files, an RMINITDIR case for nativesdk builds should be added to systemd.bbclass. Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-08toolchain-scripts: export READELFRoss Burton
The readelf binary is prefixed, so export READELF in the SDKs so that the correct readelf binary can be used. This fixes problems with the symbol extractor in Meson with multilib SDKs where readelf can't be found correctly. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-08insane: add check for perllocal.podRoss Burton
perlocal.pod is an index file of locally installed modules and so shouldn't be installed by any distribution packages. cpan.bbclass already sets NO_PERLOCAL to stop this file being generated by most Perl recipes, but if a recipe is using MakeMaker directly (such as rrdtool) then they might not be doing this correctly. To avoid multiple packages shipping this file and then failing to install together, add a QA test to check if this file exists and by default emit an error if it does. [ YOCTO #13491 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-07kernel-devicetree.bbclass: add missing backslashMartin Jansa
* in oe-core commit 1860d9d3c62e2e94cd68a809385873ffd8270b6d I've accidentally removed the backshash here Reported-By: "Hilsdorf, Jan (LAWO)" <Jan.Hilsdorf@lawo.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02rootfs-postcommands: Avoid use of an hard-coded valueuninative-2.7Alessio Igor Bogani
Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02base: Improve module import error messageRichard Purdie
Turn: ERROR: Unable to parse Var <OE_IMPORTED[:=]> Traceback (most recent call last): File "Var <OE_IMPORTED[:=]>", line 1, in <module> File "/media/build1/poky/meta/classes/base.bbclass", line 35, in oe_import(d=<bb.data_smart.DataSmart object at 0x7f1d941ad208>): for toimport in oe.data.typed_value("OE_IMPORTS", d): > imported = __import__(toimport) inject(toimport.split(".", 1)[0], imported) File "/media/build1/poky/meta/lib/oe/sstatesig.py", line 267, in <module>: >class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorUniHashMixIn, bb.siggen.SignatureGeneratorBasicHash): name = "OEEquivHash" bb.data_smart.ExpansionError: Failure expanding variable OE_IMPORTED[:=], expression was ${@oe_import(d)} which triggered exception AttributeError: module 'bb.siggen' has no attribute 'SignatureGeneratorUniHashMixIn' into: ERROR: Error importing OE modules: module 'bb.siggen' has no attribute 'SignatureGeneratorUniHashMixIn' which can then trigger a version mismatch error message. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02packagegroup: fix a comment regarding PACKAGE_ARCHAndré Draszik
packagegroups whose dependencies are affected by MACHINE_FEATURES need to be marked as MACHINE_ARCH *before* inheriting the packagegroup class, not after. This has changed in commit 9c826962ec8f ("packagegroup: Make allarch inherit conditional"), commit 4f3f34deafe4 in poky but the comment here wasn't updated at the time. Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02bash-completion: add image featureJoe Slater
Create bash-completion-pkgs image feature to load *-bash-completion packages into an image. The packages are created by the bash-completion bbclass but are currently never loaded. Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02icecc: Don't use icecc when INHIBIT_DEFAULT_DEPS is setDouglas Royds
We don't have a compiler, so no icecc. Silences a spew of warnings of the form: do_configure: Cannot use icecc: could not get ICECC_CC or ICECC_CXX Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02classes/reproducible_build: Create SDE destinationJoshua Watt
Creates the source data epoch file destination directory when restoring from sstate Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27populate_sdk_ext: Fix for hash equivRichard Purdie
Write out the hash equiv cache file into any eSDK so that it doesn't rely on having to call the hash server for the basic data requests. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27kernel.fitimage.bbclass: remove ramdisk_ctypeHeiko Schocher
set in the ramdisk node the compression property always to "none", as U-Boot nowadays since commit: b1307f884a91 ("fit: Support compression for non-kernel components (e.g. FDT)") decompress non kernel components. Setting compression to the used comression algorithm now, will end in fail of your kernel boot with the ramdisk. This issue is fixed since commit: bddd98573465 ("fit: Do not automatically decompress ramdisk images") which now prints a warning in U-Boot, instead of decompressing the ramdisk, but we should setup compression property correct. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27classes/reproducible_build: Move SDE deploy to another directoryJoshua Watt
The deployment of the source date epoch file had a race condition where any task attempting to read from the file would race with creation of the sstate archive for the do_deploy_source_date_epoch task. The creation of the sstate archive requires moving the directory to a temporary location, then moving it back. This means that the file disappears for a short period of time, which will cause a failure if any other task is running and trying to open the file to get the current source date epoch. The solution is to copy the source date epoch file to a separate directory when deploying so the file never disappears. When the file is restored from sstate, it is moved to the correct location after being extracted. [YOCTO #13501] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27classes/image-live.bbclass: Don't hardcode cpio.gzBöszörményi Zoltán via Openembedded-core
There's INITRAMFS_FSTYPES that can be set differently. Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19package: Multiple shlib_providers for the same file should errorJonathan Marler
In the case where multiple packages provide the same file, we show an error. Otherwise, python will generate a different build depending on which provider appears first in the dictionary. On my system this order changes every time I run bitbake causing intermittent build differences. Add a sorted() to fix the determinism issue too. Signed-off-by: Jonathan Marler <johnnymarler@hp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19package_rpm.bbclass: Remove a misleading bb.note()Peter Kjellerstedt
It should have been removed in 3db9d865 (classes/package_rpm.bbclass: Enhance diagnostic messages) when it was split in two new notes. Also change the casing of two other notes to align them with the other notes. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19meson.bbclass: Handle microblaze* mapping to cpu familyNathan Rossi
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19externalsrc: stop rebuilds of 2+ externalsrc recipes sharing the same git repoQuentin Schulz
externalsrc do_configure task watches oe-devtool-tree-sha1 file and its checksum. That file basically contains the result of `git add -A ${EXTERNALSRC} && git write-tree` which is the hash of temporary "commit" of the non committed changes. This file is stored in the .git directory of the git repo of the externalsrc recipe. do_configure then depends on the checksum of oe-devtool-tree-sha1 file. If 2+ recipes with different externalsrc paths but same git repo (e.g. one recipe at /some/path and the other at /some/path/subdir) are parsed, this oe-devtool-tree-sha1 will be overwritten by those recipes at parsing time since .git is shared between those recipes. If there is one non committed git change in /some/path but not in /some/path/subdir, the oe-devtool-tree-sha1 of both recipes will be different. What will happen is that recipe1 will watch over the oe-devtool-tree-sha1 with a specific checksum, fill in file-checksums for do_configure correctly, then recipe2 will watch over the identically named file with different content also fill in the file-checksums varflag. When do_configure of recipe1 will be evaluated for re-execution, oe-devtool-tree-sha1 will be of the value of what is watched over by recipe2, thus triggering a rebuild of recipe1. This behavior is not always reproducible which I'm guessing is due to a small window between recipe1 putting info into oe-devtool-tree-sha1 and calculating the checksum of that file and recipe2 putting its content into oe-devtool-tree-sha1. By appending the name of the recipe to oe-devtool-tree-sha1, we make sure that a recipe won't have its oe-devtool-tree-sha1 overwritten by another recipe sharing the same externalsrc git repo. Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19populate_sdk_ext: Introduce mechanism to keep nativesdk* sstate in esdkJaewon Lee
When doing a devtool build-sdk from within an esdk all nativesdk components would be rebuilt. This patch introduces SDK_INCLUDE_NATIVESDK flag to toggle the inclusion of nativesdk packages when creating the esdk sstate Currently locked-sigs.inc is generated during do_sdk_depends which doesn't pull in nativesdk packages. Generating another locked-sigs.inc in do_populate_sdk_ext and pruning it to only nativesdk* packages by using a modified version of the already existing function prune_locked_sigs and merging it with the current locked-sigs.inc Also adding SDK_INCLUDE_NATIVESDK tasklistfn to the logic surrounding setting tasklist file to not prune esdk sstate during creation [YOCTO #13261] Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19classes/archiver: Fix WORKDIR for shared sourceJoshua Watt
When archiving patched source, WORKDIR should only be changed to ${ARCHIVER_WORKDIR} if the recipe doesn't use a shared work directory. This matches the behavior of do_unpack_and_patch for these recipes. This fixes kernel recipes that set S = "${WORKDIR}/git" Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19rootfs-postcommands: check /etc/gconf exists before working on itRoss Burton
Check that /etc/gconf exists before trying to find files under it, to avoid writing find error messages to the rootfs log. Also use ${sysconfdir}/gconf instead of hardcoding /etc/gconf. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19report-error.bbclass: add local.conf/auto.conf into error reportChangqing Li
sometimes, it is not enough to reproduce a failed build with current info on error reports web, add local.conf/auto.conf into error report to make it more easier to reproduce failed build Note: this need work together with change in repo error-report-web, which will display local.conf and auto.conf as Error Details [YOCTO #13252] Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19live-vm-common.bbclass: provide efi population functions for live imagesDmitry Eremin-Solenikov
Define common functions for populating EFI directories in live image by reusing common code from grub-efi and systemd-boot bbclasses. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19systemd-boot.bbclass: switch to image-uefi.confDmitry Eremin-Solenikov
Use variables from image-uefi.conf instead of hardcoding them in the class. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-19grub-efi.bbclass: switch to image-uefi.confDmitry Eremin-Solenikov
Use variables from image-uefi.conf instead of hardcoding them in the class. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-18Remove SSTATE_HASHEQUIV_SERVERJoshua Watt
Removes all references to the SSTATE_HASHEQUIV_SERVER variable. This variable is redundant now that BB_HASHSERVE is present. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16classextend.py: don't extend file for file dependencyChangqing Li
Fix error like: lib32-e2fsprogs-1.45.3-r0 do_package_qa: QA Issue: /usr/sbin/e2scrub_all contained in package lib32-e2fsprogs-e2scrub requires /bin/bash, but no providers found in RDEPENDS_lib32-e2fsprogs-e2scrub For some lib32 packages(eg: lib32-bash, lib32-sed) which probvides files, extend is not needed Eg: RPROVIDES of lib32-bash expects to have /bin/bash, with original extend, it will become lib32-/bin/bash, then will cause above error Fix by don't extend file dependency, and skip multilib check for file dependency in do_package_qa to avoid error like: WARNING: lib32-bash-5.0-r0 do_package: QA Issue: lib32-bash package lib32-bash - suspicious values '/bin/bash /bin/sh' in RPROVIDES [multilib] Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16nativesdk.bbclass: Clear out LIBCEXTENSION and ABIEXTENSIONKhem Raj
These variables dont make sense for nativesdk targets which essentially are target only properties, this helps in avoiding recompile of nativesdk-libgcc-initial when switch libcs. nativesdk targets are glibc only for OE Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16icecc: blacklist pixmanTim Blechmann
pixman declares prng_state as `omp threadprivate`, causing linker errors: prng_state: TLS reference mismatches non-TLS reference Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16populate_sdk_base.bbclass: nativesdk-glibc-locale is required on musl tooKhem Raj
musl based extensible sdk fails to install ERROR: OE-core's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: Your system needs to support the en_US.UTF-8 locale. The real reason is that its missing locale-archive in buildtools-tarball hence python3 from buildtools-tarball fails to run bitbake when installing esdk Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-11chrpath.bbclass: Add break_hardlinks kwarg to allow breaking hardlinksNathan Rossi
Add the break_hardlinks kwarg to break hardlinks when modifying files. This uses the bb.utils.break_hardlinks function to break hardlinks. The default is to maintain existing behaviour and leave hardlinks in place. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-07python3native, pythonnative: export PYTHON_LIBRARY and PYTHON_INCLUDE_DIRKhem Raj
packages can use find_package(PythonInterp REQUIRED) find_package(PythonLibs REQUIRED) while we control PYTHON pointing to native py3 the libs and include directories will then point to build host version, which can result in unexpected combination and if we are lucky we get errors if its quite different e.g. py2 libs/includes and py3 executable This variable can be then used to export PYTHON_LIBRARY and PYTHON_INCLUDE_DIR so that above find_packages can work correctly see [1] for how it happens in cmake LLDB uses it see [2] [1] https://github.com/Kitware/CMake/blob/master/Modules/FindPythonLibs.cmake [2] https://github.com/llvm/llvm-project/blob/master/lldb/cmake/modules/LLDBConfig.cmake#L226 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06Revert "kernel.bbclass: adjust a condition checking"Jason Wessel
This reverts commit 6676411fccff2d331878e4ca1f9411aafb056a80. This revert restores the original code and adds a comment. The commit that was reverted broke a number of wic templates and tools which rely on the initramfs creation dependency and the case where the INITRAMFS_IMAGE_BUNDLE is not set. If an end user does not want the INITRAMFS_IMAGE generated, it should be set to "". [ Issue: LIN1019-1791 ] Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06autotools: always include config_site.d files in CONFIG_SITEDan Callaghan
Fixes: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13375 Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-06package.bbclass: allow shell-style wildcards in PRIVATE_LIBSAlexander Kanavin
PRIVATE_LIBS is used to exclude 'private' libraries from getting added to automatic runtime dependency resolution. This variable currently has to list all libraries by name, which becomes a maintenance issue if the list of such libraries frequently changes, or is very large. This change allows using shell-style wildcards in the variable, similar to how FILES lists what gets packaged. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-06archiver.bbclass: Do not archive srpm's if there are no package tasksNathan Rossi
Do not attempt to archive recipes which have no packaging tasks (e.g. inherits nopackages). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06Clean up remnants of glibc-initialNathan Rossi
Remove remnants of the glibc-initial recipe. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-01rm_work: Remove redundant 'after' in addtask statementJacob Kroon
Introduced in commit b3de5d5795767a4b8c331fa5040166e7e410eeec. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30image.bbclass: Fix debug output for rootfs sizeDaniel Klauer
The debug output showed the wrong variable. Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-27rootfs-postcommands.bbclass: add inittab tweak to read_only_rootfs_hook()Andre McCurdy
It's not clear that we actually need to call mount -o remount,XX from the busybox-inittab inittab at all, but as we currently do, let's respect read-only-rootfs in IMAGE_FEATURES and not remount / as rw. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-27icecc: blacklist systemtapTim Blechmann
compiling systemtap with icecc causes the following build failure > build/tmp/work/silvermont-64-poky-linux/systemtap/4.0-r0/recipe-sysroot/usr/include/python3.7m/modsupport.h:120:66: note: in definition of macro 'PyModule_AddIntMacro' > HelperSDT/_HelperSDT.c:145:34: error: 'PyTrace_RETURN' undeclared (first use in this function); did you mean 'PyTrace_C_RETURN'? Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21libc-package.bbclass: Split locale hard link processing into two partsJason Wessel
The locale-processing in cross-localedef was proven to be unsafe to run in parallel due to the way it tried to make hard links to files that could disappear before the link operation was completed. To avoid corruption of the pseudo database, and create a deterministically generated link tree, the operation of the locale generation and the hard link resolution have been split into two separate parts. A side effect of this change is that the do_package() rule for glibc-locale will be slightly smaller because some of the hard links were missed in the past, particularly if you had a lot of cpus free to perform the work. Before the patch: % du -sk locale-tree 312524 locale-tree With the patch: % du -sk locale-tree 290772 locale-tree A number of comparisons were performed such as diffing the output, cross checking the link references using tar's listing output, and comparing against the results with out a parallel build to ensure the locale-tree is correct in its final form. [YOCTO #11299] [YOCTO #12434] Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21package: Fix race between do_package and do_packagedataRichard Purdie
do_package has PKGDESTWORK as a cleandir and do_packagedata has it as an sstate-input dir. This means do_package wipes out the directory at both do_package and do_package_setscene. do_package_setscene and do_packagedata_setscene can run in parallel when installing from sstate which means they can wipe out parts of each other leading to interesting build failures. We therefore have to add in a hardlink copy so that the directories can work independently of each other. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-16systemd.bbclass: Limit rm_sysvinit_initddir and rm_systemd_unitdir to target ↵Khem Raj
alone These postfuncs cause native recipes to rebuild when changing system init provider between sysvinit and systemd. Some of these native recipes are pretty early in dependency chain ( e.g. util-linux ) which can casue rebuild of pretty much everything including compiler. Found with bitbake-diffsigs Hash for dependent task python/python3_3.7.4.bb:do_prepare_recipe_sysroot:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-devt ools/python/python3_3.7.4.bb changed from 2a45fe0cd0d3640a88c4a5c8b1880c4e9a089cc7446a91d2a920c1cef6fa916a to bc2a0921cce50da1b7be3b59a3d8211ec 2a31262493ffa5909acbb7116fad3bf Hash for dependent task util-linux/util-linux_2.34.bb:do_populate_sysroot:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes- core/util-linux/util-linux_2.34.bb changed from 15d6e165f025f10c2c455df8a875cafe021eaed4214c793e708d4827a58ca89d to 54e542d5da99cacfc9290ef5d27 9de50bdcb9195f67ae6dfff59fe41d10f7bd2 Hash for dependent task util-linux/util-linux_2.34.bb:do_install:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-core/ util-linux/util-linux_2.34.bb changed from e25b1119ce8dd7ca43fbd2db771e04fa6ff6b9d701fd78ac6c443224b036ed9f to bb5b172a83e7edd272402a9dcd80c4e1 29aa1ecb824c2cfa388086cfed24fef5 basehash changed from 62df6610eab9c1b1a17d7132943507641c8538690f26186843c86144d4598e64 to 80471f7c0bded9d1b593da69708b0e0f10882db08 5e1bf769edb3018e6c744d0 Variable rm_sysvinit_initddir value changed: @@ -11,4 +11,4 @@ shutil.rmtree(sysv_initddir) DISTRO_FEATURES{systemd} = Unset -DISTRO_FEATURES{sysvinit} = Set +DISTRO_FEATURES{sysvinit} = Unset Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-14uboot: fixes to uboot-extlinux-config attribute valuesWill Page
The way this class uses overrides to support generation of multiple sections is subject to two different issues: 1) labels that conflict with existing override names causing the value for the conflicting label to be set for all labels, and 2) reusing the override list through each iteration, prepending each new label to the list of overrides makes earlier labels' value take precedence over later labels, making later labels virtually impossible to customize. The first issue is resolved by removing all label names from overrides before iterating over labels. The second issue is resolved by generating a fresh list of overrides with only the current label added. The current label is also appended to the list of overrides instead of prepended, which makes it the highest priority override. This is matches the behavior of devtool-source.bbclass, which similarly monkey-patches overrides. Closes https://bugzilla.yoctoproject.org/show_bug.cgi?id=13469 . Signed-off-by: Will Page <wpage@polysync.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-14linuxloader: Add entries for riscv64Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-14insane.bbclass: in file-rdeps do not look into RDEPENDS recursivelyAlexander Kanavin
Recursive RDEPENDS resolution requires that all of the dependent recipes' packaging has completed. There is no mechanism to ensure that and therefore races were observed. This change effectively requires recipes to list their runtime file dependencies explicitly rather than have them pulled indirectly. This may require a bit of fixing in layers, but should result in a better definition of runtime file dependencies. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-13icecc.bbclass: catch subprocess.CalledProcessErrorMartin Jansa
* this might be related to: commit d2fcaeb153fdc3f8d7143ea823139f1537055ff1 Author: Douglas Royds <douglas.royds@taitradio.com> Date: Thu Dec 20 11:59:47 2018 +1300 icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time * it's still a bit unclear when and why this happends, but I'm seeing random tasks sometimes failing with: WARNING: Exception during build_dependencies for set_icecc_env WARNING: Error during finalise of /build/meta-oe/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb ERROR: Traceback (most recent call last): File "/build/bitbake/lib/bb/data_smart.py", line 411, in expandWithRefs s = __expand_python_regexp__.sub(varparse.python_sub, s) File "/build/bitbake/lib/bb/data_smart.py", line 136, in python_sub value = utils.better_eval(codeobj, DataContext(self.d), {'d' : self.d}) File "/build/bitbake/lib/bb/utils.py", line 421, in better_eval return eval(source, ctx, locals) File "Var <set_icecc_env>", line 1, in <module> File "/build/oe-core/meta/classes/icecc.bbclass", line 287, in icecc_get_and_check_tool link_path = icecc_get_tool_link(t, d) File "/build/oe-core/meta/classes/icecc.bbclass", line 246, in icecc_get_tool_link return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1] File "/usr/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command 'readlink -f /build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/build/bitbake/bin/bitbake-worker", line 239, in child the_data = bb_cache.loadDataFull(fn, appends) File "/build/bitbake/lib/bb/cache.py", line 327, in loadDataFull bb_data = self.load_bbfile(virtualfn, appends, virtonly=True) File "/build/bitbake/lib/bb/cache.py", line 340, in load_bbfile datastores = parse_recipe(bb_data, bbfile, appends, mc) File "/build/bitbake/lib/bb/cache.py", line 303, in parse_recipe bb_data = bb.parse.handle(bbfile, bb_data) File "/build/bitbake/lib/bb/parse/__init__.py", line 107, in handle return h['handle'](fn, data, include) File "/build/bitbake/lib/bb/parse/parse_py/BBHandler.py", line 142, in handle return ast.multi_finalize(fn, d) File "/build/bitbake/lib/bb/parse/ast.py", line 386, in multi_finalize finalize(fn, d) File "/build/bitbake/lib/bb/parse/ast.py", line 351, in finalize bb.parse.siggen.finalise(fn, d, variant) File "/build/bitbake/lib/bb/siggen.py", line 147, in finalise taskdeps = self._build_data(fn, d) File "/build/bitbake/lib/bb/siggen.py", line 118, in _build_data tasklist, gendeps, lookupcache = bb.data.generate_dependencies(d) File "/build/bitbake/lib/bb/data.py", line 388, in generate_dependencies deps[dep], values[dep] = build_dependencies(dep, keys, shelldeps, varflagsexcl, d) File "/build/bitbake/lib/bb/data.py", line 317, in build_dependencies value, parsedvar = d.getVarFlag(key, "_content", False, retparser=True) File "/build/bitbake/lib/bb/data_smart.py", line 802, in getVarFlag parser = self.expandWithRefs(value, cachename) File "/build/bitbake/lib/bb/data_smart.py", line 424, in expandWithRefs raise ExpansionError(varname, s, exc).with_traceback(tb) from exc File "/build/bitbake/lib/bb/data_smart.py", line 411, in expandWithRefs s = __expand_python_regexp__.sub(varparse.python_sub, s) File "/build/bitbake/lib/bb/data_smart.py", line 136, in python_sub value = utils.better_eval(codeobj, DataContext(self.d), {'d' : self.d}) File "/build/bitbake/lib/bb/utils.py", line 421, in better_eval return eval(source, ctx, locals) File "Var <set_icecc_env>", line 1, in <module> File "/build/oe-core/meta/classes/icecc.bbclass", line 287, in icecc_get_and_check_tool link_path = icecc_get_tool_link(t, d) File "/build/oe-core/meta/classes/icecc.bbclass", line 246, in icecc_get_tool_link return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1] File "/usr/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) bb.data_smart.ExpansionError: Failure expanding variable set_icecc_env, expression was if [ "${@use_icecc(bb, d)}" = "no" ] then return fi ICECC_VERSION="${@icecc_version(bb, d)}" if [ "x${ICECC_VERSION}" = "x" ] then bbwarn "Cannot use icecc: could not get ICECC_VERSION" return fi ICE_PATH="${@icecc_path(bb, d)}" if [ "x${ICE_PATH}" = "x" ] then bbwarn "Cannot use icecc: could not get ICE_PATH" return fi ICECC_BIN="${@get_icecc(d)}" if [ -z "${ICECC_BIN}" ]; then bbwarn "Cannot use icecc: icecc binary not found" return fi if [ -z "$(which patchelf patchelf-uninative)" ]; then bbwarn "Cannot use icecc: patchelf not found" return fi # Create symlinks to icecc in the recipe-sysroot directory mkdir -p ${ICE_PATH} if [ -n "${KERNEL_CC}" ]; then compilers="${@get_cross_kernel_cc(bb,d)}" else compilers="x86_64-oe-linux-gcc x86_64-oe-linux-g++" fi for compiler in $compilers; do ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler done ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}" ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}" # cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix ICECC_WHICH_AS="${@bb.utils.which(os.getenv('PATH'), 'as')}" if [ ! -x "${ICECC_CC}" -o ! -x "${ICECC_CXX}" ] then bbwarn "Cannot use icecc: could not get ICECC_CC or ICECC_CXX" return fi ICE_VERSION=`$ICECC_CC -dumpversion` ICECC_VERSION=`echo ${ICECC_VERSION} | sed -e "s/@VERSION@/$ICE_VERSION/g"` if [ ! -x "/build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/icecc-create-env" ] then bbwarn "Cannot use icecc: invalid ICECC_ENV_EXEC" return fi ICECC_AS="`${ICECC_CC} -print-prog-name=as`" # for target recipes should return something like: # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as # and just "as" for native, if it returns "as" in current directory (for whatever reason) use "as" from PATH if [ "`dirname "${ICECC_AS}"`" = "." ] then ICECC_AS="${ICECC_WHICH_AS}" fi if [ ! -f "${ICECC_VERSION}.done" ] then mkdir -p "`dirname "${ICECC_VERSION}"`" # the ICECC_VERSION generation step must be locked by a mutex # in order to prevent race conditions if flock -n "${ICECC_VERSION}.lock" \ /build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/icecc-create-env "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}" then touch "${ICECC_VERSION}.done" elif ! wait_for_file "${ICECC_VERSION}.done" 30 then # locking failed so wait for ${ICECC_VERSION}.done to appear bbwarn "Timeout waiting for ${ICECC_VERSION}.done" return fi fi # Don't let ccache find the icecream compiler links that have been created, otherwise # it can end up invoking icecream recursively. export CCACHE_PATH="$PATH" export CCACHE_DISABLE="1" export ICECC_VERSION ICECC_CC ICECC_CXX export PATH="$ICE_PATH:$PATH" bbnote "Using icecc path: $ICE_PATH" bbnote "Using icecc tarball: $ICECC_VERSION" which triggered exception CalledProcessError: Command 'readlink -f /build/BUILD/work/qemux86-oe-linux/python-markupsafe/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++' returned non-zero exit status 1. ERROR: Task (virtual:multilib:lib32:/build/meta-oe/meta-python/recipes-devtools/python/python-markupsafe_1.0.bb:do_patch) failed with exit code '1' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-08image_types_wic.bbclass: Copy the .wks and .env files to deploy image dirJason Wessel
When using a .wks.in file, the only place that the generated .wks file exists in the tmp/work area. A copy should be left behind in the deploy directory so that you can easily run the wic tool to re-generate or modify a new image without running bitbake. Custom .wks.in files can reference any number of bitbake variables, so it is important to save the result. below is an example of using the generated .wks file in the deploy area. The full name of my generated .wks file was core-image-minimal-ostree-uboot-ab.wks, but since you usually only have a single .wks file per image you can use a wild card like: cd tmp*/deploy/images/* wic create --vars . -e core-image-minimal -s -m core-image-minimal-*.wks Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-08deb: allow custom dpkg commandTim Blechmann
trying to reduce the turnaround times for local builds, i'm trying to find a way to inject `-Zgzip -z1` into the dkpg-deb command line. attached patch introduces a `DPKG_BUILDCMD` variable for this purpose. (i'm not very familiar with the whole bitbake infrastructure, so i'm wondering: do i have to add it to the `vardeps` of do_package_deb?) tia, tim >From 62d4930d307d5d07844889001e8a1c3111b72b98 Mon Sep 17 00:00:00 2001 From: Tim Blechmann <tim@klingt.org> Date: Thu, 8 Aug 2019 06:48:54 +0200 Subject: [PATCH] package_deb: allow dpkg-deb to be customized via DPKG_BUILDCMD the command line to invoke `dpkg-deb` is hardcoded. there are certain use cases where we want to tweak how debian packages are compiled: e.g. the default uses xz compression, which is rather CPU intensive. for local builds one might want to pass `-Zgzip -z1` to favor speed over compression ratio. we therefore introduce a `DPKG_BUILDCMD` variable which allows downstream code to customize how dpkg-deb is executed Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>