summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* base/insane: Import oe.qa by defaultRichard Purdie2021-10-142-3/+1
| | | | | | (From OE-Core rev: 3b4ce5f69cd962cd219aa3c0e7a2de9096e2ecb8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3: update 3.9.7 -> 3.10.0Alexander Kanavin2021-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | native and target 0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch replaced by native-only 0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch which is more reboust against upstream changes, and keeps target code unmodified. This however necessitated adding 0001-sysconfig.py-use-platlibdir-also-for-purelib.patch to avoid hardcoding 'lib' on target builds as libdir. Drop chunk from 0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch as upstream now uses sysconfig directly inside distutils. Add 0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch and 0001-multiprocessing-disable-a-failing-test.patch to address ptest failures. License-Update: copyright years, case corrections. (From OE-Core rev: 72a75043a946f7db01d3ec04c8889e055f542cca) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch.bbclass: when the patch fails show more info on the fatal errorJose Quaresma2021-10-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are situations when the user have the 'patchdir' defined as a parameter on SRC_URI. However he doesn't know that with this the patch is applied relatively to the receipe source dir 'S'. - When user have 'patchdir' defined check if this directory exist. - If the patch fails show addition info to the user: - Import: show the striplevel - Resolver: show the expanded 'patchdir' to the user. The next example is from opencv in meta-oe layer, here the patch is applied on the target directory ${WORKDIR}/git/contrib. S = "${WORKDIR}/git" SRCREV_FORMAT = "opencv_contrib" SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \ file://0001-sfm-link-with-Glog_LIBS.patch;patchdir=../contrib \ " * When the patch fail there are no message that indicates the real reason. patchdir=../no-found-on-file-system ERROR: opencv-4.5.2-r0 do_patch: Command Error: 'quilt --quiltrc /build/tmp/work/core2-64-poky-linux/opencv/4.5.2-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output: stdout: Applying patch 0001-sfm-link-with-Glog_LIBS.patch can't find file to patch at input line 37 Perhaps you used the wrong -p or --strip option? * The check of the patchdir will add a new fatal error when the user specifies a wrong path than don't exist. patchdir=../no-found-on-file-system ERROR: opencv-4.5.2-r0 do_patch: Target directory '/build/tmp/work/core2-64-poky-linux/opencv/4.5.2-r0/git/../no-found-on-file-system' not found, patchdir '../no-found-on-file-system' is incorrect in patch file '0001-sfm-link-with-Glog_LIBS.patch' * When we can't aplly the patch but the patchdir exist, show the expanded patchdir on fatal error. patchdir=../git ERROR: opencv-4.5.2-r0 do_patch: Applying patch '0001-sfm-link-with-Glog_LIBS.patch' on target directory '/build/tmp/work/core2-64-poky-linux/opencv/4.5.2-r0/git/../git' Command Error: 'quilt --quiltrc /build/tmp/work/core2-64-poky-linux/opencv/4.5.2-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output: stdout: Applying patch 0001-sfm-link-with-Glog_LIBS.patch can't find file to patch at input line 37 Perhaps you used the wrong -p or --strip option? (From OE-Core rev: c44bc7c0fb8b7c2e44dd93607a3bfd9733e1df80) Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common.bbclass: rewrite toolchain wrappers in (native) pythonAlexander Kanavin2021-10-141-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | librsvg on centos 7 and friends exhibits the same libtinfo leakage problem, this time coming from the compiler and not the linker. Simply covering the compiler by the existing C wrapper-of-wrapper does not work, as rust-native builds put Important Stuff into LD_LIBRARY_PATH and unsetting it breaks things badly. Rather than try to figure out which combination of wrappers and LD_LIBRARY_PATH settings works for which situation, or provide some kind of sh-native, let's simply use python3-native for the wrappers, which should insulate builds from the the host shell. rust-native already depends on python3-native, so this does not lengthen the builds. This also reverts: rust-common: Hack around LD_LIBRARY_PATH issues on centos7 (commit 63b1fd2226b5f146d6c853cc57417704df378438). I'd also like to say boo to Red Hat (or GNU?) for breaking ABI compatibility for stat() in glibc 2.33, we ended up sorting this mess because of it. (From OE-Core rev: 997d54363a3cb3a0e949b3626855f2fa41afeb2b) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: Use configs for npm environment and args for npm run commandStefan Herbrechtsmeier2021-10-141-8/+6
| | | | | | | | | | | | Use parameter configs of class NpmEnvironment and parameter args of function run to support a common npmrc for all run calls of a single NpmEnvironment. (From OE-Core rev: 6490de38ba9563181653ef223224de066faf9166) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: Add variable NPM_NODEDIR with default valueStefan Herbrechtsmeier2021-10-141-5/+3
| | | | | | | | | | | Replace the variable NPM_NODEDIR fallback to a default value inside the code with a variable NPM_NODEDIR with default value. (From OE-Core rev: f0a47afb43bd63b66c565ba3d084e20d6725495e) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: Add support for EXTRA_OENPM argumentsStefan Herbrechtsmeier2021-10-141-1/+4
| | | | | | | | | | | | Add support for EXTRA_OENPM arguments to set node-gyp variables for example. This allows use of shared librariess, avoid download of external sources or build from source. (From OE-Core rev: 9b22b50b77a5979934193e9affbe47a05d763777) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Fix package output files for SDKsAndres Beltran2021-10-143-7/+18
| | | | | | | | | | | | | | | | | Currently, installed packages are listed for images in image-info.txt, but not for SDKs in sdk-info.txt. Add TOOLCHAIN_HOST_TASK and TOOLCHAIN_TARGET_TASK to the output variables in sdk-info.txt. Moreover, package output files for the SDK host are empty because PKGDATA_DIR defaults to the target directory. Fix this bug and create a new variable called PKGDATA_DIR_SDK which stores the correct path for the SDK host package data. (From OE-Core rev: 82e6172c1df378dff4e503aa878501c08937b5bb) Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devpyshell: rename to pydevshellMichael Opdenacker2021-10-111-5/+5
| | | | | | | | | | | For consistency with "pydevshell" which is also used. This addresses [YOCTO #14531] (From OE-Core rev: 958133f4e97275d1f2c74a7e715c4506cca3582f) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: use zstd instead of xzAlexander Kanavin2021-10-111-2/+2
| | | | | | | | | | | | | | | | | zstd has similar time and space performance in compression but is vastly faster in decompression, which benefits rootfs creation (especially when installing very large packages) and on-target package installation. Also, ensure ZSTD_THREADS doesn't change sstate checksums. The detailed explanation is in the commit making similar change for XZ_THREADS. (From OE-Core rev: e72c0b94554a9bc293844ec2bddb0c04ea19791d) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* baremetal-image: Fix do_image dependenciesAlejandro Hernandez Samaniego2021-10-081-3/+7
| | | | | | | | | | | | | | Commit 282d596b8 added a fix for image.bbclass related to QEMU dependencies, such fix made the older logic borrowed from image.bbclass incompatible. Update the dependency logic to reflect new changes, we no longer need to add the do_addto_recipe_sysroot dependency specifically. (From OE-Core rev: 4663f06c81285aeab8e8d33ec5338d7854b9dd9f) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* abi_version/sstate: Bump to fix rpm corruption issuesRichard Purdie2021-10-081-1/+1
| | | | | | (From OE-Core rev: 14feca0dc781f8e9003f70f317b63b242dc579b6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Only apply group/other permissions to pseudo filesRichard Purdie2021-10-081-1/+1
| | | | | | | | | | | | | | | | | We hardlink some files into the build, such as licence files in do_populate_lic tasks. Depending on the umask that the source tree was checked out with, the group permissions would vary. This results in inconsistent task outhashes. Avoid this by ignoring the group/other bits unless we're under pseudo context. Bump the ABI numbers to ensure we don't see cache corruption from earlier builds. (From OE-Core rev: 2bd9c806de7e5197168360e3bd1d223a04a92291) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: don't apply config metadata patches twiceBruce Ashfield2021-10-071-1/+4
| | | | | | | (From OE-Core rev: 0b88ed0af350c609ce8075e7d89ca7db91486858) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* reproducible_build: Work around caching issuesRichard Purdie2021-10-041-4/+7
| | | | | | | | | | | | | | | SOURCE_DATE_EPOCH can be expanded early in the parsing process before the class extensions are applied. This can mean the directory pointed to for the SDE can be incorrect until later in parsing. Cache the file name in the cached value and allow it to dynamically update. This isn't ideal but avoding expansion of the variable likely isn't possible and I'm not sure how else to handle this. This works around the issue until a better solution can be found. (From OE-Core rev: 44dc97cd1223e4d2b635669627ec5f796838d42d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* abi_version/sstate: Bump HASH_VERSION and SSTATE_VERSIONRichard Purdie2021-10-041-1/+1
| | | | | | | | | | | | | | | At this point the hash equivalence and sstate is 'junk' on the autobuilder unforuntately due to the volume of fixes and also the volume of slighly not quite right patches tested during the development of the fixes. In order to try and help any remaining sanity I might have, bump the version numbers to start with a clean slate so we're working from a known good baseline rather than risk chasing phantom issues. For those upgrading, there wouldn't be much reuse anyway after the changes. (From OE-Core rev: be32692c627a14509de5eb3834e7321c3c5faf25) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-artifact-names: Use SOURCE_DATE_EPOCH when making reproducible builds ↵Richard Purdie2021-10-041-1/+8
| | | | | | | | | | | for deploy Using DATETIME means the do_deploy output is not deterministic. Use SDE when using reproducible builds since it is consistent for given input data. (From OE-Core rev: 0e2fbdb32bae67e71e904a036a38395efb6ec6a6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Add processing for full build paths in sysroot filesRichard Purdie2021-10-041-0/+7
| | | | | | | | | | | | | | | | | | | | | Some files in the populate_sysroot tasks have hardcoded paths in them, particularly if they are postinst-useradd- files or crossscripts. Add some filtering logic to remove these paths. This means that the hashequiv "outhash" matches correcting in more cases allowing for better build artefact reuse. To make this work a new variable is added SSTATE_HASHEQUIV_FILEMAP which maps file globbing to replacement patterns (paths or regex) on a per sstate task basis. It is hoped this shouldn't be needed in many cases. We are in the process to developing QA tests which will better detect issues in this area to allow optimal sstate reuse. (From OE-Core rev: d9852ffbbe728dac33dc081538a08af98f52fd4a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: Fix a source date epoch race in reproducible buildsRichard Purdie2021-10-041-10/+9
| | | | | | | | | | | | When reproducible builds are enabled and externalsrc is in use, the source date epoch function is added. The conditions on the conditional code removing the unpack task need to match the deltask function, else the source date epoch function can end up running twice and the functions can race with each other causing build failures or corruption. (From OE-Core rev: e82095c02881410035ca23dc12692f074d8ed39b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/bootimg-efi: Add Unified Kernel Image optionKristian Klausen2021-10-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "A unified kernel image is a single EFI PE executable combining an EFI stub loader, a kernel image, an initramfs image, and the kernel command line. [...] Images of this type have the advantage that all metadata and payload that makes up the boot entry is monopolized in a single PE file that can be signed cryptographically as one for the purpose of EFI SecureBoot."[1] This commit adds a create-unified-kernel-image=true option to the bootimg-efi plugin for creating a Unified Kernel Image[1] and installing it into $BOOT/EFI/Linux/ with a .efi extension per the the Boot Loader Specification[1][2]. This is useful for implementing Secure Boot. systemd-boot is the only mainstream bootloader implementing the specification, but GRUB should be able to boot the EFI binary, this commit however doesn't implement the necessary changes to the GRUB config generation logic to boot the Unified Kernel Image. [1] https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images [2] https://systemd.io/BOOT_LOADER_SPECIFICATION/ (From OE-Core rev: b0573f240525df561ddef6e47cb285b217d38487) Signed-off-by: Kristian Klausen <kristian@klausen.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Exclude IMAGE_VERSION_SUFFIX from expansion in image tasksRichard Purdie2021-10-021-0/+1
| | | | | | | | | Similarly to DATETIME, exclude IMAGE_VERSION_SUFFIX from expansion in image tasks to ensure the sstate signatures are calculated correctly. (From OE-Core rev: ceabe8b89f8a0b75d22a286e6f86d260f7e2fd3b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Ensure pclist files are deterministic and don't use full pathsRichard Purdie2021-10-021-3/+3
| | | | | | | | | | | Currently the pkgconfig pclist files contain full paths which are build host specific and the order of entries is not deterministic. Fix both these issues so the files are deterministic. (From OE-Core rev: e422e29bca4af3ab4073e04490f38b05cd7c38c0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: Fix for files starting with -William A. Kennington III2021-09-281-4/+4
| | | | | | | | | | | This makes it possible to name files starting with a hyphen in the work directory. Without this change rm will fail due to an unexpected option being passed. (From OE-Core rev: 5f1a63e0de4921ef970114a16d0827fcddcdaa0e) Signed-off-by: William A. Kennington III <wak@google.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx: Use SPDXAnnotation to track native recipesSaul Wold2021-09-281-2/+19
| | | | | | | | | | | | | | | Create a small function that checks for 'isNative' as part of an Annotation When the collect_dep_sources() runs, it collects sources from both native and non-native recipes. Later when the GENERATED_FROM matching occurs it may find the file (via checksum) from the native recipe since it's the same checksum as the target file. The that are generated DocumentRefs point to the native recipe rather than the target recipe DocumentRef. (From OE-Core rev: ba5ec03986a0bce8dccbc381fd34e44b8a135e66) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk: Use localdata store when signing packagesKenfe-Mickael Laventure2021-09-281-2/+2
| | | | | | | | | | | | | | | | When signing a package, we were resolving the `PKGV` version using the original data store (`d`). However, since that store does not have the package name in its `OVERRIDES` list the wrong version can be returned in recipes that produce multiple packages. One such example would be `external-arm-toolchain.bb`. The above issue is fixed by using `localdata` instead of `d` when resolving the needed variables. (From OE-Core rev: 2b5f01cf5a92a873ac4c3f0ba0584cab2cc05714) Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@verkada.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: remove unnecessary dead codeRasmus Villemoes2021-09-281-13/+2
| | | | | | | | | | | | | | | | | | | | | | | The grep pattern seems to have been wrong ever since we stopped adding the -ffile-prefix-map via a patch in commit 20aea61385e, because the actual upstream gcc produces -ffile-prefix-map=<old>=<new> and not -ffile-prefix-map=<old=new> Besides, these *-prefix-map options are already used when building the kernel due to the setting of KERNEL_CC, and the kernel build system itself also probes for and uses at least -fmacro-prefix-map (hence taking care of __FILE__ etc., but not necessarily things that go in .debug_info sections). (From OE-Core rev: 5d56de8cd653d2a3a7f4c104d50c14e22d412f66) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc_package/buildstats: Fix python regex quoting warningsRichard Purdie2021-09-261-1/+1
| | | | | | (From OE-Core rev: 6a8077317ce12e13018ec4472f728dd24880bda9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: use ordinary append for file-checksums updateMatt Madison2021-09-261-4/+1
| | | | | | | | | | | | | | | | Commit 29daffc2410f06f36b779d5bf1fd1ef6e900ca8f added an anonymous python function to append the site file dependencies for do_configure. This causes any recipe that inherits allarch after autotools to end up with a different set of file checksums for each machine, since the anonymous python would get processed before the TARGET_ARCH changes in allarch. Use an ordinary += assignment to fix this. (From OE-Core rev: 60af398f520c938600205ef40e27f90e5342209c) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ssate: Cleanup directtasks handlingRichard Purdie2021-09-231-14/+4
| | | | | | | | | | | | | There are several tasks which should only be triggered by direct dependencies. Some are listed in the dep loop, some are not. They should all be in both cases. Fix this by making a list and using the list in both cases to fix various inconsistencies. (From OE-Core rev: 29d285bc07bd7732c7ea39c0fd03c0b3c0d93e52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Avoid deploy_source_date_epoch sstate when unneededRichard Purdie2021-09-231-0/+4
| | | | | | | | | | | | This sstate task is only needed when depended upon, it can be skipped if there are no tasks running that directly depend upon it. This reduced the number of sstate tasks in something like an image build. (From OE-Core rev: 601cee016da5c7505915e26641a085714de175ce) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Ensure deploy tasks don't pull in toolchainsRichard Purdie2021-09-231-2/+2
| | | | | | | | | | | | | | If an image is built from sstate, the cross toolchain was being pulled in. This was due to the sstate dependencies for deploy tasks not being considered in the "depvalid" logic. do_deploy tasks do not need their populate_sysroot dependencies when installed from sstate so skip these. This reduces the sstate pulled in by an image build from sstate significantly. (From OE-Core rev: 8047c184f8266fc047c0e5a5524586d414528626) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Mark deploy an sstate taskRichard Purdie2021-09-231-0/+1
| | | | | | | | | | | | | | Deploy is a tricky task as it isn't in SSTATETASKS as it isn't always present. We do need to ensure dependency chains around do_deploy tasks are correctly handled as sstate tasks though. For now add to the list of sstate tasks manually (like the other locale task reference). Without this, missing manifest files could be reported now that do_deploy tasks no longer have their dependencies added by the depvalid function. (From OE-Core rev: 1fdbe550323b98ca67ed7130f5a0d7d626bd2c64) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Drop useless classRichard Purdie2021-09-231-4/+0
| | | | | | | | | | | | | | | This class was added by me back in 2007 and has changed one for a whitespace issue since. It only has two lines and neither are particularly useful, one was replaced by the nopackages class, the other adding recursive dependencies also is now mainly problematic adding tons of unneeded dependencies. The name is hard to understand and the class doesn't have a clear purpose. Drop it. Remove the references in devtool (which may be the one reason to keep it around but in my view still not worth it). (From OE-Core rev: 6e2cbfc561dac89bf9183d24d90e52f7d9117826) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base/images: Drop use of 'meta' class and hence do_build ↵Richard Purdie2021-09-231-1/+3
| | | | | | | | | | | | | | | | | | | dependencies The 'meta' is old and not very useful. It empties PACKAGES and creates recursive do_build dependencies. We shouldn't need such recursive build dependencies any more so simplify the code. This does cause behaviour changes as some dependencies are no longer built. It did show up issues with qemu-helper-native handling for example but those issues look like real races and the underlying dependency chains were not correct. 'bitbake XXX --runall build' would give the previous behaviour. (From OE-Core rev: 41d7f1aa2cc9ef5dba4db38435402d4c9c0a63e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* reproducible_build/package_XXX: Ensure SDE task is in dependency chainRichard Purdie2021-09-234-3/+8
| | | | | | (From OE-Core rev: 938e4dfb68a465f61cb754b2cd28d0728616b5a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk/deb/rpm: Drop recursive do_build task dependenciesRichard Purdie2021-09-233-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This is a controversial change which removes the recursive dependencies from the do_build target of packaging tasks of recipes. Currently this means when you "bitbake <image>" or "bitbake <recipe>", the packaging tasks run for all packaging backends enabled for all recipes in the dependency chain. The same therefore then applies to images. We don't actually need that, it is a convinience thing. Removing it massively simplifies the task graph and causes much fewer tasks to execute in many common scenarios. It also means less sstate is fetched for example when building an image. This means when building a recipe all package formats would be built but when building an image, only the format used by the image would be generated. This should be an improvement in most cases but some CI systems may need to be explict about what they're building. 'bitbake XXX --runall build' would give the previous behaviour. (From OE-Core rev: 220d29a5abb5be8b80c64d8f2f48949bc8c534a3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* siteinfo/autotools: Ensure task checksums reflect site filesRichard Purdie2021-09-233-9/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if you change the site files, nothing rebuilds since they are not accounted for in task checksums. They could/should be through the file-checksums task flag. We need to cache all the files looked for, whether the exist or not so that if they do exist and didn't, the checksum also changes. This gets complicated by the need to clean out hardcoded build paths from the variable and that other layers can have site files. This patch adds this functionality. A new variable, SITEINFO_PATHVARS is added which controls which substitutions to make on the file-checksum values to remove the hardcoded paths. Layers adding site files will need to set this to a variable that has the layer path in it and is excluded from task hashes (COREBASE is the one the core layer uses). This patch will cause yocto-check-layer to fail for some layers where site files are added yet the layer isn't a machine specific layer. This is arguable correct since these additional site files apply to all recipes and things from a layer like core could be changed by such changes so it is right they should rebuild. There is a determinism issue potentially there if not. meta-openembedded does have some such references but looking at them they should move to core or likely just be removed as most look obsolete anyway. [YOCTO #13729] (From OE-Core rev: 29daffc2410f06f36b779d5bf1fd1ef6e900ca8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/qemu: Add explict depends for qemu-helper addto_recipe_sysroot taskRichard Purdie2021-09-231-1/+4
| | | | | | | | | | The populate_sysroot task isn't enough for qemu-helper-native, we need it's addto_recipe_sysroot task. This corrects what amounts to bad dependency information to be explicit. (From OE-Core rev: 55623420208bc4c77a61492d2bbcbc71d3123acd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross: Drop unused do_installRichard Purdie2021-09-211-4/+0
| | | | | | | | | | | | | All the users of the cross class I could find redefine the do_install function. It is unusual and likely undesirable for the class to be changing this from the default and likely a leftover from different times. Remove it as it isn't doing anything. [YOCTO #9272] (From OE-Core rev: 72f0e03a6909e6856510d913863fc9301de32cec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: remove aarch64 xorg exclusionJon Mason2021-09-211-2/+0
| | | | | | | | | | aarch64/qemuarm64 has had graphics support for some time. Remove this exclusion and allow graphics tests to be against qemuarm64. (From OE-Core rev: 1b436e4894663fa76865636b0b41c0c1503cc3bf) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: symlink the task log and qemu console log to tmp/log/oeqaAlexander Kanavin2021-09-211-2/+10
| | | | | | | | | | | | | This makes it easier for the AB scripts (particularly, collect-results) to access and archive these items, as they can contain useful information when ptests or other qemu tests fail (and also if they don't fail). [YOCTO #14518] (From OE-Core rev: 1965b344abcff0ba584136f929b4a14645f1585e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common.bbclass: make sure ccache existKai Kang2021-09-191-1/+1
| | | | | | | | | | | | | | | | | It fails to run task rust_create_wrappers of recipe which inherit rust-common.bbclass such as rust-hello-world if no host ccache exists: | DEBUG: Executing shell function do_rust_create_wrappers | /path/to/project/tmp-glibc/work/core2-64-wrs-linux/rust-hello-world/git-r0/temp/run.do_rust_create_wrappers.3422: line 179: ccache: command not found Run task rust_create_wrappers before do_prepare_recipe_sysroot to make sure required tools such as ccache exist. (From OE-Core rev: 46575e0d5b9e722558b64e22ed928e6d7b2c654a) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cpan-base.bbclass: use raw string for regexpAlexander Kanavin2021-09-191-1/+1
| | | | | | | | | | This eliminates a deprecation warning and a future error as stipulated by https://docs.python.org/3/library/re.html (From OE-Core rev: 1753a8d8fd2e9d98255beb81428f70cdf3421321) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx.bbclass: Search all license directories for licensesPeter Kjellerstedt2021-09-161-5/+8
| | | | | | | | | | | | | | Before, even if the code was seemingly written to search through all licenses in ${COMMON_LICENSE_DIR} and ${LICENSE_PATH}, it would actually bail out after only searching ${COMMON_LICENSE_DIR} due to the exception handling. Also refrain from using f-strings. (From OE-Core rev: f58d54b31a1ddb4e60eb07365bfb7dfe78ed56af) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add FILERDEPENDS related check backMingli Yu2021-09-161-1/+1
| | | | | | | | | | | Instead of FILERDEPENDS_*, the FILERDEPENDS should be FILERDEPENDS:* such as FILERDEPENDS:/usr/bin/python3.9:lib32-python3-core as an example, so switch to new override syntax to make sure the related check in effect. (From OE-Core rev: 6e5650be0ce5575da1ce5b6ea8b24a82ec7b1210) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.bbclass: add RDEPENDS related check backMingli Yu2021-09-161-1/+1
| | | | | | | | | | | | | When multilib enabled, instead of checking RDEPENDS_lib32-python3-core, we should check RDEPENDS:lib32-python3-core as new override syntax applied. So switch to new override syntax to make sure the related RDEPENDS check logic is in effect. (From OE-Core rev: 63d53e515d8f3d92a4143dc25c2e639c7fb8c3fb) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Ensure SDE is accounted for in package task timestampsRichard Purdie2021-09-161-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating packages we build them with --clamp-mtime and use SOURCE_DATE_EPOCH as the maximum mtime. This makes the end packages reproducible. The data stored in sstate for do_package and the package task doesn't benefit from this though and have varying timestamps. This means their outhash varies and means hash equivalance isn't effective at all and doesn't work as intended/desired. We could create the sstate archives with the same clamping however that would lead to different results depending on whether a task was installed from sstate or not. Making that differ is a path to madness. It also wouldn't fix the outhash of the task to be determninistic without clamping of the date in the hash calculation code. Instead, iterate over the files in sstate output and clamp them at the code level. This isn't ideal but does make the file timestamps determnistic everywhere and means we don't have to change the hash calculation code. This issue can be clearly seen looking at the do_package outhash for a recipe which you then re-run the package task for after adding something like whitespace to the install task. The outhash shouldn't change but currently does. (From OE-Core rev: c3b3cc4745811b48b9193f83889946b2e1788932) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Fix pkgdata determinism issuesRichard Purdie2021-09-161-4/+4
| | | | | | | | | | | pkgdata output isn't entirely deterministic since the sorting of some of the variables can change. This likely doesn't have any real world effect but fix this with some additional sorting as it allows better hash equivalency of task output. (From OE-Core rev: a30c4de8a0b309c398c42fe710c45a4df7fcc64d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Ensure preinst data is expanded correctly in pkgdataRichard Purdie2021-09-161-0/+4
| | | | | | | | | | | | | | | | | | The preinst data in pkgdata will not expand out the ${XXX_PARAM} variables since they don't use a package suffix. It happens that the final expansion used for the packages is corrected by a second trip through the datastore. The first version is used for calculation of the task output hash and recent improvements in hash reuse showed this data wasn't using included in the hashes, meaning for example builds with dynamic IDs were mixing sstate with builds using static IDs. The result was a mess. Fix this by expanding the data in the preinst correctly to use the package specific _PARAM values. (From OE-Core rev: 375430f249e7e0b6622e566e2478b40ba7e606ab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Avoid problems with recipes using SRCPV when fetching sstateRichard Purdie2021-09-111-0/+4
| | | | | | | | | | | | When fetching sstate, SRCPV can be expanded withuin PV which breaks the sstate fetcher as other variables like SRC_URI are changed by the fetcher code. Expand the variable before doing this to avoid those problems and hence avoid setscene task failures with remote sstate storage in git recipes. (From OE-Core rev: 0d9d7acebe0be42d4cf8a30ecbbbbcb2dfd16a4b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>