1*4882a593SmuzhiyunRelease 4.0 (kirkstone) 2*4882a593Smuzhiyun======================= 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunMigration notes for 4.0 (kirkstone) 5*4882a593Smuzhiyun----------------------------------- 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThis section provides migration information for moving to the Yocto 8*4882a593SmuzhiyunProject 4.0 Release (codename "kirkstone") from the prior release. 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun.. _migration-4.0-inclusive-language: 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunInclusive language improvements 13*4882a593Smuzhiyun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunTo use more `inclusive language <https://inclusivenaming.org/>`__ 16*4882a593Smuzhiyunin the code and documentation, some variables have been renamed, and 17*4882a593Smuzhiyunsome have been deleted where they are no longer needed. In many cases the 18*4882a593Smuzhiyunnew names are also easier to understand. BitBake will stop with an error when 19*4882a593Smuzhiyunrenamed or removed variables still exist in your recipes or configuration. 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunPlease note that the change applies also to environmental variables, so 22*4882a593Smuzhiyunmake sure you use a fresh environment for your build. 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunThe following variables have changed their names: 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun- ``BB_ENV_WHITELIST`` became :term:`BB_ENV_PASSTHROUGH` 27*4882a593Smuzhiyun- ``BB_ENV_EXTRAWHITE`` became :term:`BB_ENV_PASSTHROUGH_ADDITIONS` 28*4882a593Smuzhiyun- ``BB_HASHBASE_WHITELIST`` became :term:`BB_BASEHASH_IGNORE_VARS` 29*4882a593Smuzhiyun- ``BB_HASHCONFIG_WHITELIST`` became :term:`BB_HASHCONFIG_IGNORE_VARS` 30*4882a593Smuzhiyun- ``BB_HASHTASK_WHITELIST`` became ``BB_TASKHASH_IGNORE_TASKS`` 31*4882a593Smuzhiyun- ``BB_SETSCENE_ENFORCE_WHITELIST`` became ``BB_SETSCENE_ENFORCE_IGNORE_TASKS`` 32*4882a593Smuzhiyun- ``CVE_CHECK_PN_WHITELIST`` became :term:`CVE_CHECK_SKIP_RECIPE` 33*4882a593Smuzhiyun- ``CVE_CHECK_WHITELIST`` became :term:`CVE_CHECK_IGNORE` 34*4882a593Smuzhiyun- ``ICECC_USER_CLASS_BL`` became :term:`ICECC_CLASS_DISABLE` 35*4882a593Smuzhiyun- ``ICECC_SYSTEM_CLASS_BL`` became :term:`ICECC_CLASS_DISABLE` 36*4882a593Smuzhiyun- ``ICECC_USER_PACKAGE_WL`` became :term:`ICECC_RECIPE_ENABLE` 37*4882a593Smuzhiyun- ``ICECC_USER_PACKAGE_BL`` became :term:`ICECC_RECIPE_DISABLE` 38*4882a593Smuzhiyun- ``ICECC_SYSTEM_PACKAGE_BL`` became :term:`ICECC_RECIPE_DISABLE` 39*4882a593Smuzhiyun- ``LICENSE_FLAGS_WHITELIST`` became :term:`LICENSE_FLAGS_ACCEPTED` 40*4882a593Smuzhiyun- ``MULTI_PROVIDER_WHITELIST`` became :term:`BB_MULTI_PROVIDER_ALLOWED` 41*4882a593Smuzhiyun- ``PNBLACKLIST`` became :term:`SKIP_RECIPE` 42*4882a593Smuzhiyun- ``SDK_LOCAL_CONF_BLACKLIST`` became :term:`ESDK_LOCALCONF_REMOVE` 43*4882a593Smuzhiyun- ``SDK_LOCAL_CONF_WHITELIST`` became :term:`ESDK_LOCALCONF_ALLOW` 44*4882a593Smuzhiyun- ``SDK_INHERIT_BLACKLIST`` became :term:`ESDK_CLASS_INHERIT_DISABLE` 45*4882a593Smuzhiyun- ``SSTATE_DUPWHITELIST`` became ``SSTATE_ALLOW_OVERLAP_FILES`` 46*4882a593Smuzhiyun- ``SYSROOT_DIRS_BLACKLIST`` became :term:`SYSROOT_DIRS_IGNORE` 47*4882a593Smuzhiyun- ``UNKNOWN_CONFIGURE_WHITELIST`` became :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` 48*4882a593Smuzhiyun- ``WHITELIST_<license>`` became ``INCOMPATIBLE_LICENSE_EXCEPTIONS`` 49*4882a593Smuzhiyun 50*4882a593SmuzhiyunIn addition, ``BB_STAMP_WHITELIST``, ``BB_STAMP_POLICY``, ``INHERIT_BLACKLIST``, 51*4882a593Smuzhiyun``TUNEABI``, ``TUNEABI_WHITELIST``, and ``TUNEABI_OVERRIDE`` have been removed. 52*4882a593Smuzhiyun 53*4882a593SmuzhiyunMany internal variable names have been also renamed accordingly. 54*4882a593Smuzhiyun 55*4882a593SmuzhiyunIn addition, in the ``cve-check`` output, the CVE issue status ``Whitelisted`` 56*4882a593Smuzhiyunhas been renamed to ``Ignored``. 57*4882a593Smuzhiyun 58*4882a593SmuzhiyunThe :term:`BB_DISKMON_DIRS` variable value now uses the term ``HALT`` 59*4882a593Smuzhiyuninstead of ``ABORT``. 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunA :oe_git:`convert-variable-renames.py 62*4882a593Smuzhiyun</openembedded-core/tree/scripts/contrib/convert-variable-renames.py>` 63*4882a593Smuzhiyunscript is provided to convert your recipes and configuration, 64*4882a593Smuzhiyunand also warns you about the use of problematic words. The script performs 65*4882a593Smuzhiyunchanges and you need to review them before committing. An example warning 66*4882a593Smuzhiyunlooks like:: 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun poky/scripts/lib/devtool/upgrade.py needs further work at line 275 since it contains abort 69*4882a593Smuzhiyun 70*4882a593SmuzhiyunFetching changes 71*4882a593Smuzhiyun~~~~~~~~~~~~~~~~ 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun- Because of the uncertainty in future default branch names in git repositories, 74*4882a593Smuzhiyun it is now required to add a branch name to all URLs described 75*4882a593Smuzhiyun by ``git://`` and ``gitsm://`` :term:`SRC_URI` entries. For example:: 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun SRC_URI = "git://git.denx.de/u-boot.git;branch=master" 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun A :oe_git:`convert-srcuri </openembedded-core/tree/scripts/contrib/convert-srcuri.py>` 80*4882a593Smuzhiyun script to convert your recipes is available in :term:`OpenEmbedded-Core (OE-Core)` 81*4882a593Smuzhiyun and in :term:`Poky`. 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun- Because of `GitHub dropping support for the git: 84*4882a593Smuzhiyun protocol <https://github.blog/2021-09-01-improving-git-protocol-security-github/>`__, 85*4882a593Smuzhiyun recipes now need to use ``;protocol=https`` at the end of GitHub 86*4882a593Smuzhiyun URLs. The same ``convert-srcuri`` script mentioned above can be used to convert 87*4882a593Smuzhiyun your recipes. 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun- Network access from tasks is now disabled by default on kernels which support 90*4882a593Smuzhiyun this feature (on most recent distros such as CentOS 8 and Debian 11 onwards). 91*4882a593Smuzhiyun This means that tasks accessing the network need to be marked as such with the ``network`` 92*4882a593Smuzhiyun flag. For example:: 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun do_mytask[network] = "1" 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun This is allowed by default from ``do_fetch`` but not from any of our other standard 97*4882a593Smuzhiyun tasks. Recipes shouldn't be accessing the network outside of ``do_fetch`` as it 98*4882a593Smuzhiyun usually undermines fetcher source mirroring, image and licence manifests, software 99*4882a593Smuzhiyun auditing and supply chain security. 100*4882a593Smuzhiyun 101*4882a593SmuzhiyunLicense changes 102*4882a593Smuzhiyun~~~~~~~~~~~~~~~ 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun- The ambiguous "BSD" license has been removed from the ``common-licenses`` directory. 105*4882a593Smuzhiyun Each recipe that fetches or builds BSD-licensed code should specify the proper 106*4882a593Smuzhiyun version of the BSD license in its :term:`LICENSE` value. 107*4882a593Smuzhiyun 108*4882a593Smuzhiyun- :term:`LICENSE` variable values should now use `SPDX identifiers <https://spdx.org/licenses/>`__. 109*4882a593Smuzhiyun If they do not, by default a warning will be shown. A 110*4882a593Smuzhiyun :oe_git:`convert-spdx-licenses.py </openembedded-core/tree/scripts/contrib/convert-spdx-licenses.py>` 111*4882a593Smuzhiyun script can be used to update your recipes. 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun- :term:`INCOMPATIBLE_LICENSE` should now use `SPDX identifiers <https://spdx.org/licenses/>`__. 114*4882a593Smuzhiyun Additionally, wildcarding is now limited to specifically supported values - 115*4882a593Smuzhiyun see the :term:`INCOMPATIBLE_LICENSE` documentation for further information. 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun- The ``AVAILABLE_LICENSES`` variable has been removed. This variable was a performance 118*4882a593Smuzhiyun liability and is highly dependent on which layers are added to the configuration, 119*4882a593Smuzhiyun which can cause signature issues for users. In addition the ``available_licenses()`` 120*4882a593Smuzhiyun function has been removed from the :ref:`license <ref-classes-license>` class as 121*4882a593Smuzhiyun it is no longer needed. 122*4882a593Smuzhiyun 123*4882a593SmuzhiyunRemoved recipes 124*4882a593Smuzhiyun~~~~~~~~~~~~~~~ 125*4882a593Smuzhiyun 126*4882a593SmuzhiyunThe following recipes have been removed in this release: 127*4882a593Smuzhiyun 128*4882a593Smuzhiyun- ``dbus-test``: merged into main dbus recipe 129*4882a593Smuzhiyun- ``libid3tag``: moved to meta-oe - no longer needed by anything in OE-Core 130*4882a593Smuzhiyun- ``libportal``: moved to meta-gnome - no longer needed by anything in OE-Core 131*4882a593Smuzhiyun- ``linux-yocto``: removed version 5.14 recipes (5.15 and 5.10 still provided) 132*4882a593Smuzhiyun- ``python3-nose``: has not changed since 2016 upstream, and no longer needed by anything in OE-Core 133*4882a593Smuzhiyun- ``rustfmt``: not especially useful as a standalone recipe 134*4882a593Smuzhiyun 135*4882a593SmuzhiyunPython changes 136*4882a593Smuzhiyun~~~~~~~~~~~~~~ 137*4882a593Smuzhiyun 138*4882a593Smuzhiyun- ``distutils`` has been deprecated upstream in Python 3.10 and thus the ``distutils*`` 139*4882a593Smuzhiyun classes have been moved to ``meta-python``. Recipes that inherit the ``distutils*`` 140*4882a593Smuzhiyun classes should be updated to inherit ``setuptools*`` equivalents instead. 141*4882a593Smuzhiyun 142*4882a593Smuzhiyun- The Python package build process is now based on `wheels <https://pythonwheels.com/>`__. 143*4882a593Smuzhiyun Here are the new Python packaging classes that should be used: 144*4882a593Smuzhiyun :ref:`python_flit_core <ref-classes-python_flit_core>`, 145*4882a593Smuzhiyun :ref:`python_setuptools_build_meta <ref-classes-python_setuptools_build_meta>` 146*4882a593Smuzhiyun and :ref:`python_poetry_core <ref-classes-python_poetry_core>`. 147*4882a593Smuzhiyun 148*4882a593Smuzhiyun- The :ref:`setuptools3 <ref-classes-setuptools3>` class ``do_install()`` task now 149*4882a593Smuzhiyun installs the ``wheel`` binary archive. In current versions of ``setuptools`` the 150*4882a593Smuzhiyun legacy ``setup.py install`` method is deprecated. If the ``setup.py`` cannot be used 151*4882a593Smuzhiyun with wheels, for example it creates files outside of the Python module or standard 152*4882a593Smuzhiyun entry points, then :ref:`setuptools3_legacy <ref-classes-setuptools3_legacy>` should 153*4882a593Smuzhiyun be used instead. 154*4882a593Smuzhiyun 155*4882a593SmuzhiyunPrelink removed 156*4882a593Smuzhiyun~~~~~~~~~~~~~~~ 157*4882a593Smuzhiyun 158*4882a593SmuzhiyunPrelink has been dropped by ``glibc`` upstream in 2.36. It already caused issues with 159*4882a593Smuzhiyunbinary corruption, has a number of open bugs and is of questionable benefit 160*4882a593Smuzhiyunwithout disabling load address randomization and PIE executables. 161*4882a593Smuzhiyun 162*4882a593SmuzhiyunWe disabled prelinking by default in the honister (3.4) release, but left it able 163*4882a593Smuzhiyunto be enabled if desired. However, without glibc support it cannot be maintained 164*4882a593Smuzhiyunany further, so all of the prelinking functionality has been removed in this release. 165*4882a593SmuzhiyunIf you were enabling the ``image-prelink`` class in :term:`INHERIT`, :term:`IMAGE_CLASSES`, 166*4882a593Smuzhiyun:term:`USER_CLASSES` etc in your configuration, then you will need to remove the 167*4882a593Smuzhiyunreference(s). 168*4882a593Smuzhiyun 169*4882a593SmuzhiyunReproducible as standard 170*4882a593Smuzhiyun~~~~~~~~~~~~~~~~~~~~~~~~ 171*4882a593Smuzhiyun 172*4882a593SmuzhiyunReproducibility is now considered as standard functionality, thus the 173*4882a593Smuzhiyun``reproducible`` class has been removed and its previous contents merged into the 174*4882a593Smuzhiyun:ref:`base <ref-classes-base>` class. If you have references in your configuration to 175*4882a593Smuzhiyun``reproducible`` in :term:`INHERIT`, :term:`USER_CLASSES` etc. then they should be 176*4882a593Smuzhiyunremoved. 177*4882a593Smuzhiyun 178*4882a593SmuzhiyunAdditionally, the ``BUILD_REPRODUCIBLE_BINARIES`` variable is no longer used. 179*4882a593SmuzhiyunSpecifically for the kernel, if you wish to enable build timestamping functionality 180*4882a593Smuzhiyunthat is normally disabled for reproducibility reasons, you can do so by setting 181*4882a593Smuzhiyuna new :term:`KERNEL_DEBUG_TIMESTAMPS` variable to "1". 182*4882a593Smuzhiyun 183*4882a593SmuzhiyunSupported host distribution changes 184*4882a593Smuzhiyun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 185*4882a593Smuzhiyun 186*4882a593Smuzhiyun- Support for `AlmaLinux <https://en.wikipedia.org/wiki/AlmaLinux>`__ 187*4882a593Smuzhiyun hosts replacing `CentOS <https://en.wikipedia.org/wiki/CentOS>`__. 188*4882a593Smuzhiyun The following distribution versions were dropped: CentOS 8, Ubuntu 16.04 and Fedora 30, 31 and 32. 189*4882a593Smuzhiyun 190*4882a593Smuzhiyun- ``gcc`` version 7.5 is now required at minimum on the build host. For older 191*4882a593Smuzhiyun host distributions where this is not available, you can use the 192*4882a593Smuzhiyun ``buildtools-extended-tarball`` (easily installable using 193*4882a593Smuzhiyun ``scripts/install-buildtools``). 194*4882a593Smuzhiyun 195*4882a593Smuzhiyun:append/:prepend in combination with other operators 196*4882a593Smuzhiyun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 197*4882a593Smuzhiyun 198*4882a593SmuzhiyunThe ``append``, ``prepend`` and ``remove`` operators can now only be combined with 199*4882a593Smuzhiyun``=`` and ``:=`` operators. To the exception of the ``append`` plus ``+=`` and 200*4882a593Smuzhiyun``prepend`` plus ``=+`` combinations, all combinations could be factored up to the 201*4882a593Smuzhiyun``append``, ``prepend`` or ``remove`` in the combination. This brought a lot of 202*4882a593Smuzhiyunconfusion on how the override style syntax operators work and should be used. 203*4882a593SmuzhiyunTherefore, those combinations should be replaced by a single ``append``, 204*4882a593Smuzhiyun``prepend`` or ``remove`` operator without any additional change. 205*4882a593SmuzhiyunFor the ``append`` plus ``+=`` (and ``prepend`` plus ``=+``) combinations, 206*4882a593Smuzhiyunthe content should be prefixed (respectively suffixed) by a space to maintain 207*4882a593Smuzhiyunthe same behavior. You can learn more about override style syntax operators 208*4882a593Smuzhiyun(``append``, ``prepend`` and ``remove``) in the BitBake documentation: 209*4882a593Smuzhiyun:ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending and prepending (override style syntax)` 210*4882a593Smuzhiyunand :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:removal (override style syntax)`. 211*4882a593Smuzhiyun 212*4882a593SmuzhiyunMiscellaneous changes 213*4882a593Smuzhiyun~~~~~~~~~~~~~~~~~~~~~ 214*4882a593Smuzhiyun 215*4882a593Smuzhiyun- ``blacklist.bbclass`` is removed and the functionality moved to the 216*4882a593Smuzhiyun :ref:`base <ref-classes-base>` class with a more descriptive 217*4882a593Smuzhiyun ``varflag`` variable named :term:`SKIP_RECIPE` which will use the `bb.parse.SkipRecipe()` 218*4882a593Smuzhiyun function. The usage remains the same, for example:: 219*4882a593Smuzhiyun 220*4882a593Smuzhiyun SKIP_RECIPE[my-recipe] = "Reason for skipping recipe" 221*4882a593Smuzhiyun 222*4882a593Smuzhiyun- :ref:`allarch <ref-classes-allarch>` packagegroups can no longer depend on packages 223*4882a593Smuzhiyun which use :term:`PKG` renaming such as :ref:`ref-classes-debian`. Such packagegroups 224*4882a593Smuzhiyun recipes should be changed to avoid inheriting :ref:`allarch <ref-classes-allarch>`. 225*4882a593Smuzhiyun 226*4882a593Smuzhiyun- The ``lnr`` script has been removed. ``lnr`` implemented the same behaviour as `ln --relative --symbolic`, 227*4882a593Smuzhiyun since at the time of creation `--relative` was only available in coreutils 8.16 228*4882a593Smuzhiyun onwards which was too new for the older supported distros. Current supported host 229*4882a593Smuzhiyun distros have a new enough version of coreutils, so it is no longer needed. If you have 230*4882a593Smuzhiyun any calls to ``lnr`` in your recipes or classes, they should be replaced with 231*4882a593Smuzhiyun `ln --relative --symbolic` or `ln -rs` if you prefer the short version. 232*4882a593Smuzhiyun 233*4882a593Smuzhiyun- The ``package_qa_handle_error()`` function formerly in the :ref:`insane <ref-classes-insane>` 234*4882a593Smuzhiyun class has been moved and renamed - if you have any references in your own custom 235*4882a593Smuzhiyun classes they should be changed to ``oe.qa.handle_error()``. 236*4882a593Smuzhiyun 237*4882a593Smuzhiyun- When building ``perl``, Berkeley db support is no longer enabled by default, since 238*4882a593Smuzhiyun Berkeley db is largely obsolete. If you wish to reenable it, you can append ``bdb`` 239*4882a593Smuzhiyun to :term:`PACKAGECONFIG` in a ``perl`` bbappend or ``PACKAGECONFIG:pn-perl`` at 240*4882a593Smuzhiyun the configuration level. 241*4882a593Smuzhiyun 242*4882a593Smuzhiyun- For the ``xserver-xorg`` recipe, the ``xshmfence``, ``xmlto`` and ``systemd`` options 243*4882a593Smuzhiyun previously supported in :term:`PACKAGECONFIG` have been removed, as they are no 244*4882a593Smuzhiyun longer supported since the move from building it with autotools to meson in this release. 245*4882a593Smuzhiyun 246*4882a593Smuzhiyun- For the ``libsdl2`` recipe, various X11 features are now disabled by default (primarily 247*4882a593Smuzhiyun for reproducibility purposes in the native case) with options in :term:`EXTRA_OECMAKE` 248*4882a593Smuzhiyun within the recipe. These can be changed within a bbappend if desired. See the 249*4882a593Smuzhiyun ``libsdl2`` recipe for more details. 250*4882a593Smuzhiyun 251*4882a593Smuzhiyun- The ``cortexa72-crc`` and ``cortexa72-crc-crypto`` tunes have been removed since 252*4882a593Smuzhiyun the crc extension is now enabled by default for cortexa72. Replace any references to 253*4882a593Smuzhiyun these with ``cortexa72`` and ``cortexa72-crypto`` respectively. 254*4882a593Smuzhiyun 255*4882a593Smuzhiyun- The Python development shell (previously known as ``devpyshell``) feature has been 256*4882a593Smuzhiyun renamed to ``pydevshell``. To start it you should now run:: 257*4882a593Smuzhiyun 258*4882a593Smuzhiyun bitbake <target> -c pydevshell 259*4882a593Smuzhiyun 260*4882a593Smuzhiyun- The ``packagegroups-core-full-cmdline-libs`` packagegroup is no longer produced, as 261*4882a593Smuzhiyun libraries should normally be brought in via dependencies. If you have any references 262*4882a593Smuzhiyun to this then remove them. 263*4882a593Smuzhiyun 264*4882a593Smuzhiyun- The :term:`TOPDIR` variable and the current working directory are no longer modified 265*4882a593Smuzhiyun when parsing recipes. Any code depending on the previous behaviour will no longer 266*4882a593Smuzhiyun work - change any such code to explicitly use appropriate path variables instead. 267*4882a593Smuzhiyun 268*4882a593Smuzhiyun- In order to exclude the kernel image from the image rootfs, 269*4882a593Smuzhiyun :term:`RRECOMMENDS`\ ``:${KERNEL_PACKAGE_NAME}-base`` should be set instead of 270*4882a593Smuzhiyun :term:`RDEPENDS`\ ``:${KERNEL_PACKAGE_NAME}-base``. 271