Release 4.0 (kirkstone)
This section provides migration information for moving to the Yocto Project 4.0 Release (codename “kirkstone”) from the prior release.
Recipe changes
To use more inclusive language in the code and documentation, some variables have been renamed or even deleted. BitBake will stop with an error when renamed or removed variables still exist in your recipes or configuration.
Please note that the change applies also to environmental variables, so make sure you use a fresh environment for your build.
The following variables have changed their names:
BB_ENV_WHITELISTbecame BB_ENV_PASSTHROUGHBB_ENV_EXTRAWHITEbecame BB_ENV_PASSTHROUGH_ADDITIONSBB_HASHBASE_WHITELISTbecame BB_BASEHASH_IGNORE_VARSBB_HASHCONFIG_WHITELISTbecame BB_HASHCONFIG_IGNORE_VARSBB_HASHTASK_WHITELISTbecameBB_TASKHASH_IGNORE_TASKSBB_SETSCENE_ENFORCE_WHITELISTbecameBB_SETSCENE_ENFORCE_IGNORE_TASKSCVE_CHECK_PN_WHITELISTbecame CVE_CHECK_SKIP_RECIPECVE_CHECK_WHITELISTbecame CVE_CHECK_IGNOREICECC_USER_CLASS_BLbecame ICECC_CLASS_DISABLEICECC_SYSTEM_CLASS_BLbecame ICECC_CLASS_DISABLEICECC_USER_PACKAGE_WLbecame ICECC_RECIPE_ENABLEICECC_USER_PACKAGE_BLbecame ICECC_RECIPE_DISABLEICECC_SYSTEM_PACKAGE_BLbecame ICECC_RECIPE_DISABLELICENSE_FLAGS_WHITELISTbecame LICENSE_FLAGS_ACCEPTEDMULTI_PROVIDER_WHITELISTbecame BB_MULTI_PROVIDER_ALLOWEDPNBLACKLISTbecame SKIP_RECIPESDK_LOCAL_CONF_BLACKLISTbecame ESDK_LOCALCONF_REMOVESDK_LOCAL_CONF_WHITELISTbecame ESDK_LOCALCONF_ALLOWSDK_INHERIT_BLACKLISTbecame ESDK_CLASS_INHERIT_DISABLESSTATE_DUPWHITELISTbecameSSTATE_ALLOW_OVERLAP_FILESSYSROOT_DIRS_BLACKLISTbecame SYSROOT_DIRS_IGNOREUNKNOWN_CONFIGURE_WHITELISTbecame UNKNOWN_CONFIGURE_OPT_IGNORE
In addition,
BB_STAMP_WHITELIST,BB_STAMP_POLICY,INHERIT_BLACKLISTandTUNEABI_WHITELISThave been removed.Many internal variable names have been also renamed accordingly.
In addition, in the
cve-checkoutput, the CVE issue statusWhitelistedhas been renamed toIgnored.A convert-variable-renames.py script is provided to convert your recipes and configuration, and also warns you about the use of problematic words. The script performs changes and you need to review them before committing. An example warning looks like:
poky/scripts/lib/devtool/upgrade.py needs further work at line 275 since it contains abort
Because of the uncertainty in future default branch names in git repositories, it is now required to add a branch name to all URLs described by
git://andgitsm://SRC_URI entries. For example:SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
A convert-srcuri script to convert your recipes is available in OpenEmbedded-Core (OE-Core) and in Poky.
Because of GitHub dropping support for the git: protocol, recipes now need to use
;protocol=httpsat the end of GitHub URLs. The same script as above can be used to convert the recipes.Network access from tasks is now disabled by default on kernels which support this feature (on most recent distros such as CentOS 8 and Debian 11 onwards). This means that tasks accessing the network need to be marked as such with the
networkflag. For example:do_mytask[network] = "1"
This is allowed by default from
do_fetchbut not from any of our other standard tasks. Recipes shouldn’t be accessing the network outside ofdo_fetchas it usually undermines fetcher source mirroring, image and licence manifests, software auditing and supply chain security.The TOPDIR variable and the current working directory are no longer modified when parsing recipes. Any code depending on that behaviour will no longer work.
The
append,prependandremoveoperators can now only be combined with=and:=operators. To the exception of theappendplus+=andprependplus=+combinations, all combinations could be factored up to theappend,prependorremovein the combination. This brought a lot of confusion on how the override style syntax operators work and should be used. Therefore, those combinations can simply be replaced by a singleappend,prependorremoveoperator without any additional change. For theappendplus+=(andprependplus=+) combinations, the content should be prefixed (respectively suffixed) by a space to maintain the same behavior. You can learn more about override style syntax operators (append,prependandremove) in the BitBake documentation: Appending and Prepending (Override Style Syntax) and Removal (Override Style Syntax).allarch packagegroups can no longer depend on packages which use PKG renaming such as debian.bbclass.
LICENSE definitions now have to use SPDX identifiers. A convert-spdx-licenses.py script can be used to update your recipes.
SRC_URI: a new Crate Fetcher (crate://) is available for Rust packages.
Class changes
The
distutils*.bbclasseshave been moved tometa-python. The classes and DISTUTILS* variables have been removed from the documentation.blacklist.bbclassis removed and the functionality moved to the base class with a more descriptivevarflagnamed SKIP_RECIPE which will use the SkipRecipe() function. The usage will remain the same:SKIP_RECIPE[my-recipe] = "Reason for skipping recipe"
The Python package build process based on wheels. Here are the new Python packaging classes that should be used: python-flit_core, setuptools_python-build_meta and python_poetry_core.
image-prelink.bbclassclass is removed.New overlayfs and overlayfs-etc classes are available to make it easier to overlay read-only filesystems (for example) with OverlayFS.
Configuration changes
The Yocto Project now allows to reuse Shared State from its autobuilder. If the network connection between our server and your machine is faster than you would build recipes, you can try to speed up your builds by using such Share State and Hash Equivalence by setting:
BB_SIGNATURE_HANDLER = "OEEquivHash" BB_HASHSERVE = "auto" BB_HASHSERVE_UPSTREAM = "typhoon.yocto.io:8687" SSTATE_MIRRORS ?= "file://.* https://sstate.yoctoproject.org/4.0/PATH;downloadfilename=PATH"
Supported host distribution changes
Changes for release notes
Share State cache: now using ZStandard (zstd) instead of Gzip compression, for better performance.
BitBake has an improved
setscenetask display.This release fixes the reproducibility issues with
rust-llvmandgolang. Recipes in OpenEmbedded-Core are now fully reproducible.