summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* insane: Reword staging to refer to populate_sysrootRichard Purdie2022-07-151-7/+4
| | | | | | | | | 'staging' is a term lost in time. This code now operates on the sysroots, adjust the naming and messages to be more correct/appropriate. (From OE-Core rev: 5753b6bc5b106ab5fd3652c24ef6a1f94f983424) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add buildpaths to WARN_QA by defaultRichard Purdie2022-07-151-1/+1
| | | | | | | | | | | | | | | | | This was never enabled originally as there were a ton of warnings and we weren't able to fix them. Now we have reproducibile builds, this can be enabled by default as there shouldn't be such paths any longer. This is known to work well for OE-Core, other layers may have variable quaility but enabling it will start to hint to other layers and maintainers that these issues need fixing. It also will give developers early warning of reproducibility issues, rather than us catching them on the YP autobuilder. (From OE-Core rev: 54715c054eac8cf8214a5a390f722567efed54e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: remove obsolete PEP517_BUILD_APIRoss Burton2022-07-144-8/+0
| | | | | | | | | This variable is no longer used, so remove it from the python_* classes. (From OE-Core rev: 49b6c5a656eecbc51489823e37bc07918173e8d2) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python_pep517: use picobuild instead of manually calling the APIRoss Burton2022-07-141-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling the PEP-517 API directly mostly works, but sometimes doesn't. For example we don't verify build dependencies, which led to the cbor2 ugprade silently failing to actually package anything. The standard frontend is pypa/build, but for source-based distributions that can be annoying to build as it depends on the following packages: - tomli - pep517 - packaging - pyparsing Manually bootstrapping those recipes is possible, but tedious. Picobuild is another frontend (written by myself) which is designed explicitly to be used programatically by source-based distributions: it doesn't support builds inside virtual environments as we're building distribution packages, and it vendors the dependencies for bootstrapping if they're not available. Over time more packages are expected to move to using Flit to build which makes the bootstrapping process slightly easier, and tomli will be integrated into Python 3.11, so it's possible that in the future we drop picobuild and switch to build. This change means the PEP517_BUILD_API variable is obsolete, so remove it. (From OE-Core rev: 35104958181d18fd67b73943b9310c813d62b14d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3-flit-core: bootstrap explicitlyRoss Burton2022-07-141-0/+5
| | | | | | | | | | | Add a method to python_flit_core.bbclass that does a manual build with flit explicitly, and use that to bootstrap python3-flit-core-native which can build itself. (From OE-Core rev: e902578c2c9aacdc83dcfa517bc1e57667fcc460) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bin_package: install into base_prefixPascal Bach2022-07-121-1/+2
| | | | | | | | | This makes the bin_package.bbclass work properly with the native class. (From OE-Core rev: ad330b6d4b6e2ba051b5c6c437e07a183831f757) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-arch: Fix buildpaths leaking into external module compilesRichard Purdie2022-07-121-1/+1
| | | | | | | | | | | | Building external kernel modules like lttng-modules was showing build paths inside the debug symbols for the modules and breaking build reproducibility. Fix this by adding in the mapping needed to map the kernel build directory to something more approriate on target. (From OE-Core rev: b56dc9009ba93174de6bf4c01e17808ef249dc5c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage : remove curl-ptest from rpm indexYogesh Tyagi2022-07-081-0/+3
| | | | | | | | | | | | | | When creating rpm index for dnf runtime tests, currently all the package starting with curl are getting included. Now curl-ptest is getting enabled through another patch but we don't want rpm index to be created for curl-ptest since it fetches lot of perl dependencies. This patch removes curl-ptest from rpm index. (From OE-Core rev: 830663cee1eabdecdd473f4589a6c03b6e6c409b) Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: create_cmdline_shebang_wrapper preserve permission and ownershipPaulo Neves2022-07-041-0/+3
| | | | | | | | | | | | | | | The .real command was not given the same permissions and ownership as the original pre-wrap file and this is now fixed. A situation where the original pre-wrap file did not have write permissions would cause a failure in the wrapping is also fixed. Test update also included. (From OE-Core rev: 47973fd4f3fbb0af1a0d1bc2c39f2900a963177d) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: create_cmdline_shebang_wrapper whitespace and sed refactorPaulo Neves2022-07-041-5/+5
| | | | | | | | | | Correct whitespace to match the rest of the code in utils. Refactored sed expression with a simpler equivalent. (From OE-Core rev: 68f49af704a4e808ad274d689e884923776edfec) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Fix buildpaths test to work with special devicesRichard Purdie2022-07-041-2/+4
| | | | | | | | | | | If enabled, the buildpaths test hangs in psplash as it tries to open a fifo and read from it, hanging indefinitely. Tweak the test to ignore fifo/socket/device files. (From OE-Core rev: 2567edb7e0a8c5ca9a88d6940491bf33bfe0eff9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Fix base directory for debugsource files when using externalsrcAlejandro Hernandez Samaniego2022-07-041-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While executing do_package, bitbake checks for a list of debug source files and uses a pattern to match the ones to be included in copydebugsources. Previously when externalsrc was in use either directly or by using devtool, the source location changed and this pattern no longer matched, hence debug source files failed to be included in the corresponding package. Check when the source directory isnt the default (based on WORKDIR), and change the pattern used to match debug source files if that is the case, allowing us to perform do_package properly. Workaround debugsource.list containing paths from the host by moving debug source files away from the host directory structure to avoid host contamination (this seems to happen when packages use $TMPDIR/work-shared and externalsrc is in use). Test matrix included using: - devtool to use externalsrc automatically - externalsrc with a non-devtool based source directory - No externalsrc at all Tested the following packages to be working: - glibc ($TMPDIR/work-shared based) - libxcrypt ($TMPDIR/work based) [YOCTO 8015] (From OE-Core rev: a887bd96fd0a15398e8077ea79df5070971866e4) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: Add cmdline_shebang_wrapper util.Paulo Neves2022-07-011-0/+34
| | | | | | | | | | | | Useful to work around shebang relocation issues, where shebangs are too long or have arguments in them, thus preventing them from using the /usr/bin/env shebang. (From OE-Core rev: 6edc1fffcbe1405d8c309a75643d7d6cd9a92848) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Make do_qa_staging check shebangsPaulo Neves2022-07-011-1/+15
| | | | | | | | | | | | | | | | | | As reported in the bug report [1], there was no check for shebang sizes on native scripts and now this is fixed. The path scope of the qa_staging was increased from just checking libdir to all the relevant SYSROOT_DIRS. It is possible to skip this check through INSANE_SKIP. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=11053 (From OE-Core rev: 377fe11bc0d6939ab1aaebab1bf4e55adca1ab15) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: hook cleanup to the BuildCompleted event, not CookerExitRoss Burton2022-06-301-1/+1
| | | | | | | | | | | | | | | | | | The cve-check class writes temporary files to preserve state across the build, and cleans them up in a CookerExit handler. However, in memory-resident builds the cooker won't exit in between builds, so the state isn't cleared and the CVE report generation fails: NOTE: Generating JSON CVE summary ERROR: Error adding the same package twice Easily solved by hooking to BuildCompleted, instead of CookerExit. (From OE-Core rev: fccdcfd301de281a427bfee48d8ff47fa07b7259) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats.bbclass: correct sampling of system statsAryaman Gupta2022-06-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The last time of sampling would be updated within the SystemStats class but not re-recorded into the datastore, leading to multiple samples being collected in the same second in the sample function of buildstats.py. Fix this to collect and store only one sample per second within a certain tolerance to deal with variation in the arrival time. This fix elimates the spikiness of sampled data, in cases where the difference between the current and the last sample is taken. Previously, since many samples per second were recorded, certain types of data would result in a very small elapsed time and hence a small numerical difference. For example, the CPU usage from /proc/stat is a running total of usage and taking the difference between data collected 0.1 seconds apart would result in usage appearing lower than it actually was. (From OE-Core rev: 0e2df45ab066bb4ad2c4f8622ee9c1a8ecdea9cb) Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com> Signed-off-by: Randy MacLeod <randy.macleod@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: use npm_registry to cache packageEnrico Scholz2022-06-281-6/+9
| | | | | | | | | | | | | | | | | | With nodejs 16, the simple 'npm cache add' approach does not work anymore because its fetcher implementation downloads also meta information from the registry. We have to generate these information and add them to the cache. There is no direct support in 'npm' for task so we have to implement it manually. This implementation consists of a openembedded python module (in oe-core) and a nodejs version specific helper (in oe-meta). (From OE-Core rev: 019b9c341d539939098962c228c1fd5c99331312) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: disable 'audit' + 'fund'Enrico Scholz2022-06-281-0/+2
| | | | | | | | | 'audit' can cause extra network traffic; 'fund' is not needed. (From OE-Core rev: 7a09a50bbe4c258ad6dc80889b0a9d2e5f554675) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: take 'version' directly from 'package.json'Enrico Scholz2022-06-281-6/+1
| | | | | | | | | | We know the content of 'package.json' from earlier patches; there is no need to parse the tarball name to extract the version. (From OE-Core rev: f553e528e76f7e3925ed1c0950d96e73aec37da9) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: return content of 'package.json' in 'npm_pack'Enrico Scholz2022-06-281-4/+4
| | | | | | | | | | We have to read 'package.json' to calculate the name of the tarball. This content is interesting for later patches. (From OE-Core rev: d67367e389c492ae90f9021066d6a4d5ebcf68e5) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: replace 'npm pack' call by 'tar czf'Enrico Scholz2022-06-281-6/+29
| | | | | | | | | | | | | | | | | | | | | 'npm pack' is a maintainer tool which tries to execute 'prepare' and similar scripts. This fails usually in OE because it requires completely installed 'node_modules'. Earlier nodejs versions supported an undocumented 'ignore-scripts' option. This has been removed in nodejs 16. We could patch 'package.json' and remove the unwanted scripts. But this might complicate local workflows (applying patches) and installed packages will contain the modified 'package.json'. Instead of, package it manually by 'tar czf'. As a sideeffect, 'do_configure' is running much faster now. (From OE-Core rev: 68b480d64ffb6750699cc8fa00d2ac0bc6a2e58a) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Correct the test for obsolete license exceptionsPeter Kjellerstedt2022-06-271-2/+2
| | | | | | | | | | | The test for obsolete licenses used in INCOMPATIBLE_LICENSE_EXCEPTIONS tried to match the "<package>:<license>" tuples with the obsolete licenses and thus never matched anything. (From OE-Core rev: 3ad994d95815eefed2a72b675c7a323b3ed38191) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Add ftps to accepted URI protocols for mirrors sanityDavid Bagonyi2022-06-251-1/+1
| | | | | | | | (From OE-Core rev: 10f3a9d5173ef4bf92ff4a7d8aef0cd2cb23e4d4) Signed-off-by: David Bagonyi <david.bagonyi@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest.bbclass: Honor PARALLEL_MAKE, PARALLEL_MAKEINSTniko.mauno@vaisala.com2022-06-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since oe_runmake wrapper doesn't by default involve PARALLEL_MAKE outside do_compile() nor PARALLEL_MAKEINST outside do_install(), enable parallellized make by default when oe_runmake is invoked from do_compile_ptest() or do_install_ptest() by declaring wrapper task specific EXTRA_OEMAKE overrides in fashion similar to do_compile and do_install overrides in meta/conf/bitbake.conf. Parallel make can still be disabled by resetting bbclass specific PTEST_PARALLEL_MAKE and PTEST_PARALLEL_MAKEINST variables in recipe e.g. if a race issue needs to be avoided without modifying source code. Tested by issuing following command sequence on a 32-core build host: $ bitbake -c clean util-linux && bitbake --skip-setscene -c compile util-linux && time bitbake --skip-setscene -c compile_ptest_base util-linux and found that before this change the result was real 0m34.684s user 0m0.753s sys 0m0.131s and after this change real 0m9.868s user 0m0.749s sys 0m0.150s (From OE-Core rev: 5c09d2a017add8bd34142c6c1543e2d0f9ead286) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: host-user-contaminated: Correct per package home pathAhmed Hossam2022-06-251-1/+1
| | | | | | | | | | | | | The current home path that is compared against is incorrect as it is missing the package name, this patch adds it. [YOCTO #14553] (From OE-Core rev: ae8f22d9e2694eea5ede3b31c6f3bca404ea4a5a) Signed-off-by: Ahmed Hossam <Ahmed.Hossam@opensynergy.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE setRaju Kumar Pothuraju2022-06-251-0/+6
| | | | | | | | | | | | | | vmlinux file doesnot have the initramfs image when INITRAMFS_IMAGE_BUNDLE was set. Use vmlinux.initramfs in uboot_prep_kimage when INITRAMFS_IMAGE_BUNDLE set based on the implementation in kernel.bbclass do_bundle_initramfs function, https://github.com/openembedded/openembedded-core/blob/master/meta/classes/kernel.bbclass#L316-L317 to be able to use proper linux.bin file in creation of fitImage. (From OE-Core rev: e0a4e45e067d9fdb67a7d223aea463f259469035) Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add python3-hatchling (from meta-oe)Ross Burton2022-06-221-0/+5
| | | | | | | | | | | Recipes in core are now needing to use the Hatch build system, so move the hatchling recipe and class from meta-oe to oe-core. (From OE-Core rev: 846e806181f1349be29cbce78c5041735dfd7e6f) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: correct commentsMichael Opdenacker2022-06-171-4/+4
| | | | | | | | (From OE-Core rev: 41ade8e9a14c867e146a545be8d2d9c151b6855f) 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>
* cve-check: add support for Ignored CVEsMarta Rybczynska2022-06-171-13/+30
| | | | | | | | | | | | | | | | Ignored CVEs aren't patched, but do not apply in our configuration for some reason. Up till now they were only partially supported and reported as "Patched". This patch adds separate reporting of Ignored CVEs. The variable CVE_CHECK_REPORT_PATCHED now manages reporting of both patched and ignored CVEs. (From OE-Core rev: c773102d4828fc4ddd1024f6115d577e23f1afe4) Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: don't use machine variables in shared recipesJose Quaresma2022-06-151-2/+7
| | | | | | | | | | | | | | | | | | | | When using multiconfig with the same TMP folder we can have races because the shared recipes like gcc-source run twice. ARCHIVER_OUTDIR = ${ARCHIVER_TOPDIR}/${TARGET_SYS}/${PF}/ which includes TARGET_SYS and between the two different MACHINE values, this changes from 'arm-poky-linux-gnueabi' to 'aarch64-poky-linux'. This leads to the task running twice, once for each multiconfig. To solve this we need to store the shared output in a common place for all machines and in this way the stamps will be the same for each machine so the gcc-source will on run once regardless of the machine used. (From OE-Core rev: 5abe497aad39a6ce8d72556fcdda1938a0f8c1bc) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx: Add SPDX_PRETTY optionJoshua Watt2022-06-151-6/+16
| | | | | | | | | | | Adds an option to make the SPDX more human-readable (at the expense of a larger files) (From OE-Core rev: 4799594b26f77ed259dc661bf077519b338390c8) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo: Improve and extend to SDK coverage tooRichard Purdie2022-06-111-6/+22
| | | | | | | | | | | | Rename the default file from "build" to "buildinfo" since this is more obvious to anyone looking in an image. Add SDK_BUILDINFO_FILE and allow the same information to be written into SDK images. This will be useful for buildtools-tarball and uninative-tarball. (From OE-Core rev: 38b9525f1d5377288922e7cbac3f30afe6046242) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/buildhistory/image-buildinfo: Use common buildcfg functionRichard Purdie2022-06-113-18/+7
| | | | | | | | Reduce code duplication to a common function in oe.buildcfg. (From OE-Core rev: 0b191a1df4c3722defb09dde0c16b1d9e7fe7ef6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/buildcfg: Share common clean/dirty layer functionRichard Purdie2022-06-112-34/+2
| | | | | | | | | The comments even say this was copy/paste code. Move to a shared library function. (From OE-Core rev: ac3de2f850a418673b87e1c454970cb099e191b0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildcfg: Move git/layer revision code into new OE module buildcfgRichard Purdie2022-06-115-50/+12
| | | | | | | | | There is a load of duplicated git/layer/revision code which makes most sesne as a python library, not bbclass code. Start to refactor as such. (From OE-Core rev: 439cdf8a1e52fd2c4dc81dc40ce7e6af282ce7ac) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: use bb.note instead of echoJose Quaresma2022-06-111-1/+1
| | | | | | | | (From OE-Core rev: 6420c8a6a8143f53ccad7ab2d56b2ba06db83099) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: add cython binary to cross/native toolchain configJack Mitchell2022-06-111-0/+2
| | | | | | | | | | | | | This allows building Cython based Python modules with the native meson support which has been present since meson version 0.59. https://mesonbuild.com/Cython.html (From OE-Core rev: b1dcb1eb69032c30f5a8faf4d7120fc6c4ecd051) Signed-off-by: Jack Mitchell <ml@embed.me.uk> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Fix potential index error issuesRichard Purdie2022-06-111-0/+2
| | | | | | | | | | | | | Someone reported that if some other shell function has left i or j set, the concat_dtb_helper function could fail. Add a small tweak to avoid this. [YOCTO #14815] (From OE-Core rev: d219c97bdf5d30be89795fbf9b66ddc367bef384) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: fix shell syntax when using dashMartin Jansa2022-06-081-1/+1
| | | | | | | | | | | | | | | | | | * fix: run.buildhistory_get_image_installed.791888: 198: [: unexpected operator introduced in: commit 82e6172c1df378dff4e503aa878501c08937b5bb Author: Andres Beltran <abeltran@linux.microsoft.com> Date: Tue Oct 5 00:34:15 2021 +0000 buildhistory: Fix package output files for SDKs (From OE-Core rev: 9852bedcb9eb8306a3f82f805ec4f76abbbbdd0f) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* baremetal-image: fix broken symlink in do_rootfsDavide Gardenal2022-06-071-3/+4
| | | | | | | | | | | | If IMAGE_LINK_NAME and IMAGE_MANIFEST are equal don't create a link otherwise it will create it to itself. (From OE-Core rev: 8fd1a37c38dbfc688d840d12c61d76f151f9f605) Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Switch to make 4.0 as a minimum versionRichard Purdie2022-06-061-27/+3
| | | | | | | | | | We can't build glibc without make 4.0 and we don't work on older distros with older versions of make without buildtools tarball so increase the minimum version to 4.0. (From OE-Core rev: e9a449aeec72a698206323c3471c9268f949b1ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: Bound beginline and endline in copy_license_files()Peter Kjellerstedt2022-06-061-4/+4
| | | | | | | | | | | | | Ensure that begin_idx (i.e., beginline - 1) and end_idx (i.e., endline) are positive numbers in copy_license_files(). This makes sure the same lines are copied as populate_lic_qa_checksum() uses when it calculates the checksum. Before, beginline=0 would typically lead to that no lines were copied at all. (From OE-Core rev: ab3cc3651d08d226675c461da760cda0bb6c0ce0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: fix return type in check_cvesMarta Rybczynska2022-06-061-1/+1
| | | | | | | | | Make empty return types in check_cvs the same for all code paths. (From OE-Core rev: f86393c93dec47b24e837d0c4c5761a716ecdbb6) Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: write empty fragment files in the text modeMarta Rybczynska2022-06-061-14/+13
| | | | | | | | | | | | | | | | | In the cve-check text mode output, we didn't write fragment files if there are no CVEs (if CVE_CHECK_REPORT_PATCHED is 1), or no unpached CVEs otherwise. However, in a system after multiple builds, cve_check_write_rootfs_manifest might find older files and use them as current, what leads to incorrect reporting. Fix it by always writing a fragment file, even if empty. (From OE-Core rev: f1b7877acd0f6e3626faa57d9f89809cfcdfd0f1) Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: move update_symlinks to a libraryMarta Rybczynska2022-06-061-8/+3
| | | | | | | | | Move the function to a library, it could be useful in other places. (From OE-Core rev: debd37abcdde8788761ebdb4a05bc61f7394cbb8) Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Fix second bb_unihashes referenceRichard Purdie2022-06-061-4/+4
| | | | | | | | | | A previous fix for zero length bb_unihashes.dat files wasn't complete as there is a second copy of the unihashes file made. Change this second call site to match the first to fully fix the zero length file issue. (From OE-Core rev: 962bd78af1acc86b3d900dce9081ed310616e0fa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto.bbclass: Reset to exiting on non-zero return code at end of taskStefan Wiehler2022-06-041-0/+8
| | | | | | | | | | | | | Several tasks deactivate exiting on non-zero return codes via set +e because they run subcommands that have legitimate non-zero return codes. However when appending to those tasks, this behavior is not expected and can lead to builds silently proceeding in case of an error. Therefore reset the default behavior at the end of the respective tasks via set -e. (From OE-Core rev: 83a6f28d2e464f00202090e998a63045adba9e4e) Signed-off-by: Stefan Wiehler <stefan.wiehler@nokia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* files: rootfs-postcommands: move helper commands to scriptVyacheslav Yurkov2022-06-041-1/+12
| | | | | | | | | | | | OverlayFS systemd helper unit might require more pre-processing commands. It gets more complicated to embed them in a unit file, because systemd shell subset is limited and might require additional escaping. Move the command to a separate script, thus simplifying systemd unit. (From OE-Core rev: 86a457016e7f3fc7acacf86cd87f5d8d882132dd) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Fix race condition on bb_unihashes.datRichard Purdie2022-06-021-4/+3
| | | | | | | | | | | | | There is a race were the bb_unihashes.dat file may end up zero sized due to concurrent builds. Use recently added API within bitbake to copy the file safely. Also use the opportunity to remove hardcoded filepaths internal to bitbake from OE-Core. Bump the minimum bitbake version to match the API being used. (From OE-Core rev: 106a7e07057e4681e6fb06dfe9e28d2e183d667d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Allow warnings to be disabledRichard Purdie2022-05-291-1/+2
| | | | | | | | | | When running CVE checks in CI we're usually not interested in warnings on the console for any CVEs present. Add a configuration option CVE_CHECK_SHOW_WARNINGS to allow this to be disabled (it is left enabled by default). (From OE-Core rev: 1054d3366ba528f2ad52585cf951e508958c5c68) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>