xref: /openbmc/openbmc/poky/documentation/migration-guides/migration-2.5.rst (revision 5f35090dc809872fb7b8f381c1ccf995b75f03a0)
10903674eSAndrew GeisslerRelease 2.5 (sumo)
20903674eSAndrew Geissler==================
30903674eSAndrew Geissler
40903674eSAndrew GeisslerThis section provides migration information for moving to the Yocto
50903674eSAndrew GeisslerProject 2.5 Release (codename "sumo") from the prior release.
60903674eSAndrew Geissler
70903674eSAndrew Geissler.. _migration-2.5-packaging-changes:
80903674eSAndrew Geissler
90903674eSAndrew GeisslerPackaging Changes
100903674eSAndrew Geissler-----------------
110903674eSAndrew Geissler
120903674eSAndrew GeisslerThis section provides information about packaging changes that have
130903674eSAndrew Geissleroccurred:
140903674eSAndrew Geissler
150903674eSAndrew Geissler-  ``bind-libs``: The libraries packaged by the bind recipe are in a
160903674eSAndrew Geissler   separate ``bind-libs`` package.
170903674eSAndrew Geissler
180903674eSAndrew Geissler-  ``libfm-gtk``: The ``libfm`` GTK+ bindings are split into a
190903674eSAndrew Geissler   separate ``libfm-gtk`` package.
200903674eSAndrew Geissler
210903674eSAndrew Geissler-  ``flex-libfl``: The flex recipe splits out libfl into a separate
220903674eSAndrew Geissler   ``flex-libfl`` package to avoid too many dependencies being pulled in
230903674eSAndrew Geissler   where only the library is needed.
240903674eSAndrew Geissler
250903674eSAndrew Geissler-  ``grub-efi``: The ``grub-efi`` configuration is split into a
260903674eSAndrew Geissler   separate ``grub-bootconf`` recipe. However, the dependency
270903674eSAndrew Geissler   relationship from ``grub-efi`` is through a virtual/grub-bootconf
280903674eSAndrew Geissler   provider making it possible to have your own recipe provide the
290903674eSAndrew Geissler   dependency. Alternatively, you can use a BitBake append file to bring
300903674eSAndrew Geissler   the configuration back into the ``grub-efi`` recipe.
310903674eSAndrew Geissler
320903674eSAndrew Geissler-  *armv7a Legacy Package Feed Support:* Legacy support is removed for
330903674eSAndrew Geissler   transitioning from ``armv7a`` to ``armv7a-vfp-neon`` in package
340903674eSAndrew Geissler   feeds, which was previously enabled by setting
350903674eSAndrew Geissler   ``PKGARCHCOMPAT_ARMV7A``. This transition occurred in 2011 and active
360903674eSAndrew Geissler   package feeds should by now be updated to the new naming.
370903674eSAndrew Geissler
380903674eSAndrew Geissler.. _migration-2.5-removed-recipes:
390903674eSAndrew Geissler
400903674eSAndrew GeisslerRemoved Recipes
410903674eSAndrew Geissler---------------
420903674eSAndrew Geissler
430903674eSAndrew GeisslerThe following recipes have been removed:
440903674eSAndrew Geissler
450903674eSAndrew Geissler-  ``gcc``: The version 6.4 recipes are replaced by 7.x.
460903674eSAndrew Geissler
470903674eSAndrew Geissler-  ``gst-player``: Renamed to ``gst-examples`` as per upstream.
480903674eSAndrew Geissler
490903674eSAndrew Geissler-  ``hostap-utils``: This software package is obsolete.
500903674eSAndrew Geissler
510903674eSAndrew Geissler-  ``latencytop``: This recipe is no longer maintained upstream. The
520903674eSAndrew Geissler   last release was in 2009.
530903674eSAndrew Geissler
540903674eSAndrew Geissler-  ``libpfm4``: The only file that requires this recipe is
550903674eSAndrew Geissler   ``oprofile``, which has been removed.
560903674eSAndrew Geissler
570903674eSAndrew Geissler-  ``linux-yocto``: The version 4.4, 4.9, and 4.10 recipes have been
580903674eSAndrew Geissler   removed. Versions 4.12, 4.14, and 4.15 remain.
590903674eSAndrew Geissler
600903674eSAndrew Geissler-  ``man``: This recipe has been replaced by modern ``man-db``
610903674eSAndrew Geissler
620903674eSAndrew Geissler-  ``mkelfimage``: This tool has been removed in the upstream coreboot
630903674eSAndrew Geissler   project, and is no longer needed with the removal of the ELF image
640903674eSAndrew Geissler   type.
650903674eSAndrew Geissler
660903674eSAndrew Geissler-  ``nativesdk-postinst-intercept``: This recipe is not maintained.
670903674eSAndrew Geissler
680903674eSAndrew Geissler-  ``neon``: This software package is no longer maintained upstream
690903674eSAndrew Geissler   and is no longer needed by anything in OpenEmbedded-Core.
700903674eSAndrew Geissler
710903674eSAndrew Geissler-  ``oprofile``: The functionality of this recipe is replaced by
720903674eSAndrew Geissler   ``perf`` and keeping compatibility on an ongoing basis with ``musl``
730903674eSAndrew Geissler   is difficult.
740903674eSAndrew Geissler
750903674eSAndrew Geissler-  ``pax``: This software package is obsolete.
760903674eSAndrew Geissler
770903674eSAndrew Geissler-  ``stat``: This software package is not maintained upstream.
780903674eSAndrew Geissler   ``coreutils`` provides a modern stat binary.
790903674eSAndrew Geissler
800903674eSAndrew Geissler-  ``zisofs-tools-native``: This recipe is no longer needed because
810903674eSAndrew Geissler   the compressed ISO image feature has been removed.
820903674eSAndrew Geissler
830903674eSAndrew Geissler.. _migration-2.5-scripts-and-tools-changes:
840903674eSAndrew Geissler
850903674eSAndrew GeisslerScripts and Tools Changes
860903674eSAndrew Geissler-------------------------
870903674eSAndrew Geissler
880903674eSAndrew GeisslerThe following are changes to scripts and tools:
890903674eSAndrew Geissler
900903674eSAndrew Geissler-  ``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer``: The
910903674eSAndrew Geissler   ``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer`` scripts
920903674eSAndrew Geissler   previously shipped with poky but not in OpenEmbedded-Core have been
930903674eSAndrew Geissler   removed. These scripts are not maintained and are outdated. In many
940903674eSAndrew Geissler   cases, they are also limited in scope. The
950903674eSAndrew Geissler   ``bitbake-layers create-layer`` command is a direct replacement for
960903674eSAndrew Geissler   ``yocto-layer``. See the documentation to create a BSP or kernel
970903674eSAndrew Geissler   recipe in the ":ref:`bsp-guide/bsp:bsp kernel recipe example`" section.
980903674eSAndrew Geissler
990903674eSAndrew Geissler-  ``devtool finish``: ``devtool finish`` now exits with an error if
1000903674eSAndrew Geissler   there are uncommitted changes or a rebase/am in progress in the
1010903674eSAndrew Geissler   recipe's source repository. If this error occurs, there might be
1020903674eSAndrew Geissler   uncommitted changes that will not be included in updates to the
1030903674eSAndrew Geissler   patches applied by the recipe. A -f/--force option is provided for
1040903674eSAndrew Geissler   situations that the uncommitted changes are inconsequential and you
1050903674eSAndrew Geissler   want to proceed regardless.
1060903674eSAndrew Geissler
1070903674eSAndrew Geissler-  ``scripts/oe-setup-rpmrepo`` script: The functionality of
1080903674eSAndrew Geissler   ``scripts/oe-setup-rpmrepo`` is replaced by
1090903674eSAndrew Geissler   ``bitbake package-index``.
1100903674eSAndrew Geissler
1110903674eSAndrew Geissler-  ``scripts/test-dependencies.sh`` script: The script is largely made
1120903674eSAndrew Geissler   obsolete by the recipe-specific sysroots functionality introduced in
1130903674eSAndrew Geissler   the previous release.
1140903674eSAndrew Geissler
1150903674eSAndrew Geissler.. _migration-2.5-bitbake-changes:
1160903674eSAndrew Geissler
1170903674eSAndrew GeisslerBitBake Changes
1180903674eSAndrew Geissler---------------
1190903674eSAndrew Geissler
1200903674eSAndrew GeisslerThe following are BitBake changes:
1210903674eSAndrew Geissler
1220903674eSAndrew Geissler-  The ``--runall`` option has changed. There are two different
1230903674eSAndrew Geissler   behaviors people might want:
1240903674eSAndrew Geissler
1250903674eSAndrew Geissler   -  *Behavior A:* For a given target (or set of targets) look through
1260903674eSAndrew Geissler      the task graph and run task X only if it is present and will be
1270903674eSAndrew Geissler      built.
1280903674eSAndrew Geissler
1290903674eSAndrew Geissler   -  *Behavior B:* For a given target (or set of targets) look through
1300903674eSAndrew Geissler      the task graph and run task X if any recipe in the taskgraph has
1310903674eSAndrew Geissler      such a target, even if it is not in the original task graph.
1320903674eSAndrew Geissler
1330903674eSAndrew Geissler   The ``--runall`` option now performs "Behavior B". Previously
1340903674eSAndrew Geissler   ``--runall`` behaved like "Behavior A". A ``--runonly`` option has
1350903674eSAndrew Geissler   been added to retain the ability to perform "Behavior A".
1360903674eSAndrew Geissler
1370903674eSAndrew Geissler-  Several explicit "run this task for all recipes in the dependency
1380903674eSAndrew Geissler   tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``,
1390903674eSAndrew Geissler   and the ``*all`` tasks provided by the ``distrodata`` and
1400903674eSAndrew Geissler   ``archiver`` classes). There is a BitBake option to complete this for
1410903674eSAndrew Geissler   any arbitrary task. For example::
1420903674eSAndrew Geissler
1430903674eSAndrew Geissler      bitbake <target> -c fetchall
1440903674eSAndrew Geissler
1450903674eSAndrew Geissler   should now be replaced with::
1460903674eSAndrew Geissler
1470903674eSAndrew Geissler      bitbake <target> --runall=fetch
1480903674eSAndrew Geissler
1490903674eSAndrew Geissler.. _migration-2.5-python-and-python3-changes:
1500903674eSAndrew Geissler
1510903674eSAndrew GeisslerPython and Python 3 Changes
1520903674eSAndrew Geissler---------------------------
1530903674eSAndrew Geissler
1540903674eSAndrew GeisslerThe following are auto-packaging changes to Python and Python 3:
1550903674eSAndrew Geissler
1560903674eSAndrew GeisslerThe script-managed ``python-*-manifest.inc`` files that were previously
1570903674eSAndrew Geisslerused to generate Python and Python 3 packages have been replaced with a
1580903674eSAndrew GeisslerJSON-based file that is easier to read and maintain. A new task is
1590903674eSAndrew Geissleravailable for maintainers of the Python recipes to update the JSON file
1600903674eSAndrew Geisslerwhen upgrading to new Python versions. You can now edit the file
1610903674eSAndrew Geisslerdirectly instead of having to edit a script and run it to update the
1620903674eSAndrew Geisslerfile.
1630903674eSAndrew Geissler
1640903674eSAndrew GeisslerOne particular change to note is that the Python recipes no longer have
1650903674eSAndrew Geisslerbuild-time provides for their packages. This assumes ``python-foo`` is
1660903674eSAndrew Geisslerone of the packages provided by the Python recipe. You can no longer run
1670903674eSAndrew Geissler``bitbake python-foo`` or have a
1680903674eSAndrew Geissler:term:`DEPENDS` on ``python-foo``,
1690903674eSAndrew Geisslerbut doing either of the following causes the package to work as
1700903674eSAndrew Geisslerexpected::
1710903674eSAndrew Geissler
1720903674eSAndrew Geissler   IMAGE_INSTALL_append = " python-foo"
1730903674eSAndrew Geissler
1740903674eSAndrew Geissleror ::
1750903674eSAndrew Geissler
1760903674eSAndrew Geissler   RDEPENDS_${PN} = "python-foo"
1770903674eSAndrew Geissler
1780903674eSAndrew GeisslerThe earlier build-time provides behavior was a quirk of the
1790903674eSAndrew Geisslerway the Python manifest file was created. For more information on this
1800903674eSAndrew Geisslerchange please see :yocto_git:`this commit
1810903674eSAndrew Geissler</poky/commit/?id=8d94b9db221d1def42f091b991903faa2d1651ce>`.
1820903674eSAndrew Geissler
1830903674eSAndrew Geissler.. _migration-2.5-miscellaneous-changes:
1840903674eSAndrew Geissler
1850903674eSAndrew GeisslerMiscellaneous Changes
1860903674eSAndrew Geissler---------------------
1870903674eSAndrew Geissler
1880903674eSAndrew GeisslerThe following are additional changes:
1890903674eSAndrew Geissler
1900903674eSAndrew Geissler-  The ``kernel`` class supports building packages for multiple kernels.
1910903674eSAndrew Geissler   If your kernel recipe or ``.bbappend`` file mentions packaging at
1920903674eSAndrew Geissler   all, you should replace references to the kernel in package names
1930903674eSAndrew Geissler   with ``${KERNEL_PACKAGE_NAME}``. For example, if you disable
1940903674eSAndrew Geissler   automatic installation of the kernel image using
1950903674eSAndrew Geissler   ``RDEPENDS_kernel-base = ""`` you can avoid warnings using
1960903674eSAndrew Geissler   ``RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""`` instead.
1970903674eSAndrew Geissler
1980903674eSAndrew Geissler-  The ``buildhistory`` class commits changes to the repository by
1990903674eSAndrew Geissler   default so you no longer need to set ``BUILDHISTORY_COMMIT = "1"``.
2000903674eSAndrew Geissler   If you want to disable commits you need to set
2010903674eSAndrew Geissler   ``BUILDHISTORY_COMMIT = "0"`` in your configuration.
2020903674eSAndrew Geissler
2030903674eSAndrew Geissler-  The ``beaglebone`` reference machine has been renamed to
2040903674eSAndrew Geissler   ``beaglebone-yocto``. The ``beaglebone-yocto`` BSP is a reference
2050903674eSAndrew Geissler   implementation using only mainline components available in
2060903674eSAndrew Geissler   OpenEmbedded-Core and ``meta-yocto-bsp``, whereas Texas Instruments
2070903674eSAndrew Geissler   maintains a full-featured BSP in the ``meta-ti`` layer. This rename
2080903674eSAndrew Geissler   avoids the previous name clash that existed between the two BSPs.
2090903674eSAndrew Geissler
2100903674eSAndrew Geissler-  The ``update-alternatives`` class no longer works with SysV ``init``
2110903674eSAndrew Geissler   scripts because this usage has been problematic. Also, the
2120903674eSAndrew Geissler   ``sysklogd`` recipe no longer uses ``update-alternatives`` because it
2130903674eSAndrew Geissler   is incompatible with other implementations.
2140903674eSAndrew Geissler
2150903674eSAndrew Geissler-  By default, the :ref:`cmake <ref-classes-cmake>` class uses
2160903674eSAndrew Geissler   ``ninja`` instead of ``make`` for building. This improves build
2170903674eSAndrew Geissler   performance. If a recipe is broken with ``ninja``, then the recipe
2180903674eSAndrew Geissler   can set ``OECMAKE_GENERATOR = "Unix Makefiles"`` to change back to
2190903674eSAndrew Geissler   ``make``.
2200903674eSAndrew Geissler
2210903674eSAndrew Geissler-  The previously deprecated ``base_*`` functions have been removed in
2220903674eSAndrew Geissler   favor of their replacements in ``meta/lib/oe`` and
2230903674eSAndrew Geissler   ``bitbake/lib/bb``. These are typically used from recipes and
2240903674eSAndrew Geissler   classes. Any references to the old functions must be updated. The
2250903674eSAndrew Geissler   following table shows the removed functions and their replacements:
2260903674eSAndrew Geissler
2270903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2280903674eSAndrew Geissler   | *Removed*                    | *Replacement*                                            |
2290903674eSAndrew Geissler   +==============================+==========================================================+
2300903674eSAndrew Geissler   | base_path_join()             | oe.path.join()                                           |
2310903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2320903674eSAndrew Geissler   | base_path_relative()         | oe.path.relative()                                       |
2330903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2340903674eSAndrew Geissler   | base_path_out()              | oe.path.format_display()                                 |
2350903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2360903674eSAndrew Geissler   | base_read_file()             | oe.utils.read_file()                                     |
2370903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2380903674eSAndrew Geissler   | base_ifelse()                | oe.utils.ifelse()                                        |
2390903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2400903674eSAndrew Geissler   | base_conditional()           | oe.utils.conditional()                                   |
2410903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2420903674eSAndrew Geissler   | base_less_or_equal()         | oe.utils.less_or_equal()                                 |
2430903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2440903674eSAndrew Geissler   | base_version_less_or_equal() | oe.utils.version_less_or_equal()                         |
2450903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2460903674eSAndrew Geissler   | base_contains()              | bb.utils.contains()                                      |
2470903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2480903674eSAndrew Geissler   | base_both_contain()          | oe.utils.both_contain()                                  |
2490903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2500903674eSAndrew Geissler   | base_prune_suffix()          | oe.utils.prune_suffix()                                  |
2510903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2520903674eSAndrew Geissler   | oe_filter()                  | oe.utils.str_filter()                                    |
2530903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2540903674eSAndrew Geissler   | oe_filter_out()              | oe.utils.str_filter_out() (or use the \_remove operator) |
2550903674eSAndrew Geissler   +------------------------------+----------------------------------------------------------+
2560903674eSAndrew Geissler
2570903674eSAndrew Geissler-  Using ``exit 1`` to explicitly defer a postinstall script until first
2580903674eSAndrew Geissler   boot is now deprecated since it is not an obvious mechanism and can
2590903674eSAndrew Geissler   mask actual errors. If you want to explicitly defer a postinstall to
2600903674eSAndrew Geissler   first boot on the target rather than at ``rootfs`` creation time, use
2610903674eSAndrew Geissler   ``pkg_postinst_ontarget()`` or call
2620903674eSAndrew Geissler   ``postinst_intercept delay_to_first_boot`` from ``pkg_postinst()``.
2630903674eSAndrew Geissler   Any failure of a ``pkg_postinst()`` script (including ``exit 1``)
2640903674eSAndrew Geissler   will trigger a warning during ``do_rootfs``.
2650903674eSAndrew Geissler
2660903674eSAndrew Geissler   For more information, see the
2670903674eSAndrew Geissler   ":ref:`dev-manual/common-tasks:post-installation scripts`"
2680903674eSAndrew Geissler   section in the Yocto Project Development Tasks Manual.
2690903674eSAndrew Geissler
2700903674eSAndrew Geissler-  The ``elf`` image type has been removed. This image type was removed
2710903674eSAndrew Geissler   because the ``mkelfimage`` tool that was required to create it is no
2720903674eSAndrew Geissler   longer provided by coreboot upstream and required updating every time
2730903674eSAndrew Geissler   ``binutils`` updated.
2740903674eSAndrew Geissler
2750903674eSAndrew Geissler-  Support for .iso image compression (previously enabled through
2760903674eSAndrew Geissler   ``COMPRESSISO = "1"``) has been removed. The userspace tools
2770903674eSAndrew Geissler   (``zisofs-tools``) are unmaintained and ``squashfs`` provides better
2780903674eSAndrew Geissler   performance and compression. In order to build a live image with
2790903674eSAndrew Geissler   squashfs+lz4 compression enabled you should now set
2800903674eSAndrew Geissler   ``LIVE_ROOTFS_TYPE = "squashfs-lz4"`` and ensure that ``live`` is in
281*5f35090dSAndrew Geissler   :term:`IMAGE_FSTYPES`.
2820903674eSAndrew Geissler
2830903674eSAndrew Geissler-  Recipes with an unconditional dependency on ``libpam`` are only
2840903674eSAndrew Geissler   buildable with ``pam`` in :term:`DISTRO_FEATURES`. If the dependency is
2850903674eSAndrew Geissler   truly optional then it is recommended that the dependency be
286*5f35090dSAndrew Geissler   conditional upon ``pam`` being in :term:`DISTRO_FEATURES`.
2870903674eSAndrew Geissler
2880903674eSAndrew Geissler-  For EFI-based machines, the bootloader (``grub-efi`` by default) is
2890903674eSAndrew Geissler   installed into the image at /boot. Wic can be used to split the
2900903674eSAndrew Geissler   bootloader into separate boot and rootfs partitions if necessary.
2910903674eSAndrew Geissler
2920903674eSAndrew Geissler-  Patches whose context does not match exactly (i.e. where patch
2930903674eSAndrew Geissler   reports "fuzz" when applying) will generate a warning. For an example
2940903674eSAndrew Geissler   of this see :yocto_git:`this commit
2950903674eSAndrew Geissler   </poky/commit/?id=cc97bc08125b63821ce3f616771830f77c456f57>`.
2960903674eSAndrew Geissler
2970903674eSAndrew Geissler-  Layers are expected to set ``LAYERSERIES_COMPAT_layername`` to match
2980903674eSAndrew Geissler   the version(s) of OpenEmbedded-Core they are compatible with. This is
2990903674eSAndrew Geissler   specified as codenames using spaces to separate multiple values (e.g.
3000903674eSAndrew Geissler   "rocko sumo"). If a layer does not set
3010903674eSAndrew Geissler   ``LAYERSERIES_COMPAT_layername``, a warning will is shown. If a layer
3020903674eSAndrew Geissler   sets a value that does not include the current version ("sumo" for
3030903674eSAndrew Geissler   the 2.5 release), then an error will be produced.
3040903674eSAndrew Geissler
3050903674eSAndrew Geissler-  The ``TZ`` environment variable is set to "UTC" within the build
3060903674eSAndrew Geissler   environment in order to fix reproducibility problems in some recipes.
3070903674eSAndrew Geissler
3080903674eSAndrew Geissler
309