1Release 3.4 (honister) 2====================== 3 4Migration notes for 3.4 (honister) 5---------------------------------- 6 7This section provides migration information for moving to the Yocto 8Project 3.4 Release (codename "honister") from the prior release. 9 10Override syntax changes 11~~~~~~~~~~~~~~~~~~~~~~~ 12 13In this release, the ``:`` character replaces the use of ``_`` to 14refer to an override, most commonly when making a conditional assignment 15of a variable. This means that an entry like:: 16 17 SRC_URI_qemux86 = "file://somefile" 18 19now becomes:: 20 21 SRC_URI:qemux86 = "file://somefile" 22 23since ``qemux86`` is an override. This applies to any use of override 24syntax, so the following:: 25 26 SRC_URI_append = " file://somefile" 27 SRC_URI_append_qemux86 = " file://somefile2" 28 SRC_URI_remove_qemux86-64 = " file://somefile3" 29 SRC_URI_prepend_qemuarm = "file://somefile4 " 30 FILES_${PN}-ptest = "${bindir}/xyz" 31 IMAGE_CMD_tar = "tar" 32 BASE_LIB_tune-cortexa76 = "lib" 33 SRCREV_pn-bash = "abc" 34 BB_TASK_NICE_LEVEL_task-testimage = '0' 35 36would now become:: 37 38 SRC_URI:append = " file://somefile" 39 SRC_URI:append:qemux86 = " file://somefile2" 40 SRC_URI:remove:qemux86-64 = " file://somefile3" 41 SRC_URI:prepend:qemuarm = "file://somefile4 " 42 FILES:${PN}-ptest = "${bindir}/xyz" 43 IMAGE_CMD:tar = "tar" 44 BASE_LIB:tune-cortexa76 = "lib" 45 SRCREV:pn-bash = "abc" 46 BB_TASK_NICE_LEVEL:task-testimage = '0' 47 48This also applies to 49:ref:`variable queries to the datastore <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:functions for accessing datastore variables>`, 50for example using ``getVar`` and similar so ``d.getVar("RDEPENDS_${PN}")`` 51becomes ``d.getVar("RDEPENDS:${PN}")``. 52 53Whilst some of these are fairly obvious such as :term:`MACHINE` and :term:`DISTRO` 54overrides, some are less obvious, for example the packaging variables such as 55:term:`RDEPENDS`, :term:`FILES` and so on taking package names (e.g. ``${PN}``, 56``${PN}-ptest``) as overrides. These overrides are not always in 57:term:`OVERRIDES` but applied conditionally in specific contexts 58such as packaging. ``task-<taskname>`` is another context specific override, the 59context being specific tasks in that case. Tune overrides are another special 60case where some code does use them as overrides but some does not. We plan to try 61and make the tune code use overrides more consistently in the future. 62 63There are some variables which do not use override syntax which include the 64suffix to variables in ``layer.conf`` files such as :term:`BBFILE_PATTERN`, 65:term:`SRCREV`\ ``_xxx`` where ``xxx`` is a name from :term:`SRC_URI` and 66:term:`PREFERRED_VERSION`\ ``_xxx``. In particular, ``layer.conf`` suffixes 67may be the same as a :term:`DISTRO` override causing some confusion. We do 68plan to try and improve consistency as these issues are identified. 69 70To help with migration of layers, a script has been provided in OE-Core. 71Once configured with the overrides used by a layer, this can be run as:: 72 73 <oe-core>/scripts/contrib/convert-overrides.py <layerdir> 74 75.. note:: 76 77 Please read the notes in the script as it isn't entirely automatic and it isn't 78 expected to handle every case. In particular, it needs to be told which overrides 79 the layer uses (usually machine and distro names/overrides) and the result should 80 be carefully checked since it can be a little enthusiastic and will convert 81 references to ``_append``, ``_remove`` and ``_prepend`` in function and variable 82 names. 83 84For reference, this conversion is important as it allows BitBake to more reliably 85determine what is an override and what is not, as underscores are also used in 86variable names without intending to be overrides. This should allow us to proceed 87with other syntax improvements and simplifications for usability. It also means 88BitBake no longer has to guess and maintain large lookup lists just in case 89e.g. ``functionname`` in ``my_functionname`` is an override, and thus should improve 90efficiency. 91 92New host dependencies 93~~~~~~~~~~~~~~~~~~~~~ 94 95The ``lz4c``, ``pzstd`` and ``zstd`` commands are now required to be 96installed on the build host to support LZ4 and Zstandard compression 97functionality. These are typically provided by ``lz4`` and ``zstd`` 98packages in most Linux distributions. Alternatively they are available 99as part of ``buildtools-tarball`` if your distribution does not provide 100them. For more information see 101:ref:`ref-manual/system-requirements:required packages for the build host`. 102 103Removed recipes 104~~~~~~~~~~~~~~~ 105 106The following recipes have been removed in this release: 107 108- ``assimp``: problematic from a licensing perspective and no longer 109 needed by anything else 110- ``clutter-1.0``: legacy component moved to meta-gnome 111- ``clutter-gst-3.0``: legacy component moved to meta-gnome 112- ``clutter-gtk-1.0``: legacy component moved to meta-gnome 113- ``cogl-1.0``: legacy component moved to meta-gnome 114- ``core-image-clutter``: removed along with clutter 115- ``linux-yocto``: removed version 5.4 recipes (5.14 and 5.10 still 116 provided) 117- ``mklibs-native``: not actively tested and upstream mklibs still 118 requires Python 2 119- ``mx-1.0``: obsolete (last release 2012) and isn't used by anything in 120 any known layer 121- ``packagegroup-core-clutter``: removed along with clutter 122 123Removed classes 124~~~~~~~~~~~~~~~ 125 126- ``clutter``: moved to meta-gnome along with clutter itself 127- ``image-mklibs``: not actively tested and upstream mklibs still 128 requires Python 2 129- ``meta``: no longer useful. Recipes that need to skip installing 130 packages should inherit ``nopackages`` instead. 131 132Prelinking disabled by default 133~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 134 135Recent tests have shown that prelinking works only when PIE is not 136enabled (see `here <https://rlbl.me/prelink-1>`__ and `here <https://rlbl.me/prelink-2>`__), 137and as PIE is both a desirable security feature, and the only 138configuration provided and tested by the Yocto Project, there is 139simply no sense in continuing to enable prelink. 140 141There's also a concern that no one is maintaining the code, and there 142are open bugs (including :yocto_bugs:`this serious one </show_bug.cgi?id=14429>`). 143Given that prelink does intricate address arithmetic and rewriting 144of binaries the best option is to disable the feature. It is recommended 145that you consider disabling this feature in your own configuration if 146it is currently enabled. 147 148Virtual runtime provides 149~~~~~~~~~~~~~~~~~~~~~~~~ 150 151Recipes shouldn't use the ``virtual/`` string in :term:`RPROVIDES` and 152:term:`RDEPENDS` - it is confusing because ``virtual/`` has no special 153meaning in :term:`RPROVIDES` and :term:`RDEPENDS` (unlike in the 154corresponding build-time :term:`PROVIDES` and :term:`DEPENDS`). 155 156Tune files moved to architecture-specific directories 157~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 158 159The tune files found in ``conf/machine/include`` have now been moved 160into their respective architecture name directories under that same 161location; e.g. x86 tune files have moved into an ``x86`` subdirectory, 162MIPS tune files have moved into a ``mips`` subdirectory, etc. 163The ARM tunes have an extra level (``armv8a``, ``armv8m``, etc.) and 164some have been renamed to make them uniform with the rest of the tunes. 165See :yocto_git:`this commit </poky/commit/?id=1d381f21f5f13aa0c4e1a45683ed656ebeedd37d>` 166for reference. 167 168If you have any references to tune files (e.g. in custom machine 169configuration files) they will need to be updated. 170 171Extensible SDK host extension 172~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 173 174For a normal SDK, some layers append to :term:`TOOLCHAIN_HOST_TASK` 175unconditionally which is fine, until the eSDK tries to override the 176variable to its own values. Instead of installing packages specified 177in this variable it uses native recipes instead - a very different 178approach. This has led to confusing errors when binaries are added 179to the SDK but not relocated. 180 181To avoid these issues, a new :term:`TOOLCHAIN_HOST_TASK_ESDK` variable has 182been created. If you wish to extend what is installed in the host 183portion of the eSDK then you will now need to set this variable. 184 185Package/recipe splitting 186~~~~~~~~~~~~~~~~~~~~~~~~ 187 188- ``perl-cross`` has been split out from the main ``perl`` recipe to 189 its own ``perlcross`` recipe for maintenance reasons. If you have 190 bbappends for the perl recipe then these may need extending. 191 192- The ``wayland`` recipe now packages its binaries in a 193 ``wayland-tools`` package rather than putting them into 194 ``wayland-dev``. 195 196- Xwayland has been split out of the xserver-xorg tree and thus is now 197 in its own ``xwayland`` recipe. If you need Xwayland in your image 198 then you may now need to add it explicitly. 199 200- The ``rpm`` package no longer has ``rpm-build`` in its :term:`RRECOMMENDS`; 201 if by chance you still need rpm package building functionality in 202 your image and you have not already done so then you should add 203 ``rpm-build`` to your image explicitly. 204 205- The Python ``statistics`` standard module is now packaged in its own 206 ``python3-statistics`` package instead of ``python3-misc`` as 207 previously. 208 209Image / SDK generation changes 210~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 211 212- Recursive dependencies on the ``do_build`` task are now disabled when 213 building SDKs. These are generally not needed; in the unlikely event 214 that you do encounter problems then it will probably be as a result of 215 missing explicit dependencies that need to be added. 216 217- Errors during "complementary" package installation (e.g. for ``*-dbg`` 218 and ``*-dev`` packages) during image construction are no longer 219 ignored. Historically some of these packages had installation problems, 220 that is no longer the case. In the unlikely event that you see errors 221 as a result, you will need to fix the installation/packaging issues. 222 223- When building an image, only packages that will be used in building 224 the image (i.e. the first entry in :term:`PACKAGE_CLASSES`) will be 225 produced if multiple package types are enabled (which is not a typical 226 configuration). If in your CI system you need to have the original 227 behaviour, use ``bitbake --runall build <target>``. 228 229- The ``-lic`` package is no longer automatically added to 230 :term:`RRECOMMENDS` for every other package when 231 :term:`LICENSE_CREATE_PACKAGE` is set to "1". If you wish all license 232 packages to be installed corresponding to packages in your image, then 233 you should instead add the new ``lic-pkgs`` feature to 234 :term:`IMAGE_FEATURES`. 235 236Miscellaneous 237~~~~~~~~~~~~~ 238 239- Certificates are now properly checked when bitbake fetches sources 240 over HTTPS. If you receive errors as a result for your custom recipes, 241 you will need to use a mirror or address the issue with the operators 242 of the server in question. 243 244- ``avahi`` has had its GTK+ support disabled by default. If you wish to 245 re-enable it, set ``AVAHI_GTK = "gtk3"`` in a bbappend for the 246 ``avahi`` recipe or in your custom distro configuration file. 247 248- Setting the ``BUILD_REPRODUCIBLE_BINARIES`` variable to "0" no longer 249 uses a strangely old fallback date of April 2011, it instead disables 250 building reproducible binaries as you would logically expect. 251 252- Setting noexec/nostamp/fakeroot varflags to any value besides "1" will 253 now trigger a warning. These should be either set to "1" to enable, or 254 not set at all to disable. 255 256- The previously deprecated ``COMPRESS_CMD`` and 257 ``CVE_CHECK_CVE_WHITELIST`` variables have been removed. Use 258 ``CONVERSION_CMD`` and ``CVE_CHECK_WHITELIST`` (replaced by 259 :term:`CVE_CHECK_IGNORE` in version 3.5) respectively 260 instead. 261 262- The obsolete ``oe_machinstall`` function previously provided in the 263 :ref:`utils <ref-classes-utils>` class has been removed. For 264 machine-specific installation it is recommended that you use the 265 built-in override support in the fetcher or overrides in general 266 instead. 267 268.. include:: release-notes-3.4.rst 269.. include:: release-notes-3.4.1.rst 270.. include:: release-notes-3.4.2.rst 271