migration-2.5.rst 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Release 2.5 (sumo)
  3. ==================
  4. This section provides migration information for moving to the Yocto
  5. Project 2.5 Release (codename "sumo") from the prior release.
  6. .. _migration-2.5-packaging-changes:
  7. Packaging Changes
  8. -----------------
  9. This section provides information about packaging changes that have
  10. occurred:
  11. - ``bind-libs``: The libraries packaged by the bind recipe are in a
  12. separate ``bind-libs`` package.
  13. - ``libfm-gtk``: The ``libfm`` GTK+ bindings are split into a
  14. separate ``libfm-gtk`` package.
  15. - ``flex-libfl``: The flex recipe splits out libfl into a separate
  16. ``flex-libfl`` package to avoid too many dependencies being pulled in
  17. where only the library is needed.
  18. - ``grub-efi``: The ``grub-efi`` configuration is split into a
  19. separate ``grub-bootconf`` recipe. However, the dependency
  20. relationship from ``grub-efi`` is through a virtual/grub-bootconf
  21. provider making it possible to have your own recipe provide the
  22. dependency. Alternatively, you can use a BitBake append file to bring
  23. the configuration back into the ``grub-efi`` recipe.
  24. - *armv7a Legacy Package Feed Support:* Legacy support is removed for
  25. transitioning from ``armv7a`` to ``armv7a-vfp-neon`` in package
  26. feeds, which was previously enabled by setting
  27. ``PKGARCHCOMPAT_ARMV7A``. This transition occurred in 2011 and active
  28. package feeds should by now be updated to the new naming.
  29. .. _migration-2.5-removed-recipes:
  30. Removed Recipes
  31. ---------------
  32. The following recipes have been removed:
  33. - ``gcc``: The version 6.4 recipes are replaced by 7.x.
  34. - ``gst-player``: Renamed to ``gst-examples`` as per upstream.
  35. - ``hostap-utils``: This software package is obsolete.
  36. - ``latencytop``: This recipe is no longer maintained upstream. The
  37. last release was in 2009.
  38. - ``libpfm4``: The only file that requires this recipe is
  39. ``oprofile``, which has been removed.
  40. - ``linux-yocto``: The version 4.4, 4.9, and 4.10 recipes have been
  41. removed. Versions 4.12, 4.14, and 4.15 remain.
  42. - ``man``: This recipe has been replaced by modern ``man-db``
  43. - ``mkelfimage``: This tool has been removed in the upstream coreboot
  44. project, and is no longer needed with the removal of the ELF image
  45. type.
  46. - ``nativesdk-postinst-intercept``: This recipe is not maintained.
  47. - ``neon``: This software package is no longer maintained upstream
  48. and is no longer needed by anything in OpenEmbedded-Core.
  49. - ``oprofile``: The functionality of this recipe is replaced by
  50. ``perf`` and keeping compatibility on an ongoing basis with ``musl``
  51. is difficult.
  52. - ``pax``: This software package is obsolete.
  53. - ``stat``: This software package is not maintained upstream.
  54. ``coreutils`` provides a modern stat binary.
  55. - ``zisofs-tools-native``: This recipe is no longer needed because
  56. the compressed ISO image feature has been removed.
  57. .. _migration-2.5-scripts-and-tools-changes:
  58. Scripts and Tools Changes
  59. -------------------------
  60. - ``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer``: The
  61. ``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer`` scripts
  62. previously shipped with poky but not in OpenEmbedded-Core have been
  63. removed. These scripts are not maintained and are outdated. In many
  64. cases, they are also limited in scope. The
  65. ``bitbake-layers create-layer`` command is a direct replacement for
  66. ``yocto-layer``. See the documentation to create a BSP or kernel
  67. recipe in the ":ref:`bsp-guide/bsp:bsp kernel recipe example`" section.
  68. - ``devtool finish``: ``devtool finish`` now exits with an error if
  69. there are uncommitted changes or a rebase/am in progress in the
  70. recipe's source repository. If this error occurs, there might be
  71. uncommitted changes that will not be included in updates to the
  72. patches applied by the recipe. A -f/--force option is provided for
  73. situations that the uncommitted changes are inconsequential and you
  74. want to proceed regardless.
  75. - ``scripts/oe-setup-rpmrepo`` script: The functionality of
  76. ``scripts/oe-setup-rpmrepo`` is replaced by
  77. ``bitbake package-index``.
  78. - ``scripts/test-dependencies.sh`` script: The script is largely made
  79. obsolete by the recipe-specific sysroots functionality introduced in
  80. the previous release.
  81. .. _migration-2.5-bitbake-changes:
  82. BitBake Changes
  83. ---------------
  84. - The ``--runall`` option has changed. There are two different
  85. behaviors people might want:
  86. - *Behavior A:* For a given target (or set of targets) look through
  87. the task graph and run task X only if it is present and will be
  88. built.
  89. - *Behavior B:* For a given target (or set of targets) look through
  90. the task graph and run task X if any recipe in the taskgraph has
  91. such a target, even if it is not in the original task graph.
  92. The ``--runall`` option now performs "Behavior B". Previously
  93. ``--runall`` behaved like "Behavior A". A ``--runonly`` option has
  94. been added to retain the ability to perform "Behavior A".
  95. - Several explicit "run this task for all recipes in the dependency
  96. tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``,
  97. and the ``*all`` tasks provided by the ``distrodata`` and
  98. :ref:`ref-classes-archiver` classes). There is a BitBake option to complete this for
  99. any arbitrary task. For example::
  100. bitbake <target> -c fetchall
  101. should now be replaced with::
  102. bitbake <target> --runall=fetch
  103. .. _migration-2.5-python-and-python3-changes:
  104. Python and Python 3 Changes
  105. ---------------------------
  106. Here are auto-packaging changes to Python and Python 3:
  107. The script-managed ``python-*-manifest.inc`` files that were previously
  108. used to generate Python and Python 3 packages have been replaced with a
  109. JSON-based file that is easier to read and maintain. A new task is
  110. available for maintainers of the Python recipes to update the JSON file
  111. when upgrading to new Python versions. You can now edit the file
  112. directly instead of having to edit a script and run it to update the
  113. file.
  114. One particular change to note is that the Python recipes no longer have
  115. build-time provides for their packages. This assumes ``python-foo`` is
  116. one of the packages provided by the Python recipe. You can no longer run
  117. ``bitbake python-foo`` or have a
  118. :term:`DEPENDS` on ``python-foo``,
  119. but doing either of the following causes the package to work as
  120. expected::
  121. IMAGE_INSTALL_append = " python-foo"
  122. or ::
  123. RDEPENDS_${PN} = "python-foo"
  124. The earlier build-time provides behavior was a quirk of the
  125. way the Python manifest file was created. For more information on this
  126. change please see :yocto_git:`this commit
  127. </poky/commit/?id=8d94b9db221d1def42f091b991903faa2d1651ce>`.
  128. .. _migration-2.5-miscellaneous-changes:
  129. Miscellaneous Changes
  130. ---------------------
  131. - The :ref:`ref-classes-kernel` class supports building packages for multiple kernels.
  132. If your kernel recipe or ``.bbappend`` file mentions packaging at
  133. all, you should replace references to the kernel in package names
  134. with ``${KERNEL_PACKAGE_NAME}``. For example, if you disable
  135. automatic installation of the kernel image using
  136. ``RDEPENDS_kernel-base = ""`` you can avoid warnings using
  137. ``RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""`` instead.
  138. - The :ref:`ref-classes-buildhistory` class commits changes to the repository by
  139. default so you no longer need to set ``BUILDHISTORY_COMMIT = "1"``.
  140. If you want to disable commits you need to set
  141. ``BUILDHISTORY_COMMIT = "0"`` in your configuration.
  142. - The ``beaglebone`` reference machine has been renamed to
  143. ``beaglebone-yocto``. The ``beaglebone-yocto`` BSP is a reference
  144. implementation using only mainline components available in
  145. OpenEmbedded-Core and ``meta-yocto-bsp``, whereas Texas Instruments
  146. maintains a full-featured BSP in the ``meta-ti`` layer. This rename
  147. avoids the previous name clash that existed between the two BSPs.
  148. - The :ref:`ref-classes-update-alternatives` class no longer works with SysV ``init``
  149. scripts because this usage has been problematic. Also, the
  150. ``sysklogd`` recipe no longer uses ``update-alternatives`` because it
  151. is incompatible with other implementations.
  152. - By default, the :ref:`ref-classes-cmake` class uses
  153. ``ninja`` instead of ``make`` for building. This improves build
  154. performance. If a recipe is broken with ``ninja``, then the recipe
  155. can set ``OECMAKE_GENERATOR = "Unix Makefiles"`` to change back to
  156. ``make``.
  157. - The previously deprecated ``base_*`` functions have been removed in
  158. favor of their replacements in ``meta/lib/oe`` and
  159. ``bitbake/lib/bb``. These are typically used from recipes and
  160. classes. Any references to the old functions must be updated. The
  161. following table shows the removed functions and their replacements:
  162. +------------------------------+----------------------------------------------------------+
  163. | *Removed* | *Replacement* |
  164. +==============================+==========================================================+
  165. | base_path_join() | oe.path.join() |
  166. +------------------------------+----------------------------------------------------------+
  167. | base_path_relative() | oe.path.relative() |
  168. +------------------------------+----------------------------------------------------------+
  169. | base_path_out() | oe.path.format_display() |
  170. +------------------------------+----------------------------------------------------------+
  171. | base_read_file() | oe.utils.read_file() |
  172. +------------------------------+----------------------------------------------------------+
  173. | base_ifelse() | oe.utils.ifelse() |
  174. +------------------------------+----------------------------------------------------------+
  175. | base_conditional() | oe.utils.conditional() |
  176. +------------------------------+----------------------------------------------------------+
  177. | base_less_or_equal() | oe.utils.less_or_equal() |
  178. +------------------------------+----------------------------------------------------------+
  179. | base_version_less_or_equal() | oe.utils.version_less_or_equal() |
  180. +------------------------------+----------------------------------------------------------+
  181. | base_contains() | bb.utils.contains() |
  182. +------------------------------+----------------------------------------------------------+
  183. | base_both_contain() | oe.utils.both_contain() |
  184. +------------------------------+----------------------------------------------------------+
  185. | base_prune_suffix() | oe.utils.prune_suffix() |
  186. +------------------------------+----------------------------------------------------------+
  187. | oe_filter() | oe.utils.str_filter() |
  188. +------------------------------+----------------------------------------------------------+
  189. | oe_filter_out() | oe.utils.str_filter_out() (or use the \_remove operator) |
  190. +------------------------------+----------------------------------------------------------+
  191. - Using ``exit 1`` to explicitly defer a postinstall script until first
  192. boot is now deprecated since it is not an obvious mechanism and can
  193. mask actual errors. If you want to explicitly defer a postinstall to
  194. first boot on the target rather than at ``rootfs`` creation time, use
  195. ``pkg_postinst_ontarget()`` or call
  196. ``postinst_intercept delay_to_first_boot`` from ``pkg_postinst()``.
  197. Any failure of a ``pkg_postinst()`` script (including ``exit 1``)
  198. will trigger a warning during :ref:`ref-tasks-rootfs`.
  199. For more information, see the
  200. ":ref:`dev-manual/new-recipe:post-installation scripts`"
  201. section in the Yocto Project Development Tasks Manual.
  202. - The ``elf`` image type has been removed. This image type was removed
  203. because the ``mkelfimage`` tool that was required to create it is no
  204. longer provided by coreboot upstream and required updating every time
  205. ``binutils`` updated.
  206. - Support for .iso image compression (previously enabled through
  207. ``COMPRESSISO = "1"``) has been removed. The userspace tools
  208. (``zisofs-tools``) are unmaintained and ``squashfs`` provides better
  209. performance and compression. In order to build a live image with
  210. squashfs+lz4 compression enabled you should now set
  211. ``LIVE_ROOTFS_TYPE = "squashfs-lz4"`` and ensure that ``live`` is in
  212. :term:`IMAGE_FSTYPES`.
  213. - Recipes with an unconditional dependency on ``libpam`` are only
  214. buildable with ``pam`` in :term:`DISTRO_FEATURES`. If the dependency is
  215. truly optional then it is recommended that the dependency be
  216. conditional upon ``pam`` being in :term:`DISTRO_FEATURES`.
  217. - For EFI-based machines, the bootloader (``grub-efi`` by default) is
  218. installed into the image at /boot. Wic can be used to split the
  219. bootloader into separate boot and root filesystem partitions if necessary.
  220. - Patches whose context does not match exactly (i.e. where patch
  221. reports "fuzz" when applying) will generate a warning. For an example
  222. of this see :yocto_git:`this commit
  223. </poky/commit/?id=cc97bc08125b63821ce3f616771830f77c456f57>`.
  224. - Layers are expected to set ``LAYERSERIES_COMPAT_layername`` to match
  225. the version(s) of OpenEmbedded-Core they are compatible with. This is
  226. specified as codenames using spaces to separate multiple values (e.g.
  227. "rocko sumo"). If a layer does not set
  228. ``LAYERSERIES_COMPAT_layername``, a warning will is shown. If a layer
  229. sets a value that does not include the current version ("sumo" for
  230. the 2.5 release), then an error will be produced.
  231. - The ``TZ`` environment variable is set to "UTC" within the build
  232. environment in order to fix reproducibility problems in some recipes.