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