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