migration-5.2.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. .. |yocto-codename| replace:: walnascar
  3. .. |yocto-ver| replace:: 5.2
  4. .. Note: anchors id below cannot contain substitutions so replace them with the
  5. value of |yocto-ver| above.
  6. Release |yocto-ver| (|yocto-codename|)
  7. ======================================
  8. Migration notes for |yocto-ver| (|yocto-codename|)
  9. --------------------------------------------------
  10. This section provides migration information for moving to the Yocto
  11. Project |yocto-ver| Release (codename "|yocto-codename|") from the prior release.
  12. ``debug-tweaks`` removed from :term:`IMAGE_FEATURES`
  13. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14. The ``debug-tweaks`` image feature is now removed because it was too vague about
  15. what it achieved: an image on which the ``root`` user can login without a
  16. password.
  17. To achieve the same result, the features previously added by ``debug-tweaks``
  18. should be manually added to the :term:`IMAGE_FEATURES` variable. These are:
  19. - ``allow-empty-password``
  20. - ``allow-root-login``
  21. - ``empty-root-password``
  22. - ``post-install-logging``
  23. Such a statement would be::
  24. IMAGE_FEATURES += "allow-empty-password allow-root-login empty-root-password post-install-logging"
  25. See the list of available image features in the :ref:`ref-features-image`
  26. section of the Yocto Project Reference Manual.
  27. Supported kernel versions
  28. ~~~~~~~~~~~~~~~~~~~~~~~~~
  29. The :term:`OLDEST_KERNEL` setting is 5.15 in this release, meaning that
  30. out the box, older kernels are not supported. See :ref:`4.3 migration notes
  31. <migration-4.3-supported-kernel-versions>` for details.
  32. Supported distributions
  33. ~~~~~~~~~~~~~~~~~~~~~~~
  34. Compared to the previous releases, running BitBake is supported on new
  35. GNU/Linux distributions:
  36. - Fedora 41
  37. - CentOS Stream 9
  38. On the other hand, some earlier distributions are no longer supported:
  39. - CentOS Stream 8
  40. - Fedora 38
  41. - OpenSUSE Leap 15.4
  42. - Ubuntu 20.04
  43. See :ref:`all supported distributions <system-requirements-supported-distros>`.
  44. Rust language changes
  45. ~~~~~~~~~~~~~~~~~~~~~
  46. - Recipes inheriting the :ref:`ref-classes-cargo` do not install libraries by
  47. default anymore. This behavior can be controlled by the
  48. :term:`CARGO_INSTALL_LIBRARIES` variable.
  49. systemd changes
  50. ~~~~~~~~~~~~~~~
  51. - Support for ``split-usr`` and ``unmerged-usr`` are now removed after Systemd
  52. was updated to version 255. This option allowed installing Systemd in a
  53. system where directories such as ``/lib``, ``/sbin`` or ``/bin`` are *not*
  54. merged into ``/usr``.
  55. As a consequence, the ``systemd`` recipe no longer contains the ``usrmerge``
  56. :term:`PACKAGECONFIG` option as it is now implied by default.
  57. - ``systemd.bbclass``: If a ``systemd`` service file had referred to other service
  58. files by starting them via
  59. `Also <https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Also=>`__,
  60. the other service files were automatically added to the :term:`FILES` variable of
  61. the same package. Example:
  62. a.service contains::
  63. [Install]
  64. Also=b.service
  65. If ``a.service`` is packaged in package ``A``, ``b.service`` was
  66. automatically packaged into package ``A`` as well. This happened even if
  67. ``b.service`` was explicitly added to package ``B`` using :term:`FILES` and
  68. :term:`SYSTEMD_SERVICE` variables.
  69. This prevented such services from being packaged into different packages.
  70. Therefore, this automatic behavior has been removed for service files (but
  71. not for socket files).
  72. Now all service files must be explicitly added to :term:`FILES`.
  73. - Add ``create-log-dirs`` back to the configuration options. To enable
  74. persistent logging a user can now set the "Storage" option of
  75. ``journald.conf`` to "persistent". The ``/var/log/journal`` directory is now
  76. used for logging instead of ``/run/log``.
  77. - If ``pni-names`` is not in the :term:`DISTRO_FEATURES`, the `Predictable
  78. Network Interface names <https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/>`__
  79. systemd feature will now be disabled. Previously the feature was still
  80. enabled even if ``pni-names`` was not part of :term:`DISTRO_FEATURES`. Make
  81. sure to add the feature to :term:`DISTRO_FEATURES` if you want to keep this
  82. systemd behavior.
  83. Multiconfig changes
  84. ~~~~~~~~~~~~~~~~~~~
  85. The value of :term:`BB_CURRENT_MC` was changed from ``default`` to an empty string
  86. for the default multiconfig configuration to avoid needing to map the values
  87. within BitBake. This was already not happening in some cases so this fixes
  88. some obscure bugs.
  89. Any logic based on :term:`BB_CURRENT_MC` equalling to ``default`` by default should
  90. be changed to be equal to an empty string.
  91. Virtual toolchain provider changes
  92. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  93. Support was added for virtual providers on a per-recipe basis for specific
  94. key toolchain providers listed in ``BB_VIRTUAL_RECIPE_PROVIDERS``. As part of
  95. that support, the ``cross`` providers were simplified to remove the triplet
  96. prefix (:term:`TARGET_PREFIX`, :term:`SDK_PREFIX` and :term:`HOST_PREFIX`) and
  97. generalise the naming. Here are examples of how references to these variables
  98. can be changed to use the new ``cross`` syntax::
  99. virtual/${HOST_PREFIX}binutils -> virtual/cross-binutils
  100. virtual/${TARGET_PREFIX}binutils -> virtual/cross-binutils
  101. virtual/${HOST_PREFIX}gcc -> virtual/cross-cc
  102. virtual/${TARGET_PREFIX}gcc -> virtual/cross-cc
  103. virtual/${SDK_PREFIX}gcc -> virtual/nativesdk-cross-cc
  104. virtual/${HOST_PREFIX}compilerlibs -> virtual/compilerlibs
  105. virtual/${TARGET_PREFIX}compilerlibs -> virtual/compilerlibs
  106. virtual/nativesdk-${SDK_PREFIX}compilerlibs -> virtual/nativesdk-compilerlibs
  107. virtual/${TARGET_PREFIX}g++ -> virtual/cross-c++
  108. A :term:`PREFERRED_PROVIDER` assignment can be transformed as follows::
  109. PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils -> PREFERRED_PROVIDER_virtual/cross-binutils
  110. PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils -> PREFERRED_PROVIDER_virtual/cross-binutils:class-nativesdk
  111. PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ -> PREFERRED_PROVIDER_virtual/nativesdk-cross-c++
  112. The above examples should cover most cases, but there might be situations where
  113. replacing is not as straightforward. For more examples, see the commit
  114. :oe_git:`"classes/recipes: Switch virtual/XXX-gcc to virtual/cross-cc (and
  115. c++/binutils)" </openembedded-core/commit/?id=4ccc3bc8266c>` in
  116. :term:`OpenEmbedded-Core (OE-Core)`.
  117. :ref:`ref-classes-autotools` changes
  118. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  119. - Changes to how ``aclocal`` is invoked means that ``ACLOCALDIR`` and
  120. ``ACLOCALEXTRAPATH`` are no longer used.
  121. - Directories containing m4 files are no longer found automatically and
  122. passed to ``autoreconf``. If a recipe fails to configure because it cannot
  123. find m4 macros, then usually the solution is to set ``EXTRA_AUTORECONF += "-I
  124. path/to/m4"`` in the recipe.
  125. - The :ref:`ref-classes-autotools` class now requires any recipe that inherits
  126. the class to have a ``configure`` script. The configuration script location
  127. is stored in the :term:`CONFIGURE_SCRIPT` variable. The
  128. :ref:`ref-tasks-configure` task will fail if the script is missing.
  129. :term:`UBOOT_ENTRYPOINT` changes
  130. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  131. The :term:`UBOOT_ENTRYPOINT` variable should now be defined with a leading
  132. ``0x`` to its value. For example, consider the following assignment::
  133. UBOOT_ENTRYPOINT ?= "20008000"
  134. This should now be replaced by::
  135. UBOOT_ENTRYPOINT ?= "0x20008000"
  136. Git fetcher: support for multiple revisions per URL removed
  137. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  138. The support for having multiple Git revisions per URL in :term:`SRC_URI` was
  139. removed from BitBake, which means the following syntax is not supported
  140. anymore::
  141. SRC_URI = "git://some.host/somepath;bareclone=1;branch=branchX,branchY;name=nameX,nameY"
  142. SRCREV_nameX = "xxxxxxxxxxxxxxxxxxxx"
  143. SRCREV_nameY = "yyyyyyyyyyyyyyyyyyyy"
  144. This was rarely used in the core repositories because it would only ever make
  145. sense for bare clones (the ``bareclone=1`` :term:`SRC_URI` option) where recipes
  146. take care of the Git checkout. This removal simplifies the code logic in several
  147. places.
  148. If one of your recipes is using this mechanism, you can split the code source
  149. fetching into two separate entries::
  150. SRC_URI = "git://some.host/somepath;bareclone=1;branch=branchX;name=nameX \
  151. git://some.host/somepath;bareclone=1;branch=branchY;name=nameY"
  152. SRCREV_nameX = "xxxxxxxxxxxxxxxxxxxx"
  153. SRCREV_nameY = "yyyyyyyyyyyyyyyyyyyy"
  154. Git fetcher: Branch parameter now required in :term:`SRC_URI`
  155. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  156. The ``branch`` parameter is now required when specifying a Git repository in
  157. :term:`SRC_URI`, for example::
  158. SRC_URI = "git://some.host/somepath;branch=branchX"
  159. A missing ``branch`` parameter used to produce a warning, and will now produce
  160. an error.
  161. Recipe changes
  162. ~~~~~~~~~~~~~~
  163. - The ``libnss-mdns`` recipe is now renamed to ``avahi-libnss-mdns`` to avoid a
  164. conflict with meta-networking.
  165. - :ref:`ref-classes-ptest` support for the ``valgrind`` recipe was removed, due
  166. to regressions occurring after updating Glibc to 2.41.
  167. Removed variables
  168. ~~~~~~~~~~~~~~~~~
  169. The following variables have been removed:
  170. - ``PACKAGE_SNAP_LIB_SYMLINKS``: related to an unmaintained and obsolete
  171. "micro" :term:`distro <DISTRO>`.
  172. - ``SETUPTOOLS_INSTALL_ARGS``: obsolete and unused variable.
  173. - ``BB_DANGLINGAPPENDS_WARNONLY``: support for only warning the user when a
  174. ``.bbappend`` file doesn't apply to the original recipe has been dropped. See
  175. the :ref:`dev-manual/layers:Appending Other Layers Metadata With Your Layer`
  176. section of the Yocto Project Development Tasks Manual for alternatives to
  177. this variable.
  178. Removed recipes
  179. ~~~~~~~~~~~~~~~
  180. The following recipes have been removed in this release:
  181. - ``liburi-perl``: moved to :oe_git:`meta-perl </meta-openembedded/tree/meta-perl>`.
  182. - ``python3-isodate``: moved to :oe_git:`meta-python </meta-openembedded/tree/meta-python>`.
  183. - ``python3-iniparse``: removed as there are no consumers of this recipe in
  184. :oe_git:`openembedded-core </openembedded-core>` or :oe_git:`meta-openembedded </meta-openembedded>`.
  185. - ``blktool``: It was created in 2004 as an alternative to hdparm and never
  186. updated since (while :wikipedia:`hdparm <Hdparm>` remains active).
  187. - ``cargo-c-native``: converted to a target recipe and renamed to ``cargo-c``.
  188. - ``libnss-mdns``: renamed to ``avahi-libnss-mdns``
  189. Removed classes
  190. ~~~~~~~~~~~~~~~
  191. The following classes have been removed in this release:
  192. - ``migrate_localcount.bbclass``: obsolete class for which code was already
  193. removed in 2012.
  194. Removed features
  195. ~~~~~~~~~~~~~~~~
  196. - The ``ld-is-gold`` distro feature was removed from the
  197. :term:`DISTRO_FEATURES`.
  198. Miscellaneous changes
  199. ~~~~~~~~~~~~~~~~~~~~~
  200. - :term:`ZSTD_COMPRESSION_LEVEL` is now a plain integer number instead of a dash-prefixed
  201. command-line option (e.g. it should be set to ``3`` rather than ``-3``).
  202. - Until now, the variable :term:`UBOOT_ENV` was processed both by the U-Boot
  203. recipe and by the ``kernel-fitimage.bbclass``. However, adding a U-Boot
  204. script to the kernel FIT image is a different and independent thing, which
  205. also requires an independent variable.
  206. Therefore, the :term:`UBOOT_ENV` is no longer handled by the
  207. ``kernel-fitimage.bbclass``. There is a new variable :term:`FIT_UBOOT_ENV`
  208. which should be used for adding a U-Boot script to a FIT image.
  209. - The ``devtool ide-sdk`` utility has been removed from the :doc:`eSDK
  210. </sdk-manual/extensible>` (but remains available in the BitBake environment).