1*517393d9SAndrew Geissler.. SPDX-License-Identifier: CC-BY-SA-2.0-UK 2*517393d9SAndrew Geissler 303907ee1SPatrick WilliamsRelease 4.0 (kirkstone) 403907ee1SPatrick Williams======================= 503907ee1SPatrick Williams 603907ee1SPatrick WilliamsMigration notes for 4.0 (kirkstone) 703907ee1SPatrick Williams----------------------------------- 803907ee1SPatrick Williams 903907ee1SPatrick WilliamsThis section provides migration information for moving to the Yocto 1003907ee1SPatrick WilliamsProject 4.0 Release (codename "kirkstone") from the prior release. 1103907ee1SPatrick Williams 1203907ee1SPatrick Williams.. _migration-4.0-inclusive-language: 1303907ee1SPatrick Williams 1403907ee1SPatrick WilliamsInclusive language improvements 1503907ee1SPatrick Williams~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1603907ee1SPatrick Williams 1703907ee1SPatrick WilliamsTo use more `inclusive language <https://inclusivenaming.org/>`__ 1803907ee1SPatrick Williamsin the code and documentation, some variables have been renamed, and 1903907ee1SPatrick Williamssome have been deleted where they are no longer needed. In many cases the 2003907ee1SPatrick Williamsnew names are also easier to understand. BitBake will stop with an error when 2103907ee1SPatrick Williamsrenamed or removed variables still exist in your recipes or configuration. 2203907ee1SPatrick Williams 2303907ee1SPatrick WilliamsPlease note that the change applies also to environmental variables, so 2403907ee1SPatrick Williamsmake sure you use a fresh environment for your build. 2503907ee1SPatrick Williams 2603907ee1SPatrick WilliamsThe following variables have changed their names: 2703907ee1SPatrick Williams 2803907ee1SPatrick Williams- ``BB_ENV_WHITELIST`` became :term:`BB_ENV_PASSTHROUGH` 2903907ee1SPatrick Williams- ``BB_ENV_EXTRAWHITE`` became :term:`BB_ENV_PASSTHROUGH_ADDITIONS` 3003907ee1SPatrick Williams- ``BB_HASHBASE_WHITELIST`` became :term:`BB_BASEHASH_IGNORE_VARS` 3103907ee1SPatrick Williams- ``BB_HASHCONFIG_WHITELIST`` became :term:`BB_HASHCONFIG_IGNORE_VARS` 3203907ee1SPatrick Williams- ``BB_HASHTASK_WHITELIST`` became ``BB_TASKHASH_IGNORE_TASKS`` 3303907ee1SPatrick Williams- ``BB_SETSCENE_ENFORCE_WHITELIST`` became ``BB_SETSCENE_ENFORCE_IGNORE_TASKS`` 3403907ee1SPatrick Williams- ``CVE_CHECK_PN_WHITELIST`` became :term:`CVE_CHECK_SKIP_RECIPE` 3503907ee1SPatrick Williams- ``CVE_CHECK_WHITELIST`` became :term:`CVE_CHECK_IGNORE` 3603907ee1SPatrick Williams- ``ICECC_USER_CLASS_BL`` became :term:`ICECC_CLASS_DISABLE` 3703907ee1SPatrick Williams- ``ICECC_SYSTEM_CLASS_BL`` became :term:`ICECC_CLASS_DISABLE` 3803907ee1SPatrick Williams- ``ICECC_USER_PACKAGE_WL`` became :term:`ICECC_RECIPE_ENABLE` 3903907ee1SPatrick Williams- ``ICECC_USER_PACKAGE_BL`` became :term:`ICECC_RECIPE_DISABLE` 4003907ee1SPatrick Williams- ``ICECC_SYSTEM_PACKAGE_BL`` became :term:`ICECC_RECIPE_DISABLE` 4103907ee1SPatrick Williams- ``LICENSE_FLAGS_WHITELIST`` became :term:`LICENSE_FLAGS_ACCEPTED` 4203907ee1SPatrick Williams- ``MULTI_PROVIDER_WHITELIST`` became :term:`BB_MULTI_PROVIDER_ALLOWED` 4303907ee1SPatrick Williams- ``PNBLACKLIST`` became :term:`SKIP_RECIPE` 4403907ee1SPatrick Williams- ``SDK_LOCAL_CONF_BLACKLIST`` became :term:`ESDK_LOCALCONF_REMOVE` 4503907ee1SPatrick Williams- ``SDK_LOCAL_CONF_WHITELIST`` became :term:`ESDK_LOCALCONF_ALLOW` 4603907ee1SPatrick Williams- ``SDK_INHERIT_BLACKLIST`` became :term:`ESDK_CLASS_INHERIT_DISABLE` 4703907ee1SPatrick Williams- ``SSTATE_DUPWHITELIST`` became ``SSTATE_ALLOW_OVERLAP_FILES`` 4803907ee1SPatrick Williams- ``SYSROOT_DIRS_BLACKLIST`` became :term:`SYSROOT_DIRS_IGNORE` 4903907ee1SPatrick Williams- ``UNKNOWN_CONFIGURE_WHITELIST`` became :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` 50615f2f11SAndrew Geissler- ``WHITELIST_<license>`` became :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS` 5103907ee1SPatrick Williams 5203907ee1SPatrick WilliamsIn addition, ``BB_STAMP_WHITELIST``, ``BB_STAMP_POLICY``, ``INHERIT_BLACKLIST``, 5303907ee1SPatrick Williams``TUNEABI``, ``TUNEABI_WHITELIST``, and ``TUNEABI_OVERRIDE`` have been removed. 5403907ee1SPatrick Williams 5503907ee1SPatrick WilliamsMany internal variable names have been also renamed accordingly. 5603907ee1SPatrick Williams 5703907ee1SPatrick WilliamsIn addition, in the ``cve-check`` output, the CVE issue status ``Whitelisted`` 5803907ee1SPatrick Williamshas been renamed to ``Ignored``. 5903907ee1SPatrick Williams 6003907ee1SPatrick WilliamsThe :term:`BB_DISKMON_DIRS` variable value now uses the term ``HALT`` 6103907ee1SPatrick Williamsinstead of ``ABORT``. 6203907ee1SPatrick Williams 6303907ee1SPatrick WilliamsA :oe_git:`convert-variable-renames.py 6403907ee1SPatrick Williams</openembedded-core/tree/scripts/contrib/convert-variable-renames.py>` 6503907ee1SPatrick Williamsscript is provided to convert your recipes and configuration, 6603907ee1SPatrick Williamsand also warns you about the use of problematic words. The script performs 6703907ee1SPatrick Williamschanges and you need to review them before committing. An example warning 6803907ee1SPatrick Williamslooks like:: 6903907ee1SPatrick Williams 7003907ee1SPatrick Williams poky/scripts/lib/devtool/upgrade.py needs further work at line 275 since it contains abort 7103907ee1SPatrick Williams 7203907ee1SPatrick WilliamsFetching changes 7303907ee1SPatrick Williams~~~~~~~~~~~~~~~~ 7403907ee1SPatrick Williams 7503907ee1SPatrick Williams- Because of the uncertainty in future default branch names in git repositories, 7603907ee1SPatrick Williams it is now required to add a branch name to all URLs described 7703907ee1SPatrick Williams by ``git://`` and ``gitsm://`` :term:`SRC_URI` entries. For example:: 7803907ee1SPatrick Williams 7903907ee1SPatrick Williams SRC_URI = "git://git.denx.de/u-boot.git;branch=master" 8003907ee1SPatrick Williams 8103907ee1SPatrick Williams A :oe_git:`convert-srcuri </openembedded-core/tree/scripts/contrib/convert-srcuri.py>` 8203907ee1SPatrick Williams script to convert your recipes is available in :term:`OpenEmbedded-Core (OE-Core)` 8303907ee1SPatrick Williams and in :term:`Poky`. 8403907ee1SPatrick Williams 8503907ee1SPatrick Williams- Because of `GitHub dropping support for the git: 8603907ee1SPatrick Williams protocol <https://github.blog/2021-09-01-improving-git-protocol-security-github/>`__, 8703907ee1SPatrick Williams recipes now need to use ``;protocol=https`` at the end of GitHub 8803907ee1SPatrick Williams URLs. The same ``convert-srcuri`` script mentioned above can be used to convert 8903907ee1SPatrick Williams your recipes. 9003907ee1SPatrick Williams 9103907ee1SPatrick Williams- Network access from tasks is now disabled by default on kernels which support 9203907ee1SPatrick Williams this feature (on most recent distros such as CentOS 8 and Debian 11 onwards). 9303907ee1SPatrick Williams This means that tasks accessing the network need to be marked as such with the ``network`` 9403907ee1SPatrick Williams flag. For example:: 9503907ee1SPatrick Williams 9603907ee1SPatrick Williams do_mytask[network] = "1" 9703907ee1SPatrick Williams 982194f503SPatrick Williams This is allowed by default from :ref:`ref-tasks-fetch` but not from any of our other standard 992194f503SPatrick Williams tasks. Recipes shouldn't be accessing the network outside of :ref:`ref-tasks-fetch` as it 10003907ee1SPatrick Williams usually undermines fetcher source mirroring, image and licence manifests, software 10103907ee1SPatrick Williams auditing and supply chain security. 10203907ee1SPatrick Williams 10303907ee1SPatrick WilliamsLicense changes 10403907ee1SPatrick Williams~~~~~~~~~~~~~~~ 10503907ee1SPatrick Williams 10603907ee1SPatrick Williams- The ambiguous "BSD" license has been removed from the ``common-licenses`` directory. 10703907ee1SPatrick Williams Each recipe that fetches or builds BSD-licensed code should specify the proper 10803907ee1SPatrick Williams version of the BSD license in its :term:`LICENSE` value. 10903907ee1SPatrick Williams 11003907ee1SPatrick Williams- :term:`LICENSE` variable values should now use `SPDX identifiers <https://spdx.org/licenses/>`__. 11103907ee1SPatrick Williams If they do not, by default a warning will be shown. A 11203907ee1SPatrick Williams :oe_git:`convert-spdx-licenses.py </openembedded-core/tree/scripts/contrib/convert-spdx-licenses.py>` 11303907ee1SPatrick Williams script can be used to update your recipes. 11403907ee1SPatrick Williams 11503907ee1SPatrick Williams- :term:`INCOMPATIBLE_LICENSE` should now use `SPDX identifiers <https://spdx.org/licenses/>`__. 11603907ee1SPatrick Williams Additionally, wildcarding is now limited to specifically supported values - 11703907ee1SPatrick Williams see the :term:`INCOMPATIBLE_LICENSE` documentation for further information. 11803907ee1SPatrick Williams 11903907ee1SPatrick Williams- The ``AVAILABLE_LICENSES`` variable has been removed. This variable was a performance 12003907ee1SPatrick Williams liability and is highly dependent on which layers are added to the configuration, 12103907ee1SPatrick Williams which can cause signature issues for users. In addition the ``available_licenses()`` 122*517393d9SAndrew Geissler function has been removed from the :ref:`ref-classes-license` class as 12303907ee1SPatrick Williams it is no longer needed. 12403907ee1SPatrick Williams 12503907ee1SPatrick WilliamsRemoved recipes 12603907ee1SPatrick Williams~~~~~~~~~~~~~~~ 12703907ee1SPatrick Williams 12803907ee1SPatrick WilliamsThe following recipes have been removed in this release: 12903907ee1SPatrick Williams 13003907ee1SPatrick Williams- ``dbus-test``: merged into main dbus recipe 13103907ee1SPatrick Williams- ``libid3tag``: moved to meta-oe - no longer needed by anything in OE-Core 13203907ee1SPatrick Williams- ``libportal``: moved to meta-gnome - no longer needed by anything in OE-Core 13303907ee1SPatrick Williams- ``linux-yocto``: removed version 5.14 recipes (5.15 and 5.10 still provided) 13403907ee1SPatrick Williams- ``python3-nose``: has not changed since 2016 upstream, and no longer needed by anything in OE-Core 13503907ee1SPatrick Williams- ``rustfmt``: not especially useful as a standalone recipe 13603907ee1SPatrick Williams 13703907ee1SPatrick WilliamsPython changes 13803907ee1SPatrick Williams~~~~~~~~~~~~~~ 13903907ee1SPatrick Williams 14003907ee1SPatrick Williams- ``distutils`` has been deprecated upstream in Python 3.10 and thus the ``distutils*`` 14103907ee1SPatrick Williams classes have been moved to ``meta-python``. Recipes that inherit the ``distutils*`` 14203907ee1SPatrick Williams classes should be updated to inherit ``setuptools*`` equivalents instead. 14303907ee1SPatrick Williams 14403907ee1SPatrick Williams- The Python package build process is now based on `wheels <https://pythonwheels.com/>`__. 14503907ee1SPatrick Williams Here are the new Python packaging classes that should be used: 146*517393d9SAndrew Geissler :ref:`ref-classes-python_flit_core`, :ref:`ref-classes-python_setuptools_build_meta` 147*517393d9SAndrew Geissler and :ref:`ref-classes-python_poetry_core`. 14803907ee1SPatrick Williams 149*517393d9SAndrew Geissler- The :ref:`ref-classes-setuptools3` class :ref:`ref-tasks-install` task now 15003907ee1SPatrick Williams installs the ``wheel`` binary archive. In current versions of ``setuptools`` the 15103907ee1SPatrick Williams legacy ``setup.py install`` method is deprecated. If the ``setup.py`` cannot be used 15203907ee1SPatrick Williams with wheels, for example it creates files outside of the Python module or standard 153*517393d9SAndrew Geissler entry points, then :ref:`ref-classes-setuptools3_legacy` should 15403907ee1SPatrick Williams be used instead. 15503907ee1SPatrick Williams 15603907ee1SPatrick WilliamsPrelink removed 15703907ee1SPatrick Williams~~~~~~~~~~~~~~~ 15803907ee1SPatrick Williams 15903907ee1SPatrick WilliamsPrelink has been dropped by ``glibc`` upstream in 2.36. It already caused issues with 16003907ee1SPatrick Williamsbinary corruption, has a number of open bugs and is of questionable benefit 16103907ee1SPatrick Williamswithout disabling load address randomization and PIE executables. 16203907ee1SPatrick Williams 16303907ee1SPatrick WilliamsWe disabled prelinking by default in the honister (3.4) release, but left it able 16403907ee1SPatrick Williamsto be enabled if desired. However, without glibc support it cannot be maintained 16503907ee1SPatrick Williamsany further, so all of the prelinking functionality has been removed in this release. 16603907ee1SPatrick WilliamsIf you were enabling the ``image-prelink`` class in :term:`INHERIT`, :term:`IMAGE_CLASSES`, 16703907ee1SPatrick Williams:term:`USER_CLASSES` etc in your configuration, then you will need to remove the 16803907ee1SPatrick Williamsreference(s). 16903907ee1SPatrick Williams 17003907ee1SPatrick WilliamsReproducible as standard 17103907ee1SPatrick Williams~~~~~~~~~~~~~~~~~~~~~~~~ 17203907ee1SPatrick Williams 17303907ee1SPatrick WilliamsReproducibility is now considered as standard functionality, thus the 17403907ee1SPatrick Williams``reproducible`` class has been removed and its previous contents merged into the 175*517393d9SAndrew Geissler:ref:`ref-classes-base` class. If you have references in your configuration to 17603907ee1SPatrick Williams``reproducible`` in :term:`INHERIT`, :term:`USER_CLASSES` etc. then they should be 17703907ee1SPatrick Williamsremoved. 17803907ee1SPatrick Williams 17903907ee1SPatrick WilliamsAdditionally, the ``BUILD_REPRODUCIBLE_BINARIES`` variable is no longer used. 18003907ee1SPatrick WilliamsSpecifically for the kernel, if you wish to enable build timestamping functionality 18103907ee1SPatrick Williamsthat is normally disabled for reproducibility reasons, you can do so by setting 18203907ee1SPatrick Williamsa new :term:`KERNEL_DEBUG_TIMESTAMPS` variable to "1". 18303907ee1SPatrick Williams 18403907ee1SPatrick WilliamsSupported host distribution changes 18503907ee1SPatrick Williams~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18603907ee1SPatrick Williams 1877784c429SPatrick Williams- Support for :wikipedia:`AlmaLinux <AlmaLinux>` 1887784c429SPatrick Williams hosts replacing :wikipedia:`CentOS <CentOS>`. 18903907ee1SPatrick Williams The following distribution versions were dropped: CentOS 8, Ubuntu 16.04 and Fedora 30, 31 and 32. 19003907ee1SPatrick Williams 19103907ee1SPatrick Williams- ``gcc`` version 7.5 is now required at minimum on the build host. For older 19203907ee1SPatrick Williams host distributions where this is not available, you can use the 193*517393d9SAndrew Geissler :term:`buildtools-extended` tarball (easily installable using 19403907ee1SPatrick Williams ``scripts/install-buildtools``). 19503907ee1SPatrick Williams 19603907ee1SPatrick Williams:append/:prepend in combination with other operators 19703907ee1SPatrick Williams~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19803907ee1SPatrick Williams 19903907ee1SPatrick WilliamsThe ``append``, ``prepend`` and ``remove`` operators can now only be combined with 20003907ee1SPatrick Williams``=`` and ``:=`` operators. To the exception of the ``append`` plus ``+=`` and 20103907ee1SPatrick Williams``prepend`` plus ``=+`` combinations, all combinations could be factored up to the 20203907ee1SPatrick Williams``append``, ``prepend`` or ``remove`` in the combination. This brought a lot of 20303907ee1SPatrick Williamsconfusion on how the override style syntax operators work and should be used. 20403907ee1SPatrick WilliamsTherefore, those combinations should be replaced by a single ``append``, 20503907ee1SPatrick Williams``prepend`` or ``remove`` operator without any additional change. 20603907ee1SPatrick WilliamsFor the ``append`` plus ``+=`` (and ``prepend`` plus ``=+``) combinations, 20703907ee1SPatrick Williamsthe content should be prefixed (respectively suffixed) by a space to maintain 20803907ee1SPatrick Williamsthe same behavior. You can learn more about override style syntax operators 20903907ee1SPatrick Williams(``append``, ``prepend`` and ``remove``) in the BitBake documentation: 21003907ee1SPatrick Williams:ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending and prepending (override style syntax)` 21103907ee1SPatrick Williamsand :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:removal (override style syntax)`. 21203907ee1SPatrick Williams 21303907ee1SPatrick WilliamsMiscellaneous changes 21403907ee1SPatrick Williams~~~~~~~~~~~~~~~~~~~~~ 21503907ee1SPatrick Williams 21603907ee1SPatrick Williams- ``blacklist.bbclass`` is removed and the functionality moved to the 217*517393d9SAndrew Geissler :ref:`ref-classes-base` class with a more descriptive 21803907ee1SPatrick Williams ``varflag`` variable named :term:`SKIP_RECIPE` which will use the `bb.parse.SkipRecipe()` 21903907ee1SPatrick Williams function. The usage remains the same, for example:: 22003907ee1SPatrick Williams 22103907ee1SPatrick Williams SKIP_RECIPE[my-recipe] = "Reason for skipping recipe" 22203907ee1SPatrick Williams 223*517393d9SAndrew Geissler- :ref:`ref-classes-allarch` packagegroups can no longer depend on packages 22403907ee1SPatrick Williams which use :term:`PKG` renaming such as :ref:`ref-classes-debian`. Such packagegroups 225*517393d9SAndrew Geissler recipes should be changed to avoid inheriting :ref:`ref-classes-allarch`. 22603907ee1SPatrick Williams 22703907ee1SPatrick Williams- The ``lnr`` script has been removed. ``lnr`` implemented the same behaviour as `ln --relative --symbolic`, 22803907ee1SPatrick Williams since at the time of creation `--relative` was only available in coreutils 8.16 22903907ee1SPatrick Williams onwards which was too new for the older supported distros. Current supported host 23003907ee1SPatrick Williams distros have a new enough version of coreutils, so it is no longer needed. If you have 23103907ee1SPatrick Williams any calls to ``lnr`` in your recipes or classes, they should be replaced with 23203907ee1SPatrick Williams `ln --relative --symbolic` or `ln -rs` if you prefer the short version. 23303907ee1SPatrick Williams 234*517393d9SAndrew Geissler- The ``package_qa_handle_error()`` function formerly in the :ref:`ref-classes-insane` 23503907ee1SPatrick Williams class has been moved and renamed - if you have any references in your own custom 23603907ee1SPatrick Williams classes they should be changed to ``oe.qa.handle_error()``. 23703907ee1SPatrick Williams 23803907ee1SPatrick Williams- When building ``perl``, Berkeley db support is no longer enabled by default, since 23903907ee1SPatrick Williams Berkeley db is largely obsolete. If you wish to reenable it, you can append ``bdb`` 24003907ee1SPatrick Williams to :term:`PACKAGECONFIG` in a ``perl`` bbappend or ``PACKAGECONFIG:pn-perl`` at 24103907ee1SPatrick Williams the configuration level. 24203907ee1SPatrick Williams 24303907ee1SPatrick Williams- For the ``xserver-xorg`` recipe, the ``xshmfence``, ``xmlto`` and ``systemd`` options 24403907ee1SPatrick Williams previously supported in :term:`PACKAGECONFIG` have been removed, as they are no 24503907ee1SPatrick Williams longer supported since the move from building it with autotools to meson in this release. 24603907ee1SPatrick Williams 24703907ee1SPatrick Williams- For the ``libsdl2`` recipe, various X11 features are now disabled by default (primarily 24803907ee1SPatrick Williams for reproducibility purposes in the native case) with options in :term:`EXTRA_OECMAKE` 24903907ee1SPatrick Williams within the recipe. These can be changed within a bbappend if desired. See the 25003907ee1SPatrick Williams ``libsdl2`` recipe for more details. 25103907ee1SPatrick Williams 25203907ee1SPatrick Williams- The ``cortexa72-crc`` and ``cortexa72-crc-crypto`` tunes have been removed since 25303907ee1SPatrick Williams the crc extension is now enabled by default for cortexa72. Replace any references to 25403907ee1SPatrick Williams these with ``cortexa72`` and ``cortexa72-crypto`` respectively. 25503907ee1SPatrick Williams 25603907ee1SPatrick Williams- The Python development shell (previously known as ``devpyshell``) feature has been 25703907ee1SPatrick Williams renamed to ``pydevshell``. To start it you should now run:: 25803907ee1SPatrick Williams 25903907ee1SPatrick Williams bitbake <target> -c pydevshell 26003907ee1SPatrick Williams 26103907ee1SPatrick Williams- The ``packagegroups-core-full-cmdline-libs`` packagegroup is no longer produced, as 26203907ee1SPatrick Williams libraries should normally be brought in via dependencies. If you have any references 26303907ee1SPatrick Williams to this then remove them. 26403907ee1SPatrick Williams 26503907ee1SPatrick Williams- The :term:`TOPDIR` variable and the current working directory are no longer modified 26603907ee1SPatrick Williams when parsing recipes. Any code depending on the previous behaviour will no longer 26703907ee1SPatrick Williams work - change any such code to explicitly use appropriate path variables instead. 26803907ee1SPatrick Williams 269*517393d9SAndrew Geissler- In order to exclude the kernel image from the image rootfs, 270*517393d9SAndrew Geissler :term:`RRECOMMENDS`\ ``:${KERNEL_PACKAGE_NAME}-base`` should be set instead of 271*517393d9SAndrew Geissler :term:`RDEPENDS`\ ``:${KERNEL_PACKAGE_NAME}-base``. 272