summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* meta: Rename LICENSE_FLAGS variableSaul Wold2022-02-212-3/+3
| | | | | | | (From OE-Core rev: 5c5b3bc563059ba728dc9724656cc69669f8e25f) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: Improve variables/terminologyRichard Purdie2022-02-211-27/+22
| | | | | | | | | | The SYSTEM and USER seperation between variables seems odd and not necessary, drop it. Avoid the use of whitelist/blacklist and also change "packages" to "recipes" since that misuse causes confusion. (From OE-Core rev: 0df0eb6401a02139b9110bc95e21d97a67125ec5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Automated conversion of OE renamed variablesRichard Purdie2022-02-217-31/+31
| | | | | | (From OE-Core rev: aa52af4518604b5bf13f3c5e885113bf868d6c81) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib: Use renamed SKIP_RECIPE varFlagSaul Wold2022-02-211-4/+4
| | | | | | | | | This is a more descriptive variable name updated in base.bbclass (From OE-Core rev: d28227ff665f4dcc4e7522829e531cdc1fbb1da4) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* blacklist: Replace class with SKIP_RECIPE variableSaul Wold2022-02-212-20/+8
| | | | | | | | | | | | | | | | Remove the old class and rename VarFlag to SKIP_RECIPE, handling this in base.bbclass for efficiency. This means a separate inherit is no longer needed. This change better describes what the VarFlag is doing since it is implemeted with the SkipRecipe() function. By moving this into base.bbclass we simplify the distro inherit. (From OE-Core rev: a5f735746cba6af41a25aa2aa121453a8bc363b4) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Handle bitbake variable renamingRichard Purdie2022-02-217-11/+11
| | | | | | | | After other variables were renamed in bitbake, update OE-Core to match. (From OE-Core rev: 91812ba5a34598e03ad860745707c7cba1ae5d91) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Change BB_ENV_EXTRA_WHITE -> BB_ENV_PASSTHROUGH_ADDITIONSRichard Purdie2022-02-212-3/+3
| | | | | | | | After the change to bitbake, update the references in OE-Core to match the updates. (From OE-Core rev: 193affb9f28b0116c3fd619834f145326fee08c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: add ability to perform tests from a global bbclassDenys Dmytriyenko2022-02-211-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful when needing to test layer's recipes, where this special bbclass can define a global python function that gets called on each recipe parsing during "bitbake -S none world" signature dump and be able to fail layer's check accordingly. First test being added is to detect recipes skipping "installed-vs-shipped" QA check. As "installed-vs-shipped" is a packaging QA check, it happens very late in the build process and failing it could mean some potential issues with packaging, especially when recipe uses BBCLASSEXTEND="nativesdk" and resulting package is used in an SDK. In OE-Core failing this QA check leads to an error, but other layers can suppress it or change it to a warning. Detecting weird packaging problems with SDKs is quite difficult and time consuming. Also, waiting for the actual "installed-vs-shipped" packaging QA check to fail means that all recipes in the layer under test have to run through all standard tasks in the build chain, equivalent to a multi-hour world-build. Hence yocto-check-layer takes a shortcut and only detects a mere attempt at skipping "installed-vs-shipped" QA check in the INSANE_SKIP list during initial parsing when dumping the signature information for the layer. (From OE-Core rev: e8baa75535fc888f1d768b23a0140475e832c910) Signed-off-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: make kernel-base recommend kernel-image, not dependRoss Burton2022-02-211-1/+1
| | | | | | | | | | | | | | | As kernel modules depend on the base kernel package, and the base kernel recipe depends on the kernel image, it's impossible to build file system images which contain kernel modules but not the kernel itself, such as an initramfs. Change the RDEPENDS to RRECOMMENDS so that the disk images can set PACKAGE_EXCLUDE = "kernel-image-*" to remove the kernel. (From OE-Core rev: 1c90b27d2c65cfb4f9debf0272820b6a95942f76) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Setup fetcher environment in advanceRichard Purdie2022-02-201-9/+12
| | | | | | | | | | The threading code here can race as the fetcher changes the environment which is shared between the threads. By setting it up in advance, it isn't changed and therefore no longer races. (From OE-Core rev: cabc3cc2eac5916e63340c18d1074411b377ced4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie2022-02-201-1/+1
| | | | | | | | | | | | | license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. (From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Fix typoRichard Purdie2022-02-181-1/+1
| | | | | | (From OE-Core rev: 3389fa68eed8a55c3a3b413798676a944b1366ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* features_check/insane: Use hasOverrides datastore methodRichard Purdie2022-02-172-7/+4
| | | | | | (From OE-Core rev: 401c56258753a96c0a4e3e91a11518f182d410ff) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: use relative path in sysroot_stage_dir()Ahsan Hussain2022-02-121-1/+2
| | | | | | | | | | | | | | | | | | | | | A regression form cpio CVE-2021-38185 caused the tool to hang for paths greater than 128 character long. It was reported here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992098 We were able to reliable reproduce this with dunfell, meta-freescale recipe imx-boot https://github.com/Freescale/meta-freescale/blob/dunfell/recipes-bsp/imx-mkimage/imx-boot_1.0.bb Using relative path on the affected host fixes the issue as this is always short, being in the same work dir. It would be harmless, and useful to generally use the relative path for sysroot_stage_dir() (From OE-Core rev: a1ec3154a53fd9e3f87a53f25113b7f90bcfb489) Signed-off-by: Ahsan Hussain <ahsan_hussain@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* default-distrovars.inc: Switch connectivity check to a yoctoproject.org pageRichard Purdie2022-02-121-1/+1
| | | | | | | | | | example.com is proving unreliable at present so switch to our own connectivity page instead. That page is very simple avoiding app overhead on our web server which was an original reason for switching to example.com. (From OE-Core rev: dc6b043cb75c5751b5a98afd2201aa31f9b4b9f6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: Add missing dependency for UBOOT_ENVMarek Vasut2022-02-121-0/+4
| | | | | | | | | | | For $UBOOT_ENV file to appear in sysroot, virtual/bootloader must populate sysroot first. Add the missing dependency. (From OE-Core rev: 77d96b70f37b70dde65cf31f917c9f524fa7016a) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: Fix build error if UNINATIVE_LOADER is unsetZoltán Böszörményi2022-02-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | I got this error on current master: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_write_qemuboot_conf(d) 0003: File: '.../layers/openembedded-core/meta/classes/qemuboot.bbclass', lineno: 141, function: do_write_qemuboot_conf 0137: else: 0138: val = d.getVar(k) 0139: # we only want to write out relative paths so that we can relocate images 0140: # and still run them *** 0141: if val.startswith(topdir): 0142: val = os.path.relpath(val, finalpath) 0143: cf.set('config_bsp', k, '%s' % val) 0144: 0145: # QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink Exception: AttributeError: 'NoneType' object has no attribute 'startswith' Do nothing if "val" is None, which may happen for k = "UNINATIVE_LOADER". (From OE-Core rev: 020043c16ce25238313cbf0d10e40e9f6551bf14) Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: stop FetchContent from fetching contentRoss Burton2022-02-121-0/+1
| | | | | | | | | | | | CMake includes a FetchContent module, which will download further source code at configure time. With the network isolation this will now fail, but as not all environments support network isolation we can tell cmake to not download either for extra safety. (From OE-Core rev: 138df1940fff303de48c98a95ac1bbaef4f120e2) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx: Get SPDX-License-Identifier from sourceSaul Wold2022-02-121-0/+22
| | | | | | | | | | | | | | | This patch will read the begining of source files and try to find the SPDX-License-Identifier to populate the licenseInfoInFiles field for each source file. This does not populate licenseConcluded at this time, nor rolls it up to package level. We read as binary file since some source code seem to have some binary characters, the license is then converted to ascii strings. (From OE-Core rev: 51e5f328635eb022143178c3169bae719509697a) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib/useradd: The option -P is deprecatedDaiane Angolini2022-02-121-4/+0
| | | | | | | | | | | | This is also covered in documentation since: https://git.yoctoproject.org/yocto-docs/commit/?id=3f3e5574ac9801ad92940168b61b532e0bd53a80 [YOCTO 14605] (From OE-Core rev: 3f9153986e4e6f667b4bbe97613ec0b279665a97) Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: fix up additional debugging when fetch fails occurAlexander Kanavin2022-02-101-2/+4
| | | | | | | | | This should print the actual stack trace, for real :) (From OE-Core rev: 9fbc7d6a2b2388e70a76cb97285e2f60bdc79624) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: additional debugging when fetch fails occurAlexander Kanavin2022-02-081-2/+2
| | | | | | | | | | | | | | | | Autobuilder has been showing things like: Checking sstate mirror object availability...ERROR: SState: cannot test file://universal/d9/bc/sstate:xz-native:x86_64-linux:5.2.5:r0:x86_64:8:d9bced04b194d5fc8d778eb8a0d674fa7375a42c8c50a9237e6d7672e9e7a00c_deploy_source_date_epoch.tar.zst: TimeoutError('timed out') ERROR: SState: cannot test file://37/a0/sstate:libgcc-initial:core2-64-poky-linux:11.2.0:r0:core2-64:8:37a0a5aec105a0822df098f15ff2b67d0e7220204742b5d2b1f7958dda6fa5ce_deploy_source_date_epoch.tar.zst: TimeoutError('timed out') ERROR: SState: cannot test file://universal/11/a4/sstate:libpciaccess-native:x86_64-linux:0.16:r0:x86_64:8:11a4d6c3a2e147ef7dd5f31c0ff2a91271dad49b561d8aa24849115081cf1842_deploy_source_date_epoch.tar.zst: TimeoutError('timed out') done. which is not helpful. To find out what really happened and where, the original traceback is needed too. (From OE-Core rev: 80a9052221fb2a12e7c652f2d1764101202fdb90) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: use multiprocessing for collecting 'objdump -p' outputAlexander Kanavin2022-02-081-2/+20
| | | | | | | | | | | | | This was prompted by ltp's unreasonably long package_qa times; it has a massive amount of executables and insane runs objdump for all of them, serially. This reduces the time from 4 minutes to 1m20s on my machine. (From OE-Core rev: fac984b99fdb46949879516cb87153860f402c75) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: replace deprecated bash command substitutionJose Quaresma2022-02-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | - build some packages with icecc enabled is not supported because of the folling that disables the icecc: DEBUG: while parsing set_icecc_env, unable to handle non-literal command '$ICECC_CC' - it can be replicated with: bitbake make && bitbake make -c cleansstate && bitbake make -DD grep ICECC_CC tmp/log/cooker/qemux86-64/console-latest.log - bash command substitution backquote deprecated https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html https://mywiki.wooledge.org/BashFAQ/082 (From OE-Core rev: b4e3983f38af5a5484b33de43449ae85b7e4f104) Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts.bbclass: use double quotes for exported PS1Kai Kang2022-02-081-1/+1
| | | | | | | | | | | | | | | | | | | Use double quotes("") rather than single quotes('') for PS1 in EXPORT_SDK_PS1 which will be exported in SDK environment file. Then it could set PS1 for SDK env with some variables in host env, such as the original PS1. The SDK PS1 could be some distinct words plus original PS1 rather than replace the whole original PS1. For example, it could set in local.conf with SDK_PS1 = "(oesdk) \${PS1}" then it just prepends '(oesdk) ' before original PS1 after source the SDK environment file. (From OE-Core rev: e13e657dabcabd97f50794e7375777ef5ad883c8) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: preload uninative libraries when host gl drivers are in useAlexander Kanavin2022-02-071-1/+1
| | | | | | | | | | | | | | Some of the host distributions build the drivers in a way (RPATH/RUNPATH) that tricks uninative loader into loading pieces of the host libc, if the same pieces haven't been previously loaded by native binaries. Mixing the two libc versions leads to failures. This change ensures that the correct (uninative) versions are always in use. (From OE-Core rev: 39c10816d5ec9d9c7952d786d7a3f942d25d0c27) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx: Remove unnecessary packageJoshua Watt2022-02-071-2/+0
| | | | | | | | | A superfluous package was being created, but it was never used. (From OE-Core rev: ddfa61f691fc51c1968e8f1ff43f69dccd1632ee) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/create-spdx: Add packageSupplier fieldJoshua Watt2022-02-071-0/+8
| | | | | | | | | | | | Per NIST SBoM recommendations, include the Package Supplier field for all SPDX packages that are created. This field should generally be set to the person or organization that is performing the build, since they would be considered the "supplier" of the SPDX packages. (From OE-Core rev: ca48349501e0ec93dc2448d064e1567fca390bf5) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: create directory of CVE_CHECK_MANIFEST before copyStefan Herbrechtsmeier2022-02-071-0/+1
| | | | | | | | | | Create directory of the CVE_CHECK_MANIFEST variable before copy to it, so that the variable can use an arbitrary directory name. (From OE-Core rev: 9829c16301bf2dce39fa046401a984f112fa0322) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Pass dv (debug_vars) around instead of individual varsPeter Kjellerstedt2022-02-051-11/+11
| | | | | | | | | | This simplifies the APIs for splitdebuginfo(), splitstaticdebuginfo() and inject_minidebuginfo() (From OE-Core rev: 9b00cf049032a9ed7ba3c63d3c37c7414f94edbf) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Make package_debug_vars() return a dictPeter Kjellerstedt2022-02-051-45/+51
| | | | | | | | | It simplifies the API to return one dict instead of seven strings. (From OE-Core rev: 610c790a94591da5c3a6b1db938cd85e2cbdbe5a) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Split out package_debug_vars from split_and_strip_filesPeter Kjellerstedt2022-02-051-11/+18
| | | | | | | | | | | | The split_and_strip_files() function is big and hard to follow. This takes a small step to improve that by splitting out the part that sets up the variables used to implement the various debug splitting methods specified by PACKAGE_DEBUG_SPLIT_STYLE. (From OE-Core rev: e414c6ec8563f9c448f1421f33870a908a0353b4) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-prelink: Remove bbclassKhem Raj2022-02-051-76/+0
| | | | | | | | | | | | Upcoming glibc 2.35 is dropping support for prelinker, this just ensures that we do not carry non-working classes. [1] [1] https://patchwork.sourceware.org/project/glibc/patch/20220121172951.285848-2-adhemerval.zanella@linaro.org/ (From OE-Core rev: 857baaf9e3d181ca18264e85d90b899fd94acff9) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* abi_version/sstate: Bump for hash equivalence fixRichard Purdie2022-02-051-1/+1
| | | | | | | | | With the hash equivalence fix, we need to bump the sstate and hash equivalence version numbers to ensure older task hashes aren't matched into the new namespace. (From OE-Core rev: 3f229267e0588c747265e849ee19724033cc6a80) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Add extra hash handling codeRichard Purdie2022-02-052-1/+34
| | | | | | | | | | | | | | | | | Target build output, stored in do_populate_sysroot or do_package can depend not only upon direct dependencies but also indirect ones. A good example is linux-libc-headers. The toolchain depends on this but most target recipes do not. There are some headers which are not used by the toolchain build and do not change the toolchain task output, hence the task hashes can change without changing the sysroot output of that recipe yet they can influence others. A specific example is rtc.h which can change rtcwake.c in util-linux but is not used in the glibc or gcc build. To account for this, we need to account for the populate_sysroot hashes in the task output hashes. (From OE-Core rev: 1cf62882bbac543960e4815d117ffce0e53bda07) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gobject-introspection: replace prelink-rtld with objdump -pAlexander Kanavin2022-02-011-1/+1
| | | | | | | | | | | | | g-i internally processes the output with regexes, and seems happy with what objdump is printing. It only needs to resolve the library name as passed to the linker to the library file name. Also recursive resolution (that ldd is doing and objdump is not) is not necessary. (From OE-Core rev: 767e0880d4d729e659e859dd99c1cdb084b8ba51) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: A third fix for for touching files inside pseudoPeter Kjellerstedt2022-01-261-5/+9
| | | | | | | | | | | | | | | | | | | | | | | This continues where commit676757f "sstate: fix touching files inside pseudo" and commit 29fc8599 "sstate: another fix for touching files inside pseudo" left off. The previous changes switched from trying to check if the sstate file is writable before touching it, to always touching the sstate file and ignoring any errors. However, if the sstate file is actually a symbolic link that links to nothing, this would actually result in an empty sstate file being created. And this in turn leads to that future setscene tasks will fail when they try to unpack the empty file. Change the code so that if an sstate file linking to nothing already exists, it is overwritten with the new sstate file. Also change it so that the temporary file that is used is always removed, even if ln fails to link the sstate file to it. (From OE-Core rev: 552197a0c4c9f75a9177c00b197ea91296ed9fc4) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Allow initramfs to be built from a separate multiconfigAlejandro Hernandez Samaniego2022-01-261-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There may be a case where we want to build an initramfs image that doesnt inherit the same DISTRO_FEATURES (or others) from the main image being built. For example we may want our initramfs not to inherit a certain conf or feature, say we want to use musl for a smaller footprint, but if we are using TCLIBC=glibc for our DISTRO (and inherently our main image), the initramfs image would inherit that conf and be forced to use glibc, growing in size as a side effect, currently avoiding this is not supported. Allow the kernel class to create a multiconfig dependency (mcdepends) vs depends for do_bundle_initramfs and define our INITRAMFS_IMAGE from a separate multiconfig via two new variables: INITRAMFS_MULTICONFIG and INITRAMFS_DEPLOY_DIR_IMAGE which define the multiconfig where the initramfs image should be coming from and its deploy directory respectively, these two keep a default definition which preserves current behavior (do_bundle_initramfs uses depends). Example usage: - Create and use multiconfig initramfscfg.conf and set TCLIBC=musl there, along with its TMPDIR. - Add the following to our DISTRO.conf: INITRAMFS_MULTICONFIG = "initramfscfg" and set INITRAMFS_DEPLOY_DIR_IMAGE to the DEPLOY_DIR_IMAGE of the initramfscfg multiconfig (hence our main kernel will be able to grab it from there and bundle it). This will result in our musl based initramfs bundled in our main kernel and our main image to be glibc based. (From OE-Core rev: 2d317b2685211f1b0d102705a63c0000df96f45f) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* crate-fetch: Switch to version contained in bitbakeRichard Purdie2022-01-192-29/+0
| | | | | | | | | This avoids various sstate fetch errors from weird silent failures in the sstate archive testing code caused by lack of srcrev support in the crate fetcher. (From OE-Core rev: 8205668a339946974b4460cf1ca7e6e7a645479b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Improve failure to obtain archive message/handlingRichard Purdie2022-01-191-1/+3
| | | | | | | | | | | | | | The bb.fatal() case where sstate failed to find/use an archive in setcene tasks is suboptimal. Bitbakes handling of setscene tasks will be to warn but the fatal will turn this into an error, despite the real task being rerun. In these failure cases other messages would usually have been printed so turn this into a warning and raise a handled exception status so that bitbake knows to fail the task but not print more messages. (From OE-Core rev: 7875baeca7a3ed216b2442fb8771e51efbfa5a4f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Show better exception information for failuresRichard Purdie2022-01-191-2/+2
| | | | | | | | | | | | Errors like SState: cannot test file://universal/5f/10/sstate:m4-native:x86_64-linux:1.4.19:r0:x86_64:7:5f108b175274798b17950b5ee686bf61445e90fb204d7f795e5b879b5603e88b_deploy_source_date_epoch.tar.zst: 'GIT_SSL_CAINFO' aren't useful, try and improve on this. (From OE-Core rev: 1701d40536db098adb26508799bae13733f1a6fd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.bbclass: set rpm file color for 32-bit multilib imageKai Kang2022-01-171-0/+4
| | | | | | | | | | | | The default rpm file color is 2 that Elf64 is preferred according to OE-Core commit 56fa74497393a10f751d01c600c1936761e00294. For 32-bit multilib image such as lib32-core-image-sato, Elf32 should be preferred. Set it in multilib.bbclass. (From OE-Core rev: 195f4a648251e53ed3070e060ad3e3f3832793e3) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/native: Propagate dependencies to outhashJoshua Watt2022-01-171-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Native task outputs are directly run on the build system during the build after being built. Even if the output of a native recipe doesn't change, a change in one of its dependencies may cause a change in the output it generates (e.g. rpm output depends on the output of its dependent zstd library). This can cause poor interactions with hash equivalence, since this recipe's output-changing dependency is "hidden" and downstream tasks only see that this recipe has the same outhash and therefore is equivalent. This can result in different output in different cases and issues with reproducible builds in parcular (e.g. rpm compression changes for the same content). To resolve this, unhide the output-changing dependency by adding it's unihash to this tasks outhash calculation. Unfortunately, we don't know specifically know which dependencies are output-changing, so we have to add all of them. [YOCTO #14685] (From OE-Core rev: d6c7b9f4f0e61fa6546d3644e27abe3e96f597e2) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Preserve permissions when extracting tar archiveJacob Kroon2022-01-151-1/+1
| | | | | | | | | | | | This is done by default when tar is run by the superuser, but for native recipes the corresponding task is not run as root under pseudo, so pass the flag explicitly. Suggested-by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: 32f01e57e1e915e8121609fb48b0b0254e625957) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Drop TUNEABI, TUNEABI_WHITELIST, TUNEABI_OVERRIDERichard Purdie2022-01-141-42/+0
| | | | | | | | | | | | | These were added nearly a decade ago but there are no users in OE-Core. I checked with the likely users and they seem to have no current usage either. Therefore remove them. If needed for some prebuilt library somewhere, they could be implemented in the layer using them instead but I doubt these are in use any longer. (From OE-Core rev: 95e196babc3c18dcf0aedfb03e85493c8ae54700) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx: Add kernel work-shared sourceSaul Wold2022-01-131-1/+5
| | | | | | | | | | | Since the kernel source is stored in work-shared, we need to add it to the search path so the kernel and kernel-modules source code can be found correctly. (From OE-Core rev: 93a94890b9f2679945e96973937b209aa12302b7) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Add support for kernel strippingSaul Wold2022-01-131-12/+5
| | | | | | | | | | | | | | Extend runstrip() to accept additional argument to enable sharing it with the kernel do_strip() so that KERNEL_IMAGE_STRIP_EXTRA_SECTIONS can be passed. Since is_elf() understands kernel modules there is no need to keep a seperate list for kernmodules or hardcode the values to runstrip. (From OE-Core rev: e09a8fa931fe617afc05bd5e00dca5dd3fe386e8) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: use common strip()Saul Wold2022-01-131-25/+19
| | | | | | | | | | | | | | | Re-use the runstrip() code from oe.packaging, for the kernel stripping process. Since runstrip() is python the kernel do_strip() need to be converted to Python also. The stripped kernel image will be used for deployment in do_deploy(). This will allow the package.bbclass to split an unstripped kernel binary for the debug information and extended packagedata. The extended package data is used by create-spdx. (From OE-Core rev: e8d9caede5f08154ca615fdaba676b7a4ae05b01) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Only allow network in existing network accessing codeRichard Purdie2022-01-125-0/+7
| | | | | | | | | | | | | | | | | | | Use the newly added network task flag against tasks where network access is expected. This is do_fetch, do_checkuri, do_testimage, do_testsdk and do_testsdkext. We can't disable networking in sstate tasks due to sstate downloads and also so we can report hash equivalence to the server so network access is enabled in sstate tasks. Access within build-appliance do_image is also allowed due to the use of pip, this is a poor example made rather obvious now and needs to be reworked. Network access anywhere else in any other task isn't allowed. (From OE-Core rev: 7ce1e88a3ad85bbb925bb9f7167dc0a5fd1c27f4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_rpm.bbclass: distutils -> sysconfig moduleTim Orling2022-01-121-1/+1
| | | | | | | | | | | | Change a comment to reference our custom changes to the sysconfig module, as dnf no longer uses distutils. [YOCTO #14610] (From OE-Core rev: b4e351c67cd6af9cabac70cddb67129ca2590222) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>