xref: /openbmc/openbmc/poky/documentation/migration-guides/migration-3.0.rst (revision da295319aa739dfa657fb4a1ba7e81804ba48658)
1517393d9SAndrew Geissler.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2517393d9SAndrew Geissler
30903674eSAndrew GeisslerRelease 3.0 (zeus)
40903674eSAndrew Geissler==================
50903674eSAndrew Geissler
60903674eSAndrew GeisslerThis section provides migration information for moving to the Yocto
70903674eSAndrew GeisslerProject 3.0 Release (codename "zeus") from the prior release.
80903674eSAndrew Geissler
90903674eSAndrew Geissler.. _migration-3.0-init-system-selection:
100903674eSAndrew Geissler
110903674eSAndrew GeisslerInit System Selection
120903674eSAndrew Geissler---------------------
130903674eSAndrew Geissler
140903674eSAndrew GeisslerChanging the init system manager previously required setting a number of
150903674eSAndrew Geisslerdifferent variables. You can now change the manager by setting the
160903674eSAndrew Geissler``INIT_MANAGER`` variable and the corresponding include files (i.e.
170903674eSAndrew Geissler``conf/distro/include/init-manager-*.conf``). Include files are provided
180903674eSAndrew Geisslerfor four values: "none", "sysvinit", "systemd", and "mdev-busybox". The
190903674eSAndrew Geisslerdefault value, "none", for ``INIT_MANAGER`` should allow your current
200903674eSAndrew Geisslersettings to continue working. However, it is advisable to explicitly set
210903674eSAndrew Geissler``INIT_MANAGER``.
220903674eSAndrew Geissler
230903674eSAndrew Geissler.. _migration-3.0-lsb-support-removed:
240903674eSAndrew Geissler
250903674eSAndrew GeisslerLSB Support Removed
260903674eSAndrew Geissler-------------------
270903674eSAndrew Geissler
280903674eSAndrew GeisslerLinux Standard Base (LSB) as a standard is not current, and is not well
290903674eSAndrew Geisslersuited for embedded applications. Support can be continued in a separate
300903674eSAndrew Geisslerlayer if needed. However, presently LSB support has been removed from
310903674eSAndrew Geisslerthe core.
320903674eSAndrew Geissler
330903674eSAndrew GeisslerAs a result of this change, the ``poky-lsb`` derivative distribution
340903674eSAndrew Geisslerconfiguration that was also used for testing alternative configurations
350903674eSAndrew Geisslerhas been replaced with a ``poky-altcfg`` distribution that has LSB parts
360903674eSAndrew Geisslerremoved.
370903674eSAndrew Geissler
380903674eSAndrew Geissler.. _migration-3.0-removed-recipes:
390903674eSAndrew Geissler
400903674eSAndrew GeisslerRemoved Recipes
410903674eSAndrew Geissler---------------
420903674eSAndrew Geissler
430903674eSAndrew GeisslerThe following recipes have been removed.
440903674eSAndrew Geissler
450903674eSAndrew Geissler-  ``core-image-lsb-dev``: Part of removed LSB support.
460903674eSAndrew Geissler
470903674eSAndrew Geissler-  ``core-image-lsb``: Part of removed LSB support.
480903674eSAndrew Geissler
490903674eSAndrew Geissler-  ``core-image-lsb-sdk``: Part of removed LSB support.
500903674eSAndrew Geissler
510903674eSAndrew Geissler-  ``cve-check-tool``: Functionally replaced by the ``cve-update-db``
52517393d9SAndrew Geissler   recipe and :ref:`ref-classes-cve-check` class.
530903674eSAndrew Geissler
540903674eSAndrew Geissler-  ``eglinfo``: No longer maintained. ``eglinfo`` from ``mesa-demos`` is
550903674eSAndrew Geissler   an adequate and maintained alternative.
560903674eSAndrew Geissler
570903674eSAndrew Geissler-  ``gcc-8.3``: Version 8.3 removed. Replaced by 9.2.
580903674eSAndrew Geissler
590903674eSAndrew Geissler-  ``gnome-themes-standard``: Only needed by gtk+ 2.x, which has been
600903674eSAndrew Geissler   removed.
610903674eSAndrew Geissler
620903674eSAndrew Geissler-  ``gtk+``: GTK+ 2 is obsolete and has been replaced by gtk+3.
630903674eSAndrew Geissler
640903674eSAndrew Geissler-  ``irda-utils``: Has become obsolete. IrDA support has been removed
650903674eSAndrew Geissler   from the Linux kernel in version 4.17 and later.
660903674eSAndrew Geissler
670903674eSAndrew Geissler-  ``libnewt-python``: ``libnewt`` Python support merged into main
680903674eSAndrew Geissler   ``libnewt`` recipe.
690903674eSAndrew Geissler
700903674eSAndrew Geissler-  ``libsdl``: Replaced by newer ``libsdl2``.
710903674eSAndrew Geissler
720903674eSAndrew Geissler-  ``libx11-diet``: Became obsolete.
730903674eSAndrew Geissler
740903674eSAndrew Geissler-  ``libxx86dga``: Removed obsolete client library.
750903674eSAndrew Geissler
760903674eSAndrew Geissler-  ``libxx86misc``: Removed. Library is redundant.
770903674eSAndrew Geissler
780903674eSAndrew Geissler-  ``linux-yocto``: Version 5.0 removed, which is now redundant (5.2 /
790903674eSAndrew Geissler   4.19 present).
800903674eSAndrew Geissler
810903674eSAndrew Geissler-  ``lsbinitscripts``: Part of removed LSB support.
820903674eSAndrew Geissler
830903674eSAndrew Geissler-  ``lsb``: Part of removed LSB support.
840903674eSAndrew Geissler
850903674eSAndrew Geissler-  ``lsbtest``: Part of removed LSB support.
860903674eSAndrew Geissler
870903674eSAndrew Geissler-  ``openssl10``: Replaced by newer ``openssl`` version 1.1.
880903674eSAndrew Geissler
890903674eSAndrew Geissler-  ``packagegroup-core-lsb``: Part of removed LSB support.
900903674eSAndrew Geissler
910903674eSAndrew Geissler-  ``python-nose``: Removed the Python 2.x version of the recipe.
920903674eSAndrew Geissler
930903674eSAndrew Geissler-  ``python-numpy``: Removed the Python 2.x version of the recipe.
940903674eSAndrew Geissler
950903674eSAndrew Geissler-  ``python-scons``: Removed the Python 2.x version of the recipe.
960903674eSAndrew Geissler
970903674eSAndrew Geissler-  ``source-highlight``: No longer needed.
980903674eSAndrew Geissler
990903674eSAndrew Geissler-  ``stress``: Replaced by ``stress-ng``.
1000903674eSAndrew Geissler
1010903674eSAndrew Geissler-  ``vulkan``: Split into ``vulkan-loader``, ``vulkan-headers``, and
1020903674eSAndrew Geissler   ``vulkan-tools``.
1030903674eSAndrew Geissler
1040903674eSAndrew Geissler-  ``weston-conf``: Functionality moved to ``weston-init``.
1050903674eSAndrew Geissler
1060903674eSAndrew Geissler.. _migration-3.0-packaging-changes:
1070903674eSAndrew Geissler
1080903674eSAndrew GeisslerPackaging Changes
1090903674eSAndrew Geissler-----------------
1100903674eSAndrew Geissler
1110903674eSAndrew GeisslerThe following packaging changes have occurred.
1120903674eSAndrew Geissler
1137784c429SPatrick Williams-  The :wikipedia:`Epiphany <GNOME_Web>` browser
1140903674eSAndrew Geissler   has been dropped from ``packagegroup-self-hosted`` as it has not been
1150903674eSAndrew Geissler   needed inside ``build-appliance-image`` for quite some time and was
1160903674eSAndrew Geissler   causing resource problems.
1170903674eSAndrew Geissler
1180903674eSAndrew Geissler-  ``libcap-ng`` Python support has been moved to a separate
1190903674eSAndrew Geissler   ``libcap-ng-python`` recipe to streamline the build process when the
1200903674eSAndrew Geissler   Python bindings are not needed.
1210903674eSAndrew Geissler
1220903674eSAndrew Geissler-  ``libdrm`` now packages the file ``amdgpu.ids`` into a separate
1230903674eSAndrew Geissler   ``libdrm-amdgpu`` package.
1240903674eSAndrew Geissler
1250903674eSAndrew Geissler-  ``python3``: The ``runpy`` module is now in the ``python3-core``
1260903674eSAndrew Geissler   package as it is required to support the common "python3 -m" command
1270903674eSAndrew Geissler   usage.
1280903674eSAndrew Geissler
1290903674eSAndrew Geissler-  ``distcc`` now provides separate ``distcc-client`` and
1300903674eSAndrew Geissler   ``distcc-server`` packages as typically one or the other are needed,
1310903674eSAndrew Geissler   rather than both.
1320903674eSAndrew Geissler
1330903674eSAndrew Geissler-  ``python*-setuptools`` recipes now separately package the
1340903674eSAndrew Geissler   ``pkg_resources`` module in a ``python-pkg-resources`` /
1350903674eSAndrew Geissler   ``python3-pkg-resources`` package as the module is useful independent
1360903674eSAndrew Geissler   of the rest of the setuptools package. The main ``python-setuptools``
1370903674eSAndrew Geissler   / ``python3-setuptools`` package depends on this new package so you
1380903674eSAndrew Geissler   should only need to update dependencies unless you want to take
1390903674eSAndrew Geissler   advantage of the increased granularity.
1400903674eSAndrew Geissler
1410903674eSAndrew Geissler.. _migration-3.0-cve-checking:
1420903674eSAndrew Geissler
1430903674eSAndrew GeisslerCVE Checking
1440903674eSAndrew Geissler------------
1450903674eSAndrew Geissler
1460903674eSAndrew Geissler``cve-check-tool`` has been functionally replaced by a new
147517393d9SAndrew Geissler``cve-update-db`` recipe and functionality built into the :ref:`ref-classes-cve-check`
1480903674eSAndrew Geisslerclass. The result uses NVD JSON data feeds rather than the deprecated
1490903674eSAndrew GeisslerXML feeds that ``cve-check-tool`` was using, supports CVSSv3 scoring,
1500903674eSAndrew Geisslerand makes other improvements.
1510903674eSAndrew Geissler
1520903674eSAndrew GeisslerAdditionally, the ``CVE_CHECK_CVE_WHITELIST`` variable has been replaced
153*da295319SPatrick Williamsby ``CVE_CHECK_WHITELIST`` (replaced by :term:`CVE_CHECK_IGNORE` in version 4.0).
1540903674eSAndrew Geissler
1550903674eSAndrew Geissler.. _migration-3.0-bitbake-changes:
1560903674eSAndrew Geissler
157d583833aSAndrew GeisslerBitBake Changes
1580903674eSAndrew Geissler---------------
1590903674eSAndrew Geissler
1600903674eSAndrew GeisslerThe following BitBake changes have occurred.
1610903674eSAndrew Geissler
1620903674eSAndrew Geissler-  ``addtask`` statements now properly validate dependent tasks.
1630903674eSAndrew Geissler   Previously, an invalid task was silently ignored. With this change,
1640903674eSAndrew Geissler   the invalid task generates a warning.
1650903674eSAndrew Geissler
1660903674eSAndrew Geissler-  Other invalid ``addtask`` and ``deltask`` usages now trigger these
1670903674eSAndrew Geissler   warnings: "multiple target tasks arguments with addtask / deltask",
1680903674eSAndrew Geissler   and "multiple before/after clauses".
1690903674eSAndrew Geissler
1700903674eSAndrew Geissler-  The "multiconfig" prefix is now shortened to "mc". "multiconfig" will
1710903674eSAndrew Geissler   continue to work, however it may be removed in a future release.
1720903674eSAndrew Geissler
1730903674eSAndrew Geissler-  The ``bitbake -g`` command no longer generates a
1740903674eSAndrew Geissler   ``recipe-depends.dot`` file as the contents (i.e. a reprocessed
1750903674eSAndrew Geissler   version of ``task-depends.dot``) were confusing.
1760903674eSAndrew Geissler
1770903674eSAndrew Geissler-  The ``bb.build.FuncFailed`` exception, previously raised by
1780903674eSAndrew Geissler   ``bb.build.exec_func()`` when certain other exceptions have occurred,
1790903674eSAndrew Geissler   has been removed. The real underlying exceptions will be raised
1800903674eSAndrew Geissler   instead. If you have calls to ``bb.build.exec_func()`` in custom
1810903674eSAndrew Geissler   classes or ``tinfoil-using`` scripts, any references to
1820903674eSAndrew Geissler   ``bb.build.FuncFailed`` should be cleaned up.
1830903674eSAndrew Geissler
1840903674eSAndrew Geissler-  Additionally, the ``bb.build.exec_func()`` no longer accepts the
1850903674eSAndrew Geissler   "pythonexception" parameter. The function now always raises
1860903674eSAndrew Geissler   exceptions. Remove this argument in any calls to
1870903674eSAndrew Geissler   ``bb.build.exec_func()`` in custom classes or scripts.
1880903674eSAndrew Geissler
1890903674eSAndrew Geissler-  The ``BB_SETSCENE_VERIFY_FUNCTION2`` variable is no longer used. In
1900903674eSAndrew Geissler   the unlikely event that you have any references to it, they should be
1910903674eSAndrew Geissler   removed.
1920903674eSAndrew Geissler
1930903674eSAndrew Geissler-  The ``RunQueueExecuteScenequeue`` and ``RunQueueExecuteTasks`` events
1940903674eSAndrew Geissler   have been removed since setscene tasks are now executed as part of
1950903674eSAndrew Geissler   the normal runqueue. Any event handling code in custom classes or
1960903674eSAndrew Geissler   scripts that handles these two events need to be updated.
1970903674eSAndrew Geissler
1980903674eSAndrew Geissler-  The arguments passed to functions used with
199213cb269SPatrick Williams   :term:`BB_HASHCHECK_FUNCTION`
2000903674eSAndrew Geissler   have changed. If you are using your own custom hash check function,
2010903674eSAndrew Geissler   see :yocto_git:`/poky/commit/?id=40a5e193c4ba45c928fccd899415ea56b5417725`
2020903674eSAndrew Geissler   for details.
2030903674eSAndrew Geissler
2040903674eSAndrew Geissler-  Task specifications in ``BB_TASKDEPDATA`` and class implementations
2050903674eSAndrew Geissler   used in signature generator classes now use "<fn>:<task>" everywhere
2060903674eSAndrew Geissler   rather than the "." delimiter that was being used in some places.
2070903674eSAndrew Geissler   This change makes it consistent with all areas in the code. Custom
2080903674eSAndrew Geissler   signature generator classes and code that reads ``BB_TASKDEPDATA``
2090903674eSAndrew Geissler   need to be updated to use ':' as a separator rather than '.'.
2100903674eSAndrew Geissler
2110903674eSAndrew Geissler.. _migration-3.0-sanity-checks:
2120903674eSAndrew Geissler
2130903674eSAndrew GeisslerSanity Checks
2140903674eSAndrew Geissler-------------
2150903674eSAndrew Geissler
2160903674eSAndrew GeisslerThe following sanity check changes occurred.
2170903674eSAndrew Geissler
2180903674eSAndrew Geissler-  :term:`SRC_URI` is now checked for usage of two
2190903674eSAndrew Geissler   problematic items:
2200903674eSAndrew Geissler
221615f2f11SAndrew Geissler   -  "${PN}" prefix/suffix use --- warnings always appear if ${PN} is
2220903674eSAndrew Geissler      used. You must fix the issue regardless of whether multiconfig or
2230903674eSAndrew Geissler      anything else that would cause prefixing/suffixing to happen.
2240903674eSAndrew Geissler
225615f2f11SAndrew Geissler   -  Github archive tarballs --- these are not guaranteed to be stable.
2260903674eSAndrew Geissler      Consequently, it is likely that the tarballs will be refreshed and
227517393d9SAndrew Geissler      thus the :term:`SRC_URI` checksums will fail to apply. It is recommended
2280903674eSAndrew Geissler      that you fetch either an official release tarball or a specific
2290903674eSAndrew Geissler      revision from the actual Git repository instead.
2300903674eSAndrew Geissler
2310903674eSAndrew Geissler   Either one of these items now trigger a warning by default. If you
2320903674eSAndrew Geissler   wish to disable this check, remove ``src-uri-bad`` from
2330903674eSAndrew Geissler   :term:`WARN_QA`.
2340903674eSAndrew Geissler
2350903674eSAndrew Geissler-  The ``file-rdeps`` runtime dependency check no longer expands
2360903674eSAndrew Geissler   :term:`RDEPENDS` recursively as there is no mechanism
2370903674eSAndrew Geissler   to ensure they can be fully computed, and thus races sometimes result
2380903674eSAndrew Geissler   in errors either showing up or not. Thus, you might now see errors
2390903674eSAndrew Geissler   for missing runtime dependencies that were previously satisfied
2400903674eSAndrew Geissler   recursively. Here is an example: package A contains a shell script
2410903674eSAndrew Geissler   starting with ``#!/bin/bash`` but has no dependency on bash. However,
2420903674eSAndrew Geissler   package A depends on package B, which does depend on bash. You need
2430903674eSAndrew Geissler   to add the missing dependency or dependencies to resolve the warning.
2440903674eSAndrew Geissler
2450903674eSAndrew Geissler-  Setting ``DEPENDS_${PN}`` anywhere (i.e. typically in a recipe) now
2460903674eSAndrew Geissler   triggers an error. The error is triggered because
2470903674eSAndrew Geissler   :term:`DEPENDS` is not a package-specific variable
2485f35090dSAndrew Geissler   unlike RDEPENDS. You should set :term:`DEPENDS` instead.
2490903674eSAndrew Geissler
2500903674eSAndrew Geissler-  systemd currently does not work well with the musl C library because
2510903674eSAndrew Geissler   only upstream officially supports linking the library with glibc.
2520903674eSAndrew Geissler   Thus, a warning is shown when building systemd in conjunction with
2530903674eSAndrew Geissler   musl.
2540903674eSAndrew Geissler
2550903674eSAndrew Geissler.. _migration-3.0-miscellaneous-changes:
2560903674eSAndrew Geissler
2570903674eSAndrew GeisslerMiscellaneous Changes
2580903674eSAndrew Geissler---------------------
2590903674eSAndrew Geissler
2600903674eSAndrew GeisslerThe following miscellaneous changes have occurred.
2610903674eSAndrew Geissler
2620903674eSAndrew Geissler-  The ``gnome`` class has been removed because it now does very little.
2630903674eSAndrew Geissler   You should update recipes that previously inherited this class to do
264517393d9SAndrew Geissler   the following::
265517393d9SAndrew Geissler
266517393d9SAndrew Geissler      inherit gnomebase gtk-icon-cache gconf mime
2670903674eSAndrew Geissler
2680903674eSAndrew Geissler-  The ``meta/recipes-kernel/linux/linux-dtb.inc`` file has been
2690903674eSAndrew Geissler   removed. This file was previously deprecated in favor of setting
2700903674eSAndrew Geissler   :term:`KERNEL_DEVICETREE` in any kernel
2710903674eSAndrew Geissler   recipe and only produced a warning. Remove any ``include`` or
2720903674eSAndrew Geissler   ``require`` statements pointing to this file.
2730903674eSAndrew Geissler
2740903674eSAndrew Geissler-  :term:`TARGET_CFLAGS`,
2750903674eSAndrew Geissler   :term:`TARGET_CPPFLAGS`,
2760903674eSAndrew Geissler   :term:`TARGET_CXXFLAGS`, and
2770903674eSAndrew Geissler   :term:`TARGET_LDFLAGS` are no longer exported
2780903674eSAndrew Geissler   to the external environment. This change did not require any changes
2790903674eSAndrew Geissler   to core recipes, which is a good indicator that no changes will be
2800903674eSAndrew Geissler   required. However, if for some reason the software being built by one
2810903674eSAndrew Geissler   of your recipes is expecting these variables to be set, then building
2820903674eSAndrew Geissler   the recipe will fail. In such cases, you must either export the
2830903674eSAndrew Geissler   variable or variables in the recipe or change the scripts so that
2840903674eSAndrew Geissler   exporting is not necessary.
2850903674eSAndrew Geissler
2860903674eSAndrew Geissler-  You must change the host distro identifier used in
2870903674eSAndrew Geissler   :term:`NATIVELSBSTRING` to use all lowercase
2880903674eSAndrew Geissler   characters even if it does not contain a version number. This change
289517393d9SAndrew Geissler   is necessary only if you are not using
290517393d9SAndrew Geissler   :ref:`ref-classes-uninative` and :term:`SANITY_TESTED_DISTROS`.
2910903674eSAndrew Geissler
2920903674eSAndrew Geissler-  In the ``base-files`` recipe, writing the hostname into
2930903674eSAndrew Geissler   ``/etc/hosts`` and ``/etc/hostname`` is now done within the main
2940903674eSAndrew Geissler   :ref:`ref-tasks-install` function rather than in the
2950903674eSAndrew Geissler   ``do_install_basefilesissue`` function. The reason for the change is
2960903674eSAndrew Geissler   because ``do_install_basefilesissue`` is more easily overridden
2970903674eSAndrew Geissler   without having to duplicate the hostname functionality. If you have
2980903674eSAndrew Geissler   done the latter (e.g. in a ``base-files`` bbappend), then you should
2990903674eSAndrew Geissler   remove it from your customized ``do_install_basefilesissue``
3000903674eSAndrew Geissler   function.
3010903674eSAndrew Geissler
3020903674eSAndrew Geissler-  The ``wic --expand`` command now uses commas to separate "key:value"
3030903674eSAndrew Geissler   pairs rather than hyphens.
3040903674eSAndrew Geissler
3050903674eSAndrew Geissler   .. note::
3060903674eSAndrew Geissler
3070903674eSAndrew Geissler      The wic command-line help is not updated.
3080903674eSAndrew Geissler
3090903674eSAndrew Geissler   You must update any scripts or commands where you use
3100903674eSAndrew Geissler   ``wic --expand`` with multiple "key:value" pairs.
3110903674eSAndrew Geissler
3120903674eSAndrew Geissler-  UEFI image variable settings have been moved from various places to a
3130903674eSAndrew Geissler   central ``conf/image-uefi.conf``. This change should not influence
3140903674eSAndrew Geissler   any existing configuration as the ``meta/conf/image-uefi.conf`` in
3150903674eSAndrew Geissler   the core metadata sets defaults that can be overridden in the same
3160903674eSAndrew Geissler   manner as before.
3170903674eSAndrew Geissler
3180903674eSAndrew Geissler-  ``conf/distro/include/world-broken.inc`` has been removed. For cases
3190903674eSAndrew Geissler   where certain recipes need to be disabled when using the musl C
3200903674eSAndrew Geissler   library, these recipes now have ``COMPATIBLE_HOST_libc-musl`` set
3210903674eSAndrew Geissler   with a comment that explains why.
3220903674eSAndrew Geissler
3230903674eSAndrew Geissler
324