1517393d9SAndrew Geissler.. SPDX-License-Identifier: CC-BY-SA-2.0-UK 2517393d9SAndrew Geissler 37e0e3c0cSAndrew GeisslerMigration notes for 3.4 (honister) 47e0e3c0cSAndrew Geissler---------------------------------- 57e0e3c0cSAndrew Geissler 6213cb269SPatrick WilliamsThis section provides migration information for moving to the Yocto 7213cb269SPatrick WilliamsProject 3.4 Release (codename "honister") from the prior release. 8213cb269SPatrick Williams 9213cb269SPatrick WilliamsOverride syntax changes 107e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~ 11213cb269SPatrick Williams 12eff27476SAndrew GeisslerIn this release, the ``:`` character replaces the use of ``_`` to 13eff27476SAndrew Geisslerrefer to an override, most commonly when making a conditional assignment 14eff27476SAndrew Geisslerof a variable. This means that an entry like:: 15213cb269SPatrick Williams 16213cb269SPatrick Williams SRC_URI_qemux86 = "file://somefile" 17213cb269SPatrick Williams 18eff27476SAndrew Geisslernow becomes:: 19213cb269SPatrick Williams 20213cb269SPatrick Williams SRC_URI:qemux86 = "file://somefile" 21213cb269SPatrick Williams 22eff27476SAndrew Geisslersince ``qemux86`` is an override. This applies to any use of override 23eff27476SAndrew Geisslersyntax, so the following:: 24213cb269SPatrick Williams 25213cb269SPatrick Williams SRC_URI_append = " file://somefile" 26213cb269SPatrick Williams SRC_URI_append_qemux86 = " file://somefile2" 27213cb269SPatrick Williams SRC_URI_remove_qemux86-64 = "file://somefile3" 28213cb269SPatrick Williams SRC_URI_prepend_qemuarm = "file://somefile4 " 29213cb269SPatrick Williams FILES_${PN}-ptest = "${bindir}/xyz" 30213cb269SPatrick Williams IMAGE_CMD_tar = "tar" 31213cb269SPatrick Williams BASE_LIB_tune-cortexa76 = "lib" 32213cb269SPatrick Williams SRCREV_pn-bash = "abc" 33213cb269SPatrick Williams BB_TASK_NICE_LEVEL_task-testimage = '0' 34213cb269SPatrick Williams 35eff27476SAndrew Geisslerwould now become:: 36213cb269SPatrick Williams 37213cb269SPatrick Williams SRC_URI:append = " file://somefile" 38213cb269SPatrick Williams SRC_URI:append:qemux86 = " file://somefile2" 39213cb269SPatrick Williams SRC_URI:remove:qemux86-64 = "file://somefile3" 40213cb269SPatrick Williams SRC_URI:prepend:qemuarm = "file://somefile4 " 41213cb269SPatrick Williams FILES:${PN}-ptest = "${bindir}/xyz" 42213cb269SPatrick Williams IMAGE_CMD:tar = "tar" 43213cb269SPatrick Williams BASE_LIB:tune-cortexa76 = "lib" 44213cb269SPatrick Williams SRCREV:pn-bash = "abc" 45213cb269SPatrick Williams BB_TASK_NICE_LEVEL:task-testimage = '0' 46213cb269SPatrick Williams 47213cb269SPatrick WilliamsThis also applies to 48fc113eadSAndrew Geissler:ref:`variable queries to the datastore <bitbake-user-manual/bitbake-user-manual-metadata:functions for accessing datastore variables>`, 49213cb269SPatrick Williamsfor example using ``getVar`` and similar so ``d.getVar("RDEPENDS_${PN}")`` 50213cb269SPatrick Williamsbecomes ``d.getVar("RDEPENDS:${PN}")``. 51213cb269SPatrick Williams 52213cb269SPatrick WilliamsWhilst some of these are fairly obvious such as :term:`MACHINE` and :term:`DISTRO` 53213cb269SPatrick Williamsoverrides, some are less obvious, for example the packaging variables such as 54213cb269SPatrick Williams:term:`RDEPENDS`, :term:`FILES` and so on taking package names (e.g. ``${PN}``, 55213cb269SPatrick Williams``${PN}-ptest``) as overrides. These overrides are not always in 56213cb269SPatrick Williams:term:`OVERRIDES` but applied conditionally in specific contexts 57213cb269SPatrick Williamssuch as packaging. ``task-<taskname>`` is another context specific override, the 58213cb269SPatrick Williamscontext being specific tasks in that case. Tune overrides are another special 59213cb269SPatrick Williamscase where some code does use them as overrides but some does not. We plan to try 60213cb269SPatrick Williamsand make the tune code use overrides more consistently in the future. 61213cb269SPatrick Williams 620ca19ccfSPatrick WilliamsThere are some variables which do not use override syntax which include the 630ca19ccfSPatrick Williamssuffix to variables in ``layer.conf`` files such as :term:`BBFILE_PATTERN`, 640ca19ccfSPatrick Williams:term:`SRCREV`\ ``_xxx`` where ``xxx`` is a name from :term:`SRC_URI` and 650ca19ccfSPatrick Williams:term:`PREFERRED_VERSION`\ ``_xxx``. In particular, ``layer.conf`` suffixes 660ca19ccfSPatrick Williamsmay be the same as a :term:`DISTRO` override causing some confusion. We do 670ca19ccfSPatrick Williamsplan to try and improve consistency as these issues are identified. 680ca19ccfSPatrick Williams 69eff27476SAndrew GeisslerTo help with migration of layers, a script has been provided in OE-Core. 70eff27476SAndrew GeisslerOnce configured with the overrides used by a layer, this can be run as:: 71213cb269SPatrick Williams 72213cb269SPatrick Williams <oe-core>/scripts/contrib/convert-overrides.py <layerdir> 73213cb269SPatrick Williams 74213cb269SPatrick Williams.. note:: 75213cb269SPatrick Williams 76213cb269SPatrick Williams Please read the notes in the script as it isn't entirely automatic and it isn't 77213cb269SPatrick Williams expected to handle every case. In particular, it needs to be told which overrides 78213cb269SPatrick Williams the layer uses (usually machine and distro names/overrides) and the result should 79213cb269SPatrick Williams be carefully checked since it can be a little enthusiastic and will convert 80eff27476SAndrew Geissler references to ``_append``, ``_remove`` and ``_prepend`` in function and variable 81eff27476SAndrew Geissler names. 82213cb269SPatrick Williams 83eff27476SAndrew GeisslerFor reference, this conversion is important as it allows BitBake to more reliably 84eff27476SAndrew Geisslerdetermine what is an override and what is not, as underscores are also used in 85eff27476SAndrew Geisslervariable names without intending to be overrides. This should allow us to proceed 86eff27476SAndrew Geisslerwith other syntax improvements and simplifications for usability. It also means 87eff27476SAndrew GeisslerBitBake no longer has to guess and maintain large lookup lists just in case 88eff27476SAndrew Geisslere.g. ``functionname`` in ``my_functionname`` is an override, and thus should improve 89eff27476SAndrew Geisslerefficiency. 90eff27476SAndrew Geissler 91eff27476SAndrew GeisslerNew host dependencies 927e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~ 93eff27476SAndrew Geissler 94eff27476SAndrew GeisslerThe ``lz4c``, ``pzstd`` and ``zstd`` commands are now required to be 95eff27476SAndrew Geisslerinstalled on the build host to support LZ4 and Zstandard compression 96eff27476SAndrew Geisslerfunctionality. These are typically provided by ``lz4`` and ``zstd`` 97eff27476SAndrew Geisslerpackages in most Linux distributions. Alternatively they are available 98517393d9SAndrew Geissleras part of :term:`buildtools` tarball if your distribution does not provide 99eff27476SAndrew Geisslerthem. For more information see 100eff27476SAndrew Geissler:ref:`ref-manual/system-requirements:required packages for the build host`. 101eff27476SAndrew Geissler 102eff27476SAndrew GeisslerRemoved recipes 1037e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~ 104eff27476SAndrew Geissler 105eff27476SAndrew GeisslerThe following recipes have been removed in this release: 106eff27476SAndrew Geissler 107eff27476SAndrew Geissler- ``assimp``: problematic from a licensing perspective and no longer 108eff27476SAndrew Geissler needed by anything else 109eff27476SAndrew Geissler- ``clutter-1.0``: legacy component moved to meta-gnome 110eff27476SAndrew Geissler- ``clutter-gst-3.0``: legacy component moved to meta-gnome 111eff27476SAndrew Geissler- ``clutter-gtk-1.0``: legacy component moved to meta-gnome 112eff27476SAndrew Geissler- ``cogl-1.0``: legacy component moved to meta-gnome 113eff27476SAndrew Geissler- ``core-image-clutter``: removed along with clutter 114eff27476SAndrew Geissler- ``linux-yocto``: removed version 5.4 recipes (5.14 and 5.10 still 115eff27476SAndrew Geissler provided) 116eff27476SAndrew Geissler- ``mklibs-native``: not actively tested and upstream mklibs still 117eff27476SAndrew Geissler requires Python 2 118eff27476SAndrew Geissler- ``mx-1.0``: obsolete (last release 2012) and isn't used by anything in 119eff27476SAndrew Geissler any known layer 120eff27476SAndrew Geissler- ``packagegroup-core-clutter``: removed along with clutter 121eff27476SAndrew Geissler 122eff27476SAndrew GeisslerRemoved classes 1237e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~ 124eff27476SAndrew Geissler 125eff27476SAndrew Geissler- ``clutter``: moved to meta-gnome along with clutter itself 126eff27476SAndrew Geissler- ``image-mklibs``: not actively tested and upstream mklibs still 127eff27476SAndrew Geissler requires Python 2 128eff27476SAndrew Geissler- ``meta``: no longer useful. Recipes that need to skip installing 129517393d9SAndrew Geissler packages should inherit :ref:`ref-classes-nopackages` instead. 130eff27476SAndrew Geissler 131eff27476SAndrew GeisslerPrelinking disabled by default 1327e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 133eff27476SAndrew Geissler 134eff27476SAndrew GeisslerRecent tests have shown that prelinking works only when PIE is not 135eff27476SAndrew Geisslerenabled (see `here <https://rlbl.me/prelink-1>`__ and `here <https://rlbl.me/prelink-2>`__), 136eff27476SAndrew Geisslerand as PIE is both a desirable security feature, and the only 137eff27476SAndrew Geisslerconfiguration provided and tested by the Yocto Project, there is 138eff27476SAndrew Geisslersimply no sense in continuing to enable prelink. 139eff27476SAndrew Geissler 140eff27476SAndrew GeisslerThere's also a concern that no one is maintaining the code, and there 1417e0e3c0cSAndrew Geisslerare open bugs (including :yocto_bugs:`this serious one </show_bug.cgi?id=14429>`). 142eff27476SAndrew GeisslerGiven that prelink does intricate address arithmetic and rewriting 143eff27476SAndrew Geisslerof binaries the best option is to disable the feature. It is recommended 144eff27476SAndrew Geisslerthat you consider disabling this feature in your own configuration if 145eff27476SAndrew Geisslerit is currently enabled. 146eff27476SAndrew Geissler 147eff27476SAndrew GeisslerVirtual runtime provides 1487e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~ 149eff27476SAndrew Geissler 150eff27476SAndrew GeisslerRecipes shouldn't use the ``virtual/`` string in :term:`RPROVIDES` and 151615f2f11SAndrew Geissler:term:`RDEPENDS` --- it is confusing because ``virtual/`` has no special 152eff27476SAndrew Geisslermeaning in :term:`RPROVIDES` and :term:`RDEPENDS` (unlike in the 153eff27476SAndrew Geisslercorresponding build-time :term:`PROVIDES` and :term:`DEPENDS`). 154eff27476SAndrew Geissler 155eff27476SAndrew GeisslerTune files moved to architecture-specific directories 1567e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 157eff27476SAndrew Geissler 158eff27476SAndrew GeisslerThe tune files found in ``conf/machine/include`` have now been moved 159eff27476SAndrew Geisslerinto their respective architecture name directories under that same 160eff27476SAndrew Geisslerlocation; e.g. x86 tune files have moved into an ``x86`` subdirectory, 161eff27476SAndrew GeisslerMIPS tune files have moved into a ``mips`` subdirectory, etc. 162eff27476SAndrew GeisslerThe ARM tunes have an extra level (``armv8a``, ``armv8m``, etc.) and 163eff27476SAndrew Geisslersome have been renamed to make them uniform with the rest of the tunes. 1647e0e3c0cSAndrew GeisslerSee :yocto_git:`this commit </poky/commit/?id=1d381f21f5f13aa0c4e1a45683ed656ebeedd37d>` 165eff27476SAndrew Geisslerfor reference. 166eff27476SAndrew Geissler 167eff27476SAndrew GeisslerIf you have any references to tune files (e.g. in custom machine 168eff27476SAndrew Geisslerconfiguration files) they will need to be updated. 169eff27476SAndrew Geissler 170eff27476SAndrew GeisslerExtensible SDK host extension 1717e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 172eff27476SAndrew Geissler 173eff27476SAndrew GeisslerFor a normal SDK, some layers append to :term:`TOOLCHAIN_HOST_TASK` 174eff27476SAndrew Geisslerunconditionally which is fine, until the eSDK tries to override the 175eff27476SAndrew Geisslervariable to its own values. Instead of installing packages specified 176615f2f11SAndrew Geisslerin this variable it uses native recipes instead --- a very different 177eff27476SAndrew Geisslerapproach. This has led to confusing errors when binaries are added 178eff27476SAndrew Geisslerto the SDK but not relocated. 179eff27476SAndrew Geissler 180eff27476SAndrew GeisslerTo avoid these issues, a new :term:`TOOLCHAIN_HOST_TASK_ESDK` variable has 181eff27476SAndrew Geisslerbeen created. If you wish to extend what is installed in the host 182eff27476SAndrew Geisslerportion of the eSDK then you will now need to set this variable. 183eff27476SAndrew Geissler 184eff27476SAndrew GeisslerPackage/recipe splitting 1857e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~ 186eff27476SAndrew Geissler 187eff27476SAndrew Geissler- ``perl-cross`` has been split out from the main ``perl`` recipe to 188eff27476SAndrew Geissler its own ``perlcross`` recipe for maintenance reasons. If you have 189eff27476SAndrew Geissler bbappends for the perl recipe then these may need extending. 190eff27476SAndrew Geissler 191eff27476SAndrew Geissler- The ``wayland`` recipe now packages its binaries in a 192eff27476SAndrew Geissler ``wayland-tools`` package rather than putting them into 193eff27476SAndrew Geissler ``wayland-dev``. 194eff27476SAndrew Geissler 195eff27476SAndrew Geissler- Xwayland has been split out of the xserver-xorg tree and thus is now 196eff27476SAndrew Geissler in its own ``xwayland`` recipe. If you need Xwayland in your image 197eff27476SAndrew Geissler then you may now need to add it explicitly. 198eff27476SAndrew Geissler 199eff27476SAndrew Geissler- The ``rpm`` package no longer has ``rpm-build`` in its :term:`RRECOMMENDS`; 200eff27476SAndrew Geissler if by chance you still need rpm package building functionality in 201eff27476SAndrew Geissler your image and you have not already done so then you should add 202eff27476SAndrew Geissler ``rpm-build`` to your image explicitly. 203eff27476SAndrew Geissler 204eff27476SAndrew Geissler- The Python ``statistics`` standard module is now packaged in its own 205eff27476SAndrew Geissler ``python3-statistics`` package instead of ``python3-misc`` as 206eff27476SAndrew Geissler previously. 207eff27476SAndrew Geissler 208eff27476SAndrew GeisslerImage / SDK generation changes 2097e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 210eff27476SAndrew Geissler 2112194f503SPatrick Williams- Recursive dependencies on the :ref:`ref-tasks-build` task are now disabled when 212eff27476SAndrew Geissler building SDKs. These are generally not needed; in the unlikely event 213eff27476SAndrew Geissler that you do encounter problems then it will probably be as a result of 214eff27476SAndrew Geissler missing explicit dependencies that need to be added. 215eff27476SAndrew Geissler 216eff27476SAndrew Geissler- Errors during "complementary" package installation (e.g. for ``*-dbg`` 217eff27476SAndrew Geissler and ``*-dev`` packages) during image construction are no longer 218eff27476SAndrew Geissler ignored. Historically some of these packages had installation problems, 219eff27476SAndrew Geissler that is no longer the case. In the unlikely event that you see errors 220eff27476SAndrew Geissler as a result, you will need to fix the installation/packaging issues. 221eff27476SAndrew Geissler 222eff27476SAndrew Geissler- When building an image, only packages that will be used in building 223eff27476SAndrew Geissler the image (i.e. the first entry in :term:`PACKAGE_CLASSES`) will be 224eff27476SAndrew Geissler produced if multiple package types are enabled (which is not a typical 225eff27476SAndrew Geissler configuration). If in your CI system you need to have the original 226eff27476SAndrew Geissler behaviour, use ``bitbake --runall build <target>``. 227eff27476SAndrew Geissler 228eff27476SAndrew Geissler- The ``-lic`` package is no longer automatically added to 229eff27476SAndrew Geissler :term:`RRECOMMENDS` for every other package when 230eff27476SAndrew Geissler :term:`LICENSE_CREATE_PACKAGE` is set to "1". If you wish all license 231eff27476SAndrew Geissler packages to be installed corresponding to packages in your image, then 232eff27476SAndrew Geissler you should instead add the new ``lic-pkgs`` feature to 233eff27476SAndrew Geissler :term:`IMAGE_FEATURES`. 234eff27476SAndrew Geissler 235eff27476SAndrew GeisslerMiscellaneous 2367e0e3c0cSAndrew Geissler~~~~~~~~~~~~~ 237eff27476SAndrew Geissler 238d583833aSAndrew Geissler- Certificates are now properly checked when BitBake fetches sources 239eff27476SAndrew Geissler over HTTPS. If you receive errors as a result for your custom recipes, 240eff27476SAndrew Geissler you will need to use a mirror or address the issue with the operators 241eff27476SAndrew Geissler of the server in question. 242eff27476SAndrew Geissler 243eff27476SAndrew Geissler- ``avahi`` has had its GTK+ support disabled by default. If you wish to 244eff27476SAndrew Geissler re-enable it, set ``AVAHI_GTK = "gtk3"`` in a bbappend for the 245eff27476SAndrew Geissler ``avahi`` recipe or in your custom distro configuration file. 246eff27476SAndrew Geissler 247eff27476SAndrew Geissler- Setting the ``BUILD_REPRODUCIBLE_BINARIES`` variable to "0" no longer 248eff27476SAndrew Geissler uses a strangely old fallback date of April 2011, it instead disables 249eff27476SAndrew Geissler building reproducible binaries as you would logically expect. 250eff27476SAndrew Geissler 251eff27476SAndrew Geissler- Setting noexec/nostamp/fakeroot varflags to any value besides "1" will 252eff27476SAndrew Geissler now trigger a warning. These should be either set to "1" to enable, or 253eff27476SAndrew Geissler not set at all to disable. 254eff27476SAndrew Geissler 255eff27476SAndrew Geissler- The previously deprecated ``COMPRESS_CMD`` and 256eff27476SAndrew Geissler ``CVE_CHECK_CVE_WHITELIST`` variables have been removed. Use 257615f2f11SAndrew Geissler :term:`CONVERSION_CMD` and ``CVE_CHECK_WHITELIST`` (replaced by 258*da295319SPatrick Williams :term:`CVE_CHECK_IGNORE` in version 4.0) respectively 259eff27476SAndrew Geissler instead. 260eff27476SAndrew Geissler 261eff27476SAndrew Geissler- The obsolete ``oe_machinstall`` function previously provided in the 262517393d9SAndrew Geissler :ref:`ref-classes-utils` class has been removed. For 263eff27476SAndrew Geissler machine-specific installation it is recommended that you use the 264eff27476SAndrew Geissler built-in override support in the fetcher or overrides in general 265eff27476SAndrew Geissler instead. 2667e0e3c0cSAndrew Geissler 26703907ee1SPatrick Williams- The ``-P`` (``--clear-password``) option can no longer be used with 26803907ee1SPatrick Williams ``useradd`` and ``usermod`` entries in :term:`EXTRA_USERS_PARAMS`. 26903907ee1SPatrick Williams It was being implemented using a custom patch to the ``shadow`` recipe 27003907ee1SPatrick Williams which clashed with a ``-P`` option that was added upstream in 27103907ee1SPatrick Williams ``shadow`` version 4.9, and in any case is fundamentally insecure. 27203907ee1SPatrick Williams Hardcoded passwords are still supported but they need to be hashed, see 27303907ee1SPatrick Williams examples in :term:`EXTRA_USERS_PARAMS`. 27403907ee1SPatrick Williams 27503907ee1SPatrick Williams 276