summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* oe/utils: log exceptions in ThreadedWorker functionsRoss Burton2021-10-181-1/+2
| | | | | | | | | | | | | | If the function a ThreadedWorker is executing raises an exception, don't use print() as that mostly disappears. Instead, output it to the logger. This is done using bb.mainlogger.debug directly instead of bb.debug() as this allows us to pass the exception instance directly, which is then incorporated into the log stream. (From OE-Core rev: 2f1ea25c222b344dd8b784b2bc73a6540ab30274) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/qa,insane: Move extra error handling functions to libraryMike Crowe2021-10-171-0/+34
| | | | | | | | | | | | | | | | | | | | | | | Extract package_qa_write_error, package_qa_handle_error and package_qa_add_message functions from insane.bbclass to lib/oe/qa.py and drop the package_qa_ prefixes. Update various bbclasses to use the new functions. No import is required since base.bbclass puts oe.qa in OE_IMPORTS. Stop requiring callers to manually track whether a fatal error has been encountered via a "sane" flag. Instead replace the QA_SANE variable with QA_ERRORS_FOUND and call oe.qa.exit_if_errors or oe.qa.exit_with_message_if_errors at the end of each task. Inspired by discussion resulting from https://lists.openembedded.org/g/openembedded-core/message/156793 and https://lists.openembedded.org/g/openembedded-core/message/156900 (From OE-Core rev: f0ad152ef4cc15c042bc9eeefb6af096d054b220) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Update cleanup code to wait for hashserv exitRichard Purdie2021-10-163-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We sometimes see exceptions from code seeing the hashserv DB files being removed at directory cleanup time. Add a check to ensure the hashserv has written the data base journal (and hence likely exited) before cleaning up. This will hopefully avoid errors like: Traceback (most recent call last): File "[...]/meta/lib/oeqa/sdk/buildtools-cases/build.py", line 30, in test_libc delay = delay - 1 File "/usr/lib/python3.6/tempfile.py", line 948, in __exit__ self.cleanup() File "/usr/lib/python3.6/tempfile.py", line 952, in cleanup _rmtree(self.name) File "/usr/lib/python3.6/shutil.py", line 486, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib/python3.6/shutil.py", line 424, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/usr/lib/python3.6/shutil.py", line 444, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/usr/lib/python3.6/shutil.py", line 442, in _rmtree_safe_fd os.unlink(name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'hashserv.db-wal' (From OE-Core rev: 0b07d9add687d78495176cda0f3011c10ffa4d4b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* reproducible: Drop BUILD_REPRODUCIBLE_BINARIES variableRichard Purdie2021-10-161-1/+1
| | | | | | | | | | We want things to be reproduicble and the variable doesn't really change much any more. Drop the remaining uses and make those code paths always active. (From OE-Core rev: d15fb02c7ee7da50e322d74bc6a545234e20c7f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* reproducible: Merge code into base.bbclassRichard Purdie2021-10-162-1/+51
| | | | | | | | | | Reproducibility is here to stay and needs to be part of our default workflow. Move the remaining code to base.bbclass so it is always a first class citizen and it is clear people need to be mindful of it. (From OE-Core rev: abb0671d2cebfd7e8df94796404bbe9c7f961058) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* reproducible: Move class function code into libraryRichard Purdie2021-10-161-0/+33
| | | | | | | | | To try and avoid parse/memory overhead of functions within bitbake, move the bulk of the reproducibility functions to the function library. (From OE-Core rev: f2fd1c9d75e774c8a5271cdc1ec6f65c4492f941) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Allow validation of sstate singatures against list of keysDaniel McGregor2021-10-141-5/+22
| | | | | | | | | | Allow a user to validate sstate objects against a list of keys, instead of just any known key in the user's keychain. (From OE-Core rev: 52ba0c5e6e2e3d5d01dc3f01404f0ab1bb29b3b5) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Switch to ZStandard compressor supportHenry Kleynhans2021-10-142-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | This patch switches the compressor from Gzip to ZStandard for ssate cache files. Zstandard compression provides a significant improvement in decompression speed as well as improvement in compression speed and disk usage over the 'tgz' format in use. Furthermore, its configurable compression level offers a trade-off between time spent compressing sstate cache files and disk space used by those files. The reduced disk usage also contributes to saving network traffic for those sharing their sstate cache with others. Zstandard should therefore be a good choice when: * disk space is at a premium * network speed / resources are limited * the CI server can sstate packages can be created at high compression * less CPU on the build server should be used for sstate decompression (From OE-Core rev: 0710e98f40ec7394567ede1f88f7c7bae306b925) Signed-off-by: Henry Kleynhans <hkleynhans@fb.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/license: implement ast.NodeVisitor.visit_ConstantRoss Burton2021-10-141-0/+6
| | | | | | | | | | | | Since Python 3.8 visit_Num(), visit_Str() and so on are all deprecated and replaced with visit_Constant. We can't yet remove the deprecated functions until we require 3.8, but we can implement visit_Constant to silence the deprecation warnings. (From OE-Core rev: abc93390a3f19bc4cc159c5690a478b9e2270906) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Use repr() for printing exceptionsRichard Purdie2021-10-141-3/+0
| | | | | | | | | | | Exceptions print more clearly using repr() instead of str(), fix in fetch and unpack tasks. Drop part of the test which no longer makes sense after this change. (From OE-Core rev: c94816259cc1c09746353ad26ca0c811e0c962c2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Fix package output files for SDKsAndres Beltran2021-10-141-1/+1
| | | | | | | | | | | | | | | | | 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>
* packagedata.py: silence a DeprecationWarningMingli Yu2021-10-131-1/+1
| | | | | | | | | | | | | | | | Use regex strings (r’’) to silence below deprecation warning [1]: $ cat tmp/work/intel_x86_64-wrs-linux/linux-yocto/5.10.x+gitAUTOINC+917c420111_373c02c3ca-r0/temp/log.do_deploy [snip] /build/layers/oe-core/meta/lib/oe/packagedata.py:22: DeprecationWarning: invalid escape sequence \s r = re.compile("(^.+?):\s+(.*)") [snip] [1] https://docs.python.org/3/library/re.html (From OE-Core rev: b5b70cba70067466da5e94f69632a2a029203838) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu: install qmp module without hardcoding the python version in oeqa scriptsAlexander Kanavin2021-10-131-1/+1
| | | | | | | (From OE-Core rev: 6d3f55ea8f7190e6825dc72424088658cbc0a13c) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/sstatetests: fix typo ware -> wereAlexandre Belloni2021-10-111-6/+6
| | | | | | | (From OE-Core rev: c94a9ece226b1d2012f5ee966b81bf607d954937) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pinentry: update 1.1.1 -> 1.2.0Alexander Kanavin2021-10-111-1/+1
| | | | | | | | | Rebase patches. (From OE-Core rev: dbb0e50375a5720d38c966fc4c5810eea1ec0203) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: update 4.16.1.3 -> 4.17.0Alexander Kanavin2021-10-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flagship features are migration from bdb to sqlite and zstd support, both are enabled and taken into use. The relationship and upstream preference between sqlite and ndb formats isn't quite clear. Lua is now a hard dependency. Added packageconfig option for r/o support for bdb (that doesn't need bdb itself), but not enabled it as upstream marks it EXPERIMENTAL in capital letters. Drop sed adjustment for a file that is not anymore installed. Adjust oeqa test to check for sqlite database instead of bdb. Drop 0001-Fix-build-with-musl-C-library.patch (nss support removed upstream) 0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch (difficult to undersand and rebase; obsolete with the move to zstd) 0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch (upstream made the same change) Portions of 0001-tools-Add-error.h-for-non-glibc-case.patch dropped (upstream moved the files to a separate component). Added 0001-docs-do-not-build-manpages-requires-pandoc.patch to avoid pandoc dependency. Added 0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch to restore reproducibility when compression thread amount varies between hosts. (From OE-Core rev: 6080fcf7e4f64faedd98ed26b65a3bc29ef08238) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/manual: Fix no longer valid URLsJon Mason2021-10-081-3/+3
| | | | | | | | | | autobuilder.yoctoproject.org URLS no longer work. Update them to a working location. (From OE-Core rev: 56f7bac1f0d1ced41e6908706be27149aa7b87e2) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Only apply group/other permissions to pseudo filesRichard Purdie2021-10-081-13/+14
| | | | | | | | | | | | | | | | | 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>
* sstatesig: Add processing for full build paths in sysroot filesRichard Purdie2021-10-041-3/+36
| | | | | | | | | | | | | | | | | | | | | 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>
* wic/bootimg-efi: Add Unified Kernel Image optionKristian Klausen2021-10-041-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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>
* sstatesig: Revert "Test cross/native hashserv method extension"Richard Purdie2021-10-021-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a76082363d189880613765ad339718e3614049d. We have an issue where x86 host builds are not matching hashes with aarch64 host builds. We'd expect that for a given target, the target artefacts should work regardless of the host architecture, compiler version etc. but this isn't happening and the hashes are differing. This is due to issues from hash equivalence. I believe the commit being reverted was added as a test and there were other fixes at the time which resolved these issues. As illustration of that, different gcc versions are not cauing issues with hash equivalence. That should be similar to the aarch64 case vs. x86-64 and hence if we're not seeing gcc verison issues, we also don't need this special case. As such, revert it as we don't need it and it is in fact breaking sstate reuse cross platform. [YOCTO #14578] (From OE-Core rev: be67dc551ca15a6f19855e8e99848aab2a33800d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/bbtests: Add uuid to force build testRichard Purdie2021-10-021-1/+3
| | | | | | | | | | | | With hash equivalence working properly, this test breaks as it detects an unchanged tasks and doesn't rerun subsequent tasks. Add a uuid to the payload to ensure it doesn't ever match equivalence and the test works as intended. (From OE-Core rev: d19873b6b5d0068f857a8f9f3686729ba4e67f0f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/spdx.py: Add commentsJoshua Watt2021-09-281-0/+57
| | | | | | | | | | Adds several comments to this file to explain the intention and how it should be used (From OE-Core rev: 0be0ba70e68b57a3617d3c1ea4b6233b37d5d648) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx.py: Add SPDXAnnotation ObjectSaul Wold2021-09-281-0/+7
| | | | | | | | | | | | This is added to allow the create-spdx code to create annotations that store values properly according to the SPDX Specification. Initialy they will be used to track if a recipe is a native type. (From OE-Core rev: 8db551bba619f3b3612c59270043148214a462cc) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/tinfoil: Update to use test commandRichard Purdie2021-09-261-3/+3
| | | | | | | | | We've had IO load issues on the autobuilder with this test. Avoid those by using a specilised test command instead. (From OE-Core rev: 106445b1eb74fc37e03c72a0c011541b50a16c19) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc_package/buildstats: Fix python regex quoting warningsRichard Purdie2021-09-261-2/+2
| | | | | | (From OE-Core rev: 6a8077317ce12e13018ec4472f728dd24880bda9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/buildproject: Ensure temp directories are cleaned upRichard Purdie2021-09-262-1/+6
| | | | | | (From OE-Core rev: d10aff865120a5feecc42c24726bd119364e0188) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/gotoolchain: Fix temp file cleanupRichard Purdie2021-09-261-0/+6
| | | | | | | | | | | The go tests leave readonly files and directories behind. Fix this to allow cleanup. [YOCTO #14575] (From OE-Core rev: 5680e95d7bd9fe00a797b2d0deb8cb4790027508) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemurunner: Use oe._exit(), not sys.exit()Richard Purdie2021-09-261-1/+1
| | | | | | | | | sys.exit will cause finally statements and other code to run at exit. Since we're using os.fork() here, os._exit() is apprioriate in this codepath. (From OE-Core rev: ec08498ff29de9ccd23be88b9d7af3dab6bbb81e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Add tests for bitbake shell/python task outputRichard Purdie2021-09-231-0/+104
| | | | | | | | | | We've seen issues where shell/python tasks lose their log file entries or output and also where output is duplicated. Add some tests to attempt to spot regressions in this area in future. (From OE-Core rev: 414020a9bd656ee61efe2f47db1b31d86b15c1c8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Drop useless classRichard Purdie2021-09-231-1/+1
| | | | | | | | | | | | | | | 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>
* oeqa/target/ssh: don't assume target_dumper is setRoss Burton2021-09-211-1/+3
| | | | | | | | | | The target_dumper property is only set by the QemuTarget subclass, so assign a default value and check it isn't None before calling it. (From OE-Core rev: add36cf85380bf7dc5339a9d65f951923317440b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: correct collections vs collections.abc deprecationAlexander Kanavin2021-09-191-6/+1
| | | | | | | | | collections.abc is available since 3.3 and doesn't need special handling. (From OE-Core rev: 01152c9410ba00274c8415a5d914dc33dfd0cf46) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Allow exclusion of the root directory for do_packageRichard Purdie2021-09-161-1/+4
| | | | | | | | | | | | The package task references WORKDIR at it's top level and we can't easily make the timestamp for that determnistic due to writes to files there and in other subdirs. We could try and force it to a specific value but it is easier to just remove it from the package task, we don't need it there or care about it in this case. (From OE-Core rev: 9cceeb906527f90d8dd3aad75aa3a8805e2a1df5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/oescripts: Fix after tar recipe changesRichard Purdie2021-09-101-1/+1
| | | | | | (From OE-Core rev: d8862f5b85266b2f8592cb1efe23e377c10c7b7d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: '${systemd_unitdir}/system' => '${systemd_system_unitdir}'Robert P. J. Day2021-09-071-1/+1
| | | | | | | | | | | Repo-wide replacement to use newer variable to represent systemd system unitdir directory. (From OE-Core rev: 5ace3ada5c54500c71becc8e0c6eddeb8bc053e3) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add extra-space argumentKristian Klausen2021-09-061-0/+11
| | | | | | | | | | | | | This allows extra space to be added after the last partition and is especially useful when free space is needed for ex: adding partitions on first boot with ex: systemd-repart[1] and the image is tested in QEMU. [1] https://www.freedesktop.org/software/systemd/man/systemd-repart.html (From OE-Core rev: f81b188bcf5aa18746fd622eb7b5c0dcb0b5c93d) Signed-off-by: Kristian Klausen <kristian@klausen.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: update for license changesRoss Burton2021-09-041-1/+1
| | | | | | | | | Now that recipetool writes BSD-3-Clause, update the test appropriately. (From OE-Core rev: e4cb21609e3e95725b235de48458ab3c111ee9c1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/recipeutils: update for license change to python-async-testRoss Burton2021-09-041-1/+1
| | | | | | | | | The python-async-test recipe is now BSD-3-Clause. (From OE-Core rev: d819d86b482d397425043c7f478712a7f225bdae) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/parselogs: Make DVD ata error apply to all qemux86 machinesRichard Purdie2021-09-031-1/+1
| | | | | | | | | | | This log checking fix is needed for both qemux86 and qemux86-64 so move to the common section. [YOCTO #14528] (From OE-Core rev: 2475ce68f0bc1f342c75364dfcfaf7f30499badf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx: Fix up license reportingJoshua Watt2021-09-031-0/+8
| | | | | | | | | | | | | | | | | | Licenses reported in the SPDX documents should be either: A) A valid SPDX identifier cross referenced from the SPDX license database B) A "LicenseRef" to a license described in the SPDX document The licensing code will now add a placeholder extracted license with corresponding "LicenseRef" for any licenses that are not matched to the SPDX database Parenthesis in the license expression are now handled correctly (From OE-Core rev: 28d9d035c0ff8fcaf28bc96a976a43a602a47e94) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx: Add runtime dependency mappingJoshua Watt2021-09-031-2/+3
| | | | | | | (From OE-Core rev: 82f3229bce41dc101c79865033432161dac269d8) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx: Add SHA1 to index fileJoshua Watt2021-09-031-3/+13
| | | | | | | (From OE-Core rev: ebfe78ad26b643ce0fb22ba5b3ede43da4a78987) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx: Add classJoshua Watt2021-09-032-0/+326
| | | | | | | | | | | | | Adds a class as a first attempt to create SPDX SBoM documents during the build. This initial work was influenced by [meta-doubleopen][1], although almost completely rewritten. [1]: https://github.com/doubleopen-project/meta-doubleopen (From OE-Core rev: 78c79821ae7e2f060b9a74ea9aefce98102bb00e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: Add extended packaged dataJoshua Watt2021-09-031-0/+12
| | | | | | | | | | | | | | | | | | Adds extended package data which is encoded as JSON which allows it to encode more structure than the "flat" package data files. The extended data might be much larger than the standard package data, so it is not read by default and instead requires oe.packagedata.read_subpkgdata_extended() to be called Currently, the file sizes and ELF debug sources are saved off into the extended package data (From OE-Core rev: db9cf430e54ae68da80fbc3fba80ce88d8df164d) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Reviewed-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/buildtools-cases: Allow bitbake time to shutdownRichard Purdie2021-09-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | bitbake may still be shutting down when the UI exits. Wait for the lock to disappear before trying to delete the directory to avoid errors. Traceback (most recent call last): File "/home/pokybuild/yocto-worker/buildtools/build/meta/lib/oeqa/sdk/buildtools-cases/build.py", line 23, in test_libc self._run('. %s/oe-init-build-env %s && bitbake virtual/libc' % (corebase, testdir)) File "/usr/lib64/python3.7/tempfile.py", line 807, in __exit__ self.cleanup() File "/usr/lib64/python3.7/tempfile.py", line 811, in cleanup _shutil.rmtree(self.name) File "/usr/lib64/python3.7/shutil.py", line 494, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib64/python3.7/shutil.py", line 452, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/usr/lib64/python3.7/shutil.py", line 450, in _rmtree_safe_fd os.unlink(entry.name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'bitbake.sock' (From OE-Core rev: 94df60cc97058444188ec8372c2d9849e74b76c6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Label packages providing per-file dependencies in depends.dotAndres Beltran2021-09-011-2/+30
| | | | | | | | | | | | | | | | Currently, depends.dot includes per-file dependencies but not the packages providing those files. This makes it hard to obtain all package dependencies by just looking at depends.dot. Parse the RPROVIDES and FILERPROVIDES fields from pkgdata to map each of their values to the package providing the component. Include runtime packages as dependencies in depends.dot, together with the component provided by the package as a label. (From OE-Core rev: 2ba33093017574bbe29eeba699eb90628614d03a) Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parselogs.py: ignore intermittent CD/DVDROM identification failureBruce Ashfield2021-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We don't use the CD/DVD ROM drive in any of our tests, but it periodically fails discovery and that leads to a QA error: [ 6.403477] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) The only way to disable the optical ROM drive in qemu is to use the '-nodefaults' option, which disables the CDROM (among other things). We can't be sure that none of our tests, or extended users are relying on default devices, so using that option is more of a risk than adding the message to our ignore list. To date, no one has sent a patch to just disable the optical drive (either in qemu or the BIOS), but that is something we could consider in the future. [YOCTO #14528] (From OE-Core rev: 143fc5504539c69752ca87717507c197a8920ce5) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner.py: handle getOutput() having nothing to readAlexander Kanavin2021-08-271-1/+4
| | | | | | | (From OE-Core rev: f4abfdeea175cfcadd6f73a69a676632ab4334a6) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner.py: print output from runqemu/qemu-system in stop()Alexander Kanavin2021-08-271-0/+2
| | | | | | | | | | | | | | This is done when starting up qemu has failed, but is not done when qemu started ok, but fails later in QMP communication. Output from runqemu does contain valuable information to find out why, so rather than fix all the QMP fails to include it, let's just print it in stop(). (From OE-Core rev: 6e2bf68e4401db747484c2c8ba0f77500b1d2d49) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>